Research Article  Open Access
A Least SquareBased SelfAdaptive Localization Method for Wireless Sensor Networks
Abstract
In the wireless sensor network (WSN) localization methods based on Received Signal Strength Indicator (RSSI), it is usually required to determine the parameters of the radio signal propagation model before estimating the distance between the anchor node and an unknown node with reference to their communication RSSI value. And finally we use a localization algorithm to estimate the location of the unknown node. However, this localization method, though high in localization accuracy, has weaknesses such as complex working procedure and poor system versatility. Concerning these defects, a selfadaptive WSN localization method based on least square is proposed, which uses the least square criterion to estimate the parameters of radio signal propagation model, which positively reduces the computation amount in the estimation process. The experimental results show that the proposed selfadaptive localization method outputs a high processing efficiency while satisfying the high localization accuracy requirement. Conclusively, the proposed method is of definite practical value.
1. Introduction
Generally, two steps are needed for the wireless sensor networks (WSN) localization algorithm to estimate the location of an unknown node based on the Received Signal Strength Indicator (RSSI) [1]. Step is to try to determine the propagation parameters of the radio signal communication model with a fitting technique by measuring the mapping relation between RSSI and the distance . Step is to estimate the distance between the unknown node and each anchor node with reference to the communication RSSI value between them and obtain the estimated position value of the unknown node with reference to the coordinates of those anchor nodes. Therefore, this localization method requires a preliminary test for the environment [2] so as to determine the propagation parameters of the model. The lighted localization method Boundingbox (Bbox for simplicity) [3] and its improved version [4–7], such as weighted Bbox, 3point centroid Bbox, and 3point weighted 3point centroid Bbox, were proposed to conduct localization of the unknown node.
However, the preliminary environmental test is a very complicated process that requires large amounts of experimental works. Besides, the preliminary test must be taken in a fixed localization environment. In case of any changes in the communication environment, the parameters in the radio signal propagation model would change along location information which plays an important role in locationbased service application system, leading to error increment to the distance estimated upon RSSI value or the original model becoming not applicable any more. The factors affecting the environment usually include temperature, humidity, interference, and nonlineofsight (NLOS) [8–10], which are subject to change along with the environment and time. Thus, the localization system that can keep high accuracy in a dynamic environment will be more promising. To satisfy this requirement, a maximum likelihoodbased selfadaptive localization algorithm is proposed, which does not require a preliminary test for the environment in a dynamic environment but needs considerable computation amount. A distributed selfadaptive localization algorithm is proposed in the reference document [4], which, however, only investigates the localization issue when the communications range is fixed and poor in versatility. Hu and Evans proposed a Monte Carlo localization (MCL) method for mobile sensor node, and its computational time complexity is , where is the number of Monte Carlo sample points, is the number of localization points, and is the number of anchor nodes [11]. Min et al. proposed an improved version of MCL, which is called Monte Carlo localization algorithm based on anchor node selection (MCLAS) [12], and the computational time complexity is also . To locate the mobile node, Shan et al. proposed selfadaptive localization algorithm based on Monte Carlo and gray prediction model (GPLA); however, the complexity is high [13]. For the posetracking problem in a dynamic and highly occluded environment, literature [14] proposed a selfadaptive tracking algorithm for mobile robots. And maximum likelihoodbased selfadaptive localization algorithm is proposed for dynamic localization, of which complexity is , where is the number of anchor nodes, n is the number of iterations, and m is the number of localization points.
In consideration of this, an analysis was given to the working process of selfadaptive localization algorithm. It was found that the propagation parameters in the radio signal propagation model became linear after the model was taken from the logarithm, and the computational amount could be reduced significantly using the least square method. Hence, this paper proposes the least squarebased selfadaptive WSN localization method.
2. A Least SquareBased SelfAdaptive Localization Method
In this section, the system flow of the least squarebased selfadaptive localization method is presented before every part is elaborated.
2.1. System Flow of Least SquareBased SelfAdaptive Localization Method
In the proposed selfadaptive localization algorithm, initialization is given firstly, including parameter initialization and representation of RSSI in probability density, before selfadaptive localization is performed iteratively. It is divided into two steps. The first step is to estimate the location of the unknown node and the second step is to estimate the parameter in the propagation model. Graphically, the workflow of the proposed least squarebased selfadaptive localization method is illustrated in Figure 1.
The parameter initialization in Figure 1 mainly concerns the parameters of radio signal propagation models and . Their values are arbitrary, but the convergence rate of the selfadaptive localization algorithm would be affected if their initial values are inappropriate. After the coordinates of the unknown node are estimated with the maximum likelihood estimation method, the parameters in the radio signal propagation model, and , are estimated using the least square method. And then, these two parameters are evaluated if they converge to thresholds and , respectively. If yes, the iteration will stop and output the estimation result; otherwise, the iteration will go on until the condition of convergence is satisfied.
2.2. Representation of RSSI in Probability Density
In the traditional RSSIbased localization method, a path loss model is established for mapping between RSSI and distance , as expressed by the following equation [2–4, 9]: where RSSI(d) represents the signal strength at the anchor node received from the localization node; RSSI() represents the signal strength at the anchor node received from the reference node; represents the distance between the reference node and the anchor node; d represents the distance between the unknown node and the anchor node; and represents the channel attenuation index; its typical value is 2~4.
Make a transformation to (1) in the following way, that is, to convert RSSI(d) from dBm units into miliwat units. By dividing both ends of (1) with 10 and performing exponent arithmetic to both sides with base 10, we obtain
Now, the mean received signal strength at the distance may be expressed as a radio signal propagation model as follows [2]: where , , and ; and are parameters of the radio signal propagation model; specifically, represents a constant in proportion to the received signal strength in a certain distance (typically 1 meter) and represents the attenuation factor of path loss.
If the communication distance and the parameters of the radio signal propagation model and are assigned, the following conditional probability density function can be established on the basis of Rayleigh distribution [2]: where , , and represents the serial number of received signal strength; represents the serial number of anchor node; N represents the receiving times for the overall signal strength, and represents the total number of anchor nodes. The conditional probability density function represents the probability under the condition of distance , radio propagation parameters and , and received signal strength , where represents the distance between the unknown node and the jth anchor node at the coordinates of in addition to and .
And then, it is required to work out the joint probability corresponding to the total signal strength at the unknown node receiving from anchor nodes. Let us assume that are independent from each other; then the resulting joint conditional probability density function can be expressed as follows [2]:
If every unknown node is estimated separately, then different nodes might give different and values. This practice is considered unreasonable, for all these nodes are in the same environment. However, the real environment is dynamic at any time rather than the abovementioned case, and every node on the localization platform has its distinct hardware features. In other words, every node is different from any of the others, which require separate estimation to the location information of every unknown node. Therefore, this paper will try to provide a separate solution to every unknown node.
If the joint probability density is expressed with likelihood function , then the log likelihood function can be expressed as . The maximum value of the log likelihood function may be obtained by means of alternating solution in two steps. Each step is a separate solution process for the maximum value.
2.3. Location Estimation of an Unknown Node
When the log likelihood function is solved for the maximum value, it is possible to work out the values of and . More specifically, we calculate the partial derivatives of and separately and reset them to zero; we will have the values of and Y, where represents the iteration times. This probability density function does not assume any value to parameters and ; thus, the initial values for and in the first iteration are arbitrary [3].
We work out (6) separately to get the estimated horizontal and longitudinal coordinates of the node: and .
2.4. Least SquareBased Estimation for Parameters of Radio Propagation Model
To obtain the values of and in a log normal model with least square method, it is equivalent to minimizing the sum of square [8]; that is,where error is defined as follows: where the relation between and as well as that between and can be expressed as Thereby, a linear relation is obtained between and .
With least square optimization criterion, we can obtain the optimal solution shown as (11), which minimized the value of .
The calculated values of and will be used for next iteration, where in dBm must be converted to the equal in dB; we have .
Where the least square optimization criterion is different from maximum likelihood criterion, as in maximum likelihood criterion, the th equation will be subtracted by the first () equation, with the promise that the error in th equation is very small, which cannot be guaranteed in real localization environment.
2.5. Computational Complexity Analysis
Computational complexity is an average measurement of calculated quantity of processing method via pseudocode. And from analysis, the computational complexity of least squarebased selfadaptive localization method is , which is the same as that of maximum likelihoodbased selfadaptive localization algorithm, where is the number of anchor nodes, n is the times of iteration, and m is the number of localization points.
If we equate M (the number of sample points) to n (the number of iterations), which are in Monte Carlobased localization method and selfadaptive localization method, respectively, the computational complexity of these two localization methods is the same.
3. Performance Evaluation
In this section, the performance of the least squarebased WSN selfadaptive localization algorithm will be evaluated and analyzed in comparison with that of the maximum likelihoodbased selfadaptive localization algorithm [2].
3.1. Experimental Settings and Evaluating Indicators
3.1.1. Experimental Settings
The simulation environment is a 3.2 m × 3.2 m area, where 4 anchor nodes are positioned at the four vertexes and unknown nodes move horizontally and vertically at intervals of 0.8 m to establish a total of 25 fixed points, as shown in Figure 2. Since the unknown nodes match with the anchor nodes at the four vertexes, the unknown nodes at the vertexes are separately moved by 0.1 m inwards both in direction and in direction. The unknown nodes and the anchor nodes at an arbitrary fixed point within the area are mutually through. In the simulation, the distance carries Gaussian noise datum . Use a log normal propagation model to convert into the arithmetic for RSSI value.
The computation platform used in the process of evaluation is parameterized as follows: CPU, i7 720QM@1.6 GHz, RAM, 4 GB, operating system, Windows XP Professional SP3, and evaluation software, Matlab 7.5.
3.1.2. Evaluating Indicators
Use the at every fixed point to evaluate the performance of the localization algorithm [4–7], as expressed in the following equation: where represents the estimated coordinates of the unknown node and represents the real anchor nodes of the same unknown node. A smaller value implies less localization error and higher localization accuracy.
3.1.3. Experiment Design
Firstly, the proposed selfadaptive localization algorithm will be evaluated in terms of localization accuracy and convergence, and a performance analysis will be given to the proposed algorithm in comparison with other algorithms; finally, different selfadaptive localization algorithms will be compared in terms of processing time.
3.2. Analysis of Location Accuracy
3.2.1. Accuracy Comparison with Maximum LikelihoodBased SelfAdaptive Method
Use both the maximum likelihoodbased selfadaptive localization algorithm [2] and the proposed least squarebased selfadaptive localization algorithm to locate in the abovementioned environment. Set the initial values for = −40 dB and . The threshold values for and are 1 × 10^{−3} and 1 × 10^{−3}, respectively. The iteration times are set to 10, 20, 30, 200, and 1000, respectively, and the distribution model of the background white noise is set to variance and . Then, the mean localization errors for those two algorithms are tabularized in Tables 1 and 2 separately.


