# Research of localization algorithm based on weighted Voronoi diagrams for wireless sensor network

- Shaobin Cai
^{1}Email author, - Hongqi Pan
^{1}, - Zhenguo Gao
^{2}, - Nianmin Yao
^{1}and - Zhiqiang Sun
^{1}

**2014**:50

https://doi.org/10.1186/1687-1499-2014-50

© Cai et al.; licensee Springer. 2014

**Received: **22 September 2013

**Accepted: **17 March 2014

**Published: **31 March 2014

## Abstract

Wireless sensor network (WSN) is formed by a large number of cheap sensors, which are communicated by an *ad hoc* wireless network to collect information of sensed objects of a certain area. The acquired information is useful only when the locations of sensors and objects are known. Therefore, localization is one of the most important technologies of WSN. In this paper, weighted Voronoi diagram-based localization scheme (W-VBLS) is proposed to extend Voronoi diagram-based localization scheme (VBLS). In this scheme, firstly, a node estimates the distances according to the strength of its received signal strength indicator (RSSI) from neighbor beacons and divides three beacons into groups, whose distances are similar. Secondly, by a triangle, formed by the node and two beacons of a group, a weighted bisector can be calculated out. Thirdly, an estimated position of the node with the biggest RSSI value as weight can be calculated out by three bisectors of the same group. Finally, the position of the node is calculated out by the weighted average of all estimated positions. The simulation shows that compared with centroid and VBLS, W-VBLS has higher positioning accuracy and lower computation complexity.

## Keywords

## 1 Introduction

Wireless sensor network (WSN) is a self-organizing distributed network system including plenty of tiny sensor nodes with the ability to communicate and calculate in a specific monitoring area. In the wireless sensor network, the node position information plays a very important role in monitoring activity. The monitoring information without location message is meaningless. Therefore, the research of wireless sensor network positioning technology is the key technology of WSN [1].

The existing location algorithm is divided into two major categories which are range-based and range-free. APS [2], AHLoS algorithm [3], trilateration algorithm [4], lateration algorithm [5], and alternating combination trilateration (ACT) [6] are typical range-based algorithms. Centroid algorithm [7], DV-hop algorithm [8], APIT algorithm [9], and amorphous algorithm [10] are typical range-free algorithms.

Literature [11] used Voronoi diagrams in wireless sensor node localization. In this algorithm, the midperpendiculars between each beacon node and its neighbor beacon node composed the Voronoi region boundaries. According to the properties of the Voronoi diagrams, we can see that the node to be located is in its nearest beacon node Voronoi region. Therefore, in literature [11], the algorithm weighted all the nodes within this region firstly and obtained all the beacon nodes’ Voronoi regions in order, then added different weight values to the obtained regions, and finally obtained the centroid of the largest weight value region as the estimated coordinate of the node to be located.

However, algorithm [11] using the midperpendicular of the beacon nodes as Voronoi diagram region boundaries could not reflect the relationship between the RSSI signal strength and the distance among the nodes. Therefore, in order to improve localization accuracy and reduce complexity of the algorithm, we improved the localization algorithm based on Voronoi diagrams. In the improved algorithm, we selected two beacon nodes' weighted bisector as the region boundaries, then calculated the two weighted bisector intersection coordinates as estimate coordinates, and finally we regarded the weighted average values of all the estimate coordinates as the final estimate coordinates of the node to be located.

## 2 Positioning algorithm based on Voronoi

*P*= {

*P*

_{1},

*P*

_{2},

*P*

_{3},⋯

*P*

_{ n }}, 3 ≤

*n*< ∞. The plane is divided by the Voronoi diagram as follows:

*x*be any point in the plane and

*d*(

*x*,

*P*

_{ i }) be the Euclidean distance [11] between

*x*and the certain point

*P*

_{ i }. In wireless sensor networks, because RSSI signal values between nodes are inversely proportional to the square of their distances, then according to this property and the definition of Voronoi diagrams, we can describe WSN node localization as follows.

- 1.
Let

*P*_{1},*P*_{2},*P*_{3},⋯,,*P*_{ n }be beacon nodes in wireless sensor network area and*S*be node to be located. - 2.
We can suppose beacon nodes

*P*_{1},*P*_{2},*P*_{3},⋯,*P*_{ j }communicate with the node*S*, and the node*S*receives RSSI signal strength of the beacon node according to size of ${\mathrm{RSSI}}_{{\mathrm{P}}_{1}}>\mathit{RSS}{\mathrm{I}}_{{\mathrm{P}}_{2}}>\cdots ,>{\mathrm{RSSI}}_{{\mathrm{P}}_{\mathit{j}}}$. - 3.
According to the properties of the Voronoi diagrams, we can see that the unknown node

