unicycle robot

Upload: san-juan-bautista

Post on 04-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Unicycle Robot

    1/45

       

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    2/45

       

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    3/45

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    4/45

       

     

     

     

       

         

     

         

     

     

     

     

         

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    5/45

         

     

        

     

     

         

         

           

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    6/45

     

     

     

     

     

     

     

     

     

        

     

        

     

     

     

     

     

     

     

     

     

     

     

        

     

     

     

     

     

     

     

        

     

     

     

  • 8/13/2019 Unicycle Robot

    7/45

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    8/45

         

     

     

     

     

     

     

     

    τ   

    α  

    ẋ  

    rw  

    rf   

    I fg  

    I wg  

     

  • 8/13/2019 Unicycle Robot

    9/45

     

     x

       α

     

     δα

       τ  · δα

     α

     

    α  

     δx

     

      τ rw

    · δx

     x

     

    δW    =   τ rw

    · δx + τ   · δα

     

  • 8/13/2019 Unicycle Robot

    10/45

     

    L   =   T  − V 

     

     

    d

    dt

    ∂L

    ∂  ẋ

    ∂L

    ∂x

     =

      τ 

    rwd

    dt

    ∂L

    ∂  α̇

    ∂L

    ∂α

     = τ 

    T  = 1

    2

    mw ẋ

    2

    + 1

    2 mf 

    ẋ2 + 2ẋrf  α̇ cos α + r

    2f  α̇

    2

    + 1

    2

    I wg ẋ

    2

    r2w

    +

     1

    2

    I fg α̇

    2

    V   = mf grf  cos α

     

    d

    dt

     ẋ

    α̇

      =

      1ac−b2 cos2 α bcα̇2 sin α − b2g sin α cos α + τ  c−brw cosαrw   1

    ac−b2 cos2 α

    bga sin α − b2α̇2 sin α cos α + τ 

    arw−b cosα

    rw

     

    a =mf  + mw + I wg

    r2w

    b =mf rf 

    c =mf r2

    f  + I fg

     

     

  • 8/13/2019 Unicycle Robot

    11/45

     

     

  • 8/13/2019 Unicycle Robot

    12/45

     

     

     

     

      b  

      c  

     

    d

    dt

    α̇

    α

    =

    0 0  −b2g

    ac−b2

    0 0

      abg

    ac−b2

    0 1 0

    α̇

    α

    +

      c−brwrw(ac−b2)

      arw−brw(ac−b2)

    0

    τ 

     

     

    mf  = 24 kg

    mw  = 1 kg

    rf  = 0.68 m

    rw  = 0.225 m

     

        

     

     

  • 8/13/2019 Unicycle Robot

    13/45

  • 8/13/2019 Unicycle Robot

    14/45

       

      

     

     

    J    =

    ˆ   ∞

    0

    xT Qx + uT Ru

     dt

     

     

     

     

     u =  K x

     

     

     

        

     

     

     

     

     

     

     

     

    Q =

    10 0 00 0.1 0

    0 0 0.01

    R =0.1

     

    K  =  −10   −22.3   −144.9

     

  • 8/13/2019 Unicycle Robot

    15/45

         

     

     

     

     

     

     

    F e e d b a c k G a i n

      Vec to r

    L i n e a r i s e d U n i c y c l e

      Dy n a mic s

    -

    u TL o o p b r o k e n  

    h e r e  

     

     

    G = −

    s2 (a1k1 + a2k2) + s (a3k3) + b1k1

    s3 + ds

     a1  = 1.23     a2  =  −1.69     a3  =  −1.69     b1  =  −16.53     d  =  −96.69  

     

     k1   =   −10     k2   =   −22.3    k3   =   −144.9  

     

     

     0.5rads−1

     10rads−1

     

     10dB

     

     

     

    9.8rads−1

     

      −1  

     

  • 8/13/2019 Unicycle Robot

    16/45

    −40

    −30

    −20

    −10

    0

    10

    20

    30

    40

    50

    60

       M  a  g  n   i   t  u   d  e   (   d   B   )

    10−2

    10−1

    100

    101

    102

    103

    −270

    −225

    −180

    −135

    −90

       P   h  a  s  e   (   d  e  g   )

     

     

     

     20rads−1

     

     

     3Hz 

     

     3Hz 

     

     40o

     6dB

     

     

     

     

     10rads−1

     

     

     

    s+as+b

     

     

     

  • 8/13/2019 Unicycle Robot

    17/45

    0

    5

    10

    15

    20

    25

    30

    35

    40

       M  a  g  n   i   t  u   d  e   (   d   B

       )

    10−3

    10−2

    10−1

    100

    101

    102

    103

    −90

    −60

    −30

    0

       P   h  a  s  e   (   d  e  g   )

    Bode Diagram

    Frequency (rad/sec)

     

     

    s+10s+0.1

     

     

    0.85  

     

     

     

  • 8/13/2019 Unicycle Robot

    18/45

    −40

    −20

    0

    20

    40

    60

    80

    100

    120

       M  a  g  n   i   t  u   d  e   (   d   B   )

    10−3

    10−2

    10−1

    100

    101

    102

    103

    −360

    −315

    −270

    −225

    −180

    −135

    −90

       P   h  a  s  e   (   d  e  g   )

    Original Bode diagram

    Compensated Bode diagram

     

     

  • 8/13/2019 Unicycle Robot

    19/45

         

     

     

     

     

     

     

     

     

     6o

     

     

     15o

     

     

     

    1 ms−1  

     

     

     

  • 8/13/2019 Unicycle Robot

    20/45

    0 50 100 150 200 250 300 350 400 450 500−1

    0

    1

    2

    3

    4

    5

    6

    7

    Time (e−2 s)

    Translational Velocity (m.s−1)

    Angular Velocity (rad.s−1)

    Angular Position (rad)

    Torque input (N.m)

     

     6os−1

     6.5Nm

     

     

     

     

     7.5Nm

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    21/45

    0 100 200 300 400 500 600−1

    0

    1

    2

    3

    4

    5

    6

    7

    8

    Time (e−2 s)

    Translational Velocity (m.s−1)

    Angular Velocity (rad.s−1)

    Angular Position (rad)

    Torque input (N.m)

     

     

  • 8/13/2019 Unicycle Robot

    22/45

         

     

     

     

     

     

     

     

     

     

     

    1 ms  

     

    I n p u t / O u t p u t

    M o d u l e sF P G A f i l e Hos t f i l e

    L o c a t e d o n C o m p a c t R i o L o c a t e d o n l a p t o p

    W i F iH a r d w i r e d

     

     

  • 8/13/2019 Unicycle Robot

    23/45

    Inpu t / Ou tpu t

    M o d u l e s

    F P G A f i l e

    L o c a t e d o n C o m p a c t R i o

    L o c a t e d o n l a p t o p

    W i F i

    H a r d w i r e dHos t f i l eT ime-c r i t i ca l

    con t ro l loop

    Hos t f i l e

    ( o n F P G A ) (on m ic rocon t ro l le r )

    L o w - f r e q u e n c y p o l l i n g

     

     

        

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    24/45

     

     

     

     

     V olts

       rads−1

     

        

     

  • 8/13/2019 Unicycle Robot

    25/45

     

     

        

     

     

     

     m s−1

     

     

     

     

     

     

     

     

     

     

     

     

     

             

     

     

  • 8/13/2019 Unicycle Robot

    26/45

    i ( t ) X O R i ( t -1 )

    R e a d i n n e r l o o p

    va lue, i ( t )

    R e a d t i m e r a n d

    c o n v e r t t o m s - 1R e s t a r t t i m e r

    R e t u r n s p e e d

    R e a d o u t e r l o o p

    va l ue , o ( t )

    i ( t ) X O R i ( t -1 )

    A N D

    o( t )

    i ( t ) A N D o ( t )

    S peed i s i n the fo rw a rd

    d i rec t i on (pos i t i ve )

    S p e e d i s i n t h e b a c k w a r d

    d i rec t i on (nega t i ve )

    T r ue  

    Fa l se  

    T r u e  

    T r u e  

    Fa l se  

    Fa l se  

     

     

     

     

     

     

      

     

     

     

     

  • 8/13/2019 Unicycle Robot

    27/45

     

     

     

     

     

     

     

     

     

     

     

     

     

     µ

       µs

     µs

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    28/45

     

     

     

        

     

     

     

     

     

    1000 1200 1400 1600 1800 2000 2200−20

    −15

    −10

    −5

    0

    5

    10

    15

    20

    25

    PWM Duty Cycle (us)

       T  o  r  q  u  e   (   N  m   )

    measured data

    Interpolated Data

    Interpolated Data

    Crude Approximation

     

         

     

  • 8/13/2019 Unicycle Robot

    29/45

         

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     1mm

     

     

     

     

    2∗(25kg∗9.8ms−2)1mm∗10mm

      = 49MP a  

     

     

     

  • 8/13/2019 Unicycle Robot

    30/45

     

     

  • 8/13/2019 Unicycle Robot

    31/45

     

     

  • 8/13/2019 Unicycle Robot

    32/45

     

     

     

     

     

     

     

     

     

     

     1.2mm

     

        σmax  =

      Momentmax×ymaxI 

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    33/45

     

     

  • 8/13/2019 Unicycle Robot

    34/45

       

     

     

     

         

         

     

     

     

     

    0 1 2 3 4 5 6−0.3

    −0.2

    −0.1

    0

    0.1

    0.2

    0.3

    0.4

    Time (s)

       A  n  g  u   l  a  r   P  o

      s   i   t   i  o  n   (  r  a   d   i  a  n  s   )

     

     

  • 8/13/2019 Unicycle Robot

    35/45

    0 1 2 3 4 5 6−1

    −0.5

    0

    0.5

    1

    1.5

    Time (s)

       A  n  g  u   l  a  r   V  e   l  o  c   i   t  y   (  r  a   d   i  a  n  s  s −

       1   )

     

    0 1 2 3 4 5 6−3

    −2

    −1

    0

    1

    2

    3

    Time (s)

       T  r  a

      n  s   l  a   t   i  o  n  a   l   V  e   l  o  c   i   t  y   (  m   s −

       1   )

     

     

  • 8/13/2019 Unicycle Robot

    36/45

    0 1 2 3 4 5 6−100

    −80

    −60

    −40

    −20

    0

    20

    40

    Time (s)

       T  o  r  q  u  e   (   N

      m   )

     

     

     

     30

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    37/45

    0 1 2 3 4 5 6−4

    −3

    −2

    −1

    0

    1

    2

    3

    Time (seconds)

       A  m  p   l   i   t  u   d  e  s   (   t  o  r  q  u  e  n  o   t   t  o  s  c  a   l  e ,  o  n   l  y   f  o  r  c  o  m  p  a  r   i  s  o  n   )

    Torque data

    Torque interpolated

    Translational Velocity data

    Translational Velocity interpolated

    Angular Velocity data

    Angular Velocity interpolated

    Angular Position data

    Angular Position interpolated

     

     

     

         

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    38/45

    −5 −4 −3 −2 −1 0 1 2 3 4 5−10

    −8

    −6

    −4

    −2

    0

    2

    4

    6

    8

    10

    nyquist locus

    relay describing function

     

     

      −180o  

     

     

  • 8/13/2019 Unicycle Robot

    39/45

    −5 −4 −3 −2 −1 0 1 2 3 4 5−10

    −8

    −6

    −4

    −2

    0

    2

    4

    6

    8

    10

    original nyquist

    nyquist with proportional gain

    relay describing function

     

     

     

     

     

      ∼   3.14 rads−1   

      s+1s+12

     

     

     

     

  • 8/13/2019 Unicycle Robot

    40/45

    −5 −4 −3 −2 −1 0 1 2 3 4 5−10

    −8

    −6

    −4

    −2

    0

    2

    4

    6

    8

    10

    original nyquist

    nyquist with phase lead

    relay describing function

     

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    41/45

       

     

     

     

     15o

     

     

       

         

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    42/45

         

        

     

     

     

     

    Q(state, action) =   R(state, action) + γ.max[Q(next state, all actions)]

     γ 

     

     

     

     

     

     +/ − 5o   R = −1  

     

     R = 0

     

     R   =   −1      

     

     

     

     

     

     

         

        δ ẋ

       ẋ

     

     

    δ ẋ Aδx + Bδu

     

     

  • 8/13/2019 Unicycle Robot

    43/45

    A =∂f 

    ∂x (xe, ue)

    B =

    ∂f 

    ∂u  (xe, ue)

     

     ẋ =  f (x, u)

     

    ẍ =   1

    ac−

    b2

    cos2

    α bcα̇2 sin α −

    b2g sin2α

    2

      + T c − brw cos α

    rw

    α̈ =

      1

    ac − b2 cos2 α

    bga sin α −

    b2α̇2 sin2α

    2  + T 

    arw − b cos α

    rw

     

    α̇ = α̇

     

    (xe, ue) = (0, 0)  

    ∂f 1∂x1

    (xe, ue) = ∂ ̈x

    ∂  ẋ (xe, ue) =0

    ∂f 1∂x2

    (xe, ue) = ∂ ̈x

    ∂  α̇ (xe, ue) =0

    ∂f 1∂x3

    (xe, ue) = ∂ ̈x

    ∂α (xe, ue) = −

      b2g

    ac − b2

    α

    ∂f 2∂x

    1

    (xe, ue) = ∂ ̈α

    ∂  ẋ (xe, ue) =0

    ∂f 2∂x2

    (xe, ue) = ∂ ̈α

    ∂  α̇ (xe, ue) =0

    ∂f 2∂x3

    (xe, ue) = ∂ ̈α

    ∂α (xe, ue) =

      abg

    ac − b2

    α

    ∂f 3∂x2

    (xe, ue) = ∂  α̇

    ∂  α̇ (xe, ue) =1

     

     

  • 8/13/2019 Unicycle Robot

    44/45

    d

    dt

    α̇

    α

    =

    0 0

      −b2g

    ac−b2

    0 0

      abg

    ac−b2 0 1 0

    α̇

    α

    +

      c−brwrw(ac−b2)

      arw−brw(ac−b2)

    0

    τ 

     

     

       

     

     

     

     

     

     

     

     

     

     

  • 8/13/2019 Unicycle Robot

    45/45