Professional Documents
Culture Documents
Lecture2 ME5402 EE5106
Lecture2 ME5402 EE5106
Robot Dynamics
τ
D(q )q + C (q, q )q + G (q ) =
(Without considering frictions)
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS -1-
2.2 Lagrangian Method
d ∂L ∂L d ∂L ∂L
− =τ i.e. , − = τi
dt ∂q ∂q dt ∂qi ∂qi
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
i
ri --------- w.r.t. frame i
ri0 --------- w.r.t. frame 0
ri = T r
0 0 i
i i
d 0
Velocity: v = v = ri
0
i
0
How?
dt
(because Tj j −1 = q j )
∂q j
∂Ti0 ∆
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
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
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
Ki = ∫ dK i
1 i i
= Tr ∑ ∑ uip[∫ ri (ri ) dm ]uir qpqr
i i T T
2 p =1 r =1
1 i i
= Tr ∑ ∑ uip J iuir qpqr
T
2 p =1 r =1
n n i i
1
K = ∑ Ki
i =1
=
2
∑ ∑ ∑ ip i irqpqr )
Tr(
i =1
u J u T
p =1 r =1
n i i
1
=
2
∑∑∑ [Tr(u ip i ir )qpqr ]
J u T
i =1 p =1 r =1
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
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
𝐽𝐽𝑖𝑖 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.
Reference:
Advanced Engineering Mathematics,
Erwin Kreyszig and Wiley,
London, 1972:
Page 518
n
where d jk = ∑ Tr (uij J iuik )
T
i = max( j , k )
D is symmetric, dij = d ji
n
T ∑
∑x yi i = xT y q1 k =1
Trn1k k
q
1
=
qn n
2
∑ Trnnk qk q1
k =1
Trnjn
n
1 n n
∑ Tr njk qk = Trnj1
= ∑ q j ∑ Trnjk qk k =1
qn
=2 j 1= k 1
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 20 -
2.2 Lagrangian Method
Tr111 0 0
q1 q1
T
0
0 0
q1Tr111q1 =
qn qn
0 0 0 0
g = g x2 + g y2 + g z2 = 9.8m / s 2
0 x
0 y
g= r=
− 9.8 h
0 1
p =m × 9.8 × h =−mg T r
1 n n
= ∑∑ d ij (q )qi 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 + ∑ ∑ qi q j
dt ∂ q j =1 j =1 i =1 ∂ qi
k
∂ L 1 n n ∂ d ij (q) ∂ P(q)
= ∑∑ qi 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
=xD -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
11 2 2 1 1 2
( ) 1
2
= m 11 1
l θ +
2 12 m 2 l 2 θ1 + θ 2 + m2VD2
23 2
1 1 2 2 1 2
K1 = I + m ( l1 ) θ1 = I1θ1
2
c 1
2 2 The 𝜆𝜆 denotes Mass linear density.
21 1 1 1
K θ1 m1l1 + m2l2 + m2l1 + m2l1l2C2
= 2 2 2
6 6 2 2
21 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
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
( 𝒏𝒏 = 𝟐𝟐 )
d 22 q2 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 q2 d 21
∂L 1 1
=d11q1 + d12 q2 + d 21q2 + 0
∂ q1 2 2
1 1
=d11q1 + d12 q2 + d 21q2
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 qi q j + g k = τ k
i =1 j =1
1 n n ∂ d kj ∂ d ki
= ∑∑ [ +
2=i 1 =j 1 ∂ qi ∂ q j
]qi q j
q = q
d g1
dt G(q) =
d
q = q
dt g n
if N T = − N , show that xT Nx = 0, ∀x ≠ 0
n ∂d kj
Proof: Chain Rule d kj = ∑
qi
i =1 ∂qi
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 qi
2 ∂qi ∂q j ∂qk i =1
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
1 ∂d kj ∂d ki ∂d ij n
Cijk = [ + − ], Ckj = ∑ Cijk qi
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 q2
n
1
C21 = ∑ Ci12 qi =C112 q1 + C212 q2 = m2 l 2 s2 q1
i =1 2
1 1 1
C121q1 C221q2 =
C12 =+ − m2 l 2 s2 q1 − m2 l 2 s2 q2 =− m2 l 2 s2 (q1 + q2 )
2 2 2
C22 =C122 q1 + C222 q2 = 0
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
D
a1 v1
a= v=
Acceleration: a2 Velocity: v2
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
=k1
1
2
1
m1l12θ12 + I zz1θ12
2
=k2
1
2
( ) 1
m2 d 22θ12 + d22 + I zz2θ12
2
Then, the Kinetic Energy of system can be obtained:
Θ,Θ )
k (= ( m1l1 + I zz1 + I zz2 + m2 d 2 ) θ1 + m2 d22
1 2 2 2 1
2 2
Secondly, the Potential Energy of each link can also be obtained:
( Θ ) 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 ∂Θ
( 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θ1d2
2m 2d 2 θ1d2
+ ( m1l1 + m2 d 2 ) g cos θ1
(
C Θ,Θ = ) 2
− m d θ
2 2 1
2
M 1 + 2M 2c2 3
M 2 + M 2c2 − M 2s 2q2 − M 2s 2(q1 + q2 ) M 3c1 + M 4c12 + 2M 4c1
a + v + = τ
2 M 2 + M 2c2 2
M2 M 2s 2q1 0 M 4c12
3 3
2
τ1
M 1a1 + M 2 (2c2 a1 + a2 + c2 a2 − s2 q2 v1 − s2 (q1 + q2 )v2 ) + M 3c1 + M 4 (c12 + 2c1 ) =
3
2 2
M 1 0 + M 2 ( a1 + c2 a1 + a2 + s2 q1v1 ) + 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 q2 v1 − s2 (q1 + q2 )v2 ) + M 3c1 + M 4 (c12 + 2c1 ) =
3
2 2
M 1 0 + M 2 ( a1 + c2 a1 + a2 + s2 q1v1 ) + M 3 0 + M 4 c12 =τ 2
3 3
Ψ (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 q2 v1 − s1 (q1 + q2 )v2 c1 c12 + 2c1
3
Ψ (q, q , v, a ) =
0 2 2
a1 + c2 a1 + a2 + s2 q1v1 0 c12
3 3
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
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 JJ −1
JJ −1 = I −1 + JJ −1 =
JJ 0 JJ −1 = − JJ −1
J −1 = − J −1 JJ −1
Sam Ge: ME5402/EE5106/EE5064 | ADVANCED ROBOTICS - 58 -
Appendixes: Cartesian Space Dynamics
Gx ≤ Gx , etc
where
I1 + m3 q32 0 0
D(q) = 0 m2 + m3 0
0 0 m
3
m3q3q3 0 m3q3q1 0
C (q, q ) = 0 0 0 G (q ) = (m2 + m3 ) g
− m3 q3 q1 0 0 0
• Joint Space
τ
D(q )q + H (q,q ) + G (q ) =
• Cartesian Space
Dx (q ) x + H x (q, q ) + Gx (q ) = Φ
• 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 ) = Φ
=x f ( x ) + B( x )τ
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
l2
θ2
l1
m1
θ1
Fig. 2 x
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
l2
m2 I 2
r2 θ2
l1
r1 m1 I1
θ1
Fig. 3 x
m2
o y
θ1 θ2
x m1
Fig. 4