*S*is in the Voronoi region of beacon node*P*_{1}. We compute*P*_{1}’s Voronoi regions and add the weight values ${\mathrm{RSSI}}_{{\mathrm{P}}_{1}}$ to all the nodes within this area. - 4.
Remove the node

*P*_{1}, compute the Voronoi region of*P*_{2}, and assign node weight value ${\mathrm{RSSI}}_{{\mathrm{P}}_{2}}$. In this way, eventually, we can obtain all beacon nodes of the Voronoi regions. - 5.
We can find the region with a maximum weight value and get the gravity coordinate as the calculation coordinate of the unknown node

*S*.

## 3 Positioning algorithm based on weighted Voronoi

In Voronoi diagram algorithm, the Voronoi region of beacon node *P*_{
i
} is made of midperpendiculars of this beacon node and the beacon nodes around it. However, in fact, if the nodes have the same centroid and the greater the intensity of the RSSI signal the node received, the smaller the distance between nodes will be. Therefore, we can appropriately adjust the Voronoi region of this node through the signal value. Thus, we can improve the localization accuracy and reduce computational complexity.

### 3.1 Algorithm basic ideas

We presume the node to be located *S* can receive the signal from beacon nodes *P*_{1}, *P*_{2}, *P*_{3},⋯, *P*_{
n
}. When *S* has the distance of *d*_{
i
}, *d*_{
j
} (suppose *d*_{
i
} > *d*_{
j
}) to any two beacon nodes *P*_{
i
}, *P*_{
j
}, the node to be located *S* and *P*_{
i
}, *P*_{
j
} will form a triangle *SP*_{
i
}*P*_{
j
}. Let node *S* be in the line of *P*_{
i
}*P*_{
j
}’s weight bisector; we can select this line as the region boundaries of beacon nodes *P*_{
i
} and *P*_{
j
}. Then, we can select beacons *P*_{
m
}, *P*_{
n
} and repeat the above method. We will get a more accurate Voronoi region at last.

*d*

_{ i }>

*d*

_{ j }, we know ∠

*SP*

_{ i }

*P*

_{ j }> ∠

*SP*

_{ j }

*P*

_{ i }in the triangle

*SP*

_{ i }

*P*

_{ j }. For calculating the straight line equation

*L*of weight bisector, we need to get the slope

*k*of

*L*and the intersection coordinates

*P*between

*P*

_{ i }

*P*

_{ j }and

*L*. With the properties of the straight slope, the slope of

*L*is the opposite to the reciprocal slope of bottom edge

*P*

_{ i }

*P*

_{ j }, that is ${\mathit{k}}_{\mathit{L}}=-\frac{{\mathit{x}}_{\mathit{j}}-{\mathit{x}}_{\mathit{i}}}{{\mathit{y}}_{\mathit{j}}-{\mathit{y}}_{\mathit{i}}}$. We use the following three cases to seek the intersection coordinate

*P*(

*x*

_{0},

*y*

_{0}):

