 Research
 Open Access
 Published:
An improved rangefree location algorithm for industrial wireless sensor networks
EURASIP Journal on Wireless Communications and Networking volume 2020, Article number: 81 (2020)
Abstract
In the traditional DVHop location algorithm, the number of hops within the communication radius is counted as one hop. However, in the case of uneven distribution of nodes, this method will bring a large error to the calculation of hop distance. In order to solve the above problems, an improved DVHop location algorithm with multiple communication radius is proposed in this paper. Based on the multicommunication radius location algorithm, the method uses the cosine theorem to correct the hop number and estimated the average hop distance, and optimizes the estimated distance of the unknown node. The algorithm uses multiple communication radius to broadcast the position to obtain the minimum number of hops between the unknown node and the beacon node and adjusts the estimated hop distance by using the cosine theorem after estimating the good hop distance, and finally uses the trilateration method, or the maximum likelihood estimation method estimates the position coordinates. The experimental results show that compared with the traditional DVHop algorithm and DDVHop algorithm, the improved DVHop algorithm improves the positioning accuracy and reduces the average positioning error of the unknown nodes.
Introduction
Wireless Sensor Network (WSN) has the advantages of rapid deployment, good concealment, strong selforganization, and low price, so it is very suitable for target tracking, recognition, positioning, and other applications [1,2,3,4]. Node positioning is an important part of these applications, and also the premise and basis. WSN can transmit information more accurately only by determining its position coordinates [5,6,7].
At present, there are two commonly used positioning algorithms. One is based on distance, such as received signal strength indicator (RSSI), angle of arrival (AOA), and time difference of arrival (TDOA). The characteristic of these algorithms is that the positioning accuracy is very high, but the peripheral equipment needs to be provided, and the cost is high [8,9,10,11,12]. Another is the rangefree location algorithm, such as DVHop, centroid location algorithm. These algorithms have low cost and low power consumption, especially DVHop localization algorithm, which is easy to implement, requires a low proportion of nodes and relatively low channel requirements, and is widely used in wireless sensor networks [13,14,15,16].
The specific contributions of this paper include the following:
 (1)
A literature survey about various existing DVHop positioning algorithms for WSN and analyze their advantages and disadvantages.
 (2)
This paper presents an improved DVHop location algorithm based on multiple communication radius, which uses the cosine theorem to correct the hop number and estimated average hop distance, and optimizes the estimated distance of the unknown node.
 (3)
