WSNs node localization algorithm based on multi-hop distance vector and error correction

Wireless sensor networks (WSNs) have broad application prospects in various industries, and node localization technology is the foundation of WSN applications. Recently, many range-free node localization algorithms have been proposed, but most of them suffer from low accuracy. In order to improve the localization accuracy, in this paper we proposed the node localization algorithm based on multi-hop distance vector and error correction (MDV-EC). In terms of distance estimation, firstly the MDV-EC algorithm calculates the neighbor distance according to node neighbor relationship, then estimates the distance between unknown node and anchor node in multi-hop manner, and finally calibrates the distance refer to distance correction coefficient. In view of similarity of localization errors of nodes in similar regions, an error correction scheme is also investigated, which corrects the node initial estimated locations of nodes refer to the localization error vector of nearby anchor node. Simulation results show that our proposed MDV-EC has better performance than the other two algorithms in terms of node localization accuracy, and the error correction scheme can effectively reduce the localization errors.


Introduction
Wireless sensor networks (WSNs) are composed of many sensor nodes with wireless communication capability, which is a key technology for the Internet of Things (IoT) and has broad application prospects in many fields [1][2][3]. Node localization is one of the critical issues of WSNs system, and the location information of nodes is crucial for WSNs, as the sensor data without location information will become meaningless [4,5]. While traditional localization technologies such as GPS can provide good location information, equipping all nodes with GPS chips will undoubtedly increase the cost of system deployment. In addition, sensor nodes have limited energy and usually cannot be charged in a timely manner. Equipping the nodes with GPS will consume a lot of energy and reduce the lifetime of the system. Therefore, in practice, only a few nodes called anchor nodes are equipped with GPS to obtain their locations, while others obtain their locations with the assistance of localization algorithms and anchor nodes [6].
In recent years, researchers have proposed many node localization algorithms, which can be roughly divided into two categories: range-based and range-free localization algorithms. The ranging-based localization algorithm uses ranging techniques to obtain the distance between nodes and estimate the position based on the coordinates of the anchor nodes and distance estimation information. Popular ranging techniques, such as time of arrival (TOA), time difference of arrival (TDOA), angle of arrival (AOA) and received signal strength (RSS) [7]. Among them, TOA, TDOA and AOA have good ranging accuracy, but these methods require additional hardware, which raises the system deployment cost and is not suitable for large-scale deployment. RSS-based ranging is used to estimate the distance based on the propagation attenuation characteristics of wireless signals in the environment. This approach has attracted the attention of many researchers as it does not require additional hardware and has the advantage of low cost. However, the robustness of RSS-based ranging technique is poor, and its ranging accuracy is easily affected by environmental factors. The range-free algorithm investigates the network connectivity information to estimate the node locations directly or obtains the distance between nodes based on connectivity information (e.g., hop count) to further obtain the estimated node locations. Compared to range-based localization algorithms, range-free algorithms are less affected by the environment, more robust, and do not require additional hardware, making it more adaptable to large-scale network deployment environments. Among the range-free localization algorithms, distance vector-based localization is one of the most popular approaches, but the method still has the disadvantage of low localization accuracy. For the distance vector node localization algorithm, the estimated distance between nodes is related to the network connectivity of the path region, and the neighboring nodes have similar network connectivity, which leads to the similarity of the neighboring node localization errors. From this aspect, in order to improve the node localization accuracy, we proposed the MDV-EC in this paper. The MDV-EC algorithm consists of two parts: initial location estimation and error correction. In the initial position estimation phase, the distance between neighboring nodes is first estimated based on the neighbor relationship, the estimated distance between the unknown node and the anchor node is obtained by exploring the shortest path between nodes, and finally, the initial estimated position of the node is obtained by the least squares method. In the error correction phase, all anchor nodes calculate their estimated positions according to the node position estimation method, and the error vector of each anchor node is obtained with their estimated and real positions. Given the similarity of the error vectors, the error vectors of the anchor nodes are used to correct the initial estimated locations of the unknown nodes around the anchor nodes, further reducing the localization errors. Simulation results show that the localization accuracy of our proposed MDV-EC algorithm outperforms two representative distance vector localization algorithms, DV-Hop and DV-RND, in different scenarios.
The rest of this paper is organized as follows. Section 2 provides an overview of related works, Sect. 3 illustrates the network model and problem statement, Sect. 4 describes our proposed MDV-EC localization algorithm, Sect. 5 evaluates the performance of the proposed algorithm, and the last section concludes the paper and discusses future research directions.

