A Node Localization Algorithm for Wireless Sensor Networks Based on Virtual Partition and Distance Correction

: The coordinates of nodes are very important in the application of wireless sensor networks (WSN). The range-free localization algorithm is the best method to obtain the coordinates of sensor nodes at present. Range-free localization algorithm can be divided into two stages: distance estimation and coordinate calculation. For reduce the error in the distance estimation stage, a node localization algorithm for WSN based on virtual partition and distance correction (VP-DC) is proposed in this paper. In the distance estimation stage, ﬁrstly, the distance of each hop on the shortest communication path between the unknown node and the beacon node is calculated with the employment of virtual partition algorithm; then, the length of the shortest communication path is obtained by summing the distance of each hop; ﬁnally, the unknown distance between nodes is obtained according to the optimal path search algorithm and the distance correction formula. This paper innovative proposes the virtual partition algorithm and the optimal path search algorithm, which effectively avoids the distance estimation error caused by hop number and hop distance, and improves the localization accuracy of unknown nodes. to complete the localization. MGDV-Hop algorithm reduces the average localization error to a certain extent.


Research Significance
WSN is the core component of the Internet of Things. It has the advantages of large scale, low cost, strong adaptability and excellent expansibility, which makes the transmission, processing and application of information in an innovative way. With the development of communication technology, WSN has been widely used in national defense deployment, military reconnaissance, geological survey, intelligent agriculture and other fields, realizing the combination of the Internet of Things and the real world. The nodes in WSN can be divided into sink nodes and other nodes [1]. Generally, sink nodes has strong storage and communication capacity. It can be either an enhanced sensor node or a gateway device with a communication interface. The main task of the sink node is to conduct data interaction with the outside world through a variety of ways, and connect WSN with some other external networks (such as Internet, satellite, 4G/5G communication network and so on) [2]. The main task of other nodes is to collect data in the environment and send the data to the sink node, and then sink node will feedback the data to terminal computer or users [3]. A typical WSN structure is shown in Figure 1.
However, in most cases, the data collected by the sensor nodes must be combined with the location of the sensor nodes to be meaningful. Even more, sometimes users just need the sensor nodes to send back its own location. Therefore, the location of sensor nodes is an important part of WSN, and how to make the location calculation of sensor nodes closer to the reality has become the focus of research in the field of WSN.

Users
Sensor Nodes The Deployment Area

Research Status
At present, sensor nodes localization method can be roughly classified into three categories: the range-based localization method based on external device, the range-free localization method based on network topology structure, the intelligent optimization algorithm localization method. The range-based localization method needed additional distance measurement equipment in the sensor nodes, which would increase the extra hardware costs. And in the forests, swamps, volcanoes and other special circumstances, the precision of distance measuring instrument is easily influenced by adverse environment conditions, which will cause the whole network to paralysis. Therefore, in the case of limited resources and environmental conditions, the range-based localization method is not applicable. For the intelligent optimization algorithm localization method, it usually obtains the coordinates of sensor nodes through thousands of iterations. However, excessive iterative calculation will consume a large amount of energy, which will undoubtedly shorten the life of sensor nodes. In addition, the experiment proves that the localization effect of the intelligent optimization algorithm is very poor in some cases, which is mainly because the intelligent optimization algorithm cannot search further when the coordinates of the beacon nodes is extremely lacking [4]. Therefore, the localization method based on intelligent optimization algorithm is not suitable for WSN. Compared with the above two localization methods, the range-free localization method does not need additional ranging equipment and a lot of calculation. Only according to the network architecture and the connectivity between sensor nodes the coordinates of unknown nodes can be estimated, which can meet the requirements of WSN on energy consumption, cost, application environment and other conditions. To sum up, the range-free localization method is the focus of current research.
DV-Hop algorithm is the most concerned range-free localization algorithm by researchers at present, and it has the advantages of low complexity and good scalability. In DV-Hop algorithm, hop error is the main reason for the unsatisfactory localization accuracy. As shown in Figure 2, the unknown nodes and are both located in the communication circle of beacon node , and ≪ . However, according to DV-Hop, = is obtained. So the result of the one hop distance is seriously inconsistent with the actual situation. Therefore, the traditional DV-Hop algorithm will cause a large distance estimation error and greatly reduce the accuracy of the final localization results. Aiming at this problem, the relevant literature at home and abroad has given the corresponding solution