As shown in Tables 1 and 2, the least squarebased selfadaptive localization method outputs lower localization error than the maximum likelihoodbased selfadaptive localization method.
After iterating 1000 times with the maximum likelihoodbased selfadaptive localization method, the localization errors at all the fixed points are shown in Figures 3(a) and 4(a); under the same conditions using the least squarebased selfadaptive localization method, the localization errors at all the fixed points are shown in Figures 3(b) and 4(b).
(a) Maximum likelihoodbased selfadaptive localization
(b) Least squarebased selfadaptive localization
(a) Maximum likelihoodbased selfadaptive localization
(b) Least squarebased selfadaptive localization
As shown in Figures 3 and 4, the least squarebased selfadaptive localization method provides less localization error than the maximum likelihoodbased selfadaptive localization method. Conclusively, the least squarebased selfadaptive localization method behaves higher localization performance.
3.2.2. Accuracy Comparison with Monte CarloBased Localization Methods
Table 3 shows the localization accuracy of different Monte Carlobased localization methods, including MCL [4], MCLS [5], and GPLA [6], where the number of nodes takes the value of 25, the number of anchor nodes takes value of 4, and the number of sample points takes value of 10, 20, 30, 200, and 1000, respectively. We also show the location accuracy of our proposed least squarebased selfadaptive method in Table 3, where variance σ takes the value of 0.2.