Related works
For range-free algorithms, the most popular range-free algorithms are the centroid algorithm [8], approximate triangular point (APIT) [9], and distance vector hopping (DV-Hop) [10]. Among them, DV-Hop algorithm has received wide attention due to its high robustness and simplicity. The DV-Hop algorithm is a typical distance vector node localization algorithm. The basic idea is that firstly, the average hop distance in the network is calculated based on the anchor nodes and network connectivity, secondly, the unknown node gets its distance from each anchor node based on the number of hops and the average hop distance, and finally, the estimated position of the unknown node is obtained by the least squares method. Although the DV-Hop algorithm has the advantages of computational simplicity and environmental adaptability, its localization accuracy is far from satisfactory. Therefore, many researchers have proposed a number of improved algorithms for DV-Hop.
Some researchers tried to enhance the localization performance by improving the accuracy of the average hop distance estimation and hop count estimation. Shahzad et al. in [11] proposed the DV-MaxHop algorithm. The DV-MaxHop defines the maximum number of hops to constrain the information propagation in the network, discards the information of anchor nodes with larger hops, obtains more accurate average hop distance, and improves the accuracy of localization. Compared with DV-Hop, the accuracy of DV-MaxHop algorithm has been improved, but its positioning error is still unsatisfactory. In order to improve the accuracy of hop estimation, paper [12] and [13] proposed an RSS-based hop estimation method, which uses RSS information to serialize the hop values and avoid the large errors of integer hop numbers. However, the accuracy of this hop estimation method is susceptible to environmental factors. Some researchers argue that the reliability of different anchor nodes is different during localization, so by referring to some reliable anchor nodes, better localization accuracy can be obtained. From this point of view, Cao et al. proposed the dynamic anchor nodes set algorithm (DANS) in [14]. The DANS algorithm transforms the anchor selection problem into a combinatorial optimization problem and solves it using a binary particle swarm algorithm to obtain the set of reliable anchor points. After that, the unknown node calculates the best estimated coordinates based on the information of the reliable anchor nodes. Chen et al. proposed an enhanced DV-Hop algorithm in [15]. First, the algorithm abstracts the relationship between nodes in the network as a spring model and corrects the distance between the unknown node and the anchor node by considering the combined influence of each node. After that, reliable anchor nodes are selected according to the random sampling consensus, and the coordinates of the unknown nodes are calculated using the reliable anchor nodes. To accommodate anisotropic node deployment, in [16] Zhang et al. proposed a boundary-based anchor selection scheme, which determines the reliability of anchor nodes based on the number of boundary nodes contained in the path, and selects reliable anchor nodes to provide information for localization. Although the above methods can identify reliable anchor nodes in the network to provide information for localization and avoid the negative effect of some unreliable anchor nodes on localization accuracy, they may fail when the number of anchor nodes is small. With the emergence of heuristic algorithms, some researchers have tried to use heuristic optimization algorithms such as differential evolution (DE) [17], grey wolf optimization (GWO) [18], particle swarm optimization (PSO) [19,20] and so on to solve for the estimated coordinates of nodes. In addition to the heuristic optimization approach, Jin et al. proposed an iterative localization algorithm CVX-DV-hop in [21]. The CVX-DV-hop transforms the location estimation problem into a problem with convex functions and nonconvex constraints. Then, designed a continuous convex approximation method to solve the optimization problem iteratively. Though the solution accuracy of the above methods is greatly improved compared with the least squares method, they are too computationally intensive and their localization accuracy is limited by the distance estimation accuracy. To further improve the node localization accuracy, researchers proposed some multi-hop distance estimation methods based on neighbor connectivity. In [22], Wu et al. proposed a new distance vector localization algorithm called DV-RND, which estimates the distance of each hop based on the connectivity of neighbors, obtains the estimated distance between the unknown node and the anchor node based on the multi-hop path, and finally calculates the coordinates of the node. Wang et al. in [23] proposed an expected hop estimation method based on node density to improve the accuracy of per-hop distance estimation. Wu et al. [24] applied the expected hop progress node localization algorithm in anisotropic sensor deployment scenario. The above-mentioned works improve the accuracy of distance estimation and reduce the localization error, but most of them ignore the error similarity introduced by distance vector localization methods. The algorithm first explores the neighbor relationship to improve the multi-hop distance estimation accuracy, and then makes full use of the error similarity to correct the estimated coordinates and further reduce the localization error. Next section we will introduce the network model and problem statements.