Performance analysis of the proposed algorithm compared with the traditional DVHop algorithm and DDVHop algorithm.
The rest of this paper is organized as follows. Section 2 discusses related work, followed by the principle and problem analysis of the traditional DVHop location algorithm in Section 3. The improved algorithm of DVHop is discussed in Section 4. Section 5 shows the simulation experimental results, and Section 6 concludes the paper with the summary.
Related works
In recent years, many scholars have conducted indepth research on the DVHop algorithm and proposed different improved methods for the shortcomings of the algorithm, all of which have improved the positioning accuracy and performance of the algorithm. The existing DVHop algorithm is mainly improved from the following four aspects: optimizing the average hop distance or minimum hop number, selecting the optimal beacon node, and optimizing the location calculation method [17,18,19,20,21,22,23,24]. In literature [25], the teachinglearningbased optimization (TLBO) algorithm was adopted to improve the DVHop. To obtain better positioning coverage, the hierarchical division from the target node to auxiliary beacon node was adopted to upgrade the target node to the virtual beacon node in the next round of positioning, to improve positioning accuracy. In the second section of the DVHop algorithm, [26] used the shuffled frog leaping algorithm (SFLA) to optimize the hop distance, which reduced the influence of hop distance on the positioning error and improved the positioning accuracy. However, the relation between the distance of beacon nodes and the adaptive value was not considered [27]. uses the average hop distance of the nearest beacon node to calculate the unknown node. The algorithm introduces threshold M, which uses the weighted average hop distance of beacon nodes within M hop to calculate the average hop distance of unknown nodes. The improved algorithm reduces the positioning error, but there are significant differences in the positioning error when different threshold M is used. In literature [28], the idea of combining a weighted DVHop with a weighted hyperbolic localization algorithm was proposed to improve the accuracy of algorithm positioning, but its computational complexity was higher. Based on the realization of the double communication radius, the DVHop algorithm based on a triple communication radius and multiple communication radius is proposed in the literature [29]. Experimental results show that the more communication radius, the smaller the positioning error, but the network overhead also increases.
Most of the existing DVHop algorithms assume that the path of the minimum number of hops between nodes is a straight line. However, the connections between nodes are mostly the curves in practice. Therefore, the error occurs and accumulates in the distances estimated by the number of hops and the average hop distance, that is, the error increases with the number of hops.
In order to reduce the error of estimated distance between nodes and improve the accuracy of location algorithm, this paper presents an improved DVHop location algorithm based on multiple communication radius. Based on the multicommunication radius location algorithm, the method uses the cosine theorem to correct the hop number and estimated average hop distance, and optimizes the estimated distance of the unknown node. The algorithm uses multiple communication radius to broadcast the position to obtain the minimum number of hops between the unknown node and the beacon node, and adjusts the estimated hop distance by using the cosine theorem after estimating the good hop distance, and finally uses the trilateration method or the maximum likelihood estimation method estimates the position coordinates.
The limitation of DVHop location algorithm
The principle of traditional DVHop location algorithm
The DVHop algorithm is a rangefree location algorithm proposed by Niculescu et al., Rutgers University, based on the distancevector routing principle. It is also called a distance vectorhop location algorithm [30].
The process of DVHop localization algorithm is divided into three steps:
 (1.)
Distance vector interchange
>All sensor nodes are deployed in the monitoring area using random seeding to form the actual network topology. At the same time, each beacon node broadcasts packets to the network, including beacon node location information and hop value (initial value is 0). Each receiving node maintains the minimum hop value. Specific beacon nodes with higher hop values are defined as useless information and ignored. The hop value is incremented by 1 at each intermediate hop. Through this process, all nodes get the minimum number of hops.
As shown in Fig. 1, the number of hops between two adjacent nodes is 1, and the number represents the hop value between the unknown node and the beacon node. The circular area represents the wireless communication range of the beacon node.

(2.)
Correction calculation and broadcasting
By using Eq. (1), the average distance per hop of each beacon node can be obtained and broadcast continuously in the whole network as the correction value.
where \( {d}_{{\mathrm{Hop}}_i} \) is the average hop distance between beacon node i and other beacon nodes. h_{ij} is the minimum hop value between beacon nodes i and j. The coordinates of beacon nodes i and j are (x_{i}, y_{i}) and (x_{j},y_{j}), respectively.
After receiving the average hop distance value of the neighbor beacon node, the unknown node multiplies the average hop distance value by the hop number to obtain the estimated physical distance as follows:
d_{mk} is the estimated distance from unknown node m to beacon node k; \( {d}_{{\mathrm{Hop}}_m} \) is the correction value of hop distance of unknown node m; and h_{mk} is the minimum hops value of unknown node m to beacon node k.
 (3.)