Table 3 illustrates that the localization accuracy of Monte Carlobased localization methods is lower than that of the proposed least square selfadaptive localization method in this paper. That is mainly owing to the least square optimization criterion, which makes localization estimation value closer to the real value.
3.2.3. Accuracy Comparison with BoundBoxBased Localization Methods
To further evaluate the performance of the least squarebased selfadaptive localization method, a comparison was given in terms of localization error after 1000 iteration times between the least squarebased selfadaptive localization method and the original and modified Boundbox localization algorithms [4–7], as shown in Table 4.

In Boundingbox (Bbox for simplicity), the centroid of the overlap region among different communication ranges is treated as location estimation value. Considering different contributions of each distance estimation value, the weighted Boundingbox was proposed to improve the location accuracy, where the weighted values are the reciprocal of distance estimation values. In the 3point centroid Boundingbox method, three anchor nodes are selected from four anchor nodes, and we get four groups of anchor nodes and their corresponding location estimation values; then we treat the mean of the four location estimation values as the final location estimation result. And the 3point weighted centroid Boundbox is the weighted improved version of 3point centroid Boundbox, where the weighted value is the reciprocal of the sum of the values of three distances in each group.
As shown in Table 4, the localization performance, expressed with two variances, using the selfadaptive localization algorithm after 1000 iteration times is comparative to that using the original or modified Boundingbox localization methods. It turns out that, compared with the localization algorithms that require preliminary environment test, the proposed selfadaptive localization algorithm does not require preliminary environment test for radio propagation parameters, while the localization accuracy is close to the original and modified Boundingbox localization methods, though the processing time is longer.
3.3. Analysis of Location Error Convergency
Location error convergence is the property that location errors of different iteration stages have the same tendency to the zero end state; that is, with the increment of iteration number, the value of location error gets smaller and smaller. We conducted an analysis of location error convergence to evaluate the convergence speed of different location methods.
After iterating 1000 times with the maximum likelihoodbased selfadaptive localization method, the convergence results of localization errors at the 25 fixed points within the localization area are shown in Tables 5 and 6; with the same conditions, the localization errors convergence graphs of least squarebased selfadaptive localization method are shown in Tables 5 and 6.


