You are on page 1of 6

Fourth International Conference on Natural Computation

Genetic Algorithm based Wireless Sensor Network Localization


Qingguo Zhang, Jinghua Wang, Cong Jin, Junmin Ye, Changlin Ma, and Wei Zhang
Department of Computer Science
Huazhong Normal University
Wuhan 430079, China
qgzhang@mail.ccnu.edu.cn

Abstract through other nodes in a multi-hop manner. The


message needs to indicate the location of the node that
In most sensor network applications, the informati- detected the event. Moreover, the location of the
on gathered by sensors will be meaningless without the sensors can be used to design efficient network routing
location of the sensor nodes. Node localization has algorithms [4].Thus, localization of sensor nodes is
been a topic of active research in recent years. Accur- important in many applications. Theoretically, A
ate self-localization capability is highly desirable in localization measurement device such as GPS can be
wireless sensor network. This paper proposes a genetic used for a sensor to locate itself. However, it is not
algorithm based localization(GAL). The proposed gen- practical to use GPS in every sensor node because a
etic algorithm adopts two new genetic operators: sensor network consists of thousands of nodes and
single-vertex-neighborhood mutation and the descend- GPS will be very costly. On the other hand, GPS does
based arithmetic crossover. Four example problems not work at all in indoor environments (due to the lack
are used to evaluate the performance of the proposed of line-of-sight to the satellites), so alternative
algorithm. Simulation results show that our algorithm solutions must be employed. To solve the problem,
can achieve higher accurate position estimation than many localization methods have been developed.
semi-definite programming with gradient search Instead of requiring every node to have GPS installed,
localization (SDPL) [11] and simulated annealing all localization methods assume only a few nodes(≥3)
based localization (SAL)[13]. Compared to the usual are equipped with GPS hardware. These nodes are
crossover operator: simple arithmetic crossover, whole often called anchor nodes and they know their
arithmetic crossover and single-point crossover, the positions. Other normal sensors can communicate with
proposed crossover can obtain a lower mean position a few nearby sensors and estimate distances between
error. them using some localization algorithm (e.g. RSS,
ToA) and then derive their positions based on the
1. Introduction distances.
This paper solves the following wireless sensor
The miniaturization of small devices capable of network localization problem: Given a set of sensors
sensing and communicating with each other has made distributed in the plane, and a mechanism by which a
the possibility of deploying large-scale wireless sensor sensor can estimate its distance to a few 1-hop
networks with hundreds and even thousands of wirele- neighbors, determine the coordinates of every sensor.
ssly connected sensor and actuator nodes a reality [1]. We propose a genetic algorithm based localization
Sensor networks have become an important technology algorithm (GAL), and it is implemented in a
especially for wildlife and environmental monitoring, centralized architecture, where all nodes send their
military applications, disaster management, etc [2] [3]. measurements to a central station for localization. It is
In most sensor network applications, the information generally true that a distributed architecture will
gathered by sensors will be meaningless unless the improve scalability and reduce complexity of the
geographic location of the sensor nodes from where the algorithm. However, There exists a central system in
information is obtained is known. Consider the some applications such as patients monitoring and
example where a sensor network is used to detect a fire disabled patients assisting in the health sector, bush
event in a forest. Once a sensor node has detected that fire and water quality monitoring in the environment,
the temperature is higher than a certain threshold, it humidity and temperature monitoring in the precision
sends a message to the central authority by relaying agriculture. The central system gathers information
Supported by the National High Technology Research and
Development Program of China (863 Program)
(No. 2007AA01Z185) and the Natural Science Foundation
of Hubei Province(No.2007ABA119 and 2007ABA034)

978-0-7695-3304-9/08 $25.00 © 2008 IEEE 608