Positioning calculation
According to the average hop distance estimated in the second step and the minimum hop received in the first stage, the two results are multiplied to obtain the estimated distance between the unknown node and each beacon node, also known as hop distance. When three or more hop distance values are obtained, a matching positioning method (such as the least square method or trilateration method) is used to calculate position coordinates of the unknown node.
Problems with DVHop algorithm
Through the analysis of the DVHop algorithm, it can be seen that the DVHop algorithm uses the method of calculating the average distance of beacon nodes, so a large error may occur in the positioning process.
Figure 2 shows a network with an uneven distribution of the nodes. The distance between unknown node U_{1} and unknown node U_{2} is much smaller than that between unknown node U_{2} and beacon node B_{1}, and the distance between beacon node B_{2} and unknown node U_{3} is much smaller than that between unknown node U_{1} and unknown node U_{3}. In the DVHop algorithm, the distance between unknown node U_{3} and beacon node B_{2} and between unknown node U_{1} and unknown node U_{2} is calculated as one hop, so there is a big error between the calculated average hop distance and the real average hop distance. If the average hop distance of beacon node B_{2} is used to calculate the distance from the unknown node to beacon node B_{2}, then there is a large error between the calculated value and the real value.
The proposed algorithm
In order to solve the problem of large positioning error in the case of uneven distribution of network nodes, an improved DVHop algorithm is proposed in this paper. Firstly, the algorithm uses the multicommunication radius to broadcast the location and records the location, hop number of other beacon nodes. Then, the distance between the unknown node and the corresponding beacon node is estimated. The estimated hop distance is adjusted by using the cosine theorem. Finally, the coordinates are calculated by using the trilateration method after obtaining the location information of three or more beacon nodes. The localization process of the proposed algorithm is shown in Fig. 3.
Determining the minimum number of hops
In this paper, four communication radius are selected, namely R, 0.75R, 0.5R, and 0.25R, as shown in Fig. 4. The communication radius R is divided into four regions A, B, C, and D. A region refers to the range of information broadcast by the beacon node at the communication radius of 0.25R; B region refers to the range of information broadcast by the beacon node at the communication radius of 0.5R; C region refers to the range of information broadcast by the beacon node at the communication radius of 0.75R; D region refers to the range of information broadcast by the beacon node at the communication radius of R.
When the beacon nodes broadcast information, the minimum hop from the node of region A to the node i is set as 0.25; the minimum hop from the node of region B to the node O is set as 0. 5; the minimum hop from the node of region C to the node O is set as 0.75; the minimum hop from the node of region D to the node O is set as 1. When the adjacent node receives the information sent by the node with communication radius R, it is forwarded. After the information broadcast is completed, the minimum hop value is obtained between each node. The recorded minimum hop number may not be an integer, which refines the hop number between nodes, making the minimum hop number more accurate and the hop distance calculation more accurate.
Correct average hops distance
Note: J_{t} is the time of hops between two beacon nodes; J_{n} is the number of hops between two beacon nodes; and J_{t}= J_{n}/4.
 (1)
Selection of intermediate nodes
As shown in Fig. 5, if J_{t} is odd, the intermediate node of the path is just the intermediate node; if J_{t} is even, the two hops in the middle of the path are the intermediate nodes. The angle formed by the connection between the intermediate node and the beacon node is 90 ° ≤ α ≤ 180°.

(2)
Proving the angle range
Figure 6 is the schematic diagram of the angle and transmission path. There are two routes between A and B, namely ACCB and ADDB. Obviously, β > α, and AC + CB is closer to AB than AD + DB. Therefore, when the angle is greater, the distance of the transmission path is closer to the linear distance between two points. When the angle approaches 180°, the hop distance will be closer to the true value. Therefore, the angle range (90 ° ≤ α ≤ 180°) is the most ideal.