- 1.We calculate the next formula first.$\left\{\begin{array}{l}{\mathit{s}}_{1}={\mathit{d}}_{\mathit{i}}^{2}-{\mathit{d}}_{\mathit{j}}^{2}+{\mathit{d}}_{\mathit{i},\mathit{j}}^{2}\\ {\mathit{s}}_{2}={\mathit{d}}_{\mathit{j}}^{2}-{\mathit{d}}_{\mathit{i}}^{2}+{\mathit{d}}_{\mathit{i},\mathit{j}}^{2}\end{array}\right.$(1)We know
*s*_{1}and*s*_{2}are both greater than zero from the cosine law. Then, we can choose proportionality coefficient $\mathit{l}=\frac{{\mathit{s}}_{2}}{{\mathit{s}}_{1}}$ as the specific value of $\left|\overrightarrow{{\mathit{P}}_{\mathit{i}}\mathit{P}}\right|$ and $\left|\overrightarrow{\mathit{P}{\mathit{P}}_{\mathit{j}}}\right|$, that, is$\mathit{l}=\frac{{\mathit{s}}_{2}}{{\mathit{s}}_{1}}=\frac{\overrightarrow{\left|{\mathit{P}}_{\mathit{i}}\mathit{P}\right|}}{\overrightarrow{\left|\mathit{P}{\mathit{P}}_{\mathit{j}}\right|}}$(2)Because we have calculated the positions of*s*_{1}and*s*_{2}and the positions of*P*_{1}and*P*_{2}have been known, we can get the coordinate*P*(*x*_{0},*y*_{0}).${\mathit{x}}_{0}=\frac{{\mathit{x}}_{\mathit{i}}+\mathit{l}{\mathit{x}}_{\mathit{j}}}{1+\mathit{l}},\phantom{\rule{1em}{0ex}}{\mathit{y}}_{0}=\frac{{\mathit{y}}_{\mathit{i}}+\mathit{l}{\mathit{y}}_{\mathit{j}}}{1+\mathit{l}}$(3)Taking*k*_{ L }that we have obtained and*P*(*x*_{0},*y*_{0}) into the equation*y*−*y*_{0}=*k*(*x*−*x*_{0}), we can receive the equation as follows:$\mathit{y}={\mathit{k}}_{\mathit{L}}\mathit{x}+\frac{{\mathit{y}}_{\mathit{i}}-{\mathit{k}}_{\mathit{L}}{\mathit{x}}_{\mathit{i}}+\mathit{l}\left({\mathit{y}}_{\mathit{j}}-{\mathit{k}}_{\mathit{L}}{\mathit{x}}_{\mathit{j}}\right)}{1+\mathit{l}}$(4) - 2.Straight line
*L*is*P*_{ i }*S*in the triangle, so straight line*L*’s slope*k*_{ L }is still ${\mathit{k}}_{\mathit{L}}=-\frac{{\mathit{x}}_{\mathit{j}}-{\mathit{x}}_{\mathit{i}}}{{\mathit{y}}_{\mathit{j}}-{\mathit{y}}_{\mathit{i}}}$; the intersection of*L*and bottom edge*P*_{ i }*P*_{ j }is*P*_{ i }(*x*_{ i },*y*_{ i }). Then, we can get the equation of straight line*L*:$\mathit{y}={\mathit{k}}_{\mathit{L}}\mathit{x}+{\mathit{y}}_{\mathit{i}}-{\mathit{k}}_{\mathit{L}}{\mathit{x}}_{\mathit{i}}$(5) - 3.We still calculate$\left\{\begin{array}{l}{\mathit{s}}_{1}={\mathit{d}}_{\mathit{i}}^{2}-{\mathit{d}}_{\mathit{j}}^{2}+{\mathit{d}}_{\mathit{i},\mathit{j}}^{2}\\ {\mathit{s}}_{2}={\mathit{d}}_{\mathit{j}}^{2}-{\mathit{d}}_{\mathit{i}}^{2}+{\mathit{d}}_{\mathit{i},\mathit{j}}^{2}\end{array}\right.$(6)
At this time,

*s*_{1}> 0,*s*_{2}< 0; then, the proportionality coefficient is $\mathit{l}=-\frac{{\mathit{s}}_{2}}{{\mathit{s}}_{1}}$.In a similar way, we can get the coordinates*P*(*x*_{0},*y*_{0}).${\mathit{x}}_{0}=\frac{{\mathit{x}}_{\mathit{i}}-\mathit{l}{\mathit{x}}_{\mathit{j}}}{1-\mathit{l}},\phantom{\rule{1em}{0ex}}{\mathit{y}}_{0}=\frac{{\mathit{y}}_{\mathit{i}}-\mathit{l}{\mathit{y}}_{\mathit{j}}}{1-\mathit{l}}$(7)Then, get the equation of*L*.$\mathit{y}={\mathit{k}}_{\mathit{L}}\mathit{x}+\frac{\mathit{l}\left({\mathit{y}}_{\mathit{j}}-{\mathit{k}}_{\mathit{L}}{\mathit{x}}_{\mathit{j}}\right)-\left({\mathit{y}}_{\mathit{i}}-{\mathit{k}}_{\mathit{L}}{\mathit{x}}_{\mathit{i}}\right)}{\mathit{l}-1}$(8)

### 3.2 Algorithmic process

- 1.
The node to be located

*S*broadcasts around the information*Request*with requesting location. - 2.
All beacon nodes that received the

*Request*return the information*Reply*which contains its own location. - 3.
After node

*S*receives all the information, we sort the beacon nodes from big to small according to the signal intensity. We assume that the sorted order of beacon nodes is*P*_{1},*P*_{2},*P*_{3},⋯,*P*_{ k }. - 4.
The bottom edge heights of

*SP*_{1}*P*_{2},*SP*_{2}*P*_{3},⋯,*SP*_{k − 1}*P*_{ k }form the equations*L*_{1},*L*_{2},⋯,,*L*_{k − 1}. - 5.
Next, we can get the intersection

*Q*_{1}of*L*_{1}and*L*_{2},*Q*_{2}of*L*_{2}and*L*_{3},⋯, and*Q*_{k − 2}of*L*_{k − 2}and*L*_{k − 1}. Then, we attach the RSSI signal values of*P*_{1},*P*_{2},⋯*P*_{k − 2}to the nodes*Q*_{1},*Q*_{2},⋯,*Q*_{k − 2}as weighted values. - 6.
Calculate the weighted average coordinates from node

*Q*_{1}to node*Q*_{k − 2}.

## 4 Experiment and performance analysis of the positioning algorithm

In this section, we make the simulation analysis on performance comparison among the new algorithm, weighted centroid algorithm (W-Centroid) and Voronoi diagram-based localization scheme (VBLS) algorithm by MATLAB 7.0 (The MathWorks, Inc., Natick, MA, USA).

In the previous equation, *P*_{
r
}(*d*_{0}) and *d*_{0} represent reference energy and reference distance, respectively. *β* represents path loss coefficient (general value is 2 ~ 4), and *X*_{
db
} is a Gaussian variable that has an average value of zero.

## 5 Conclusion

Based on the research of Voronoi diagram range-free localization algorithm, we propose a Voronoi diagram weighted localization algorithm. The algorithm uses the relationship between the distances among the nodes, and the RSSI signal intensity corrects the Voronoi diagram boundaries. At the same time, it reduces the number of minimum required localization beacon nodes and the complexity of the algorithm and improves the positioning accuracy.

## Declarations

### Acknowledgements

The paper is supported by the National Science Foundation of China (41176082, 61073182), supported by the Program for New Century Excellent Talents in University (NCET-13-0753), Specialized Research Fund for the Doctoral Program of Higher Education (20132304110031), and the Fundamental Research Funds for the Central Universities (HEUCFT1202).

## Authors’ Affiliations

## References

- Sun L, Li J, Chen Y, Zhu H:
*Wireless Sensor Network*. Beijing: Tsinghua University Press; 2005:136-154.Google Scholar - Langendoen K, Reijers N: Distributed localization in wireless sensor networks: a quantitative comparison.
*Comp. Netw.*2003, 42(4):499-518.View ArticleGoogle Scholar - Savvides A, Han CC, Strivastava MB:
*Dynamic fine-grained localization in Ad-hoc networks of sensors*. Rome, Italy: Paper presented at the 7th annual international conference on mobile computing and networking; 2001:166-179.Google Scholar - Nicolescu D, Nath B:
*Ad-hoc positioning systems (APS) using AOA*. New York: Paper presented at the 22nd annual joint conference of the IEEE computer and communications; 2003:1734-1743.Google Scholar - Niculescu D, Nath B: Position and orientation in ad hoc networks.
*Ad Hoc Netw.*2004, 2(2):133-151. 10.1016/S1570-8705(03)00051-9View ArticleGoogle Scholar - Yu Y:
*Sensor Network Positioning Algorithm and Related Technology Research*. Chongqing: Chongqing University; 2006.Google Scholar - Bulusu N, Heidemann J, Estrin D: GPS-less low cost outdoor localization for very small devices.
*IEEE Wirel. Commun.*2000, 7(5):27-34.Google Scholar - Niculescu D, Nath B: DV-based positioning in ad hoc networks.
*Telecommun. Syst.*2003, 22(1–4):267-280.View ArticleGoogle Scholar - He T, Huang C, Blum BM, Stankovic JA, Abdelzaher T:
*Range-free localization schemes for large scale sensor networks*. San Diego, CA, USA: Paper presented at the 9th annual international conference on mobile computing and networking; 2003:81-95.Google Scholar - Nagpal R, Shrobe H, Bachrach J:
*Organizing a global coordinate system from local information on an ad-hoc sensor network*. Palo Alto, CA, USA: Paper presented at the second international conference on information processing in sensor networks; 2003.View ArticleGoogle Scholar - Wang J, Huang L, Xu H, Xu B, Li S: Based on Voronoi diagram without ranging wireless sensor network node positioning algorithm.
*Comput. Res. Dev.*2008, 45(1):119-125.Google Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.