DOI 10.1109/ICNC.2008.206
from all nodes hop-by-hop and makes decisions in the interior of the network, the position estimation of
accordingly. In such applications with a centralized outer nodes can easily collapse toward the center,
architecture, it may be more convenient to implement a which leads to large estimation errors. Biswas [10]
centralized localization algorithm. The feasibility of extended the technique of Doherty’s work by taking
nodes sending their information to a central station has the non-convex inequality constraints and relaxed the
been demonstrated in [5]. problem to a semi-definite program. Tzu-Chen Liang
The rest of this paper is organized as follows: improved Biswas's method further by a gradient search
section 2 summarizes related work; section 3 describes technique [11]. Shang et al. [15] demonstrate the use of
our proposed GAL approach; and section 4 gives a data analysis technique called "multidimensional
simulation results. We conclude this paper in section 5, scaling" (MDS) in estimating positions of unknown
together with future work. nodes. The algorithm localized an individual patch by
first computing all pairwise shortest paths between
2. Related work sensors in the patch. MDS is then applied to these
distances to yield an initial layout. The patches are
Node localization has been a topic of active research “stitched” together incrementally in a greedy order by
in recent years. Accurate self-localization capability is finding the best transformation between a new patch
highly desirable in wireless sensor network. Many and the global layout. Finally, an absolute map is
researchers have approached the localization problem obtained by using the known node positions. This
from different perspectives. A detailed survey of the technique works well with few anchors and reasonably
area is provided by Hightower and Borriello[16]. Many high connectivity. For instance, for a connectivity level
systems use some kind of range or distance of 12 and 2% anchors, the error is about half of the
information and rely on powerful beacon nodes with radio range. But, unfortunately, like any other
unusual capabilities, such as radio, laser ranging incremental algorithm, it may accumulate error
devices, or directional signals. Recently, various indefinitely, especially when the pairwise distances are
localization schemes have been proposed in the significantly noisy. C. Gotsman and Y. Koren [12]
literature. Niculescu and Nath [6] proposed APS posit- proposed a distributed positioning algorithm for
ioning algorithm to extend the capabilities of GPS to wireless sensor network based on short-range inter-
non-GPS enabled nodes in an ad hoc network. It is sensor distances. The algorithm involves two stages.
simple and efficient. First, the anchors flood their At the first stage the algorithm computed a Laplacian
location to all nodes in the network. Then, each eigenvector which typically spreads the sensors well
unknown node performs a triangulation to three or and obtained a fold-free layout. At the second stage it
more anchors to estimate its position. The method uses the result of the first stage as an initial layout for
works well in dense and uniform topologies but poorly an iterative stress-minimization algorithm, which is
for sparse and irregular networks. The “DV-distance” based on a majorization technique. Anushiya A
method uses distance between neighboring nodes to Kannan [13] adopted simulated annealing algorithm
reduce the location errors, but still works poorly on (SAA) to locate the positions of sensor nodes in
irregular networks. Savarese [7] improved Niculescu's wireless sensor work. The proposed scheme can give
algorithm by introducing a refinement phase. In the accurate and consistent location estimates of the nodes.
refinement phase, distance measurements between However, the SAA is likely to be trapped by local
neighbors are used to improve localization accuracy. optima and thus obtains very poor results.
The refinement improves accuracy significantly, but Since the localization estimation problem is an
reduces coverage since it only works for well- unconstrained optimization problem (UOP) [14], it is
connected nodes. To prevent error accumulation, natural to use genetic algorithms to solve it. In this
Savvides [8] used least squares estimation with paper, we propose a genetic algorithm based
Kalman filter to simultaneously locate the positions of localization (GAL) algorithm. The algorithm has the
sensor nodes. The method needs more anchors to work following four advantages:
well than other methods. Doherty [9] approached the (1)The position accuracy of our algorithm is high.
problem using convex optimization based on semi- (2)The method can work well not only in dense and
definite programming. The connectivity of the network uniform topologies but also in sparse and irregular
is represented as a set of convex localization constrain- networks.
ts for the optimization problem. For the method to (3)Our algorithm relies on no explicit communicat-
work well, it needs anchor nodes to be placed on the ion other than that between immediate neighbors,
outer boundary, preferably at the corners, to make the which can avoids excessive communication, and also
constraints tight enough. When all anchors are located

