Example of dynamics computation (Euler-Lagrange and Newton-Euler formulations):
Revolute-Prismatic (RP) manipulator (Problem 7.8)
Consider the Revolute-Prismatic (RP) manipulator shown in the figure below.
Let the coordinate system of the base frame (frame 0) be such that z0 is pointing out of the page and x0
is pointing to the right. Then, y0 is pointing towards top in the figure. The joint variables are q1 = θ1 and
q2 = d2 . Let the masses of the two links be m1 and m2 . Since this is a planar manipulator and rotation is only
around the z0 axis, only the inertia around the z axis is relevant; let I1,z and I2,z denote the moments of inertia
of links 1 and 2, respectively, around the axis pointing out of the page (I1,z and I2,z are both defined relative
to a coodinate frame with origin at the center of mass of the link).
If the planar motion of the manipulator is in the horizontal plane, then gravity terms are not relevant. If
the planar motion of the manipulator is in the vertical plane, then gravity terms need to be considered.
Let gravity be in the downward direction in the figure (i.e., in the −y0 direction). As shown in the figure,
the first link has an L-shape; let the longer length of this link be denoted by l and the shorter length (the offset)
by a. Let lc1 denote the distance from the base (origin of frame 0) to the center of mass of link 1. Also, assume
that the linkage between links 1 and 2 is such that when joint 2 actuates, it shifts the center of mass of link 2
by distance q2 .
Euler-Lagrange formulation to find the dynamics: The angular velocity Jacobian matrix corresponding
to the first link is:
0 0
Jω1 = 0 0
(1)
1 0
Since the second joint is prismatic, the angular velocity Jacobian matrix corresponding to the second link is
also:
0 0
Jω2 = 0 0 .
(2)
1 0
We find the linear velocity Jacobian matrices of the first and second link to be:
−lc1 s1 0
−l1 s1 − ac1 − q2 s1 c1
Jv1 = lc1 c1 0 ; Jv2 = l1 c1 − as1 + q2 c1 s1 .
0
0
0
0
(3)
where s1 = sin(q1 ) and c1 = cos(q1 ). Hence, the matrix D(q) is given by:
D(q) = m1 JvT1 Jv1 + m2 JvT2 Jv2 + JωT1 R10 I1 (R10 )T Jω1 + JωT2 R20 I2 (R20 )T Jω2
d11 d12
=
d21 d22
1
(4)
(5)
where
2
d11 = m2 a2 + m2 l12 + 2m2 l1 q2 + m1 lc1
+ m2 q22 + I1,z + I2,z
(6)
d12 = d21 = −am2
(7)
d22 = m2
(8)
As described above, since the rotation of both links is only about the z0 axis, only the moments of inertia about
the axis pointing out of the page are relevant (i.e., I1,z and I2,z ).
The Christoffel symbols for the manipulator are found as follows:
1 ∂d11
c111 =
=0
2 ∂q1
∂d21
1 ∂d11
c112 =
−
= −l1 m2 − m2 q2
∂q1
2 ∂q2
1 ∂d11
c121 = c211 =
= l1 m2 + m2 q2
2 ∂q2
1 ∂d22
c122 = c212 =
=0
2 ∂q1
∂d12
1 ∂d22
c221 =
−
=0
∂q2
2 ∂q1
1 ∂d22
c222 =
=0
(9)
2 ∂q2
The potential energy of the manipulator is given by:
P = m1 glc1 s1 + m2 g(l1 s1 + ac1 + q2 s1 ).
(10)
Hence,
"
g(q) =
∂P
∂q1
∂P
∂q2
#
=
m1 glc1 c1 + m2 g(l1 c1 − as1 + q2 c1 )
m2 gs1
.
(11)
We find the (k, j)th elements of the matrix C(q, q̇) to be
c11 = c211 q̇2
c12 = c121 q̇1
c21 = c112 q̇1
c22 = 0
(12)
The dynamical equations of the manipulator are given by:
q̈1
τ1
D(q)
+ C(q, q̇)q̇ + g(q) =
q̈2
f2
(13)
where τ1 is the applied torque at the first joint (revolute) and f2 is the applied force at the second joint
(prismatic). Hence, the dynamical equations can be written as:
d11 q̈1 + d12 q̈2 + c211 q̇2 q̇1 + c121 q̇1 q̇2 + m1 glc1 c1 + m2 g(l1 c1 − as1 + q2 c1 ) = τ1
d21 q̈1 + d22 q̈2 +
c112 q̇12
+ m2 gs1 = f2 .
(14)
(15)
Newton-Euler formulation to find the dynamics:
• Forward recursion: To assign the Denavit-Hartenberg coordinate frames, pick z0 pointing out of the page
and x0 to the right in the figure (i.e., y0 pointing towards top in the figure); pick z1 pointing along the
actuation axis of the second joint; x1 should be picked such that it intersects both z0 and z1 and is
perpendicular to both z0 and z1 . Hence, x1 is in the plane of the page. Then, y1 can point out of the
page. Pick z2 along the same direction as z1 (with origin of frame 2 at the end-effector) and x2 parallel
to x1 . Then, we have y1 and y2 parallel to z0 . The Denavit-Hartenberg table for this manipulator is:
Link
1
2
ai
a
0
αi
90o
0
2
di
0
l1 + q2
θi
90o + q1
0
Since the rotation is physically around the z0 axis, and the axes y1 and y2 are parallel to z0 , the angular
velocities of both link 1 and link 2 (written relative to the link-fixed frames) are q̇1~j, i.e., ω1 = ω2 = q̇1~j.
Here, the notations ~i, ~j, and ~k denote the 3 × 1 unit vectors, i.e., ~i = [1, 0, 0]T , ~j = [0, 1, 0]T , ~k = [0, 0, 1]T .
Since the base frame is stationary, we have ac,0 = ae,0 = 0. Looking at the orientation of frame 1, we have
r1,c1 = lc1~k. Hence, the linear acceleration of the center of mass of link 1 is:
ac,1 = R01 ae,0 + ω̇1 × r1,c1 + ω1 × (ω1 × r1,c1 ) = lc1 q̈1~i − lc1 q̇12~k.
(16)
Taking the end of link 1 to be the location where it meets the next link (i.e., the tip of the shorter end of
the L shape of link 1; note that the end of the link can be defined to be at any convenient location fixed
to the link as long as we keep the equations consistent), we can write r1,2 = l1~k + a~i. Hence, ae,1 is
ae,1 = R01 ae,0 + ω̇1 × r1,2 + ω1 × (ω1 × r1,2 ) = l1 q̈1~i − aq̈1~k − l1 q̇12~k − aq̇12~i.
The gravity vector written
in frame 2 is also given by
in frame 1 is given by g1 = −R01 g~j
g2 = −R02 g~j = −g[c1 , 0, s1 ]T .
(17)
T
= −g[c1 , 0, s1 ] . The gravity vector written
The linear acceleration of the center of mass of link 2 is:
(0)
(0)
(0)
ac,2 = R12 ae,1 + ω̇2 × r2,c2 + ω2 × (ω2 × r2,c2 ) + R02 q̈2 z1 + [(R12 ω1 ) × (R02 z1 )]q̇2 . Note that R02 z1 = ~k,
i.e., the z1 axis (actuation axis of joint 2) is along the z2 direction when seen relative to frame 2. Also,
r2,c2 = q2~k. Hence,
ac,2 = (l1 + q2 )q̈1~i − aq̈1~k − (l1 + q2 )q̇12~k − aq̇12~i + q̈2~k + q̇1 q̇2~i.
• Backward recursion: Start with f3 = τ3 = 0. Then,
f2 = m2 (ac,2 − g2 ) = m2 [(l1 + q2 )q̈1~i − aq̈1~k − (l1 + q2 )q̇12~k − aq̇12~i + q̈2~k + q̇1 q̇2~i + gc1~i + gs1~k].
τ2 = −f2 × r2,c2 + I2 ω̇2 + ω2 × (I2 ω2 ) = {m2 [q2 (l1 + q2 )q̈1 − q2 aq̇12 + q2 q̇1 q̇2 + q2 gc1 ] + I2,z q̈1 }~j
(18)
(19)
(20)
Then,
f1 = R21 f2 + m1 (ac,1 − g1 )
= m2 [(l1 + q2 )q̈1~i − aq̈1~k − (l1 + q2 )q̇ 2~k − aq̇ 2~i + q̈2~k + q̇1 q̇2~i + gc1~i + gs1~k]
1
1
+ m1 (lc1 q̈1~i − lc1 q̇12~k + gc1~i + gs1~k).
(21)
Also, since r2,c1 = (lc1 − l1 )~k − a~i,
τ1 = R21 τ2 − f1 × r1,c1 + (R21 f2 ) × r2,c1 + I1 ω̇1 + ω1 × (I1 ω1 )
= {m2 [q2 (l1 + q2 )q̈1 − q2 aq̇12 + q2 q̇1 q̇2 + q2 gc1 ] + I2,z q̈1 + lc1 f1,x − (lc1 − l1 )f2,x − af2,z + I1,z q̈1 }~j
(22)
where
f1,x = m2 [(l1 + q2 )q̈1 − aq̇12 + q̇1 q̇2 + gc1 ] + m1 (lc1 q̈1 + gc1 )
f2,x = m2 [(l1 + q2 )q̈1 −
aq̇12
f2,z = m2 [−aq̈1 − (l1 +
q2 )q̇12
(23)
+ q̇1 q̇2 + gc1 ]
(24)
+ q̈2 + gs1 ]
(25)
Since the actuation of the first joint is along z0 = y1 , the actuated joint torque for the first joint (revolute)
is τ1,y . Since the actuation of the second joint is along z1 = z2 , the actuated joint force for the second
(i)
joint is f2,z . Another way to see which joint forces are the externally actuated forces is to look at fiT zi−1
(i)
(i)
or τiT zi−1 (depending on whether joint i is prismatic or revolute) where zi−1 denotes the axis zi−1 written
(1)
(2)
relative to frame i; here, τ1T z0 = τ1,y and f2T z1 = f2,z .
Therefore, the dynamics equations are:
m2 [q2 (l1 + q2 )q̈1 − q2 aq̇12 + q2 q̇1 q̇2 + q2 gc1 ] + lc1 f1,x − (lc1 − l1 )f2,x − af2,z + (I1,z + I2,z )q̈1 = u1
m2 [−aq̈1 − (l1 +
q2 )q̇12
+ q̈2 + gs1 ] = u2
(26)
(27)
where u1 is the actuated torque for the first joint and u2 is the actuated force for the second joint,
respectively.
Substituting (23)-(25) into (26), we get the dynamics equation (14). Also, we see that (27) is the same as the
dynamics equation (15).
3
© Copyright 2026 Paperzz