Sei sulla pagina 1di 6

2015 Third International Conference on Robot, Vision and Signal Processing

Parallel Firefly Algorithm for Localization


Algorithm in Wireless Sensor Network
Van-Oanh Sai*, Chin-Shiuh Shieh*, Trong-The Nguyen*, Yuh-Chung Lin #, Mong-Fong Horng*, and Quang-Duy Le*
*

Department of Electronics Engineering,


National Kaohsiung University of Applied Sciences, Taiwan
#
Department of Information Application and Management, Tajen University, Pingtung, Taiwan
csshieh@kuas.edu.tw, vnthe@hpu.edu.vn
each node with GPS. Alternative solutions must be
employed. To solve the problem, many localization methods
have been developed. Instead of equipping each node with
GPS, most of localization methods utilize only few location
aware nodes which are equipped with GPS. These nodes are
often called anchor nodes. The basic localization technique is
triangulation which uses three anchor nodes. Other sensors
can communicate with the nearby location aware anchors
and estimate distances between them using some localization
algorithm (e.g. RSS, ToA) and then derive their positions
based on the distances.

Abstract Node localization has been a very active


research topic in recent years. Accurate self-localization
capability is highly desirable in wireless sensor network
(WSN). In this paper, a node localization algorithm based on
the received signal strength (RSS) measurements and Parallel
Firefly Algorithm (PFA) in Wireless Sensor Networks (WSN)
is proposed. By fully considering the distance factor, an
improved objective function is defined, so the node localization
problem in WSN could be transformed into a nonlinear
unconstrained optimization problem. Giving the distances
between a sensor and a few of its 1-hop neighbors, the
proposed algorithm can estimate the sensor positions using
Parallel Firefly Algorithm. Simulation results show that the
proposed method can achieve better results than those
obtained from the Particle Swarm Optimization (PSO), the
Genetic Algorithm (GA) and the original methods in accuracy.

In order to increase the accuracy of localization, we


introduce some artificial agents, such as Firefly Algorithm
(FA). Furthermore, the parallelized subpopulation of
artificial agents increases the accuracy and extends the global
search capacity than the original structure. In this paper, the
concept of parallel processing is applied to FA and a
communication strategy for parallel FA is proposed for
localization algorithm in WSNs.

Keywords Parallel firefly algorithm, Swarm intelligent,


Node localization, Wireless sensor networks

I.

INTRODUCTION

The rest of this paper is organized as follows: a brief


review of FA and node localization problem in WSN are
given in Session 2. Our analysis and designs for the
localization algorithm based on parallel FA is presented in
Session 3. Experimental results and the comparison among
GA, PSO, FA and parallel FA are discussed in Session 4.
Finally, the conclusion is summarized in Session 5.

Sensor networks have become an important technology


especially for wildlife and environmental monitoring,
military applications, disaster management [1-5]. In most
sensor network applications, the information gathered by
sensors will be meaningless unless the geographic location of
the sensor nodes from where the information is obtained is
known[6]. For example, a sensor network is deployed to
detect a fire event in a forest. Once a sensor node has
detected that the temperature is higher than a certain
threshold, it sends message to the central authority by
relaying through other nodes in a multi-hop manner. The
message needs to indicate the location of the node that
detected the event [7]. Moreover, the location of the sensors
can be used to design efficient network routing algorithms
[8]. Thus, how to locate sensor nodes as accurate as possible
is an important issue in many applications. The most popular
way to find the location of each sensor node is to equip with
GPS. There are some limitations when equipping each node
with GPS [13]: (1) Power consumption of GPS seriously
reduce the battery life, (2) GPS can only work outdoors but
not indoors, (3) the size of sensor node will be enlarged
because of GPS, (4) the deployment cost of WSN will be
increased by deploying GPS-enabled sensor nodes [9].
Therefore, node localization is not feasible by equipping
978-1-4673-9647-9/15 $31.00 2015 IEEE
978-1-4673-9646-2/15
DOI 10.1109/RVSP.2015.78

