Download as pdf or txt
Download as pdf or txt
You are on page 1of 73

2.

Robot Dynamics

 2.1 L-E and N-E Equations


 2.2 Lagrangian Method
 2.3 Properties of Dynamic Model
 2.4 Neural Network Modelling

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -0-


2.2 Lagrangian Method
 2.2.1 The Preliminaries
Robot Dynamics is based on L-E Formulation (Equation)
Basic idea:
Apply the L – E equation to robots
d ∂L ∂L
− =τ
dt ∂q ∂q

τ
D(q )q + C (q, q )q + G (q ) =
(Without considering frictions)
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -1-
2.2 Lagrangian Method

• The so-called Lagrange-Euler equation

d ∂L ∂L d ∂L ∂L
− =τ i.e. , − = τi
dt ∂q ∂q dt ∂qi ∂qi

where L(q, q ) = K (q, q ) − P(q) (Lagrangian Function)


with K and P being the kinetic energy and potential energy,
respectively, and q  τ  1 1
qi = i-th generalized coordinate of robots q  τ 
q =  2 τ =  2
τ i = i-th generalized force/torque of robots  .   . 
   
 qn  τ n 
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -2-
2.2 Lagrangian Method
 2.2.2 Generalized Coordinates

What are the generalized coordinates & forces / torques


of robots?

A set of coordinates completely describe the location


( position and orientation ) of a robot with respect to
(w. r. t.) a reference frame.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -3-


2.2 Lagrangian Method
y * Various sets of generalized coordinates
exist.
θ2
* A common and natural choice of
generalized coordinates is to use joint
θ1 variables, θ i d
x i

y
qi = θ i for revolute joint
qi = d i for prismatic joint
θ2 * In what follows, the variable quantity,
θ1
i.e. θi for revolute joint and di for
x prismatic joint will be denoted by qi.
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -4-
2.2 Lagrangian Method
 2.2.3 Generalized Forces
• The definition of generalized forces depends on the
choice of generalized coordinates:
T ∂ri
k
τ i = ∑ fi
i =1 ∂q j
n
w = ∑τ i δ qi = τ δ qT

i =1

• IF joint variables are chosen as the generalized


coordinates, THEN the generalized force (or torque):
τ i is the applied force or torque at joint i.
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -5-
2.2 Lagrangian Method
 2.2.4 Joint Velocity
With respect to (w.r.t.) the figure below, a point P
fixed in link i can be expressed as

i
ri --------- w.r.t. frame i
ri0 --------- w.r.t. frame 0

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -6-


2.2 Lagrangian Method

ri = T r
0 0 i
i i

where Ti 0 = T10T21...Ti i −1 with


Ti i −1 : homogeneous transformation
matrix frame i expressed in
frame i-1

d 0
Velocity: v = v = ri
0
i
0
How?
dt

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -7-


2.2 Lagrangian Method
d 0 d 0 i d 0 1 i −1 i
vi0 = ri [T= r
i i ] (T1 T2 ...Ti ri ) Note that
dt dt dt
∂Tjj −1
T10T21 ...Ti i −1rii + ... + T10T21 ...Ti i −1rii + Ti 0 ri = Q jTjj −1
i ∂q j
i (=0)
= [∑ T1 T2 ...T j T j +1 ...Ti ]ri
0 1  j −1 j i −1 i
(Fu := Tjj −1Q j )
j =1
∂T j j −1

(because Tj j −1 = q j )
∂q j
∂Ti0 ∆

∂ j −1 = Tj0−1Q jTij −1 = uij


T ∂q j
i
= [∑ T10T21 ...T j j−−12 T j j+1 ...Ti i −1q j ]rii
j

j =1 ∂ qj
(Craig := Tj0Q jTij ) j ≤ i
i ∂ T j −1

= [∑ T j0−1 Ti j q j ]rii
j

j =1 ∂ qj i
i
∂ Ti 0 v = (∑ uij q j )rii
0

= [∑
i
q j ]rii j =1

j =1 ∂ q j

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -8-


2.2 Lagrangian Method
Remarks:
i −1
T
1) General form of i (Fu, et al P.87)

cθi −cα i sθ i sα i sθ i ai cθ i 
 sθ i cα i cθ i − sα i cθ i ai sθ i 
Ti =  0
i −1
sα i cα i di 
 0 0 0 1  Revolute Joint

cθi −cα i sθ i sα i sθ i 0
 sθ i cα i cθ i − sα i cθ i 0
Ti =  0
i −1
sα i cα i di 
 0 0 0 1  Prismatic Joint

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -9-


2.2 Lagrangian Method
2) Definition of Qi
0 −1 0 0 0 0 0 0 
 1 0  0 0 0 0 0 0 
Qi =  Qi = 0 1
Double Check?
0 0 0 0 0 0
 0 0 0 0  0 0  0 0 
Revolute Joint Prismatic Joint
0
3) Velocity of vi
i
uij = T Q jTi
0
j −1
j −1
vi0 = [∑ uij q j ]rii
j =1
(Craig := T j0Q jTi j )
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 10 -
2.2 Lagrangian Method
 2.2.5 Kinetic Energy (joint velocities)
Let Ki be the Kinetic energy of link i w.r.t. the base.
1 T
dK i = vi vi dm ( for mass dm) n
2 Tr ( A) = ∑ aii (diagonal elements)
1 i =1
= Tr (vi viT )dm
2

