Beruflich Dokumente
Kultur Dokumente
1. In the given Euler angle representation, the rotation matrix is given as R = Rz, Ry, Rz, . Hence, we have
R = S(~k)Rz, Ry, Rz, + Rz, S(~j)Ry, Rz, + Rz, Ry, S( ~k)Rz,
= S(~k)Rz, Ry, Rz, + S(Rz, ~j)Rz, Ry, Rz, + S(Rz, Ry, ~k)Rz, Ry, Rz,
(1)
(2)
where ~i, ~j, and ~k represent the unit vectors in the x, y, and z directions, respectively, i.e., ~i = [1, 0, 0]T ,
~j = [0, 1, 0]T , and ~k = [0, 0, 1]T . From (2), since R = S( i )R where i is the angular velocity expressed
in the inertial frame, we can write i as
~i + (c + s s )
~j + ( + c )
~k
i = (s + c s )
s + c s
= c + s s
+ c
where s = sin(), c = cos(), etc. Hence, i = J i (q)q where
0 s c s
J i (q) = 0 c s s .
1
0
c
(3)
(4)
(5)
Here, we want to write the kinetic energy in the form K = 21 T I. Hence, we want in the body-fixed
frame. This can be obtained from i using = RT i as
c
s
s
+ s
s
= c
(6)
+ c
Equivalently, since when we consider in body-fixed frame, we should have R = RS(), we can obtain
directly from the expression for R as R = Rz, Ry, Rz, by writing R as
R = S(~k)Rz, Ry, Rz, + Rz, S(~j)Ry, Rz, + Rz, Ry, S( ~k)Rz,
(7)
= Rz, Ry, Rz, S([Rz, Ry, Rz, ]T ~k) + Rz, Ry, Rz, S([Ry, Rz, ]T ~j) + Rz, Ry, Rz, S([Rz, ]T ~k)
(8)
and obtaining = [Rz, Ry, Rz, ]T ~k + [Ry, Rz, ]T ~j + [Rz, ]T ~k.
Hence, = J(q)q where
c s
J(q) = s s
c
s
c
0
0
0 .
1
(9)
Equivalently, equation (9) can be obtained from equation (5) using J = RT Ji . The kinetic energy of the
system is given by K = 21 T I = 21 qT J T (q)IJ(q)q where I is a diagonal matrix with diagonal elements
Ixx , Iyy , and Izz . q = [, , ]T . Since there is no external force (in particular, no gravity), the potential
energy is zero. The dynamics of the system can be written by applying the Euler-Lagrange equations
d L
L
= 0 , i = 1, . . . , 3
dt qi
qi
T
with L = K = 21 T I = 12 qT J T (q)IJ(q)q.
Note that L
= I and
L
L
T
T
q = I q and q = IJ. Therefore, from equation (10), we get
d T
IJ T I
= 0.
dt
q
1
(10)
(11)
d
d
Substituting this into equation (11), taking
Expanding dt
( T IJ), we get dt
( T IJ) = T IJ + T I J.
transpose throughout, and simplifying, we can write
T
1
J
I = 0.
(12)
I +
J
q
s c
c c
0
s
s + c
s s
0
J = c
s
0
0
0 c c c + s s
s s
+ c
s
= 0 c
q
0
s
0
0
J
J 1 = c
q
+ s
s
c
+ c
0
s s
c
(13)
(14)
s
s
c
c
s
s
(15)
Comparing with (6), we see that the right hand side of equation (15) is simply S(). Hence,
1
J = S().
J
q
(16)
(17)
(18)
2. The position of the center of mass of the cart is given by [q1 , 0, 0]T . Here, for simplicity, we can consider
the cart to be simply a point (without any height) since the height of the cart will only add a constant term
to the potential energy and will not affect the resulting dynamics equations. The velocity of the center of
mass of the cart is [q1 , 0, 0]T . The position of the center of mass of the pole is [q1 + l2 sin(q2 ), 0, l2 cos(q2 )]T
and the velocity of the center of mass of the pole is [q1 + l2 cos(q2 )q2 , 0, l2 sin(q2 )q2 ]T . The angular
velocity of the pole is [0, q2 , 0]T . Hence, the kinetic energy and potential energy of the system are given
by K = 21 m1 q12 + 12 m2 [q12 + l22 q22 + 2l2 cos(q2 )q1 q2 ] + 12 I2 q22 and P = m2 gl2 cos(q2 ). Defining the Lagrangian
L = K P , the dynamics of the system are given by the Euler-Lagrange dynamics equations as:
d L
L
F1 =
(19)
dt q1
q1
d
=
(m1 + m2 )q1 + m2 l2 cos(q2 )q2
(20)
dt
= (m1 + m2 )
q1 + m2 l2 cos(q2 )
q2 m2 l2 sin(q2 )q22
d L
L
2 =
dt q2
q2
d
=
(m2 l22 + I2 )q2 + m2 l2 cos(q2 )q1 (m2 l2 sin(q2 )q1 q2 + m2 gl2 sin(q2 ))
dt
= (m2 l22 + I2 )
q2 + m2 l2 cos(q2 )
q1 m2 l2 sin(q2 )q1 q2 + m2 l2 sin(q2 )q1 q2 m2 gl2 sin(q2 )
=
(m2 l22
+ I2 )
q2 + m2 l2 cos(q2 )
q1 m2 gl2 sin(q2 )
(21)
(22)
(23)
(24)
(25)
where F1 is the force at the prismatic joint (joint 1) and 2 is the torque at the revolute joint (joint 2). If
the revolute joint is not actively controlled (i.e., if the only actuation is the force on the cart), then 2 is
simply zero.