Particle Swarm Optimization
Particle Swarm Optimization
net/publication/228518470
CITATIONS READS
8 10,605
1 author:
Gonçalo Pereira
INESC-ID / IST / Universidade de Lisboa
21 PUBLICATIONS 287 CITATIONS
SEE PROFILE
All content following this page was uploaded by Gonçalo Pereira on 08 July 2014.
1 What is it?
Particle Swarm Optimization is an algorithm capable of optimizing a non-linear
and multidimensional problem which usually reaches good solutions efficiently
while requiring minimal parameterization.
The algorithm and its concept of “Particle Swarm Optimization”(PSO) were
introduced by James Kennedy and Russel Ebhart in 1995 [4]. However, its
origins go further backwards since the basic principle of optimization by swarm
is inspired in previous attempts at reproducing observed behaviors of animals in
their natural habitat, such as bird flocking or fish schooling, and thus ultimately
its origins are nature itself. These roots in natural processes of swarms lead to
the categorization of the algorithm as one of Swarm Intelligence and Artificial
Life.
The basic concept of the algorithm is to create a swarm of particles which
move in the space around them (the problem space) searching for their goal
or the place which best suits their needs given by a fitness function. A nature
analogy with birds is the following: a bird flock flies in its environment looking
for the best place to rest (the best place can be a combination of characteris-
tics like space for all the flock, food access, water access or any other relevant
characteristic).
Based on this simple concept there are two main ideas behind its optimiza-
tion properties:
• a single particle (which can be seen as a potential solution to the problem)
can determine “how good” its current position is. It benefits not only
from its problem space exploration knowledge but also from the knowledge
obtained and shared by the other particles.
• a stochastic factor in each particle’s velocity makes them move through
unknown problem space regions. This property combined with a good
initial distribution of the swarm enable an extensive exploration of the
1
problem space and gives a very high chance of finding the best solutions
efficiently.
2
it iteration number, the algorithm is iterative;
xi,d position of particle i in dimension d;
vi,d velocity of particle i in dimension d;
C1 acceleration constant for the cognitive component;
Rnd stochastic component of the algorithm, a random value between 0 and 1;
pbi,d the location in dimension d with the best fitness of all the visited locations in
that dimension of particle i;
C2 acceleration constant for the social component;
gbd the location in dimension d with the best fitness among all the visited locations
in that dimension of all the particles.
Regarding velocity update (equation 2) notice that it results from the sum
of different components, each having a specific meaning. On the the first line we
have the momentum component, which is the previous velocity. On the second
line we have the cognitive component, which depends heavily on the particle’s
current distance to the best position it has ever visited. Finally on the third line
we have the social component which depends heavily on the particle’s distance
to the best position where any of the swarm’s particles has ever been.
Since these update functions are recursive in the sense that they need the
previous values of velocity and position it is important to understand how these
values are initialized. Moreover the way these values are initialized can have an
important impact on the algorithm’s performance[3].
Regarding position, all the particles in the Swarm are positioned in the n-
dimensional space by distributing them as desired within the search space, two
common ways to do it are randomly or uniformly position them. The velocity
is usually set to a random value, but lower ones are usually more adequate to
avoid large initial offsets. The social and cognitive component scale values are
also determined at initialization time since they are constant throughout the
optimization process.
In algorithm 2 we present the pseudo-code of the basic PSO algorithm. In
some parts which weren’t fully detailed in the original presentation of PSO we
give a simple solution, but several alternatives exist each having different im-
pacts on the performance of the algorithm[3]. Such parts are the initialization of
the particle´s positions and velocities in algorithm 1, and the stopping condition
of the actual PSO algorithm.
With this algorithm the main parameterization needed regards the accelera-
tion multipliers and the maximum velocity (velocity clamping) that even though
not referenced in the original presentation of the algorithm, when the Local ver-
sion was introduced by the same author he mentions it for both versions as a way
to limit particles flying out of the search space[1]. You might notice that you
also have to specify the bounds of the search space and the maximum number
of iterations for the algorithm to run, but the bounds should be derived directly
from the problem being modeled and the number of iterations can be easily set
for any reasonable value presented in the literature like in the modified PSO[6].
3
Algorithm 1 Initialize
1: for each particle i in S do
2: for each dimension d in D do
3: //intialize all particles’ position and velocity
4: xi,d = Rnd(xmin , xmax )
5: vi,d = Rnd(−vmax /3, vmax /3)
6: end for
7:
8: //intialize particle’s best position
9: pbi = xi
10: //update the global best position
11: if f (pbi ) < f (gb) then
12: gb = pbi
13: end if
14: end for
4
2.2 Local Best
When compared with the original algorithm this variation reduces the sharing
of information between particles to a smaller neighborhood. Instead of each
particle knowing the global best value, the swarm is divided into neighborhoods
where particles only share their best value with their neighbors. Nonetheless it is
important that neighborhoods overlap to enable convergence to the global best.
This difference means that this version of the algorithm is slower to converge on
a solution but it has a better coverage of the search space while also being less
susceptible to local minima[1]. In the context of PSO a better coverage of the
search space represents a higher probability that the best solution will be found,
in this case at the cost of a lower convergence speed and therefore it might need
more iterations to actually converge on a solution than the original version.
The neighborhoods can be easily created in two ways: statically by particle
index or dynamically by spatial distance (computationally expensive). However,
there are several social network topologies which specify concrete distributions
of particles in neighborhoods with documented effects on the algorithm’s per-
formance [3].
3 Applications
Since its initial development PSO has had an exponential increase in applica-
tions (either in the algorithm’s original form or in an improved or differently
parameterized fashion). A first look into the applications of this algorithm
was presented by one of its creators Eberhart and Shi in 2001[2] focusing on
5
application areas such as: Artificial Neural Networks training (for Parkinson
Diagnostic), Control Strategy determination (for electricity management) and
Ingredient Mix Optimization (for microorganisms strains growth). Later in 2007
a survey by Riccardo Poli[5] reported the exponential growth in applications and
identified around 700 hundred documented works on PSO. He also categorized
the areas of applications in 26 categories being those most researched (with
around or more than 6% of the works reviewed by Poli):
• Antennas - especially in its optimal control and array design. Aside from
there there are many others like failure correction and miniaturization.
• Control - especially in PI (Proportional Integral) and PID (Proportional
Integral Derivative) controllers. These systems control a process based on
its current output and its desired value (the difference between this two is
its current error, P), past errors (I) and a prediction of future errors (D);
• Distribution Networks - especially in design/restructuring and load dis-
patching in electricity networks.
References
[1] R.C. Eberhart and J. Kennedy. A new optimizer using particle swarm theory.
In Proceedings of the sixth international symposium on micro machine and
human science, volume 43. New York, NY, USA: IEEE, 1995.
6
[2] R.C. Eberhart and Y. Shi. Particle swarm optimization: developments, ap-
plications and resources. In Proceedings of the 2001 congress on evolutionary
computation, volume 1, pages 81–86. Piscataway, NJ, USA: IEEE, 2001.
[3] A.P. Engelbrecht. Computational intelligence: An introduction. Wiley, 2007.