下載/瀏覽Download

Download Report

Transcript 下載/瀏覽Download

Southern Taiwan University
ACA-based Fuzzy Controller
Design for Robot Soccer
International Journal of Fuzzy System, vol. 11, no. 3, September 2009
Juing-Shian Chiou and Kuo-Yang Wang
DECISION AND CONTROL LAB
1
Southern Taiwan University
Outline








Abstract
Introduction
Using GPC to predict the target position
Motion fuzzy controller structure
ACA-based fuzzy controller design method
ACA used in obstacle avoidance
Simulation results
Conclusions
DECISION AND CONTROL LAB
2
Southern Taiwan University
Abstract

This paper presents the use of an ant colony algorithm
combined with a fuzzy logic controller (ACA-FLC) to
optimize the movement of a soccer robot.

The simulation results show that the ACA-FLC was able to
choose a better position under any conditions it
encountered.
DECISION AND CONTROL LAB
3
Southern Taiwan University
Introduction

The best known associations are the Federation of
International Robot Soccer Association (FIRA) and the
Robot World Cup Soccer Games and Conferences.

This study focused on the use of GPC to predict the
possible position of the target at the next sampling time.

The optimal speed of the robot was then revised through
the application of the combination of a FLC and the ACA.

The latter was used to design the obstacle-avoidance routes.
DECISION AND CONTROL LAB
4
Southern Taiwan University
Simulation platform
Figure1. Five-versus-five simulation platform
DECISION AND CONTROL LAB
5
Southern Taiwan University
System architecture
Environment
GPC to predict the target at the
next sampling time
FLC to control the velocity
of the mobile robot
ACO to adjust the
membership
functions
ACA to adjust the avoid
obstacle path
Action
Figure 2. System architecture
DECISION AND CONTROL LAB
6
Southern Taiwan University
Using GPC to predict the target position(1/5)


We utilized the current position and sampling time of the
target to predict the target position at the next sampling
time.
The following steps illustrate the procedure followed.

(I) Although this system is nonlinear, we used an
extremely short sampling time, and as a result of state
transformation during this whole process, we can define
this as a linear system.

(II) At first, we established the useful conditions of the
system:
DECISION AND CONTROL LAB
7
Southern Taiwan University
Useful conditions



1) The position of the robot R x , R y 
2) The former position of the target GFx , GFy 
3) The current position of the target G x , G y  (The former
and current positions were determined on the basis of the
sampling time T0 , as shown in Fig.3.)
Fig.3. sampling time.
DECISION AND CONTROL LAB
8
Southern Taiwan University
Using GPC to predict the target position(2/5)

(III) We calculated the distances between the former
and current positions of the target, and we determined
the speed V0 of the target by using the sampling time T0.
The equation below shows the calculations involved.
d0 
GFx  G x 2  GFy  G y 2
V0  d 0 / T0
DECISION AND CONTROL LAB
9
Southern Taiwan University
Using GPC to predict the target position(3/5)

(IV) After calculating the velocity V0 of the target, we
designed a GPC by using V0 , the direction of the target
and the sampling time T0 , which was then used to find
the subsequent position of the target GLx , GLy  , as
calculated by means of the equation below and
illustrated in Figure 4.
d  G  GL 2  G  GL 2
x
x
y
y
 0
 GFy  G y G y  GLy


 GFx  G x G x  GLx
DECISION AND CONTROL LAB
10
Southern Taiwan University
Subsequent position of the target
Fig.4. Subsequent position of the target.
DECISION AND CONTROL LAB
11
Southern Taiwan University
Using GPC to predict the target position(4/5)

(V) We then calculated the time T1 needed for the
robot to reach the target at its central speed Vc , based
on the distance (d ) that it had to cover to reach its
current position. The equation below shows the
calculations involved ( VL is the speed of the left
wheel of the Robot, VR is the speed of the right
wheel).
Vc 
VL  VR
2
T1  d / Vc
DECISION AND CONTROL LAB
12
Southern Taiwan University
Using GPC to predict the target position(5/5)

