下載/瀏覽Download
Download
Report
Transcript 下載/瀏覽Download
Southern Taiwan University
Application of the GA-PSO with the
Fuzzy controller to the robot soccer
Department of Electrical Engineering, Southern Taiwan University,
Tainan, R.O.C
Juing-Shian Chiou, Ming-Yuan Shieh
Shih-Wen Cheng, Kuo-Yang Wang, Yu-Chia Hu
1
Southern Taiwan University
Outline
Abstract
Introduction
Motion Fuzzy Controller Structure
GA-PSO Fuzzy Controller Design Method
Simulation Results
Conclusions
2
Southern Taiwan University
Abstract
In this paper we proposed the method of GA-PSO to adjust the rule
of the fuzzy system with robot soccer.
The experimental scenarios involved a five-versus-five soccer
simulation and the MATLAB simulation.
3
Southern Taiwan University
Introduction(1/2)
We use the robot system as our test platform since it can be used to
fully implement a multi-agent system.
In this paper, we choose five-versus-five simulation platform. (Figure1)
Figure 1. The Five-versus-Five simulation platform
4
Southern Taiwan University
Introduction(2/2)
To achieve an optimal design for a soccer robot, we use Genetic
algorithms- particle swarm optimization (GA-PSO) to adjustment
fuzzy membership function thus reaches the optimal result.
5
Southern Taiwan University
Motion Fuzzy Controller
Structure(1/7)
In this part, we start design the fuzzy logic controller aimed at
producing the velocities of the robot right and left wheel. We set
two input parameters of the fuzzy logic controller are distance d
and angle .
The former d is the distance between the robot and the goal. The
latter is the direction of with on the straight line path to the
goal. Both are shown in Figure 2.
Figure 2. the relation of d and
6
Southern Taiwan University
Motion Fuzzy Controller
Structure(2/7)
We set the values of variable e1 , e2 , e3 , e4, v1 , v2 , y1, y2 and design two
fuzzy controllers to control the velocity of the right and left wheels to
move the robot.
The fuzzy rules on which were based these fuzzy controllers are
described in tables 1 and 2, and can be described according to the
following equations:
Ry1 j1 , j2 : IF
e1
is
A1, j1
And
e2
is
A 2, j2
Then
j1 , j2 3, 2, 1,0,1,2,3
A
A
Ry2 j3 , j4 : IF e3 is 3, j1 And e4 is 4, j2
y1 is
y1 j1 , j2
Then
y2 is y2 j3 , j4
j3 , j4 3, 2, 1,0,1,2,3
7
(1)
(2)
Southern Taiwan University
Motion Fuzzy Controller
Structure(3/7)
Table 1. Fuzzy rule base of the leftwheel velocity fuzzy controller
Table 2. Fuzzy rule base of the rightwheel velocity controller
8
Southern Taiwan University
Motion Fuzzy Controller
Structure(4/7)
The following term sets were used to describe the fuzzy sets of each
input and output fuzzy variables:
T ei NB, NM , NS , Z , PS , PM , PB , i 1,2,3,4
(3)
Ai ,3 , Ai ,2 , Ai ,1 , Ai ,0 , Ai ,1 , Ai ,2 , Ai ,3 ,
T ym NB, NM , NS , Z , PS , PM , PB , m 1,2
y m,3 , y m,2 , y m,1 , y m,0 , y m,1 , y m,2 , y m,3 ,
9
(4)
Southern Taiwan University
Motion Fuzzy Controller
Structure(5/7)
As show in figure 3, the triangle membership function and the
singleton membership function are used to describe the fuzzy sets
of input variables and output variables.
(a)
(b)
Figure 3. Membership function: (a) the fuzzy sets for ei ;
(b) the fuzzy sets for ym .
10
Southern Taiwan University
Motion Fuzzy Controller
Structure(6/7)
Based on the weighted average method, the final output of these
fuzzy controllers can be described by means of equation (5) and (6)
y1
3
3
w
j1 3 j2 3
w j1 , j2
y1 j1 , j2
j1 , j2
(5)
y2
3
3
w
j3 3 j4 3
j3 , j4
y1 j3 , j4
(6)
Where w j1 , j2 and w j3 , j4 were determined according to Equations
(7) and (8).
min u A1, j e1 , u A 2, j e2
1
2
min u e , u
3
3
j1 3 j2 3
A1, j
1
1
A 2, j
2
e2
(7)
w j3 , j4
min u A3, j e3 , u A 4, j e4
min u
3
3
j1 3 j2 3
11
4
3
A 3, j
3
e3 , u A e4
4, j4
(8)
Southern Taiwan University
Motion Fuzzy Controller
Structure(7/7)
When the input data of e1 , e2 , e3 and e4 are given, y1 and y2 can be
determined by using Equations (5) and (6) Thus, the left-wheel velocity
vl and the right-wheel velocity vr can be obtained.
12
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(1/11)
The procedure of GA-PSO algorithm can be described as follows:
Step 1: Initialize the PSO algorithm by setting
F1 pbest F2pbest FNpbest 0 , g 1 the maximum
number of generation (G), the number of particles (N),
c1 , c2 ,of
max
min
and four parameter values
and
.
13
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(2/11)
Step 2: Generate the initial position vector
p1h p1h,1 , p1h,2 , , p1h, j , , p1h,n
and the initial velocity vector
v1h v1h,1 , v1h,2 ,
, v1h, j ,
of N particles randomly by
, v1h,n
p1h, j p min
p max
pmin
rand ()
j
j
j
(12)
and
v1h , j
v
max
j
v min
j
20
rand ()
14
(13)
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(3/11)
Step 3: Calculate the fitness value of each particle in the g-th
generation by
F phg fit phg , h 1, 2,
,N
Pbest
Pbest
p
h
F
Step 4: Determine h
and
for each particle by
Fhg , if FhPbest Fhg
F
Pbest
Fh , otherwise
h 1, 2, , N
(15)
phg , if FhPbest Fhg
p
Pbest
ph , otherwise
h 1,2, , N
(16)
Pbest
h
and
Pbest
h
15
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(4/11)
Step 5: Find an index q of the particle with the highest fitness by
q arg max FhPbest
h1,2, , N
(17)
and determine F Gbest and P Gbest by
F Gbest FqPbest max FhPbest
(18)
p Gbest pqPbest
(19)
h1,2, , N
and
16
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(5/11)
Step 6: If g=G, then go to Step 12, Otherwise, go to Step 7.
Step 7: Update the velocity vector of each particle by
vhg 1 vhg c1 rand1() p Gbest phg
c2 rand 2() phPbest phg
(20)
is a weight value and defined by
max
max min
G
g
17
(21)
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(6/11)
Step 8: With fixed-length chromosomes that the problem is
variable domains, select the number of chromosome
population is , the crossover rate is pc , the mutation
rate is pm .
Step 9: The definition of adaptive function to measure the problem
domain on a single chromosome of the performance or
adaptability. Adaptive function is built on the reproductive
process, the basis for selecting pairs of chromosomes.
Step 10: The size of a randomly generated initial population of
chromosomes .
x1, x2 , , x
18
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(7/11)
Step 11: Calculating the adaptability of each chromosomes.
f x1 , f x2 , , f x
Step 12: In the current population, select a pair of chromosomes.
Parental chromosomes are selected and their adaptability
related to the rate. Adaptive chromosomes are selected
with high rate is higher than the low adaptability of the
chromosomes.
Step 13: Through the implementation of genetic operators-crossover
and mutation of a pair of offspring chromosomes.
19
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(8/11)
Step 14: The offspring chromosomes into new populations.
Step 15: Repeat step 13, unit the new chromosome population size
is equal to the size of initial population .
Step 16: With the new (offspring) chromosome populations to
replace to the initial (parent) chromosome populations.
Step 17: Back to step 12, repeat this process until you meet the
conditions for ending to stop.
20
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(9/11)
Step 18: Check the velocity constraint by
v max
vgh, 1j v max
j , if
j
g 1
max
vgh, 1j vgh, 1j , if v min
v
v
j
j
h, j
min
if vgh, 1j v min
v j
j
h 1,2, , N , j 1,2, , n
(22)
Step 19: Update the position vector of each particle by
phg 1 phg vhg 1
(23)
21
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(10/11)
Step 20: Bound the updated position vector of each particle in the
searching range by
p max
j ,
g 1
p h, j pgh, 1j ,
min
p j ,
h 1,2, , N ,
if
pgh, 1j p max
j
if
g 1
max
p min
j p h , j p j
if
g 1
h, j
p
p
min
j
j 1,2, , n
Step 21: Let g=g+1 and go to Step 3.
22
(24)
Southern Taiwan University
GA-PSO Fuzzy Controller Design
Method(11/11)
Step 22: Determine the corresponding fuzzy controller based on
Gbest
the position of the particle p
with the best fitness
value F Gbest .
In the above reasoning, we will use the FIRA simulator to confirm the
results of our reasoning.
23
Southern Taiwan University
Simulation Results(1/2)
The membership functions of d , a, y1 and y2 , as determined by the
proposed GA-PSO based method, are presented in figure 4.
(a)
(b)
(c)
Figure 4. membership functions of (a) e1 and e2 (b) e3 and e4
(c) y1 and y2 , as determined by the proposed GA-PSO method
24
Southern Taiwan University
Simulation Results(2/2)
The figure 5 are the orbit of the soccer robot when controller by the
proposed GA-PSO method and simulation with a FIRA simulation.
Figure5. The soccer robot moving
25
Southern Taiwan University
Conclusions
The final results showed that, although the GA-PSO's convergence
time is not the time than the PSO-based fast, and as we join the GA
algorithm , after the results obtained will be closer to its optimal
solution. In the future, we need to explore ways to let a faster
convergence time for change
26
Southern Taiwan University
Thanks for your attention !
27