As shown in Tables 5 and 6, the least squarebased selfadaptive localization method provides a higher convergence rate of localization error in comparison with the maximum likelihoodbased selfadaptive localization method. Specifically, about 84% of unknown nodes completed their convergence within 1000 iteration times using the former method, while only about 52% of unknown nodes completed their convergence within 1000 iteration times using the latter method. Comparatively, the proposed least squarebased selfadaptive localization method is able to work at a higher convergence rate.
3.4. Analysis of Location Processing Time
As the computational complexity of Monte Carlobased localization method and selfadaptive localization method is the same, we analyze more detail; that is, we compare the processing times.
3.4.1. Processing Time Comparison with Maximum LikelihoodBased SelfAdaptive Method
Tables 7 and 8 show the processing time of localization errors separately using the maximum likelihoodbased selfadaptive localization method and the least squarebased selfadaptive localization method at the iteration times of 10, 20, 30, 200, and 1000, with different variances of background noise.


As shown in Tables 7 and 8, at the same iteration times, the processing time using the maximum likelihoodbased selfadaptive localization algorithm is about 4 times longer than that using the least squarebased selfadaptive localization method. Conclusively, the least squarebased selfadaptive localization method can provide a higher computational efficiency, for the least square technique reduces the computational amount in the radio parameter estimation process.
3.4.2. Processing Time Comparison with Monte CarloBased Methods
Table 9 shows the localization processing time of different Monte Carlobased localization methods, including MCL [4], MCLS [5], GPLA [6], and our proposed least squarebased selfadaptive method, where the number of nodes takes the value of 25, the number of anchor nodes takes value of 4, and the number of sample points takes value of 10, 20, 30, 200, and 1000, respectively.

