Lie group variational integrators for rigid body problems using quaternions

Xuefeng Shen, Melvin Leok

Abstract

Rigid body dynamics on the rotation group have typically been represented in terms of rotation matrices, unit quaternions, or local coordinates, such as Euler angles. Due to the coordinate singularities associated with local coordinate charts, it is common in engineering applications to adopt the unit quaternion representation, and the numerical simulations typically impose the unit length condition using constraints or by normalization at each step. From the perspective of geometric structure-preserving, such approaches are undesirable as they are either computationally less efficient, or interfere with the preservation of other geometric properties of the dynamics. In this paper, we adopt the approach used in constructing Lie group variational integrators for rigid body dynamics on the rotation group to the representation in terms of unit quaternions. In particular, the rigid body dynamics is lifted to unit quaternions, and the Lie group structure of unit quaternions is used to represent tangent vector intrinsically, thereby avoiding the use of a Lagrange multiplier. A Lie group variational integrator in the unit quaternion representation is derived, and numerical results are presented.

Introduction

Simulating the rotation of a rigid body—whether it is a satellite, a drone, or a robotic manipulator—is a cornerstone of modern aerospace and mechanical engineering. Historically, researchers have relied on three primary representations for rotation: rotation matrices ($SO(3)$), Euler angles, and unit quaternions ($S^3$). While rotation matrices are accurate, they are computationally expensive, requiring nine variables to represent three degrees of freedom. Euler angles are more intuitive but suffer from mathematical singularities known as "gimbal lock."

Unit quaternions have emerged as the industry standard because they are computationally efficient (using only four variables) and singularity-free. However, they introduce a unique challenge: to represent a valid rotation, a quaternion must maintain a unit length (a norm of 1). Traditional numerical simulators enforce this via Lagrange multipliers, which add computational complexity, or through ad-hoc re-normalization at each time step. Unfortunately, re-normalization often breaks the conservation laws—such as energy and momentum—that geometric integrators are specifically designed to preserve.

Methodology: A Lie Group Approach

This research introduces a novel Lie group variational integrator that operates directly on the space of unit quaternions. The core innovation lies in treating the set of unit quaternions not merely as a constrained vector space in $\mathbb{R}^4$, but as a Lie group.

Variational Integration

Rather than discretizing the differential equations of motion directly, the authors discretize Hamilton’s Principle (the principle of least action). This approach ensures that the resulting algorithm is "symplectic," meaning it naturally respects the underlying geometric structure of the physical system. By preserving the symplectic form, the integrator avoids the non-physical energy drift common in standard solvers like Runge-Kutta.

Intrinsic Variations and the Exponential Map

The dynamics are "lifted" from the standard rotation group to the quaternion group. By utilizing "left-trivialization," the authors represent changes in orientation as elements of the Lie algebra ($\mathbb{R}^3$). This allows the quaternion state to be updated using an exponential map. Because the exponential map naturally maps the Lie algebra back to the Lie group, the updated quaternion is guaranteed to remain on the unit sphere ($S^3$) by construction. This eliminates the need for external constraints or computationally expensive Lagrange multipliers.

Numerical Validation

To validate the proposed integrator, the authors conducted numerical simulations of a planar rigid body. The model consists of three uniform masses connected by massless rods, moving within a central gravitational field (a $1/r$ potential). This setup provides a rigorous test for the integrator's ability to handle nonlinear dynamics and conservation laws over long durations.

Key Insights

  1. The Double Cover Advantage: The method exploits the fact that unit quaternions are a "double cover" of the rotation group $SO(3)$. This allows the math to be performed in the simpler quaternion space while mapping perfectly back to physical rotations.
  2. Computational Efficiency: The paper notes that composing two quaternions requires only 16 multiplications, compared to 27 for $3 \times 3$ rotation matrices. Additionally, storing the state requires 55% less memory than matrix-based methods.
  3. Constraint-Free Geometry: By making the unit-length requirement a property of the space itself (intrinsic) rather than an enforced rule (extrinsic), the integrator maintains higher physical fidelity.

Results

The numerical experiments demonstrate exceptional stability and precision over 1,000 time units:

  • Energy Conservation: The energy error remains bounded and small (approximately $10^{-7}$) with no long-term drift.
  • Unit Norm Preservation: Deviation from the unit length was recorded at approximately $10^{-14}$, which is at the limit of machine precision for double-precision floating-point numbers.
  • Momentum Preservation: The total angular momentum error was kept extremely low, near $10^{-11}$.

Conclusion and Future Work

The Lie group variational integrator for quaternions provides a robust, efficient, and structure-preserving alternative to traditional rotation solvers. While the current implementation uses an implicit midpoint-style rule (second-order accuracy) that requires a nonlinear root-finding step (e.g., Broyden’s method), its conservation properties make it highly desirable for long-term simulations.

Future research may focus on extending this framework to multi-body systems, such as complex robotic chains, and incorporating non-conservative forces like atmospheric drag. Additionally, developing higher-order versions of this integrator could further enhance its utility for high-precision aerospace applications.

Summary updated

Abstract

Rigid body dynamics on the rotation group have typically been represented in terms of rotation matrices, unit quaternions, or local coordinates, such as Euler angles. Due to the coordinate singularities associated with local coordinate charts, it is common in engineering applications to adopt the unit quaternion representation, and the numerical simulations typically impose the unit length condition using constraints or by normalization at each step. From the perspective of geometric structure-preserving, such approaches are undesirable as they are either computationally less efficient, or interfere with the preservation of other geometric properties of the dynamics. In this paper, we adopt the approach used in constructing Lie group variational integrators for rigid body dynamics on the rotation group to the representation in terms of unit quaternions. In particular, the rigid body dynamics is lifted to unit quaternions, and the Lie group structure of unit quaternions is used to represent tangent vector intrinsically, thereby avoiding the use of a Lagrange multiplier. A Lie group variational integrator in the unit quaternion representation is derived, and numerical results are presented.
BibTeX
@misc{shen2017lie,
  author = {Xuefeng Shen and Melvin Leok},
  title = {{Lie group variational integrators for rigid body problems using quaternions}},
  year = {2017},
  eprint = {1705.04404},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.04404},
}
Figure