Research Status
At present, sensor nodes localization method can be roughly classified into three categories: the range-based localization method based on external device, the range-free localization method based on network topology structure, the intelligent optimization algorithm localization method. The range-based localization method needed additional distance measurement equipment in the sensor nodes, which would increase the extra hardware costs. And in the forests, swamps, volcanoes and other special circumstances, the precision of distance measuring instrument is easily influenced by adverse environment conditions, which will cause the whole network to paralysis. Therefore, in the case of limited resources and environmental conditions, the range-based localization method is not applicable. For the intelligent optimization algorithm localization method, it usually obtains the coordinates of sensor nodes through thousands of iterations. However, excessive iterative calculation will consume a large amount of energy, which will undoubtedly shorten the life of sensor nodes. In addition, the experiment proves that the localization effect of the intelligent optimization algorithm is very poor in some cases, which is mainly because the intelligent optimization algorithm cannot search further when the coordinates of the beacon nodes is extremely lacking [4]. Therefore, the localization method based on intelligent optimization algorithm is not suitable for WSN. Compared with the above two localization methods, the range-free localization method does not need additional ranging equipment and a lot of calculation. Only according to the network architecture and the connectivity between sensor nodes the coordinates of unknown nodes can be estimated, which can meet the requirements of WSN on energy consumption, cost, application environment and other conditions. To sum up, the range-free localization method is the focus of current research.
DV-Hop algorithm is the most concerned range-free localization algorithm by researchers at present, and it has the advantages of low complexity and good scalability. In DV-Hop algorithm, hop error is the main reason for the unsatisfactory localization accuracy. As shown in Figure 2, the unknown nodes x and y are both located in the communication circle of beacon node A, and Ax Ay. However, according to DV-Hop, Ax = Ay is obtained. So the result of the one hop distance is seriously inconsistent with the actual situation. Therefore, the traditional DV-Hop algorithm will cause a large distance estimation error and greatly reduce the accuracy of the final localization results. Aiming at this problem, the relevant literature at home and abroad has given the corresponding solution strategy. In Reference [5], Shi D et al. adopted the minimization of average hop error to correct the location of unknown nodes, which has optimized the localization accuracy. In Reference [6], Xue D put forward a genetic optimization DV-Hop localization algorithm. This algorithm was improved by error distance weighting, and the location of unknown nodes was obtained by using the weighted method and analyzing the distribution of beacon nodes, which had lower localization error than DV-Hop. Shi Q proposed a distance weighted algorithm based on DV-Hop in Reference [7],which determined the weight value of least squares by taking advantage of the different influence of beacon nodes, then used the weighted likelihood estimation and trilateral measurement localization to complete localization, thus improving the localization accuracy. In Reference [8], Yi Shang proposed an improved MDS-MAP localization algorithm, which was designed to make MDS-MAP localization algorithm also suitable for distributed location calculation. Since the improved MDS-MAP algorithm divides the whole network into small areas, the MDS-MAP algorithm is implemented in local areas to improve the localization accuracy. Wu C and Yang T proposed an improved DV-Hop algorithm in [9], this algorithm put forward an improvement wireless channel model and a refinement method for the irregularity of WSN based on node degree, improved the poor performance of DV-Hop algorithm in localization accuracy. In Reference [10], Han F et al. proposed a WND-DV-Hop algorithm based on weighting factor. By correcting the counting of one hop between nodes, a weighting coefficient was constructed based on the number of hops, which reduced the influence of beacon nodes with large hops on the localization result. Error correction is carried out after the unknown nodes complete localization, which further improves the localization accuracy. In Reference [11], Li J et al. proposed a new heuristic algorithm based on DV-Hop, which named parallel compact cat swarm optimization (PCCSO). PCCSO algorithm has three communication methods, and the localization result is better than DV-Hop algorithm. Song L et al. proposed a DV-Hop localization algorithm based on the glowworm swarm optimisation (GSO) of mixed chaotic strategy (MGDV-Hop) in Reference [12]. In MGDV-Hop algorithm, the fitness function is established based on the GSO algorithm and through hundreds of iterations to complete the localization. MGDV-Hop algorithm reduces the average localization error to a certain extent.
Information 2021, 12, x FOR PEER REVIEW 3 of 1 nodes was obtained by using the weighted method and analyzing the distribution of bea con nodes, which had lower localization error than DV-Hop. Shi Q proposed a distanc weighted algorithm based on DV-Hop in Reference [7],which determined the weigh value of least squares by taking advantage of the different influence of beacon nodes, the used the weighted likelihood estimation and trilateral measurement localization to com plete localization, thus improving the localization accuracy. In Reference [8], Yi Shan proposed an improved MDS-MAP localization algorithm, which was designed to mak MDS-MAP localization algorithm also suitable for distributed location calculation. Sinc the improved MDS-MAP algorithm divides the whole network into small areas, the MDS MAP algorithm is implemented in local areas to improve the localization accuracy. Wu C and Yang T proposed an improved DV-Hop algorithm in [9], this algorithm put forwar an improvement wireless channel model and a refinement method for the irregularity o WSN based on node degree, improved the poor performance of DV-Hop algorithm i localization accuracy. In Reference In general, most of algorithms are optimized on the basis of DV-Hop algorithm, an it has improved the localization accuracy. However, these algorithms still use the distanc calculation method of DV-Hop, which multiplies the number of hops by the single ho correction value, so it is still unable to fundamentally avoid the impact of the error cause by the hop distance and the number of hops on the localization results [13]. To solve thi problem, this paper proposes a VP-DC localization algorithm. In the distance estimatio stage, using the virtual partition algorithm and optimal path search algorithm to calculat the distance, the DV-Hop distance calculation method is abandoned, avoid the hop erro effectively. A large number of experiments have proved that the VP-DC algorithm ca In general, most of algorithms are optimized on the basis of DV-Hop algorithm, and it has improved the localization accuracy. However, these algorithms still use the distance calculation method of DV-Hop, which multiplies the number of hops by the single hop correction value, so it is still unable to fundamentally avoid the impact of the error caused by the hop distance and the number of hops on the localization results [13]. To solve this problem, this paper proposes a VP-DC localization algorithm. In the distance estimation stage, using the virtual partition algorithm and optimal path search algorithm to calculate the distance, the DV-Hop distance calculation method is abandoned, avoid the hop error effectively. A large number of experiments have proved that the VP-DC algorithm can improve the accuracy of distance estimation between nodes and greatly improve the localization accuracy. It has strong robustness and can be well applied to WSN.

