Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

An Alternative Derivation of the In a later paper, Morton 关2兴 obtains both Hamilton’s and

Lagrange’s equations in terms of quaternions. However, neither of


Quaternion Equations of Motion for these sets of equations is developed solely through the use of
Hamiltonian or Lagrangian dynamics, as one might have ex-
Rigid-Body Rotational Dynamics 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
Firdaus E. Udwadia change in the angular momentum in terms of quaternions 共Eqs.
Professor 共49兲 and 共57兲 in Ref. 关2兴兲. To obtain Hamilton’s equations, Morton
Departments of Aerospace and Mechanical Engineering, compares the rate of change in the angular momentum, expressed
Civil Engineering, Mathematics, and Information in terms of quaternions using Newton’s equations and what is
and Operations Management, obtained using the Hamiltonian formalism 共Eqs. 共57兲 and 共62b兲
are compared in Morton’s paper 关2兴兲. He thus obtains, through this
University of Southern California, somewhat long and involved procedure, the crucial connection
430K Olin Hall, between the physically applied torque vector and the generalized
Los Angeles, CA 90089-1453 quaternion torques that are necessary to complete his Hamilton’s
e-mail: fudwadia@usc.edu equations. In deriving Lagrange’s equations, Morton likewise
starts with the Newtonian equations of motion in terms of quater-
Aaron D. Schutte nions 共Eq. 共49兲 in Morton’s paper 关2兴兲 and compares these equa-
Department of Aerospace and Mechanical Engineering, tions with what is obtained by carrying out the Lagrange deriva-
University of Southern California, tive of the kinetic energy of rotation 共Morton’s Eqs. 共79兲 and 共82兲
关2兴兲. Results obtained through comparisons between the Hamil-
Los Angeles, CA 90089-1453 tonian formulation and the Newtonian formulation, regarding the
e-mail: schutte@usc.edu 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
This note provides a direct method for obtaining Lagrange’s equa- that the quaternion must have a unit norm. Hence, the derivation
tions describing the rotational motion of a rigid body in terms of of the Lagrangian equations of rotational motion in terms of
quaternions by using the so-called fundamental equation of con- quaternions appears to be carried out via a mixed line of
strained motion. 关DOI: 10.1115/1.4000917兴 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.
1 Introduction Having described in detail the two principal methods used to
date in arriving at the requisite equations of motion, in this paper,
In this note, a general formulation for rigid body rotational we develop the Lagrange equations for rotational motion using a
dynamics is developed using quaternions, also known as Euler direct Lagrangian approach and follow a simple and straight-
parameters. The use of quaternions is especially useful in multi- forward line of reasoning rooted solely within the framework of
body dynamics when large angle rotations may be involved since Lagrangian dynamics. The development does not require the use
their use does not cause singularities to arise, as it occurs when of Lagrange multipliers, and it yields a positive definite mass
using Euler angles. matrix involving only the quaternion components. After the un-
The equations of rotational motion in terms of quaternions ap- constrained equations of motion are obtained, the so-called funda-
pear to have been first obtained by Nikravesh et al. 关1兴. The au- mental equation is directly employed to get the final equations
thors in this particular paper developed an approach to model and describing rotational motion. The ease, conceptual simplicity, and
simulate constrained mechanical systems in which the compo- clarity, with which the equations are derived, are striking when
nents 共bodies兲 in the mechanical system are connected by nonre- compared with the derivation of Morton 关2兴. No appeal to New-
dundant holonomic constraints. Since they use unit quaternions to tonian mechanics is made, and no comparisons with results from
parametrize the angular coordinates of a rigid body, they provide it are made to arrive at the requisite equations. Of special impor-
many useful unit quaternion identities and show their relation to tance is the simple derivation provided herein of the connection
the components of the angular velocity of the rigid body. To de- between the physically applied torque and the generalized quater-
velop a suitable set of equations of motion involving quaternions, nion torque. Unlike in Ref. 关2兴, it is obtained completely within
they utilize Lagrange’s equation. Of course the components of the the framework of Lagrangian mechanics from simple arguments
unit quaternion must be of a unit norm and they are not all inde- related to virtual work, and unlike in Ref. 关1兴, it is achieved in a
pendent, and so the unit norm requirement must be imposed as a few simple steps that require less appeal to quaternion identities
constraint on the system. They employ the Lagrange multiplier and algebraic manipulations. The approach used in the derivation
method to deal with this characteristic, and in so doing, they ar- is new and relies on some simple recent results dealing with the
rive at a mixed set of ordinary differential equations and an alge- development of the equations of motion of constrained mechani-
braic equation, which comprises a differential algebraic equation cal systems obtained by Udwadia and Kalaba 关3,4兴. In addition, it
共DAE兲. The accelerations are found by inverting the DAE mass provides new insights that were unavailable before.
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- 2 Lagrange’s Equations for Rigid Body Dynamics Us-
fixed coordinate frame is provided by computing the virtual work
of a force located at an arbitrary point of the rigid body and ing Quaternions
utilizing quaternion identities. Consider a rigid body that has an angular velocity ␻ 苸 R3, with
respect to an inertial coordinate frame. The components of this
angular velocity with respect to a coordinate frame fixed in the
Contributed by the Applied Mechanics Division of ASME for publication in the body and whose origin is located at the body’s center of mass are
JOURNAL OF Applied Mechanics. Manuscript received June 1, 2009; final manuscript re-
ceived October 22, 2009; published online April 12, 2010. Assoc. Editor: Wei-Chau denoted by ␻1, ␻2, and ␻3. We can express the four-vector ␻
Xie. = 关0 , ␻1 , ␻2 , ␻3兴T in terms of quaternions by the relation

