0% found this document useful (0 votes)
76 views6 pages

Particle Swarm Optimization For Fuzzy Membership Functions Optimization

This document discusses using Particle Swarm Optimization (PSO) algorithms to automatically adjust fuzzy membership functions. PSO is an optimization technique inspired by animal swarm behavior that can find optimal solutions through simulation. The paper presents using PSO to optimize the membership functions of a fuzzy logic system that controls a vehicle parking in a garage by adjusting the membership functions without user input. PSO works by simulating particles that represent potential solutions and updating their positions and velocities based on their own experience and the swarm's experience to reinforce searching high-quality solutions. The paper shows how PSO was integrated with the fuzzy control system to automatically tune the membership functions for optimal vehicle parking behavior.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views6 pages

Particle Swarm Optimization For Fuzzy Membership Functions Optimization

This document discusses using Particle Swarm Optimization (PSO) algorithms to automatically adjust fuzzy membership functions. PSO is an optimization technique inspired by animal swarm behavior that can find optimal solutions through simulation. The paper presents using PSO to optimize the membership functions of a fuzzy logic system that controls a vehicle parking in a garage by adjusting the membership functions without user input. PSO works by simulating particles that represent potential solutions and updating their positions and velocities based on their own experience and the swarm's experience to reinforce searching high-quality solutions. The paper shows how PSO was integrated with the fuzzy control system to automatically tune the membership functions for optimal vehicle parking behavior.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Particle Swarm Optimization For Fuzzy Membership Functions Optimization

A.A.A. Esmin, A.R. Aoki, and G. Lambert-Torres


Federal University at ltajuba
Department o f Electrical Engineering
AV. BPS, 1303, Itajubq MG, 37500-903, Brazil
{ahmed, aoki, [email protected]

Absmu- The use of Fwzy Logk lo solve contlol problem have This paper presents a strategy for the membership functions
b e n inc-log corniderably In the past y u n The automatic adjustment, using Particle Swarm Optimization
soccarfulnemr of fuzzy application depends om a number o f (PSO) algorithms.
paramten, such U fwzy mcmbenhip funmonr, that are
urnally decided upon rubjedvely. One w a y to improve the Panicle Swam Optimization PSO is one of the artificial life
performance of the huy m s o n h g model i s the use of genetic
algorithm. In lhb paper It Is shorn that s Psltiele Swarm or multiple agents’ ’ype techniques. They use an parallel
OptimizpIion ( S O )aIgorflhm learning mechanbm, sopplementr procure and shuctured strategy, but random aiming to
the p e d o m n c e of fuzzy ruronIng modd The PSO b able to reinforce searching of “high aptitude” points, that is to say,
generate an aplimal set of p ~ m e l fore ~hmy reasoning model points in which the function to be minimized has relative low
based on cither, their idtial subjstive aeledan, or om a random values.
seleclioa. The purpose of lhb paper b lo present and dlrcusr a
smllsy for the mrmbenhip horHons a%!tomatic adjurlment, The studied problem is a Computer Package for F w q Logic
using pso algorithm, and pmrntr m 8ppUcntion designed l o Teaching [I]. The main purpose of the package is to park a
pa.* a vebkle into P g.mge, beginming fmm m y dnrt poritiam.
vehicle into a garage, beginning from any start position. The
I d aT m Padiclr S w a r m Opti&atlo~ Fuzzy Membenhip user should fust to develop a fuzzy control rules set and
FnneHon, Fvey CoahmL membership functions that will route the vehicle path. The
program executes the variables fuzzing and defuzing
1. INTRODUCTION
process, with DO action from user.
Fuzzy systems are being used successfully in an increasing This paper is organized as follows: Section II presents an
number of application areas; these systems can be considered o v d e w about the Particle S w a m Optimization (PSO).
as knowledge-based systems, incorporating human Section III presents the problem to be solved Section IV
knowledge into their Knowledge Base through Fuzzy Rules shows the PSO training mode. Section V shows the tests
and F w q Membership Functions. The definition of these performed with a fuzzy control, which membership functions
Fuzzy Rules and Fuzzy Membership functions is generally were adjusted using PSO algorithms. Finally, Section VI
affected by subjective decisions, having a peat influence presents the conclusions.
over the performance of the system. In most existing
applications, the fuzzy rules are generated by experts in the ON P m r r m SWARM
11. ANOVERVIEW OPTIMIZATION
@SO)
area. especially for control problems with only a few inputs.
With an increasing number of variables, the number of mles Particle Swarm Optimization PSO [4, 51 is one of the
is increasing exponentially, which makes more difficult for artificial life or multiple agents’ type techniques. The method
expms to defme the rule set for good system performance. fmds the optimal solution by simulating such social behavior
of groups as fish schooling or bird flocking. That is, PSO is
This problem can be approached in many ways, like an optimization method that uses a principle of social
clustering algorithms or similar methods for the partition of behavior of a p u p . A group can achieve the objective
the space into many subspaces, and then map up a rule into effectively by using the common infonnation of every agent,
each cluster center, according to the fuzzy variable and the information owned by the agent itself
definition. In many cases, however, further tuning of the
membership functions and selection of suitable fuzzification PSO is basically developed through simulation of bird
and defuzzification methods can improve the system’s flocking in hvodimension space. The position of each agent
performance. @article) is represented by XY-axis position, and the
velocity is expressed by vx and vy (the velocity of X-axis
The fuzzy systems can be formulated as a space search and Y-axis respectively). The agent position is modified by
problem, where each point represents a rule set and the position and velocity information.
mernbmhip functions.
The concept of PSO can be described as follows: Each agent
These characteristics make evolutionary algorithm, such as knows its best value so far @ b a n and its (XY)position.
genetic algorithms (GA’s), better candidates for searching Moreover, each agent know the best value in the p u p
these spaces [2]. @besf) amongpbest. Each agent tries to modify its position
using the current velocity and its position (Eq. 2). The

