36
Robotic Interacti on Learning Lab 1 Department of Electrical Engineering, Southern Taiwan University The optimization of the application of fuzzy ant colony algorithm in soccer robot Juing-Shian Chiou, Kuo-Yang Wang, and Ming-Y uan Shieh Department of Electrical Engineering, Southern Taiwan University, Tainan County, Taiwan, R.O.C.

Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

Embed Size (px)

Citation preview

Page 1: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

Robotic Interaction Learning Lab 1

Department of Electrical Engineering, Southern Taiwan University

The optimization of the application of fuzzy ant colony algorithm in soccer robot

Juing-Shian Chiou, Kuo-Yang Wang, and Ming-Yuan Shieh

Department of Electrical Engineering, Southern Taiwan University, Tainan County, Taiwan, R.O.C.

Page 2: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

2

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Outline

Abstract Introduction Using generalized predictive control to predict the goal

position The application of fuzzy ant colony algorithm on

optimized speed of robot Ant colony algorithm used in obstacle avoidance Experiments Conclusion

Page 3: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

3

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Abstract

This article provides a theory which is based on the Fuzzy Ant Colony Optimization, and then uses this theory to design an optimal speed for the football robots, and then we also apply Ant Colony Optimization to design its routes to avoid obstacles.

Afterward, we add Generalized Predictive Control to predict the position which its target might appear at the next sampling time.

Page 4: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

4

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Introduction

Here we design a GPC to help the robot quickly predict the position of the target at the next sampling time, after which it extrapolates the time required to reach the target and the next sampling time target to decide the route.

We use the fuzzy control machine to design the speed of both right and left wheels, and then we add Ant Colony algorithm to adjust its fuzzy rule, to reach optimized result.

When make up its obstacle-avoiding routes under Ant Colony algorithm to finish the attribution of the efficiency and effectiveness of the strategy.

Page 5: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

5

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Simulation platform

Fig.1 Five-versus-five simulation platform

Page 6: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

6

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

System architecture

Environment

GPC to predict the target at the next sampling time

FLC to control the velocity of the mobile robot

ACA to adjust the avoid obstacle path

ACO to adjust the fuzzy rule

Action

Fig. 2 System architecture.

Page 7: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

7

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Using generalized predictive control to predict the goal 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, extremely short sampling times were used to make the system linear.

(II) At first, we gathered useful conditions from the system:

Page 8: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

8

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Useful conditions

1) The position of the robot 2) The former position of the target 3) The current position of the target (The former

and current positions were determined on the basis of the sampling time , as shown in Fig.3.)

yx RR ,

yx GFGF ,

yx GG ,

0T

Fig.3. sampling time.

Page 9: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

9

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Using generalized predictive control to predict the goal position(2/5)

(III) We calculated the distances between the former and current positions of the target, and we determined the speed of the target by using the sampling time . The equation below shows the calculations involved.

0V

000 /TdV

0T

220 yyxx GGFGGFd

Page 10: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

10

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Using generalized predictive control to predict the goal position(3/5)

(IV) After calculating the velocity of the target, we designed a GPC by using , the direction of the target and the sampling time , which was then used to find the subsequent position of the target , as calculated by means of the equation below and illustrated in Figure 4.

0T

0V

0V

yx GLGL ,

xx

yy

xx

yy

yyxx

GLG

GLG

GGF

GGF

GLGGLGd 220

Page 11: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

11

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Subsequent position of the target

Fig.4. Subsequent position of the target.

Page 12: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

12

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Using generalized predictive control to predict the goal position(4/5)

(V) We then calculated the time needed for the robot to reach the target at its central speed , based on the distance ( ) that it had to cover to reach its current position. The equation below shows the calculations involved ( is the speed of the left wheel of the Robot, is the speed of the right wheel).

cV

d

1T

LV

2RL

c

VVV

cVdT /1

RV

Page 13: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

13

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Using generalized predictive control to predict the goal position(5/5)

(VI) If is larger than , then the robot followed to the next position of the target; if is smaller than , the robot proceeded to the current position of the target. By repeating steps I to VI, the target could be reached in less time.

1T 0T

1T 0T

Page 14: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

14

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The application of fuzzy ant colony algorithm on optimized speed of robot

The design of a fuzzy logic controller

The state equation

The ant colony algorithm

Page 15: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

15

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The design of a fuzzy logic controller

We designed an FLC to generate the velocity of both wheels of the robot. Two input parameters of an FLC are the distance and the angle.

Fig.5. Relationship between d and ψ.

Page 16: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

16

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Membership function

Each input parameters can be divided into seven classes, as shown in Fig. 6 and Fig. 7.

Fig. 6. The distance between the robot and the goal.

Fig.7. The orientation of the robot with respect to the straight line path to the goal.

Page 17: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

17

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Fuzzy rule table

Page 18: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

18

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The state equation

With the velocities generated by the FLC, we determined the maximum velocity of the robot.

We defined the mathematical model of the equation of the robot’s movements as follows:

ll

rr

r

r

l

l

yr

xr

yl

xl

lr

a

a

rs

rp

rw

rq

Vn

Vm

Vy

VxD

r

sin

cos

sin

cos

_

_

_

_

Page 19: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

19

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The state equation

Having defined the state variables,

We were able to determine the state equation:

Consequently, we identified the optimal vector of the velocity of the left wheel as , and that of the right wheel as

1 2 3 4 5 _ 6 _ 7 _ 8 _ 9 10, , , , , , , , ,l x l y r x r y r lx x x y x m x n x V x V x V x V x x

1 2 3 4 5 6 7 8 9 10