Journal of Applied Mechanics Copyright © 2010 by ASME JULY 2010, Vol. 77 / 044505-1

Downloaded 04 May 2010 to 171.66.16.45. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm
␻ = 2Eu̇ = − 2Ėu 共1兲 us from our line of thinking, we shall later on show how we
express the generalized quaterion torque four-vector ⌫u in terms
where the unit quaternion u ª 关u0 , u1 , u2 , u3兴T = 关u0 , uT兴T of the physically applied torque three-vector, ⌫ˆ B = 关⌫1,B⌫2,B⌫3,B兴T,
= 关cos ␪ / 2 , eTsin ␪ / 2兴T, and the orthogonal matrix applied to the body, where ⌫1,B, ⌫2,B, and ⌫3,B denote the compo-

冤 冥冤
u0 u1 u2 u3 nents of the physically applied torque about the body-fixed axes.


uT The equation of motion in Eq. 共10兲 presumes that the compo-
− u1 u0 u3 − u2 nents of the four-vector u are all independent of each other, which
E= ª −−− 共2兲
− u2 − u3 u0 u1 is indeed not the case in actuality, because these four components
E1 are constrained by Eq. 共3兲. The explicit equation of motion of the
− u3 u2 − u1 u0
constrained system is now written directly using the fundamental
By a unit quaternion, we mean that equation of constrained motion 关3兴. To do this, we first differenti-
N共u兲 ª uTu = 1 共3兲 ate the constraint equation 共3兲 twice with respect to time to yield

Geometrically, e 苸 R is any unit vector defined relative to an


3 Auü ª uTü = − N共u̇兲 ª bu 共11兲
inertial coordinate frame and ␪ is the rotation about this unit vec- The explicit equation of motion is then directly and simply given
tor. by 关4兴
Without loss of generality, we assume that the body-fixed coor-
dinate axes are aligned along the principal axes of inertia of the 4ETJEü + 8ĖTJEu̇ + 4J0N共u̇兲u = ⌫u + M 1/2
u 共Au M u 兲 共bu − Auau兲
−1/2 +
rigid body whose principal moments of inertia are Ji, i = 1,2,3. To
formulate the equations of motion of the rotating rigid body, 共12兲
which may be subjected to a generalized torque four-vector ⌫u where au is the acceleration of the unconstrained system obtained
共part of which may be derived from a potential兲, we begin by from Eq. 共10兲 and is given by

