HAL Id: hal-01352566
https://hal.archives-ouvertes.fr/hal-01352566
Submitted on 8 Aug 2016
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Distributed under a Creative Commons Attribution| 4.0 International License
An Alternative Derivation of the Quaternion Equations of Motion for Rigid-Body Rotational Dynamics
Firdaus Udwadia, Aaron Schutte
To cite this version:
Firdaus Udwadia, Aaron Schutte. An Alternative Derivation of the Quaternion Equations of Motion
for Rigid-Body Rotational Dynamics. Journal of Applied Mechanics, American Society of Mechanical
Engineers, 2010, 77 (4), pp.044505. �10.1115/1.4000917�. �hal-01352566�
An Alternative Derivation of the Quaternion Equations of Motion for Rigid-Body Rotational Dynamics
Firdaus E. Udwadia Professor
Departments of Aerospace and Mechanical Engineering, Civil Engineering, Mathematics, and Information and Operations Management,
University of Southern California, 430K Olin Hall,
Los Angeles, CA 90089-1453 e-mail: fudwadia@usc.edu Aaron D. Schutte
Department of Aerospace and Mechanical Engineering, University of Southern California,
Los Angeles, CA 90089-1453 e-mail: schutte@usc.edu
This note provides a direct method for obtaining Lagrange’s equa- tions describing the rotational motion of a rigid body in terms of quaternions by using the so-called fundamental equation of con- strained motion.
1 Introduction
In this note, a general formulation for rigid body rotational dynamics is developed using quaternions, also known as Euler parameters. The use of quaternions is especially useful in multi- body dynamics when large angle rotations may be involved since their use does not cause singularities to arise, as it occurs when using Euler angles.
The equations of rotational motion in terms of quaternions ap- pear to have been first obtained by Nikravesh et al.
关1
兴. The au- thors in this particular paper developed an approach to model and simulate constrained mechanical systems in which the compo- nents
共bodies
兲in the mechanical system are connected by nonre- dundant holonomic constraints. Since they use unit quaternions to parametrize the angular coordinates of a rigid body, they provide many useful unit quaternion identities and show their relation to the components of the angular velocity of the rigid body. To de- velop a suitable set of equations of motion involving quaternions, they utilize Lagrange’s equation. Of course the components of the unit quaternion must be of a unit norm and they are not all inde- pendent, and so the unit norm requirement must be imposed as a constraint on the system. They employ the Lagrange multiplier method to deal with this characteristic, and in so doing, they ar- rive at a mixed set of ordinary differential equations and an alge- braic equation, which comprises a differential algebraic equation
共DAE
兲. The accelerations are found by inverting the DAE mass matrix, and the Lagrange multiplier is explicitly found. The gen- eralized torques in this framework are given in a four-vector for- mat, and its relation to a physically applied torque in the body- fixed coordinate frame is provided by computing the virtual work of a force located at an arbitrary point of the rigid body and utilizing quaternion identities.
In a later paper, Morton
关2
兴obtains both Hamilton’s and Lagrange’s equations in terms of quaternions. However, neither of these sets of equations is developed solely through the use of Hamiltonian or Lagrangian dynamics, as one might have ex- pected. Morton’s starting point for each of these sets of equations—the backbone for all of his derivations—is the New- tonian equations of rotational motion that describe the rate of change in the angular momentum in terms of quaternions
共Eqs.
共
49
兲and
共57
兲in Ref.
关2
兴兲. To obtain Hamilton’s equations, Morton compares the rate of change in the angular momentum, expressed in terms of quaternions using Newton’s equations and what is obtained using the Hamiltonian formalism
共Eqs.
共57
兲and
共62b
兲are compared in Morton’s paper
关2
兴兲. He thus obtains, through this somewhat long and involved procedure, the crucial connection between the physically applied torque vector and the generalized quaternion torques that are necessary to complete his Hamilton’s equations. In deriving Lagrange’s equations, Morton likewise starts with the Newtonian equations of motion in terms of quater- nions
共Eq.
共49
兲in Morton’s paper
关2
兴兲and compares these equa- tions with what is obtained by carrying out the Lagrange deriva- tive of the kinetic energy of rotation
共Morton’s Eqs.
共79
兲and
共82
兲 关2
兴兲. Results obtained through comparisons between the Hamil- tonian formulation and the Newtonian formulation, regarding the connection between the physically applied torque and the quate- rion torque, are then utilized in the Lagrange derivative to identify the Lagrange multiplier that is needed to enforce the constraint that the quaternion must have a unit norm. Hence, the derivation of the Lagrangian equations of rotational motion in terms of quaternions appears to be carried out via a mixed line of thinking—some of it Newtonian, some Hamiltonian, some Lagrangian,—and the final Hamilton and Lagrange equations are both obtained basically through a comparison with those obtained by the Newtonian approach.
Having described in detail the two principal methods used to date in arriving at the requisite equations of motion, in this paper, we develop the Lagrange equations for rotational motion using a direct Lagrangian approach and follow a simple and straight- forward line of reasoning rooted solely within the framework of Lagrangian dynamics. The development does not require the use of Lagrange multipliers, and it yields a positive definite mass matrix involving only the quaternion components. After the un- constrained equations of motion are obtained, the so-called funda- mental equation is directly employed to get the final equations describing rotational motion. The ease, conceptual simplicity, and clarity, with which the equations are derived, are striking when compared with the derivation of Morton
关2
兴. No appeal to New- tonian mechanics is made, and no comparisons with results from it are made to arrive at the requisite equations. Of special impor- tance is the simple derivation provided herein of the connection between the physically applied torque and the generalized quater- nion torque. Unlike in Ref.
关2
兴, it is obtained completely within the framework of Lagrangian mechanics from simple arguments related to virtual work, and unlike in Ref.
关1
兴, it is achieved in a few simple steps that require less appeal to quaternion identities and algebraic manipulations. The approach used in the derivation is new and relies on some simple recent results dealing with the development of the equations of motion of constrained mechani- cal systems obtained by Udwadia and Kalaba
关3,4
兴. In addition, it provides new insights that were unavailable before.
2 Lagrange’s Equations for Rigid Body Dynamics Us- ing Quaternions
Consider a rigid body that has an angular velocity
苸R
3, with respect to an inertial coordinate frame. The components of this angular velocity with respect to a coordinate frame fixed in the body and whose origin is located at the body’s center of mass are denoted by
1,
2, and
3. We can express the four-vector
=
关0 ,
1,
2,
3兴Tin terms of quaternions by the relation
= 2Eu˙ = − 2E ˙ u
共1
兲where the unit quaternion u ª
关u
0,u
1, u
2, u
3兴T=
关u
0, u
T兴T=
关cos / 2 ,e
Tsin / 2
兴T, and the orthogonal matrix
E =
冤− − − u u u u
0123− u u u u
1023− u u u u
2301− u u u u
3102冥ª
冤− − − E u
T1 冥 共2
兲By a unit quaternion, we mean that
N
共u
兲ª u
Tu = 1
共3
兲Geometrically, e
苸R
3is any unit vector defined relative to an inertial coordinate frame and is the rotation about this unit vec- tor.
Without loss of generality, we assume that the body-fixed coor- dinate axes are aligned along the principal axes of inertia of the rigid body whose principal moments of inertia are J
i, i= 1,2,3. To formulate the equations of motion of the rotating rigid body, which may be subjected to a generalized torque four-vector ⌫
u共
part of which may be derived from a potential
兲, we begin by considering its kinetic energy
T = 1
2
TJˆ = 1
2
TJ = 2u˙
TE
TJEu˙ = 2u
TE ˙
TJE ˙ u
共4
兲The inertia matrix of the rigid body is represented by Jˆ
= diag
共J
1,J
2,J
3兲and the 4 ⫻ 4 diagonal matrix J = diag
共J
0,J
1, J
2,J
3兲, where J
0is any positive number.
We now proceed to obtain Lagrange’s equation of motion for the rotating rigid body. We begin by assuming at first that each component of the four-vector u is independent. This assumption is tantamount to taking the generalized virtual displacements ␦ u
i, i
= 0,1,2,3 to be all independent of one another. After we obtain these equations under this assumption, we will then impose on them the required unit quaternion constraint
共Eq.
共3
兲兲. The con- strained equations of motion are then the equations of rotational motion of the body. Thus, Lagrange’s equation becomes
d
dt
冉 T u˙
冊− T u = ⌫
u 共5
兲The generalized quaterion torque four-vector ⌫
uis the torque that would exist if all the components of u were actually independent.
Noting that T / u˙= 4E
TJEu˙, we obtain d
dt
冉 T u˙
冊= 4E
TJEu¨ + 4E ˙
TJEu˙ + 4E
TJE ˙ u˙
共6
兲Also, since
T
u =
u 2u
TE ˙
TJE ˙ u = 4E ˙
TJE ˙ u = − 4E ˙
TJEu˙
共7
兲Lagrange’s equation, assuming that the components of the unit quaternion are all independent, then becomes
4E
TJEu¨ + 8E ˙
TJEu˙ + 4E
TJE ˙ u˙ = ⌫
u 共8
兲Using Eq.
共2
兲and noting that E ˙ u˙ =
关N03⫻1共u˙兲兴, the last member on the left-hand side of Eq.
共8
兲can be simplified to
4E
TJE ˙ u˙ = 4
关u E
1T兴冋J 0
00 Jˆ
册冋N 0
3⫻1共u˙
兲册= 4J
0N
共u˙
兲u
共9
兲where N
共u˙
兲=u˙
Tu˙. Hence, we can rewrite Eq.
共8
兲as
4E
TJEu¨ + 8E ˙
TJEu˙ + 4J
0N
共u˙
兲u = ⌫
u 共10
兲Note that the matrix M
u= 4E
TJE multiplying the four-vector u¨ in Eq.
共10
兲is symmetric and positive definite. In order to not distract
us from our line of thinking, we shall later on show how we express the generalized quaterion torque four-vector ⌫
uin terms of the physically applied torque three-vector, ⌫ ˆ
B
=
关⌫1,B⌫
2,B⌫
3,B兴T, applied to the body, where ⌫
1,B, ⌫
2,B, and ⌫
3,Bdenote the compo- nents of the physically applied torque about the body-fixed axes.
The equation of motion in Eq.
共10
兲presumes that the compo- nents of the four-vector u are all independent of each other, which is indeed not the case in actuality, because these four components are constrained by Eq.
共3
兲. The explicit equation of motion of the constrained system is now written directly using the fundamental equation of constrained motion
关3
兴. To do this, we first differenti- ate the constraint equation
共3
兲twice with respect to time to yield A
uu¨ ª u
Tu¨ = − N
共u˙
兲ª b
u 共11
兲The explicit equation of motion is then directly and simply given by
关4
兴4E
TJEu¨ + 8E ˙
TJEu˙ + 4J
0N
共u˙
兲u = ⌫
u+ M
u1/2共A
uM
u−1/2兲+共b
u− A
ua
u兲 共12
兲where a
uis the acceleration of the unconstrained system obtained from Eq.
共10
兲and is given by
a
u= E
TJ
−1E
冉⌫ 4
u− 2E ˙
TJEu˙ − J
0N
共u˙
兲u
冊 共13
兲The superscript “+” in Eq.
共12
兲denotes the Moore–Penrose in- verse of the matrix A
uM
u−1/2. We next simply proceed to assemble the various quantities required to determine the last member on the right-hand side of Eq.
共12
兲; this is done by computing A
ua
u, then b
u− A
ua
u, and lastly M
u−1/2共A
uM
u−1/2兲+. We begin by noting that
E
TJ
−1E =
关u E
1T兴冤J 1 0
0Jˆ 0
−1冥冋E u
T1册= uu J
0T+ E
1TJˆ
−1E
1 共14
兲From Eq.
共2
兲, we find that Eu =
关EuT1兴u =
关EuT1uu兴=
关031⫻1兴, so that using Eq.
共14
兲, we obtain the relations
E
TJ
−1Eu = u
J
0, u
TE
TJ
−1E = u
TJ
0, and u
TE
TJ
−1Eu = 1 J
0共
15
兲where we have used the fact that N
共u
兲= 1. Hence, we find that
A
ua
u= u
TE
TJ
−1E
冉⌫ 4
u− 2E ˙
TJEu˙ − J
0N
共u˙
兲u
冊= u
T⌫
u4J
0− 2 u
TE ˙
TJEu˙
J
0− N
共u˙
兲= u
T⌫
u4J
0+
TJ
2J
0− N
共u˙
兲= u
T⌫
u4J
0+
TJˆ
2J
0− N
共u˙
兲 共16
兲where in the second and third equalities above, we have used Eqs.
共
1
兲and
共15
兲. This yields b
u− A
ua
u= − N
共u˙
兲− u
T⌫
u4J
0−
TJˆ
2J
0+ N
共u˙
兲= − u
T⌫
u4J
0−
TJˆ 2J
0共
17
兲Lastly, since the matrix A
u=u
Tis a nonzero row vector, we have
M
u1/2共A
uM
u−1/2兲+= A
uT共A
uM
u−1A
uT兲−1= 4u
共u
TE
TJ
−1Eu
兲−1= 4J
0u
共18
兲where Eq.
共15
兲is again used in the last equality.
Using Eqs.
共17
兲and
共18
兲, Eq.
共12
兲reduces to
4E
TJEu¨ + 8E ˙
TJEu˙ + 4J
0N
共u˙
兲u =
共I − uu
T兲⌫u− 2
共TJˆ 兲 u
共19
兲or alternatively to
4E
TJEu¨ + 8E ˙
TJEu˙ + 4J
0N
共u˙
兲u =
共I − uu
T兲⌫u− 2
共TJ 兲 u
共20
兲In Eqs.
共19
兲and
共20
兲, I is the 4 ⫻ 4 identity matrix. The term 2
共TJ 兲 on the right-hand side in Eq.
共20
兲arises because of the constraint N
共u
兲= 1, and is twice the kinetic energy of rotation of the rigid body.
Equation
共20
兲also informs us—and this does not seem to be widely recognized—that the generalized torque must appear in the form ⌫ ˆ
u
ª
共I −uu
T兲⌫u. Furthermore, because I =
共I −uu
T兲+uu
T, postmultiplying this relation by ⌫
u, we find that
⌫
u=
共I − uu
T兲⌫u+ u
共u
T⌫
u兲 共21
兲Thus, u
T⌫
uis the component of the generalized torque four-vector
⌫
uin the direction of the unit vector u, and ⌫ ˆ
u
is the orthogonal projection of ⌫
uin the plane normal to u.
The generalized acceleration u¨ is now explicitly obtained as u¨ = E
TJ
−1E
冉− 2E ˙
TJEu˙ − J
0N
共u˙
兲u +
共I − uu 4
T兲⌫u−
共TJˆ 2 兲 u
冊共
22
兲Since
EE ˙
T= 1
2
冋 0 − ˜
T册 共23
兲where
˜ =
冤− 0
32− 0
13− 0
21冥 共24
兲the first term on the right-hand side of Eq.
共22
兲can be expressed as
2E
TJ
−1EE ˙
TJEu˙ = 1
2 E
TJ
−1冋 0 − ˜
T册冋Jˆ 0
册= 1
2
冉−
共TJ Jˆ
0兲 u
+ E
1TJˆ
−1 ˜ Jˆ
冊 共25
兲By Eq.
共15
兲, the second and fourth terms on the right-hand side of Eq.
共22
兲become
J
0N
共u˙
兲E
TJ
−1Eu = N
共u˙
兲u
共26
兲and
E
TJ
−1E
共TJˆ 兲 u 2 =
TJˆ
2 E
TJ
−1Eu =
共TJˆ 兲 u
2J
0 共27
兲respectively. Finally, using Eq.
共15
兲again, the third term on the right-hand side of Eq.
共22
兲simplifies to
E
TJ
−1E
共I − uu
T兲⌫u4 =
关E
TJ
−1E −
共E
TJ
−1Eu
兲u
T兴⌫u4
=
冉E
TJ
−1E − uu J
0T冊⌫ 4
u= E
1TJˆ
−14 E
1⌫
u 共28
兲where the last equality follows from Eq.
共14
兲. Thus, Eq.
共22
兲simplifies to
u¨ = − 1
2 E
1TJˆ
−1 ˜ Jˆ − N
共u˙
兲u + E
1TJˆ
−1E
1⌫
u4
共29
兲Note the arbitrary positive scalar J
0has vanished, and we see that Eq.
共29
兲is obtained directly in a simple straightforward manner.
In Eq.
共29
兲, u and ⌫
uare four vectors, is a three-vector, and E
1is the 3 ⫻ 4 matrix defined in Eq.
共2
兲.
Our final task is to express the generalized torque four-vector
⌫ ˆ
u
=
共I −uu
T兲⌫uon the right-hand side of Eq.
共20
兲, in terms of the physically applied torques on the body. Consider the four-vector
⌫
B=
关0
兩⌫ ˆ
B
T兴T
=
关0, ⌫
1,B, ⌫
2,B, ⌫
1,B兴T 共30
兲The virtual work done under an infinitesimal, virtual rotation ␦
=
关0 , ␦
1, ␦
2, ␦
3兴T, in which ␦
1, ␦
2, and ␦
3are the virtual
“displacements” about the body-fixed axes, is then given by ⌫
B T␦ . On the other hand, the virtual work done by the generalized quaternion torque vector ⌫ ˆ
u
is given by ⌫ ˆ
u
T
␦ u, where the virtual displacement of the corresponding quaternion is ␦ u. Equating these two virtual work expressions, we obtain
⌫
B T␦ = ⌫ ˆ
u T
␦ u = ⌫
uT共
I − uu
T兲␦ u
共31
兲Here, we set =
关0 , ˙
1
, ˙
2
, ˙
3兴T
, where ˙
1
, ˙
2
, and ˙
3
are the com- ponents of the angular velocity about the body-fixed axes, and by Eq.
共1
兲, we have
冤
0 ˙ ˙ ˙
123冥= 2E
冤u˙ u˙ u˙ u˙
0123冥 共32
兲so that
␦ = 2E ␦ u
共33
兲However, since u
Tu˙= 0, the virtual displacement ␦ u in Eq.
共33
兲must satisfy the relation
u
T␦ u = 0
共34
兲Solving for ␦ u in Eq.
共34
兲, we get
关5
兴␦ u =
共I − uu
T兲␦ w
共35
兲where the four-vector ␦ w is any arbitrary, infinitesimal column vector. In view of Eqs.
共33
兲and
共35
兲, we find that Eq.
共31
兲be- comes
⌫
BT
2E
共I − uu
T兲␦ w = ⌫
uT共
I − uu
T兲␦ w = ⌫ ˆ
u
T
␦ w
共36
兲because
共I −uu
T兲is idempotent. Since ␦ w is arbitrary, we have
2
共I − uu
T兲E
T⌫
B=
共I − uu
T兲⌫u= ⌫ ˆ
u 共
37
兲The left-hand member in Eq.
共37
兲can be simplified and written as 2
共I − uu
T兲E
T⌫
B= 2E
T⌫
B= 2
关u E
1T兴冋⌫ ˆ 0
B册
= 2E
1T⌫ ˆ
B 共38
兲where the first equality follows because u
TE
T⌫
B=
关1
兩0
1⫻3兴⫻关 0
兩⌫ˆ
B
T兴T
= 0, and the last from u
TE
1T= 0. Hence, relation
共37
兲be- comes
⌫ ˆ
u
= 2E
1T⌫ ˆ
B
= 2E
T⌫
B 共39
兲Thus, the equation of motion
共20
兲describing the rotational motion of the system becomes
4E
TJEu¨ + 8E ˙
TJEu˙ + 4J
0N
共u˙
兲u = 2E
T⌫
B− 2
共TJ 兲 u
共40
兲where ⌫
Bis the four-vector containing the components of the
body torque about the body-fixed axes. Furthermore, using the
first equality in Eq.
共39
兲, premultiplication by E
1yields
⌫ ˆ
B
= 1 2 E
1⌫ ˆ
u
= 1
2 E
1共I − uu
T兲⌫u= 1
2 E
1⌫
u 共41
兲since E
1E
1T=I. Using Eq.
共41
兲in Eq.
共29
兲, we get
u¨ = − 1
2 E
1TJˆ
−1 ˜ Jˆ − N
共u˙
兲u + E
1TJˆ
−1⌫ ˆ
B
2
共42
兲Equations
共40
兲and
共42
兲represent the requisite Lagrange equa- tions that describe the rotational motion of a rigid body in terms of quaternions and the applied torques in the body-fixed coordinate frame.
We end with some observations and remarks, which provide additional insights.
1. We observe that Eq.
共40
兲is the same as Eq.
共12
兲, for in getting to Eq.
共40
兲, all we have done is compute the various entities on the right-hand side of Eq.
共12
兲. From a computa- tional stand-point, we could just as well as have used Eq.
共
12
兲along with Eq.
共39
兲directly.
2. Were we to have replaced ⌫
uin Eqs.
共5
兲and
共10
兲by
共I
−uu
T兲⌫u, we would, accordingly, need to replace the term ⌫
uon the right-hand side of Eq.
共20
兲also by
共I −uu
T兲⌫u. But since
共I −uu
T兲is idempotent, this leaves Eq.
共20
兲unchanged.
This shows that rotational dynamics only involves the com- ponent
共I −uu
T兲⌫uof the generalized quaternion torque ⌫
u. Alternately, we conclude that the component of the four- vector ⌫
ualong u, namely, u
T⌫
u, does not play any role in the rotational dynamics of a rigid body
共see Eq.
共21
兲兲. 3. The simplicity of the approach developed herein becomes
apparent were we to be mainly interested in computing the rotational response of a rigid body subjected to an impressed torque. Then, from the abovementioned remarks, we see that instead of Eq.
共10
兲, one could have started with the uncon- strained equation of motion given by
M
uu¨ ª 4E
TJEu¨ = − 8E ˙
TJEu˙ − 4J
0N
共u˙
兲u + 2E
T⌫
B 共43
兲where ⌫
Bis the physically impressed torque four-vector on the rigid body. To arrive at Eq.
共43
兲, we have replaced ⌫
uin
Eq.
共10
兲by
共I −uu
T兲⌫uand used Eq.
共39
兲. Let us denote the right-hand side of Eq.
共43
兲by
Q ª − 8E ˙
TJEu˙ − 4J
0N
共u˙
兲u + 2E
T⌫
B 共44
兲Direct application of the fundamental equation now gives the rotational equation of motion of a rigid body
共subjected to the impressed torque ⌫
B兲in a single step as
4E
TJEu¨ = Q + M
u1/2共A
uM
u−1/2兲+共b
u− A
uM
u−1Q
兲 共45
兲where the various quantities are defined as before, and Q is given in Eq.
共44
兲. For computational purposes, the right- hand side of Eq.
共45
兲can be numerically computed directly, and there is no need to simplify it any further as we did before in going from Eqs.
共12
兲–
共40
兲.
3 Conclusion
This note provides a simple and direct route for obtaining Lagrange’s equation describing rigid body rotational motion in terms of quaternions. The derivation is carried out in a uniform manner without any appeal to the notion of Lagrange multipliers or Newtonian mechanics by using the fundamental equation of constrained motion. A new and simple way of establishing the connection between the physically applied torque and the gener- alized quaternion torque is presented. Besides providing new in- sights hereto unavailable, this derivation reveals the explicit Lagrange’s equation in a very transparent manner, an aspect pre- vious derivations have had difficulty attaining.
References
关1兴Nikravesh, P. E., Wehage, R. A., and Kwon, O. K., 1985, “Euler Parameters in Computational Kinematics and Dynamics,” ASME J. Mech., Transm., Autom.
Des.,107, pp. 358–369.
关2兴Morton, H. S., 1993, “Hamiltonian and Lagrangian Formulations of Rigid- Body Rotational Dynamics Based on the Euler Parameters,” J. Astronaut. Sci.,
41, pp. 569–591.
关3兴Udwadia, F. E., and Kalaba, R. E., 1992, “A New Perspective on Constrained Motion,” Proc. R. Soc. London, Ser. A, 439, pp. 407–410.
关4兴Udwadia, F. E., and Kalaba, R. E., 1996,Analytical Dynamics: A New Ap- proach, Cambridge University Press, Cambridge, England.
关5兴Graybill, F., 1983,Matrices With Applications in Statistics, Wadsworth Pub- lishing Company, Belmont, CA.