<figure><img src="image_1.png" /></figure>

HAL
open science

# 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, 2010, 77 (4), pp.044505. 10.1115/1.4000917. hal-01352566

HAL Id: hal-01352566

https://hal.science/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.

<figure><img src="image_2.png" /></figure>

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 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 equations describing the rotational motion of a rigid body in terms of quaternions by using the so-called fundamental equation of constrained 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 appear to have been first obtained by Nikravesh et al. [1]. The authors in this particular paper developed an approach to model and simulate constrained mechanical systems in which the components (bodies) in the mechanical system are connected by non-redundant 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 develop 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 independent, 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 arrive at a mixed set of ordinary differential equations and an algebraic 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 generalized torques in this framework are given in a four-vector format, 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 expected. Morton's starting point for each of these sets of equations—the backbone for all of his derivations—is the Newtonian 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 quaternions (Eq. (49) in Morton's paper [2]) and compares these equations with what is obtained by carrying out the Lagrange derivative of the kinetic energy of rotation (Morton's Eqs. (79) and (82) [2]). Results obtained through comparisons between the Hamiltonian formulation and the Newtonian formulation, regarding the connection between the physically applied torque and the quaternion 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 straightforward 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 unconstrained equations of motion are obtained, the so-called fundamental 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 Newtonian mechanics is made, and no comparisons with results from it are made to arrive at the requisite equations. Of special importance is the simple derivation provided herein of the connection between the physically applied torque and the generalized quaternion 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 mechanical 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 Using Quaternions

Consider a rigid body that has an angular velocity $\omega \in 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 $\omega_1, \omega_2$, and $\omega_3$. We can express the four-vector $\omega = [0, \omega_1, \omega_2, \omega_3]^T$ in terms of quaternions by the relation
$$ \omega = 2\dot{E}\dot{u} = -2\dot{E}\dot{u} \quad (1) $$

where the unit quaternion $u := [u_0, u_1, u_2, u_3]^T = [u_0, \mathbf{u}^T]^T = [\cos \theta/2, \mathbf{e}^T \sin \theta/2]^T$, and the orthogonal matrix

$$ E = \begin{bmatrix} u_0 & u_1 & u_2 & u_3 \\ -u_1 & u_0 & u_3 & -u_2 \\ -u_2 & -u_3 & u_0 & u_1 \\ -u_3 & u_2 & -u_1 & u_0 \end{bmatrix} := \begin{bmatrix} u^T \\ \hline -\mathbf{e} \\ E_1 \end{bmatrix} \quad (2) $$

By a unit quaternion, we mean that

$$ N(u) := u^T u = 1 \quad (3) $$

Geometrically, $\mathbf{e} \in \mathbb{R}^3$ is any unit vector defined relative to an inertial coordinate frame and $\theta$ is the rotation about this unit vector.

Without loss of generality, we assume that the body-fixed coordinate 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 $\Gamma_u$ (part of which may be derived from a potential), we begin by considering its kinetic energy

$$ T = \frac{1}{2} \boldsymbol{\omega}^T \hat{J} \boldsymbol{\omega} = \frac{1}{2} \boldsymbol{\omega}^T J \boldsymbol{\omega} = 2 \dot{u}^T E^T J E \dot{u} = 2 u^T \dot{E}^T J \dot{E} u \quad (4) $$

The inertia matrix of the rigid body is represented by $\hat{J} = \text{diag}(J_1, J_2, J_3)$ and the $4 \times 4$ diagonal matrix $J = \text{diag}(J_0, J_1, J_2, J_3)$, where $J_0$ is 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 $\delta 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 constrained equations of motion are then the equations of rotational motion of the body. Thus, Lagrange's equation becomes

$$ \frac{d}{dt} \left( \frac{\partial T}{\partial \dot{u}} \right) - \frac{\partial T}{\partial u} = \Gamma_u \quad (5) $$

The generalized quaterion torque four-vector $\Gamma_u$ is the torque that would exist if all the components of $u$ were actually independent. Noting that $\partial T / \partial \dot{u} = 4E^T J E \dot{u}$, we obtain

$$ \frac{d}{dt} \left( \frac{\partial T}{\partial \dot{u}} \right) = 4E^T J E \ddot{u} + 4 \dot{E}^T J E \dot{u} + 4E^T J \dot{E} \dot{u} \quad (6) $$

Also, since

$$ \frac{\partial T}{\partial u} = \frac{\partial}{\partial u} 2u^T \dot{E}^T J \dot{E} u = 4 \dot{E}^T J \dot{E} u = -4 \dot{E}^T J E \dot{u} \quad (7) $$

Lagrange's equation, assuming that the components of the unit quaternion are all independent, then becomes

$$ 4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4E^T J \dot{E} \dot{u} = \Gamma_u \quad (8) $$

Using Eq. (2) and noting that $\dot{E}\dot{u} = [N(\dot{u})]_{0_{3 \times 1}}$, the last member on the left-hand side of Eq. (8) can be simplified to

$$ 4E^T J \dot{E} \ddot{u} = 4[u \quad E_1^T] \begin{bmatrix} J_0 & 0 \\ 0 & \hat{J} \end{bmatrix} \begin{bmatrix} N(\dot{u}) \\ 0_{3 \times 1} \end{bmatrix} = 4J_0 N(\dot{u}) u \quad (9) $$

where $N(\dot{u}) = \dot{u}^T \dot{u}$. Hence, we can rewrite Eq. (8) as

$$ 4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4J_0 N(\dot{u}) u = \Gamma_u \quad (10) $$

Note that the matrix $M_u = 4E^T J E$ multiplying the four-vector $\ddot{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 $\Gamma_u$ in terms of the physically applied torque three-vector, $\hat{\Gamma}_B = [\Gamma_{1,B} \Gamma_{2,B} \Gamma_{3,B}]^T$, applied to the body, where $\Gamma_{1,B}$, $\Gamma_{2,B}$, and $\Gamma_{3,B}$ denote the components of the physically applied torque about the body-fixed axes.

The equation of motion in Eq. (10) presumes that the components 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 differentiate the constraint equation (3) twice with respect to time to yield

$$ A_u \ddot{u} := u^T \ddot{u} = -N(\dot{u}) := b_u \quad (11) $$

The explicit equation of motion is then directly and simply given by [4]

$$ 4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4J_0 N(\dot{u}) u = \Gamma_u + M_u^{1/2} (A_u M_u^{-1/2})^+ (b_u - A_u a_u) \quad (12) $$

where $a_u$ is the acceleration of the unconstrained system obtained from Eq. (10) and is given by

$$ a_u = E^T J^{-1} E \left( \frac{\Gamma_u}{4} - 2 \dot{E}^T J E \dot{u} - J_0 N(\dot{u}) u \right) \quad (13) $$

The superscript “+” in Eq. (12) denotes the Moore-Penrose inverse of the matrix $A_u M_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_u a_u$, then $b_u - A_u a_u$, and lastly $M_u^{-1/2} (A_u M_u^{-1/2})^+$. We begin by noting that

$$ E^T J^{-1} E = [u \quad E_1^T] \begin{bmatrix} \frac{1}{J_0} & 0 \\ 0 & \hat{J}^{-1} \end{bmatrix} \begin{bmatrix} u^T \\ E_1 \end{bmatrix} = \frac{u u^T}{J_0} + E_1^T \hat{J}^{-1} E_1 \quad (14) $$

From Eq. (2), we find that $Eu = [E_1^T]u = [E_1^T u] = [\begin{bmatrix} 1 \\ 0_{3 \times 1} \end{bmatrix}]$, so that using Eq. (14), we obtain the relations

$$ E^T J^{-1} Eu = \frac{u}{J_0}, \quad u^T E^T J^{-1} E = \frac{u^T}{J_0}, \quad \text{and} \quad u^T E^T J^{-1} Eu = \frac{1}{J_0} \quad (15) $$

where we have used the fact that $N(u) = 1$. Hence, we find that

$$ \begin{aligned} A_u a_u = u^T E^T J^{-1} E \left( \frac{\Gamma_u}{4} - 2 \dot{E}^T J E \dot{u} - J_0 N(\dot{u}) u \right) & \\ = \frac{u^T \Gamma_u}{4J_0} - 2 \frac{u^T \dot{E}^T J E \ddot{u}}{J_0} - N(\dot{u}) & = \frac{u^T \Gamma_u}{4J_0} + \frac{\omega^T J \omega}{2J_0} - N(\dot{u}) & \\ & + \frac{\omega^T \hat{J} \omega}{2J_0} - N(\dot{u}) & \end{aligned} \quad (16) $$

where in the second and third equalities above, we have used Eqs. (1) and (15). This yields

$$ b_u - A_u a_u = -N(\dot{u}) - \frac{u^T \Gamma_u}{4J_0} - \frac{\omega^T \hat{J} \omega}{2J_0} + N(\dot{u}) = -\frac{u^T \Gamma_u}{4J_0} - \frac{\omega^T \hat{J} \omega}{2J_0} \quad (17) $$

Lastly, since the matrix $A_u = u^T$ is a nonzero row vector, we have

$$ M_u^{1/2} (A_u M_u^{-1/2})^+ = A_u^T (A_u M_u^{-1} A_u^T)^{-1} = 4u (u^T E^T J^{-1} E u)^{-1} = 4J_0 u \quad (18) $$

where Eq. (15) is again used in the last equality.

Using Eqs. (17) and (18), Eq. (12) reduces to
$$4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4J_0 N(\dot{u}) u = (I - u u^T) \Gamma_u - 2(\omega^T \hat{J} \omega) u \quad (19)$$

or alternatively to

$$4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4J_0 N(\dot{u}) u = (I - u u^T) \Gamma_u - 2(\omega^T \hat{J} \omega) u \quad (20)$$

In Eqs. (19) and (20), $I$ is the $4 \times 4$ identity matrix. The term $2(\omega^T J \omega)$ 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 $\hat{\Gamma}_u := (I - uu^T)\Gamma_u$. Furthermore, because $I = (I - uu^T) + uu^T$, postmultiplying this relation by $\Gamma_u$, we find that

$$\Gamma_u = (I - uu^T)\Gamma_u + u(u^T \Gamma_u) \quad (21)$$

Thus, $u^T \Gamma_u$ is the component of the generalized torque four-vector $\Gamma_u$ in the direction of the unit vector $u$, and $\hat{\Gamma}_u$ is the orthogonal projection of $\Gamma_u$ in the plane normal to $u$.

The generalized acceleration $\ddot{u}$ is now explicitly obtained as

$$\ddot{u} = E^T \hat{J}^{-1} E \left( -2 \dot{E}^T J E \dot{u} - J_0 N(\dot{u}) u + \frac{(I - uu^T) \Gamma_u}{4} - \frac{(\omega^T \hat{J} \omega) u}{2} \right) \quad (22)$$

Since

$$E \dot{E}^T = \frac{1}{2} \begin{bmatrix} 0 & -\omega^T \\ \omega & \tilde{\omega} \end{bmatrix} \quad (23)$$

where

$$\tilde{\omega} = \begin{bmatrix} 0 & -\omega_3 & \omega_2 \\ \omega_3 & 0 & -\omega_1 \\ -\omega_2 & \omega_1 & 0 \end{bmatrix} \quad (24)$$

the first term on the right-hand side of Eq. (22) can be expressed as

$$\begin{aligned} 2E^T \hat{J}^{-1} E \dot{E}^T J E \dot{u} &= \frac{1}{2} E^T \hat{J}^{-1} \begin{bmatrix} 0 & -\omega^T \\ \omega & \tilde{\omega} \end{bmatrix} \begin{bmatrix} 0 \\ \hat{J} \omega \end{bmatrix} \\ &= \frac{1}{2} \left( - \frac{(\omega^T \hat{J} \omega) u}{J_0} + E_1^T \hat{J}^{-1} \tilde{\omega} \hat{J} \omega \right) \end{aligned} \quad (25)$$

By Eq. (15), the second and fourth terms on the right-hand side of Eq. (22) become

$$J_0 N(\dot{u}) E^T \hat{J}^{-1} E u = N(\dot{u}) u \quad (26)$$

and

$$E^T \hat{J}^{-1} E \frac{(\omega^T \hat{J} \omega) u}{2} = \frac{\omega^T \hat{J} \omega}{2} E^T \hat{J}^{-1} E u = \frac{(\omega^T \hat{J} \omega) u}{2 J_0} \quad (27)$$

respectively. Finally, using Eq. (15) again, the third term on the right-hand side of Eq. (22) simplifies to

$$\begin{aligned} E^T \hat{J}^{-1} E \frac{(I - uu^T) \Gamma_u}{4} &= \frac{[E^T \hat{J}^{-1} E - (E^T \hat{J}^{-1} Eu) u^T] \Gamma_u}{4} \\ &= \left(E^T \hat{J}^{-1} E - \frac{uu^T}{J_0}\right) \frac{\Gamma_u}{4} = \frac{E_1^T \hat{J}^{-1} E_1 \Gamma_u}{4} \end{aligned} \quad (28)$$

where the last equality follows from Eq. (14). Thus, Eq. (22) simplifies to

$$\ddot{u} = -\frac{1}{2} E_1^T \hat{J}^{-1} \tilde{\omega} \hat{J} \omega - N(\dot{u}) u + \frac{E_1^T \hat{J}^{-1} E_1 \Gamma_u}{4} \quad (29)$$

Note the arbitrary positive scalar $J_0$ has vanished, and we see that Eq. (29) is obtained directly in a simple straightforward manner. In Eq. (29), $u$ and $\Gamma_u$ are four vectors, $\omega$ is a three-vector, and $E_1$ is the $3 \times 4$ matrix defined in Eq. (2).

Our final task is to express the generalized torque four-vector $\hat{\Gamma}_u = (I - uu^T)\Gamma_u$ on the right-hand side of Eq. (20), in terms of the physically applied torques on the body. Consider the four-vector

$$\Gamma_B = [0 \ | \ \hat{\Gamma}_B^T]^T = [0, \Gamma_{1,B}, \Gamma_{2,B}, \Gamma_{1,B}]^T \quad (30)$$

The virtual work done under an infinitesimal virtual rotation $\delta\theta = [0, \delta\theta_1, \delta\theta_2, \delta\theta_3]^T$, in which $\delta\theta_1, \delta\theta_2$, and $\delta\theta_3$ are the virtual “displacements” about the body-fixed axes, is then given by $\Gamma_B^T \delta\theta$. On the other hand, the virtual work done by the generalized quaternion torque vector $\hat{\Gamma}_u$ is given by $\hat{\Gamma}_u^T \delta u$, where the virtual displacement of the corresponding quaternion is $\delta u$. Equating these two virtual work expressions, we obtain

$$\Gamma_B^T \delta \theta = \hat{\Gamma}_u^T \delta u = \Gamma_u^T (I - uu^T) \delta u \quad (31)$$

Here, we set $\omega = [0, \dot{\theta}_1, \dot{\theta}_2, \dot{\theta}_3]^T$, where $\dot{\theta}_1, \dot{\theta}_2$, and $\dot{\theta}_3$ are the components of the angular velocity about the body-fixed axes, and by Eq. (1), we have

$$\begin{bmatrix} 0 \\ \dot{\theta}_1 \\ \dot{\theta}_2 \\ \dot{\theta}_3 \end{bmatrix} = 2E \begin{bmatrix} \dot{u}_0 \\ \dot{u}_1 \\ \dot{u}_2 \\ \dot{u}_3 \end{bmatrix} \quad (32)$$

so that

$$\delta\theta = 2E\delta u \quad (33)$$

However, since $u^T \ddot{u} = 0$, the virtual displacement $\delta u$ in Eq. (33) must satisfy the relation

$$u^T \delta u = 0 \quad (34)$$

Solving for $\delta u$ in Eq. (34), we get [5]

$$\delta u = (I - uu^T) \delta w \quad (35)$$

where the four-vector $\delta w$ is any arbitrary, infinitesimal column vector. In view of Eqs. (33) and (35), we find that Eq. (31) becomes

$$\Gamma_B^T 2E(I - uu^T) \delta w = \Gamma_u^T (I - uu^T) \delta w = \hat{\Gamma}_u^T \delta w \quad (36)$$

because $(I - uu^T)$ is idempotent. Since $\delta w$ is arbitrary, we have

$$2(I - uu^T)E^T \Gamma_B = (I - uu^T)\Gamma_u = \hat{\Gamma}_u \quad (37)$$

The left-hand member in Eq. (37) can be simplified and written as

$$2(I - uu^T)E^T \Gamma_B = 2E^T \Gamma_B = 2[u \ E_1^T] \begin{bmatrix} 0 \\ \hat{\Gamma}_B \end{bmatrix} = 2E_1^T \hat{\Gamma}_B \quad (38)$$

where the first equality follows because $u^T E^T \Gamma_B = [1 \ 0_{1 \times 3}] \times [0 \ \hat{\Gamma}_B^T]^T = 0$, and the last from $u^T E_1^T = 0$. Hence, relation (37) becomes

$$\hat{\Gamma}_u = 2E_1^T \hat{\Gamma}_B = 2E^T \Gamma_B \quad (39)$$

Thus, the equation of motion (20) describing the rotational motion of the system becomes

$$4E^T J E \ddot{u} + 8 \dot{E}^T J E \dot{u} + 4J_0 N(\dot{u}) u = 2E^T \Gamma_B - 2(\omega^T J \omega) u \quad (40)$$

where $\Gamma_B$ is 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_1$ yields
$$ \hat{\Gamma}_B = \frac{1}{2} E_1 \hat{\Gamma}_u = \frac{1}{2} E_1 (I - u u^T) \Gamma_u = \frac{1}{2} E_1 \Gamma_u \quad (41) $$

since $E_1 E_1^T = I$. Using Eq. (41) in Eq. (29), we get

$$ \ddot{u} = -\frac{1}{2} E_1^T \hat{\mathcal{J}}^{-1} \tilde{\omega} \hat{\mathcal{J}} \omega - N(\dot{u}) u + \frac{E_1^T \hat{\mathcal{J}}^{-1} \hat{\Gamma}_B}{2} \quad (42) $$

Equations (40) and (42) represent the requisite Lagrange equations 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 computational stand-point, we could just as well as have used Eq. (12) along with Eq. (39) directly.

2. Were we to have replaced $\Gamma_u$ in Eqs. (5) and (10) by $(I - uu^T)\Gamma_u$, we would, accordingly, need to replace the term $\Gamma_u$ on the right-hand side of Eq. (20) also by $(I - uu^T)\Gamma_u$. But since $(I - uu^T)$ is idempotent, this leaves Eq. (20) unchanged. This shows that rotational dynamics only involves the component $(I - uu^T)\Gamma_u$ of the generalized quaternion torque $\Gamma_u$. Alternately, we conclude that the component of the four-vector $\Gamma_u$ along $u$, namely, $u^T\Gamma_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 unconstrained equation of motion given by

$$ M_u \ddot{u} := 4E^T J E \ddot{u} = -8 \dot{E}^T J E \ddot{u} - 4J_0 N(\dot{u}) u + 2E^T \Gamma_B \quad (43) $$

where $\Gamma_B$ is the physically impressed torque four-vector on the rigid body. To arrive at Eq. (43), we have replaced $\Gamma_u$ in

Eq. (10) by $(I - uu^T)\Gamma_u$ and used Eq. (39). Let us denote the right-hand side of Eq. (43) by

$$ Q := -8 \dot{E}^T J E \ddot{u} - 4J_0 N(\dot{u}) u + 2E^T \Gamma_B \quad (44) $$

Direct application of the fundamental equation now gives the rotational equation of motion of a rigid body (subjected to the impressed torque $\Gamma_B$) in a single step as

$$ 4E^T J E \ddot{u} = Q + M_u^{1/2} (A_u M_u^{-1/2})^+ (b_u - A_u M_u^{-1} Q) \quad (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 generalized quaternion torque is presented. Besides providing new insights hereto unavailable, this derivation reveals the explicit Lagrange’s equation in a very transparent manner, an aspect previous 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 Approach, Cambridge University Press, Cambridge, England.

[5] Graybill, F., 1983, Matrices With Applications in Statistics, Wadsworth Publishing Company, Belmont, CA.