Docstoc

eshare.stut.edu.twEshareFile2010_122010_12_9f69

Document Sample
eshare.stut.edu.twEshareFile2010_122010_12_9f69 Powered By Docstoc
					     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 V 0 of the target by using the sampling time T0.
                   The equation below shows the calculations involved.

                        d0    GF x  G x 2  GF y  G y 2

                                  V0  d 0 / T0




                                                                            1
DECISION AND CONTROL LAB
     Southern Taiwan University




          Using GPC to predict the target position(3/5)

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

                             d  G  GL 2  G  GL 2
                              0
                             
                                        x    x      y y

                              GFy  G y G y  GL y
                                         
                              GFx  G x G x  GLx
                             



                                                                               2
DECISION AND CONTROL LAB
     Southern Taiwan University




          Subsequent position of the target




                         Fig.4. Subsequent position of the target.




                                                                     3
DECISION AND CONTROL LAB
     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 V c , based
                   on the distance (d ) that it had to cover to reach its
                   current position. The equation below shows the
                   calculations involved ( V L is the speed of the left
                   wheel of the Robot, V R is the speed of the right
                   wheel).
                                          VL  VR
                                   Vc 
                                             2
                                    T1  d / Vc


                                                                                4
DECISION AND CONTROL LAB
     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.




                                                                             5
DECISION AND CONTROL LAB
     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(ψ).

                                          


                                              d
                                  Robot
                                                       goal



                           Figure 5. Relationship between d and ψ


                                                                        6
DECISION AND CONTROL LAB
     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.

                                                                           7
DECISION AND CONTROL LAB
     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                                                                               Table 2. Fuzzy rule base of the right-
          left-wheel velocity fuzzy controller                                                                          wheel velocity fuzzy controller
                                                                        e1                                                                                                                         e3

                   y1
                                                                                                                               y2
                              NB NM                     NS            Z          PS          PM             PB                           NB NM                              NS                   Z            PS            PM              PB
                              MS        NM        NB        NS                   NS           NS           Z                              Z
                                                                                                                                                           NS              NS                NS                NB           NM              NM
                        NB
                              y1( 3,3) y1( 2,3) y1( 1,3) y1( 0,3)             y1(1,3)      y1( 2,3)      y1(3,3)
                                                                                                                                    NB    y 2 ( 3,3)      y 2 ( 2,3)     y 2 ( 1,3)       y 2 ( 0 ,3)       y 2 (1,3)    y2 ( 2 , 3)     y 2 ( 3, 3 )

                              Z         NM        NM        NM                   NS           Z             PM                            PM                Z               NS                 NM             NM            NM              Z
                        NM    y1( 3, 2 ) y1( 2, 2 ) y1( 1, 2) y1( 0, 2 )      y1(1, 2 )    y1( 2, 2 )    y1(3, 2 )               NM    y2 ( 3, 2 )      y2 ( 2, 2 )    y2 ( 1, 2)        y2 ( 0 , 2 )   y2 (1, 2 )    y2 ( 2 , 2 )    y 2 ( 3, 2 )

                              Z           NM           NM           Z            NS           Z            PM                              PM              Z                 NS                Z               NM           NM              Z
                        NS    y1( 3,1) y1( 2,1) y1( 1,1)         y1( 0,1)     y1(1,1)      y1( 2,1)     y1(3,1)                  NS     y2 ( 3,1)      y2 ( 2,1)        y2 ( 1,1)        y2 ( 0,1)       y2 (1,1)     y2 ( 2,1)        y2 (3,1)

                              PM          Z            NM           PM           Z            PM           PS             e4                PS             PM                Z                 PM              NM           Z               PM
              e2        Z     y1( 3, 0 ) y1( 2, 0 ) y1( -1, 0 )   y1( 0, 0 )   y1(1, 0 )    y1( 2, 0 )   y1(3, 0 )                Z       y2 ( 3, 0 )   y2 ( 2, 0 )      y2 ( -1, 0 )      y2 ( 0 , 0 )    y2 (1, 0 )   y2 ( 2 , 0 )    y 2 ( 3, 0 )

                             PS          PM          Z           PS              PM          PS            PB                            PB                 PS              PM                 PS             Z             PM               PS
                        PS   y1( 3, 1) y1( 2, -1) y1( 1, 1) y1( 0, 1)      y1(1, 1)   y1( 2, 1) y1(3, 1)                   PS   y2 ( 3, 1)       y2 ( 2, -1)     y2 ( 1, 1)      y2 ( 0, 1)    y2 (1, 1)    y2 ( 2, 1)      y2 ( 3, 1)

                             PM           Z          NM           PB             PM         PS          PB                               PB                 PS              PM                 PB             NM             PS              PM
                        PM   y1( 3, 2 ) y1( 2,-2) y1( 1, 2 ) y1( 0, 2 )    y1(1, 2 ) y1( 2, 2 ) y1(3, 2 )                  PM    y2 ( 3, 2 )     y2 ( 2,-2)      y2 ( 1, 2 )     y2 ( 0, 2 )   y2 (1, 2 )    y2 ( 2, 2 )    y2 ( 3, 2 )

                             Z            NM           NS          PB            PM          PS         PB                               PB                                  PM                PB              NS           NM              Z
                        PB                                                                                                          PB                      PS
                             y1( 3, 3) y1( 2, -3)   y1( 1, 3) y1( 0, 3)    y1(1, 3)   y1( 2, 3) y1(3, 3)                         y2 ( 3, 3)      y2(-2,-3)         y2 ( 1, 3)     y2 ( 0, 3)     y2 (1, 3)   y2 ( 2, 3)     y2 ( 3, 3)



                                                                                                                                                                                                                                                            8