II.

RELATED WORK

2.1 Node Localization in WSNs


The objective of WSN localization in a network of total
m sensor nodes is to estimate the coordinates of n target
nodes using information about the location of m-n anchor
nodes [3]. The anchor nodes coordinates are ( ,  ) such as:
 = [ , . . . ,  ],  = [ , ,  ]

(1)

The unknown coordinates of target nodes are ( ,  ),


where  = [ , 
, ,  ] and  = [ , 
, . . . ,  ]. WSN
localization is a two-phase process. The first phase is known
as ranging, nodes estimate their distances from their position
to anchor nodes using the signal propagation time or the
strength of the received signal. In the second phase, position
estimation of the nodes is carried out using the ranging
300

information. The localization error is minimized by using the


optimization algorithm[3, 10].

The detailed processing steps of FA is shown the


flowchart of Figure 1.

In the first phase, each anchor node in the deployment


estimates its distance from its position to each of its
neighboring target nodes. The effect of measurement noise is
simulated as a Gaussian additive white noise. A node
estimates its distance from a anchor as:
 =  + 

(2)

where  is the actual distance. It is given as


 = (  )
+ (  )

(3)

where (, ) is the location of the target node, and


( ,  ) is the location of the  anchor in the neighborhood
of this target node. The measurement noise  has a random

value uniformly distributed in the range [    ,  +


  ]. In second phase, the objective function for the node



localization problem can be framed as:
(, ) =





((  ) + (  ) )

(4)

where  3 is the number of anchor nodes within the


transmission radius of the target nodes.
2.2. Firey Algorithm
From some very interesting natural characteristics of
fireflies, Xin-She Yang has developed a firefly-inspired
algorithm - Firefly Algorithm (FA) in late 2007 and 2008 at
Cambridge University[11]. Firefly Algorithm based on three
characteristics:

Fig. 1.

 Every fireflies are unisex so each firefly will be attracted


by other fireflies without caring about their gender.

III. PARALLEL FA FOR NODE LOCALIZATION


In order to construct the parallel processing, the
population has to be divided into subpopulations to creating
several groups in the parallel structure. Each of the
subpopulations evolves independently in regular iterations.
The information is exchanged between subpopulations when
the communication strategy is triggered. It results to achieve
the benefit of cooperation. The parallelized FA algorithm is
designed based on original FA optimization algorithm. The
fireflies in FA are divided into G subgroups. Each subgroup
evolves by FA optimization independently, i.e. the subgroup
has its own fireflies and near best solution. These better
fireflies in a subgroup will be traveled to other subgroup to
replace the poorer fireflies of that subgroup. After running
every fixed iterations the update procedure for each subgroup
will be performed. Let Gj be the number of fireflies of the
subgroup, where j is the index of the subgroup. While t R
, t is current iteration, and R is the fixed iterations, k
pollens (where the top k fitness in Gj) will be copied to
G(j+1) to replace the same number of pollens with the worst
fitness, where j  0, 1,2,..., G.

 The attractiveness of a firefly depends on its brightness


proportionally, the brighter will attract the less brighter.
The attractiveness will decrease when the distance
between two fireflies increase.
 The brightness of a firefly can simply be determined
through objective function.
With 0 is the attractiveness at  = 0, the decrease of
attractiveness  depended on the distance  also is defined
like in the equation below:
 =   !"

(5)

The movement of a rey is attracted to another more


attractive (brighter) rey $ is determined by:
#

 =  +   !"%& '   * + - /

Flowchart of FA

(6)

In this equation, the second term is due to the attraction.


The third term is randomization with - being the
randomization parameter, and / is a vector of random
numbers drawn from a Gaussian distribution or uniform
distribution at the time 0 . If  = 0, it becomes a simple
random walk. On the other hand, if 1 = 0, it reduces to a
variant of Particle Swarm Optimization.

The detail processing steps of the parallelized FA (pFA)