(1)  xi  (2)


 y   xi2 xi y i xi zi 0  a11 a12 a13 a14 
vi =  i    a a22 a23 a24 
 zi   y i xi y i2 y i zi 0 Tr ( A) = Tr  21
  vi vi =
T
 a31 a32 a33 a34 
 zi xi zi y i zi2 0   
 0  4×1    a41 a42 a43 a44 
 0 0 0 0 4×4
viT = [xi 0]1×4
4
y i zi = ∑ aii
i =1

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 11 -


2.2 Lagrangian Method
i
vi = ∑ uij q j ri
 i

j =1

i i
1
dK i = Tr[∑ uip q p ri (∑ uir q r rii )T ]dm
i

2 p =1 r =1
i i
1
= Tr{∑∑ uip [rii (rii )T dm]uirT q p q r }
2 p =1 r =1

Note that uip , uir , q p and q r, are independent of the


position rii in the link.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 12 -


2.2 Lagrangian Method

Integrate over all the points

Ki = ∫ dK i
1 i i 
= Tr ∑ ∑ uip[∫ ri (ri ) dm ]uir qpqr 
i i T T
2  p =1 r =1 
1 i i 
= Tr ∑ ∑ uip J iuir qpqr 
T
2  p =1 r =1 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 13 -


2.2 Lagrangian Method
 2.2.6 Total Kinetic Energy

n n i i
1
K = ∑ Ki
i =1
=
2
∑ ∑ ∑ ip i irqpqr )
Tr(
i =1
u J u T

p =1 r =1
n i i
1
=
2
∑∑∑ [Tr(u ip i ir )qpqr ]
J u T

i =1 p =1 r =1

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 14 -


2.2 Lagrangian Method

where
 x i2dm x i y idm ∫ x i zidm ∫ x idm 
 ∫ ∫ 
 xi 
y 
 ∫ x i y idm ∫ y i dm ∫ y i zidm ∫ y idm 
2

Ji = ∫ ri (ri ) dm = 
i i T ri =  i
  zi 
∫ ∫ ∫ dm ∫ zidm 
2
x z dm y z dm z
i i i i i  
 x dm  1
 ∫ ∫ ∫ ∫ 
i y idm z i dm dm
1 _

 2 (−I xx + I yy + I zz ) I xy I xz mi xi 
 _ 
 1
I xy (I xx − I yy + I zz ) I yz mi y i 
=  2 
 1 _ 

 I xz I yz (I xx + I yy − I zz ) m i zi 
 2 
_ _ _
 mi xi mi y i m i zi m i 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 15 -


2.2 Lagrangian Method

with
I xx = ∫v ( y 2 + z 2 )dm I xy = ∫v xydm

I yy = ∫v ( x 2 + z 2 )dm I yz = ∫v yzdm

I zz = ∫v ( x 2 + y 2 )dm I xz = ∫v xzdm

mi ---- the mass of link


( xi , yi , zi ) ---- the centre of mass
v ---- the volume of link
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 16 -
2.2 Lagrangian Method
The moment of inertia, also known as mass moment of inertia,
can be denoted with J or I and defined as follows.
Ji = ∫ i i ) dm
i i T
r ( r (Units: 𝑘𝑘𝑘𝑘/𝑚𝑚2 or 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠/𝑓𝑓𝑓𝑓 2 )

where 𝐽𝐽𝑖𝑖 is used for rigid body rotation problems, including:


1) “𝐹𝐹 = 𝑚𝑚𝑚𝑚” analysis moment equation ( ∑ 𝑀𝑀𝑖𝑖 = 𝐽𝐽𝑖𝑖 � 𝛼𝛼);
1
2) Rotational kinetic energy ( 𝑇𝑇 = 𝐽𝐽𝑖𝑖 𝜔𝜔2 );
2
3) Angular momentum (𝐻𝐻𝑖𝑖 = 𝐽𝐽𝑖𝑖 � 𝜔𝜔).

𝐽𝐽𝑖𝑖 is the resistance of the body to angular acceleration. That is, for a given net
moment or torque on a body, the larger a body’s 𝐽𝐽𝑖𝑖 , the lower will be its angular
acceleration, 𝛼𝛼.
𝐽𝐽𝑖𝑖 also affects a body’s angular momentum, and how a body stores kinetic energy in
rotation.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 17 -


2.2 Lagrangian Method

Reference:
Advanced Engineering Mathematics,
Erwin Kreyszig and Wiley,
London, 1972:
Page 518

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 18 -


2.2 Lagrangian Method

Kinetic Energy can be expressed as


1 T
K = q D(q )q
2

n
where d jk = ∑ Tr (uij J iuik )
T

i = max( j , k )

D is symmetric, dij = d ji

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 19 -