冉 冊
considering its kinetic energy
⌫u
1 1 au = ETJ−1E − 2ĖTJEu̇ − J0N共u̇兲u 共13兲
T = ␻TĴ␻ = ␻TJ␻ = 2u̇TETJEu̇ = 2uTĖTJĖu 共4兲 4
2 2
The superscript “+” in Eq. 共12兲 denotes the Moore–Penrose in-
The inertia matrix of the rigid body is represented by Ĵ verse of the matrix AuM −1/2
u . We next simply proceed to assemble
= diag共J1,J2,J3兲 and the 4 ⫻ 4 diagonal matrix J = diag共J0,J1, the various quantities required to determine the last member on
J2,J3兲, where J0 is any positive number. the right-hand side of Eq. 共12兲; this is done by computing Auau,
We now proceed to obtain Lagrange’s equation of motion for
u 共Au M u 兲 . We begin by noting
then bu − Auau, and lastly M −1/2 −1/2 +
the rotating rigid body. We begin by assuming at first that each that
component of the four-vector u is independent. This assumption is

冤 冥冋 册
tantamount to taking the generalized virtual displacements ␦ui, i 1
= 0,1,2,3 to be all independent of one another. After we obtain 0 uT uuT
E J E = 关u
T −1
ET1 兴 J0 = + ET1 Ĵ−1E1 共14兲
these equations under this assumption, we will then impose on E1 J0
them the required unit quaternion constraint 共Eq. 共3兲兲. The con- 0 Ĵ−1
strained equations of motion are then the equations of rotational
From Eq. 共2兲, we find that Eu = 关 E1 兴u = 关 E1u 兴 = 关 03⫻1 兴, so that using
uT u Tu 1
motion of the body. Thus, Lagrange’s equation becomes
Eq. 共14兲, we obtain the relations
冉 冊
d ⳵T
dt ⳵ u̇

⳵T
⳵u
= ⌫u 共5兲
ETJ−1Eu =
u
, uTETJ−1E =
uT
, and uTETJ−1Eu =
1
J0 J0 J0
The generalized quaterion torque four-vector ⌫u is the torque that
would exist if all the components of u were actually independent. 共15兲
Noting that ⳵T / ⳵u̇ = 4ETJEu̇, we obtain where we have used the fact that N共u兲 = 1. Hence, we find that
d ⳵T
冉 冊
dt ⳵ u̇
= 4ETJEü + 4ĖTJEu̇ + 4ETJĖu̇ 共6兲 Auau = uTETJ−1E 冉 ⌫u
4
− 2ĖTJEu̇ − J0N共u̇兲u 冊
Also, since
u T⌫ u uTĖTJEu̇ u T⌫ u ␻ TJ ␻ u T⌫ u
⳵T ⳵ T T = −2 − N共u̇兲 = + − N共u̇兲 =
= 2u Ė JĖu = 4ĖTJĖu = − 4ĖTJEu̇ 共7兲 4J0 J0 4J0 2J0 4J0
⳵u ⳵u
␻TĴ␻
Lagrange’s equation, assuming that the components of the unit + − N共u̇兲 共16兲
quaternion are all independent, then becomes 2J0
where in the second and third equalities above, we have used Eqs.
4ETJEü + 8ĖTJEu̇ + 4ETJĖu̇ = ⌫u 共8兲 共1兲 and 共15兲. This yields
Using Eq. 共2兲 and noting that Ėu̇ = 关 03⫻1 兴 , the last member on the
N共u̇兲
uT⌫u ␻TĴ␻ uT⌫u ␻TĴ␻
left-hand side of Eq. 共8兲 can be simplified to bu − Auau = − N共u̇兲 − − + N共u̇兲 = − −