is as follows:
1. Initialization: Generate fireflies population and divide
them into G subgroups. Each subgroup is initialized by FA
independently. Assign R is the number iterations for
301

is set to 1.0. And Randomness: alpha is set to 0.2. More


detail of setting can be found in [11]. Further setting for GA
and PSO can be found in [3, 12]. The obtained results are the
average of thirty trials experiment of minimize objective
function (localization errors function defined in Eq.(4)). In
the first simulation, the transmission radius is fixed as R = 4
unit. The population size is set to 30 in the second simulation.
The value of objective function for the node localization
using different schemes is listed in Table I and Table II.

executing the communication strategy, Nj is the number


fireflies and 4  is the solutions for the j-th group, i  0,
1,, Nj1; j  0, 1,, G1, where G is the number of
groups, Nj is the subpopulation size and t is the current
iteration and set t = 1.
2. Evaluation: Evaluate the value of objective function
in Eq.(4) (4  ) for fireflies in j-th group.
3. Update: if light intensityof firefly j higher than firefly
i, move firefly toward firefly $ by using the update the
global firefly, Eq.(6).

TABLE I.
A SUMMARY OF RESULTS OF GA, PSO AND FA-BADED
WSN NODE LOCALIZATION WITH THE DIFFERENT OF POPULATION SIZE

4. Communication Strategy: Migrate k best fireflies


among Gtj to (j+1)-th group Gtj+1, mutate Gtj+1 by replacing k
poorer fireflies in that group and update every groups in
each R iterations.

Pop.
size

GA

PSO

FA

pFA

5. Termination: Go from step 2 to step 5 until the


predefined value of the function is achieved or the maximum
number of iterations has been reached. Record the best value
of the function f (4  ) and the best firefly among all the
fireflies 4  .

15

0.0269

0.0142

0.0245

0.0026

20

0.0134

0.0088

0.0064

0.0016

25

0.0082

0.0057

0.0025

0.0016

IV. EXPERIMENTAL RESULTS


In this section, estimation of the sensor node position for
a sparse network based on the parallel FA (pFA) approach is
investigated. The simulation results are presented in the
section. We compared the proposed pFA with the original
FA, PSO, and GA in terms of the solution quality and the
processing time for the object function evaluations. Let X
{x1, x2,..., xn} be n-dimensional real-value vector, the fitness
functions is in Eq.(4). The goal of the optimization is to
minimize this object function.

30

0.0042

0.0029

0.0017

0.0015

35

0.0025

0.0022

0.0017

0.0015

40

0.0021

0.0018

0.0016

0.0015

45

0.0016

0.0015

0.0016

0.0015

All experiments are performed on the same computer. And the obtained
data of this table is result of average of 30 trial runs.

In Table I, the performance for localization in WSNs


using the proposed parallel FA, original FA, GA, and PSO
are compared when the population size is changed. It is
obvious that pFA can obtain a quite accurate solution even in
a small population size. The value obtained from the
objective function for other schemes increase tremendously
when the population size is reduced. However, we notice that
when population is reduced to 15, the value of FA is worse
than PSO. That is because in the velocity updating function
of PSO, each particle used both the position with the highest
fitness and the best solution found by all particles to predict
the next movement. But for FA, the movement of a firefly
follows other more attractive fireflies.

Sensor localization for the whole sensor network is


conducted in the following manner. In the experiment, 50
target sensor nodes and 10 anchor nodes are randomly
deployed in a sensor field which dimension is 10 x 10 square
units. The transmission radius of each anchor node is R = 4
units. The parameter of measurement noise is set to 5 = 2.
At first, assume that each anchor nodes position is known.
An agent then starts to deploy the sensor nodes. After a
sensor node is deployed, the microcontroller of the sensor
node collects the RSSI data from its neighbor nodes in the
communication range that are previously deployed. After
receiving the RSSI information from others, the node begins
to do some computation to estimate its position. Once the
computation ends, the estimated position will be broadcasted
to its neighbors. This helps other nodes to improve their
position estimation. The process continues until the last
localizable sensor node is deployed.
We evaluate all algorithms listed in table I with the same
transmission radius, iterations, measurement noise, and
localization errors function (Eq.4). The detail of parameter
settings are following: The population size N is set from 15
to 45 for FA. For pFA, the population size for each parallel
running process is also set to N. In our simulation, we
assume two parallel processes are running. Therefore, N1 and
N2 are set to N. Max iteration is set to 100. Randomness
reduction delta is set to 0.97. Absorption coefficient gamma
302