2.2 Lagrangian Method
Tr
Proof: Define ijk := Tr (u T
ij i ik )
J u
1 n i i
K = ∑∑∑ [Tr (uij J i uik T )q j qk
2 =i 1 =j 1 =k 1
1 1 2 2 1 n n
= q1Tr111q1 + ∑∑ Tr2 jk q j qk + ... + ∑∑ Trnjk qk q j
2 2 =j 1 =k 1 2 =j 1 =k 1

 n 
T ∑ 
∑x yi i = xT y  q1   k =1
Trn1k k 
q
1  
=    
 qn   n 
2
∑ Trnnk qk   q1 
 k =1 
 Trnjn    
n

1 n  n 
∑ Tr njk qk = Trnj1
= ∑ q j  ∑ Trnjk qk  k =1
 qn 
=2 j 1= k 1 
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 20 -
2.2 Lagrangian Method
Tr111 0  0
 q1   q1 
T
 0 
0  0  
q1Tr111q1 =    
 
    
 qn     qn 
 0 0 0 0

1  q1  Tr211 Tr212   q1 


T
1
K= q1Tr111q1 +       + ...
2 2  q2  Tr221 Tr222   q2 

 q1  ... Trn1n   q1 


T
Trn11 Trn12
 q  Tr    
+
1  2  n21 Trn22 ... Trn2n   q2 
2 .   . . ... .  . 
    
 qn  Trnn1 Trnn2 ... Trnnn   qn 
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 21 -
2.2 Lagrangian Method

The "pyramid" model of the Inertia matrix D(q)

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 22 -


2.2 Lagrangian Method
• Potential Energy
For link i,
Pi = −mi g T ri 0
= −mi g T (Ti 0 ri i )

ri 0 : position of the mass centre


mi : mass of link i
g : gravity vector, g T = ( g x , g y , g z ,0)

• Total Potential Energy


n
P = ∑ Pi = − ∑ mi g T (Ti 0 ri i )
i =1

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 23 -


2.2 Lagrangian Method
Note that

g = g x2 + g y2 + g z2 = 9.8m / s 2

For a level system

 0  x 
 0   y
g=  r= 
− 9.8 h 
   
 0  1 

p =m × 9.8 × h =−mg T r

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 24 -


2.2 Lagrangian Method
 2.2.7 Motion Equation
• Lagrangian Function:
L(q, q ) = K − P
n
1 T
= q D (q )q + ∑ mi g T (Ti 0 ri i )
2 i =1

1 n n
= ∑∑ d ij (q )qi q j − P (q )
2 i =1 j =1

• Lagrange-Euler equations:
d ∂L ∂L
− =τi
dt ∂ q ∂ q
i i
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 25 -
2.2 Lagrangian Method

Therefore,
∂L n
= ∑ d kj (q )q j , k = 1,...n
∂ q j =1
k

d ∂L n n
 n ∂ d kj (q ) 
= ∑ d kj (q )q j + ∑ ∑ qi  q j
dt ∂ q j =1 j =1  i =1 ∂ qi 
k

∂ L 1 n n ∂ d ij (q) ∂ P(q)
= ∑∑ qi q j −
∂q 2 i =1 j =1 ∂ qk ∂ qk
k
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 26 -
2.2 Lagrangian Method
Example 2.3: Deriving the motion equation of a 2 DOF manipulator with
using Lagrangian method. Let 𝐈𝐈𝟏𝟏 and 𝐈𝐈𝟐𝟐 be the moment of inertia of each
link, and centroid is at the center of each link.
Let cosθ1 = C1
By doing the derivation for the equation
of centroid position of link 2, we can
sinθ1 = S1
obtain the velocity of link 2:
cosθ 2 = C 2
sinθ 2 = S2 l1 cosθ1 +
xD =
1
l2 cos(θ1 + θ 2 )
cos(θ1 + θ 2 ) = C12 2
sin(θ1 + θ 2 ) = S12
1
=xD -l1S1θ1 - l2S12
(θ1 + θ2)
2
1
l1 sin θ1 +
yD = l2 sin(θ1 + θ 2 )
2

1
l1C1θ1 +
y D = (θ1 + θ2)
l2 C12
2
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 27 -
2.2 Lagrangian Method
Then we shall obtain the resultant velocity of link 2.

V=
2
D

x 2
D + 
y 2
D Equation (1)
1 1 1
= θ12 (l12 + l22 + l1l2C2 ) + θ22 ( l22 ) + θ1 θ2 ( l22 + l1l2C2 )
4 4 2
Considering the Kinetic Energy of the system consists of the Kinetic Energy of link 1
and link 2 respectively, we can obtain that

=
K K1 + K 2 Equation (2)

 1 2   1   1 
=  I1θ1  +  I 2 (θ1 + θ 2 ) + m2VD2 
2

2  2 2 
11 2  2 1  1 2  
 ( ) 1
2
=  m 11  1
l θ + 
 2 12 m 2 l 2  θ1 + θ 2 + m2VD2 
23     2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 28 -


2.2 Lagrangian Method
note
 1 2  11 2  2
About the derivation: I θ
 1 1  →  m1 1  θ1
l
2  23 

1 1 2 2 1 2
K1 = I + m ( l1 )  θ1 = I1θ1
2
c 1
2  2 The 𝜆𝜆 denotes Mass linear density.

The 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 𝐴𝐴 is the shaft of the rod.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 29 -


2.2 Lagrangian Method
After substituting Equation (1) into Equation (2), we can obtain that

 21 1 1 1 
K θ1  m1l1 + m2l2 + m2l1 + m2l1l2C2 
= 2 2 2

6 6 2 2 
 21 2   1 1 
+θ 2  m2l2  + θ1 θ 2  m2l2 + m2l1l2C2 
2

6  3 2 

Due to the Potential Energy of the system consists of the Potential Energy of link 1
and link 2, respectively, we can obtain that

l1  l2 
P =m1 g S1 + m2 g  l1S1 + S12 
2  2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 30 -


2.2 Lagrangian Method
Based on the above derivation, we shall obtain the Lagrangian Function of the 2-DOF
manipulator:
L = K-P
1 1 1 1  1 
= θ12  m1l12 + m2l22 + m2l12 + m2l1l2C2  + θ22  m2l22 
6 6 2 2  6 
  1 1  l1  l2 
+θ1 θ 2  m2l2 + m2l1l2C2  − m1 g S1 − m2 g  l1S1 + S12 
2

3 2  2  2 
By conducting the derivative process for the above Lagrangian Function, we shall obtain the
following two motion functions.
1 1 
 + 1 1 
τ=
1  m l
11
2
+ m l
2 1
2
+ m l
2 2
2
+ m l l C θ
2 1 2 2 1  m2 2 +
l 2
m2l1l2C2  θ2
3 3  3 2 
1  1  1
− ( m2l1l2 S 2 ) θ1 θ2 −  m2l1l2 S 2  θ22 +  m1 + m2  gl1C1 + m2 gl2C12
2  2  2
1 1 
 + 1  +  1 
 2 + m gl C1
τ2 =
 m l
2 2
2
+ m l l C θ
2 1 2 2 1  m l 2
2 2  2θ  m l l S θ
2 1 2 2 1 2 2 12
3 2  3  2  2
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 31 -
2.2 Lagrangian Method
 The More Detailed Analysis for a 2 DOF manipulator
( 𝒏𝒏 = 𝟐𝟐 )

1  q1   d11 d12   q1  1


T
1 1 1
   =  2
+   +   +  2

d 22   q2  2 11 1 2 12 1 2 2 21 1 2 2 22 2
d q d q q d q q d q
2  q2   d 21

∂L 1 1
=d11q1 + d12 q2 + d 21q2 + 0
 
∂ q1 2 2
1 1
=d11q1 + d12 q2 + d 21q2
2 2
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 32 -
2.2 Lagrangian Method
By applying with the Lagrange-Euler equation:
n n n  ∂ d kj (q ) 1 ∂ dij (q )  ∂ P(q)
∑ d kj ( q ) 
q j + ∑∑ 
=i 1 =j 1  ∂ 

∂   
q 
q
i j +

τk
= k= 1, ..., n
=j 1 q i 2 q k  qk

Let ∂ d kj 1 ∂ dij
= −
Cijk :
∂ qi 2 ∂ qk *
∂P n
gk = = ∑ (−m j g T u jk rj j )
∂qk j = k
Then, the motion equations become
n n n

∑d
j =1
kj q j + ∑∑ Cijk qi q j + g k = τ k
i =1 j =1

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 33 -


2.2 Lagrangian Method
Note that
n ∂ d kj
n
1  n n ∂ d kj ∂ d kj 
=∑∑
=i 1 =j 1 ∂ qi
 
qi q j ∑∑ [
2 =i 1 =j 1 ∂ qi
 
qi q j +
∂ qi
 
qi q j ]

( for = A ( A + A) / 2)
1 n n ∂ d kj ∂ d ki
∑∑ [
2=i 1 =j 1 ∂ qi
qi q j +
∂ qj
qi q j ]

1 n n ∂ d kj ∂ d ki
= ∑∑ [ +
2=i 1 =j 1 ∂ qi ∂ q j
]qi q j

Exchange the order of summation for 2nd term


1 ∂d kj ∂d ki ∂d ij
∴ Cijk ∆ [ + − ]
2 ∂qi ∂q j ∂qk Christoffel Symbols
*
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 34 -
2.2 Lagrangian Method
It is common to write the motion equations in matrix form as
n
D(q)q + C(q,q)q + G(q) = τ Ckj = ∑ Cijk qi
i =1

joint variable vector a vector of coriolis and centrifugal forces


 q1  C (q, q )q
q 
q =  2
 . 
  a vector of gravity forces
 qn 

q = q
d  g1 
dt G(q) =   
d  
q = q
dt  g n 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 35 -


2. Robot Dynamics

 2.1 L-E and N-E Equations


 2.2 Lagrangian Method
 2.3 Properties of Dynamic Model
 2.4 Neural Network Modelling

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 36 -


2.3 Properties of Dynamic Model
 2.3.1 The Properties of Each Term in the Dynamic Model
1) The inertia matrix D(q) is
• Symmetric : DT=D
• Positive Definite : Q = xT D x>0, ∀x ≠ 0
WHY? ( The Kinetic energy K = 1 / 2q T D(q)q )