0 2002 LEEE SMC


MF‘2Q5
velocity of each agent can be calculated using the following
vl
equation: . .. .. . al
l

. .-
vy' = wjvF + c,randX@bestj -):s + cfanW(gbes-sf)
(1)

Where:
vF: Velocity vector ofagent; at iteration k
vy':modified velocity of agent i at next iteration k i l ,
:s: Positioning vector of agent i at iteration k.
rond random number between 0 and 1,
pbest.: best position found by agent i,
gbest: best position found by agent gmup,
c,: weight coefficients for each term,
wj: weight function for velocity ofagent i.
I. - .. .. .. -_1___
.-- .. -,

The current position of an agent i s calculated by the Fig I . Progrm basic piclure
following equation:
Each point means an itcranon (i.e., a whole passage through
sy=SF $1 the N k S set) being the counting registered in the Variables
window. In thts example the fuuy conml has made 256
(2)
iterahons.
An algorithm to find the best positioning vector of PSO using
n agents can be summarized as follows:

I. Initial positioning vector S[n] and velocity vector V[n]


are generated by using random values.
2. Velocity vector v?' of agent i is calculated by Eq. (I).
3. New positioning vector s y 1 of agent i is calculated by
Eq. (2).
4. If F(sjS is better than the F(pbe.stJ, the positioning
vector s? is set to pbesti. If F@bestj) is better than
Fbbesl), the positioning vectmgbest is set topbest,
5. If the iteration number reaches to the predetermined
one, then stop. Otherwise, go to step 2.

111. THEPROBLEM J
Fig. 2. Smulation Example
A. The Original ComputingPockage
The main purpose of the package is to park a vehicle in a IV. PSO TRAINING MODULUS
DESCRIPTION
garage, beginning from any start position. In order to make The integration of PSO algorithms with fuw conbol was
it, the user should first to develop a se of i k z y contTol rules made as follow:
and membership functions, which will define the vehicle
path. Several windows and numeric routines can be found in 1. The subpopulation was defined as a link of the
the program for helping the users in making the rules. membership functions adjustment values.
2. The parameters are the centers and widths of each fuzzy
The variables k i n g and defuzing process is performed by set. These parameters compose the particle (agent).
the program with no action required from the user. 3, To check the performance of the fuzzy system it is
rolled up from an initial set of possible parameters.
To represent the vehicle parking problem the program bas 4. This information is used for set up each sub-population
the basic picture shown in Fig. 1, It shows the garage layout, adjustment (adaptability) and the making of the
the existing obstacles (the walls in this case) and the evolution of the population.
coordinates limit values. Also we can see the problem entry 5. The cycle repetition is made up for completion of the
variables, i.e. (x, y) measured from the vehicle back cenml defined PSO iteration number made by the user. To
point, and the car angle (4). each PSO iteration is found the best values set for the
B. Simulations membership functions parameters.
The user may define a starting position for the vehicle For the PSO training it is possible to define the initial
(Coordinate X, Y and Angle). The simulation begins with a locations, as to evaluate each subpopulation the vehicle will
simulation option. Fig. 2 shows the vehicle course using the start from, representing the membership parameters set of
set of I 4 8 rules for the displacement. values, looking for the contTo01 optimization, not for a sole
route but for all possible initial locations from which the
vehicle can start for parking.
A. PSO Components
For description of each fuzzy coatroller membership function
introduced by the computing package, four parameters are
defined. They are: IE (bellow left), ID (bellow right), SE
(above left) and SD (above right).