VP-DC Localization Algorithm
For avoid the impact of hop error on localization results, this paper proposes a virtual partition algorithm to estimate each hop distance on the shortest communication path between unknown node and beacon node, then calculates the distance from beacon node to unknown node according to the distance estimation method based on the optimal path search and distance correction.

Virtual Partition Algorithm
If the communication radius of the node is R, then the communication area of the beacon node is divided into several concentric circles with R/m, 2R/m, · · · · · · R as the radiuses (m is the number of concentric circles), and unknown nodes within the communication range of the beacon node construct virtual circle with R/m as radius. Then, according to the geometric analysis, obtain the area equations of the parts where the virtual circle intersects with each of concentric circles. Finally, the distance of one hop is obtained according to the distribution of nodes in each intersecting parts satisfying the Poisson Distribution solution equation. Since the nodes are randomly distributed, the distance of one hop calculated by different intersecting parts may be different. Therefore, this paper weights these distances to further reduce error. When dividing concentric circles, the larger the value of m, the more the intersection parts between the concentric circles and the virtual circle, and the higher the accuracy of the distance calculated by weighting. However, when the distribution of nodes is sparse, leading to the intersection parts are too small and no nodes in some intersection parts, which does not satisfy the Poisson Distribution model, resulting in large distance estimation error. According to a large number of simulation data, when m = 3, the nodes distribution in each intersection part is the closest to Poisson Distribution model, which can meet the characteristics of WSN node random distribution.
As shown in Figure 3, it is known that B is a beacon node, U 1 , U 2 , U 3 · · · U i are unknown nodes, R is communication radius. With B as the center of the circle and R/3, 2R/3, R as the radius, the communication circle of the B is divided into three concentric circles. The unknown nodes located inside the communication circle of B are constructed as virtual circle with the radius of R/3. Taking the unknown node U i as an example, assuming that the distance from U i to B is d i , and the intersecting areas of the virtual circle of U i and the three concentric circles of beacon node B are S i1 , S i2 , S i3 respectively. By analyzing geometry, S i1 can be expressed as: S i2 can be expressed as: S i3 can be expressed as: are the distances from U i to B in these three cases respectively. The distribution of nodes in WSN is random, so the probability that the unknown node U i is located inside and outside the communication circle of beacon node B approximately satisfies the Poisson Distribution model [14]. The probability function of Poisson Distribution model is: It is known that the area of the communication circle of B is πR 2 and the quantity of nodes in the communication circle is n B ; the quantity of nodes in the virtual circle of unknown node U i is n i ; and the quantity of nodes in the three intersecting areas are n i1 , n i2 , n i3 respectively. According to the Poisson distribution model, the following formulas can be listed: By Equations (5)-(7) [15], the values of S i1 , S i2 , S i3 can be obtained. Substitute the values of S i1 , S i2 , S i3 into Equations (1)-(3), and then, by solving these three Equations, the values of the unknowns d i1 , d i2 , d i3 can be obtained respectively. Finally, d i1 , d i2 , d i3 are weighted and averaged to obtain d i , which is can be expressed as: Thus, the distance of one hop on the communication path is obtained.
Information 2021, 12, x FOR PEER REVIEW 5 of 13 1 , 2 , 3 are the distances from to in these three cases respectively. The distribution of nodes in WSN is random, so the probability that the unknown node is located inside and outside the communication circle of beacon node approximately satisfies the Poisson Distribution model [14]. The probability function of Poisson Distribution model is: It is known that the area of the communication circle of is 2 and the quantity of nodes in the communication circle is ; the quantity of nodes in the virtual circle of unknown node is ; and the quantity of nodes in the three intersecting areas are 1 , 2 , 3 respectively. According to the Poisson distribution model, the following formulas can be listed: By Equations (5)-(7) [15], the values of 1 , 2 , 3 can be obtained. Substitute the values of 1 , 2 , 3 into Equations (1)-(3), and then, by solving these three Equations, the values of the unknowns 1 , 2 , 3 can be obtained respectively. Finally, 1 , 2 , 3 are weighted and averaged to obtain , which is can be expressed as: Thus, the distance of one hop on the communication path is obtained.