2) C (q, q )q is Quadratic in q

3) G(q) is a function of q only

4) There is an independent control input τ i for each degree-


of-freedom
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 37 -
2.3 Properties of Dynamic Model

5) Linear-in-the-parameters dynamics (LIPS dynamics)


All the constant parameters of interest, such as link masses,
moments of inertia, etc, appear as coefficients of known functions
of the generalized coordinates.

By defining coefficients as a parameter vector, we have


D(q )q + C (q, q )q + G (q) = Y (q, q , q) P
D(q )a + C (q, q )v + G (q) = Ψ (q, q , v, a) P
For example, a
b 
(a + bθ )θ + c sin θθ + g cos θ = f θ θθ sin θθ cos θ    = f
  c
 
g
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 38 -
2.3 Properties of Dynamic Model

6) The matrix N ∆ D (q) − 2C (q, q ) is skew-symmetric:


N T = − N or n jk = −nkj

if N T = − N , show that xT Nx = 0, ∀x ≠ 0

n ∂d kj
Proof: Chain Rule d kj = ∑
 qi
i =1 ∂qi

The kjth element of N is nkj = dkj − 2Ckj


n ∂d kj ∂d kj ∂d ki ∂d ij
= ∑{ −[ + − ]}qi
i =1 ∂qi ∂qi ∂q j ∂qk
n ∂d ij ∂d ki
= ∑[ − ]qi
i =1 ∂qk ∂q j
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 39 -
2.3 Properties of Dynamic Model