Network model and problem statements
In the real deployment scenario, the communication coverage area of nodes is not a standard circle considering environmental factors. In order to simulate the signal propagation in real scenarios, the radio irregularity model is used in this paper to simulate the communication coverage of sensor nodes in the network [13]. According to the radio propagation model, nodes have different signal strengths in different directions, and the signals in adjacent directions have a certain correlation. The correlation of adjacent direction signals is determined by the degree of irregularity (DOI). Dividing the space into 360 directions, the signal strength of each direction can be calculated by Eq. (1).
where P r represents the signal strength received by the node, P t represents the signal strength of the message sent, η represents the signal attenuation constant (path loss exponent), d 0 represents the reference distance, P(d 0 ) is the received signal strength at the reference distance d 0 and K i is the direction parameter of DOI, which is calculated by Eq. (2).
where rand i is the direction random parameter, rand i ∈ [-DOI, DOI]. The DOI value controls the stability of the signal; a larger value means a more unstable signal and a smaller value means a more stable signal. When DOI is equal to 0, the coverage area of the signal is a standard circle. To describe the model more specifically, we set the communication radius R 30, and plot the signal coverage areas with DOI 0.01 and DOI 0.02, respectively, as shown in Fig. 1.
In this paper, we assume that WSNs system satisfy the following conditions.
1. All nodes are randomly and uniformly arranged in deployment area, forming a connectivity graph in which any two nodes can communicate in a single-hop or multi-hop manner.
2. Some of the nodes in the network have determined and known locations, and they are called anchor nodes.
3. All nodes in the network have the same communication radius R. The communication model of all nodes is the DOI model. 4. The connectivity of any two nodes in the network is symmetric, i.e., when node i can communicate directly with node j, then node j must be able to communicate directly with node i.
The node localization problem in this paper is to obtain the geographic location of all sensor nodes with the assistance of anchor nodes and the network connectivity information.

Neighbor distance estimation
As shown in Fig. 2, node u and i are two neighboring nodes, and their communication radius is R. The common communication coverage area is the light blue part. In a network with uniform random deployment of sensor nodes, the closer two adjacent nodes are, the larger their communication common coverage area is and the more nodes fall into the common coverage area. Similarly, the farther two nodes are from each other, the smaller their communication common coverage area is and the fewer nodes fall into the common coverage area. As a result, we can estimate the distance of two adjacent nodes by exploring their neighbor information.
In random uniform deployment network, according to the geometric relationship, the distance d ui between two neighboring nodes u, i is a function of the common coverage area A(d ui ), as shown in Eq. (3) [22,25].
Let x d ui /2R and bring it into Eq. (3) to obtain the following equation.
The Taylor expansion of the right part of the Eq. (4) at x 0 gives formula (5).
Since nodes u and i are each other's neighbor nodes, their distance d ui is smaller than the communication radius R. Because x ≤ d ui /2R, we have x ≤ 0.5. Since x is less than 0.5, the value of the higher order term of x is very small. Therefore, ignoring the x 3 and higher terms in Eq. (6), taking x d ui /2R into Eq. (6) and simplifying it, we obtain Eq. (7) as follows.
According to Eq. (7), we can estimate the neighbor node distance d ui based on the communication radius R and the common coverage areaA(d ui ). The node communication radius R is predefined, and the common coverage area A(d ui ) can be estimated from the neighbor node relationship. Next, we estimate the common coverage area A(d ui ) of the communication range of the two neighboring nodes u, i based on their neighbor relationship. The node density of A(d ui ) can be obtained by dividing the number of common neighbor nodes of u, i by the area of A(d ui ). Similarly, the node density of the communication coverage area can be obtained by dividing the number of neighbor nodes by the area of the node communication range. Since the nodes are randomly and uniformly arranged, the node density is the same in all regions. According to this feature, the node density of the common communication coverage area is the same as the node density within the communication range of each node, which leads to Eq. (8). (8) where C N ui represents the number of common neighbor nodes, M u represents the number of neighbors of node u. It is worth noting that the number of both C N ui and M u contain node u, i itself. From Eq. (8), we know that the estimated coverage area A(d ui ) of two nodes u, i can be calculated according to the number of neighboring nodes of u, i and the communication radius R, as shown in Eq. (9).
Equation (9) uses the number of neighboring nodes of u and the number of common neighbor nodes of u, i to estimate the common coverage area A(d ui ). Similarly, we can estimate the A(d ui ) according to the number of neighboring nodes of i and the number of common neighboring nodes. To avoid estimation bias, we take the average of the two estimation methods as the final estimate of A(d ui ), as shown in Eq. (10).
To simplify the presentation, we define the intersection degree I ui associated with nodes u and i as shown in Eq. (11).
Simultaneous Eqs. (7) and (12), after eliminates A(d ui ) we can obtain the functions of d ui and I ui as shown in Eq. (13).
According to Eq. (13), we can use the intersection degree I ui of two nodes to calculate the estimated distance d ui of two nodes, the I ui can be obtained from the adjacency information. Referring to Eq. (13), all nodes can estimate the distance to their neighbor nodes.

