You are on page 1of 6

October 2012, 19(Suppl.

2): 712
www.sciencedirect.com/science/journal/10058885 http://jcupt.xsw.bupt.cn

The Journal of China
Universities of Posts and
Telecommunications
Three-dimensional localization algorithm of wireless sensor networks
base on particle swarm optimization
WEI Nuo
1,2
(), GUO Qiang
1,2,3
, SHU Ming-Lei
1,2
, L Jia-liang
1,2
, YANG Ming
1,2

1. Shandong Provincial Key Laboratory of Computer Networks, Jinan 250014, China
2. Shandong Computer Science Center, Jinan 250014, China
3. Shandong Economic University, Jinan 250014, China
Abstract
Although many localization protocols have been proposed for wireless sensor networks in a three dimensional topology,
the demand to further improve the accuracy of node positioning method make it necessary to design and develop new
localization algorithms. In this paper, a three-dimensional localization algorithm of wireless sensor networks base on
particle swarm optimization (TLP) is presented. By exploiting the basic principles of particle swarm optimization (PSO)
and the information of practical node positioning applications, TLP searches out the optimal localization results on the
basis of the distance from anchor nodes to unknown nodes. Compared to the normal schemes, such as least mean square
algorithm (LMS), the simulation results reveal that the proposed protocol provides high positioning accuracy under the
existence of ranging errors.
Keywords three-dimensional localization, particle swarm optimization, wireless sensor networks, raging

1 Introduction


Recently, the localization problem for wireless sensor
networks is a research hotspot. In practice , sensor nodes
are often deployed in the three-dimensional physical space
and only the two-dimensional coordinate of a node can not
exactly depict a nodes position [12]. There are many
examples of three-dimensional sensor network applications.
For example, smart dust networks, in which the nodes
suspending in the atmosphere can detect the different
pressure and temperature of the space. Ice monitoring
sensor network, in which the nodes buried in the ice bed
can detect different depth, temperature, direction and other
data. Bird nests sensor network, in which the sensor nodes
laid around the bird nests to observe the temperature,
pressure, humidity and other environmental data. In
practical applications, due to constraints of terrain (such as
in the air, oceans, forests, mountains and other complex

Received date: 29-06-2012
Corresponding author: WEI Nuo, E-mail: wein@keylab.net
DOI: 10.1016/S1005-8885(11)60451-2
terrain) or environment (such as in the air at different
eights or ocean depths), the practical application of
wireless sensor network nodes cannot be placed in the
absolute two dimensional plane [34].
Compared with the wireless sensor network under the
two-dimensional plane, the three-dimensional localization
algorithm of wireless sensor networks are more difficult:
1) The practical application of the environment is more
complex.
The traditional two-dimensional positioning algorithm is
usually assumed that nodes are randomly uniformly
distributed in a flat plane, but in the three-dimensional
space, more practical factors such as terrain, obstacles
must be considered in the positioning process.
2) Node position calculation is more complex.
In two-dimensional plane, one node can be localized as
long as three adjacent nodes have known locations, but in
three-dimensional space, at least four known positions are
needed. Therefore, the complexity of the problem is also
increased.
In summary, locating nodes in three dimensional space

8 The Journal of China Universities of Posts and Telecommunications 2012