Figure 2 shows the dependence of percentage of localized


node on the transmission radius. As shown in Figure 2, the
transmission radius of sensor nodes will affect the rate of
node localization. According to the Eq. (4), the rate of node
localization is depends on the condition M 3 (M is the
number of anchor nodes within the transmission radius of the
target node).
The localization error defined as fitness function in
Eq. (4) of one target node with different iterations is
computed and minimized using GA, PSO, FA and pFA
algorithm in a trial run are shown in Figure 3.

Fig. 2. The percentage of localized node depend on the transmission


radius
TABLE II.
A SUMMARY OF RESULTS OF GA, PSO, FA AND PFABADED WSN NODE LOCALIZATION WITH THE DIFFERENT OF TRANMISSION
RADIUS

Trans.

GA

PSO

FA

pFA

2.5

0.004

0.0011

0.00083

0.00073

0.0041

0.0015

0.00094

0.00089

3.5

0.0041

0.0021

0.0011

0.00093

0.0042

0.0029

0.0017

0.0015

4.5

0.0043

0.0033

0.0021

0.002

0.0048

0.0039

0.0024

0.0023

5.5

0.0055

0.0054

0.0029

0.0025

Radius

Fig. 3. Fitness value vs Iteraction

All experiments are performed on the same computer. And the obtained
data of this table is result of average of 30 trial runs.

Table II shows the result of the second simulation


which population size is set to 30 for examining the effect of
transmission range. As shown in Table II, the pFA
outperforms the other methods.
According to the two simulations, pFA has the best
performance. There are two advantages for pFA. One is the
communication strategy. The proposed communication
strategy provides the information exchange scheme for the
fireflies in different groups. The poorer fireflies in the
subgroups will be replaced with new better fireflies from
neighbor subgroups. The other is each subpopulation of pFA
is parallel running and the size of subpopulation is also set to
the same as the other schemes which means the population
size of pFA is more than others. Therefore, pFA can improve
the accuracy compared with other mentioned schemes. The
processing time will also increase but not so high as shown
in the results.

Fig. 4. Location estimated by GA

303

Fig. 7. Processing time vs Population size

Fig. 5. Location estimated by PSO

Fig. 8.

Fig. 6. Location estimated by pFA

Processing time vs Transmission radius

The actual location of target nodes and anchors deployed


in a sensor field, and the coordinates of the target nodes
estimated by GA, PSO, and pFA in a trial run are shown
respectively in Figure 4, Figure 5 and Figure 6.
The comparison about processing time of four
algorithms (GA, PSO, FA, and pFA) when the population
size and the transmission radius are changing are shown in
Figure 7 and Figure 8 respectively. In other side, the global
optimal values of object function minimization based on all
four algorithms (GA, PSO, FA and pFA) when the
population size and the transmission radius are changing are
also shown in Figure 9, and Figure 10 respectively. Figure
11 presents the distance between the actual position and the
estimated position obtained by GA, PSO and pFA.

Fig. 9. Global optimum value vs Population size

304

method with communicational strategy increases the


accuracy in comparison with the original FA, PSO and GA
methods on finding the best solution.
ACKNOWLEDGMENT
The authors would like to thank Ministry of Science and
Technology for the financial support under the grants of
MOST 103-2622-E-151-017 CC3 and MOST 104-2221-E151-007.