609
the proposed algorithm does not propagate error in original location. Suppose that vertex vi(xi,yi) is chosen
localization. for mutation, then the new coordinates ( x i′ , y i′ ) of vi
(4)It is robust even when the measured distance are defined as follows:
between the neighboring nodes is degraded with ⎧ xi′ = xi + r cos θ
Gaussian noise. ⎨ (2)
⎩ y i′ = y i + r sin θ
3. Genetic Algorithm Based Localization where radius r=ideal_distance*(1-t/T); ideal_distance=
In this section, we will present a wireless sensor s / n is the desired distance between 1-hop
network localization algorithm based on GA. We neighbors, s=(b-a)2 is the area of the square region in
assume that after the network is deployed, each node the plane, n is number of sensor nodes, t is the current
measures distances to its nearby neighbors within its generation number, T is the maximum number of
own ranging distance. After this, all of the successful generations; θ ∈ [0, 2 π ] is an angle randomly
distance measurements along with the node ID are produced; As can be seen, the radius r is decreasing as
transferred to a base station using multihop routing. the algorithm proceeds.
After all of the distance measurements are received at The descend-based arithmetic crossover operator-
the base station, a graph is constructed. Let us define a basically, the whole population of chromosomes
graph G = (V(G), E(G)), where V(G) is the set of all ranked in descending order according to their objective
nodes in the sensor network and E(G) is the set of all values. The crossover operator looks for any
links between one-hop neighbors. If a connected opportunistic improvement between any pair of
component of G, G1=(V1, E1) doesn’t have three or chromosomes sequentially extracted from the sorted
more anchors, then all the sensor nodes in the subgraph list of chromosomes. In this regard, we usually set the
G1 are not localizable. In the rest of this paper, we population size to be even. Otherwise, the last pair can
assume that each connected component of graph G simply be formed from the last and first chromosomes
have at least three anchors. of the sorted list. For each pair (i, i + 1) of
Consider a sensor network with m anchor nodes chromosomes, the crossover operator will proceed to
whose locations are known and n-m unknown sensor perform an arithmetic crossover. C i
gen gen
and C i +1 may
nodes whose locations are unknown, Suppose that
gen +1 gen +1
(xi,yi),i=m+1,…,n represent the estimated coordinates produce two offspring, C i and C i +1 , which is a
of node i in the plane, n is the number of sensor nodes, linear combination of their parents i.e.,
d ij = ( xi − x j ) 2 + ( y i − y j ) 2 is the Euclidean C igen +1 = aC igen + (1 − a)C igen
+1 (3)
distance between node i and node j in a candidate C gen +1
= aC gen
+ (1 − a)C gen
i +1 i +1 i
solution, lij is the measured distance of node i and its 1-
hop neighbor j, and Ni represent the set of all 1-hop Where a is a random number in range of [0,1].
neighbors of node i. In our simulated experiments, all In order to avoid premature convergence, we
the sensor nodes are placed in a square region, so we perform a sigma proportional transformation on each
add the following constraints: individual’s fitness value [17], i.e., for the fitness value
f(i) of the i-th individual, at first we apply the
a≤xi, yi≤b
following formula to f(i) to transform it into ExpVal(i):
The localization problem can be formulated as:
n ExpVal (i ) = ⎧⎨1 + ( f (i) − f (t )) / 2σ (t ) , if σ (t ) > 0. (4)
Min ∑ ∑ (d
( xi , yi ) i = m +1 j∈N i
ij − lij ) 2 (1)
⎩1,
Where f(t) is the average fitness value of the t-th
if σ (t )=0.

m<i ≤ n
generation population, and σ (t ) is the standard
The objective function shown in (1) represents the deviation of the t-th generation population. After such
quantitative measure of the "goodness" of the transformation, the algorithm then uses elitist fitness
coordinate estimate. Our aim is to optimize the fitness proportionate selection mechanism for ExpVal(i) to
function using genetic algorithm to get the optimal
select chromosomes for reproduction. The best
location estimate.
individual in the population is always passed on
The two genetic operators adopted in our genetic
unchanged to the next generation, without undergoing
algorithm are described as below:
crossover or mutation.
The single-vertex-neighborhood mutation operator-
The termination condition of our GA is just a check
choose a random vertex and move it to a random point
whether the algorithm has run for a fixed number of
in the circle of decreasing radius around the vertex’s
generations.