Distance Estimation Method Based on Optimal Path Search and Distance Correction
In the distance estimation stage, the length of the shortest communication path between nodes is regarded as the actual distance between nodes in the traditional localization algorithm. As shown in Figure 4, u 1 , u 2 , · · · u 8 are unknown nodes; b 1 , b 2 are beacon nodes. From the figure, it can be seen that the shortest communication path between b 1 and u 4 is similar to a straight line, so the shortest communication distance is approximately equal to the actual distance between b 1 and u 4 , which is However, the shortest communication distance between b 2 to u 8 obviously longer than the actual distance, namely the d b 2 u 5 + d u 5 u 6 + d u 6 u 7 + d u 7 u 8 d b 2 u 8 . To sum up, when the shortest communication path between nodes is tortuous or deviates from a straight line, the shortest communication distance is far longer than the real distance between nodes [16]. In this case, if the shortest communication distance is still taken as the actual distance between nodes, it will bring a large distance estimation error and eventually reduce the accuracy of localization results. For avoid the distance estimation error mentioned above, this paper proposes a distance estimation method based on optimal path search and distance correction.

Distance Estimation Method Based on Optimal Path Search and Distance Correctio
In the distance estimation stage, the length of the shortest communication tween nodes is regarded as the actual distance between nodes in the traditional tion algorithm. As shown in Figure 4, 1 , 2 , ⋯ 8 are unknown nodes; 1 , 2 ar nodes. From the figure, it can be seen that the shortest communication path bet and 4 is similar to a straight line, so the shortest communication distance is mately equal to the actual distance between 1 and 4 , which is 1 1 + 2 3 + 3 4 ≈ 1 4 ; However, the shortest communication distance between obviously longer than the actual distance, namely the 2 5 + 5 6 + 6 7 + 2 8 . To sum up, when the shortest communication path between nodes is tor deviates from a straight line, the shortest communication distance is far longer real distance between nodes [16]. In this case, if the shortest communication di still taken as the actual distance between nodes, it will bring a large distance es error and eventually reduce the accuracy of localization results. For avoid the estimation error mentioned above, this paper proposes a distance estimation based on optimal path search and distance correction. shortest communication path from the unknown node to the beacon node is B, the number of nodes in set A, B is respectively N(A), N(B), the Ochiai coefficient can be defined as: The detailed steps of the optimal path search algorithm are as follows: 1.
Traverse all the combination of beacon node pairs in the WSN, the set composed of nodes on the shortest communication path between each beacon node pair is respectively expressed as: A 1 , A 2 · · · · · · A k · · · · · · A n . 2.
The set composed of nodes on the shortest communication path between u i and b j is recorded as B.