(3)
Solving the correction value using cosine theorem
There are two choices of intermediate nodes, so the calculation is divided into two cases, J_{t} is odd or even.
When J_{t} is odd
As shown in figure (1) in Fig. 5,  B_{2}B_{3}  is the distance from B_{2} to B_{3},  B_{2}M  is the distance from B_{2} to M,  B_{3}M  is the distance from B_{3} to M, and  B_{3}M  is unknown. According to the cosine theorem, these are the following expressions:
Since the node M is the middle node of the route, and  B_{2}M  =  B_{3}M  = d_{BM},  B_{2}B_{3}  = d_{2}. The following expressions can be obtained:
After simplification, we can get,
The value of d_{BM} is,
Then the average hop distance h_{ad} is,
Substitute Eq. (6) into Eq. (7) to get:
When J_{et} is even
As shown in figure (2) in Fig. 5, d_{pmo} is the midpoint distance from B_{2} to B_{3}; d_{BM1} is the distance from B_{2} to M_{1}, and it is also the distance from B_{3} to M_{1}; d_{BM2} is the distance from B_{2} to M_{2}, and it also the distance from B_{3} to M_{2}. According to the cosine theorem, the expression for midpoint distance d_{BM} is as follows:
In Eq. (9),
Substitute Eqs. (10) and (11) into Eq. (9) to obtain:
Then the average hop distance h_{ad} is,
Substitute Eq. (12) into Eq. (13) to obtain:
Finally, the corrected value C_{v} can be obtained from the average hop distance, actual hop distance, and the number of hops:
Using Eq. (15), the estimated average hop distance is corrected by the correction value C_{v}.
Experimental results and analysis
In the Matlab environment, the improved location algorithm is simulated experimentally, and the simulation results are analyzed and compared with the traditional DVHop algorithm and DDVHop in [31]. The monitoring area is a square area of 100 × 100 meters. The number of the nodes is N = 100 (30 beacon nodes). The communication radius is 30 m.
The following equation is the average positioning error:
N is the number of nodes, n is the number of beacon nodes, R is the communication radius, T_{i} is the actual coordinates, and E_{i} is the estimated coordinates.
And the unknown nodes are distributed randomly and evenly. Figure 7 shows the distribution of the nodes.
The density of beacon nodes will affect the location accuracy of unknown nodes. When the number of beacon nodes in the simulation region changes from 10 to 40, the traditional DVHop algorithm, DDVHop algorithm, and improved DVHop algorithm proposed in this paper are compared in simulation. Figure 8 shows the influence diagram of beacon node number changes on positioning accuracy. It can be seen that the positioning error of the improved DVHop algorithm is significantly lower than that of the traditional DVHop algorithm, and the DDVHop algorithm when the number of beacon nodes is 10, which effectively reduces the positioning error, and the curve tends to be stable with the increase of beacon nodes. The curve is stable but the positioning error is smaller than the traditional DVHop algorithm and the DDVHop algorithm. The improved DVHop algorithm proposed in this paper can use a few beacon nodes to reduce the cost.
The size of the communication radius determines the number of beacon nodes that can be obtained by the unknown node. When the unknown node obtains more beacon node locations, the positioning result becomes more accurate. When the communication radius varies between 20 and 50 m, the traditional DVHop algorithm, DDVHop algorithm, and improved DVHop algorithm proposed in this paper are compared in simulation. Figure 9 shows the influence of communication radius change on positioning accuracy. With the increase of the communication range, the average positioning error tends to decrease in all algorithms. Compared to the traditional DVHop algorithm, the DDVHop algorithm has higher position accuracy in the simulation, but the improved DVHop algorithm proposed in this paper has about 50% smaller localization error in average.
Conclusion
In this paper, the improved DVHop algorithm adopts the multicommunication radius to refine the number of hops and uses cosine theorem to correct the distance between nodes. Under the same environment parameters, the traditional DVHop algorithm, DDVHop algorithm, and improved DVHop algorithm proposed in this paper are compared in simulation. The influence of two algorithms on the positioning error of unknown nodes is compared under different beacon node density and communication radius. The experimental results show that compared with the traditional DVHop algorithm and DDVHop algorithm, the improved DVHop algorithm improves the positioning accuracy and reduces the average positioning error of the unknown nodes.
Availability of data and materials
We declared that materials described in the manuscript, including all relevant raw data, will be freely available to any scientist wishing to use them for noncommercial purposes, without breaching participant confidentiality.
Abbreviations
 WSN:

Wireless sensor network
 RSSI:

Received signal strength indicator
 AOA:

Angle of arrival
 TDOA:

Time difference of arrival
 TLBO:

Teachinglearningbased optimization
 SFLA:

