Improved DV-Hop Localization Algorithm for Wireless Sensor Networks Based on Sparrow Algorithm

Improved DV-Hop Localization Algorithm for Wireless Sensor Networks Based on Sparrow Algorithm

Abstract: This article introduces the DV-Hop algorithm improved by the Sparrow algorithm.

1. Principles of the DV-Hop Algorithm

The localization steps of the DV-Hop algorithm are as follows:

(1) Each anchor node broadcasts its location information to neighboring nodes within its communication range. The receiving nodes record the minimum hop count to each anchor node while ignoring larger hop count information from the same anchor node, and then increment the hop count by 1 before forwarding it to neighboring nodes.

(2) Each anchor node estimates the average hop distance of the network using the coordinates of other recorded anchor nodes and the hop counts, according to Equation (1). In this equation, represents the other anchor node numbers in the anchor node’s data table, and represents the hop count between the anchor node and.

After broadcasting the calculated average hop distance throughout the network, unknown nodes only record the first received average hop distance and forward it to neighboring nodes. Upon receiving the average hop distance, the unknown node estimates the distance from node i to a certain anchor node based on the recorded hop count information, according to Equation (2):

(3) Let represent the coordinates of anchor nodes, and the position of the unknown node D is, with estimated distances to the anchor nodes being, which can establish the equations of Equation (3). Subtracting the last equation from the first set of equations yields: expressed as a linear equation system, where

The solution to the equation system is obtained using the least squares method:

2. Principles of the Sparrow Algorithm Improved DV-Hop Algorithm

The principles of the Sparrow algorithm can be referenced in my blog: https://blog.csdn.net/u011835903/article/details/108830958

From the basic principles of the DV-Hop algorithm in Section 1, it is known that the basic DV-Hop uses the least squares method to solve for unknown nodes. The Sparrow algorithm can be utilized to improve this step by finding the minimum error between the actual distance from the unknown node to the beacon node and the estimated distance, thus achieving an estimation of the unknown node’s position. The optimization parameter of the Sparrow algorithm is defined as the unknown node, and the fitness function is constructed as:

3. Algorithm Testing

Set the node coverage area to 200×200, with a total node count of 200, beacon nodes count of 20, communication radius of 30, and unknown nodes count of 180. The normalized average localization error is used as the evaluation metric: In this equation, represents the number of unknown nodes; represents the number of experiments; represents the communication radius of the nodes; represents the estimated coordinates of the unknown nodes; represents the true coordinates of the unknown nodes.

Improved DV-Hop Localization Algorithm for Wireless Sensor Networks Based on Sparrow Algorithm
Improved DV-Hop Localization Algorithm for Wireless Sensor Networks Based on Sparrow Algorithm
Improved DV-Hop Localization Algorithm for Wireless Sensor Networks Based on Sparrow Algorithm

Normalized localization error of basic DV-Hop: 0.4409Normalized localization error of SSA-DV-Hop: 0.19953

From the final normalized localization error, the results of the Sparrow algorithm are significantly better than those of the traditional DV-Hop algorithm.

4. References

[1] Wu Xide, Fang Jie, Yang Shijie, Zhou Qingbiao. Sensor node localization method based on GPSO-DVHop [J]. Computer Engineering and Applications, 2013, 49(22): 95-99.

[1] Zhang Heng. Research and implementation of wireless sensor node localization methods [D]. South China University of Technology, 2012.

5. Matlab Code

Click “Read the original text” to obtain!

Leave a Comment