The same procedure


n jk = d jk − 2C jk
n ∂d jk ∂d jk ∂d ji ∂d ik
= ∑{ −[ + − ]}qi
i =1 ∂qi ∂qi ∂qk ∂q j
∂d ji ∂d ik
n
= −∑ [ − ]qi
i =1 ∂qk ∂q j
∂d ij ∂d ki
n
= −∑ [ − ]qi ( d ij = d ji )
i =1 ∂qk ∂q j
= − nkj

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 40 -


2.3 Properties of Dynamic Model
 2.3.2 Case Analysis (pp.98, Fu, et al)
 Joint variables: θ1 , θ 2
 Masses of links: m1 , m2
 Link parameters: α1 = α 2 = 0 d1 = d 2 = 0 a1 = a2 = l
T10 , T21 , T20 = T10T21

0 − 1 0 0
1 0 0 0
Qi =  for revolute joint
0 0 0 0
 
0 0 0 0

=u11 Q=T
1 1
0
, u 21 Q=T
1 2
0
, u 22 T1
0
Q T
2 2
1

Knowing J i D(θ )
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 41 -
2.3 Properties of Dynamic Model

Suppose that
1 2 1  1 1 
0 0 − m1l  3 2m l 2
0 0 − m2l 
 3 m1l 2 2
 0 0 0 0 
 0 0 0 0 
Ji =   J2 =  
 0 0 0 0   0 0 0 0 
 1   1 
− 2 m1l 0 0 m1  − 2 m2l 0 0 m2 

1 4
d11 = m1l 2 + m2l 2 + m2l 2 c2
3 3
1 1
d12 = d 21 = m2l 2 + m2l 2 c2 ci = cos θ i , si = sin θ i ,
3 2
1 cij = cos(θ i + θ j ), sij = sin(θ i + θ j ).
d 22 = m2l 2
3
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 42 -
2.3 Properties of Dynamic Model
From 1 ∂d kj ∂d ki ∂d ij n
Cijk = [ + − ], Ckj = ∑ Cijk qi
2 ∂qi ∂q j ∂qk i =1

C (q, q ) can be defined as: (qi = θ i )


Independent of q1

1 ∂d11 ∂d 21 1 ∂d11 1
C111 = =0 C112 = − = m2l 2 s2
2 ∂q1 ∂q1 2 ∂q2 2
1 ∂d11 1 1 ∂d 22
C121 = C211 = = − m2l 2 s2 C122 = C212 = =0
2 ∂q2 2 2 ∂q1
∂d12 1 ∂d 22 1 1 ∂d 22
C221 = − = − m2l 2 s2 C222 = =0
∂q2 2 ∂q1 2 2 ∂q2

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 43 -


2.3 Properties of Dynamic Model

1 ∂d kj ∂d ki ∂d ij n
Cijk = [ + − ], Ckj = ∑ Cijk qi
2 ∂qi ∂q j ∂qk i =1

n
1
C11 =∑i =1
C 
q
i11 i =+
C 
q
111 1 C 
q
211 2 = −
2
m2 l 2 s2 q2
n
1
C21 = ∑ Ci12 qi =C112 q1 + C212 q2 = m2 l 2 s2 q1
i =1 2
1 1 1
C121q1 C221q2 =
C12 =+ − m2 l 2 s2 q1 − m2 l 2 s2 q2 =− m2 l 2 s2 (q1 + q2 )
2 2 2
C22 =C122 q1 + C222 q2 = 0

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 44 -


2.3 Properties of Dynamic Model
In matrix form
 1 1 
 2 2 s2 q 2
− − m2l 2 s2 (q1 + q 2 )
2
m l
C (q, q ) =  2
1 
 m2l 2 s2 q1 0 
 2 
Note that C (q, q )q = h(q, q ) in the text book

l l
P m1 g sin θ1 + m2 g[l sin θ1 + sin(θ1 + θ 2 )]
=
2 2
 ∂P  1 1 
 
∂P  ∂q1  m glc + m
 2 1 1 2 2 12 glc + m2 glc1
=
G = G (q) =  
∂q  ∂P  1
   m2 glc12 

 2
q  2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 45 -


2.3 Properties of Dynamic Model
• The Summary of Properties:
Let 1 4 1
M 1 = m1l 2 + m2l 2 M 2 = m2l 2
3 3 2
1 1
M 3 = m1 gl M 4 = m2 gl
2 2
Then, the motion equations become
 2 
 M 1 + 2M 2c2 3