610
In our simulations, we notice that the position
4. Experimental results estimation errors are changed when the anchors are
placed at different positions. For good performance, we
We have implemented our algorithm in Borland recommend to have at least one anchor node placed on
Delphi 6.0. The algorithm was simulated on a PC with each wing of the C-shaped topology and one anchor
Celeron 1.7 GHz processor, 384MB RAM. The node placed near the corner of the grid topology.
experimental parameters values are shown as table 1. In the four topologies, we vary the average
Table 1. The parameters value of experiment connectivity levels (i.e., average number of one-hop
Parameters Parameters value
neighbors per node) and the number of anchors in the
area. The average connectivity levels are controlled by
Population size 20 specifying the transmission range R. A relationship of
Generation count 1000 transmission range vs. connectivity is tabulated in
Crossover probability 0.75 Table 2. The transmission range R is normalized by the
placement unit length r.
Mutation probability 0.85
Table 2. Transmission range vs. the connectivity
We evaluate the performance of the proposed Transmission Range 1.1 1.3 1.5 1.7 1.9 2.0
algorithm by using the same topology as in [15]. Four
different topologies are considered as the sensor (a) 3.6 3.7 6.7 6.8 7.5 8.0
network’s coverage area. Two have uniform topologies Ave (b) 3.3 3.4 6.0 6.1 6.8 7.3
and the other two have irregular topologies. They are Connectivity (c) 8.3 11.1 14.7 18.1 22.3 24.4
shown in Fig. 1: (a) uniform grid, 100 nodes placed (d) 9.3 12.2 15.7 19.2 22.7 24.4
according to a 10r × 10r grid, (b) irregular grid, 79 To model the errors in distance measuring, we add
nodes placed according to a C-shaped grid within a 10r Gaussian noise to the distance between the neighboring
nodes. The measured distance between the neighboring
×10r square. (c) uniform random, 200 nodes randomly nodes, which is used in the fitness function, is
degraded by introducing a Gaussian noise into the true
distance as shown in (5).
l ij = lijt (1.0 + Gaussian Noise ()* Noise Factor) (5)
Where l ijt and l ij are the true distance and the
measured distance respectively between the two nodes
i and j. In our simulations noise factor is taken as 10%.
The Gaussian noise has a mean of 0 and a standard
(a) (b) deviation of 1.
We measure the performance of the algorithm
with mean location error in (6). It is reported in
percentage, normalized by the transmission range.
n

∑ (( x t
i − xi ) 2 + ( y it − y i ) 2 )
(6)
mean location error= i = m +1 2
( n − m) R
Where ( xi , y i ) is the estimated location of sensor
t t
(c) (d) node and ( x i , y i ) is the true location of sensor node.
Figure 1. Four example problems R is the transmission range. A low error means good
performance of the evaluated method.
placed inside a 10r × 10r square, where r=1 is the Fig.2 shows the results of our algorithm on the four
placement unit length, and (d) irregular random, 160 example problems with 10% anchor nodes and
nodes randomly placed inside an C-shaped area within transmission range of 1.8. The green rectangles
a 10r × 10r square. In the figures, circles represent represent the anchor nodes. The circles represent the
estimated locations of the nodes and the solid lines
sensor nodes and edges represent connections between
represent the errors of the estimated positions from the
nodes that are within communication range of each
true positions. The longer the line, the larger the error
other.

611
is. The mean square error of the four problems is 1%, based arithmetic crossover (DBAC) operator against
1%,2% and 2%, respectively. that of the simple arithmetic crossover (SAC) operator,
whole arithmetic crossover (WAC) operator and
single-point crossover (SPC) operator on the four
example problems. For each crossover operator, we run
the genetic algorithm 50 times on each of the four
example problems with 10% anchor nodes and
transmission range of 1.8. The average location error is
shown in table 3. Obviously, our proposed crossover
operator can achieve a lower mean position error than
the other three crossover operators.
(a) (b) Table 3. Comparison of the various crossover
operators
Topology DBAC SAC WAC SPC
uniform grid 1% 9% 5% 25%
irregular grid 1% 9% 5% 26%
uniform random 2% 12% 7% 30%
irregular random 2% 13% 8% 35%

(c)
5. Conclusion and future work
(d)
Figure 2. Results of our algorithm on the four In this paper we presented a genetic algorithm
example problems with 10% Anchor & based localization algorithm. It is implemented in a
Transmission range of 1.8 centralized architecture. The proposed genetic
We compare our proposed GAL algorithm with algorithm adopts two new genetic operators: single-
semi-definite programming with gradient search vertex-neighborhood mutation and the descend-based
localization (SDPL) [11] and simulated annealing arithmetic crossover. Four example problems are used
based localization (SAL)[13]. The results are shown in to evaluate the performance of the proposed algorithm.
Fig.3. It shows the position estimation errors as a func- Simulation results show that our algorithm can achieve
tion of the transmission range by the three methods on higher accurate position estimation than semi-definite
programming with gradient search localization (SDPL)
[11] and simulated annealing based localization (SAL)
[13]. Compared to the usual crossover operator: simple
arithmetic crossover, whole arithmetic crossover and
single-point crossover, the proposed crossover can
obtain a lower mean position error. It was also shown
that the proposed algorithm does not propagate error in
localization. Further work is to investigate implement-
ation of the proposed algorithm in a distributed
architecture.