does not simply reflect just the addition of one extra
dimension to the locating problem, and thus it is necessary
to develop three-dimensional positioning technology of
wireless sensor networks.
The remainder of the paper is organized as follows.
Sect. 2 surveys various three-dimensional localization
algorithms presented recent years. Sect. 3 describes the
basic principles of PSO. Sect. 4 and Sect. 5 propose the
TLP algorithm and analyze the simulation results, Sect. 6
concludes the paper.
2 Related works
The early localization algorithms for wireless sensor
networks pay attention to researching and innovating in the
basic theories. Many valuable papers on localization
algorithms are proposed at this stage.
Shu et al. [5] proposed a three-dimensional localization
algorithm for large scale wireless sensor networks on the
basis of cluster (CBLALS). It adopts the cluster structure
and the global coordinate system to represent the whole
network logically by employing MDS-based localization,
and reduces the influence of range measurement errors
through decreasing the probability of multi-hop. The
simulation result shows that while the range measurement
error is 30%, the positioning error of CBLALS can be
controlled within 55%.
Teymorian et al. [6] proposed 3D underwater sensor
network localization algorithm, which transforms the 3D
underwater sensor network (USN) localization problem
into its 2D counterpart by employing sensor depth
information and a simple projection technique. The
simulation results show that the algorithm has improved
localization capabilities, low computation requirements
and balanced communication overhead.
Eunchan et al. [7] proposed mobile beacon-based
3D-localization algorithm with multidimensional scaling
in large sensor networks, which takes full advantage of
classical multidimensional scaling (MBL-MDS) connectivity
and measurements. To choose useful reference point,
MBL-MDS adopts a selection rule a decision rule to
improve location performance. Simulation results
confirmed the improvement of MBL-MDS.
Chia-Ho et al. [8] proposed a range-free position
determination mechanism for sensors in a three-
dimensional wireless sensor network by using flying
anchors. The mechanism, which utilizes the location
information transmitted from flying anchors to determine
the positions of the sensor nodes, performs independent of
the influence of network densities and topologies by
applying basic geometry principles to the location
information it receives from the flying anchors. The
simulation performed using ns-2 software shows that the
localization mechanism is accurate, distributed, scalable,
and power efficient. In addition, the localization scheme
implemented on the Tmote Sky is effective and feasible in
the real environment.
Yadav et al. [9] proposed a localization scheme for three
dimensional wireless sensor networks by using global
position system (GPS) enabled mobile sensor nodes in this
scheme, the sensor network is supposed to be comprised of
mobile and static sensor nodes. Mobile sensor nodes are
assumed to be equipped with global position system GPS
enabled devices which can locate the nodes at any
instance. These mobile nodes periodically broadcast
beacon messages of their location as the nodes move in the
network space. When static sensor nodes receive these
messages as soon as they enter the communication range
of any mobile node the static nodes calculate their
individual position based on the equation of sphere.
Compared to existing approaches, the proposed scheme
gains in terms of beacon overhead, localization error,
computation and space required for any percent.
3 Basic principles of PSO
Nature of birds, fish and many other creatures have a
group behavior. For example, the movement of the birds is
random at a given moment, but we are very surprised
when these fragmented movement is integrated and the
whole flock has a striking synchronization, fluency and
purpose.
These discrete state of the individual was shown as a
group behavior with strong purposes, has been attracting
many researchers all these years.
PSO was developed by Kennedy et al. [1011]. PSO is
an evolutionary computing technology, and it originates to
a simplified society model simulation, just like simulating
the beautiful and unpredictable movement of the birds [12].
As PSO has advantages of simple implementation,
stable performance, and convergence parameters of high
efficiency, the algorithm has wide attention from scholars
since it was presented. After the inertia weight [13] was
introduced, the PSOs development and exploration

Supplement 2 WEI Nuo, et al. / Three-dimensional localization algorithm of wireless sensor networks base on 9

became better, and the standard version was gotten.
1) The flow of standard PSO algorithm:
2) Initialize a group of particles (population size is m),
including the random position and velocity;
3) Evaluate the fitness of each particle ;
4) For each particle, compare its fitness with its best
experienced position. If better, reset the particles ever
experienced best position as particle current position;
5) For each particle, compare its fitness with the particle
swarm global best position ever experienced, if better,
reset the current position as optimum position of the
particle groups.
According to the equations as follows:
id id 1 id id 2 gd id
id max id max
id id id max
id id id
rand( ) rand( )
, if ( )
, if ( )
v wv c p x c p x
v v v v
v v v v
x x v
= + +

= >

