You are on page 1of 77

ROBOTICS : A DVANCED C ONCEPTS

&
A NALYSIS
M ODULE 6 – DYNAMICS OF S ERIAL AND PARALLEL
ROBOTS

Ashitava Ghosal1
1 Department of Mechanical Engineering
&
Centre for Product Design and Manufacture
Indian Institute of Science
Bangalore 560 012, India
Email: asitava@mecheng.iisc.ernet.in

NPTEL, 2010
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 1 / 77
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 2 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 3 / 77
OVERVIEW
Kinematics → Cause of motion not considered.
Dynamics → Motion of links of a robot due to external
forces and/or moments.
Main assumption: All links are rigid – No deformation.
Motion of links described by ordinary differential equations
(ODEs), also called equations of motion.
Several methods to derive the equations of motion –
Newton-Euler, Lagrangian and Kane’s methods.
Newton-Euler – Obtain linear and angular velocities and
accelerations of each link, free-body diagrams, and
Newton’s law and Euler equations.
Lagrangian formulation – Obtain kinetic and potential
energy of each link, obtain the scalar Lagrangian, and take
partial and ordinary derivatives.
Kane’s formulation – Choose generalised coordinates and
speeds, obtain generalised active and inertia forces, and
equate the active and inertia forces.
Each formulation has its advantages and
.
disadvantages.
. . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 4 / 77
OVERVIEW
Two main problems in robot dynamics:
Direct problem – Obtain motion of links given the applied
external forces/moments.
Inverse problem – Obtain joint torques/forces required for
a desired motion of links.
Direct problem involves solution of ODE’s → Simulation.
Inverse dynamics → For sizing of actuators and other
components, and for advanced model based control
schemes (see Module 7, Lecture 3).
Computational efficiency is of interest.
Aim is to develop efficient O(N) or O(logN) – N is the
number of links (for parallel computing) algorithms for use
in protein folding and in computational biology (see Klepeis
et al. 2002).
Dynamics of parallel manipulators complicated by presence
of closed-loops → Typically give rise to differential-algebraic
equations (DAEs) → More difficult to solve.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 5 / 77
M ASS AND I NERTIA OF A L INK

Ẑ0
Mass m of ∫the rigid body
{0} is given by V ρ dV , ρ is
dV density.
Inertia of a rigid body →
0
p Distribution of mass.
Inertia tensor 0 [I ] in {0}
Ŷ0  
Ixx Ixy Ixz
0
[I ] =  Ixy Iyy Iyz 
Rigid Body Ixz Iyz Izz
X̂0
Figure 1: Mass and inertia of a rigid
body

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 6 / 77
M ASS AND I NERTIA OF A L INK
Elements