冋 册冋 册
4J0 2J0 4J0 2J0
J0 0 N共u̇兲 共17兲
4ETJĖu̇ = 4关u ET1 兴 = 4J0N共u̇兲u 共9兲
0 Ĵ 03⫻1 T
Lastly, since the matrix Au = u is a nonzero row vector, we have
where N共u̇兲 = u̇Tu̇. Hence, we can rewrite Eq. 共8兲 as
u 共Au M u 兲 = Au 共Au M u Au 兲 = 4u共u E J Eu兲 = 4J0u
M 1/2 −1/2 + T −1 T −1 T T −1 −1

4ETJEü + 8ĖTJEu̇ + 4J0N共u̇兲u = ⌫u 共10兲 共18兲


Note that the matrix M u = 4ETJE multiplying the four-vector ü in where Eq. 共15兲 is again used in the last equality.
Eq. 共10兲 is symmetric and positive definite. In order to not distract Using Eqs. 共17兲 and 共18兲, Eq. 共12兲 reduces to

044505-2 / Vol. 77, JULY 2010 Transactions of the ASME

Downloaded 04 May 2010 to 171.66.16.45. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm
4ETJEü + 8ĖTJEu̇ + 4J0N共u̇兲u = 共I − uuT兲⌫u − 2共␻TĴ␻兲u 1 ETĴ−1E1⌫u
˜ Ĵ␻ − N共u̇兲u + 1
ü = − ET1 Ĵ−1␻ 共29兲
共19兲 2 4
or alternatively to Note the arbitrary positive scalar J0 has vanished, and we see that
Eq. 共29兲 is obtained directly in a simple straightforward manner.
4ETJEü + 8ĖTJEu̇ + 4J0N共u̇兲u = 共I − uuT兲⌫u − 2共␻TJ␻兲u In Eq. 共29兲, u and ⌫u are four vectors, ␻ is a three-vector, and E1
is the 3 ⫻ 4 matrix defined in Eq. 共2兲.
共20兲 Our final task is to express the generalized torque four-vector
In Eqs. 共19兲 and 共20兲, I is the 4 ⫻ 4 identity matrix. The term ˆ⌫ = 共I − uuT兲⌫ on the right-hand side of Eq. 共20兲, in terms of the
u u
2共␻TJ␻兲 on the right-hand side in Eq. 共20兲 arises because of the physically applied torques on the body. Consider the four-vector
constraint N共u兲 = 1, and is twice the kinetic energy of rotation of
the rigid body. ⌫B = 关0 兩 ⌫ˆ BT兴T = 关0, ⌫1,B, ⌫2,B, ⌫1,B兴T 共30兲
Equation 共20兲 also informs us—and this does not seem to be The virtual work done under an infinitesimal, virtual rotation ␦␪
widely recognized—that the generalized torque must appear in the = 关0 , ␦␪1 , ␦␪2 , ␦␪3兴T, in which ␦␪1, ␦␪2, and ␦␪3 are the virtual
form ⌫ˆ u ª 共I − uuT兲⌫u. Furthermore, because I = 共I − uuT兲 + uuT, “displacements” about the body-fixed axes, is then given by ⌫TB␦␪.
postmultiplying this relation by ⌫u, we find that On the other hand, the virtual work done by the generalized
⌫u = 共I − uuT兲⌫u + u共uT⌫u兲 共21兲 quaternion torque vector ⌫ˆ u is given by ⌫ˆ Tu ␦u, where the virtual
displacement of the corresponding quaternion is ␦u. Equating
Thus, u ⌫u is the component of the generalized torque four-vector
T these two virtual work expressions, we obtain
⌫u in the direction of the unit vector u, and ⌫ˆ u is the orthogonal
⌫BT␦␪ = ⌫ˆ Tu ␦u = ⌫Tu 共I − uuT兲␦u 共31兲
projection of ⌫u in the plane normal to u.
The generalized acceleration ü is now explicitly obtained as 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
共I − uuT兲⌫u 共␻TĴ␻兲u Eq. 共1兲, we have
ü = ETJ−1E − 2ĖTJEu̇ − J0N共u̇兲u + −