(VI) If T1 is larger than T0 , then the robot followed to
the next position of the target; if T1 is smaller than T0 ,
the robot proceeded to the current position of the target.
By repeating steps I to VI, the target could be reached
in less time.
DECISION AND CONTROL LAB
13
Southern Taiwan University
Motion fuzzy controller structure(1/4)

In this part, we start with a design for a fuzzy logic
controller (FLC) aimed at producing the velocities of the
right and left wheels of the robot. Two input parameters of
an FLC are distance(d)and angle(ψ).

Robot
d
goal
Figure 5. Relationship between d and ψ
DECISION AND CONTROL LAB
14
Southern Taiwan University
Motion fuzzy controller structure(2/4)

We represented d, ψ, VLL and VRR as e1, e2, y1 and y2,
respectively. Afterwards, we set the values of variables e3
and e4 ( e1 = e3 and e2 = e4 ).

We designed two fuzzy controllers to control the velocity
of the right and left wheels of the robot.

In the first fuzzy controller, e1 and e2 are used as the input
variables and y1 as the output variable. In the other fuzzy
controller, e3 and e4 are used as the input variables and y2
as the output variable.
DECISION AND CONTROL LAB
15
Southern Taiwan University
fuzzy rule table

The fuzzy rules on which were based these fuzzy
controllers are described in Table 1 and Table 2.
Table 1. Fuzzy rule base of the
left-wheel velocity fuzzy controller
Table 2. Fuzzy rule base of the rightwheel velocity fuzzy controller
e1
e3
y1
y2
NB NM
NB
NM
NS
e2
Z
PS
PM
PB
NS
Z
NM
NB
MS
NS
y1( 3,3) y1( 2,3) y1( 1,3) y1( 0,3)
Z
NM
NM
NM
y1( 3, 2 ) y1( 2, 2 ) y1( 1, 2) y1( 0, 2 )
Z
NM
NM
Z
PS
PM
PB
NS
y1(1,3)
NS
y1( 2,3)
Z
Z
y1( 2, 2 )
y1(3, 2 )
Z
PM
y1( 2,1)
y1(3,1)
PS
y1(3, 0 )
PB
NS
y1(1, 2 )
PM
y1( 3,1) y1( 2,1) y1( 1,1)
y1( 0,1)
NS
y1(1,1)
PM
PM
Z
PM
y1( 0, 0 )
y1(1, 0 )
y1( 2, 0 )
Z
PM
PS
PS
y1( 3, 1) y1( 2, -1) y1( 1, 1) y1( 0, 1)
PM
PS
y1( 2, 1) y1(3, 1)
Z
NM
PB
y1( 3, 2 ) y1( 2,-2) y1( 1, 2 ) y1( 0, 2 )
PM
Z
PM
Z
NM
y1( 3, 0 ) y1( 2, 0 ) y1( -1, 0 )
PM
NM
y1( 3, 3) y1( 2, -3)
PB
NS
y1( 1, 3) y1( 0, 3)
DECISION AND CONTROL LAB
y1(1, 1)
PB
PS
y1(1, 2 ) y1( 2, 2 ) y1(3, 2 )
y1(1, 3)
NB
y1(3,3)
PB
PS
y1( 2, 3) y1(3, 3)
NM
NS
e4
Z
NB NM
NS
Z
PS
PM
NS
y 2 ( 2,3)
NS
y 2 ( 1,3)
NS
y 2 ( 0 ,3)
NB
NM
NM
y 2 (1,3)
y2 ( 2 , 3)
y 2 ( 3, 3 )
Z
y2 ( 2, 2 )
NS
y2 ( 1, 2)
NM
NM
NM
Z
y2 ( 3, 2 )
y2 ( 0 , 2 )
y2 (1, 2 )
y2 ( 2 , 2 )
y 2 ( 3, 2 )
PM
Z
NM
NM
Z
y2 ( 2,1)
NS
y2 ( 1,1)
Z
y2 ( 3,1)
y2 ( 0,1)
y2 (1,1)
y2 ( 2,1)
y2 (3,1)
PS
y2 ( 3, 0 )
PM
Z
PM
NM
Z
PM
y2 ( 2, 0 )
y2 ( -1, 0 )
y2 ( 0 , 0 )
y2 (1, 0 )
y2 ( 2 , 0 )
y 2 ( 3, 0 )
PS
y2 ( 2, -1)
PM
PS
y2 ( 0, 1)
Z
PM
y2 ( 1, 1)
y2 (1, 1)
y2 ( 2, 1)
PS
y2 ( 3, 1)
PS
y2 ( 2,-2)
PM
PB
NM
y2 ( 1, 2 )
y2 ( 0, 2 )
y2 (1, 2 )
PS
y2(-2,-3)
PM
PB
y2 ( 1, 3)
y2 ( 0, 3)
NS
y2 (1, 3)
Z
y 2 ( 3,3)
PM
PS
PB
PM
PB
PB
PB
y2 ( 3, 1)
y2 ( 3, 2 )
y2 ( 3, 3)
PS
y2 ( 2, 2 )
PB
PM
y2 ( 3, 2 )
NM
Z
y2 ( 2, 3)
y2 ( 3, 3)
16
Southern Taiwan University
Motion fuzzy controller structure(3/4)
Ry1  j1 , j2  : IF e1 is A1, j1  AND e2 is A 2, j2  , THEN
y1 is y1 j1 , j2  j1 , j2 3, 2, 1,0,1, 2,3
Ry2  j3 , j4  : IF e3 is A3, j3  AND e4 is A 4, j4  , THEN
y2 is y2 j3 , j3  j3 , j4 3, 2, 1,0,1,2,3

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 , PS , PM , PB , i  1, 2,3, 4

 A i , 3 , A i , 2 , A i , 1 , Ai ,0  , Ai ,1 , A i ,2  , A i ,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