Table 9 illustrates that when the number of sample points is small, that is, it is less than 1000, localization processing time of Monte Carlobased method is lower than that of the least squarebased selfadaptive method. However, when the number of sample points is large, localization processing time of Monte Carlobased method is bigger than that of the least squarebased selfadaptive method. That is because least squarebased selfadaptive method has ability on error convergence, while the number of iterations has to be set in advance in Monte Carlobased method.
To sum up, the simulation results show that the proposed least squarebased selfadaptive localization algorithm has definite advantages over the maximum likelihoodbased selfadaptive localization algorithm in terms of both localization accuracy and localization processing time. Considering the fact that the nodes in a wireless sensor network are still, the environment changes relatively slowly and the signal attenuation parameter varies slowly with time in the communication environment; it is believed that the proposed least squarebased selfadaptive localization method is capable of satisfying the typical dynamic localization requirement.
4. Conclusion
The traditional WSN localization method requires a preliminary environmental test to determine the radio signal propagation parameters, leading to a complex localization process, highly experimental workload, and poor environment adaptability. In view of these weaknesses, this paper proposes a least squarebased WSN selfadaptive localization method. Using least square technique and iteration strategy to estimate the radio parameters, this method not only reduces the computational amount in the localization process but also improves the localization accuracy. It provides methodological and technical means for the dynamic localization applications.
It is requisite for a selfadaptive localization method to be finally applied into an actual WSN localization system. For this reason, the proposed localization method is going to be demonstrated and evaluated in the true WSN localization environment.
Competing Interests
The authors declare that they have no competing interests.
Acknowledgments
This work is funded by National Natural Science Foundation of China (61601142 and 61671174), space support technology fund projects (2014HTHGD5), Natural Science Foundation of Shandong Province of China (ZR2015FM027), State Key Laboratory of Geoinformation Engineering (no. SKLGIE2014M24), State Key Laboratory of Satellite Navigation System and Equipment Technology, Guangxi Key Laboratory of Automatic Detecting Technology and Instruments (YQ14205 and YQ15203), and Natural Scientific Research Innovation Foundation in Harbin Institute of Technology (HIT.NSRIF.201721).
References
 Y. Liu, Z. Yang, X. Wang, and L. Jian, “Location, localization, and localizability,” Journal of Computer Science and Technology, vol. 25, no. 2, pp. 274–297, 2010. View at: Publisher Site  Google Scholar
 Y. Nishi and T. Ohtsuki, “A distributed localization with unknown attenuation coefficient in wireless sensor networks,” in Proceedings of the 14th AsiaPacific Conference on Communications (APCC '08), pp. 1–5, Tokyo, Japan, October 2008. View at: Google Scholar
 R. Zemek, S. Hara, K. Yanagihara et al., “A joint estimation of target location and channel model parameters in an IEEE 802.15.4based wireless sensor network,” in Proceedings of the 18th IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC '07), September 2007. View at: Google Scholar
 Y.B. Yao, R. Zeng, and Z.Q. Yi, “Bounding box based distributed search localization algorithm for WSN,” Journal on Communications, vol. 33, no. 2, pp. 135–140, 2012. View at: Publisher Site  Google Scholar
 A. Savvides, H. Park, and M. Srivastava, “The bits and flops of the nhop multialterations primitive for node localization problems,” in Proceedings of the ACM International Workshop on Wireless Sensor Networks and Applications (WSNA '02), pp. 112–121, 2002. View at: Google Scholar
 GuoHaiqi, Research of the localization method based on ZigBee [M.S. thesis], South West Communication University, 2007.
 W. Dan, Research on the localization method based on RSSI for wireless sensor network [M.S. thesis], Harbin Institute of Technology, 2011.
 Y. Peng, Q. Luo, D. Wang, and X. Peng, “WSNs distance estimation method with RSSID using interval data clustering algorithm,” Chinese Journal of Scientific Instrument, vol. 33, no. 3, pp. 491–498, 2012. View at: Google Scholar
 Q. Luo, Y. Peng, X. Peng, and A. El Saddik, “Uncertain data clusteringbased distance estimation in wireless sensor networks,” Sensors, vol. 14, no. 4, pp. 6584–6605, 2014. View at: Publisher Site  Google Scholar
 Q. Luo, Y. Peng, J. Li, and X. Peng, “RSSIbased localization through uncertain data mapping for wireless sensor networks,” IEEE Sensors Journal, vol. 16, no. 9, pp. 3155–3162, 2016. View at: Publisher Site  Google Scholar
 L. Hu and D. Evans, “Localization for mobile sensor networks,” in Proceedings of the 10th Annual International Conference on Mobile Computing and Networking (MobiCom '04), pp. 45–57, Philadelphia, Pa, USA, October 2004. View at: Google Scholar
 L. I. Min, L. Ting, and X. U. Hua, “Localization algorithm based on anchor node select model for wireless sensor networks,” Chinese Journal of Sensors and Actuators, vol. 24, no. 2, pp. 264–268, 2011. View at: Publisher Site  Google Scholar
 Z.L. Shan, L.H. Liu, Y.S. Zhang, and G.X. Huang, “A strong selfadaptivity localization algorithm based on gray prediction model for mobile nodes,” Journal of Electronics and Information Technology, vol. 36, no. 6, pp. 1492–1497, 2014. View at: Publisher Site  Google Scholar
 Y. Wang, W. Chen, J. Wang, and P. Xiao, “Selfadaptive posetracking algorithm for mobile robots in dynamic and highlyoccluded environments,” Jiqiren/Robot, vol. 37, no. 1, pp. 112–121, 2015. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2016 Baoguo Yu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.