冤冥 冤冥
4 2 0 u̇0
共22兲
␪˙ 1 u̇1
Since = 2E 共32兲
␪˙

冋 册
2 u̇2
1 0 − ␻T u̇3
EĖT = 共23兲 ␪˙ 3
2 ␻ ␻ ˜
so that
where
␦␪ = 2E␦u 共33兲

冤 冥
0 − ␻3 ␻2 However, since uTu̇ = 0, the virtual displacement ␦u in Eq. 共33兲

˜ = ␻3 0 − ␻1 共24兲 must satisfy the relation
− ␻2 ␻1 0 u T␦ u = 0 共34兲
the first term on the right-hand side of Eq. 共22兲 can be expressed Solving for ␦u in Eq. 共34兲, we get 关5兴
as
␦u = 共I − uuT兲␦w 共35兲
1
2ETJ−1EĖTJEu̇ = ETJ−1
2
0 −␻
␻ ␻˜
冋 T
册冋 册
0
Ĵ␻
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
1 共␻ Ĵ␻兲u T
= − + ET1 Ĵ−1␻
˜ Ĵ␻ 共25兲 ⌫BT2E共I − uuT兲␦w = ⌫Tu 共I − uuT兲␦w = ⌫ˆ Tu ␦w 共36兲
2 J0
because 共I − uuT兲 is idempotent. Since ␦w is arbitrary, we have
By Eq. 共15兲, the second and fourth terms on the right-hand side of
Eq. 共22兲 become 2共I − uuT兲ET⌫B = 共I − uuT兲⌫u = ⌫ˆ u 共37兲
J0N共u̇兲ETJ−1Eu = N共u̇兲u 共26兲 The left-hand member in Eq. 共37兲 can be simplified and written as

and

共␻ Ĵ␻兲u ␻ Ĵ␻ T −1
T T
共␻ Ĵ␻兲u T
2共I − uuT兲ET⌫B = 2ET⌫B = 2关u ET1 兴 冋册
0
⌫ˆ B
= 2ET1 ⌫ˆ B 共38兲

ETJ−1E = E J Eu = 共27兲 where the first equality follows because uTET⌫B = 关1 兩 01⫻3兴
2 2 2J0
⫻关0 兩 ⌫ˆ TB兴T = 0, and the last from uTET1 = 0. Hence, relation 共37兲 be-
respectively. Finally, using Eq. 共15兲 again, the third term on the comes
right-hand side of Eq. 共22兲 simplifies to
⌫ˆ u = 2ET1 ⌫ˆ B = 2ET⌫B 共39兲
共I − uuT兲⌫u 关ETJ−1E − 共ETJ−1Eu兲uT兴⌫u
ETJ−1E = Thus, the equation of motion 共20兲 describing the rotational motion
4 4 of the system becomes


= ETJ−1E − 冊
uuT ⌫u ET1 Ĵ−1E1⌫u
J0 4
=
4
共28兲 4ETJEü + 8ĖTJEu̇ + 4J0N共u̇兲u = 2ET⌫B − 2共␻TJ␻兲u
where ⌫B is the four-vector containing the components of the
共40兲

where the last equality follows from Eq. 共14兲. Thus, Eq. 共22兲 body torque about the body-fixed axes. Furthermore, using the
simplifies to first equality in Eq. 共39兲, premultiplication by E1 yields

Journal of Applied Mechanics JULY 2010, Vol. 77 / 044505-3

