Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
243
244 Dynamics of Open Chains
This evaluation of θ̈ from given values for τ , θ, and θ̇ is also often referred
to as the forward dynamics. While this interpretation may seem somewhat
different from the previous one, in fact it is not: given an input torque trajectory
τ (t) together with initial values for θ and θ̇ at t = t0 , forward integration of
Equation (9.2) from t = t0 then produces the complete output trajectory θ(t).
A robot’s dynamic equations are typically derived in one of two ways: by a
direct application of Newton’s and Euler’s dynamic equations for a rigid body
(often called the Newton-Euler formulation), or from the Lagrangian dy-
namics formulation. The Lagrangian formalism is conceptually elegant and
quite effective for robots with simple structures, e.g., with three or fewer de-
grees of freedom. However, the calculations can quickly become intractable for
robots with more degrees of freedom. For general open chains, the Newton-Euler
formulation leads to efficient recursive algorithms for both the inverse and for-
ward dynamics that can also be assembled into closed-form analytic expressions
for, e.g., the mass matrix M (θ) and other terms in the dynamics equation (9.1).
In this chapter we study both the Lagrangian and Newton-Euler dynamics
formulations for an open chain robot. We conclude with a formulation of the
dynamics in task space coordinates, or operational space dynamics.
a vertical line. The particle’s configuration space is this vertical line, and a
natural choice for generalized coordinate is the height of the particle, which we
denote by the scalar variable x ∈ R. Suppose the gravitational force mg acts
downward, and an external force f is also applied upward. By Newton’s second
law, the equation of motion for the particle is
f − mg = mẍ. (9.4)
We now apply the Lagrangian formalism to this particle. The kinetic energy is
mẋ2 /2, the potential energy is mgx, and the Lagrangian is
1 2
L(x, ẋ) = mẋ − mgx. (9.5)
2
The equations of motion are then given by
d ∂L ∂L
f= − = mẍ + mg, (9.6)
dt ∂ ẋ ∂x
which matches Equation (9.4).
We now derive the dynamic equations for a planar 2R open chain moving in
the presence of gravity. The chain moves in the x-y plane, with gravity acting
in the −y direction. Before the dynamics can be derived, the mass and inertial
properties of all the links must be specified. To keep things simple the two links
are modeled as point masses m1 and m2 concentrated at the ends of each link.
The position and velocity of the mass of link 1 are then given by
x1 L1 cos θ1
=
y1 L1 sin θ1
ẋ1 −L1 sin θ1
= θ̇1 ,
ẏ1 L1 cos θ1
P1 = m1 gL1 sin θ1
P2 = m2 g(L1 sin θ1 + L2 sin(θ1 + θ2 )).
The Euler-Lagrange equations (9.3) for this example are of the form
d ∂L ∂L
τi = − , i = 1, 2. (9.8)
˙
dt ∂ θi ∂θi
The dynamic equations for the 2R planar chain follow from explicit evaluation
of the right-hand side of (9.8) (we omit the detailed calculations, which are
straightforward but tedious):
+m2 (L1 L2 cos θ1 + L22 )θ̈2 − 2m2 L1 L2 θ̇1 θ̇2 sin θ2 − m2 L1 L2 θ̇22 sin θ2
+(m1 + m2 )L1 g cos θ1 + m2 gL2 cos(θ1 + θ2 )
τ2 = m2 (L1 L2 cos θ2 + L22 )θ̈1 + m2 L22 θ̈2 − m2 L1 L2 θ̇1 θ̇2 sin θ2
−m2 gL2 cos(θ1 + θ2 ).
where K(θ, θ̇) is the kinetic energy and P(θ) the potential energy of the overall
system. For rigid-link robots the kinetic energy can always be written in the
form
n n
1 XX 1
K(θ) = mij (θ)θ̇i θ̇j = θ̇T M (θ)θ̇, (9.10)
2 i=1 j=1 2
where mij (θ) is the (i, j) element of the n × n mass matrix M (θ); a constructive
proof of this assertion is provided when we examine the Newton-Euler formu-
lation in the next section. The dynamic equations are analytically obtained by
evaluating the right-hand side of
d ∂L ∂L
τi = − , i = 1, . . . , n. (9.11)
dt ∂ θ̇i ∂θi
With the kinetic energy expressed as in Equation (9.10), the dynamics can be
explicitly written as
n n
n X
X X ∂P
τi = mij (θ)θ̈j + Γijk (θ)θ̇j θ̇k + , i = 1, . . . , n, (9.12)
j=1 j=1 k=1
∂θi
where the Γijk (θ), known as the Christoffel symbols of the first kind, are
defined as
1 ∂mij ∂mik ∂mjk
Γijk (θ) = + − . (9.13)
2 ∂θk ∂θj ∂θi
The Lagrangian formulation has traditionally been regarded as the most di-
rect way of obtaining a set of closed-form analytical equations for the dynamics.
For open chain robots not only is this no longer true, but the formula for Γijk (θ)
above and our earlier examples offer a strong hint of how intractable the calcu-
lations can become, especially for robots with higher degrees of freedom. The
Newton-Euler formulation on the other hand allows us to bypass the evaluation
of these partial derivatives. However, as we show later, the Lagrangian formu-
lation offers important insights into the structure of the dynamics equations,
especially in the development of stable robot control laws.
shortly how to calculate h). The dynamic equations for the rigid body are then
given by
d
f = m v (9.14)
dt
d
m = h. (9.15)
dt
We now express these dynamic equations explicitly in frame {b} coordinates.
First express the angular and linear velocity in {b}-frame coordinates by
hb = I b ω b . (9.19)
Since Equation (9.15) calls for the derivative of h, differentiating (9.18) leads to
d
h = (ḣx x̂b + ḣy ŷb + ḣz ẑb ) + w × h.
dt
The moment equation (9.15) expressed in {b} frame coordinates thus becomes
mb = Ib ω̇b + ωb × Ib ωb . (9.20)
With the benefit of hindsight, and also making use of the fact that [v]v = v×v =
0 and [v]T = −[v], we write (9.21) in the following equivalent form:
mb Ib 0 ω̇b [ωb ] [vb ] Ib 0 ωb
= +
fb 0 mI v̇b 0 [ωb ] 0 mI vb
T
Ib 0 ω̇b [ωb ] 0 Ib 0 ωb
= − .
0 mI v̇b [vb ] [ωb ] 0 mI vb
Written in this way, each of the terms can now be identified with six-
dimensional spatial quantities as follows:
(i) (ωb , vb ) and (mb , fb ) can be respectively identified with the spatial velocity
(or twist) Vb and spatial force (or wrench) Fb :
ωb mb
Vb = , Fb = . (9.22)
vb fb
[ω 0 ] v0
[ω1 ][ω2 ] − [ω2 ][ω1 ] [ω1 ]v2 − [ω2 ]v1
= = ,
0 0 0 0
which can be written more compactly in vector form as
0
ω [ω1 ] 0 ω2
= .
v0 [v1 ] [ω1 ] v2
This generalization of the cross product to two twists V1 and V2 will be called
the Lie bracket of V1 and V2 .
Definition 9.1. Given two twists V1 = (ω1 , v1 ) and V2 = (ω2 , v2 ), the Lie
bracket of V1 and V2 , denoted simultaneously by [V1 , V2 ] and adV1 (V2 ), is
defined as follows:
[ω1 ] 0 ω2
[V1 , V2 ] = = adV1 (V2 ). (9.28)
[v1 ] [ω1 ] v2
Given V = (ω, v), we further define the following notation for the 6 × 6 matrix
representation [adV ]:
[ω] 0
[adV ] = ∈ R6×6 . (9.29)
[v] [ω]
With this notation the Lie bracket [V1 , V2 ] can also be expressed as
Definition 9.2. Given a twist V = (ω, v) and wrench F = (m, f ), define the
mapping
T
[ω] 0 m −[ω]m − [v]f
adTV (F) T
= [adV ] F = = (9.31)
[v] [ω] f −[ω]f
Using the above notation and definitions the dynamic equations for a single
rigid body can now be written as follows:
Note the similarity between (9.33) and the moment equation for a rotating rigid
body:
mb = Ib ω̇b − [ωb ]T Ib ωb . (9.34)
Equation (9.34) is simply the rotational component of (9.33).
252 Dynamics of Open Chains
then the forward kinematics up to each link frame {i} can be written
Figure 9.1: Free body diagram illustrating the moments and forces exerted on
link i.
or equivalently, V2 = AdT21 (V1 ) + A2 θ̇2 . Repeating this procedure for the sub-
sequent links, it can be established that
The above formulas for the velocities and accelerations, together with the
dynamic equations for any given link, can now be organized into a two-stage
forward-backward iterative algorithm for the inverse dynamics. Before doing
so, we examine how to include gravity in the dynamics. One way to simulate
the effects of gravity is to set the base frame to have an acceleration −g, where
g ∈ R3 denotes the gravitational acceleration vector as expressed in base frame
coordinates. In this case it is important to remember that the link acceleration
calculated from the recursive algorithm is not its true acceleration, but rather
its true acceleration minus g.
The algorithm is initialized by providing initial values for V0 , V̇0 , and Ftip ,
where V0 and V̇0 are respectively the spatial velocity and spatial acceleration
of the base frame expressed in base frame coordinates, and Ftip is the external
spatial force applied to some point on the final link, expressed in end-effector
frame coordinates. The joint trajectory θ(t) and its derivatives θ̇, θ̈ are also
assumed given as input.
9.3. Inverse Dynamics of Open Chains 255
where
Ai = AdM −1 (Si ), i = 1, . . . , n. (9.51)
i
With respect to the link frame attached at its center of mass, the 6 × 6
spatial inertia Gi of link i is defined as
Ii 0
Gi = , (9.52)
0 mi I
As noted earlier, the recursion formula Equation (9.55) for the acceleration V̇i
can also be replaced by the equivalent formula
where Vi is the spatial velocity of link frame {i}, and Gi is the spatial inertia
matrix of link i as defined by Equation (9.52) (both are expressed in link frame
{i} coordinates). Let T0i (θ1 , . . . , θi ) denote the forward kinematics from the base
frame {0} to link frame {i}, and let Jib (θ) denote the body Jacobian obtained
−1
from T0i Ṫ0i . Note that Jib as defined is a 6 × i matrix; we turn it into a 6 × n
matrix by filling in all entries of the last n − i columns with zeros. With this
definition of Jbi , we can write
Vi = Jib (θ)θ̇, i = 1, . . . , n.
The term inside the parentheses is precisely the mass matrix M (θ):
n
X
M (θ) = Jib (θ)T Gi Jib (θ). (9.61)
i=1
Some of the exericses at the end of this chapter examine ways to recursively
compute the entries of M (θ).
We now return to the original task of deriving a closed-form set of dynamic
equations. We start by defining the following stacked vectors:
V1
V = ... ∈ R6n (9.62)
Vn
F1
.. 6n
F = . ∈R . (9.63)
Fn
9.4. Dynamic Equations in Closed Form 257
in which A contains only the kinematic parameters, while G contains only the
mass and inertial parameters for each link.
With the above definitions, our earlier recursive inverse dynamics algorithm
can be assembled into the following set of matrix equations:
Γ(θ) has the property that Γn (θ) = 0 (such a matrix is said to be nilpotent
of order n), and one consequence verifiable through direct calculation is that
(I − Γ(θ))−1 = I + Γ(θ) + . . . + Γn−1 (θ). Defining L(θ) = (I − Γ(θ))−1 , it can
further be verified via direct calculation that
I 0 0 ··· 0
[AdT21 ] I 0 ··· 0
[AdT31 ] [AdT32 ] I ··· 0
L(θ) = ∈ R6n×6n . (9.76)
.. .. .. . . .
.
. . . . .
[AdTn1 ] [AdTn2 ] [AdTn3 ] · · · I
If an external wrench Ftip is applied at the tip, this can be included into the
following dynamics equation:
where J(θ) denotes the Jacobian of the forward kinematics expressed in the
same reference frame as Ftip , and
The g(θ) term reflects gravitational forces, while c(θ, θ̇) represents the Coriolis
and centrifugal forces. Comparing these equations with the Lagrangian form of
9.4. Dynamic Equations in Closed Form 259
we can see that elements of the c(θ, θ̇) term can be identified with
n X
X n
Γijk (θ)θ̇j θ̇k
j=1 k=1
and are thus quadratic in the θ̇i . Elements of the gravity term g(θ) can be
∂P
identified with ∂θ i
. With the Newton-Euler formulation, the partial derivative
terms appearing in Γijk (θ) can be evaluated directly from (9.83) without taking
derivatives. Further, by defining the matrix C(θ, θ̇) ∈ Rn×n as
n n
X 1 X ∂mij ∂mik ∂mjk
cij (θ, θ̇) = Γijk (θ)θ̇k = + − θ̇k , (9.87)
2 ∂θk ∂θj ∂θi
k=1 k=1
where cij denotes the (i, j) entry of C(θ, θ̇), it can be seen that c(θ, θ̇) can be
expressed as
c(θ, θ̇) = C(θ, θ̇)θ̇. (9.88)
The matrix C(θ, θ̇) is called the Coriolis matrix. The following property, re-
ferred to as the passivity property, turns out to have important ramifications
in proving the stability of certain robot control laws.
Proposition 9.1. The matrix Ṁ (θ) − 2C(θ, θ̇) ∈ Rn×n , where M (θ) ∈ Rn×n
is the mass matrix and dotM (θ) its time derivative, and C(θ, θ̇) ∈ Rn×n is the
Coriolis matrix as defined in (9.87), is skew-symmetric.
Proof. The (i, j) component of Ṁ − 2C is
n
X ∂mij ∂mij ∂mik ∂mkj
ṁij (θ) − 2cij (θ, θ̇) = θ̇k − θ̇k − θ̇k + θ̇k
∂θk ∂θk ∂θj ∂θi
k=1
n
X ∂mkj ∂mik
= θ̇k − θ̇k .
∂θi ∂θj
k=1
q̇1 = q2
q̇2 = M −1 (q1 ) (τ (t) − b(q1 , q2 )) ,
which is of the form q̇ = f (q, t). The Euler integration scheme for this equation
is thus of the form
Given a set of initial values for q1 (0) = θ(0) and q2 (0) = θ̇(0), the above equa-
tions can then be iterated forward in time to numerically obtain the motion
θ(t) = q1 (t).
Note that the above iteration appears to require the evaluation of M −1 (θ),
which can be computationally expensive. In fact, it is possible to integrate
these equations without having to explicitly compute the inverse of M (θ). The
closed-form dynamic equations can be arranged as
Setting θ̈ to zero in (9.89) leads to τ = b(θ, θ̇). Therefore by running the inverse
dynamics algorithm with θ̈(t) set to zero and (θ(t), θ̇(t)) set to their current
values, b(θ(t), θ̇(t)) can now be determined. Subtracting this from the given
value of τ (t) then results in the right-hand side of (9.89). Therefore, with a
means of evaluating M (θ), it is a straightforward matter to obtain θ̈(t) as the
solution to the linear equation Ax = c, where A = M (θ(t)) ∈ Rn×n is assured
to be nonsingular, and c = τ (t) − b(θ(t), θ̇(t)) is known.
Once a numerical integration scheme has been chosen, solving the forward
dynamics then reduces to a procedure for evaluating θ̈ from given values for θ,
θ̇, and τ . In the following algorithm we allow for the possibility of an external
spatial force Ftip applied to the final link.
9.5. Forward Dynamics of Open Chains 261
With the above algorithm for calculating the joint acceleration, various nu-
merical schemes for integrating the forward dynamics can be implemented; here
we present an algorithm for the most basic Euler method described above:
• Inputs: Initial conditions θ(0) and θ̇(0), input torques τ (t) and τext for
t ∈ [0, tf ], integration timestep h > 0.
• Output: Joint trajectory values θ[k] = θ(hk), k = 0, . . . , N .
• Initialization: Set N = tf /h.
• Iteration: For k = 1 to N do