DECISION AND CONTROL LAB
     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       
                                                                                                                9
DECISION AND CONTROL LAB
     Southern Taiwan University




               membership function

     μAi(xi)
               NB      NM       NS      Z       PS PM PB
      1        A(i,-3) A(i,-2) A(i,-1) A(i,0)   A(i,1) A(i,2) A(i,3)
                                                                              μym(ym)
                                                                                         NB       NM NS               Z      PS PM            PB
                                                                                        y(m,-3)   y(m,-2) y(m,-1)   y(m,0)   y(m,1) y(m,2)   y(m,3)
                                                                                 1




               a(i,-3) a(i,-2) a(i,-1) 0                                         0
       0                                        a(i,1)   a(i,2) a(i,3)   xi             b(m,-3) b(m,-2) b(m,-1)       0      b(m,1) b(m,2)   b(m,3)
                                                                                                                                                      ym

                                   (a)                                                                                (b)


                              Figure 6. Membership functions: (a) the fuzzy sets for ei; (b) the
                              fuzzy sets for ym

                                                                                                                                                           10
DECISION AND CONTROL LAB
     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.
                                              3                  3                                                         3          3
                                 y1          w                                    y
                                                                           j1 , j2  1 j1 , j2 
                                                                                                          y2           w
                                                                                                                     j3 3         j4 3
                                                                                                                                                         y
                                                                                                                                                j3 , j4  1 j3 , j4 
                                            j1 3          j2 3


                       where w(j ,                     1        j2)   and w(j ,              3     j4)   were determined according the
                        following equations.

       w j1 , j2  
                                        
                                 min  A1, j   e1  ,  A 2, j   e2 
                                                  1                    2
                                                                                                         w j3 , j4  
                                                                                                                                           
                                                                                                                                    min  A3, j   e3  ,  A 4, j   e4 
                                                                                                                                                   3                     4
                                                                                                                                                                                      
                          min                                 e1  ,  A   e2                                          min                            e3  ,  A   e4  
                          3         3                                                                                          3       3

                                                      A1, j                 2, j2                                                                    A 3, j               4, j4
                                                            1                                                                                                 3
                        j1 3    j2 3                                                                                   j3 3    j4 3



                                                                                                                                                                                              11
DECISION AND CONTROL LAB
     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   .

                                                                       12