DECISION AND CONTROL LAB

17
Southern Taiwan University
membership function
μAi(xi)
NB
1
NM
NS
Z
A(i,-3) A(i,-2) A(i,-1) A(i,0)
PS PM PB
A(i,1) A(i,2) A(i,3)
μym(ym)
NB
y(m,-3)
NM NS
y(m,-2) y(m,-1)
Z
y(m,0)
PS PM
y(m,1) y(m,2)
PB
y(m,3)
0
b(m,1) b(m,2)
b(m,3)
1
0
a(i,-3) a(i,-2) a(i,-1) 0
a(i,1)
a(i,2) a(i,3)
(a)
0
xi
b(m,-3) b(m,-2) b(m,-1)
ym
(b)
Figure 6. Membership functions: (a) the fuzzy sets for ei; (b) the
fuzzy sets for ym
DECISION AND CONTROL LAB
18
Southern Taiwan University
Motion fuzzy controller structure(4/4)

Based on the weighted average method, the final outputs of
these fuzzy controllers can be described by following
equations.
y1 

3
3
  w
j1 3
j2 3
where w(j ,
1
j2)
y2 
y
j1 , j2  1 j1 , j2 
and w(j ,
3
j4)
3
3
  w
j3 3
j4 3
y
j3 , j4  1 j3 , j4 
were determined according the
following equations.
w j1 , j2  

min  A1, j   e1  ,  A2, j   e2 
1
  min  
3
3
j1 3
j2 3
DECISION AND CONTROL LAB
2
A1, j 
1

 e1  ,  A   e2  
2, j2
w j3 , j4  

min  A3, j   e3  ,  A 4, j   e4 
3
  min  
3
j3 3
4
3
j4 3
A 3, j 
3

 e3  ,  A   e4  