Preliminary location estimate
After initialization, all nodes obtain their neighboring information by data exchange and calculate the estimated distance to neighbor nodes according to the method illustrated in Sect. 3.1. After the neighbor distance estimation, all anchor nodes flood their information to the whole network, and all nodes get the estimated distance to each anchor node during flooding. To improve the accuracy of distance estimation, each anchor node calculates its distance correction coefficient (DCC) based on the anchor position information and the estimated distance. The unknown node corrects the estimated distance from the anchor node based on DCC. The preliminary unknown estimates of nodes are as follows.
Suppose there are n anchor nodes in the deployment area and the set of anchor nodes is [A1, A2, …, An]. After deployment, all nodes broadcast a "hello" message containing their ID number and receive "hello" messages from neighboring nodes. In this way, node neighbor node information is collected. Then, exchange neighbor node information with all neighboring nodes and estimate the distance between the node itself and its neighboring nodes. After neighboring node distance estimation, all anchor nodes broadcast "flood message" message and flood it to the whole network. The format of the "flooding message" is flooding_msg{Ai, d ac , N ID }, where Ai represents the ID of the anchor node to which the flooding message belongs, d ac represents the cumulative distance of the message propagation, i.e., the cumulative estimated distance of the message from the anchor node, and N ID represents the set of relay nodes. Before the flooding starts, the node initializes the estimated multi-hop distance [d A1 , d A2 , … d Ai ] with each anchor node, where all elements are initialized to null. When unknown node k receives the "flooding_msg" message belonging to anchor node Ai, it first refers the estimated distance d t between the node itself and the relay node and calculates the cumulative estimated distance F D Ai of anchor node Ai in the "flooding_msg" propagation path according to Eq. (14).
After updating the cumulative distance, the node checks whether there is multi-hop estimated distance information of anchor node Ai in memory, if there is no such anchor node information, it saves the updated F D Ai as the shortest multihop estimated distance d Ai of anchor node Ai, updates d ac in "flooding_msg" as d Ai , and N ID is updated to the set of neighbor nodes of the receiving node itself, and forwards it after the update. If a node has multi-hop estimated distance Calculate the cumulative estimated distance FDAi in the propagation path according to equation (14) Maintain listening state  Fig. 3. After the network flooding, all nodes get the estimated distance from all anchor nodes, and all anchor nodes calculate their respective DCC based on the estimated distance from other anchor nodes according to Eq. (15).
where (x Ai , y Ai ) and (x i , y i ) represent the location of anchor node Ai, and i respectively, d ki represents the shortest estimated distance between unknown node k and anchor node i. It is worth noting that each anchor node gets its own correction coefficient by the above method instead of getting the average correction coefficient of the network as a whole so that the local characteristics of the respective anchor node can be preserved. After all anchor nodes obtain their DCC values, they flood the DCC value to the whole network. Therefore, the DCC values of all anchor nodes are available for all nodes. Each node uses DCC to correct the estimated distance and obtains the final estimated distance according to Eq. (16). (16) where, d ki and d ki represent estimated distance and final estimated distance respectively. After obtaining the final estimated distances to all anchor nodes, the preliminary estimated positions of the nodes are obtained by using the least squares method. The initial location estimation procedure is as follows. (17) where (x Ai , y Ai ) represents the coordinate of the anchor node Ai, d ki is the final estimated distance between the unknown node k and the anchor node Ai, and (x k , y k ) is the coordinate of node k. The first n-1 terms of Eq. (17) (21).
The linear equation AX B is solved by the least-squares method to obtain the solution of X as in shown in formula (22).