3.
Calculate the Ochiai coefficients of B and A 1 , A 2 · · · · · · A k · · · · · · A n respectively, and find the beacon node pair corresponding to the maximum value of Ochiai. Then take the shortest communication path between this beacon node pair as the beacon path of the shortest communication path between u i and b j .

Distance Correction
When the shortest communication path between nodes is tortuous or deviates from a straight line, the shortest communication distance is far longer than the real distance between nodes. Therefore, this paper corrects the length of the shortest communication path based on the Ochiai coefficient of the shortest communication path and its beacon path and the length of the beacon path to further reduce the distance estimation error. For example, in Figure 5, b 1 , b 2 , b 3 are beacon nodes, u 1 , u 2 , · · · u 8 are unknown nodes, and the distance between u 8 and b 2 is unknown. The specific steps of the distance estimation between u 8 and b 2 based on optimal path search and distance correction are as follows:

1.
Firstly, the distance of one hop between nodes can be obtained according to the virtual partition algorithm. Then, the length of the shortest communication path could be calculated by summing the distance of each hop. Therefore, the length of the shortest communication path between u 8 and b 2 is: 2.
The optimal path search algorithm is implemented to find the beacon path of the shortest communication path from u 8 to b 2 . By calculating the Ochiai coefficient, it is found that the shortest communication path between b 2 and b 3 is most similar to that between u 8 and b 2 . Therefore, the shortest communication path between b 2 and b 3 is the beacon path. According to the virtual partition algorithm, the length of beacon path is: If the coordinates of beacon nodes b 2 , b 3 respectively: x b 2 , y b 2 , x b 3 , y b 3 , then the distance between b 2 to b 3 is: 3.
If the similarity coefficient between the shortest communication path and the beacon path is ochiai u 8 b 2 , then the formula for the distance from u 8 to b 2 is: To sum up, the formula for the distance from u i to b j is: In Equation (14), l u i b j is the length of the shortest communication path from u i to b j . l b m b n is the length of the beacon path; d b m b n is the actual distance between the beacon nodes at both ends of the beacon path; ochiai u i b j is the similarity coefficient between the shortest communication path from u i to b j and its beacon path.

Coordinate Calculation of Unknown Nodes
Assume that the quantity of beacon nodes in the entire network is , the coo of these beacon nodes are: 1 ( 1 , 1 ) ⋯ ⋯ ( , ) ⋯ ⋯ ( , ). Accordi optimal path search and distance correction, the distances between and each node can be obtained. The distances between and each beacon no 1 ⋯ ⋯ ⋯ ⋯ , so the follwing equations can be obtained: According to the trilateral measurement: Express the Equation set (16) in the form of = , so:

Coordinate Calculation of Unknown Nodes
Assume that the quantity of beacon nodes in the entire network is n, the coordinates of these beacon nodes are: b 1 x b 1 , y b 1 · · · · · · b j x b j , x b j · · · · · · b n (x b n , y b n ). According to the optimal path search and distance correction, the distances between u i and each beacon node can be obtained. The distances between u i and each beacon node are: d u i b 1 · · · · · · d u i b j · · · · · · d u i b n , so the follwing equations can be obtained: . .
According to the trilateral measurement: . .
Express the Equation set (16) in the form of DX = E, so: . .
According to the least square method: Therefore, the coordinate of the unknown node u i is (x u i , y u i ).

Simulation Experiment and Analysis
In order to test the performance of the VP-DC algorithm, Windows 7 operating system and MATLAB 2016a simulation software were used for experiments. Firstly, randomly deploy 100 nodes in the 100 m × 100 m region. Then the simulations are carried out with different quantity of beacon nodes and communication radius. Finally, according to the experimental results, compare VP-DC localization algorithm with MGDV-Hop, DV-Hop and WND-DV-Hop localization algorithms. Figure 6 shows the distribution of nodes when the quantity of beacon nodes in the network is 15. The formula of average localization error in this paper is: In Equation (21), T is the times of experiments performed, n is the number of unknown nodes, x u i , y u i is the actual coordinate of unknown node u i , and (x u i , y u i ) is the estimated coordinate of u i .

= ∑ =1
In Equation (21), is the times of experiments performed, is the number o nodes, ( ′ , ′ ) is the actual coordinate of unknown node , and ( , ) mated coordinate of .

Influence of the Number of Beacon Nodes on the Average Localization Error and Operation Time
When the communication radius is 20 m, VP-DC and the other three alg simulated with different number of beacon nodes, and evaluate each algori basis of the simulation results.

•
The influence of the number of beacon nodes on the localization accur algorithm is shown in Figure 7. Figure 7 shows that due to the accumula error, the simulation result of DV-Hop algorithm is worse than other loc gorithms. When the distribution of beacon nodes is extremely sparse, the error of MGDV-Hop algorithm is very large. This is because the gloww optimisation algorithm cannot search further when the beacon node coo

Influence of the Number of Beacon Nodes on the Average Localization Error and Algorithm Operation Time
When the communication radius is 20 m, VP-DC and the other three algorithms are simulated with different number of beacon nodes, and evaluate each algorithm on the basis of the simulation results.

•
The influence of the number of beacon nodes on the localization accuracy of each algorithm is shown in Figure 7. Figure 7 shows that due to the accumulation of hop error, the simulation result of DV-Hop algorithm is worse than other localization algorithms. When the distribution of beacon nodes is extremely sparse, the localization error of MGDV-Hop algorithm is very large. This is because the glowworm swarm optimisation algorithm cannot search further when the beacon node coordinates are extremely lacking. In general, the localization results of VP-DC algorithm are least affected by the quantity of beacon nodes, and the localization accuracy is significantly higher than other three algorithms.

•
The influence of the number of beacon nodes on the operation time of each localization algorithm is shown in Figure 8. The MGDV-Hop algorithm which based on GSO algorithm needs hundreds of iterations to complete localization [18], so it takes the longest time. The Figure 8 shows that the operation time of DV-Hop algorithm and WND-DV-Hop algorithm is very steady. As the quantity of beacon nodes increases, the traversal process of the optimal path search algorithm takes longer time, so, the operation time of VP-DC algorithm tends to increase slightly. However, VP-DC algorithm has the shortest operation time and the least amount of calculation, so the energy consumption required for localization is also the least.
extremely lacking. In general, the localization results of VP-DC algorithm affected by the quantity of beacon nodes, and the localization accuracy is sign higher than other three algorithms. The influence of the number of beacon nodes on the operation time of each tion algorithm is shown in Figure 8. The MGDV-Hop algorithm which based algorithm needs hundreds of iterations to complete localization [18], so it longest time. The Figure 8 shows that the operation time of DV-Hop algori WND-DV-Hop algorithm is very steady. As the quantity of beacon nodes i the traversal process of the optimal path search algorithm takes longer tim operation time of VP-DC algorithm tends to increase slightly. However, V gorithm has the shortest operation time and the least amount of calculatio energy consumption required for localization is also the least.  The influence of the number of beacon nodes on the operation time of each tion algorithm is shown in Figure 8. The MGDV-Hop algorithm which based algorithm needs hundreds of iterations to complete localization [18], so it t longest time. The Figure 8 shows that the operation time of DV-Hop algori WND-DV-Hop algorithm is very steady. As the quantity of beacon nodes in the traversal process of the optimal path search algorithm takes longer time operation time of VP-DC algorithm tends to increase slightly. However, VP gorithm has the shortest operation time and the least amount of calculatio energy consumption required for localization is also the least.