References
[1] D. Ganesan, B. Krishnamachari, A. Woo, D. Culler, D.
Figure 3. Location error of uniform random networks Estrin, and S. Wicker, “An Empirical Study of Epidemic
uniform random networks(i.e., Fig.1c) with 5% and Algorithms in Large Scale Multihop Wireless Networks,”
10% random anchor nodes. For each point in Fig.3, 30 Technical Report ucla/csd-tr-02-0013, Computer Science
simulations are performed and the average error is sho- Dept., Univ. of California, Los Angeles, 2002.
[2] D. Estrin, D. Culler, K. Pister, and G. Sukhatme.
wn. As shown in Fig.3, the proposed GAL algorithm
Connecting the physical world with pervasive networks. In
performs much better than SDPL and SAL. IEEE Pervasive Computing, pages 59 – 69, 2002.
Because the performance of genetic algorithms
depends on the choice of crossover and mutation
operators, we compare the performance of the descend-

612
[3] G. J. Pottie and W. J. Kaiser. Wireless integrated network ocessing in Sensor Networks, 2004. IPSN 2004, pp. 46 - 54
sensors. In Communications of the ACM, volume 43, pages [11] T. C. Liang, T. C. Wang, and Y. Ye, "A gradient search
51 – 58, 2000. method to round the semidefinite programming relaxation
[4] M. Mauve, J. Widmer, and H. Hartenstein. A Survey on solution for ad hoc wireless sensor network localisation,"
Position-Based Routing in Mobile Ad-Hoc Networks. pages Sanford University, formal report 5, 2004. [Online]. Availab-
30–39, November 2001. le: http: //www.stanford.edu/-yyye/ formal-report5.pdf
[5] J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. Culler, and [12] C. Gotsman and Y. Koren. Distributed Graph Layout for
K. Pister, "System architecture directions for networked Sensor Networks. Journal of graph algorithms and
sensors," Operatin Systems Review 2000, vol. 34, pp. 93- applications, Volume 9 (2005), no. 3, 327--346.
104. [13] A. A. Kannan, G. Mao, and B. Vucetic, “Simulated
[6] D. Niculescu and B. Nath, "Ad hoc positioning system annealing based localization in wireless sensor network,” in
(aps)," in IEEE GLOBECOM 2001, vol. 5, pp. 2926-2931. The 30th IEEE Conference on Local Computer Networks,
[7] C. Savarese and J. Rabaey, "Robust positioning 2005, pp. 513–514.
algorithms for distributed ad-hoc wireless sensor networks," [14] Nonlinear Programming (2nd Edition). Athena
in Proceedings of the General Track: 2002 USENIXAnnual Scientific, 1999.
Technical Conference,pp. 317-327. [15] Y. Shang, W. Ruml, and Y. Zhang “Improved MDS-
[8] A. Savvides, H. Park, and M. B. Srivastava, "The bits and Based Localization,” in Proc. IEEE Infocom, Hong Kong,
flops of the n-hop multilateration primitive for node China, pp. 2640-2651, March 2004.
localization problems," in International Workshopon Sensor [16] J. Hightower and G. Boriello, “Location Systems for
Networks Application 2002, pp. 112-121. Ubiquitous Computing,” Computer, vol. 34, no. 8, pp. 57-66,
[9] L. Doherty, K. pister, and L. El Ghaoui, "Convex position Aug. 2001.
estimation in wireless sensor networks," in IEEE INFOCOM [17] Tanese, R.: Distributed Genetic Algorithms for Function
2001, vol. 3, pp. 1655-1663. Optimization. Unpublished doctoral dissertation, University
[10] P. Biswas and y. Ye, "Semidefinite programming for ad of Michigan, Ann Arbor, MI.(1989)
hoc wireless sensor network localization," in Information Pr-

613

You might also like