4, j4
19
Southern Taiwan University
ACA-based FLC design method(1/7)

The main function of the Ant Colony Algorithm is to solve
problems in identifying the optimal path to be taken, which
is similar to the problem faced by the robot.

To this end, we devised the state equation for the robot.
The moving velocity of the robot was calculated according
to v  r   .

The moving acceleration of the robot was calculated
according to a  r   .
DECISION AND CONTROL LAB
20
Southern Taiwan University
ACA-based FLC design method(2/7)

We defined the mathematical model of the equation of
the robot’s movements as follows:
 r
  D  r   l 

 x  Vl _ x
 y  V
l_y

m  Vr _ x

n  Vr _ y

q  r   l  cos 
w  r    sin 
l

 p  r   r  cos 

s  r   r  sin 
 r  a r

 l  al


DECISION AND CONTROL LAB
21
Southern Taiwan University
The state equation

Having defined the state variables,
x1  x, x2  y, x3  m, x4  n, x5  Vl _ x , x6  Vl _ y , x7  Vr _ x , x8  Vr _ y , x9  r , x10  l
We were able to determine the state equation:
T
 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 
  x5 x6 x7 x8 r  al  cos  r  al  sin  r  ar  cos  r  ar  sin 


ar al 
T
Consequently, we identified the optimal vector of the
velocity of the left wheel as GVl  x5  x6 , and that of the
right wheel as GVr  x7  x8
DECISION AND CONTROL LAB
22
Southern Taiwan University
ACA-based FLC design method(3/7)

After we set the fuzzy membership functions, we revised
them by using possible questions contained in the ant
colony algorithm. First, we set the membership
functions a  , a  , a   , a  , a  , a   , a  , a  , a  , a  , a  , a   ,
b  , b  , b   and b  , b  , b   , where a and b are the range of
the membership function of the fuzzy controller.
1,1
1,1
1,2
1,3
DECISION AND CONTROL LAB
1,2
1,3
2,1
2,1
2,2
2,2
2,3
3,1
3,2
3,3
4,1
4,2
4,3
2,3
23
Southern Taiwan University
ACA-based FLC design method(4/7)

Therefore, the ants have to choose the optimal route among
these three domains. We can explain this by means of
Figure 7.
Optimal solution
ai ,2
ai ,3
ai ,1
Ant colony
Figure 7. The form of fuzzy rules changed into route one
DECISION AND CONTROL LAB
24
Southern Taiwan University
ACA-based FLC design method(5/7)

If we consider bi  t  as the number of ants at time t in rule i,
the ants have to go to four rules, which constitute the
optimal solution. As a result, we have i=1,2,3,4. However,
in terms of the computations involved, i is used to express
the domain, m   b  t  represents the total number of ants,
and dij is the geometric distance from rule i to rule j, which
is called the density value of the trace at time t+1.
n
i 1
DECISION AND CONTROL LAB
i
25
Southern Taiwan University
ACA-based FLC design method(6/7)

This creates the possibility of choosing among targets,
which implies that it is possible for the ant to reach the
next rule under the influence of visibility and pheromones.
This possibility of choice is expressed by following
equation.
  ij  t  ij



k
pij  t    k  ij  t  ij
 jNi
0



if j  N ik
others
We applied this equation to our system, and the main
function of this system is to calculate the probability of a
certain route being chosen by the robot.
DECISION AND CONTROL LAB
26
Southern Taiwan University
ACA-based FLC design method(7/7)

The variable  ij  t  1 stands for the value of pheromones
at time t+1 along the route from i to j. This is expressed in
following equations.
 ij  t  1   ij  t    ij  t , t  1
m
 ij  t , t  1    ijk  t , t  1
k 1
DECISION AND CONTROL LAB
27
Southern Taiwan University
ACA used in obstacle avoidance(1/4)