Influence of Nodes Communication Radius on Average Localization Error and Algorithm Operation Time
When number of beacon nodes is 20, simulate the VP-DC algorithm and the other three localization algorithms by constantly changing the communication radius. And evaluate each algorithm on the basis of the simulation results.

•
The influence of the communication radius on the average localization error is shown in Figure 9. In Figure 9, the smaller the communication radius is, the worse the localization effect of DV-Hop algorithm and WND-DV-Hop algorithm. This is because the reduction of the communication radius will increase the number of hops on the shortest communication path, resulting in the accumulation of hop error, and ultimately reduce the localization accuracy [19]. The distance estimation method of MGDV-Hop algorithm and VP-DC algorithm are irrelevant to the number of hops between nodes, so the localization accuracy is not affected by the communication radius. In general, the VP-DC algorithm has higher localization accuracy and better stability than the other three algorithms.

•
The influence of nodes communication radius on algorithm operation time is shown in Figure 10. As shown in Figure 10, the operation time of MGDV-Hop is not affected by the communication radius, but it operation time is too long, which will cause large energy consumption. The operation time of DV-Hop algorithm and WND-DV-Hop algorithm decreases with the increase of communication radius, this is because the quantity of hops between nodes decreases with the increase of the communication radius, which reduces the calculation amount in the distance estimation stage. Compared with the other three algorithms, the operation time of VP-DC algorithm is very steady, and the operation time is the shortest.
Information 2021, 12, x FOR PEER REVIEW

Influence of Nodes Communication Radius on Average Localization Error and Al Operation Time
When number of beacon nodes is 20, simulate the VP-DC algorithm and three localization algorithms by constantly changing the communication ra evaluate each algorithm on the basis of the simulation results.

•
The influence of the communication radius on the average localization erro in Figure 9. In Figure 9, the smaller the communication radius is, the wors ization effect of DV-Hop algorithm and WND-DV-Hop algorithm. This the reduction of the communication radius will increase the number of h shortest communication path, resulting in the accumulation of hop erro mately reduce the localization accuracy [19]. The distance estimation MGDV-Hop algorithm and VP-DC algorithm are irrelevant to the numb between nodes, so the localization accuracy is not affected by the comm radius. In general, the VP-DC algorithm has higher localization accuracy stability than the other three algorithms. The influence of nodes communication radius on algorithm operation tim in Figure 10. As shown in Figure 10, the operation time of MGDV-Hop is n by the communication radius, but it operation time is too long, which will energy consumption. The operation time of DV-Hop algorithm and WND algorithm decreases with the increase of communication radius, this is b quantity of hops between nodes decreases with the increase of the comm radius, which reduces the calculation amount in the distance estimation s

Conclusions
This paper proposes a localization algorithm based on virtual partition an correction to solve the problems of hop error accumulation and low localizatio in nodes localization process. VP-DC algorithm estimates the distance accordin partition and optimal path search. Firstly, the distance of each hop between n culated according to the virtual partition algorithm, and the distance of e summed to get the length of the shortest communication path between nodes the beacon path of the shortest communication path based on the optimal p algorithm. Finally, the unknown distance from unknown node to beacon node according to the beacon path and the distance correction formula. VP-DC loca gorithm abandons the traditional distance estimation method, avoiding the ho cumulation, and greatly improves the localization accuracy of nodes. Throu number of simulation tests, it is proved that the VP-DC algorithm has the cha of strong stability, high localization accuracy and short operation time, w greatly improve the localization efficiency and prolong the service life of no future research, the application of machine learning in node localization of W the focus of study.