`
= <

= +
)
(1)
Update particle velocity V and position X, W is inertia
weight, C
1
, C
2
is the acceleration constant, rand(), rand() is
the random function within [0,1]. If the conditions are not
satisfied, back to step 2).
4 Description of TLP
Positioning the nodes is modeled as an optimization
problem and solved by the bionic algorithm, which is a hot
topic and gets a lot of applications in recent years. Ref. [15]
proposed a two-dimensional positioning method for
wireless sensor networks by PSO algorithm, exploiting
other beacon node to localize all the unknown nodes.
As a commonly used multi-dimensional optimization
algorithm, PSO is exploited in TLP, which is a three-
dimensional wireless sensor network nodes localization
method. By receiving less than four non-coplanar beacon
of information, the unknown node can be located.
4.1 Basic principles of TLP
Firstly, assume the study object is the stationary
three-dimensional wireless sensor networks, according to
whether the node can locate itself or not, the sensor nodes
are divided into the anchor node (also known as beacon
nodes) and unknown nodes. Anchor nodes are equipped
with special location hardware like GPS positioning
devices, which helps them to obtain accurate location
information.
Secondly, as a special feature of the anchor node, they
have a longer communication radius than the unknown
nodes. In order to simplify the algorithm, we assume that
the communication radius of the anchor nodes can cover
the entire targeted area. In other words, the unknown node
can receive all the information from the anchor node.
Finally, as the localization algorithms are falling into
two categories range-based and range-free, according to
that the range between two nodes is measured or not [14],
the location algorithm proposed in this paper is a
range-based algorithm. At present, as wireless sensor
network chip (such as the CC2430 and CC2431) already
have strength measurements, which get the range
estimation between an unknown node and an anchor node,
no additional hardware support is needed for ranging.
The basic idea of the TLP algorithm is that when an
unknown node receives information including the signal
strength from four non-coplanar anchor nodes, the path
loss is calculated and the distances between the unknown
nodes and anchor nodes are gotten by the empirical model
and theoretical formula, then TLP algorithm is
implemented, number of possible positions of the
unknown node are searched out. At last the estimated
location of the unknown node can be obtained by
calculating the average of the recording position.
4.2 The flow of TLP algorithm
The description of TLP algorithm flow is as follows:
1) In a given three-dimensional space, initialize anchor
node (denoted by 1
ij
L ), including three-dimensional
coordinates of each anchor node, initialize the particles
(denoted by
ij
L ), including particles of the initial speed. i
stands for the serial number of anchor nodes, i=1,2n. j
stands for the serial number of dimensions, j=1,2d.
2) Calculate the tth particles fitness (denoted by f
t
, t=1,
2,, oknum), and the formula is as follows:
2
2
1 1
( 1 )
j d i m
ij ij i
i j
f L L D
= =
= =
(
= (
(

_ _
(2)
In the formula, m is the number of anchor nodes, d is
dimension, D
i
is the distance between the unknown node
and the ith anchor node, which has the distance deviation
that conforms to the normal distribution;
3) Compare each particles fitness (
i
f ) with its local
optimal locations fitness (
2
f ), if
2 i
f f < , the current
position will be taken as the local optimal location that the
particle has experienced.


10 The Journal of China Universities of Posts and Telecommunications 2012

4) Compare each particles fitness (
i
f ) with the global
optimal locations fitness (
0
f ).
0 i
f f < , then the current
position of the particle will be taken as the global optimal
location.
5)
id id 1 id id 2 gd id
id id id
rand()( ) Rand()( ) v wv c p x c p x
x x v
= + +

`
= +

)
;
i=1,2,,m (3)
According to the formula, the ith particles velocity and
location can be determined ,in which w, c
1
and c
2
are
constant , rand(), Rand() are random, function. d is the dth
dimension , p
id
is the value of dth dimension of the local
optimal location. x
id
is the value of the dth dimension of
the ith particles current location, p
gd
is the value of dth
dimension of the global optimal location.
id- id
p x is the distance of current position of the
particles have experienced from the local optimal position
in the d-dimension.
gd gd
p x is the distance of current
position of the particles have experienced from the global
optimal position in the d-dimension.
In addition, the speed v is restricted by the maximum
speed Vmax;
6) If the fitness of the global best position satisfy stop
condition, then step 7) is performed, otherwise step 2) is
performed.
7) Execute steps from 2) to 6) N times, and the final
location result is the average of all global optimal positon
obtained by step 6) each time.