Shuffled frog leaping algorithm
References
 1.
P. Kuila, P.K. Jana, Energy efficient clustering and routing algorithms for wireless sensor networks: particle swarm optimization approach. Engineering Applications of Artificial Intelligence 33, 127–140 (2014)
 2.
X. Liu, R. Zhu, A. Anjum, J. Wang, H. Zhang, M. Ma, Intelligent data fusion algorithm based on hybrid delayaware adaptive clustering in wireless sensor networks. Future Generation Computer System 104, 1–14 (2020)
 3.
Q. Shi, Q. Xu, J. Zhang, An improved DVHop scheme based on path matching and particle swarm optimization algorithm. Wireless Personal Communications 104, 1301–1320 (2019)
 4.
B. Wu, T. T. Cheng, T. L. Yip, Y. Wang, Fuzzy logic based dynamic decisionmaking system for intelligent navigation strategy within inland traffic separation schemes. Ocean. Eng. 197, 106909 (2020). https://doi.org/10.1016/j.oceaneng.2019.106909
 5.
C. Elkin, R. Kumarasiri, D.B. Rawat, et al., Localization in wireless sensor networks: a DempsterShafer evidence theoretical approach. Ad Hoc Networks 54, 30–41 (2016)
 6.
Z.H. Huang, X.X. Juan Ni, H.H. Zhu, C. Wang, Multimodal representation learning for recommendation in Internet of things. IEEE Internet of Things Journal 6(6), 10675–10685 (2019)
 7.
S.K. Shen, B. Yang, K.G. Qian, Y.M. She, W. Wang, On improved DVHop localization algorithm for accurate node localization in wireless sensor networks. Chinese Journal of Electronics 28(3), 658–666 (2019)
 8.
S. Halder, A. Ghosal, A survey on mobilityassisted localization techniques in wireless sensor networks. Journal of Network & Computer Applications 60, 82–94 (2016)
 9.
X. Liu, R. Zhu, B. Jalaian, Y. Sun, Dynamic spectrum access algorithm based on game theory in cognitive radio networks. Mobile Networks and Applications 20(6), 817–827 (2015)
 10.
Q.S. Zhao, Y.L. Hu, An improved DVHop localization algorithm. International Journal of Wireless and Mobile Computing 10(1), 20–25 (2016)
 11.
C.H. Tseng, J.S. Yen, Enhanced Gaussian mixture model of RSSI purification for indoor positioning. Journal of Systems Architecture 81, 1–6 (2017)
 12.
R. Zhu, X. Zhang, X. Liu, W. Shu, T. Mao, B. Jalaeian, ERDT: energyefficient reliable decision transmission for cooperative spectrum sensing in industrial IoT. IEEE Access 3, 2366–2378 (2015)
 13.
S. Messous, H. Liouane, N. liouane, Improvement of DVHop localization algorithm for randomly deployed wireless sensor networks. Telecommunication Systems 73, 75–86 (2020)
 14.
X.W. Yu, M.F. Hu, Hopcount quantization ranging and hybrid cuckoo search optimized for DVHop in WSNs. Wireless Personal Communications 108, 2031–2046 (2019)
 15.
Z.H. Huang, X. Xu, H.H. Zhu, M.C. Zhou, An efficient group recommendation model with multiattentionbased neural networks. IEEE Transactions on Neural Networks and Learning Systems (2020). https://doi.org/10.1109/TNNLS.2019.2955567
 16.
Y. Wang, Z. Fang, L. Chen, A new type of weighted DVHop algorithm based on correction factor in WSNs. Journal of Communications 9(9), 699–705 (2014)
 17.
D. Prashar, K. Jyoti, Distance error correction based hop localization algorithm for wireless sensor network. Wireless Personal Communications 106, 1465–1488 (2019)
 18.
A. Kaur, P. Kumar, G.P. Gupta, A new localization using single mobile anchor and meshbased path planning models. Wireless Networks 25, 2919–2929 (2019)
 19.
