Mobile Information Systems

Volume 2019, Article ID 9892512, 9 pages

https://doi.org/10.1155/2019/9892512

## A New Distance Vector-Hop Localization Algorithm Based on Half-Measure Weighted Centroid

College of Information Engineering, Chao Hu University, Hefei, China

Correspondence should be addressed to Lu Jian Yin; moc.361@ulniynaij

Received 11 September 2018; Revised 26 November 2018; Accepted 10 December 2018; Published 3 January 2019

Guest Editor: Mohamed Elhoseny

Copyright © 2019 Lu Jian Yin. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Considering the defects of the Distance Vector-Hop (DV-Hop) localization algorithm making errors and having error accumulation in wireless sensor network (WSN), we proposed a new DV-Hop localization algorithm based on half-measure weighted centroid. This algorithm followed the two-dimensional position distribution, designed the minimum communication radius, and formed a reasonable network connectivity firstly. Then, the algorithm corrected the distance between the beacon node and its neighbour node to form a more accurate jump distance so that the shortest path can be optimized. Finally, we theorized the proposed localization algorithm and verified it in simulation experiments, including same communication radius, different communication radii, and different node densities in same communication radius, and have compared the localization error and localization accuracy, respectively, between the proposed algorithm and the DV-Hop localization algorithm. The experiment’s result shows that the proposed localization algorithm have reduced the localization’s average error and improved the localization’s accuracy.

#### 1. Introduction

As there is rapid development in wireless communication, the rapid development of low energy, low cost, intensive, multifunctional tiny wireless sensor network is promoted. And a large number of wireless sensor nodes are one of the key elements of wireless sensor networks [1, 2]; therefore, research on location technology in wireless sensor networks is one of the key issues in the research of wireless sensor networks, which is of great significance.

The DV-Hop localization algorithm [3] was first proposed by Dragos Niculescu et al. of Rutgers, USA, which is a distributed localization algorithm based on distance vector routing protocol without ranging [4]. Many scholars and scientific research institutions have carried out in-depth research on the DV-Hop Localization algorithm. In reference [5], in order to reduce the DV-Hop error, the ideal beacon node spacing is introduced to eliminate the larger error in the average single-hop distance calculated by the beacon node, and the average single-hop distance of the whole network is corrected. Then, the unknown node coordinates calculated by the least squares method are corrected. In reference [6], the weighted average of distance error and estimation distance error is proposed to correct the original average hop distance. The weight of the particle group is improved by using the subsection index and logarithmic decrement weight. In reference [7], for each beacon node, the weight of each beacon node is added to calculate the average hop distance. The main node definition is proposed, the network topology structure will be considered more comprehensively, and the local and global characteristics will be weighed better; in order to calculate the estimated distance of nodes, the improved particle swarm optimization algorithm is used instead of the maximum likelihood estimation method to locate the node coordinates. In reference [3], the range of broadcasting information of beacon nodes is limited by the threshold of the hop number; the average distance of each anchor node is corrected by the average distance error of each beacon node; the unknown node of this round is upgraded to a new anchor node for the next round of positioning. In reference [8], the multicommunication radius method is introduced to refine the hops between nodes. When calculating the average hop distance of unknown nodes, the isolated nodes are eliminated, and the average hop distance obtained by beacon nodes is weighted and normalized to improve the localization accuracy of unknown nodes. In reference [9], the distance between the unknown nodes and the beacon nodes is calculated using different average hop distances. Using the Galactic Swarm Optimization thought of beacon nodes in the network is divided into different species: the particle swarm optimization algorithm is used to estimate the unknown node in each population, which is the optimal location, and the weighted centroid algorithm is used to optimize the suboptimal solution which is set as the coordinates of the unknown node.

All of the above studies give a good research idea for the DV-Hop localization algorithm. This paper proposes another improvement scheme based on the DV-Hop algorithm. This algorithm followed the two-dimensional position distribution, designed the minimum communication radius, and formed a reasonable network connectivity firstly. Then, the algorithm corrected the distance between the beacon node and its neighbour node to form a more accurate jump distance so that the shortest path can be optimized. Finally, we theorized the proposed localization algorithm and verified it in simulation experiments, including same communication radius, different communication radii, and different node density with same communication radius, and have compared the localization error and localization accuracy, respectively, between the proposed algorithm and the DV-Hop localization algorithm. The experimental result shows that the proposed localization algorithm have reduced the localization’s average error and improved the localization’s accuracy. Compared with the DV-Hop algorithm, whose localization accuracy increases from 0.6 to 0.7, other DV-HOP is about 0.3; and new DV-Hop shows a localization accuracy fluctuating stably within 0.1.

#### 2. Analysis of the DV-Hop Localization Algorithm

The DV-Hop localization algorithm is a distributed range-free localization algorithm based on the distance vector routing protocol [5]. The main principle therein is to calculate the distances between beacon nodes and unknown nodes by multiplying the average hop distance in WSNs by the hop count of the beacon nodes. Then, the position information of unknown nodes is obtained through trilateration, triangulation, and multilateration [10], thus realizing localization. For a network topology established by a random arrangement of wireless sensor nodes, the 40 paths from beacon nodes to unknown nodes are possibly not straight. Hence, some errors are likely to exist in the node localization process when using the DV-Hop algorithm [11]. Moreover, the more numerous the hop counts, the larger the errors (i.e., error accumulation occurs).

##### 2.1. Basic Procedure of the DV-Hop Algorithm

The localization of nodes using the DV-Hop [12, 13] algorithm is mainly divided into three steps.

*Step 1. *Calculating the minimum hop count between beacon nodes and unknown nodes. Beacon nodes broadcast information which shows their positions to neighbouring nodes by using the classical distance vector routing protocol [14]. The information contains , where , , and represent the identifier, the coordinate, and the hop count of beacon nodes , respectively. Moreover, the initial value of is set to zero. The nodes receiving the broadcast information record the localization and hop counts of beacon nodes as vectors, which are then transmitted to neighbouring nodes (the value of hop count is incremented by one). When a node receives the same id group, it is supposed to compare the newly obtained value of with the original value and then select the minimum value to replace and update the original group; otherwise, the newly obtained group is abandoned. The position information and minimum hop count of all beacon nodes are obtained by this communication mode in WSNs.

*Step 2. *Estimating the average hop distance. The purpose of calculating the average hop distance and minimum hop count first is to estimate the distance between unknown nodes and beacon nodes. After acquiring the localization and the hop count of beacon nodes in the first stage, the average hop distance of whole networks can be computed. The information is then broadcast to the whole network, or all networks. Furthermore, most nodes are required to receive the average hop distance from their nearest beacon nodes. The distances between beacon nodes and unknown nodes can be calculated by multiplying the average hop distance by the hop count. Here, and denote the average hop distance and the hop distance between a beacon node and an unknown node , respectively, as shown in the following formula:The distances between unknown nodes and beacon nodes are calculated using the following formula:where signifies the average hop distance, while Hop is the minimum hop count between unknown nodes and beacon nodes.

As shown in Figure 1, which shows the network topology of the DV-Hop localization algorithm, the red and the blue circles indicate beacon nodes and unknown nodes, respectively. The distances and hop counts among beacon nodes are known, and A represents an unknown node. According to formula (1), the average hop distance can be calculated as (40 + 75)/(2 + 5) = 16.42 m. In Figure 1, unknown node A receives the average hop distance from beacon node . On this basis, according to formula (2), the distances between the three beacon nodes and the unknown node A are 3 × 16.42 m, 2 × 16.42 m, and 3 × 16.42 m, respectively.