Fig. 3 s h o w membership function PE parameters of variable


X For this function IE value is 30, ID is 160, SE is 80 and
SDis110.

For the adjustment of membership functions the following


equations were defined:

IE = (IE + kJ- w. B. PSO Representation of Solutions


ID = (ID + kJ + w,
SE = (SE + kJ The fuzzy control usually is composed by many functions.
SD = (SO + kJ So for this problem it is necessary to use the subpoplation
concept.
Being k, and wi adjustment coefficient. k, makes each
membership function to the fight or left with no The solution for a problem is associated with a population of
change in the form nemembership function or particles composed Subpopulation P. by a vector with m
expands through the factor w,. positions sp = {p,, p2, p ~ ...,
, pJ. where each component pi
represents an agent (particle). Each subpoplation represents
one possible solution.

However, each particle position is composed by the adjust


coefficients ki and wi which are integer values.

With regard to subpopulation size, i.e., how many agents


each subpopulation will have, this will depend on the number
of membership functions defined by user. For a fuzzy control
with a group of 18 membership functions, for example, there
will be a subpopulation with 18 particles, each with 2
positions. This is because for each function we have two
adjust coefficients: k, and w,. A 18 positions vector then
represents the subpoplation.
C. Evaluation Funcrion
This function deals with the evaluation of the aptiiude level
(adapwtiun) of each subpopulation generated by nlgunthms.
These coefficients take any integer positive or negative For the present problcm the aim is to mmirnue rhc vehicle-
value, depending- of the defined adjustment value made by parking route. For this caqc thc evaluation hnct~onIS given
the user. by:

Fig. 4 shows an adjust example of PE function with IE equal I


FA= -
to 30, ID equal to 160, SE equal to 80 and SD equal to 110. IC1
Being k = -8 and w = 3 the membership function will have
the following adjust: where I is the total iterations up to parking, regarding adjust
made for each subpopulation in the membership function.
[ E ’ = (30 + -8)-3 = I9
ID’ = (160 + -8) + 3 = 155 According this function, each subpoplation aptihlde will be
SE’ = (SO + -8) = 72 inversely proportional to the iterations number.
SD’=(110+ -8) = 102
D. AIgoHIhm Presentation
PSO will be used to find the optimum values according to the Being G the PSO iteration, P the population, N the
strategy and the initial points used, as well as fork, and wi for subpopulation number, V m m the velocity max number and
the membership functions. VA the allowed adjust value for membership functions, the
algorithm shown bellow generates as a start the vector gbest
with G positions to store the best subpopulation result.
I. Generate initial subpopulation SP with particles in the
interval [-VA, +VA].
2. Generate initial Velocity Vx and Vy using random
valuen.
3. If completed in the iteration number G, go to step 8.
4. Evaluate subpopulation SP. If F(SP) is better than the
F(pb-0, the positioning vector SP is set to pbesf. If
F@berl) is better than F(gb-0, the positioning vector
pbesf is set togbesr.
5. Calculate a new subpoplation velocity values using Eq.
111.
\-r
6. Calculate a new subpopulationSP values using Eq. (2).
7. Go to step 3.
8. End.
Fig. 6. Initial training positions.
V. "Em AND RESULTS Fig. 7 shows the courses referred to each initial position.
In this section it will be presented tesui made with a fuzzy These positions were chosen according the points where the
control, which membership functions were adjusted through vehicle doesn't follow a good route till parking, and
PSO algorithms. These tests show those mechanisms' consequently, generating an excessive uumber of iterations.
efficiency, providing an objective evaluation of the found The definition of several initial positions will not only
results. m i n i m i s the routes referred to these points but also for
other points, resultiug a global minimization of traveled
The originals membership functions are shown in Fig. 5. space. The defined PSO parametem for the training are
This control trainiig was made starting From three initial shown in Table 2.
positions as shown in Table 1. In this table we also have the
vehicle's number of generated iterations until1 parking, using
the origmals membership functions. Fig. 6 shows the vehicle
in each statiing position.

.I
Fig. 7. Routes without training: Position 2

Table 2 - PSO Parameters


Ponulation Sue 14
I&tion Number 30
Vmax 10

The generated results by PSO algorithk are shown in Table


3 and Fig. 8. As shown in Table 3, a reduction of 557
Fig. 5 . Original membership functions iterations (29,74%) was made for parking the vehicle starting
from the initial positions set up for training. Further it will be
Table 1 - Starting positions for training presented simulation results made starting fmm initial
Position X Y Car Iterationswithout positions not used in the training. Fig.9 shows the
angle training membership functions after adjustment.
1 25 120 180 330
2 160 130 -90 888
3 275 160 -40 655
Table 3 -Iterations after the swann training Position X Y Car lterationsgeneratedby
Position Iterations without Iterations with Angle F u r q Controls
Training training original Trained PSO
I 330 285 1 1 126 182 450 445
2 888
~~ 592
~~~

2 6 46 132 161 306


3 655 439
3 8 41 190 1000 1000
Total 1873 1316
4 I5 70 -90 318 3 I3
Average 62423 438.66
5 70 95 -6 263 257
6 74 69 -10 453 450
7 76 193 232 605 363
8 88 46 44 283 289
9 115 120 240 463 289
IO 131 I40 -72 457 512
II 141 69 -28 342 225
I2 154 166 -80 863 950
13 160 I35 268 1101 445
I4 217 66 -50 684 506
15 228 194 48 830 416
16 246 169 154 312 310
Fig. 8. Routes aftex training: Position 2
I7 250 180 40 139 489
I8 265 170 -40 612 483
19 300 124 258 317 308
20 305 156 40 521 449
Total 10840 886s
..
Average 542 443.25

VI. CONCLUSIONS
The fuw systems are a convenient and eficient alternative
for solution of problems where the fuzzy state are well
defmed. Nevertheless, the project of a fuzzy system may
became difficult for large and complex systems, when the
control quality depends of "uy-and-error" methods for
defining the best membership functions to solve the problem.

This paper presents a Panicle Swarm Optimization algorithm


applied to filting fuzzy membership functions. The case
study was implemented using a Computer Package for Fuszy
Reasoning Teaching, whose main purpose is to control a
Fig. 9. Membership functions after the PSO adjustment vehicle in the task of parking into a garage, beginning from
any start position.

Table 4 shows the results obtained from simulations made The PSO training module developed in this work is added in
with 20 positions randomly chosen for the vehicle parking. this program with an automatic technique for the fitting of
the membership functions parameters. This technique shows
The results present an average reduction of 1822% of that the performance of a fuzzy control may be improved
iterations number for vehicle tn reach the final position for through the PSO algorithm
the PSO trained control. It is possible to notice that in some
positions the iterations number is bigger than the ones PSO is able to generate an optimal set of parameters for
generated by the original control (without training). In fuzzy reasoning model based on either their initial subjective
position 2 from Table 3, for example, the original con~~ool selection or on a random selection. It is also shown that by
generates I67 iterations to park the vehicle, as compared to training this algorithm, with some specific starl positions, it
the trained control that generates 306 iterations. This is reached a good global optimization result. This technique
increase comes from the modifications made in the is presented as a great promise for optimizationprocess.
membership functions, that makes the vehicle change to a
different route to reach the final position.

Table 4. Simulations results


V11. ACKNOWEDGME~~~S [3] G.Lambert-Tones,V.H.Quiotana&L.E BargsdaSilva-"A
F- Conml Lab for EduatioMl p..Posd*, Canadian
CanfRencc an Engineering Education,pp. 117-124, Kingston,
The authors would like to thank the PRONEXKNPaJMCT Caada,lue 1618,1996.
for the fmancial support to develop this projcct. -
[4] J. Kennedy and RC. Ebcrhan "Panicle s w m optimimtion",
P r o d i n g of Ihe 1995 IEEE International Confaence on
'
Neural N m o r h vol. 4, 1942-1948. IEEE Res.
[5] Y . Shi and R.C. EberbarS "A modified Panicle Swarm
VIII. REFERENCES O p ~ s e r IEEE
, intcmational confnen~rn E V O I U ~ ~ ~ ~ W
[I1 G . LamkR-Tom and D.Mukhedkar, "On-line Funy Rule Computation, Anchorage. Alaskq May 4-9.1998.
Set Generawr," In: Advanad Infomtioo Processing io 161 M.A. CarValha, G. Lamb&-Tam, L.E. B o m s da Silva &
Automatic Conuol. Husson. R, Ed., pp.113-118, P~gamon, I.O.P. Piow, "Fitting Furry Membersbp FunetiOns using
Oxford-U& 1990. Genetic Algadthms''. In: ZOO0 IEEE lnlemational Conference
-
121 D. Park, A. Kandel & G . Langhob "Genetic-Based New on Systems, Mao, and Cybanetics, Ocr 8-11 2000, Nahvillc.
F-R~asollingMode~wiIh ApplieationtoFuvy C ~ k ~ ~ ,USA.
IEEE Trans.on SMC, Vol. 24, No. I , pp. 3947, January 1994.

You might also like