Optimization of the DV-hop Localization Algorithm in Wireless Sensor Networks

Wireless sensor networks (WSNS) have the characteristics of low cost and large-scale distribution. However, due to the variable monitoring area and random node deployment, there are errors in node positioning. The technology of the node location is the key to the application of WSNS, because the location information of nodes is very necessary. A corresponding optimization method for the error caused by the minimum Hop in DV-hop positioning algorithm is introduced. By introducing RSSI value to weight the minimum hops, the setting of the minimum hops is more reasonable, so as to reduce the error. The simulation experiment proves the effectiveness of the improved algorithm.


Introduction
With the rapid development of communication and computer technology, WSNS has been diffusely applied in the fields of industrial and agricultural data collection, national security and the Internet of things [1][2]. Node positioning technology has always been one of the research hotspots in WSNS. DV-hop localization algorithm, as one of the most diffusely applied node localization algorithms, has the advantages of no ranging, simple and easy to implement, strong scalability, etc., but it also has the defect of low node localization accuracy. This paper introduces an improved DV-hop localization algorithm, which uses the relation between RSSI and range to modify the minimum Hop number and improve the localization accuracy of DV-hop algorithm.

The DV-hop Algorithm
DV-hop location algorithm is a distributed location algorithm based on segment hopping mechanism [3][4]. In the process of positioning, black nodes do not need direct ranging to obtain coordinates.
(1)Obtain the minimum hop White nodes in the network broadcast information to other nearby nodes, and messages are transmitted hop-by-hop. Its format is {Id i , X i , Y i , Hops i }. There is a hop counter Hops i in the message, and the initial value is 0. The statistical method of the minimum hops is to increment hops by 1 every 2 time a broadcast message is received. When the same node receives multiple white node messages from the same Id i , only the minimum hops are taken as the minimum hops to the white node, and the minimum hop are saved in the information table for further propagation [5]. After the broadcast, all nodes in the network can save the minimum hop of each white node [6].
(2)Estimate the range The black nodes can estimate the average range of the minimum hop and the known coordinates of the white node in the network, as shown in Formula (1). (1) The average skip range is expressed as HopSize. According to Formula (2), the range between the black node(O) and the white node(I) can be estimated. (2) (3)Calculate the black nodes Assuming that the three sets of range data measured by the black node D to white node A, B, and C are da, db, dc, and the coordinates of the White nodes are (Xa, Ya), (Xb, Yb),(Xc, Yc) [7], as shown in Formula (3): According to Formula (3), the coordinates of the black node D can be converted to Formula (4): (4)

DV-hop Algorithm Analysis
Random deployment of nodes can result in the following situations: beacon nodes and black nodes are deployed in a centralized area. The beacon node coincides with the black node. Nodes are at the edge or periphery of the network. This makes the topology of the network irregular and affects the performance of DV-hop algorithm. In addition, each node is required to receive and broadcast packets of all beacon nodes. However, some packets are useless to receiving nodes, so meaningless receiving and broadcasting will increase network traffic and consume node energy [8][9]. The jump value is calculated according to the radio frequency and the radius of the communication. The jump value within the the radius of the communication is 1, and the value will increase with the increase of the number of broadcasts. However, when there is A "U" path between nodes, as shown in Fig. 1, there is A deficiency in the hopping numerical calculation method. The minimum hopping value between node A and node B is 2, but the minimum hopping value calculated according to DV-hop is 4, which is one time different from the real value. When the black node obtains enough range, it will estimate its own coordinates. However, this coordinate is also calculated based on the estimated range. As errors accumulate, the final positioning accuracy will be affected [10].

Error Analysis and Improvement of DV-HOP Localization Algorithm
DV-hop algorithm obtains the minimum hop of each node multiplied by the average hops range of the white node in the network broadcast grouping method to compute the coordinate position of the black node [11][12]. The error mainly comes from two aspects, namely, the minimum hops error and the average hops error. In this paper, the minimum hops error is improved.

Error Result from the Minimum Number of Hops
Nodes in WSNS aren't uniformly distributed, and the range between nodes and the communication white node is also different, even within the same communication range. As long as two nodes are adjacent, no matter what the range is, it is denoted as 1 Hop.
Within the communication radius of the white node O, the minimum hops from node N 1 , N 2 , N 3 , and N 4 to node O are all 1 in Fig.1. Therefore, the range of the four black nodes estimated by this algorithm is equal, while the actual range is: d 1 <d 2 <d 3 <d 4 (5) d 1 , d 2 , d 3 and d 4 are the ranges from node N 1 , N 2 , N 3 , and N 4 to node O respectively. Thus, it can be seen that there is a big error when the Hop number of two adjacent nodes is directly denoting as 1 Hop through DV-hop algorithm. The jump value should be adjusted according to the actual range between nodes to reduce the error, rather than denoted as 1 jump.

RSSI Ratio Modifies Hops
From the error analysis of the minimum hops, it can be seen that the unreasonable setting of the minimum hops will result in some errors. If the communication between nodes needs more hops to complete, there will be the accumulation of errors, and then greater errors will be generated. This paper introduces RSSI technique to modify the weight of the DV-hop algorithm.
The log-Normal signal model [13][14][15] is used to describe the relationship between RSSI and range. According to the model, the meaning and intensity of the receiving segment at D range from the signal transmitting node are calculated as P(d) [dBm], which can be expressed as Formula 6: RSSI ranging refers to the use of RSSI-D conversion formula to convert the RSSI value received by an black node to the range from the white node. It can be converted into Formula 8: (7), "A" is an environmental parameter, and is slow fading, which can be ignored because the power of Gaussian noise is very small in practical application. The packet format is {Id i , X i , Y i , Hops i , RSSI i }. Hops i is the number of hops and the initial value is 0. RSSI i is the intensity of the signal measured by the node and the initial value is also 0.

Improved DV-Hop Algorithm based on RSSI
(2) The first hop calculation The broadcast information for the white node package to the adjacent node, then the minimum hop number of a neighbor node is denoted as 1, and the RSSI value of the adjacent node is used as the reference value RRSSI for subsequent nodes, and then IHOPS and IRSSI in the information package are updated, which are forwarded in sequence.
(3) Calculate the remaining minimum hops. The next adjacent node calculates the weighted minimum hop count and broadcasts the corrected packet. In the same way as classical DV-hop to count the minimum Hop, only the minimum Hops are kept as their Hops.

The Simulation Results
In this paper, the localization error of the RSSI-based DV-hop algorithm (rwdv) is smaller than that of the classical DV-hop algorithm (dv). In addition, the positioning error curve of the improved algorithm declines more steadily, which shows that the change of communication radius has little impact on the improved algorithm, so the improved algorithm can be more stable and adapt to the changes of the environment. node should be carried out according to the weighted coefficient, so as to better make known the overall network and reduce the error caused by the average hop range.