of the inertia tensor ∫
Ixx∫= V (y 2 + z 2 ) ρ∫dV , Ixy = − V xy ρ dV , Ixz =
− ∫V xz ρ dV Iyy = ∫V (x 2 + z 2 ) ρ dV , Iyz =
− V yz ρ dV , Izz = V (x 2 + y 2 ) ρ dV
The inertia tensor is symmeteric and positive definite →
Eigenvalues of 0 [I ] are real and positive.
Three eigenvalues are the principal moments of inertia and
the associated eigenvectors are the principal axes.
The inertia tensor in {A}, with OA coincident O0 , is given
T
by A [I ] = A 0 A
0 [R] [I ]0 [R] .
To obtain inertia tensor for a link i,
Coordinate system, {Ci }, is chosen at the centre of mass of
the link.
{Ci } is parallel {i} (see Module 2, Lecture 2, Slide # 39).
Sub-divide complex link into simple shapes and use parallel
axis theorem.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 7 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 8 / 77
L AGRANGIAN FORMULATION :
K INETIC ENERGY
Energy base formulation involving kinetic and potential
energy
The kinetic energy of link i with mass mi and inertia 0 [I ]i
1 1
KEi = mi 0 VCi ·0 VCi + 0 ω i ·0 [I ]i 0 ω i
2 2

First and second term from linear velocity of the link’s


centre of mass and angular velocity of link.
0
VCi and 0 ω i are the linear and angular velocities of the
centre of mass and link {i}, respectively.
0
VCi = 0i [R]i VCi , 0
ω i = 0i [R]i ω i

Using above equations


1 1
K .Ei = mi i VCi ·i VCi + i ω i ·Ci [I ]i i ω i (1)
2 2
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 9 / 77
K INETIC ENERGY (C ONTD .)
Velocity propagation formulas for serial manipulators (see
Module 5, Lecture 1, Slide #’s 16 – 18)
i
ωi = i
i−1 [R]
i−1
ω i−1 + θ̇i (0 0 1)T joint i is rotary
i
ωi = i
i−1 [R]
i−1
ω i−1 joint i is prismatic
i
VCi = i
Vi + ω i × pCi
i i

ip locates the centre of mass with respect to Oi .


Ci
i : 0 → n to obtain kinetic energy of all links
Parallel manipulators, loops → No propagation formulas.
Easier to compute velocities using derivatives1

˙ 0 [R]T , d 0
0
ω i = 0i [R]i
0
VCi = ( pCi ) (2)
dt
0p is the position vector of the centre of mass of link i.
Ci
1 In
closed-loop mechanisms or parallel manipulators, one can judiciously
use the propagation formulas for the serial portions.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 10 / 77
L AGRANGIAN FORMULATION :
P OTENTIAL ENERGY

Assumption: Potential energy due to gravity alone2 .


General expression for potential energy due to gravity

PEi = −mi 0 g ·0 pCi (3)


0
g – Gravity vector of magnitude 9.81m/sec2
0
g along vertical direction denoted by 0 ^
Z axis.
0
pCi – Location of the centre of mass of link i from the
zero or reference potential energy surface.
Constant value of the reference potential energy does not
matter as derivatives are taken.

2 For
springs or other energy storage devices, appropriate modification to
the expression of the potential energy of the link are done. For example, if
torsional springs are present at joint i, add a term 21 ki θi 2 to the expression
for the potential energy. . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 11 / 77
L AGRANGIAN FORMULATION :
E QUATIONS OF MOTION
From the kinetic and potential energy, define the scalar
Lagrangian
N
L (q, q̇) = ∑(KEi − PEi ) (4)
i
N is the number of links excluding the fixed link.
In serial manipulators, with R or P joints dim(q) = n = N
The equations of motion3 , are
( )
d ∂L ∂L
− = Qi i = 1, 2, ..., n (5)
dt ∂ q̇i ∂ qi
Qi ’s are the externally applied generalised forces → When
only joint torques or forces are present
Qi = τi , i = 1, ..., n (6)
3 The
Lagrangian formulation is equivalent to Newton’s laws and Euler’s
equations from calculus of variation(see Goldstein .1980).. . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 12 / 77
E QUATIONS OF MOTION (C ONTD .)

After performing the derivatives, equation of motion of a


serial manipulator takes the form

[M(q)]q̈ + [C(q, q̇)]q̇ + G(q) = τ (7)

[M(q)] – n × n mass matrix4 ,


[C(q, q̇)] – n × n matrix and [C(q, q̇)]q̇ is an n × 1 vector of
centripetal and Coriolis terms – Contains only quadratic
q̇i q˙j terms,
G(q) – n × 1 vector of gravity terms, and
τ – n × 1 vector of joint torques or forces.
All serial manipulator equations of motion can be written in
the above form!

4 For R joints, elements of [M(q)] have units of inertia kg − m2 . For P

joint, elements of [M(q)] have units of mass Kg. . . . . . .


A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 13 / 77
P ROPERTIES OF TERMS IN
EQUATIONS OF MOTION
Mass matrix, [M(q)] – Always positive definite and
symmetric.
Total kinetic energy of a serial manipulator is
1
KE = q̇T [M(q)]q̇ (8)
2
KE ≥ 0 for |q̇| ̸= 0 and zero only when |q̇| = 0 → [M(q)] is
positive definite.
Inertia cannot be imaginary along any component of q̈ →
Eigenvalues of [M(q)] must be real → [M(q)] must be
symmetric.
Coriolis/centripetal can be obtained as
( )
1 n ∂ Mij ∂ Mik ∂ Mkj
Cij = ∑
2 k=1 ∂ qk
+
∂ qj

∂ qi
q̇k (9)

The gravity terms can be obtained as


∂ (PE )
Gi = (10)
∂ qi
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 14 / 77
L AGRANGIAN FORMULATION :
PARALLEL MANIPULATORS
Presence of m loop-closure constraint equations (see
Module 4, Lecture 1, Slide # 13).

ηi (q) = 0, i = 1, 2, ..., m (11)

q ∈ ℜn+m – n actuated joint variables, θ , and m passive


joint variables ϕ .
To obtain equations of motion for a system with constraints
→ Lagrange multipliers (Goldstein 1980, Haug 1989).
Lagrangian written as
m
L¯(q, q̇) = L (q, q̇) − ∑ λj ηj (q) (12)
j=1

m λj ’s are the introduced (unknown) Lagrange multipliers.


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 15 / 77
L AGRANGIAN FORMULATION :
PARALLEL MANIPULATORS
m constraints, ηj (q) = 0, are holonomic – Only functions
of q.
For holonomic constraints, equations of motion are
( )
d ∂L ∂L m
∂ ηj (q)
− = τi + ∑ λj i = 1, 2, ..., n + m
dt ∂ q̇i ∂ qi j=1 ∂ qi
(13)
In matrix form,
[M(q)]q̈ + [C(q, q̇)]q̇ + G(q) = τ + [Ψ(q)]T λ (14)

λ is the m × 1 vector of unknown Lagrange multipliers


Constraint matrix [Ψ(q)] is obtained from the partial
derivatives of m constraint equations with respect to qi
Concatenation – [Ψ] = [ [K ] | [K ∗ ] ] (see Module 5,
Lecture 3, Slide # 45 ).
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 16 / 77
L AGRANGIAN FORMULATION :
PARALLEL MANIPULATORS
To determine λ
Twice differentiate m constraint equations with respect to t
[Ψ(q)]q̈ + [Ψ̇(q)]q̇ = 0 (15)
˙ is a m × (n + m) matrix containing the time derivatives
[Ψ]
of each of the elements of [Ψ].
Since the mass matrix [M(q)] is always invertible
q̈ = [M]−1 (τ − [C]q̇ − G) + [M]−1 [Ψ]T λ
Substituting q̈ in equation (15)
λ = −([Ψ][M]−1 [Ψ]T )−1 {[Ψ]
˙ q̇ + [Ψ][M]−1 (τ − [C]q̇ − G)} (16)

Substitute λ back into equation (14) → Equations of


motion
[M]q̈ = f − [Ψ]T ([Ψ][M]−1 [Ψ]T )−1 {[Ψ][M]−1 f + [Ψ]
˙ q̇}
(17)
f denotes (τ − [C]q̇ − G).
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 17 / 77
L AGRANGIAN FORMULATION :
PARALLEL MANIPULATORS
Mass matrix [M] is (n + m) × (n + m), positive definite and
symmetric matrix.
Centripetal/Coriolis terms and the gravity terms are
(n + m) × 1 vectors.
[Ψ(q)]T λ has units of torque/force – Constraint
forces/torques.
Work done by constraint forces [ [Ψ(q)]T λ ]T q̇ →
λ T [Ψ(q)]q̇.
[Ψ(q)]q̇ = 0 from definition of constraint matrix.
Useful to obtain constraint forces/torques for mechanical
design of the joints and links.
Most multi-body dynamics software packages (see, for
example, ADAMS⃝ R
(2002)) compute and provide the
constraint forces and torques.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 18 / 77
N ON - HOLONOMIC CONSTRAINTS
In mobile robots and few other mechanical systems,
constraints are non-holonomic5 .
Constraints can also contain explicit functions of time.
Lagrangian formulation for such systems –
General constraints in the so-called Pfaffian form
Φ(t) + [Ψ(q)]q̇ = 0 (18)
˙ q̇ + Φ̇(t) = 0
Differentiate to get [Ψ]q̈ + [Ψ]
Equations of motion
[M]q̈ = f −[Ψ]T ([Ψ][M]−1 [Ψ]T )−1 {[Ψ][M]−1 f + Φ̇(t)+ [Ψ]
˙ q̇}
(19)
λ given by
λ = −([Ψ][M]−1 [Ψ]T )−1 {Φ̇(t)+ [Ψ]
˙ q̇+[Ψ][M]−1 (τ −[C]q̇−G)}
(20)
5 Non-holonomic constraints are non-integrable functions of q and q̇.

They restrict the space of q̇ but not the space of q.


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 19 / 77
S UMMARY
Equations of motion for serial, parallel manipulators and
multi-body system (even with non-holonomic constraints)
can be obtained using Lagrangian formulation.
Equations of motion obtained using Lagrangian formulation
does not contain friction or any other dissipative term —
Lagrangian formulation is for conservative systems only!
Friction accommodated in ad-hoc manner in the right-hand
side at appropriate place.
τ = [M(q)]q̈ + C(q, q̇) + G(q) + F(q, q̇) (21)
Friction term, F(q, q̇), looks similar to centripetal/Coriolis
term but actually very different!
Typical friction = sum of a constant (Coulomb friction) +
term proportional to q̇ (viscous damping).
Equations of motion does not contain effects of flexibility,
backlash, and other unmodeled dynamics.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 20 / 77
E QUATIONS OF M OTION IN
C ARTESIAN S PACE

Equations of motion in joint space – Function of q and q̇


Equations of motion in terms of position and orientation of
end-effector (Khatib 1987).
Useful for Cartesian space motion and force control.
Equations of motion given as

F = [MX (q)]X¨ + CX (q, q̇) + GX (q) (22)

F is a 6 × 1 entity of forces and moments acting on the


end-effector,
X is 6 × 1 entity representing the position and orientation
of the end-effector.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 21 / 77
E QUATIONS OF M OTION IN
C ARTESIAN S PACE (C ONTD .)
[MX (q)], CX (q, q̇), and GX (q) – Analogous to mass
matrix, Coriolis/centripetal and gravity term, respectively.
Relationships between Cartesian and joint space terms
τ = [J(q)]T F
[MX (q)] = [J(q)]−T [M(q)][J(q)]−1
CX (q, q̇) = [J(q)]−T (C(q, q̇) − [M(q)][J(q)]−1 [J(q)]
˙ q̇)
GX (q) = [J(q)]−T G(q) (23)

[J(q)]−T denotes the inverse of [J(q)]T ,


[J(q)], F and X are in the same coordinate system.
q, q̇ can be replaced with the Cartesian variables (at least
conceptually) – Inverse kinematics and inverse Jacobian.
Difficult (if not impossible) for practical manipulators!
Fortunately replacement not required for Cartesian space
motion and force control! . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 22 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 23 / 77
P LANAR 2R M ANIPULATOR
Simplest possible serial manipulator
Two moving links, 2 joint variables θ1 and θ2
Joint torques – τ1 and τ2 .

Lo cation of cg of Link 2 Gravity along


(− 0 Ŷ0 ) axis.
g Link 2 (mi , li , ri , Ii ), i = 1, 2
Ŷ (m2 , l 2 , r2 , I 2 )
0 Lo cation of cg of Link 1 denote mass, length,
O2
{ 0} θ2 CG location and Izz
Link 1
component of inertia
τ1 (m1 , l 1 , r 1 , I 1 ) matrix, respectively.
τ2
Planar case → Only
θ1 X̂ 0 Izz relevant.
O1

Figure 2: A 2R manipulator
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 24 / 77
P LANAR 2R M ANIPULATOR
Velocity propagation to find linear and angular velocities
{0} fixed → 0 ω 0 =0 V0 = 0.
i=1
1
ω 1 = (0 0 θ̇1 )T
1
V1 = 0
1
VC1 = 0 + (0 0 θ̇1 )T × (r1 0 0)T = (0 r1 θ̇1 0)T

i=2
2
ω 2 = (0 0 θ̇1 + θ̇2 )T
    
c2 s 2 0 0 l1 s2 θ̇1
2
V2 =  −s2 c2 0   l1 θ̇1  =  l1 c2 θ̇1 
0 0 1 0 0
2
VC2 = 2
V2 +2 ω 2 × (r2 0 0)T
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 25 / 77
P LANAR 2R M ANIPULATOR

Total kinetic energy


1 1 1
KE = m1 (r1 θ̇1 )2 + I1 θ̇12 + I2 (θ̇1 + θ̇2 )2 + (24)
2 2 2
1
m2 (l12 θ̇12 + r22 (θ̇1 + θ̇2 )2 + 2l1 r2 c2 θ̇1 (θ̇1 + θ̇2 ))
2
Link 1 – First two terms; Link 2 – Second two terms.
Total potential energy

PE = m1 gr1 s1 + m2 g (l1 s1 + r2 s12 ) (25)

Lagrangian for planar 2R manipulator

L (Θ, Θ̇) = KE − PE , Θ = (θ1 , θ2 )T (26)

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 26 / 77
P LANAR 2R M ANIPULATOR

Partial derivatives of L with respect to θi , i = 1, 2

∂L
= −m1 gr1 c1 − m2 g (l1 c1 + r2 c12 )
∂ θ1
∂L
= −m2 l1 r2 s2 θ̇1 (θ̇1 + θ̇2 ) − m2 gr2 c12
∂ θ2

Partial derivatives of L with respect to θ̇i , i = 1, 2

∂L
= (I1 + I2 + m1 r12 + m2 l12 + m2 r22 + 2m2 l1 r2 c2 )θ̇1
∂ θ̇1
+(I2 + m2 r22 + m2 l1 r2 c2 )θ̇2
∂L
= (I2 + m2 r22 + m2 l1 r2 c2 )θ̇1 + (I2 + m2 r22 )θ̇2
∂ θ̇2

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 27 / 77
P LANAR 2R M ANIPULATOR
∂L
Derivatives of ∂ θ̇i
with respect to t
( )
d ∂L
= θ¨1 (I1 + I2 + m1 r12 + m2 r22 + m2 l12 + 2m2 l1 r2 c2 )
dt ∂ θ̇1
+θ¨2 (I2 + m2 r22 + m2 l1 r2 c2 ) − m2 l1 r2 s2 θ̇2 (2θ̇1 + θ̇2 )
( )
d ∂L
= θ¨1 (I2 + m2 r22 + m2 l1 r2 c2 )
dt ∂ θ̇2
+θ¨2 (I2 + m2 r22 ) − m2 l1 r2 s2 θ̇1 θ̇2
Assemble terms, collect and simplify
τ1 = θ̈1 (I1 + I2 + m2 l12 + m1 r12 + m2 r22 + 2m2 l1 r2 c2 )
+θ̈2 (I2 + m2 r22 + m2 l1 r2 c2 )
−m2 l1 r2 s2 (2θ̇1 + θ̇2 )θ̇2 + m2 g (l1 c1 + r2 c12 ) + m1 gr1 c1
τ2 = θ̈1 (I2 + m2 r22 + m2 l1 r2 c2 ) + θ̈2 (I2 + m2 r22 )
+m2 l1 r2 s2 θ̇12 + m2 r2 gc12
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 28 / 77
P LANAR 2R M ANIPULATOR –
E QUATIONS OF M OTION
Equations of motion are two nonlinear ODEs – In standard form
( )
τ1
=
τ2
[ ]( )
I1 + I2 + m2 l12 + m1 r12 + m2 r22 + 2m2 l1 r2 c2 I2 + m2 r22 + m2 l1 r2 c2 θ̈1
I2 + m2 r22 + m2 l1 r2 c2 I2 + m2 r22 θ̈2
( ) ( )
−m2 l1 r2 s2 (2θ̇1 + θ̇2 )θ̇2 m2 g (l1 c1 + r2 c12 ) + m1 gr1 c1
+ + (27)
m2 l1 r2 s2 θ̇12 m2 r2 gc12

In the above matrix equation


2 × 2 matrix is the mass matrix,
2 × 1 vector with quadratic θ̇12 , θ̇22 , and θ̇1 θ̇2 terms is the
centripetal/Coriolis term, and
2 × 1 vector with g is the gravity term.
As mentioned no friction or dissipative terms in equations
of motion.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 29 / 77
E XAMPLES : P LANAR FOUR - BAR
M ECHANISM
Simplest possible – One-degree-of-freedom closed-loop
mechanism!
Three moving links → θ1 actuated, ϕi , i = 1, 2, 3 passive,
τ1 actuating torque.
φ3

O2 Link 2
(m2 , l2 , r2 , I2 ) Geometry and inertial
O3
parameters of links –
Link 3

φ2 g (m3 , l3 , r3 , I3 ) (mi , li , ri , Ii ) for


Ŷ L
ŶR i = 1, 2, 3.
{L} Link 1
(m1 , l1 , r1 , I1 )
{R} Only Izz component of
τ1 θ1
Location of cg of links φ1 the inertia matrix of
X̂L
l0 each link is relevant.
X̂R
OR
OL , O1

Figure 3: A planar four-bar mechanism


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 30 / 77
P LANAR FOUR - BAR M ECHANISM –
E QUATIONS OF M OTION
Break four-bar mechanism at O3 → Planar 2R + planar 1R
KE of planar 2R similar – θ2 replaced by ϕ2
KE of 1R – 12 m3 r32 ϕ̇12 + 12 I3 ϕ̇12
Total kinetic energy
1 1 1
KE = m1 (r1 θ̇1 )2 + I1 θ̇12 + I2 (θ̇1 + ϕ̇2 )2 +
2 2 2
1
m2 (l1 θ̇1 + r2 (θ̇1 + ϕ̇2 )2 + 2l1 r2 cos(ϕ2 )θ̇1 (θ̇1 + ϕ̇2 )) +
2 2 2
2
1 1
m3 r32 ϕ̇12 + I3 ϕ̇12 (28)
2 2
Total potential energy – Planar 2R + planar 1R

PE = m1 gr1 sin(θ1 )+m2 g (l1 sin(θ1 )+r2 sin(θ1 + ϕ2 ))+m3 gr3 sin(ϕ1 )
(29)
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 31 / 77
P LANAR FOUR - BAR M ECHANISM –
E QUATIONS OF M OTION
Lagrangian for the planar 2R + planar 1R mechanisms
L (q, q̇) =
1 2 1 1 1 1
I1 θ̇1 + I2 (θ̇1 + ϕ̇2 )2 + I3 ϕ̇12 + m1 r12 θ̇12 + m3 r32 ϕ̇12
2 2 2 2 2
1
m2 (l1 θ̇1 + r2 (θ̇1 + ϕ̇2 ) + 2l1 r2 cos(ϕ2 )θ̇1 (θ̇1 + ϕ̇2 ))
2 2 2 2
2
−m1 gr1 sin(θ1 ) − m2 g (l1 sin(θ1 + r2 sin(θ1 + ϕ2 ))
−m3 gr3 sin(ϕ1 ) (30)
Constraint equations of 4-bar ( Module 4, Lecture 1, Slide
# 20)
l1 cos(θ1 ) + l2 cos(θ1 + ϕ2 ) = l0 + l3 cos(ϕ1 )
l1 sin(θ1 ) + l2 sin(θ1 + ϕ2 ) = l3 sin(ϕ1 ) (31)
Perform partial derivatives with respect to q and q̇ and
time derivatives (see Lagrangian formulation).
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 32 / 77
P LANAR FOUR - BAR M ECHANISM –
E QUATIONS OF M OTION
3 × 3 mass matrix [M(q)]
 
I2 + m2 r2 2 + I1 + m2 l1 2 + 2 m2 l1 r2 cos(ϕ2 ) + m1 r1 2 , I2 + m2 r2 2 + m2 l1 r2 cos(ϕ2 ) , 0
 I2 + m2 r2 + m2 l1 r2 cos(ϕ2 ) , I2 + m2 r2 , 0
2 2 
0 , 0 , m3 r3 2 + I3

3 × 3 Coriolis/Centripetal terms [C(q, q̇)]


 
−m2 l1 r2 sin(ϕ2 ) ϕ̇2 −m2 l1 r2 sin(ϕ2 ) θ̇1 − m2 l1 r2 sin(ϕ2 ) ϕ̇2 0
 m2 l1 r2 sin(ϕ2 ) θ̇1 0 0 
0 0 0

3 × 1 vector of gravity terms G(q)


 
m1 g r1 cos(θ1 ) + m2 g (l1 cos(θ1 ) + r2 cos(θ1 + ϕ2 ))
 m2 g r2 cos(θ1 + ϕ2 ) 
m3 g r3 cos(ϕ1 )

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 33 / 77
P LANAR FOUR - BAR M ECHANISM –
E QUATIONS OF M OTION
Equations of motion of the planar 2R + 1R mechanisms

τ1 = (m2 r2 cos(θ1 + ϕ2 ) + m1 r1 cos(θ1 ) + m2 l1 cos(θ1 ))g


+(I2 + m2 r2 2 + I1 + m2 l1 2 + 2 m2 l1 r2 cos(ϕ2 ) + m1 r1 2 ) θ¨1
+(I2 + m2 r2 2 + m2 l1 r2 cos(ϕ2 )) ϕ¨2 − m2 l1 r2 sin(ϕ2 ) (ϕ̇2 )2
−2 m2 l1 r2 sin(ϕ2 ) θ̇1 ϕ̇2
τ2 = m2 g r2 cos(θ1 + ϕ2 ) + (I2 + m2 r2 2 + m2 l1 r2 cos(ϕ2 )) θ¨1
+(I2 + m2 r2 2 ) ϕ¨2 + m2 l1 r2 sin(ϕ2 ) θ̇12
τ3 = m3 g r3 cos(ϕ1 ) + (m3 r3 2 + I3 ) ϕ¨1 (32)

Three non-linear ordinary differential equations.


Constraint equations not yet taken into account → Third
equation not related to the other two!
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 34 / 77
P LANAR FOUR - BAR M ECHANISM –
E QUATIONS OF M OTION
2 × 3 constraint matrix [Ψ(q)]
[ ]
−l1 sin(θ1 ) − l2 sin(θ1 + ϕ2 ) −l2 sin(θ1 + ϕ2 ) l3 sin(ϕ1 )
l1 cos(θ1 ) + l2 cos(θ1 + ϕ2 ) l2 cos(θ1 + ϕ2 ) −l3 cos(ϕ1 )
Obtain derivative of constraint equations
[Ψ(q)]q̈ + [Ψ̇(q)]q̇ = 0
Obtain q̈ from equation of motion
q̈ = [M]−1 (τ − [C]q̇ − G) + [M]−1 [Ψ]T λ
Substitute q̈ in derivative of constraint equation and solve
for λ
Substitute λ to obtain equations of motion of planar
four-bar mechanism
[M]q̈ = f − [Ψ]T ([Ψ][M]−1 [Ψ]T )−1 {[Ψ][M]−1 f + [Ψ]
˙ q̇}
. . . . (33)
. .

where f = (τ − [C]
A SHITAVA G HOSAL (IIS C ) q̇ −: G)
ROBOTICS A DVANCED q = (θ& A,NALYSIS
andCONCEPTS ϕ , ϕ )T . NPTEL, 2010 35 / 77
S UMMARY

Equations of motion obtained using Lagrangian


formulation.
Error free equations of motion obtained using symbolic
computer algebra system such as MAPLE⃝ R
(see
6
Additional Material at the end of this Module).
Equations of motion of a planar 2R serial manipulator.
Equations of motion of a planar 4-bar closed-loop
mechanism.

6 See
Known Bugs in Module 10, Slide # 10 for viewing links.
To view link, Copy and paste in a New Window/Tab using right click.
Close New Window/Tab after viewing. . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 36 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 37 / 77
I NTRODUCTION

Two problems in dynamics of robots


Inverse dynamics – Given D-H and inertial parameters and
a trajectory as a function of time, find joint torques →
Obtain τ (t) from known q(t), q̇(t) and q̈(t).
Direct problem – Given the kinematic and inertial
parameters and the joint torques as functions of time, find
the trajectory of the manipulator → Obtain q(t) from
known τ (t).
Inverse dynamics is required for sizing of actuators and
model based control.
Direct problem solution is required for simulation.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 38 / 77
I NVERSE DYNAMICS OF ROBOTS

Inverse dynamics problem is very simple!


Substitute qt, q̇(t) and q̈(t) in the right-hand side of
equations of motion

τ = [M(q)]q̈ + C(q, q̇) + G(q) + F(q, q̇)

Obtain the left-hand side τ (t).


Can be done for any robot once the equations of motion
are known.
Can be efficiently done in O(N) steps using recursive
algorithms.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 39 / 77
P LANAR 2R E XAMPLE

Lo cation of cg of Link 2

g Link 2
Ŷ 0 Lo cation of cg of Link 1 (m2 , l 2 , r2 , I 2 )
O2
{ 0} θ2

Link 1
τ1 (m1 , l 1 , r 1 , I 1 )
τ2

θ1 X̂ 0
Link Length Mass C.G. Inertia
O1 (m) (kg) (m) (kg m2 )
Figure 4: A 2R manipulator
1 1.0 12.456 0.773 1.042
2 1.0 12.456 0.583 1.042

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 40 / 77
P LANAR 2R E XAMPLE
1.4

Circle traced by end-point Mass, inertia and


1.2
geometry as in Table
1 Chosen circular
l 2 =1 trajectory
0.8

0.6
x = a + r cos(ϕ )
y = b + r sin(ϕ )
0.4

l 1 =1
r = 0.2, a = 1.2,
0.2

b = 1.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 0 ≤ ϕ ≤ 2π in 10
Figure 5: A 2R manipulator executing circular seconds
trajectory

Planar 2R inverse dynamics trajectory movie


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 41 / 77
P LANAR 2R E XAMPLE
2
Plot of Joints Angles for a 2R Manipulator

1.5 θ1
1

Angle(rad)
0.5

−0.5

−1
θ2
−1.5
0 1 2 3 4 5 6 7 8 9 10
Time(Seconds)

Figure 6: Computed θ1 and θ2 using inverse kinematics


Plot of Joint Angular Velocities for a 2R Manipulator
0.3

0.2

0.1
Angular Vel.(rad/sec 2)

−0.1

−0.2
θ˙ 1
θ̇2
−0.3

−0.4
0 1 2 3 4 5 6 7 8 9 10

Time(Seconds)

Figure 7: Computed θ˙1 and θ˙2 using inverse Jacobian


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 42 / 77
P LANAR 2R E XAMPLE
0.4
Plot of Joint Angular Accelerations for a 2R Manipulator

0.3

0.2

θ̈ 2

Angular Acc.(rad/sec 2 )
0.1

0
θ̈1
−0.1

−0.2

−0.3

−0.4
0 1 2 3 4 5 6 7 8 9 10
Time(seconds)

Figure 8: Computed θ¨1 and θ¨2


180
Plot of Joint Torques for a 2R Manipulator

160
τ1
Torque(Nm)

140

120

100

80
τ2
60
0 1 2 3 4 5 6 7 8 9 10
Time(Seconds)

Figure 9: Computed τ1 (t) and τ2 (t)


. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 43 / 77
S IMULATION OF E QUATIONS OF
M OTION
Simulation → Given external torque/forces obtain motion
of robot.
General form of equations of motion of a n
degree-of-freedom robot

τ = [M(q)]q̈ + C(q, q̇) + G(q) + F(q, q̇)

Simulation → Given τ (t) find q(t) by solving equations of


motion.
n coupled, non-linear, second-order, ordinary differential
equations (ODEs).
Cannot be solved analytically except for simplest cases.
Numerical solution of the ODEs – Use of software such as
MATLAB⃝ R
and in-built integration routine such as
ODE45.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 44 / 77
S IMULATION OF E QUATIONS OF
M OTION
Input to ODE45 required to be in state-space form.
Conversion to state-space form
(1) Mass matrix [M(q)] is invertible,
q̈ = [M(q)]−1 [τ − C(q, q̇) − G(q) − F(q, q̇)]
(2) Define X ∈ ℜ2n – (X1 , ..., Xn )T = (q1 , ..., qn )T and
(Xn+1 , ...., X2n )T = (q̇1 , ...., q̇n )T .
(3) Rewrite n second-order ODE’s as 2n first-order ODE’s
Ẋ1 = Xn+1 , Ẋ2 = Xn+2 , ..., Ẋn = X2n
 
Ẋn+1
 . 
  = [M(X)]−1 [τ − C(X) − G(X) − F(X)] (34)
 . 
Ẋ2n
State-space form of equations of motion
Ẋ = g(X, τ ) (35)
with initial conditions X(0). . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 45 / 77
S IMULATION OF E QUATIONS OF
M OTION
For parallel manipulator and closed-loop mechanisms,
equations of motion

[M]q̈ = f − [Ψ]T ([Ψ][M]−1 [Ψ]T )−1 {[Ψ][M]−1 f + [Ψ]


˙ q̇}

f denotes (τ − C − G − F).
Obtain the 2(n + m) first-order state equations as
Ẋ1 = Xn+m+1 , Ẋ2 = Xn+m+2 , ..., Ẋn+m = X2(n+m)
 
Ẋn+m+1
 . 
  = [M]−1 (f − [Ψ]T ([Ψ][M]−1 [Ψ]T )−1 {[Ψ][M]−1 f
 . 
Ẋ2(n+m)
˙ Ẋ1 , ..., Ẋn+m )T })
+[Ψ]( (36)

f denotes (τ − C − G − F).
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 46 / 77
S IMULATION OF E QUATIONS OF
M OTION : PARALLEL MANIPULATORS
The nature of ODEs in equations (36) are different than
ODEs obtained for serial manipulators.
m loop-closure (holonomic) constraints must be satisfied
→ Differential-algebraic equations or DAEs.
DAEs are inherently stiff7 → Use stiff-solvers such as
ODE15S or ODE23S in MATLAB⃝ R
.
Stiff solvers use implicit schemes and are slower than
non-stiff solvers.
For simple problems (such as a 4-bar mechanism), ODE45
is good enough.
7 A system of ODEs is said to be stiff if the time constants of the

individual ODE’s are orders of magnitude different – More than 1000:1. For
stiff ODEs, the time step in integration is determined by the smallest time
constants and hence a set of stiff ODEs can take very long to integrate.
DAEs can be thought of as infinitely stiff since the algebraic constraints
have zero time constant. . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 47 / 77
PARALLEL MANIPULATORS
Equations of motion involve second derivative of m
constraint equations η (q, t) = 0.
Small numerical errors in acceleration (q̈) due to
integration results in increasing errors in q̇ and q.
Baumgarte stabilization (Baumgarte 1983) – Replace
second derivative constraint equation
[Ψ(q)]q̈ + [Ψ̇(q)]q̇ + Φ̇(t) = 0 with
˙ q̇ + Φ̇(t)) + 2α (Φ(t) + [Ψ(q)]q̇) + β 2 η (q, t) = 0
([Ψ]q̈ + [Ψ]

α and β are constants.


Similar to a spring-mass-damper system8 , for proper choice
of α and β , lim∆t→∞ {η (t), η̇ (t)} → 0
Not clear how to choose α and β !
8 The equations of motion of an unforced mass-spring-damper system is
ẍ + 2ξ ωn ẋ + ωn 2 x = 0. β is ‘similar’ to the natural frequency ωn and α is
‘similar’ to the product of natural frequency and damping
. . ξ ωn
.. . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 48 / 77
E XAMPLES : S IMULATIONS OF A
P LANAR 2R ROBOT Initial conditions –
◦ θ1 = −90 , θ2 = 45◦
External torques –
Lo cation of cg of Link 2
τ1 = τ2 = 0

g Link 2
Ŷ 0 Lo cation of cg of Link 1 (m2 , l 2 , r2 , I 2 )
O2
{ 0} θ2

Link 1
τ1 (m1 , l 1 , r 1 , I 1 )
τ2

Link Length Mass C.G. Inertia


θ1 X̂ 0
O1 (m) (kg) (m) (kg m2 )
1 1.0 12.456 0.773 1.042
Figure 10: A 2R manipulator
2 1.0 12.456 0.583 1.042
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 49 / 77
S IMULATIONS OF A P LANAR 2R
ROBOT
−60

−70 −1.65
theta1 in degrees

−80
−1.7
−90

−100
−1.75
−110

−120
0 1 2 3 4 5 6 7 8 9 10

Y Coordinate
−1.8

50
−1.85
theta2 in degrees

−1.9
0

−1.95

−50
0 1 2 3 4 5 6 7 8 9 10 −2
−0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8
Time t in seconds
X coordinate

Figure 11: Plot of θ1 and θ2 Vs time Figure 12: Path traced by the tip

Motion of link 2 causes motion of link 1 – Coupled ODEs.


The path traced by the tip is quite complicated.
Planar 2R forward dynamics simulation movie
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 50 / 77
E XAMPLES : S IMULATIONS OF A 4-
BAR M ECHANISM
Almost folded
Ŷ 0
configuration – Initial θ1
τ
and ϕ1 small.
l1 l2 θ1 actuated by a torsional
l3
l0
spring.
X̂0
Figure a Right-hand side of
equations of motion is
Ŷ0
l2 modified as

l3 τ = τ0 − k θ 1
l1
θ1

l0
X̂0
Initial (pre-loaded) torque
τ0 = 1.96 N-m and the
Figure b spring constant is given as
Figure 13: A four-bar mechanism in k = 0.1 N − m/rad.
two configurations
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 51 / 77
S IMULATIONS OF A 4- BAR
M ECHANISM
The mass, length, location of centre of mass and Izz
component of inertia
Link Length Mass C.G. Inertia
(m) (kg) (m) (kgm2 )
0 1.241 – – –
1 1.241 20.15 1.2 9.6
2 1.2 8.25 0.6 0.06
3 1.2 8.25 0.6 0.06
As spring unwinds, link 1 rotates counter-clockwise.
Link lengths chosen such that θ1 cannot rotate beyond a
certain angle.
Links 2 and 3 lock when they align & 4-bar becomes a
structure!
For θ1 = 0.01 radians, ϕ1 = 0.0102, 6.2698 radians
(obtained from the solution of 4-bar direct kinematics) –
Choose initial ϕ1 = 0.0102 radians. . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 52 / 77
S IMULATIONS OF A 4- BAR
M ECHANISM
400
500
lambda1
lambda2
350

400

300

300
250

200
200

150 100

100 0

theta1
50 phi2
phi1 −100

0
0 2 4 6 8 10 12 14
−200
time in sec 0 2 4 6 8 10 12 14
time in sec

Figure 14: Plot of θ1 , ϕ2 and ϕ1 Vs


Figure 15: Plot of λ1 and λ2 Vs time
time
At θ1 = 150.4◦ links 2 and 3 align → Singular configuration.
At t = 12.25 seconds & θ1 = 150◦ simulation is stopped.
As t → 12.25 seconds, Lagrange multipliers λ1 , λ2 → ∞
4-bar forward dynamics simulation movie
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 53 / 77
S UMMARY

After equations of motion are obtained, one can solve two


problems in manipulator dynamics
Inverse dynamics – Given trajectory as a function of time,
find joint torques.
Forward dynamics – Given joint torques, find trajectory of
manipulator in time.
Inverse dynamics is straight-forward – Substitution in
equations of motion.
Forward dynamics involve numerical integration.
Examples of a planar 2R and a 4-bar mechanism shown.
Dynamics can be done by software packages such as
ADAMS (see Additional Material at the end of the
Module).

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 54 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 55 / 77
I NTRODUCTION
Multi-body system with
large number of links –
Redundant robots,
proteins, automobile etc.
Classical model of protein
– 20 types of amino acid
residues in a serial chain
50-500 residues – Assumed
to be rigid bodies
Two DOF between two
residues (ϕ , ψ ) – 100 to
Figure 16: Amino acid chain in a
protein
1000 ‘joint’ variables!

Direct and inverse dynamics of large multi-body systems


Efficient – O(N) (or better) formulations desired

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 56 / 77
R ECURSIVE INVERSE DYNAMICS OF
SERIAL MANIPULATORS
Inverse dynamics → Given q(t), q̇(t) & q̈(t) find τ (t).
Newton-Euler formulation – Newton’s Law and Euler
Equation for each link {i}
F = mi 0 V̇Ci
N = Ci
[Ii ]0 ω̇ i + 0 ω i × Ci [Ii ]0 ω i (37)
mi , Ci and [Ii ] are the mass, centre of mass and inertia of
link {i}.
Requires computation of position/orientation, velocity and
acceleration.
Position & orientation computed using i−1 i [T ] (see Module
2, Lecture 1, Slide # 22)
Linear and angular velocities can be computed using
propagation formulas (see Module 5, Lecture 1, Slide #’s
16 – 18).
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 57 / 77
P ROPAGATION OF VELOCITY AND
ACCELERATION
For rotary (R) joint
i
ωi = i
i−1 [R]
i−1
ω i−1 + θ̇i (0 0 1)T
i
Vi = i
i−1 [R](
i−1
Vi−1 +i−1 ω i−1 ×i−1 Oi ) (38)
For prismatic (P) joint
i
ωi = i
i−1 [R]
i−1
ω i−1 (39)
i
Vi = i
i−1 [R](
i−1
Vi−1 +i−1 ω i−1 ×i−1 Oi ) + ḋi (0 0 1)T
Acceleration of an arbitrary point p on rigid body {i}→
Differentiate velocity with time
0
V̇p = 0
V̇Oi + 0i [R]i V̇p + 2 0 ω i × 0i [R]i Vp + 0 ω̇ i × 0i [R]i p
+0 ω i × (0 ω i × 0i [R]i p)
When i p is constant, i Vp = i V̇p = 0.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 58 / 77
P ROPAGATION OF VELOCITY AND
ACCELERATION
When joint i + 1 is rotary (R)
i+1
V̇i+1 = i+1
i [R][i V̇i + i ω̇ i ×i pi+1 + i ω i × (i ω i ×i pi+1 )] (40)
i+1
ω̇ i+1 = i+1
i [R]i ω̇ i + i+1
i [R]i ω i × θ̇i+1 i+1 Ẑi+1 + θ̈i+1 i+1 Ẑi+1
When joint i + 1 is prismatic (P)
i+1
V̇i+1 = i+1
i [R][i V̇i + i ω̇ i ×i pi+1 + i ω i × (i ω i ×i pi+1 )]
+2i+1 ω i+1 × ḋi+1 i+1 Ẑi+1 + d̈i+1 i+1 Ẑi+1
i+1
ω̇ i+1 = i+1
i [R]i ω̇ i (41)
The acceleration of the centre of mass of link i is
i
V̇Ci = i V̇i + i ω̇ i ×i pCi + i ω i × (i ω i ×i pCi ) (42)
ip is the position vector of the centre of mass of link i
Ci
with respect to origin Oi .
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 59 / 77
R ECURSIVE N EWTON -E ULER
F ORMULATION
Use propagation formulas for position/orientation of links.
Outward iterations for velocities and accelerations
i : 0 → N−1
i+1
ω i+1 = i+1
i [R]i ω i + θ̇i+1 (0 0 1)T
i+1
ω̇ i+1 = i+1
i [R]i ω̇ i + i+1
i [R]i ω i × θ̇i+1 (0 0 1)T + θ̈i+1 (0 0 1)T
i+1
V̇i+1 = i+1
i [R](i V̇i + i ω̇ i ×i pi+1 + i ω i × (i ω i ×i pi+1 )) (43)
i+1
V̇Ci +1 = i+1
V̇i+1 + i+1 ω̇ i+1 ×i+1 pCi +1
+i+1 ω i+1 × (i+1 ω i+1 ×i+1 pCi +1 )

Use of Newton’s Law and Euler equations for each link i


i+1 i+1
Fi+1 = mi+1 V̇Ci +1 (44)
i+1
Ni+1 = Ci +1
[I ]i+1 i+1
ω̇ i+1 + i+1
ω i+1 × Ci +1
[I ]i+1 i+1
ω i+1
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 60 / 77
R ECURSIVE N EWTON -E ULER
F ORMULATION
iF and i Ni are known from outward iteration
i
Use of free-body diagram (see Module 5, Lecture 5, Slide
# 80 on Statics)
Compute joint torques from i Fi and i Ni by inward iteration
i:N → 1
i i i+1
fi = i+1 [R] fi+1 +i Fi
i
ni = i
i+1 [R]
i+1
ni+1 +i pi+1 × ii+1 [R]i+1 fi+1 +i pCi ×i Fi +i Ni
τi = i
ni ·i Ẑi (45)

To include gravity set 0 V̇0 = g → The fixed link (or base)


is accelerating upward with 1.0g acceleration.
Algorithm given is for rotary (R) jointed serial manipulator
– Substitute equations for Prismatic (P) joint if
present.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 61 / 77
R ECURSIVE N EWTON -E ULER
F ORMULATION
Newton-Euler algorithm has O(N) computational
complexity
The computation in sets of equations (43 -45) is performed
only once for each link.
There are no iterations.
Number of multiplications and additions is proportional to
N (number of links).
Very easily adapted for any serial manipulators with rotary
(R), prismatic (P) or any other joint.
if and i ni can be used to obtain all components of
i
reactions at joints → Useful for design.
Can be used for symbolic computation of equations of
motion in a computer algebra system.
Extensively used in robotics.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 62 / 77
F ORWARD DYNAMICS OF SERIAL
MANIPULATORS
Forward dynamics: Given τ (t) obtain q(t).
Involves two steps
Obtain q̈(t)
Integrate q̈(t) with initial conditions: obtain q̇(t), q(t)
O(N) algorithms for forward dynamics give q̈(t) – Does
not include integration step.
Brute force approach
Obtain equations of motion using Newton-Euler
formulation – O(N) steps
[M(q)]q̈ = τ − [C(q, q̇)]q̇ − F(q, q̇)
Obtain q̈ by inverting [M(q)] – O(N 3 ) steps using Gauss
Elimination.
Although O(N 3 ), coefficient of N 3 is small (Walker and
Orin, 1982) — Efficient when N ≤ 6 (see Saha (2008),
Chapter 9 for more on forward dynamics algorithms).
O(N 3 ) not very useful when N is large (as in protein chains
with N between 50 and 500). . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 63 / 77
A RTICULATED - BODY ALGORITHM –
K EY IDEA Simplest possible
example: Body 1 slides
on horizontal rail fixed
to ground and Body 2
slides on vertical rail
Rigid-body
1 fixed to Body 1.
Y2

No rotations of bodies
Motion of prismatic

Rigid-body X2

2 → X , Y coordinates
joint 2

enough to describe two


X1 bodies!
Absolute coordinates
Motion of prismatic joint 1
for body 1 – x1 , y1 .
Absolute coordinates
Figure 17: Planar 2P example
(Featherstone, 1983)
for body 2 – x2 , y2 .
Constraints – y1 = 0 &
x2 − x1 = 0
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 64 / 77
A RTICULATED - BODY ALGORITHM –
K EY IDEA
Two Lagrange multipliers λ1 and λ2 for two constraints
Equations of motion and algebraic constraints for body 1
[ ]( ) ( ) ( ) ( )
m1 0 ẍ1 0 fx1 −1
+ λ1 = − λ2
0 m1 ÿ1 1 fy1 0
[ ]
ẍ1
[0 1] = 0
ÿ1
Equations of motion and algebraic constraints for body 2
[ ]( ) ( ) ( )
m2 0 ẍ2 1 fx2
+ λ2 =
0 m2 ÿ2 0 fy2
[ ] [ ]
ẍ2 ẍ1
[1 0] = 0 − [−1 0]
ÿ2 ÿ1
fxi , fyi – Fxternal forces for yi , yi .
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 65 / 77
A RTICULATED - BODY ALGORITHM –
K EY IDEA
Effect of Body 2 seen in equations of motion on Body 1
Equations of motion for Bodies 1 and 2 are coupled – Both
Lagrange multipliers λ1 and λ2 appear in equation of
motion for body 1
Not possible to get O(N) algorithm to obtain accelerations
ẍi , ÿi – λ1 and λ2 at best can be solved by a O(N 3 )
algorithm.
For O(N) recursive forward dynamics algorithm – Obtain
equation of motion for all connected bodies similar to Body
2 (terminal body)!
Achieved by Featherstone (1983) – For the 2P example,
equations of motion for Body 1 are
[ ]( ) ( ) ( )
m1 + m2 0 ẍ1 0 fx1 + fx2
+ λ1 =
0 m1 ÿ1 1 fy1
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 66 / 77
A RTICULATED - BODY ALGORITHM –
F EATHERSTONE , 1983
Equations of motion of a single rigid-body under the action
of force F and moment NC acting at the centre of mass
F = mV̇C
NC = C
[I ]ω̇
where m, C [I ]
are the mass and inertia, respectively.
No ω × [I ]ω term since all quantities are with respect to
C

coordinate frame {C } at centre of mass.


Rewrite above equations as


F [ ]
m [U] [0]
FC =  −−  =

C [I ] AC
[0]
NC

[U]: 3 × 3 identity matrix,


FC : 6 × 1 entity of external force and moment (see
Module 5, Lecture 5, Slide # 86).
AC : 6 × 1 entity of linear and angular
. acceleration.
. . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 67 / 77
A RTICULATED - BODY ALGORITHM
Newton-Euler equations for an arbitrary point O
F = m[U](V̇O − rC × ω̇ )
NO = C
[I ]ω̇ + rC × F
where the centre of mass is located by rC from O.
In a compact form FO = [I ]AO where
[I ] is a 6 × 6 equivalent ‘inertia’ matrix
[I ] consists of C [I ], m, [U], and
3 × 3 skew-symmetric matrix [rC ]
 
0 −rCz rCy
[rC ] = m  rCz 0 −rCx  [U]
−rCy rCx 0

Above equations must be modified for rigid bodies


connected by joints – Need to account for the
effects of link i + 1 through N on link i.
effects of generalized forces Qi+1 through QN .
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 68 / 77
A RTICULATED - BODY ALGORITHM
For an arbitrary link i, seek an equation of the form
Fi = [I ]A
i Ai + Pi
A
(46)
6 × 6 matrix [I ]i A : articulated-body inertia (ABI).
6 × 1 PiA : ‘bias’ term containing effects of links after {i}.
Also seek to obtain [I ]i A and Pi A in O(N) steps!
Following formulas (Featherstone 1983, 1987) achieve the
requirements:

i+1 Si+1 Si+1 [I ]i+1


[I ]A T A
[I ]A
i i+1 −
= [I ]i + [I ]A , [I ]A
N = [I ]N
Si+1
T [I ]A S
i+1 i+1

i+1 Si+1 (Qi+1 − Si+1 Pi+1 )


[I ]A T A
PiA = Pi+1
A
+ , PNA = 0 (47)
Si+1
T [I ]A
i+1 Si+1

Si+1 is a 6 × 1 entity representing the i + 1th joint9 axis.


9 Joint axis can be represented by a pair of 3 × 1 vectors (Q ; Q ) with
0
Q · Q0 = 0 (see Module 2, Additional Material). . . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 69 / 77
A RTICULATED - BODY ALGORITHM
Articulated-body inertia and the bias term for the
end-effector (link N) is known (see the planar 2P example).

[I ]A
N = [I ]N , and
PNA = 0.
Start with i = N − 1 and compute [I ]A i and Pi for each i
A

– O(N) algorithm.
From [I ]Ai and Pi , obtain q̈i for each i as
A

The acceleration Ai is related to Ai −1 by


Ai = Ai −1 + Si q̈i , A0 = 0 (48)
The generalised force Qi is the component of Fi along Si
SiT Fi = Qi (49)
Finally after simplification,

i Ai −1 − Si Pi
Qi − SiT [I ]A T A
q̈i = (50)
Si [I ]i Si
T A

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 70 / 77
A RTICULATED - BODY ALGORITHM
Fixed base A0 = 0, compute q̈1 from [I ]A 1 , P1 and for a
A

given Q1 .
Iterate for i = 1 to N to obtain all q̈i ’s.
Overall algorithm is O(N) since all sub-parts are O(N)
(Featherstone 1983, 1987).
Root Node (Fixed) 0

1
2
Can be used for multi-body
3
system in a tree structure.
4
5
0 is the root node (fixed
6
base).
7
10, 11 etc. are leaf nodes
8 9

11 10
(end-effectors)
Leaves (End-effector) 12

Figure 18: A typical tree structure . . . . . .


A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 71 / 77
F ORWARD DYNAMICS OF PARALLEL
MANIPULATORS
Recursive inverse and forward dynamics algorithms cannot
be directly applied to parallel manipulators and closed-loop
mechanisms.
Presence of passive joints and loop-closure constraints
relating passive and active joints – Impractical to eliminate
passive joints.
Equations of motion with m loop-closure constraints and m
Lagrange multipliers
[ ]( ) ( )
[M] [Ψ]T q̈ τ − [C]q̇ − G − F
=
[Ψ] [0] −λ −[Ψ]˙ q̇

n + m equations in n q̈i ’s and m λi ’s.


Solve for λ and q̈ using Gaussian elimination –
O((n + m)3 ) complexity.
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 72 / 77
F ORWARD DYNAMICS : I MPROVED
ALGORITHM

Form [M] etc. terms using an O(n) inverse dynamics


algorithm.
Form [Ψ] using a O(m2 ) algorithm.
Using O(m3 ) Gaussian elimination algorithm, solve λ from

([Ψ][M]−1 [Ψ]T )λ = −[Ψ]


˙ q̇ − [Ψ][M]−1 (τ − [C]q̇ − G − F)

Complexity of obtaining λ — O(nm2 + m3 )


For known λ , parallel manipulator is ‘equivalent’ to a serial
manipulator with extra right-hand side ‘forcing’ terms.
Solve for q̈ using an O(n) algorithm.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 73 / 77
F ORWARD DYNAMICS OF PARALLEL
MANIPULATORS

Efficient forward dynamics algorithm for large multi-body


systems (such as proteins) with closed-loops still a subject
of research!
O(n + m3 ) algorithm called MEXX (Lubich, et al., 1992).
Sequential regularisation method – Iterative O(n) (Ascher
& Lin 1999)
Requires k iterations for numerical convergence.
k claimed to be independent of the number of loops m!
k is small!
Parallel O(log n) algorithms are useful for very large
multi-body systems.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 74 / 77
S UMMARY

Efficient algorithms required for large multi-body systems


(such as proteins).
Ideally O(n) or better algorithms required.
O(n) recursive Newton-Euler algorithm extensively used for
inverse dynamics of serial manipulators.
The joint acceleration q̈ can be obtained in O(n) steps
using articulated body algorithm.
Extensive work has been done to develope dynamics
algorithms for closed-loop and parallel manipulators.
Parallel computation can be used to get O(log n)
algorithms.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 75 / 77
O UTLINE
.
. .1 C ONTENTS
.
. .2 L ECTURE 1
Introduction
Lagrangian formulation
.
. .3 L ECTURE 2
Examples of Equations of Motion
.
. .4 L ECTURE 3
Inverse Dynamics & Simulation of Equations of Motion
. ∗
. .5 L ECTURE 4
Recursive Formulations of Dynamics of Manipulators∗
.
. .6 A DDITIONAL M ATERIAL
MAPLE⃝ R
Tutorial, ADAMS⃝ R
Tutorial, Problems,
References and Suggested Reading
. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 76 / 77
A DDITIONAL M ATERIAL

Symbolic equations of motion using MAPLE⃝


R
.
Modeling and simulation using ADAMS .⃝
R

Exercise Problems
References & Suggested Reading

To view above links


Copy link and paste in a New Window/Tab by right click.
Close new Window/Tab after viewing.

. . . . . .
A SHITAVA G HOSAL (IIS C ) ROBOTICS : A DVANCED C ONCEPTS & A NALYSIS NPTEL, 2010 77 / 77

You might also like