M 2 + M 2c2  − M 2s 2q2 − M 2s 2(q1 + q2 ) M 3c1 + M 4c12 + 2M 4c1 
  a +  v +   = τ
 2 M 2 + M 2c2 2
M2   M 2s 2q1 0   M 4c12 
 3 3 

D
 a1   v1 
a=  v= 
Acceleration:  a2  Velocity:  v2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 46 -


2.3 Properties of Dynamic Model
Example 2.4: Deriving dynamics equation for RP manipulator with using
Lagrangian method. Let 𝑰𝑰𝟏𝟏 and 𝑰𝑰𝟐𝟐 be the moment of inertia of each link,
and centroid and the mass of each link is shown in the following figure.
The matrix expressions of 𝑰𝑰𝟏𝟏 and 𝑰𝑰𝟐𝟐 are also presented as follows.

I xx 1 0 0 
 
I1 =  0 I yy 1 0 
 0 0 I zz 1 

I xx 2 0 0 
 
I2 =  0 I yy 2 0 
 0 0 I zz 2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 47 -


2.3 Properties of Dynamic Model
Firstly, we can obtain the Kinetic Energy of link 1 and link 2, respectively:

=k1
1
2
1
m1l12θ12 + I zz1θ12
2
=k2
1
2
( ) 1
m2 d 22θ12 + d22 + I zz2θ12
2
Then, the Kinetic Energy of system can be obtained:

Θ,Θ )
k (= ( m1l1 + I zz1 + I zz2 + m2 d 2 ) θ1 + m2 d22
 1 2 2  2 1
2 2
Secondly, the Potential Energy of each link can also be obtained:

u1 = m1l1 g sin θ1 u 2 = m2 gd 2 sin θ1

Therefore, the Potential Energy of system is shown as follows:

( Θ ) g ( m1l1 + m2 d 2 ) sin θ1
u=
d ∂k ∂k ∂u
Considering the motion equation of the robot can be shown as: − + = τ

dt ∂Θ ∂Θ ∂Θ
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 48 -
2.3 Properties of Dynamic Model
d ∂k ∂k ∂u
After conducting the derivative process for − + = τ

dt ∂Θ ∂Θ ∂Θ
∂k ∂k ∂u
We shall obtain the expression of ∂Θ , ∂Θ and ∂Θ

∂k ( m1l1 + I zz1 + I zz 2 + m2 d 2 ) θ1  ∂u  g ( m1l1 + m2 d 2 ) cos θ1 


2 2
∂k  0 
=  =  2  , = 

∂Θ 
, ∂Θ
m 2d 2 θ1  ∂Θ  gm2 sin θ1
m2 d 2  
∂k ∂k ∂u d ∂k ∂k ∂u
Finally, substituting ,
 ∂Θ and into − + = τ , we can obtain that
∂Θ ∂Θ 
dt ∂Θ ∂Θ ∂Θ

( m1l12 + I zz1 + I zz 2 + m2 d 22 )
τ 1= ( m l + I zz1 + I zz 2 + m2 d ) θ1
11
2 2
2 D ( Θ ) =
0

 0 m2 
+2m2 d 2θ1d2
2m 2d 2 θ1d2 
+ ( m1l1 + m2 d 2 ) g cos θ1
( 
C Θ,Θ = ) 2 
 − m d θ
2 2 1 

τ 2 = m 2d2 - m 2d 2 θ12 + m 2g sin θ1  (m l + m2 d 2 ) g cos θ1 


G ( Θ ) = 1 1 
 m 2 g sin θ 1 
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 49 -
Appendixes: Tutorial

 Appendix 2.1: Tutorial


Linear-in-the-parameter (LIP) form?
 ˆ 2 ˆ 
 M 1 + 2 ˆ c
M 2 2 M 2 + Mˆ 2 c2 
D=
ˆ 3
2 2 ˆ 
 Mˆ 2 + Mˆ 2 c2 M2 
3 3 
P = [M 1 , M 2 , M 3 , M 4 ] , find Ψ (q, q , v, a )
T
Let
such that Ψ (q, q , v, a) P = τ
where
 v1   a1   q1   q1 
v =  , a =  , q =  , q =  
v 2   a2   q2  q 2 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 50 -


Appendixes: Tutorial

 2 
 M 1 + 2M 2c2 3
M 2 + M 2c2  − M 2s 2q2 − M 2s 2(q1 + q2 ) M 3c1 + M 4c12 + 2M 4c1 
  a +  v +   = τ
 2 M 2 + M 2c2 2
M2   M 2s 2q1 0   M 4c12 
 3 3 

• Step1: Decomposing the above equation


2
τ1
( M 1 + 2 M 2 c2 )a1 + ( M 2 + M 2 c2 )a2 − M 2 s2 q2 v1 − M 2 s2 (q1 + q2 )v2 + M 3c1 + M 4 c12 + 2M 4 c1 =
3
2 2
( M 2 + M 2 c2 )a1 + M 2 a2 + M 2 s2 q1v1 + M 4 c12 = τ2
3 3

2
τ1
M 1a1 + M 2 (2c2 a1 + a2 + c2 a2 − s2 q2 v1 − s2 (q1 + q2 )v2 ) + M 3c1 + M 4 (c12 + 2c1 ) =
3
2 2
M 1 0 + M 2 ( a1 + c2 a1 + a2 + s2 q1v1 ) + M 3 0 + M 4 c12 =τ 2
3 3
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 51 -
Appendixes: Tutorial
2
τ1
M 1a1 + M 2 (2c2 a1 + a2 + c2 a2 − s2 q2 v1 − s2 (q1 + q2 )v2 ) + M 3c1 + M 4 (c12 + 2c1 ) =
3
2 2
M 1 0 + M 2 ( a1 + c2 a1 + a2 + s2 q1v1 ) + M 3 0 + M 4 c12 =τ 2
3 3

• Step2: Establishing the LIP model

Ψ (q, q , v, a ) P = τ P = [M 1 , M 2 , M 3 , M 4 ]
T

 2 
 1a 2 c a
2 1 + a2 + c2 a2 − s2 q2 v1 − s1 (q1 + q2 )v2 c1 c12 + 2c1 
3
Ψ (q, q , v, a ) =
 
0 2 2
a1 + c2 a1 + a2 + s2 q1v1 0 c12 
 3 3 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 52 -


Appendixes: Remarks

 Appendix 2.2: Remarks


• Model building of the robot dynamics is essential for
numerical simulation, and control system design.
• General coordinates, forces/torques of robots, joint
velocities, and kinetic and potential energies are key
concepts in modeling of robot dynamics.
• Typical dynamic equations of robots in joint space is
given as follows:
D(q )q + C (q, q )q + G (q ) = τ
• Properties of the robotic dynamics are significant for
control system design.
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 53 -
Appendixes: Cartesian Space Dynamics

 Appendix 2.3: Cartesian Space Dynamics

The joint space dynamics is given by

D(q )q + C (q, q )q + G (q ) = τ

It is desirable to express the dynamics of robots in Cartesian space


or task space variables rather than in joint space variables q since
the tasks of robotic manipulators are often expressed in Cartesian
space.

For simplicity, only non-redundant robots are considered here.

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 54 -


Appendixes: Cartesian Space Dynamics

Let x = [r ,θ ] , with r and θ being the position and orientation


T T T

in the base frame. According to forward kinematics, x can be


expressed as a non-linear function of q as x = h(q).

Differentiating twice yields


x = J (q )q q = J −1 x
x = J (q )q + J (q )q
where the Jacobian matrix is
 ∂h1 ∂h1 ∂h1 

 ∂q ∂q2 ∂qn 
∂h  1 
J (q) = =     
∂q
 ∂hn ∂hn

∂hn 
 ∂q1 ∂q2 ∂qn 
 
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 55 -
Appendixes: Cartesian Space Dynamics

Assuming that the robot manipulator is away from the workspace


−1
singularities, i.e. | J (q) |≠ 0 and J (q) exists. Then we have

q = J −1 (q )( x − J (q )q )

which is the “inverse acceleration” transformation.

q = J −1 ( q) x − J −1 ( q) J (q)q


= J −1 (q) x − J −1 (q ) J (q ) J −1 x

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 56 -


Appendixes: Cartesian Space Dynamics

Thus, the Cartesian dynamics of robots is obtained as


DJ −1 x + (C − DJ −1 J ) J −1 x + G = τ
Recall that τ = J F , where F is the Cartesian force vector
T

J −T DJ −1 x + J −T (C − DJ −1 J ) J −1 x + J −T G = F

or Dx x + C x x + Gx = F

where
Dx = J −T DJ −1 , C x = J −T (C − DJ −1 J ) J −1 , Gx = J −T G

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 57 -


Appendixes: Cartesian Space Dynamics

Note: All the properties listed for the joint space dynamics carry
over to the Cartesian dynamics as long as J (q) is nonsingular.
• Dx is symmetric and positive definite
• D x − 2C x is skew-symmetric

dJ −1 / dt = − J −1 JJ −1

JJ −1 = I  −1 + JJ −1 =
JJ 0 JJ −1 = − JJ −1

J −1 = − J −1 JJ −1
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 58 -
Appendixes: Cartesian Space Dynamics

 The Property of linear in the parameters holds


Dx y + C x y + Gx = Wx ( y, y , y)θ
where the known Cartesian function is
Wx ( y, y , y) = J −T W (q, q , q)
and θ is the vector of arm parameters.

 α x1I ≤ Dx ≤ α x 2 I where α x1,α x 2 are known constants.

 Gx ≤ Gx , etc

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 59 -


Appendixes: Example

 Appendix 2.4: Three-link Robot in 3D Space


The position of the end-effector
is then given by
q3 cos(q1 )
x = h(q ) = q3 sin(q1 ) 
 q2 

The Jacobian matrix


− q3 sin( q1 ) 0 cos(q1 )
∂h 
J= =  q3 cos(q1 ) 0 sin( q1 ) 
∂q
 0 1 0 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 60 -


Appendixes: Example

The joint space dynamic equations can be obtained as


D(q )q + C (q, q )q + G (q ) = τ

where
 I1 + m3 q32 0 0
 
D(q) =  0 m2 + m3 0 
 0 0 m 
 3 

m3q3q3 0 m3q3q1   0 
C (q, q ) =  0 0 0  G (q ) = (m2 + m3 ) g 
− m3 q3 q1 0 0   0 

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 61 -


Appendixes: Example

The Cartesian space dynamic equations can be obtained as


Dx (q ) x + C x (q, q ) x + Gx (q ) = F
where
 m3 + I1q3 sin 2 q1 − I1q3 sin q1 cos q1 0 
 
Dx (q) = − I1q3 sin q1 cos q1 m3 + I1q3 cos q1
2
0 
 0 0 m2 + m3 
 
− I1a1 sin q1 I1a2 sin q1 0   0 
 

C x (q, q ) =  I1a1 cos q1 − I1a2 cos q1 0  Gx (q ) =  0 

 0 0 0  (m2 + m3 ) g 
 
with I1 = I1 / q33 , a1 = q3 sin q1 − q3q1 cos q1 , a2 = q3 cos q1 + q3q1 sin q1
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 62 -
Appendixes: Cases in Two Spaces

 Appendix 2.5: Robot Dynamics in Two Spaces

• Joint Space
τ
D(q )q + H (q,q ) + G (q ) =

• Cartesian Space
Dx (q ) x + H x (q, q ) + Gx (q ) = Φ

x = [ x, y, z ,ψ , ϕ , ϑ ]T ---Cartesian position and orientation vector of the


end-effector
Φ = [φ x , φ y , φ z ,τ x ,τ y ,τ z ] ---force-torque vector acting on the end-effector
T

This model is useful for force controller design.


Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 63 -
Appendixes: Friction Effects

 Appendix 2.6: Inclusion of Friction Effects

• Joint Space
τ
D(q )q + H (q,q ) + G (q ) + F (q, q ) =
 cq viscous friction

F = c sgn(q ) Couloumb friction
 ...

• Cartesian Space
Dx (q ) x + H x (q, q ) + Gx (q ) + Fx (q, q ) = Φ

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 64 -


Appendixes: Dynamic Simulation

 Appendix 2.7: Dynamic Simulation


Simulation means finding the responses of the system in
terms of 𝑞𝑞, 𝑞𝑞,̇ 𝑞𝑞̈ when given a torque vector 𝜏𝜏 for a finite
.time period

In terms of mathematics, it means numerical solutions for a set of


differential equations.

For the dynamic equations:


τ
D(q )q + H (q,q ) + G (q ) =
We have
q = D -1 (q )[τ − H (q,q ) − G (q )]

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 65 -


Appendixes: Dynamic Simulation

There are two methods:


1) Simple Integration Method
Given initial conditions q (0) , q (0) , we have
q(t ) = D -1 (q (t ) )[ τ (t ) − H(q (t ) ,q (t ) ) − G(q (t ) )]
q (t + ∆=t ) q (t ) + q(t )∆t
1
q (t + ∆= t ) q (t ) + q (t )∆t + q(t )∆t 2
2
2) General Numerical Solution
Define = , x2 q=
x1 q= , x [ x1T , x2T ]T, then it shall be obtained that