Downloaded 04 May 2010 to 171.66.16.45. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm
1 1 1 Eq. 共10兲 by 共I − uuT兲⌫u and used Eq. 共39兲. Let us denote the
⌫ˆ B = E1⌫ˆ u = E1共I − uuT兲⌫u = E1⌫u 共41兲 right-hand side of Eq. 共43兲 by
2 2 2
since E1ET1 = I. Using Eq. 共41兲 in Eq. 共29兲, we get Q ª − 8ĖTJEu̇ − 4J0N共u̇兲u + 2ET⌫B 共44兲
Direct application of the fundamental equation now gives
1 ETĴ−1⌫ˆ B the rotational equation of motion of a rigid body 共subjected
˜ Ĵ␻ − N共u̇兲u + 1
ü = − ET1 Ĵ−1␻ 共42兲
2 2 to the impressed torque ⌫B兲 in a single step as
Equations 共40兲 and 共42兲 represent the requisite Lagrange equa- u 共Au M u 兲 共bu − Au M u Q兲
4ETJEü = Q + M 1/2 −1/2 + −1
共45兲
tions that describe the rotational motion of a rigid body in terms of
quaternions and the applied torques in the body-fixed coordinate where the various quantities are defined as before, and Q is
frame. given in Eq. 共44兲. For computational purposes, the right-
We end with some observations and remarks, which provide hand side of Eq. 共45兲 can be numerically computed directly,
additional insights. and there is no need to simplify it any further as we did
before in going from Eqs. 共12兲–共40兲.
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 3 Conclusion
entities on the right-hand side of Eq. 共12兲. From a computa- This note provides a simple and direct route for obtaining
tional stand-point, we could just as well as have used Eq. Lagrange’s equation describing rigid body rotational motion in
共12兲 along with Eq. 共39兲 directly. terms of quaternions. The derivation is carried out in a uniform
2. Were we to have replaced ⌫u in Eqs. 共5兲 and 共10兲 by 共I manner without any appeal to the notion of Lagrange multipliers
− uuT兲⌫u, we would, accordingly, need to replace the term ⌫u or Newtonian mechanics by using the fundamental equation of
on the right-hand side of Eq. 共20兲 also by 共I − uuT兲⌫u. But constrained motion. A new and simple way of establishing the
since 共I − uuT兲 is idempotent, this leaves Eq. 共20兲 unchanged. connection between the physically applied torque and the gener-
This shows that rotational dynamics only involves the com- alized quaternion torque is presented. Besides providing new in-
ponent 共I − uuT兲⌫u of the generalized quaternion torque ⌫u. sights hereto unavailable, this derivation reveals the explicit
Alternately, we conclude that the component of the four- Lagrange’s equation in a very transparent manner, an aspect pre-
vector ⌫u along u, namely, uT⌫u, does not play any role in vious derivations have had difficulty attaining.
the rotational dynamics of a rigid body 共see Eq. 共21兲兲.
3. The simplicity of the approach developed herein becomes References
apparent were we to be mainly interested in computing the 关1兴 Nikravesh, P. E., Wehage, R. A., and Kwon, O. K., 1985, “Euler Parameters in
Computational Kinematics and Dynamics,” ASME J. Mech., Transm., Autom.
rotational response of a rigid body subjected to an impressed Des., 107, pp. 358–369.
torque. Then, from the abovementioned remarks, we see that 关2兴 Morton, H. S., 1993, “Hamiltonian and Lagrangian Formulations of Rigid-
instead of Eq. 共10兲, one could have started with the uncon- Body Rotational Dynamics Based on the Euler Parameters,” J. Astronaut. Sci.,
strained equation of motion given by 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.
M uü ª 4ETJEü = − 8ĖTJEu̇ − 4J0N共u̇兲u + 2ET⌫B 共43兲 关4兴 Udwadia, F. E., and Kalaba, R. E., 1996, Analytical Dynamics: A New Ap-
proach, Cambridge University Press, Cambridge, England.
where ⌫B is the physically impressed torque four-vector on 关5兴 Graybill, F., 1983, Matrices With Applications in Statistics, Wadsworth Pub-
the rigid body. To arrive at Eq. 共43兲, we have replaced ⌫u in lishing Company, Belmont, CA.

044505-4 / Vol. 77, JULY 2010 Transactions of the ASME

Downloaded 04 May 2010 to 171.66.16.45. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

You might also like