Monte Carlo Localization Algorithm Based On Particle Swarm Optimization
Monte Carlo Localization Algorithm Based On Particle Swarm Optimization
Cuiran Li, Jianli Xie, Wei Wu, Haoshan Tian & Yingxin Liang
To cite this article: Cuiran Li, Jianli Xie, Wei Wu, Haoshan Tian & Yingxin Liang (2019) Monte
Carlo localization algorithm based on particle swarm optimization, Automatika, 60:4, 451-461,
DOI: 10.1080/00051144.2019.1639121
REGULAR PAPER
1. Introduction
the neighbouring information of the target nodes to
Wireless sensor network (WSN) is a technology that assist the localization, which brings very complex com-
integrates communication, sensor, micro-electronics putation and large energy consumption. After that, the
and computer, which has broad application prospects RSSI ranging technique is introduced into the MCL, i.e.
in industry, agriculture, military and commercial fields the RSS-MCL algorithm, which adopts the lognormal
[1]. Generally, the WSN node is composed of sensor model of the received signal strength in the target node
module, energy supply module, processor module and prediction and filtering phase. The OTMCL algorithm
wireless communication module [2]. In the monitoring uses the angle information between nodes to build a
area, a large number of WSN nodes are deployed, which more accurate sampling area, which improves the sam-
can realize the data acquisition of the target, and report pling efficiency and has better positioning results.
the related location information of the acquired target In recent years, with the application of WSN in vari-
to the observer. ous fields, some improved algorithms have been put for-
The high mobility of the target nodes in the monitor- ward. In [10], the iterative MCL algorithm is proposed
ing field provides the research background for mobile to solve the problem of large positioning error caused
WSN node localization and has been widely used in by the low density of the anchor nodes. In [11], the least
various industries. The existing positioning algorithms square method is combined with the MCL to get the
include Monte Carlo Localization (MCL) [3], Monte sampling area with high posterior density distribution
Carlo localization Boxed (MCB) [4], Mobile and Static using curve fitting. It achieves the rapid sampling and
sensor network Location (MSL) [5], Received Signal filtering, and the performances of the sampling success
Strength-based MCL (RSS-MCL) [6] and Orientation rate and positioning error are improved greatly. At the
Tracking-based MCL (OTMCL) [7], etc. The MCL same time, the ant colony algorithm is considered in
algorithm has poor positioning accuracy when the [12], and the influence of the anchor node density on
number of the anchor nodes is small. In addition, it positioning error is analysed. In [13], an MCL local-
has too many sampling regions, which leads to a lower ization algorithm based on fuzzy theory is proposed,
sampling rate and the degeneracy of the particle. The which shortens the positioning time and improves the
MCB algorithm puts forward the concept of anchor box positioning accuracy. However, in the environments of
and sampling box. By the concepts, the sampling rate high node mobility and frequently changing network
is greatly improved while the sampling area is reduced. topology, the positioning accuracy and convergence of
But the observation model in the anchor box has a small localization algorithm still need to be improved. In [14],
distribution proportion, which will cause very low suc- a localization method named APMCL (Active Particle
cess rate of sampling [8, 9]. The MSL algorithm uses in MCL) is proposed, which is based on the idea of
active particles. The active particles are not passively the smaller sampling region can be constructed and the
waiting for being filtered in Sequential Monte Carlo higher sampling accuracy is achieved. However, with
process. In contrast, they will actively adapt themselves the increasing number of the anchor nodes, it will lead
to much more valuable pose (with higher fitness value). to a dramatic increase in the complexity of localization
Based on the mutation mechanism and memory pool algorithm. We take three anchor nodes as an example
of IA and the high convergent speed and precision of to analyse the determination of the sampling region in
PSO, APMCL results in an effective, robust and efficient TSMCL-BPSO algorithm.
solution for globally localizing the robot’s pose. Chien Suppose that the anchor nodes (denoted as A, B,
et al. [15] propose a global localization algorithm for and C) are the neighbour nodes of the target node
mobile robots based on MCL, which employs multi- (denoted as Q). The feedback timing of nodes A, B, and
objective particle swarm optimization (MOPSO) incor- C are assumed to be as QBC, AQC and QAB. Figure 1
porating a novel archiving strategy, to deal with the shows the sampling region of the target node deter-
premature convergence problem in global localization mined by different number of the anchor nodes. In
in highly symmetrical environments. These two algo- Figure 1(a), node Q is in the circle with node A as the
rithms did not consider the high mobility of the sensor centre and the distance between the nodes A and B as
node. the radius. In Figure 1(b), the sampling region of node
To address the challenges of low sampling effi- Q, predicted by nodes A and B, is the shadow region.
ciency and particle impoverishment, a Time Sequence And, in Figure 1(c), with the feedback timing of the
MCL algorithm Based on Particle Swarm Optimization three anchor nodes, the initial sampling region of the
(TSMCL-BPSO) is presented in this paper. On the basis target node in TSMCL-BPSO algorithm is determined,
of previous work [16], the different sampling regions i.e. the shadow region.
are obtained by analysing the relative position between According to the topology relation between the
the target node and the anchor nodes. In the sampling target node and three anchor nodes, there are eight
region, particle swarm optimization (PSO) strategy is possible sampling regions, illustrated in Figures 1(c)
adopted to search the optimum position of the tar- and 2(a–g).
get node. The velocity of particle swarm is updated by
adaptive step size and the particle impoverishment is
improved by distributed estimation and particle repli- 2.2. MCL sampling region
cation. We have evaluated our proposed algorithm in The final sampling region of TSMCL-BPSO algorithm
high mobility environment. Simulation results demon- is formed by overlapping the initial sampling region
strate that it achieves much lower positioning error with MCL sampling region. In the MCL algorithm, each
and higher convergence level, as compared to existing particle is given a certain weight, and the particle set is
algorithms. used to represent the posterior distribution of the pos-
The paper is organized as follows. In Section 2, sible location of the target node at the next moment.
we discuss the determination of sampling region in Its emphasis is not on the measuring relative distance
TSMCL-BPSO algorithm. In Section 3, an improved between the target node and the anchor nodes, but
PSO strategy is presented and the node localization pro- reducing the possible region of the target node [17, 18].
cedure is offered. We evaluated our proposed algorithm The MCL algorithm includes node initialization, pre-
in Section 4. Section 5 concludes the paper and outlines diction and filtering. The sampling region of the target
the future work. node is determined in the prediction phase.
Initialization: Assume that time is split into equal
2. Sampling region of TSMCL-BPSO algorithm length segments, and t = {1, 2, 3, . . .} is represented as
discrete time. At first, there is no any information about
2.1. Initial sampling region the location of the target node, and N sample points are
The WSN anchor node sends out scanning signals peri- selected randomly in the given region to construct the
odically, and the period of the scanning wave is sample set L0 = {l00 , l01 , . . . , l0N−1 }.
Prediction: Let Vmax be the maximum moving speed
T = 2r/Vmax , (1) of the target node, and d(lt |lt−1 ) is the Euclidean dis-
tance of the target node at moments T and T−1.
where r is the communication radius of anchor node, If the moving speed of the target node is uniformly
and Vmax is the maximum moving speed of the target distributed, the probability density function (PDF) of
node. The node receiving the scanning wave feedback the node location also obeys uniformly distributed,
immediately and the anchor node sorts the neighbour expressed by [19]
nodes according to the time when the feedback signal
is received. Theoretically, if the number of neighbour
anchor nodes of the target node is more, the feed-
2
1/π Vmax if d(lt |lt−1 ) < Vmax ,
p(lt |lt−1 ) = (2)
back information will be more comprehensive. Thus, 0 if d(lt |lt−1 ) ≥ Vmax .
AUTOMATIKA 453
position of ith particle, and vid = (vi1 , vi2 , . . . , vid ) indi- particle impoverishment, increase population diversity,
cate the velocity of the ith particle. The individual opti- and achieve population evolution.
mum position of ith particle is pid = (pi1 , pi2 , . . . , pid ), Firstly, the initial step size in particle optimization is
and the global optimum position of particle swarm is set up, which is usually given according to the empirical
pgd = (pg1 , pg2 , . . . , pgd ). Then the evolution equations value. The moving step of particle is adjusted adap-
of the ith particle’s speed and position are [22] tively according to the initial step size and the number
of iterations, which is written as
k+1 k
vid = wvid + c1 r1 pkid − xid k
+ c2 r2 pkgd − xid k
, k
vid 0
= vid · e((itermax −k)/itermax ) , (17)
(15)
k+1 k k
where itermax is the maximum number of iterations.
xid = xid + vid , (16) Substituted Equation (17) into Equations (15) and (16),
k is the speed of ith
where w is inertia weighting factor, vid and the updated particle velocity and position are
particle after k iterations, c1 and c2 are cognitive learn- expressed, respectively, by
ing factors and social learning factors, respectively, r1 k+1
vid = wvid0
· e((itermax −k)/itermax ) + c1 r1 pkid − xid
k
and r2 are independent random numbers, pkid and pkgd
are the individual optimum and global optimum for k + c2 r2 pkgd − xid k
, (18)
iterations, and xidk is the position of ith particle after k
iterations.
k+1
xid k
= xid 0
+ vid · e((itermax −k)/itermax ) . (19)
Particle replication is designed to increase particle
3.2. Improved PSO strategy diversity while avoiding the introduction of particles
with poor fitness into the next generation. The dis-
The PSO strategy has the advantage of less parameter
tributed estimation is a random searching method
setting, but the particle is prone to blind phenomenon
based on the probability distribution of variables [25],
in global optimization, easily resulting in premature
which can realize the individual evolution. By sam-
convergence and falling into the local optimum. In
pling and spatial distribution of excellent individuals, a
order to solve the problem, in the initial searching stage,
probabilistic distribution model is constructed to form
particle swarm search in sampling region at a higher
the next generation of individuals. Assuming that the
moving speed (step size), so as to speed up searching
optimization variables are independent and obey the
process. As the number of iterations increases, parti-
Gauss distribution, particle replication is performed by
cle swarm will gradually approach the global optimum,
the following Equations (20) and (21), to obtain the
at which time the step size is reduced to enhance the
dominant population:
local searching ability of individual particle. On the
other hand, PSO strategy has the disadvantage of weight xμ,σ = rnorm · σ + μ, (20)
degradation, and which can be solved by the resam-
rnorm = −2 ln r1 · sin (2πr2 ) , (21)
pling method [23]. However, resampling only copies
the samples with higher weight, which can lead to par- where r1 and r2 are the random numbers of [0, 1], and
ticle impoverishment [24]. Therefore, distributed esti- σ and μ are the mean value and standard deviation of
mation and particle replication are taken to improve particles.
456 C. LI ET AL.
Let dj represent the distance between the real coor- nodes and target nodes in the monitoring area is gen-
dinate of the target node and jth anchor node. The erated randomly, and the movement of target nodes
coordinate of ith particle is (xid , yid ), and the coordinate is also random. Therefore, the sampling region in
of the anchor node is (xj , yj ), j = 1, 2, . . . , S. Theoreti- TSMCL-BPSO algorithm is different in each simula-
cally, the closer anchor node is to the actual location of tion. Assume that the final sampling region R of the
the target node, the more influence it will have on posi- target node is a rectangle with a side length of 10 m.
tioning accuracy of the target node. The inertia weight In region R, 30 particles are randomly thrown, and
factor is defined as the PSO and TSMCL-BPSO algorithms are executed
to search the global optimum location of target nodes,
S
wj = dj dj j = 1, 2, . . . S . (22) respectively. From Figures 5 and 6, we can see that com-
j=1 pared with the PSO algorithm, the particle in TSMCL-
BPSO algorithm can search the global optimum posi-
In our algorithm, the particle with minimum fitness tion of target node in a relatively short time.
function is the optimum particle. Then, the fitness
function of the particle is defined as
1
S
3.3. Target node localization
(1/wj ) · xid − xj − dj .
2 2
fid = + yid − yj
S j=1 In the proposed TSMCL-BPSO algorithm, the node
(23) localization procedure is shown in Figure 7.
The global optimization ability comparison between
TSMCL-BPSO and PSO strategy is shown in Figures 5 Step1: The anchor node sends out scanning signals to
and 6. In simulations, the initial position of anchor the neighbours periodically.
AUTOMATIKA 457
Step2: Determine whether the target node meets the of iterations reaches the maximum number.) If
positioning condition. (Does the target node the condition is satisfied, turn to Step14, other-
receive at least 3 anchor node information?) If wise continue with Step10.
the condition is satisfied, turn to Step3, other- Step10: Update the coordinate of the particle by Equa-
wise return to Step1. tions (18) and (19).
Step3: According to the feedback signal received by Step11: Particle replication and new population form-
the anchor nodes, determine the initial sam- ing by Equations (20) and (21).
pling region of the target node, denoted as R1 . Step12: Calculate the fitness function of the particle in
Step4: Let the MCL sampling region, R2 , overlap with a new population.
R1 to find the final sampling region of the target Step13: If the current fitness function of the particle
node, R. is less than the fitness function it has experi-
Step5: Exact sufficient samples (particles) in region R. enced, then the historical optimum position is
Step6: Initialize the parameters in TSMCL-BPSO replaced by the current position. Then, return
algorithm, including the population size, initial to Step9.
position, initial velocity and fixed step size of Step14: Give the coordinates of optimum particle and
the particle. terminate the localization procedure of the tar-
Step7: Calculate the fitness function of particle by get node.
Equation (23).
Step8: According to the fitness function of particle,
search the individual and global optimum posi- 4. Experiment results
tion. Experiments are performed with Intel (R), Core (TM),
Step9: Judge whether particle meets the position- i5-2450MCPU, clocked 2.50 GHz, 4 GB memory plat-
ing termination condition. (The particle fit- forms, and Matlab7.0 simulation environment. In the
ness is within a given range, or the number experiment, the anchor nodes are randomly deployed
458 C. LI ET AL.
Table 1. Clustering evaluate matrix. 4.1. Outlier eliminating and positioning error
Parameters Values
According to the fitness function, the position differ-
Monitoring area 200 m · 200 m ence between the particle and the target node can be
Number of anchor nodes 80
Number of target nodes 20 calculated. The smaller the particle’s fitness is, the closer
Node communication radius 50 m the particle is to the real coordinate of target node.
Node moving speed [0, 70 m/s]
Population size 30 The localization performance is usually evaluated by
Maximum number of iterations 100 positioning error, which is defined as
Number of experiments 50
Population size 30 P
Search dimensions 2 2
Cognitive learning factors 1.2
err = (xi − Xi ) + yi − Yi
2
rP, (24)
Social learning factors 0.5 i=1
Initial step size 50
Number of replication 4 where (xi , yi ) and (Xi , Yi ) are the estimated coordi-
nate and real coordinate of target node, respectively, r
is the communication radius of WSN node, and P is the
in a barrier-free monitoring area. It is assumed that number of experiments.
each anchor node has the capability of measuring and Gross errors may occur in each experiment. For
judging whether other nodes are within its communi- example, external shocks, mechanical shocks, and
cation range. The movement of the target node is based electromagnetic interference, etc., can result in the
on random waypoint model [26], and independent of changing position of the target node. The outliers (the
each other. The simulation parameters and its values are points that reach gross error) greatly affect position-
shown in Table 1 [27–29]. ing accuracy. The error in range of gross error is an
AUTOMATIKA 459
Figure 8. Initial nodes distribution. Figure 9. The value of fitness function in an experiment.
P
ξ̄ = ξi P, (25) Figure 10. Positioning error in TSMCL-BPSO algorithm.
i=1
P
σ =
2 rectangle with a side length of 10 m. In region R, 30 par-
ξi − ξ̄ (P − 1). (26)
i=1 ticles are randomly thrown, and the PSO and TSMCL-
BPSO algorithms are executed to search the global opti-
mum location of the target nodes, respectively, illus-
If the condition |ξi − ξ | > 3σ is satisfied, it shows trated in Figures 9 and 10. It is shown that, compared
that ξ is an outlier and should be eliminated. with the PSO algorithm, the particle in TSMCL-BPSO
The initial distribution of the anchor node and the algorithm can search the global optimum position of
target node in the monitoring area is shown in Figure 8. the target node in a relatively short time.
Figure 9 depicts the variation of particle fitness with
the number of iterations in an experiment. The posi-
tioning error of TSMCL-BPSO algorithm is plotted in 4.3. Comparison of positioning error and
Figure 10. convergence
Assume that the anchor node density represents the
average number of anchor nodes in range of 1 hop of the
4.2. Comparison of global optimization ability
target node in the monitoring area [30]. The relation-
In simulations, the initial position of the anchor nodes ship between the anchor node density and positioning
and the target nodes in the monitoring area is generated error is shown in Figure 11. It is obvious that with
randomly, and the movement of the target nodes is also the increase of the anchor node density, positioning
random. Therefore, the sampling region in TSMCL- error is reduced. The reason is that the greater anchor
BPSO algorithm is different in each simulation. Assume node density is, the more observations node receives,
that the final sampling region R of the target node is a and the higher positioning accuracy is obtained. Also,
460 C. LI ET AL.
[5] Rudafshani M, Datta S. Localization in wireless sensor [20] Kennedy J, Eberhart R. Particle swarm optimization.
networks. Proceedings of ACM International Confer- Proceedings of IEEE International Conference on Neu-
ence on Information Processing in Sensor Networks; ral Networks; 2002 Dec; Perth, WA, Australia; 2002. p.
2007 Apr; Cambridge, MA, USA; 2007. p. 51–60. 1942–1948.
[6] Wang WD, Zhu QX. Rss-based Monte Carlo local- [21] Kulkarni RV, Venayagamoorthy GK. Particle swarm
isation for mobile sensor networks. IET Commun. optimization in wireless-sensor networks: a brief sur-
2008;2(5):673–681. vey. IEEE Trans Syst Man Cybern Part C. 2011;41(2):
[7] Martins M, Chen H, Sezaki K, et al. Orientation 262–267.
tracking-based Monte Carlo localization for mobile [22] Cong C. A coverage algorithm for WSN based on the
sensor network. Proceedings of IEEE International improved PSO. Proceedings of IEEE International Con-
Conference on Networked Sensing Systems; 2009 Jun; ference on Intelligent Transportation, Big Data and
Cambridge, MA, USA; 2009. p. 151–158. Smart City; 2015 Dec; Halong Bay, Vietnam; 2015. p.
[8] Rudafshani M, Datta S. Localization in wireless sensor 12–15.
networks. J Chin Comput Syst. 2007;17(5):216–221. [23] Feng L, Li X, Jiang T, et al. A combined prediction
[9] Yi J, Yang S, Cha H. Multi-hop-based Monte Carlo local- method for the life of product based on PSO with
ization for mobile sensor networks. Proceedings of IEEE immunity algorithms. Proceedings of IEEE Reliability
Communications Society Conference on Sensor, Mesh and Maintainability Symposium; 2014 Jan; Colorado
and Ad Hoc Communications and Networks; 2007 Oct; Springs, CO, USA; 2014. p. 1–6.
Cambridge, MA, USA; 2007. p. 162–171. [24] Fu X, Jia Y. An improvement on resampling algorithm of
[10] Dong Q, Yu L, Chen Y, et al. Iterative Monte Carlo local- particle filters. IEEE Trans Signal Process. 2010;58(10):
ization for mobile wireless sensor networks. Chin J Sens 5414–5420.
Actuat. 2010;23(12):1803–1809. [25] Wang SY, Wang L, Fang C, et al. Advances in esti-
[11] Liu Z, Li G, Liu X. Monte-Carlo mobile node localiza- mation of distribution algorithms. Control Decis.
tion algorithms based on least squares method. Chin J 2012;27(7):961–966.
Sens Actuat. 2012;25(4):541–544. [26] Yuan B, Bao Z. Algorithmic research and realization
[12] Wang PD, Qi CL. An improved node localisation of GPS/COMPASS combined relative positioning. Pro-
algorithm. Comput Appl Software. 2012;29(8):242–244. ceedings of China Satellite Navigation Conference; 2012
[13] Li JP, Shi M, Xie Y. A MCL mobile node localisation Apr; PanYu District, Guangzhou City, China; 2012. p.
algorithm based on fuzzy theory. Comput Appl Soft- 447–455.
ware. 2013;30(12):147–150. [27] Liu XL, Li RJ, Yang P. A bacterial foraging global opti-
[14] Min HQ, Chen H, Luo RH. Active particle in MCL: an mization algorithm based on the particle swarm opti-
evolutionary view. Proceedings of International Con- mization. Proceedings of IEEE International Confer-
ference on Information and Automation; 2009 June; ence on Intelligent Computing and Intelligent Systems;
Zhuhai/Macau, China; 2009. 2010 Dec; Xiamen, China; 2010. p. 22–27.
[15] Chien CH, Wang WY, Hsu CC. Multi-objective evo- [28] Mai XF, Li L. An enhanced bacterial foraging opti-
lutionary approach to prevent premature conver- mization with adaptive elimination-dispersal probabil-
gence in Monte Carlo localization. Appl Soft Comput. ity and PSO strategy. Proceedings of IEEE International
2017;50:260–279. Conference on Natural Computation, Fuzzy Systems
[16] Tian H, Li C, Xie Y, et al. Node localization algorithm and Knowledge Discovery; 2016 Aug; Changsha, China;
for WSN based on time sequence Monte Carlo. Chin J 2016. p. 161–166.
Sens Actuat. 2016;29(11):1724–1730. [29] Qu BY, Liu DM, Qiao BH. Research on improved
[17] Li G, Chen JJ. A Monte Carlo localization algorithm particle swarm optimization algorithm. Autom Appl.
based on motion prediction. Meas Control Technol. 2016;2016(11):49–51.
2013;32(9):100–103. [30] Sheu JP, Hu WK, Lin JC. Distributed localization
[18] Zhao ZJ, Peng Z, Zheng SL. Cognitive radio spectrum scheme for mobile sensor networks. IEEE Trans Mob
assignment based on quantum genetic algorithm. Acta Comput. 2010;9(4):516–526.
Phys Sin. 2009;58(2):1358–1363.
[19] Li J, Shi M, Zhong X. Self-adaptive Monte Carlo local-
ization algorithm of mobile nodes in WSN. J Jilin Univ.
2014;44(4):1191–1196.