Fig. 1 Flow diagram of TLP
4.3 Parameters descriptions of TLP
1) Inertia weight w
The concept of inertia weight w is proposed by Hui et al.
[13], w has the ability to explore new area and extend the
search space. They found that the weight size of w effect
the performance of the algorithm greatly, the larger the
value help jump out of the local minima, the smaller value
is conducive to the convergence of the algorithm, in the
early experiment [12] inertia weight is set as 1.0.
2) Acceleration constants c
1
and c
2
Acceleration constants c
1
and c
2
are the statistical
weight of acceleration, which push each particle to the
place of pbest and gbest. The Low value allows the particle
wandering outside of the target region before being pulled
back, while high value leads to the particle sudden rush
towards or over the target region. c
1
and c
2
are set as 2.0 in
early experiment [12].To solve more complex optimization
problems, c
1
and c
2
can be adjusted dynamically, which
make the particle get more search space in the early
evolution and faster convergence rate in the late evolution,
the adjustment strategy is the same with the inertia
weight .
3) Velocity v
max

The particle velocity V
i
is restricted by the speed v
max
,
which is the maximum distance that a particle can move
every time. In a certain moment, if a particle velocity v
exceeds v
max
, then the particle moves according to v
max
,
which also determines the resolution between the current
location and the best location .
If v
max
is too high, the particles may miss good solutions,
if v
max
is too low, particles cant explore enough and lead
to a local optimal, so v
max
is an important factor
influencing the algorithm convergence and the
convergence rate. The v
max
is usually set as 10%20%
within the change slope of every dimension.
5 Performance evaluation
We use Matlab 7.0 and C++ to simulate above
algorithms. The simulation experiment takes w=1.0, c
1
=2.0,
c
2
=2.0 according to early experiments . In order to make
the anchor nodes cover the entire area, the range of anchor
node is 87 m, and the range of the unknown node is 30 m.
20 unknown nodes are distributed in a topology of
50 m50 m50 m randomly, and 4 anchor nodes, which
are not coplanar, the coordinates are set as A1 (50,0,0),
A2 (0,50,50,), A3 (50,50,50), A4 (0,0,50).

Supplement 2 WEI Nuo, et al. / Three-dimensional localization algorithm of wireless sensor networks base on 11

The positioning error is expressed as:
2 2 2
0 0 0
1
( ) ( ) ( )
N
i i i i i i
i
x x y y z z
e
N
=
+ +
=
_
(4)
where (x
i
,y
i
,z
i
) is the actual location of the unknown node,
(x
i0
,y
i
,z
i0
) is the result of localization algorithm, N is the
number of the nodes, and r is the range of unknown node.
In order to reveal the performance of TLP, we design the
simulation and choose normal schemes such as LMS for
comparison in this section.
As no specific ranging method is defined earlier in this
paper, when considering the positioning error, we simply
assume that the ranging errors are Gaussian distributed.
We assume the ranging errors satisfy
2
(0, ) o , where
2
o

is set to be 0%, 5%, 10%, 20%, 30%, 40%, 50% in the
simulation. Each result is a random experiment initialized
100 times, and the results of the experiment may be
slightly different once again.
The comparison of localization results can be obtained
by two kinds of localization methods shown in Figs. 26,

Fig. 2 Location results when ranging error equals 10%

Fig. 3 Location results when ranging error equals 20%
which illustrate performance of TLP and LMS when the
ranging error equals 10% and 50%.

Fig. 4 Location results when ranging error equals 30%

Fig. 5 Location results when ranging error equals 40%

Fig. 6 Location results when ranging error equals 50%
As shown in Table 1, the comparison data is presented,
which compares the performances of TLP and LMS with
different ranging errors. In contrast, the positioning error
of LMS increases more rapidly than that of TPL. When the
ranging error equals 10%, the average positioning error of

12 The Journal of China Universities of Posts and Telecommunications 2012