Location error vector correction
The distance vector range-free localization algorithms estimate the distance between the unknown node and the anchor node by investigating the network connectivity, then calculate the unknown node location according to the estimated distance. For these localization algorithms, there is similarity in the network connection between two nodes with similar locations. Therefore, there is also similarity in the distance estimation errors between neighboring nodes and anchor nodes, which leads to similarity in their localization errors. To illustrate this phenomenon, we set 200 nodes to be randomly deployed in a 100 m × 100 m square area, of which 20 are anchor nodes. Apply two representative distance vector range-free localization algorithms DV-Hop and DV-RND to locate unknown nodes in the network. The localization error vectors of all sensor nodes are shown in Fig. 4. In Fig. 4, the blue circle represents the true unknown node location, the red asterisk represents the anchor node location, and the blue line represents the error vector of the node. One end of the blue line connects the real position of the node and the other end is the estimated position of the node. It can be seen from Fig. 4 that nodes that are geographically very close to each other have a large similarity in their error vectors in terms of error magnitude and direction. Based on the above observations, we propose the following error correction method.
Define the location error vector (LEV ) of the anchor node as the vector of the estimated position of the anchor node pointing to the true position. The direction of LEV is from the estimated location to the true location. Before calculating the anchor node LEV , the anchor node itself is considered as an unknown node, and the position of itself is estimated refer to the coordinate information and estimated distance of all anchor nodes (including itself), where the estimated distance from itself is set to 0. The LEV of the anchor node i is V(i), which is determined by Eq. (23).
where ( x Ai , x Ai ) represents the estimated position of anchor node i and (x Ai , y Ai ) represents the true position of anchor node i. Considering that the magnitude and direction of the localization error between sensor nodes in close proximity are highly correlated, based on this property, we can correct the initial estimated position of the unknown node using the LEV of the anchor node. Assuming the initial estimated position of unknown node k is L p (k)=( x k , y k ) whose nearest anchor node is anchor node i, and the LEV of this anchor node is V(i), then the final estimated position of unknown node k L F (k) is calculated by Eq. (24). where c is the error correction factor, which is a constant between [0, 1], and d ik is the estimated distance between the unknown node k and its reference anchor node i. Since the error correction vector of a node is negatively correlated with the distance between two nodes, i.e., The closer the nodes are, the higher the similarity of the error vectors, while the longer distant they are, the lower the similarity in error vectors. Therefore, the magnitude of the correction value is determined by the distance between the unknown node and its reference node; the closer the distance, the larger the correction value, and the farther the distance, the smaller the correction value, in order to avoid over-correction. When the distance between node i and anchor node k is 0, the correction value is equal to V(i). The pseudo-code of our proposed localization error vector correction method is shown below.

Parameter setting and evaluation metrics
We deploy 200 sensor nodes in a 100 m × 100 m square area to test the performance of the localization algorithm and compare the proposed MDV-EC with two distance vector localization algorithms, DV-Hop [10] and DV-RND [22]. We also test the effectiveness of the proposed error correction method by comparing the performance of MDV (the proposed algorithm without distance vector correction) with our proposed MDV-EC algorithm. We complete all simulation experiments in MATLAB2018 platform. The default parameter settings in the simulation are shown in Table 1.
In this paper, we use the average localization error (ALE) and average localization accuracy (ALA) to evaluate the performance of the localization algorithm. The smaller ALE and ALA represent the higher accuracy of the localization algorithm, which can be calculated by Eqs. (25), (26) respectively.
where ( x i , x i ) represents the final estimated position of unknown node i, (x i , y i ) represents the real position of unknown node i, and R is the communication radius of the node.