N. Jain, S. Verma, M. Kumar, Adaptive locally linear embedding for node localization in sensor networks. IEEE Sensors Journal 17(9), 2949–2956 (2017)
 20.
B.F. Gumaida, J. Luo, Novel localization algorithm for wireless sensor network based on intelligent water drops. Wireless Networks 25, 597–609 (2017)
 21.
X. Qiao, H.S. Yang, Z.C. Wang, Iterative LM algorithm in WSN–utilizing modifying average hopping distances. International Journal of Online Engineering 13(10), 4–20 (2017)
 22.
X. Yang, W. Zhang, An improved DVHop localization algorithm based on bat algorithm. Cybernetics & Information Technologies 16(1), 89–98 (2016)
 23.
O. Cheikhrouhou, G.M. Bhatti, R. Alroobaea, A hybrid DVHop algorithm using RSSI for localization in largescale wireless sensor networks. Sensors 18(5), 1469–1482 (2018)
 24.
Y. Yao, K. Zou, X. Chen, et al., A distributed rangefree correction vector based localization refinement algorithm. Wireless Networks 22(8), 2667–2680 (2016)
 25.
G. Sharma, A. Kumar, Improved DVHop localization algorithm using teaching learning based optimization for wireless sensor networks. Telecommunication Systems 67(8), 1–16 (2018)
 26.
D. Chandirasekaran, T. Jayabarathi, Wireless sensor networks node localizationa performance comparison of shuffled frog leaping and firefly algorithm in LabVIEW. Telkomnika Indonesian Journal of Electrical Engineering 14(3), 516–524 (2015)
 27.
Y. Hu, X. Li, An improvement of DVHop localization algorithm for wireless sensor networks. Telecommunication Systems 53(1), 13–18 (2013)
 28.
J. MassSanchez, E. RuizIbarra, J. CortezGonzález, et al., Weighted hyperbolic DVHop positioning node localization algorithm in WSNs. Wireless Personal Communications 96(4), 5011–5033 (2017)
 29.
W.W. Meng, J.P. Zhao, S.L. Ma, High precision multicommunication radius DVHop localization algorithm. Communications Technology 49(6), 701–710 (2016)
 30.
D. Niculescu, B. Nath, DV Based positioning in ad hoc networks. Telecommunication Systems 22, 267–280 (2003)
 31.
S. Hou, X. Zhou, X. Liu, A novel DVHop localization algorithm for asymmetry distributed wireless sensor networks. International Conference on Computer Science and Information Technology. IEEE 4, 243–248 (2010)
Acknowledgements
The authors would like to thank all the referees for their constructive and insightful comments on this paper.
Funding
This work was funded by the National Natural Science Foundation of China (No. 61862042, 61762062, 61601215); Science and Technology Innovation Platform Project of Jiangxi Province (No.20181BCD40005); Major Discipline Academic and Technical Leader Training Plan Project of Jiangxi Province(No.20172BCB22030); Primary Research & Development Plan of Jiangxi Province (No. 20192BBE50075, 20181ACE50033, 20171BBE50064, 2013ZBBE50018); Jiangxi Province Natural Science Foundation of China (No.20192BAB207019, 20192BAB207020); and Graduate Innovation Fund Project of Jiangxi Province (No.YC2019S100, YC2019S048).
Author information
Affiliations
Contributions
All the authors were involved in the writing of the manuscript. All authors have given approval to the final version of the manuscript.
Corresponding authors
Correspondence to Kexuan Wang or Bocheng Liu.
Ethics declarations
Competing interests
No competing interest.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Li, X., Wang, K., Liu, B. et al. An improved rangefree location algorithm for industrial wireless sensor networks. J Wireless Com Network 2020, 81 (2020). https://doi.org/10.1186/s13638020016981
Received:
Accepted:
Published:
Keywords
 WSN
 DVHop location algorithm
 Positioning error
 Average hop distance