=x f ( x ) + B( x )τ

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 66 -


Appendixes: Dynamic Simulation

For this 1st order ordinary differential equations,


many numerical methods can be applied:

Runge-Kutta method ( of 4th order )


Adams method
Adaptive Step Size Numerical method

Reference:
S.S. Ge, T.H. Lee and C.J. Harris, Adaptive Neural Network Control
of Robotic Manipulators, World Scientific, London, December 1998.
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 67 -
Assignment

1. Derive the dynamics for the robot shown in Fig.1 using any
method that you are comfortable with and compare.

m2

q2
Displacements: q1 and q2
m1 q1

Forces: τ 1 and τ 2

Masses: m1 and m2

Fig.1

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 68 -


Assignment
2. Suppose the robot is under the influence of gravitational
acceleration. Assume the mass of each link is lumped at end
of the link. Under the assumption of lumped equivalent
masses, derive the Dynamic equation using any method you
feel comfortable with.
y
m2

l2
θ2

l1
m1
θ1
Fig. 2 x

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 69 -


Assignment

Hint:
a) Find the positions and velocities of m1 and m2 with respect to
the base xyz
b) Find the kinetic energy K and the potential energy V
c) Find the expression for matrix D(θ ) from
1
K = θT D(θ )θ
2
d) Find the Lagrange-Euler Equations
D(θ )θ + C (θ , θ)θ + G (θ ) =
τ
where
∂V 1 ∂ d kj ∂ d ki ∂ d ij

n

G (θ )= , C= 
Cijkθ i , Cijk= ( + − )
∂θ kj
i =1 2 ∂θ i ∂θ j ∂θ k

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 70 -


Assignment
3. Suppose the robot is under the influence of gravitational
acceleration. Assume the mass of each link is lumped at the
centre of the link. ri denotes the distance from joint i to the
centre of mass of link, and li denotes the length of link i. Under
the assumption of lumped equivalent masses, derive the
Dynamic equation using any method you feel comfortable with.
y

l2
m2 I 2
r2 θ2
l1
r1 m1 I1
θ1
Fig. 3 x

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 71 -


Assignment
4. Consider the 2 link robot in 3D space, assume that the mass of each
link is lumped at end of the link.
i) Under the assumption of lumped equivalent masses, derive the
dynamics of equation.
ii) Is there any possible configurations for 2 link robots?
iii) Can you image the complexity of higher degree of freedom robots?
z

m2

o y

θ1 θ2
x m1
Fig. 4

Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 72 -

You might also like