ALE (m)
Error correction factor (c)

Performance evaluation
Figures 5 and 6 test the effect of error correction factor c on the average localization error of the proposed MDV-EC for different node densities and different number of anchor nodes respectively. The correction factor is a constant between [0, 1]. When the correction factor is small, the correction value of the node position is smaller, and the smaller correction value has less effect on the node position estimation and the error variation is smaller. In order to distinguish the impact of the correction coefficient c on the average positioning error effectively, the range of the error correction coefficient c is set to [0.75, 1] in Fig. 5 and 6. As we can see in Fig. 5, the ALE of the proposed MDV-EC algorithm firstly decreases and then increases as c increases in different node densities. The main reason for this phenomenon is that when c is small, the correction vector value of each unknown node is small, and the correction has less influence on the estimated position. With the continuous increase of c, the value of unknown nodes correction vectors gradually increases and the localization error of the estimated location gradually decreases, which indicates the validity of our proposed error correction. The algorithm achieves optimal localization accuracy when c increases to about 0.95, and the ALE of the algorithm increases rapidly as c continues to increase to 1. This is because when c equals to 1, the error correction vector of each unknown node is equal to the LEV of nearby anchor node, and using this correction vector to correct the initial location will lead to over-correction, increase the localization error. In different node density scenarios, the higher the node density, the higher the localization accuracy, so according to Fig. 5 the algorithm has the highest node localization accuracy at N 300. When N is 100 and 200, the best localization accuracy is achieved at c 0.95, and the ALE of the MDV-EC is 5.32 m and 5.21 m, respectively; when N 300, the best localization accuracy is achieved at c 0.9, and the ALE of the MDV-EC is 4.76 m. According to the figure, the localization accuracy is more sensitive to the error correction factor in the low node density scenarios. In the case of low node density deployment, the error of the node is larger, so the error vector of the anchor node is also larger, leading to a larger base of the reference correction vector, and therefore the ALE is more sensitive to c. Figure 6 compares the impact of the error correction factor c on ALE for different number of anchor node scenarios. According to the figure, in all cases, the ALE values gradually decrease as the correction factor c increases from 0.75 to 0.95, while the ALE values increase as c increases from 0.95 to 1. Under the condition of the same correction factor, the more the number of anchor nodes in the network, the higher the localization accuracy. There are two main aspects leading to this phenomenon. On one hand, the more anchor nodes, the more provided localization information, which is beneficial to localization accuracy; on the other hand, the more anchor nodes, the closer the average distance between the unknown node and the reference node, and the higher the reliability of the reference node. In addition, the figure shows that the ALE is more sensitive to c in high anchor node density scenario. This is mainly because in high anchor node density scenario, the distance between the unknown node and its reference node is shorter, the correction vector of the unknown node is larger, and therefore the value of ALE is more sensitive to the change of c. The closer the average distance between the unknown node and its reference node, the more reliable the error vector will be. seen from the figure that the error of the DV-Hop algorithm is insensitive to the node density and its ALA increases slowly with increasing node density, while the ALA of the proposed MDV-EC, DV-RND and MDV algorithms decreases gradually with increasing node density. Among all the algorithms, the proposed MDV-EC has the highest localization accuracy, which is better than MDV and DV-RND, where MDV has better localization accuracy than DV-RND. Therefore, the proposed MDV-EC outperformed the distance vector localization algorithms DV-Hop and DV-RND, meanwhile the proposed error correction method can make full use of the similarity of local errors to further reduce the node localization errors and improve the localization accuracy. When the number of anchor nodes is less than or equal to 20, the MDV algorithm outperformed DV-RND, while when the number of anchor nodes is greater than 20, the accuracy of DV-RND is superior to the proposed MDV algorithm. Therefore, in practical application scenarios, we can improve the localization accuracy by increasing the number of anchor nodes. Figure 9 compares the ALA of the four algorithms at different communication radius. It can be seen from the figure that the localization accuracy of the proposed MDV-EC algorithm is optimal in all scenarios. The ALA of DV-Hop slowly decreases as the communication radius R increases, while the ALA of DV-RND, MDV and MDV-ECD decrease firstly and then stabilize as the communication radius R increases. When R is less than 30 m, the ALA of the proposed MDV and MDV-EC decreases with the increase of R, and when R is greater than 30 m, the two algorithms have less variation. This is because when the communication radius is small, the connectivity of the network is poor and the average positioning accuracy of all nodes is large. When R increases, the connectivity of the network is improved, thus enhancing the accuracy of distance estimation and localization accuracy. As R continues to increase, the communication coverage of the sensor nodes in the network becomes too large and the nodes are affected by the deployment area boundaries during distance estimation. While higher network connectivity contributes to the accuracy of distance estimation, larger R also makes distance estimation more negatively influenced by boundaries, which overall leads to a flat ALA. Figure 10 compares the localization accuracy of the four algorithms in different signal noise environments. As can be seen from the figure, the ALA of the four algorithms increases with the increase of signal noise, and the best accuracy in all experimental scenarios is the proposed MDV-EC algorithm, while the worst accuracy is DV-Hop. When the signal noise in the network environment is 0, i.e., the communication coverage area of every node is a standard circle, the ALA of the proposed MDV-EC algorithm is slightly better than the DV-RND algorithm, both around 0.1, while the ALA of the MDV algorithm without the error correction is about 0.12. With the increase of signal noise in the network, the ALA value of DV-RND is gradually larger than MDV, while the ALA of the proposed MDV-EC algorithm is always the smallest. Therefore, the proposed MDV-EC has stronger environmental robustness and good localization performance in different noisy environments. In addition, the proposed error correction method can further reduce the node localization errors in different noisy environments. Figure 11 illustrates the random distribution of 200 sensor nodes, including 20 anchor nodes. The blue circles represent unknown nodes and the red stars represent anchor nodes. Set communication radius R 20 m, other parameters are preset values. The data of Figs. 12 and 13 are obtained in this node deployment of Fig. 11. Figure 12 compares the error vectors of the MDV algorithm without the error correction scheme and the MDV-EC algorithm with the error correction scheme. The green line represents the error vector of MDV, the black line is the error vector of MDV-EC, and the red line segments on the anchor nodes represent the LEV of the respective anchor nodes. It can be seen that there is a strong similarity in the magnitude and direction of the localization error between neighboring nodes. The main reason for this phenomenon is the similar node distribution of neighboring nodes in the distance estimation, which leads to strong similarity in their ranging and localization errors. Furthermore, according to Fig. 12, the error vector length of MDV-EC of most nodes (black line segment) is shorter than MDV (green line segment), which indicates the localization error of the proposed MDV-EC is smaller than MDV, and the proposed error correction method   Figure 13 compares the cumulative distribution curves (CDF) of localization errors for the four algorithms. As shown in the figure, the CDF curve of the proposed MDV-EC is always at the highest position, followed by MDV, DV-RND and DV-Hop algorithms. Among them, the MDV-EC algorithm has 90% of the node localization errors within 10 m, and the maximum value of the localization error is about 15 m, which is better than the performance of the MDV algorithm. While about 75% of the nodes in DV-RND have errors within 10 m, and the number of node localization errors within 10 m in DV-Hops algorithm accounts for about 52%. Therefore, the proposed MDV-EC algorithm outperforms MDV, DV-RND, and DV-Hops in terms of localization accuracy.

Conclusion
In order to enhance the localization accuracy for WSNs, a multi-hop distance-vector localization algorithm named MDV-EC is proposed in this paper. The proposed MDV-EC estimates the distance between neighboring nodes based on the neighbor information and corrects the estimated distance with reference to the local path correction coefficient, rather than corrects the estimated distance from a global point view. By investigating the local similarity characteristics of the localization error in the distance vector localization algorithm, an error correction method is applied to further reduce the localization error. The error correction method uses the estimated and true positions of the anchor nodes to calculate the localization error vector for each anchor node. Then correct the initial estimated position by referring the localization error vector of nearby anchor node. The simulation results demonstrate that the proposed MDV-EC algorithm outperformed DV-Hop and DV-RND in terms of localization accuracy. And the proposed error correction method is effective to reduce the localization error. In the future research, we will focus on exploring the quantization relationship between the local error similarity and the location error vector and investigating a better error correction method to reduce the node localization error.