5 6 7 8

cos sin cos sin

T

T

l l r r r l

x x x x x x x x x x

x x x x r a r a r a r a a a

5 6lGV x x ������������������������������������������

7 8rGV x x ������������������������������������������

Page 20: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

20

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The ant colony algorithm

First, we will find four rules triggered by fuzzy control machine like Fig. 8 shows. Let’s suppose the triggered rules are A,B,C,D.

d

lVZ PS

VS

S

A B

C D

Fig. 8 Let’s suppose the triggered rules are A,B,C,D.

Page 21: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

21

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The ant colony algorithm

In short, domain is defined as the limit of the membership function, and then we can transfer this question as a route on a plain one.

Ant colony

A

B

C

D

Optimal solution

Fig. 9 the form of fuzzy rules transfered into the route one.

Page 22: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

22

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The ant colony algorithm

We can let be the number of ants at time in city . However, in computation side, we will show as domain,

and shows is the total number of ants. This gives the possibilities of choosing target and it means

the possibilities for the ant to reach the next city under the affection of visibility and pheromone, and its possibilities to choose by follow equation.

ib t t ii

1

n

ii

m b t

0

ki

ij ij ki

kij ijij

j N

tif j N

tp t

others

Page 23: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

23

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

The ant colony algorithm For ant , stands for the value of pheromone at

time through route i to j. As shown in follow equations.

k 1ij t

1t

1 , 1ij ij ijt t t t

1

, 1 , 1m

kij ij

k

t t t t

Page 24: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

24

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

We propose Ant Colony Algorithm that aims at planning obstacle avoidance path of moving object as Robot Soccer.

As Fig. 10 shows:

x y)(R ,R

x y(b ,b )

)R,(R y1x1

Fig. 10 obstacle avoidance path

Page 25: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

25

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

In order to improve searching speed of Ant Colony Algorithm and prevent Convergence Rate from becoming slow and optimizing partially, we take concentration which could be got by i into account to confirm path number e that ant could choose by follow equation:

S i

2

1

( )( 1) 1

max ( )

r

ll

ms i a

r

s ie r

s i

Page 26: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

26

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

Robot Soccer will have to choose the best path. This part adopts Objective Function to describe the performance of path choice by follow equation.

When Objective Function is confirmed, weight value of every path that soccer may pass is confirmed by follow equation.

0min 1 0 1

L

t f sW k k d k

1 0 1g tg gfk k k

Page 27: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

27

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

we simulate ant’s Pheromone in this way.

When all the Robot Soccer find Feasible Solution of one planning path, but it may not the best solution because the Pheromone has been changed at this time, therefore it is necessary to make a overall amending , amending principle is follow equation.

0 k

ij ijk

kir irij

r A

t tj A

t tp t

others

1ij ij ijt n t

Page 28: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

28

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

is the Pheromone variable quantity of path (i, j):

Its formula just like Ant-Cycle type; as formula shows follow equation.

ij

1

mk

ij ijk

0

kkij

Q

L

Page 29: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

29

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

Now we are going to explain the procedure of using Ant Colony algorithm.

Step 1: Parameter Initialization.

Step 2: Iterative process.

And then calculate probability of path choice according to

1

(0)s

ijk k

Q

L

2

1

( )( 1) 1

max ( )

( ) ( )r

ll

s ie r

s i

ms i a

r

( )

( ) ( ) ( )

0 ther k

ij ijkk a

ij r A ir ir

tj A

p t t t

o

Page 30: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

30

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Ant colony algorithm used in obstacle avoidance

Step 3: Update Pheromone concentration of path according to follow equation.

Step 4: Repeat Step2, Step3 until ant reach its target point. Step 5: Stop iterative search when one in m ants has already

completed searching the path length and has exceeded the best

path length of previous iteration. Step 6: Make N=N+1, place ant at starting point and target point

again if N<NC, repeat STEP2; else output the best path and stop

the Algorithm.

( 1) 1 ( )ij ij ijt t

Page 31: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

31

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Experiments

This part we have several points of simulation. The first part is the experiment for the robot to reach the top speed and predict the route of control. The second part is the simulation of the optimal route of the robot. The third part is the obstacle-avoiding route of the robot.

Page 32: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

32

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Simulations of the velocity and the GPC

Fig. 11 Using Fuzzy Ant Colony algorithm to adjust the velocity of the soccer robot.

Fig. 12 using GPC to predict the movement of the target and design the moving route for the robot.

Page 33: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

33

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Simulation of the robot’s path

Fig. 13 using fuzzy ant colony algorithm control machine to chase the route of the target, and also apply MATLAB to simulate.

Fig. 14 using control robot driven by fuzzy ant colony algorithm to look for the route of the target, and also using FIRA simulation.

Page 34: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

34

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Simulate obstacle avoidance path

Fig. 15 simulate obstacle avoidance path of Robot Soccer by MATLAB

Fig. 16 simulate obstacle avoidance path of Robot Soccer by using FIRA simulation.

Page 35: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

35

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Conclusion

The result of the experiment above shows that the method we provided can apply on the wheel robot effectively, and the generalized predictive control machine we designed can clarify the position of the target appearing at the next sampling time.

In the future, we will shorten the time for the fuzzy ant colony to weaken and also make the system to reach the optimal condition in a short time. By adding other different algorithms, we can find out the best combination of them.

Page 36: Department of Electrical Engineering, Southern Taiwan University Robotic Interaction Learning Lab 1 The optimization of the application of fuzzy ant colony

36

Department of Electrical Engineering, Southern Taiwan University

Robotic Interaction Learning Lab

Thanks for your attention!