The ACA uses an adaptive pheromone updating strategy to
ensure that the robot reaches the target in the shortest time
and follows the best obstacle-avoidance path, as illustrated
in Figure 8.
(b x ,b y )
(R x1 , R y1 )
(R x ,R y)
Figure 8. Obstacle-avoidance path
DECISION AND CONTROL LAB
28
Southern Taiwan University
ACA used in obstacle avoidance(2/4)

Step 1: Parameter Initialization. At search time N=0, set a
predetermined search time of NC. Generate m initial
solutions at random. Posit that there are s initial solutions
following path (i, j), the total length of which is L1 , L2 ,..., Ls .
Finally, initialize the pheromones of path (i, j) by means of
following equation, where Q is a constant.
s
Q
k 1 Lk
 ij (0)  
DECISION AND CONTROL LAB
29
Southern Taiwan University
ACA used in obstacle avoidance(3/4)

Step 2: Iterative process. Calculate the distribution range of
the ant colony concentration at starting point i according to
following equation.
  s (i )

(r  1)   1
e  

  max s (i )

r
m

2
s
(
i
)

(

a
)

l

l 1 r


Then, calculate the probability of the path choice according to
following equation.

 ijij (t )
j  Ak

pijk (t )    rAk  ira (t )ir (t )

other
0
DECISION AND CONTROL LAB
30
Southern Taiwan University
ACA used in obstacle avoidance(4/4)

Step 3: Update the pheromone concentration for the path
according to following equation.
 ij (t  1)  1    ij (t )   ij

Step 4: Repeat Steps 2 and 3 until the ant reaches its target
point.
Step 5: Stop the iterative search when one in m ants has
already completed its search for the path length and has
exceeded the best path length of the previous iteration.
Step 6: Make N=N+1, place the ant at the starting point,
reset the target point at N<NC, and repeat Step 2.
Otherwise, output the best path and stop the Algorithm.


DECISION AND CONTROL LAB
31
Southern Taiwan University
Simulation results(1/6)
Figure 9. Use of SVM-FLC and ACA-FLC to control the speed of the robot
DECISION AND CONTROL LAB
32
Southern Taiwan University
Simulation results(2/6)
Figure 10. Before using the GPC to
predict the next target position (x, y
coordinates: inch)
DECISION AND CONTROL LAB
Figure 11. Using the GPC to
predict the next target position (x,
y coordinates: inch)
33
Southern Taiwan University
Simulation results(3/6)
Figure 12. Simulation of obstacleavoidance path of soccer robot by
using MATLAB (x, y coordinates:
inch)
DECISION AND CONTROL LAB
Figure 13. Simulation of obstacleavoidance path of soccer robot by
using FIRA simulation
34
Southern Taiwan University
Simulation results(4/6)
Figure 14. Using ACA-FLC to
seek the path of the robot, in the
context of a MATLAB simulation
(x, y coordinates: inch)
DECISION AND CONTROL LAB
Figure 15. Using ACA-FLC to
seek the path of the robot, in the
context of a FIRA simulation
35
Southern Taiwan University
Simulation results(5/6)
Figure 16. Moving trick
DECISION AND CONTROL LAB
36
Southern Taiwan University
Simulation results(6/6)
(a)
(b)
(c)
Figure 17. Membership functions of (a) x1 and x3, (b) x2 and x4, and (c)
y1 and y2, as determined by the proposed ACA-FLC method
DECISION AND CONTROL LAB
37
Southern Taiwan University
Conclusions

The results of the experiment presented above show that
the method we propose can be effectively applied to a
wheeled robot, and the generalized predictive control
function we designed can clarify the position of the target
at the next sampling time. Also, we used the fuzzy ant
colony algorithm to reduce the time required by a robot
moving at top velocities to successfully find a path to its
optimal target.
DECISION AND CONTROL LAB
38
Southern Taiwan University
Thanks for your attention!
DECISION AND CONTROL LAB
39