DECISION AND CONTROL LAB
     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  V r _ x
                                    
                                  
                                  n  V r _ y
                                    
                                  
                                  q  r   l  cos
                                    
                                  w  r    sin 
                                    
                                              l

                                   p  r   r  cos
                                    
                                  
                                  s  r   r  sin 
                                    
                                   r  a r
                                    
                                  
                                   l  al
                                    
                                  
                                  
                                                                     13
DECISION AND CONTROL LAB
     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:
                           x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 
                                                                        T



             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

                                                                                                                        14
DECISION AND CONTROL LAB
     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  ,
                                  1,1   1,2         1,3               2,1   2,2   2,3   3,1   3,2   3,3    4,1    4,2     4,3


              b  , b  , b   and b  , b  , b   , where a and b are the range of
                1,1   1,2   1,3               2,1         2,2   2,3


              the membership function of the fuzzy controller.




                                                                                                                                      15
DECISION AND CONTROL LAB
     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.


                                            ai ,2             Optimal solution

                                                      ai ,3
                                  ai ,1

                     Ant colony


                    Figure 7. The form of fuzzy rules changed into route one


                                                                                   16
DECISION AND CONTROL LAB
     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
                                   n
              the domain, m   b t  represents the total number of ants,
                                         i
                                  i 1
              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.




                                                                              17
DECISION AND CONTROL LAB
     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
                                                          

                                                                    if j  N ik
                               k                
                              pij  t    k  ij  t  ij
                                                           
                                                                 
                                           jNi
                                          0
                                                                    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.

                                                                                   18
DECISION AND CONTROL LAB
     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    ij  t , t  1
                                                    k

                                                k 1




                                                                           19
DECISION AND CONTROL LAB
     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
                                                                             20
DECISION AND CONTROL LAB
     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
                                     ij (0)  
                                             k 1 Lk




                                                                                  21
DECISION AND CONTROL LAB
     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 )                 
                                    e              ( r  1)   1
                                      max s (i )             
                                    
                                                r
                                                    m
                                     s (i )   (  al ) 2
                                              l 1 r


                  Then, calculate the probability of the path choice according to
                   following equation.
                                                    
                                                   ij ij (t )
                                                                       j  Ak
                                  pij (t )    rAk  ir (t )ir (t )
                                   k                     a       

                                             
                                             0                         other

                                                                                 22
DECISION AND CONTROL LAB
     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.
                                                                         23
DECISION AND CONTROL LAB
     Southern Taiwan University




          Simulation results(1/6)




        Figure 9. Use of SVM-FLC and ACA-FLC to control the speed of the robot

                                                                                 24
DECISION AND CONTROL LAB
     Southern Taiwan University




           Simulation results(2/6)




      Figure 10. Before using the GPC to       Figure 11. Using the GPC to
      predict the next target position (x, y   predict the next target position (x,
      coordinates: inch)                       y coordinates: inch)

                                                                                      25
DECISION AND CONTROL LAB
     Southern Taiwan University




          Simulation results(3/6)




      Figure 12. Simulation of obstacle-   Figure 13. Simulation of obstacle-
      avoidance path of soccer robot by    avoidance path of soccer robot by
      using MATLAB (x, y coordinates:      using FIRA simulation
      inch)
                                                                                26
DECISION AND CONTROL LAB
     Southern Taiwan University




          Simulation results(4/6)




       Figure 14. Using ACA-FLC to          Figure 15. Using ACA-FLC to
       seek the path of the robot, in the   seek the path of the robot, in the
       context of a MATLAB simulation       context of a FIRA simulation
       (x, y coordinates: inch)
                                                                                 27
DECISION AND CONTROL LAB
     Southern Taiwan University




          Simulation results(5/6)




                                  Figure 16. Moving trick



                                                            28
DECISION AND CONTROL LAB
     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
                                                                                        29
DECISION AND CONTROL LAB
     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.




                                                                       30
DECISION AND CONTROL LAB
     Southern Taiwan University




                    Thanks for your attention!




                                                 31
DECISION AND CONTROL LAB

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:3
posted:9/12/2012
language:English
pages:31