A Combined Localization Algorithm for Wireless Sensor Networks
Wireless sensor networks (WSNs) are widely used in various fields to monitor and track various targets by gathering information, such as vehicle tracking and environment and health monitoring. The information gathered by the sensor nodes becomes meaningful only if it is known where it was collected from. Considering that multilateral algorithm and MDS algorithm can locate the position of each node, we proposed a localization algorithm combining the merits of these two approaches, which is called MA-MDS, to reduce the accumulation of errors in the process of multilateral positioning algorithm and improve the nodes’ positioning accuracy in WSNs. It works in more robust fashion for noise sparse networks, even with less number of anchor nodes. In the MDS positioning phase of this algorithm, the Prussian Analysis algorithm is used to obtain more accurate coordinate transformation. Through extensive simulations and the repeatable experiments under diverse representative networks, it can be confirmed that the proposed algorithm is more accurate and more efficient than the state-of-the-art algorithms.
Wireless sensor networks are composed of a large number of sensor nodes with sensing, computing, and wireless communication capabilities. They are widely used in military reconnaissance, environmental monitoring, smart home, and other fields. Interestingly, the location service of WSN is a guarantee of important services such as information collection, target tracking, and information management. Only by obtaining the location of the sensor node corresponding to the collected information will the data make sense. Therefore, determining the location information of sensor nodes becomes particularly important in WSNs. Global Navigation Satellite systems (INS) and Global Positioning System (GPS) have been widely employed for localization, but it is unpractical and costly to integrate a GPS receiver in each sensor of an entire large-scale sensor network. A large number of localization algorithms thus are proposed.
Existing localization algorithms mainly fall into two strategies: range-free and range-based approaches, according to whether the distance between nodes is to be measured before positioning. Range-based algorithms include trilateral algorithm , multilateral algorithm , DEP algorithm , etc. Specifically, the multilateral algorithm , possessing of high positioning accuracy, is a commonly used algorithm among them. An equation can be constructed by using the distance between the anchor nodes and the unknown nodes, and then the solution can be worked out via the least square method in the algorithm. The disadvantage of this method is that the selection of the anchor node serial number will have some influence on the positioning accuracy in the process of constructing the equation. Range-free algorithms comprise centroid localization algorithm , APIT (Approximate Point-in-Triangulation Test) algorithm , DV-Hop (Distance Vector-Hop) algorithm , etc. The centroid location algorithm  is very simple and convenient but entirely based on network topology which can be influenced by communication range of nodes. The range may be disturbed by various factors in practice, bringing about a relatively large error. By determining the location relationship between the unknown node and the neighbor anchor nodes, the APIT algorithm  keeps shrinking and covering the unknown area, ultimately approaching the unknown node. The APIT algorithm relies on highly connectivity of nodes, so this algorithm is not suitable for sparse networks. The DV-Hop algorithm  is one of the popular hop-count localization methods, which obtains the information of each anchor node mainly through the distance vector routing protocol. However, with the increase of the hop count between the anchor node and the unknown node, the gradually accumulating measured distance leads to the poor positioning accuracy of unknown nodes. Moreover,  compares the performance of APIT algorithm with DV-Hop algorithm in detail, and the results show that the performance of DV-Hop algorithm is much better than of the APIT algorithm no matter how the number of anchor nodes changes. The localization algorithm based on MDS [8–10] can be considered as the range-based algorithm, as well as the range-free algorithm, and this paper mainly considers it as range-based algorithm. More narrowly, the WSNs can be regarded as a weighted undirected graph with the weight is the distance between two adjacent nodes. Distance matrix, as the only input of MDS algorithm, derives from the shortest path calculated by Floyd algorithm between any two nodes. It is well known that the accuracy of the MDS algorithm is closely related to the hops between nodes. The larger the hops, the larger the error of replacing the real distance with the shortest path distance, which eventually lead to poor positioning accuracy of the MDS algorithm. Comparing range-based algorithm with range-free algorithm, the former has higher hardware cost but has high localization accuracy. In the application scenarios with high accuracy requirements, range-based algorithms are generally adopted.
Based on the range-based localization algorithm and the range-free localization algorithm, some researchers have proposed the idea of combining the heuristic optimization algorithm with the WSN node localization technology. The principle of this idea is to construct the optimal positioning model by obtaining the distance information between nodes or the connected topological relations and use the heuristic optimization algorithm to calculate the optimal solution by iterating the optimal positioning model. So far, many optimization algorithms have been used in the realm of heuristic optimization algorithms, such as Simulated Annealing (SA) , Artificial Fish Swarm Algorithm (AFSA) , Flower Pollination Algorithm (cFPA) , and Particle Swarm Optimization (PSO) . Carrying out a great number of simulation experiments on the above heuristic algorithm, we intuitively discover that the heuristic algorithm is too computationally expensive and time-consuming for the centralized localization optimization to apply in the real scene localization. In addition, a universal weakness of heuristic algorithms is that they are overly dependent on the initial parameters. Improper selection of the initial parameters may cause the localization algorithm to be paralyzed.
Ultrawide Band (UWB) technology, first appeared in 1960 radar applications, has now developed into an emerging technologies which sets wireless data communications and real-time sensing as a whole. Differing from the traditional communication technologies, UWB technology is a pulsed radio technology, which transmits data through extremely short nanosecond pulses, replacing carrier signals, between transceivers. According to the definition and characteristics of the signal, UWB technology has the advantages of large bandwidth, fast transmission, low transmission power, high multipath resolution, and strong antifading. UWB ranging techniques commonly used today can be categorized into Time of Arrival (TOA), Time Difference of Arrival (TDOA), Angle of Arrival (AOA), and Received Signal Strength Indication (RSSI). TOA technique requires precise clock synchronization technique, so the hardware requirements are higher. The principle of TDOA is to use the difference of transmission speed by wireless signal or ultrasonic signal to measure the distance between nodes. It has higher ranging accuracy but needs to be equipped with ultrasonic launcher for nodes, which increases the hardware cost. AOA algorithms need antenna arrays to extract angle information. RSSI is a technique for measuring the distance between nodes based on the power loss of a wireless signal during transmission. Since the inherent wireless communication chip in the node has the ability to calculate and transmit signals, RSSI does not require additional hardware. In addition, the accuracy of the localization algorithm based on RSSI has obvious merits compared with that of range-free algorithm, so this paper selects RSSI ranging technology for measuring the distance between nodes.
In large-scale sensor networks with anchor nodes distributed on the edge, due to the limitation of communication range, the location of all unknown nodes could not be obtained by one-time multilateral algorithm, and they must be hierarchically positioned: firstly, finding all unknown nodes adjacent to at least three anchor nodes, called 1-level nodes. Then, the multilateral algorithms are used to calculate the estimated position of the 1-level nodes. Further, the 1-level nodes as new anchor nodes join into the anchor node set. At this point, the 1-level nodes location ends. Similar to the steps of positioning the 1-level nodes, nodes from 2-level to n-level can be located by the multilateral algorithm until all the unknown nodes have obtained the geographical position. As can be seen from the above steps, the multilateral algorithm will produce the cumulative error; the more nodes’ level, the greater the cumulative error, the poorer positioning accuracy. In order to prevent overaccumulation of cumulative error, this paper presents a combined algorithm (MA-MDS), which uses the MDS algorithm to calculate the location of the remaining unknown nodes after positioning a specific level of nodes (such as six-level nodes) location by the multilateral algorithm.
We will examine the performance of MA-MDS on networks of 100 to 200 nodes, with node locations either chosen randomly or deployed according to a rough grid, and compared the positioning error of the MA-MDS algorithm with other representative algorithms. It is worth stating that the anchor nodes in this article are only distributed on the edge of the node deployment area to cater to some special application scenarios.
The rest of paper is organized as follows: In Section 2, we discuss related work. Section 3 describes show the MA-MDS algorithm. Computer simulation results and experiment analysis are shown in Sections 4 and 5.
2. Problem Description
2.1. Problem Formulation
Consider a WSN with wireless nodes labeled in 2-dimensional space. The number of anchors whose locations are all known already is , so there are unknown nodes that should be localized in this problem. By using RSSI signal propagation model, we can estimates the distance from one node to its neighbors. Denote the distance measured between nodes and as . Let ; represents the real coordinates of all nodes and represents the set of anchor nodes’ coordinates. Note that anchor nodes must be distributed on the edge of the node deployment area.
2.2. Error in Localization Problem
Consider a WSN with wireless sensor nodes which include anchors and unknown nodes, and define the average location error in WSN as follows.
Definition 1. Average Localization Error iswhere is the communication radius of the node in network.
2.3. RSSI Signal Propagation Model
An important feature of wireless signal transmission is that the strength of signal attenuates with the increase of distance. The most widely used simulation model to generate RSSI samples as a function of distance in Radio Frequency (RF) channels is the log-normal shadowing model .
where is the received signal power, is the transmit power, and is the path loss for a reference distance of . is the path loss exponent, and is a zero-mean Gaussian noise with a standard deviation , which means . All powers are in , and all distances are in meters. Moreover, in this model, we assume there is not obstruction like walls between nodes.
3. Localization Algorithm
This section mainly introduces MA-MDS localization framework, described MDS algorithm and multilateral algorithm in detail. As mentioned in Section 1, MA-MDS is an algorithm, combining the advantages of the multilateral algorithm and the MDS algorithm. Multilateral algorithms are prone to produce large errors of high-level nodes as the effect of cumulative error, and the reverse is true for the low-level nodes. Therefore, MDS algorithm is used to positioning the high-level nodes with larger errors to obtain more accurate results. The detailed process of the MA-MDS algorithm is as follows. Primarily, the multilateral algorithm is used to obtain the estimated coordinates of the nodes from 1-level to k-level nodes as set B, and each node in B can be regarded as a new anchor node, namely, . Next, we have to get the distance matrix that the MDS algorithm needs to input. The solution is to get the weighted shortest path distance by using Floyd algorithm. Finally, running the MDS algorithm to get the relative map, and then the Procrustes analysis (PA) algorithm [16, 17] is referenced to convert the relative map into an absolute map (estimated node location). It should be noted that, at this moment, the anchor nodes are union of all estimated nodes calculated by the multilateral algorithm and the original anchor nodes. The detailed flow of the MA-MDS algorithm is shown in Algorithm 1.
There is a problem pressing to be solved is how to determine the threshold k, so that when , the i-level nodes are called the high-level nodes and are, instead, called the low-level nodes when is satisfied. Obviously, since the distribution of nodes varies under different application scenarios, the selection of k may change. In the simulation experiment of this paper, the selection of k will be described in detail in Section 4.
The detailed introduction and analysis of multilateral algorithm and MDS algorithm are as follows.
3.1. The MDS Algorithm
MDS is a set of mathematical techniques which have their origins in psychometrics and psychophysics. MDS has been applied in many fields, such as computational chemistry, machine analysis, and target localization. When used for localization, MDS takes full advantage of connectivity or distance information between known and unknown nodes.
Use to denote the true locations of the set of wireless nodes in 2-dimensional space. represents the Euclidean distance between the nodes and .Let , and we can getWe can get (6) after applying double center to ,Then,Further,Calculate the Singular Value Decomposition (SVD) of where , .
Let ; the localization scenes is 2-dimensional space, so get the first two rows of , which is relative location of nodes. We need eventually to get the absolute position of nodes which can be achieved from the rigid transformation (rotation, scaling, and translation). This transformation can be achieved using Procrustes analysis (PA) algorithm.
3.2. The Multilateral Algorithm
Figure 1 shows the anchor nodes with their coordinates and the unknown node . From them, the distance between anchors and unknown nodes can be worked out. Consider the distance between anchor nodes and the unknown node as .
According to the Pythagoras theorem, the distance equation is
Equation (13) can be written as .
Then, the least squares solution can be calculated as
Thus, the estimated coordinates of unknown nodes are obtained.
3.3. Procrustes Analysis (PA) Algorithm
The Procrustes problem is to get the matrix Q, which satisfies AQ as close as possible to B; there A and B are given.
We begin by defining the set of orthogonal Stiefel matrices:
Let and .
Let denote the standard Frobenius norm in .
The Procrustes problem for orthogonal Stiefel matrices can be expressed in formula:where .
When , (17) is called the equilibrium Procrustes problem.
This research tries to use the Procrustes analysis to convert the relative coordinates to absolute coordinates. Use to denote the true locations of the set of anchor nodes and to denote the estimated locations of the set of anchor nodes. The purpose is to find the transformed coordinate matrix so that the mean square error of and is minimized.
In the above formula, is the scaling factor, is the coordinate translation vector, and is the rotation mirror matrix.
Through the above analysis, the Procrustes problem is
In order to weaken the correlation between the transformation parameters and the rotation parameters, centralized processing of X and Y is
Then, formula (20) can be simplified as
The process of solving the minimum value by Lagrange function method is as follows:Let , , and ; then,
In formula (24), since both and are symmetric matrices, is symmetric matrices.
The Singular Value Decomposition of is
After the various parameters are obtained by formula (29), all the coordinates in the relative map can be converted to absolute coordinates.
4. Complexity and Simulation Results Analysis
4.1. Time Complexity Analysis
Assume that the total number of nodes in the network is and the number of anchor nodes is . The original classic MDS algorithm uses a centralized calculation method. The time complexity of the shortest path distance between nodes calculated by Floyd algorithm is and that of MDS algorithm is . The time complexity of the multilateral algorithm is . For the heuristic optimization algorithms, we assume that the maximum number of iterations is , the population number is , the number of try times is , and the number of decision variables, that is, the dimension of space, is . The time complexity of the algorithm is . is the number of fishes and pollen in the AFSA  and cFPA , respectively. Setting the simulation parameters of AFSA algorithm as , the time complexity of this algorithm is , while the time complexity of MA-MDS algorithm is . Obviously, the time complexity of the MA-MDS algorithm is lower than that of the heuristic algorithm.
4.2. Simulation Results Analysis
In this section we conduct the simulation studies on the MA-MDS algorithm. The nodes subject to uniform distribution are placed randomly, or on a square grid with some placement errors. Table 1 shows the parameters for grid placement, and Table 2 shows the parameters for random deployment. The connectivity (average number of neighbors) is controlled by communication radius. In order to determine the threshold k, we simulate the MA-MDS algorithm 50 times in the case of grid deployment and random deployment respectively and then calculate 95% confidence interval of the Average Positioning Error of each level node shown in Tables 3 and 4. Since positioning error less than 1.5 m is acceptable in practical application scenarios, we observe the confidence intervals in Tables 3 and 4 to conclude that is a reasonable solution in the case of grid placement and in the case of random placement it needs to set . In addition, the superiority of MA_MDS algorithm is verified by comparison with the state-of-the-art algorithms, such as the AFSA and the cFPA. In the AFSA, we set scale of fish , visual field of artificial fish , maximum step size , congestion factor , the number of try times , and maximum iteration number . In the cFPA, the size of pollen population is fixed at 100 and the number of iterations is 100.
4.3. Grid Placement
The sensor nodes are deployed according to square grid. Actually, nodes are usually placed in the surrounding of the vertices due to random placement error. The parameters of the simulation are shown in Table 1. 121 nodes are placed on a square grid, with a unit edge distance . Figure 2 shows the result of average localization error for a network, where the number of nodes in the network varies from 64 to 196 nodes. It is worth noting that, in this experiment, the communication range is . Since the size of the network area is constant, r varies with the increase of the number of nodes and changes correspondingly, which makes the monotonous relationship between the number of nodes and the positioning error of algorithms not clearly shown in Figure 2. This relationship can be seen in Figure 3. By analyzing Figure 2, we can draw the following conclusions:(i)The MA_MDS has a smaller error than the other localization analyzed algorithm. This is due to the fact that, in the process of localization of the MA-MDS algorithm, not only did it reduce the cumulative error in the multilateral algorithm positioning stage but it also increased the number of anchor nodes and reduced the hops between nodes in the positioning phase of the MDS algorithm.(ii)Continuous accumulation of accumulated errors results in the sharp increase of positioning error of the multilateral algorithm, with the increase of the number of nodes.(iii)The heuristic algorithm is less robust. Small changes in the initial parameters may cause a huge change in positioning results. Random deployment of the initial population is also a factor that affects the robustness of the algorithm.
Varying the communication range from 30 to 50m, the Average Positioning Error of a network with 100 unknown nodes and 20 anchor nodes is observed in Figure 3. This result shows that there is a monotonous relationship between the communication range and the positioning error. The larger the communication range, the smaller the error. This is because the larger the communication range, the greater connectivity the network is.
Remaining the total number of nodes and the value of the communication radius, the relationship between Range Error Rate and Average Positioning Error in network is shown in Figure 4. The ranging error rate is equal to the value dividing the difference between the estimated distance and the true distance by the communication range of nodes. Since heuristic optimization algorithms have much larger errors than other algorithms, heuristic algorithms are not drawn in the figure. As can be seen from Figure 4, all the algorithms satisfy the rule that the larger the range error rate, the larger the average position error. Moreover, the polyline of the MA_MDS is always at the bottom of the graph, which means that the MA_MDS has higher positioning accuracy than the MA algorithm and the MDS algorithm no matter how the range error rate changes.
In addition, we compared the positioning performance of MA_MDS algorithm with the range-free algorithm. The idea of the APIT algorithm is triangular coverage approximation. That is, the unknown node is in the centroid of overlapping regions of multiple triangles constructed by the anchor node. The application scenario in this paper is that the anchor nodes are distributed at the edge of the area and the number of anchor nodes is small. For each unknown node, no multiple triangles exist which are formed by the anchor nodes, so that the algorithm is no longer applicable. The DV-Hop algorithm and the centroid location algorithm are compared with the MA-MDS. The location error is shown in Figure 5. Compared with the range-free algorithm, the MA_MDS algorithm has overwhelming superiority.
4.4. Random Placement
In this set of experiments, nodes are placed randomly in a 200m200m square and 20 anchor nodes are deployed on the boundary of the square region. The parameters of the simulation are shown in Table 2. The initial parameters of the AFSA and the cFPA are consistent with those in the grid deployment scenario and the analyzing process just likes it. Figure 6 shows the result of average localization error for a network, where the number of nodes random deployment in the network varies from 120 to 200 nodes. In this experiment, as the communication radius is fixed at , the more the number of nodes, the greater the connectivity of the network and the lower the Average Positioning Error. In addition, it can be seen from the figure that the positioning accuracy of the heuristic algorithms is poor under the application scenario where the anchor nodes are distributed on the boundary. Figure 7 shows the relationship between communication range and Average Positioning Error in random deployment network. The positioning error of MA_MDS algorithm is lower than other algorithms and decreases with increasing communication radius. Figure 8 shows relationship between Range Error Rate and Average Positioning Error in network.
The Average Positioning Error of range-free algorithm is shown in Figure 9. Keeping the communication radius unchanged, the Average Positioning Error of the DV-Hop algorithm and MA_MDS algorithm gradually decreases with the number of nodes increasing. However, the positioning error of the centroid location algorithm has an increasing trend. In centroid location algorithm, the greater the connectivity of the network as the number of nodes increases, the greater the probability that different nodes have the same neighbor anchor nodes. With the number of nodes increasing, different unknown nodes are more likely to obtain the same estimated coordinates through this algorithm, making the Average Positioning Error of the network, the final result, excessively large. In addition, it can be seen from Figure 9 that the error of the centroid location algorithm is much higher than others. The reason is that the anchor nodes adjacent to the unknown node are approximately in a straight line and are generally on the same side of the unknown node, which is determined by application scenario in this paper. Through this simulation experiment, we are able to conclude that the positioning accuracy of range-based algorithm is significantly better than range-free algorithm.
In this research, we have presented a localization method by combining the multilateral algorithm and the MDS algorithm in WSNs. The simulation results reveal that the proposed algorithm can locate the sensor network of the anchor node on the edge and the positioning accuracy is much higher than the state-of-art algorithms. The proposed algorithm is very practical due to its good robustness, high positioning accuracy, and low cost. We plan to conduct large-scale experiments in real environments to analyze the algorithms in future.
Conflicts of Interest
The authors declare that they are have no conflicts of interest.
This project is supported by the National Natural Science Foundation of China (Grants nos. 61572435, 61472305, and 61473222), Joint Foundation High-Tech LSNSET (no. KX172600039), and Ningbo Natural Science Foundation (Grant nos. 2016A610035, 2017A610119).
W. Lan, W. Zhang, and J. Luo, “Design and Implementation of Adaptive Intelligent Trilateral Localization Algorithm,” Chinese Journal of Sensors and Actuators, vol. 30, no. 7, pp. 1089–1094, 2017.View at: Google Scholar
R. Gong, J. Zhao, Y. Huang, and X. Meng, “WSN multilateral localization algorithm based on MLE,” in Proceedings of the International Conference on Network Computing and Information Security, NCIS '11, pp. 426–429, 2011.View at: Google Scholar
H. A. B. F. De Oliveira, E. Nakamura, A. Loureiro, and A. Boukerche, “Directed position estimation: a recursive localization approach for wireless sensor networks,” in Proceedings of the 7th International Conference on Computer Communication and Networks, pp. 557–562, October 2005.View at: Google Scholar
Y. Bai, C. M. Li, and Y. Xue, “A Centroid Localization Algorithm for Wireless Sensor Networks Based on RSSI,” Applied Mechanics and Materials, vol. 303-306, no. 7, pp. 197–200, 2013.View at: Google Scholar
D. Niculescu and B. Nath, “DV based positining in ad hoc networks,” Kluwer J. Telecommunication Systems, vol. 22, no. 1, pp. 267–280, 2017.View at: Google Scholar
S. Anthrayose and A. Payal, “Comparative analysis of approximate point in triangulation (APIT) and DV-HOP algorithms for solving localization problem in wireless sensor networks,” in Proceedings of the 7th IEEE International Advanced Computing Conference, IACC '17, pp. 372–378, January 2017.View at: Google Scholar
B. We, W. Chen, and X. Ding, “Advanced MDS based localization algorithm for location based services in wireless sensor network,” in Proceedings of the Ubiquitous Positioning Indoor Navigation and Location Based Service, UPINLBS '10, pp. 1–8, October 2010.View at: Google Scholar
Shang et al., “Localization from mere connectivity,” in Proceedings of the Acm International Symposium on Mobile Ad Hoc Networking and Computing, pp. 201–212, 2003.View at: Google Scholar
N. Saeed and H. Nam, “MDS-LM for wireless sensor networks localization,” in Proceedings of the Vehicular Technology Conference, pp. 1–6, IEEE, kor, 2014.View at: Google Scholar
X. Yang, W. Zhang, and Q. Song, “A novel WSNs localization algorithm based on artificial fish swarm algorithm,” International Journal of Online Engineering, vol. 12, no. 1, pp. 64–68, 2016.View at: Google Scholar
J. S. Pan et al., “An improvement of flower pollination algorithm for node localization optimization in WSN,” Journal of Information Hiding and Multimedia Signal Processing, vol. 8, no. 2, pp. 486–499, 2017.View at: Google Scholar
Y. Zhou and X. Kou, “Orthogonal procrustes analysis and its application on rotation matrix estimation,” Geomatics and Information Science of Wuhan University, vol. 34, no. 8, pp. 996–999, 2009.View at: Google Scholar