REFERENCES
[1] I. F. Akyildiz, S. Weilian, Y. Sankarasubramaniam, and E. Cayirci, "A
survey on sensor networks," Communications Magazine, IEEE, vol.
40, pp. 102-114, 2002.
[2] Thi-Kien Dao, Tien-Szu Pan, Trong-The Nguyen, and S.-C. Chu, "A
Compact Articial Bee Colony Optimization for Topology Control
Scheme in Wireless Sensor Networks," Journal of Information
Hiding and Multimedia Signal Processing, vol. 6, pp. 297-310,
March 2015.
[3] A. Gopakumar and L. Jacob, "Localization in wireless sensor networks
using particle swarm optimization," 2008.
[4] T.-T. Nguyen, C.-S. Shieh, M.-F. Horng, T.-G. Ngo, and T.-K. Dao,
"Unequal Clustering Formation Based on Bat Algorithm for
Wireless Sensor Networks," in Knowledge and Systems Engineering.
vol. 326, V.-H. Nguyen, A.-C. Le, and V.-N. Huynh, Eds., ed:
Springer International Publishing, 2015, pp. 667-678.
[5] Tien-Szu Pan, Thi-Kien Dao, Trong-The Nguyen, and S.-C. Chu,
"Optimal Base Station Locations in Heterogeneous Wireless Sensor
Network Based on Hybrid Particle Swarm Optimization with Bat
Algorithm," Journal of Computers vol. 25, pp. 14-25, 2015.
[6] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and T. Abdelzaher,
"Range-free localization schemes for large scale sensor networks," in
Proceedings of the 9th annual international conference on Mobile
computing and networking, 2003, pp. 81-95.
[7] K. Langendoen and N. Reijers, "Distributed localization in wireless
sensor networks: a quantitative comparison," Computer Networks,
vol. 43, pp. 499-518, 2003.
[8] J. N. Al-Karaki and A. E. Kamal, "Routing techniques in wireless
sensor networks: a survey," Wireless Communications, IEEE, vol.
11, pp. 6-28, 2004.
[9] G. Mao, B. Fidan, and B. D. Anderson, "Wireless sensor network
localization techniques," Computer networks, vol. 51, pp. 25292553, 2007.
[10] V. Tam, K.-Y. Cheng, and K.-S. Lui, "Using micro-genetic algorithms
to improve localization in wireless sensor networks," Journal of
Communications, vol. 1, pp. 1-10, 2006.
[11] X.-S. Yang, "Firefly algorithm, stochastic test functions and design
optimisation," International Journal of Bio-Inspired Computation,
vol. 2, pp. 78-84, 2010.
[12] Z. Qingguo, W. Jinghua, J. Cong, Y. Junmin, M. Changlin, and Z. Wei,
"Genetic Algorithm Based Wireless Sensor Network Localization,"
in Natural Computation, 2008. ICNC '08. Fourth International
Conference on, 2008, pp. 608-613.

Fig. 10. Global optimum value vs Transmission radius

Fig. 11. The distance between actual nodes and estimated nodes

V.

CONCLUSION

This paper, a novel proposed optimization algorithm was


presented, namely Parallel Firefly Algorithm (pFA) for the
localization algorithm in Wireless sensor networks (WSN).
The implementation of parallel optimization algorithms is
important for sharing the computation load over several
processors and achieving the individuals cooperating of
optimization algorithms. In this new proposed algorithm, the
fireflies are split into several independent groups based on
the original structure of the FA. The proposed
communication strategy provides the information exchange
for the fireflies in different groups. For the communication
strategy, the poorer fireflies in the subgroups will be
replaced with new better fireflies from neighbor subgroups
after each fixed iteration. This feature is important for the
parallel processing devices. The experimental results of the
proposed algorithm on a defined objective function of
localization in WSN problem show that the proposed

[13]Haroon Rashid, Ashok Kumar Turuk, "Localization of Wireless Sensor


Networks Using a Single Anchor Node," Wireless Personal
Communications, vol. 72, issue 2, pp. 975-986, Sep. 2013.

305

Potrebbero piacerti anche