LMS is 13.08%, the TLPs average positioning error just
equals 9.66%, and when the ranging error is 30%, the
average positioning error of LMS is 36.76%, the average
positioning error of TPL is 27.92%.
Table 1 Localization error comparisons under different
ranging errors
TLP LMS
Ranging
error/%
Average
error/%
Minimum
error/%
Maximum
error/%
Average
error/%
0 0.21 0.01 0.46 0
5 4.98 1.29 9.67 6.57
10 9.66 3.98 17.259 13.08
20 19.67 6.12 26.59 30.71
30 27.92 14.78 39.25 36.76
40 30.34 15.45 41.36 43.96
50 32.69 17.66 41.29 59.37
Fig. 7 depicts the comparison curves of TLP and LMS.
We also notice that when the ranging error is below 10%,
the two curves approach to each other ,but the larger the
ranging error, the bigger positioning error difference of the
two algorithm. This indicates that the TLP is more
accurate when the ranging error increases.

Fig. 7 The positioning error result when ranging error increases.
6 Conclusions
In this paper, a three-dimensional localization algorithm
of wireless sensor networks base on particle swarm
optimization (TLP) is presented to increase the accuracy
nodes positioning. This study focuses on considering the
influence of ranging errors on positioning accuracy, no
detailed calculations is made for energy and other issues.
In the future work, experimental performance evaluations
and comparisons with other existing protocols provide an
open research work for the future.
Acknowledgements
This work was supported by the National Natural Science
Foundation of China (60802030), the Natural Science Foundation of
Shandong Province (ZR2009GQ002, ZR2010FQ014), Shandong
Provincial Foundation for Outstanding Young Scientist
(BS2012DX035).
References
1. Kim E C, Lee S H, Kim C S, et al. Long-range beacons on sea surface based
3D-localization for underwater sensor networks. Communications Letters,
2010, 14(7): 647649
2. Guo X W, Guo Y, Hong F, et al. Perpendicular intersection: locating
wireless sensors with mobile beacon. IEEE Transactions on Vehicular
Technology, 2010, 59(7): 35013509
3. Ou C, Ssu K. Sensor position determination with ying anchors in
three-dimensional wireless sensor networks. IEEE Trans. Mobile
Computing, 2008, 7(9): 10841097
4. Kim E C, Lee S H, Kim C S, et al. Mobile beacon-based 3D-localization
with multidimensional scaling in large sensor networks. IEEE
Communications Letters, 2010, 14(7): 585591
5. Shu J, Zhang R L, Liu L L, et al. Cluster based three-dimensional
localization algorithm for large scale wireless sensor networks. Journal of
Computer, 2009, 7(4): 585592
6. Teymorian A Y, Cheng W, Ma L R, et al. 3D underwater sensor network
localization. IEEE Transactions on Mobile Computing, 2009, 8(12):
16101621
7. Kim E C, Lee S H, Kim C S, et al. Mobile beacon-based 3D-localization
with multidimensional scaling in large sensor networks. Communications
Letters, 2010, 14(7): 647649
8. Ou C H, Su K F. Sensor position determination with flying anchors in three
dimensional wireless sensor networks. IEEE Transactions on Mobile
Computing, 2008, 7(9): 10841097
9. Yadav V, Mishra M K, Singh A K, et al. Localization scheme for three
dimensional wireless sensor networks using GPS enabled mobile sensor
nodes. International Journal of Next-Generation Networks (IJNGN), 2009,
1(1): 6072
10. Kennedy J, Eberhart R. Particle swarm optimization. IEEE IntConf on
Neural Networks. Perth, 1995: 19421948
11. Eberhart R, Kennedy J. A new optimizer using particle swarm theory. 6th
Intymposium on Micro Machine and Human Science. Nagoya, 1995: 3943
12. Raghavendra V K, Ganesh K V. Particle swarm optimization in wireless
sensor networks: a brief survey. IEEE Transactions on Systems, Man, and
Cybernetics, Part C: Applications and Reviews, 2011, 41(2): 262267
13. Shi Y H, Eberhart R. A modified particle swarm optimizer. IEEE Int Conf
on Evolutionary Computation. Anchorage, 1998: 6973
14. He T, Huang C D, Brian M B, et al. Range-free localization schemes for
large scale sensor networks. 9th Annual Int1 MobiCom, 2003: 17
15. Zhou S W, Wang Y L, Guo Q, et al. 2010 14th International Conference on
Computer Supported Cooperative Work in Design, 2010: 448451

You might also like