Abstract
Different inertia representations can lead to different formulations of the differential-algebraic equations for the quaternion-based rigid body dynamics. In this paper, the inertia representations are classified into \(\alpha \)-type and \(\gamma \)-type, according to the additional parameters in the kinetic energy. These two types of representations and the corresponding parameters \(\alpha \) and \(\gamma \) are theoretically equivalent if the constraint \(\boldsymbol{q}^{T}\boldsymbol{q} = 1\) is satisfied exactly. Nevertheless, the error estimation demonstrates that they can present entirely different numerical features in simulation and suggests that the parameter \(\gamma \) can be used to optimize the numerical performance of the integrations in simulation. To further verify the numerical difference between the inertia representations of \(\alpha \)-type and \(\gamma \)-type, the corresponding modified Hamilton’s equations are discretized by the IMS (implicit midpoint scheme), EMS (energy–momentum preserving scheme) and Gauss–Lobatto SPARK methods. Numerical performance for the examples of the spinning symmetrical top is shown to result from the comprehensive effect of the discretization schemes including the distribution of discretized points and the convergence order, the inertia representations and their combinations. Numerical results further suggest that the integrations of \(\gamma \)-type are superior to those of \(\alpha \)-type and the optimized values of \(\gamma \) can be used to achieve better numerical accuracy, convergence speed and stability.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
1 Introduction
The kinematics and dynamics of rigid bodies constitute an important part of the simulation of multibody system. Many kinds of coordinates can be used to represent the rotational motion of a rigid body, such as Euler angles and unit quaternions [1]. As a non-minimal representation, the unit quaternion has found new attraction in recent years because of its simplicity in the mathematical formulation and the ability to avoid the singularity which may occur when using Euler angles.
A unit quaternion describes the three-dimensional rotational motion using four real parameters, with a unit length constraint, which essentially extends the motion equations by a holonomic constraint and yields a set of differential-algebraic equations (DAEs) of Index 3, instead of ordinary differential equations (ODEs). In 1980s, the unit quaternion was investigated in detail by Nikravesh and Haug et al. [2,3,4,5] for the dynamic analysis of a three-dimensional constrained mechanical system. Later, the quaternion-based rigid body dynamics was developed rapidly owing to many theoretical researches and applications about unit quaternions [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]. Some of these researches focused on various equivalent formulations for rotational motion in the Lagrangian or Hamiltonian framework [6,7,8,9,10,11,12,13,14], and the others concentrated on the numerical integrations in terms of unit quaternions for the simulation of rigid body dynamics, especially the conserving integrations [11, 15,16,17,18,19,20].
In this previous work, an essential process is to derive the dynamic description of rigid body rotation, which leads to different inertia representations in terms of unit quaternions, embodied by the mass matrix in the kinetic energy. In rigid body dynamics, the quaternion-based kinetic energy is commonly derived from the standard quadratic form of the angular velocity, which generally results in a singular mass matrix. To avoid the singularity, Betsch and Siebert [11] proposed an augmented mass matrix when deriving the conserving numerical integration in terms of unit quaternions for rigid body dynamics. Besides, similar approaches [12,13,14,15,16] were proposed to describe the motion equations, which also lead to a non-singular mass matrix. In this work, an additional parameter denoted as \(\alpha \) in this paper, is generally added in the original formulation of kinetic energy. Nielsen and Krenk [16] developed the quaternion-based momentum scheme based on the non-singular mass matrix, and suggested that the additional parameter served as a multiplier on the kinematic constraint, and better convergence characteristics could be achieved by choosing this parameter somewhat larger than the inertial moments in numerical simulation. Recently, a modified inertia representation [23] was proposed for the quaternion-based rigid body dynamics, in which a new parameter, denoted \(\gamma \) in this paper, was introduced in the kinetic energy. The parameters \(\alpha \) and \(\gamma \) are mathematically equivalent if the unit length constraint is satisfied exactly. Nevertheless, the two parameters are different in discretization, and numerical results demonstrate that the parameter \(\gamma \) is superior to \(\alpha \) because it can be used to improve the numerical accuracy of integration in simulation.
In this paper, the numerical performance of different inertia representations is investigated at great length for the quaternion-based rigid body dynamics. In Sect. 2, we first derive the Hamilton equations for the rigid body dynamics in terms of unit quaternions, and classify these equations into two types: the first is based on the augmented formulation of kinetic energy, denoted as \(\alpha \)-type, and the other is according to the modified inertia representation, denoted as \(\gamma \)-type. In Sect. 3, error estimation demonstrates that the Hamiltonians in \(\alpha \)-type and \(\gamma \)-type are essentially different from the point of view of discretization, and it suggests that the parameter \(\gamma \) is expected to have great influence on the discretization error of kinetic energy. Based on the error estimation, two predetermined values \(\gamma _{\mathrm{m}}\) and \(\gamma _{ \mathrm{h}}\) are recognized to reduce numerical errors for the integrations of \(\gamma \)-type.
Section 4 develops several kinds of integrations, especially the specialized partitioned additive Runge–Kutta methods (SPARK) [24] for rigid body dynamics in terms of unit quaternions, according to the Hamilton equations of \(\alpha \)-type and \(\gamma \)-type. Section 5 systematically investigates the numerical accuracy and stability for these integrations. Numerical results demonstrate that most of the integrations of \(\gamma \)-type assigned with \(\gamma = \gamma _{ \mathrm{m}}\) or \(\gamma _{\mathrm{h}}\) can present impressively better numerical accuracy than those of \(\alpha \)-type, especially for the Gauss SPARK methods. All the integrations of \(\gamma \)-type can present better convergence speed and stronger robustness for the newton iteration than those of \(\alpha \)-type. A large amount of numerical comparisons reveal that the numerical performance of the integrations is extensively influenced by the inertia representations, discretization schemes and their combinations. The findings of this paper suggest that numerical integrations in terms of unit quaternions should be constructed with an appropriate inertia representation in order to obtain better numerical accuracy, convergence speed and stability.
2 Kinematic description
The unit quaternion can be considered as a four-parameter vector [16]:
with an algebraic constraint,
An important application of unit quaternions is that the three-dimensional orthogonal matrix can be expressed in terms of unit quaternions:
where \(\boldsymbol{R}\) satisfies the orthogonal condition \(\boldsymbol{R}^{T}\boldsymbol{R} = \boldsymbol{RR}^{T} = \boldsymbol{I}_{3}\) and \(\boldsymbol{I}_{3}\) is the 3-dimensional identity matrix. In rigid body dynamics, \(\boldsymbol{R}\) is named the rotation matrix; it maps from the space-fixed coordinates \(\boldsymbol{X}\) to the body-fixed coordinate \(\boldsymbol{x}\), i.e.,
Differentiating (4), we can derive the following motion equations:
where the superscript ‘dot’ denotes the derivation of variables with respect to time, and the matrix \(\hat{\boldsymbol{\varOmega}} \) is in the form of
where \(\boldsymbol{\varOmega } = [ \begin{array}{c@{\ }c@{\ }c} \varOmega _{ 1} & \varOmega _{ 2} & \varOmega _{ 3} \end{array} ]^{T}\) is the angular velocity vector. Substituting (3) into (5) leads to the quaternion-based motion equations [11]
where
Noting that \(\boldsymbol{q}^{T}\boldsymbol{q} = 1\), a direct calculation reveals that
where \(\boldsymbol{I}_{n}\) denotes the \(n\)-dimensional identity matrix. These identity relations are useful in later discussion.
3 The rotational motion equations in the Hamiltonian framework
In the Hamiltonian description of conservative system, the motion equations can be expressed in a unified form [25]:
where the third and fourth equations denote the constraint conditions. The Hamiltonian
consists of the kinetic energy \(T \)and the potential energy \(V\), and the abbreviations are defined as \(H_{\boldsymbol{p}} = \partial H / \partial \boldsymbol{p}^{T}\), \(H_{\boldsymbol{q}} = \partial H / \partial \boldsymbol{q}^{T}\) and \(g_{\boldsymbol{q}}(\boldsymbol{q}) = \partial g / \partial \boldsymbol{q}^{T}\). \(\lambda \) is the Lagrange multiplier which preserves the path of quaternions satisfying \(g ( q ) = \boldsymbol{0}\), and \(\mathbf{p} \) denotes the generalized momentum. For the quaternion-based rigid body rotational motion, we have \(g(\boldsymbol{q}) = \boldsymbol{q}^{T}\boldsymbol{q} - 1\) and \(g_{\boldsymbol{q}}(\boldsymbol{q}) = 2\boldsymbol{q}\).
Suppose that the body-fixed coordinate axes are aligned along the principal axes of the inertia of the rigid body, and \(\boldsymbol{J} = \operatorname{diag}(I_{1}, I_{2}, I_{3})\) denotes the inertia matrix whose principal elements are three principal moments of inertia. Combined with (7), the kinetic energy of the rigid body rotation can be expressed as
Based on a Legendre transformation, the generalized momentum can be derived as
where
is defined as the mass matrix. Multiplying (15) with \(\boldsymbol{q} ^{T}\)from the left and recalling \(\boldsymbol{L}(\boldsymbol{q}) \boldsymbol{q} = \boldsymbol{0}\), we have
which is equivalent to the constraint \(0 = g_{\boldsymbol{q}}( \boldsymbol{q})H_{\boldsymbol{p}}(\boldsymbol{q},\boldsymbol{p})\) for unit quaternions. Multiplying (15) with \(\boldsymbol{L}( \boldsymbol{q})\) from the left and recalling \(\boldsymbol{L}( \boldsymbol{q})\boldsymbol{L}(\boldsymbol{q})^{T} = \boldsymbol{I} _{3}\), we have
Noting that \(\boldsymbol{\varOmega } = 2\boldsymbol{L}(\boldsymbol{q}) \dot{\boldsymbol{q}}\) and \(\boldsymbol{l} = \boldsymbol{J\varOmega } \) where \(\boldsymbol{l}\) denotes the local angular momentum, it can be derived that
where the local angular momentum can be expressed as a function of \(\boldsymbol{q}\) and \(\boldsymbol{p}\). Substitute \(\boldsymbol{\varOmega } = \boldsymbol{J}^{ - 1}\boldsymbol{l}\) into (14) and we can derive the kinetic energy in the Hamiltonian framework:
Substituting (20) into the first two equations in (12), we can derive the differential parts of the Hamilton’s equations in the following form:
where the multiplier \(\lambda \) is used to preserve the constraint \(\boldsymbol{q}^{T}\boldsymbol{q} - 1 = 0\).
3.1 The inertia representations of \(\alpha \)-type and \(\gamma \)-type
The numerical application of the Hamilton’s equations (21) is complicated because of the singularity of the matrix \(\frac{1}{4} \boldsymbol{L}(\boldsymbol{q})^{T}\boldsymbol{J}^{ - 1}\boldsymbol{L}( \boldsymbol{q})\). To avoid the singularity, researchers [11,12,13,14,15,16] introduced an additional term \(\alpha ^{ - 1}(\boldsymbol{p}^{T} \boldsymbol{q})^{2}\) into the original formulation of kinetic energy. Generally, the augmented formulation of the kinetic energy can be expressed as
Because of \(\boldsymbol{p}^{T}\boldsymbol{q} = 0\), the term \(\frac{1}{8}\alpha ^{ - 1}(\boldsymbol{p}^{T}\boldsymbol{q})^{2}\) has no influence on the value of the kinetic energy. Substituting (22) into (12), we can derive the Hamilton’s equations of \(\alpha \)-type:
where the multiplier \(\lambda \) is used to preserve the constraint \(\boldsymbol{q}^{T}\boldsymbol{q} - 1 = 0\). The corresponding matrix \(\frac{1}{4}\boldsymbol{L}(\boldsymbol{q})^{T}\boldsymbol{J}^{ - 1} \boldsymbol{L}(\boldsymbol{q}) + \frac{1}{4}\alpha ^{ - 1} \boldsymbol{qq}^{T}\) in (23) is non-singular if only \(\alpha ^{ - 1} \ne 0\). Numerical results demonstrate that the conserving integrations of \(\alpha \)-type can present good long-time behavior in simulations [11, 16].
Noting that \(\boldsymbol{l} = - \frac{1}{2}\boldsymbol{L}( \boldsymbol{p})\boldsymbol{q}\), \(\boldsymbol{L}(\boldsymbol{q})^{T} \boldsymbol{L}(\boldsymbol{q}) + \boldsymbol{qq}^{T} = \boldsymbol{I} _{4}\) and \(\boldsymbol{q}^{T}\boldsymbol{p} = 0\), we have
Let us reformulate the kinetic energy in the following form:
where \(\gamma \) is an arbitrary constant and \(\gamma \ne 0\), and \(\boldsymbol{J}_{\gamma }^{*} = \boldsymbol{J}^{ - 1} - \gamma ^{ - 1} \boldsymbol{I}_{3}\). Substituting (19) and (24) into (25) yields a new formulation:
where the kinetic energy is split into two components. The first is a square term of the quaternion momentum, whose magnitude is adjusted by the parameter \(\gamma \). The other is a quadratic form in the derivatives with quadratic coefficients in the quaternion parameters. Equation (26) is the modified inertia representation presented by Xu and Zhong [23]. Substituting (26) into (12) yields the Hamilton’s equations of \(\gamma \)-type:
where the multiplier \(\lambda \) is used to preserve the constraint \(\boldsymbol{q}^{T}\boldsymbol{q} - 1 = 0\).
The inertia representations of \(\alpha \) and \(\gamma \)-type are mathematically equivalent under certain condition. To be specific, it can be derived that
by considering \(\gamma = \alpha \) and \(\boldsymbol{I}_{4} = \boldsymbol{L}(\boldsymbol{q})^{T}\boldsymbol{L}(\boldsymbol{q}) + \boldsymbol{qq}^{T}\). The mathematical equivalence implies that the parameters \(\alpha \) and \(\gamma \) theoretically have no influence on the value of the kinetic energy if the constraint \(\boldsymbol{q}^{T} \boldsymbol{q} - 1 = 0\) is satisfied exactly. In the following, the two representations and the corresponding parameters \(\alpha \) and \(\gamma \) will be systematically studied both in theoretical analysis and numerical simulation, and the numerical performance of the two parameters \(\alpha \) and \(\gamma \) would be investigated intensively with several different discretized schemes and convergence orders.
3.2 The discretization error estimation
Suppose that \(\boldsymbol{q} = \boldsymbol{q}(t)\) and \(\boldsymbol{p} = \boldsymbol{p}(t)\) denote the real solutions of rotational motion of a single body, and that \(\boldsymbol{q}^{ +} = \boldsymbol{q}^{ +} (t)\)and \(\boldsymbol{p}^{ +} = \boldsymbol{p}^{ +} (t)\) are their interpolation approximation solutions. We can define the real angular momentum and its approximation in the following form:
Then the local discretization error of \(\boldsymbol{q}\) and \(\boldsymbol{l}\) can be defined, respectively, as
and
where \(\delta \boldsymbol{L} = \boldsymbol{L}(\boldsymbol{q}^{ +} ) - \boldsymbol{L}(\boldsymbol{q})\). The constraint \(\boldsymbol{q}^{T} \boldsymbol{q} = 1\) is satisfied approximately as
Considering the inertia representation of \(\gamma \)-type, the discretization error of kinetic energy can be formally expressed as
Consider Eq. (26) and substitute (29) and (31) into (33), and then the discretization error of kinetic energy of \(\gamma \)-type can be expressed as
where the slope is defined as
and the intercept is of the form of
Note that \(\delta T_{0}\) is the discretization error of the original formulation of kinetic energy presented by (20). Similarly, we can derive the discretization error of kinetic energy of \(\alpha \)-type, which is
with the slope
Equations (34) and (37) reveal the linear relation between the energy error and \(1/\gamma \) or \(1 / \alpha \). This relation can be exploited to reduce the numerical errors of integrations by choosing the appropriate \(\gamma \) or \(\alpha \) to cancel out the intercept term \(\delta T_{0}\), as done in [23]. For this to work, the slope should ideally be of the same convergence order as \(\delta T_{0}\). However, this is not always the case for the inertia representation of \(\alpha \)-type. More specifically, substituting \(\boldsymbol{q}^{ +} = \boldsymbol{q} + \delta \boldsymbol{q}\) and \(\boldsymbol{p}^{ +} = \boldsymbol{p} + \delta \boldsymbol{p}\) into (38) and recalling \(\boldsymbol{q}^{T}\boldsymbol{p} = 0\) yield
When the error terms \(\delta \boldsymbol{q}\)and \(\delta \boldsymbol{p}\) are of the same convergence order (i.e., \(O(\delta \boldsymbol{q}) = O(\delta \boldsymbol{p})\)), Eq. (39) means \(k_{a}\) is generally a second-order small quantity with respect to \(\delta \boldsymbol{q}\) and \(\delta \boldsymbol{p}\). In this case, the slope \(k_{a}\) vanishes more quickly than the term \(\delta T_{0}\) when the discretization errors \(\delta \boldsymbol{q}\) and \(\delta \boldsymbol{p}\) tend to be zero. Accordingly, the corresponding parameter \(\alpha \) has nearly no influence on the discretization errors.
On the other hand, for the inertia representation of \(\gamma \)-type, the slope \(k_{s}\) can be expanded as
where the second term on the right side is a second-order small quantity. Ignoring the second-order small quantity and considering \(\boldsymbol{L}(\boldsymbol{q})^{T}\boldsymbol{L}(\boldsymbol{q}) + \boldsymbol{qq}^{T} = \boldsymbol{I}_{4}\) and \(\boldsymbol{p}^{T} \boldsymbol{q} = 0\), we can obtain
where the error term \(\delta \boldsymbol{L}\) is of the same order with the discretization error \(\delta \boldsymbol{q}\). One can expect
for any \(\boldsymbol{q}\) and \(\boldsymbol{p}\), where \(\left \| \delta \boldsymbol{q} \right \| = \sqrt{\delta \boldsymbol{q}^{T}\delta \boldsymbol{q}}\) denotes the 2-norm of \(\delta \boldsymbol{q}\). This implies that the slope \(k_{s}\) is of the same order as \(\delta T_{0}\), and the discretization error of kinetic energy will be greatly influenced by the parameter \(\gamma \).
We note that it is not always straightforward to verify (42) when we investigate the integration schemes. Instead, a more practical condition can be used. Substituting \(\boldsymbol{l}^{ +} = - \frac{1}{2} \boldsymbol{L}(\boldsymbol{p}^{ +} )\boldsymbol{q}^{ +} \) into (35) and considering that\((\boldsymbol{p}^{ + T}\boldsymbol{q}^{ +} )^{2} = O[( \delta \boldsymbol{q})^{2},(\delta \boldsymbol{p})^{2}]\), the slope \(k_{s}\) can be reformulated as
This suggests that the interpolation function should satisfy a necessary but not sufficient condition:
for \(\boldsymbol{q}^{ +} = \boldsymbol{q}^{ +} (t)\), to preserve \(k_{s} \propto O(\delta \boldsymbol{q})\).
Condition (44) means that, for \(k_{s}\) to be exploitable, we actually want the constraint on the unit quaternion to be satisfied only to the same order approximately, but not to higher order or exactly. As we will show in the following, Condition (44) can easily be verified, especially for the Gauss SPARK methods.
3.3 The optimal value of parameter \(\gamma \)
Suppose that the integrations satisfy (42) at every discretized points. The error estimation in (34) suggests a linear relationship between \(\delta T\) and \(\gamma ^{ - 1}\). Let \(\delta T = 0\) in (34), and it gives the optimal value of the parameter \(\gamma \) in the following form:
where higher-order terms are neglected. This is a reasonable value for the parameter \(\gamma \) to obtain a smaller discretization error and is expected to improve the numerical accuracy for the integrations of \(\gamma \)-type. Unfortunately, the quantities \(k_{s}\) and \(\delta T _{0}\) are unknown during the simulation. Substituting \(\boldsymbol{l} = - \frac{1}{2}\boldsymbol{Lp}\) and \(\delta \boldsymbol{l} \approx \frac{1}{2}(\delta \boldsymbol{L})\boldsymbol{p} + \frac{1}{2} \boldsymbol{L}\delta \boldsymbol{p}\) into (45), yields
where \(\boldsymbol{l} = [l_{1}, l_{2}, l_{3}]^{T}\), \(w_{i} = l_{i} \delta l_{i}\) (\(i = 1, 2, 3\)) and the error term \(\delta \boldsymbol{p}\) is neglected. Let \(w_{1} = w_{2} = w_{3} = 1\), and it gives the harmonic average of the three principal moments:
Let \(w_{1} = I_{1}\), \(w_{2} = I_{2}\) and \(w_{3} = I_{3}\), and it gives the arithmetic average of the three principal moments:
The values \(\gamma _{\mathrm{m}}\) and \(\gamma _{\mathrm{h}}\) are recommended as two reasonable values of \(\gamma \) for integrations of \(\gamma \)-type.
In addition, the two optimal values \(\gamma _{\mathrm{m}}\) and \(\gamma _{\mathrm{h}}\) present very similar numerical performance when the three principal moments (i.e., \(I_{1}\), \(I_{2}\) and \(I_{3}\)) have close values. Nevertheless, the values \(\gamma _{\mathrm{m}}\)and \(\gamma _{\mathrm{h}}\) become very different if there are large differences among the three principal moments. For instance, suppose that \(I_{3} \to 0\), and that \(I_{1}\) and \(I_{2}\) remain unchanged. We thus obtain
Because \(\delta T_{{\gamma }} = k_{s}\gamma ^{ - 1} + \delta T_{0} \to \infty \) when \(\gamma \to 0\), Eq. (49) implies a potential risk of serious accuracy loss in simulation for the integrations of \(\gamma \)-type with \(\gamma = \gamma _{\mathrm{h}}\). On the other hand, it can be derived that \(T = (I_{1}\varOmega _{1}^{2} + I_{2}\varOmega _{2} ^{2}) / 2 = (I_{1}^{ - 1}l_{1}^{2} + I_{2}^{ - 1}l_{2}^{2}) / 2\) by setting \(I_{3} = 0\). It means that \(l_{3}\) has no contribution to the kinetic energy nor to the discretization error if \(I_{3} = 0\). Consequently, substituting \([w_{1}, w_{2}, w_{3}]= [1,1,0]\) and \([w _{1}, w_{2}, w_{3}]=[I_{1}, I_{2}, 0]\) into (46) and we can derive the correct optimal values of the parameter \(\gamma \) for the case \(I_{3} \to 0\) as follows:
Compared to (49), it reveals that the value \(\gamma _{\mathrm{h}}\) in (47) tends to magnify the numerical influence of the smallest value of the three principal moments. These subtleties should be considered in simulation.
4 Numerical integrations of \(\gamma \)-type and \(\alpha \)-type
There is no restriction on the convergence order of the numerical integrations in the error analysis, which implies that the inertia representation of \(\gamma \)-type can be used to improve the numerical accuracy regardless of the convergence order of the algorithm. In the following, numerical integrations with different discretization schemes are developed and compared between the \(\alpha \)-type and the \(\gamma \)-type, in order to demonstrate the widespread applicability of the inertia representation in numerical simulation.
4.1 Numerical integrations of order 2
Let the phase space coordinates \((\boldsymbol{q}_{k - 1}, \boldsymbol{p}_{k - 1})\) at \(t_{k - 1}\) along with the step-size \(\Delta t = t_{k} - t_{k - 1}\) be given. Define the mean values as
and the increments as
for time interval \(t \in [t_{k - 1}, t_{k}]\).
Implicit midpoint scheme (IMS)
Approximating the Hamilton’s equation in (12) by the midpoint rule gives the following scheme:
where the unknowns\(\boldsymbol{q}_{k}\), \(\boldsymbol{p}_{k}\)and\(\lambda \)can be solved for the given\(\boldsymbol{q}_{k - 1}\)and\(\boldsymbol{p}_{k - 1}\). The schemes are abbreviated as IMS-\(\alpha \)and IMS-\(\gamma \)for the integrations of\(\alpha \)-type and\(\gamma \)-type, respectively.
The second integration we are interested in is the energy–momentum preserving integration developed in Refs. [11, 16, 26]. To this end, we consider the increment of the Hamiltonian:
where the increments \(\Delta T = T(\boldsymbol{q}_{k},\boldsymbol{p} _{k}) - T(\boldsymbol{q}_{k - 1},\boldsymbol{p}_{k - 1})\), \(\Delta V = V(\boldsymbol{q}_{k}) - T(\boldsymbol{q}_{k - 1})\) and \(\Delta g = g( \boldsymbol{q}_{k}) - g(\boldsymbol{q}_{k - 1}) = 2\Delta \boldsymbol{q}^{T}\bar{\boldsymbol{q}}\). After that we can define the increment of the augmented Hamiltonian as follows:
The energy–momentum preserving integration is constructed by setting \(\Delta H_{\lambda } = 0\). To this end, we first express \(\Delta V\) in terms of its finite derivative \(\partial V_{*} / \partial \boldsymbol{q}^{T}\), defined by [27]
Substituting (22) and (56) into (54) yields
where the overbar denotes the arithmetic mean, \(\overline{(\# )} = \frac{1}{2}[(\# )_{k - 1} + (\# )_{k}]\). According to (57), we can define the finite derivatives of \(H\) as
for the inertia representation of \(\alpha \)-type. Similarly, according to (26), we can define the finite derivatives of \(H\) as
for the inertia representation of \(\gamma \)-type. Based on (58) or (59), Eq. (55) can be expressed as
Energy–momentum preserving scheme (EMS)
Let the increment\(\Delta H_{\lambda } = 0\), the discretized scheme is constructed as follows:
where the unknowns\(\boldsymbol{q}_{k}\), \(\boldsymbol{p}_{k}\)and\(\lambda \)can be solved for the given\(\boldsymbol{q}_{k - 1}\)and\(\boldsymbol{p}_{k - 1}\). The schemes are abbreviated as EMS-\(\alpha \)and EMS-\(\gamma \)for the integrations of\(\alpha \)and\(\gamma \)-type, respectively.
EMS-\(\alpha \) is just the same as the energy–momentum conserving integration [11] for rigid body dynamics in terms of unit quaternions. The specific algorithms of IMS and EMS are summarized in pseudocode format in Appendix B.3.
4.2 Numerical integrations of higher order
Runge–Kutta methods form an important class of methods for the integration of differential equations. Recently, Jay [24] proposed the specialized partitioned additive Runge–Kutta (SPARK) methods for differential-algebraic equations (DAEs), which provide a straightforward way to construct conserving algorithms with an optimal order of convergence. Small [28] further presented the unified definition of the discontinuous collocation methods (Ref. [28], p. 64), which covers all SPARK methods of interest in this paper.
4.2.1 Discontinuous collocation type methods
Let \(c_{1},\ldots,c_{s}\) be distinct real numbers, \(\bar{c}_{1},\ldots, \bar{c}_{q}\) be distinct real numbers, and \(\tilde{c}_{0},\ldots, \tilde{c}_{p}\) also be distinct real numbers with \(\tilde{c}_{0} = 0\) and \(\tilde{c}_{p} = 1\). Consider the Hamilton system in (12) with the consistent initial values (\(\boldsymbol{q}_{k},\boldsymbol{p}_{k}\)) at \(t_{k}\) and the step-size \(\Delta t\), and we search for polynomials \(\boldsymbol{Q}(t)\) of degree \(s\), \(\boldsymbol{\varLambda } (t)\) of degree \(p\), \(\boldsymbol{P}^{f}(t)\) of degree \(q\), and \(\boldsymbol{P}^{r}(t)\) of degree \(p-1\) such that
with the defects
and satisfying the following conditions:
If these polynomials exist, the numerical solution is defined by
We take into consideration two types of Gauss SPARK methods, which can be constructed in the form of discontinuous collocation type methods with the following conditions.
s-stage Gauss–Lobatto SPARK methods (s-G-L)
Let\(\{ c_{i}\}\), \(i = 1,\ldots,s\), be the\(s\)nodes of the Gauss quadrature, \(p = s\), \(q = s\), \(\beta = 0\), \(\bar{c}_{i} = c_{i}\)for\(i = 1,\ldots, s\), and\(\{ \tilde{c}_{i}\}\), \(i = 0, 1,\ldots,s\)be the\(s + 1\)nodes of the Lobatto quadrature and then the discontinuous collocation methods (62)–(69) lead to the s-stage Gauss–Lobatto SPARK methods of order\(2s\). The schemes are abbreviated as G-L-\(\alpha \)and G-L-\(\gamma \)for the integrations of\(\alpha \)-type and\(\gamma \)-type, respectively.
s-stage Lobatto IIIA-B SPARK methods (s-LIIIA-B)
Let\(\{ c_{i}\}\), \(i = 1,\ldots,s\), be the\(s\)nodes of the Lobatto quadrature, \(q = s - 2\), \(p = s - 1\), \(\beta = 1\), \(\tilde{c}_{i - 1} = c_{i}\)and\(\bar{c}_{i - 1} = c_{i}\)for\(i = 2,\ldots,s - 1\), and then the discontinuous collocation methods (62)–(69) lead to the s-stage Lobatto IIIA-B SPARK methods of order\(2s-2\). The schemes are abbreviated as LIIIA-B-\(\alpha \)and LIIIA-B-\(\gamma \)for the integrations of\(\alpha \)-type and\(\gamma \)-type, respectively.
Table 1 lists the comparison between s-stage Gauss Lobatto method (s-G-L) and s-stage Lobatto IIIA-B method (s-LIIIA-B). It can be observed that s-G-L is of two orders higher convergence rate than s-LIIIA-B. These two Gauss SPARK methods are symmetric and symplectic methods proposed by Jay [24, 29]. In Appendix A, we present the unified formulations of SPARK methods and the corresponding Butcher style tableaux of SPARK coefficients for LIIIA-B (\(s = 2, 3\)) and G-L (\(s = 1, 2\)). The specific algorithms of the Gauss SPARK methods are summarized in pseudocode format in Appendix B.4.
4.2.2 A geometric interpretation for Gauss SPARK methods
As illustrated in Fig. 1, the Gauss SPARK methods presented by (62)–(69) can be considered as a two-step projection process, where the abbreviations
are used to describe the physical quantities of the discrete points. In the first step, the mapping \(\boldsymbol{T}_{1}\) defined by the implicit functions (64), (65) and (68), gives the solutions of the intermediate variables \(\boldsymbol{Q}_{1},\ldots,\boldsymbol{Q}_{s}\), \(\boldsymbol{P} _{1},\ldots,\boldsymbol{P}_{s}\), and \(1,\ldots,\lambda _{p - 1}\). With these variables, \(\boldsymbol{q}_{k + 1}\), \(\boldsymbol{P}_{k + 1}\), and \(\dot{\boldsymbol{P}}_{k + 1}\) can be solved, serving as the input parameters in the next step. The mappings are denoted by \(\boldsymbol{T}_{1}(\alpha )\) and \(\boldsymbol{T}_{1}(\gamma )\) for the Hamilton’s equations of \(\alpha \)-type and \(\gamma \)-type, respectively. In the process of \(\boldsymbol{T}_{1}\) mapping, G-L and LIIIA-B methods use two different distributions of discrete points. More specifically, the discretized points \(\boldsymbol{Q}_{1},\ldots,\boldsymbol{Q}_{s}\) are mismatched with the constraint points \(\tilde{\boldsymbol{Q}}_{0},\ldots, \tilde{\boldsymbol{Q}}_{s}\) for s-G-L, as shown in Fig. 2(a). Hence \(\boldsymbol{Q}_{i}^{T}\boldsymbol{Q}_{i} \ne 1\), \(i = 1,\ldots,s\), during the simulation. According to (44), this means
where \(\delta \boldsymbol{Q}\) denotes the numerical error in a time step. Consequently, the mapping \(\boldsymbol{T}_{1}(\alpha )\) is not mathematically equivalent to \(\boldsymbol{T}_{1}(\gamma )\), and the discretization schemes of G-L methods are highly consistent with the assumption of the error analysis in Sect. 3.2. Contrary to s-G-L, s-LIIIA-B presents a collocated distribution between the discrete points \(\boldsymbol{Q}_{1},\ldots,\boldsymbol{Q}_{s}\) and constraint points \(\tilde{\boldsymbol{Q}}_{0},\ldots,\tilde{\boldsymbol{Q}}_{s}\), as illustrated in Fig. 2(b). Hence \(\boldsymbol{Q}_{i}^{T}\boldsymbol{Q} _{i} = 1\) for \(i = 1,\ldots,s\) is satisfied exactly for s-LIIIA-B during the simulation. This may render Condition (44) unsatisfied.
In the second step, the mapping \(\boldsymbol{T}_{2}\) defined by the implicit function (69), gives the solutions of the quantities \(\boldsymbol{p}_{k + 1}\) and \(\lambda _{p}\). For s-G-L, the mapping \(\boldsymbol{T}_{2}\) which projects the value \(\boldsymbol{P}_{k + 1}\) onto the manifold \(\mathcal{M} = \{ \boldsymbol{p}^{T} \boldsymbol{q} = 0\}\) to obtain \(\boldsymbol{p}_{k + 1}\), has nothing to do with the parameter \(\alpha \) or \(\gamma \). Hence the parameters \(\alpha \) and \(\gamma \) influence the numerical performance of the integrators solely by the first step presented in Fig. 1. In contrast, s-LIIIA-B gives a mapping \(\boldsymbol{T}_{2}\) including the correction term
\(\boldsymbol{T}_{2}\) not only preserves the path of the solution on the manifold ℳ but also recovers the convergence order of \(\boldsymbol{P}_{k + 1}\) from \(2s - 4\) to \(2s - 2\). Figure 3 gives a geometric interpretation of the correction term, and one can refer to Ref. [25] (pp. 35–38, 247–252) for the discussion in detail. In general, the term \(\partial T(\boldsymbol{Q}_{k + 1}) / \partial \boldsymbol{q}^{T}\)in (72) can be expanded as
where
for the Hamilton’s equations of \(\gamma \)-type, and
for the Hamilton equations of \(\alpha \)-type. Equation (74) can be reformulated as
Noting that \(\boldsymbol{Q}_{k + 1}^{T}\boldsymbol{Q}_{k + 1} = 1\)has been satisfied in the first step, we have
Substituting (77) into (76) and setting \(\gamma = \alpha \) lead to
Recall that the mappings are denoted by \(\boldsymbol{T}_{2}(\alpha )\) and \(\boldsymbol{T}_{2}(\gamma )\) respectively for the Hamilton’s equations of \(\alpha \)-type and \(\gamma \)-type. Equation (78) means the mapping \(\boldsymbol{T}_{2}(\gamma )\) is mathematical equivalent to \(\boldsymbol{T}_{2}(\alpha )\), and consequently \(\boldsymbol{p}_{k + 1}\) will be solved with the same numerical accuracy for s-LIIIA-B-\(\gamma \) and s-LIIIA-B-\(\alpha \) if \(\boldsymbol{q}_{k + 1}\), \(\boldsymbol{P}_{k + 1}\) and \(\dot{\boldsymbol{P}}_{k + 1}\) are assigned with the same inputs.
Go back to the first step to reconsider the mapping \(\boldsymbol{T} _{1}\) for s-LIIIA-B. Although \(\partial T / \partial \boldsymbol{Q} _{i}\), \(i = 2,\ldots,s - 1\) and \(\partial T / \partial \boldsymbol{P} _{i}\), \(i = 1,\ldots,s\) are also involved in the mapping \(\boldsymbol{T} _{1}\) in this case, we must note that \(\boldsymbol{Q}_{i}^{T} \boldsymbol{Q}_{i} = 1\) for \(i = 1,\ldots,s\) is only satisfied implicitly, which means \(\boldsymbol{Q}_{i}^{T}\boldsymbol{Q}_{i} = 1\) is an iteration solution of the mapping \(\boldsymbol{T}_{1}\). Hence, we cannot present a straightforward and analytical way which is just like those presented by (76)–(78), to prove \(\boldsymbol{T}_{1}(\alpha ) = \boldsymbol{T}_{1}(\gamma )\). Nevertheless, the numerical testing in the next section would show that s-LIIIA-B-\(\alpha \) and s-LIIIA-B-\(\gamma \) are of the same numerical accuracy if \(\alpha \) and \(\gamma \) are assigned with the same value and this implies the equivalence between \(\boldsymbol{T}_{1}(\alpha )\) and \(\boldsymbol{T} _{1}(\gamma )\).
These differences presented above make G-L and LIIIA-B essentially two different methods in the numerical simulation, and we will further investigate the numerical performance of these methods in the following.
5 Numerical examples
In this section, numerical examples of a top spinning in gravitational field are considered. As shown in Fig. 4, the top fixed at \(O\) is rotating in a uniform gravitational field with the acceleration \(g =9.81\) in the negative \(z \)-direction. \(l\) represents the distance between the mass center \(A\) and the fixed point \(O\), and the rotational motion is expressed by the angle of nutation \(\theta \), the angle of precession \(\phi \), and the spin angle \(\psi \). The gravitational potential energy is written as [11, 16]
where \(\boldsymbol{K} = \operatorname{diag}(1, - 1, - 1, 1)\), and then we have \(\partial V(\boldsymbol{q}) / \partial \boldsymbol{q}^{T} = 2mgl \boldsymbol{Kq}\).
Two numerical examples are considered for comparing the numerical performance of different types of integrators in simulation, and the discussion would concentrate on the numerical influence of the parameters \(\alpha \) and \(\gamma \) in different inertia representations. The configuration parameters and initial conditions for the two examples are presented as follows.
Fast spinning top
The configuration parameters are corresponding to \(m =\)1, \(l =\)0.04 and the principal moments of inertia tensor with respect to the fixed point \([I_{1} = I_{2}, I_{3}] =[0.002, 0.0008]\). The following initial conditions are considered:
Correspondingly, the initial value \(\boldsymbol{q}_{0}\) and \(\boldsymbol{p}_{0}\) can be obtained by
and
Regular precession
The second example is the regular precession in gravitational field. The top is represented as a cone with the dimensions equivalent to those used in [17, 23]. The configuration parameters include the height \(h =0.1\), the radius \(r = \frac{1}{2}h\), the length \(l = \frac{3}{4}h\), and the mass \(m = \frac{1}{3}\rho \pi ^{2}h\) with the density \(\rho =\)2700. The three principal moments of the inertia matrix with respect to fixed point \(O\) are given by
The initial conditions are as follows:
with a precession rate \(\dot{\phi } =\)10, and the velocity components \(\dot{\phi } \) and \(\dot{\psi } \) satisfying the relation
Correspondingly, the initial angular velocity vector can be obtained by
To precisely evaluate the numerical results among these integrators, we define the mean values of errors as follows:
In the above, \(N_{t}\) denotes the number of the total time steps; \(x_{\mathrm{c}}\) and \(z_{\mathrm{c}}\) denote the coordinates of mass center in \(x \)and \(z\)-directions, whose errors are denoted by \(\Delta x_{\mathrm{c},k}\) and \(\Delta z_{\mathrm{c},k}\) at the grid point \(t_{k} = k\Delta t\) (\(k = 0, 1,\ldots, N_{t}\)); \(\Delta H_{k}\) denotes the pointwise absolute energy error; \(\Delta l_{3,k}\) denotes the pointwise local angular momentum error of the \(l_{3}\)-component.
5.1 Conservation of invariants
Conservation of invariants (or termed conserved quantities) has important effects on the numerical performance of integrations. It has been suggested that numerical methods, who conserve invariants (especially quadratic invariants) automatically, tend to present good performance on long-time behavior in simulation [25]. In this paper, two different inertia representations and the corresponding parameters \(\gamma \) and \(\alpha \) are introduced when constructing the numerical integrations. It is interesting whether the introduction of the parameters in different inertia representations would destroy the conservation of invariants which has been held by numerical methods.
Tables 2 and 3 list the numerical results for the two examples, where the error terms \(E[|\Delta H|]\), \(E[|\Delta l_{3}|]\), \(E[|g( \boldsymbol{q})|]\) and \(E[|\boldsymbol{q}^{T}\boldsymbol{p}|]\) are defined by (88)–(91). Numerical integrations of \(\gamma \)-type and \(\alpha \)-type are both considered in the simulation. The errors are bolded if the invariants are conserved exactly by the integrations. We further show the numerical errors of the invariants (i.e., the total energy and the local angular momentum \(l_{3}\)) in Figs. 5 and 6 for IMS-\(\gamma \), EMS-\(\gamma \) and 3-LIIIA-B-\(\gamma \) for the first example. Figure 7 shows that \(\boldsymbol{q}^{T}\boldsymbol{p} = 0\) is not preserved exactly for IMS and EMS but presents a periodic error in simulation. We should emphasize that all these integrations present periodic errors if the invariants are not conserved exactly in the simulation. These numerical results suggest that the introduction of the parameter \(\gamma \) or \(\alpha \) does not destroy the conservation of an invariant as well as the good long-time behavior, which has been held automatically by the numerical methods.
5.2 Comparison of the numerical accuracy
Tables 4, 5 and 6 list the numerical errors of the integrations for the two examples, where the error terms \(E[|\Delta H|]\), \(E[|\Delta z|]\) and \(E[|\Delta x|]\) are defined by (87) and (88). Numerical integrations of \(\gamma \)-type and \(\alpha \)-type are both considered. Figures 8 and 9 further show the numerical results of IMS-\(\alpha \)and IMS-\(\gamma \) for the two examples. It can be observed that all the integrations of \(\alpha \)-type are of the same numerical accuracy no matter what values are assigned to the parameter \(\alpha \); IMS-\(\gamma \), EMS-\(\gamma \) and 2-G-L-\(\gamma \) with \(\gamma = \gamma _{\mathrm{m}}\) are of much higher numerical accuracy than those of \(\alpha \)-type. These numerical results suggest that the parameter \(\gamma \) can be used to improve the numerical accuracy of numerical methods, whereas the parameter \(\alpha \) has no influence on the numerical accuracy of the integrations. Tables 4–6 further present that 3-LIIIA-B-\(\gamma \) is of the same numerical accuracy with 3-LIIIA-B-\(\alpha \) if \(\alpha \) and \(\gamma \) are assigned with the same values. According to the discussion in Sect. 4.2.2, numerical results suggest that \(\boldsymbol{T}_{1}( \alpha ) = \boldsymbol{T}_{1}(\gamma )\) for LIIIA-B, and there is no difference in accuracy between the two discretization schemes s-LIIIA-B-\(\alpha \) and s-LIIIA-B-\(\gamma \).
In Table 6, besides \(\gamma _{\mathrm{m}}\) and \(\gamma _{\mathrm{h}}\), \(\gamma \) is also assigned with \(\tilde{\gamma }_{\mathrm{h}}\) to account for the large difference between \(I_{1}\) and \(I_{3}\) (i.e., \(I_{1} = I_{2} = 8.5I_{3}\)). It can be observed in Table 6 that IMS-\(\gamma \) and EMS-\(\gamma \) with \(\gamma = \gamma _{\mathrm{h}}\) have larger numerical errors than the others and the numerical accuracy is improved evidently if we use the corrected optimal value \(\tilde{\gamma }_{\mathrm{h}}\) presented in (50). We further change the radius by \(r = 1.5h\) for the example of regular precession which makes \(I_{1} = I_{2} = 1.39I_{3}\). It can be observed in Table 7 that the numerical accuracy of IMS-\(\gamma \) and EMS-\(\gamma \) assigned with \(\gamma = \gamma _{\mathrm{h}}\) is greatly improved, especially compared with those presented in Table 6. Recall the discussions in the last paragraph of Sect. 3.3, and these numerical results are highly consistent with those discussions.
Figure 10 shows the relative error with time step increasing, where the error is obtained by evaluating the maximum of the relative error. These numerical results can be summarized as follows: IMS and EMS have the convergence of order 2; 2-G-L and 3-LIII-A-B have the convergence of order 4. It suggests that the convergence property keeps consistent regardless of whether the integrations are derived in \(\gamma \)-type or \(\alpha \)-type, and all the integrations of \(\gamma \)-type present higher accuracy than those of \(\alpha \)-type, except for 3-LIII-A-B.
The discussions and conclusions presented in Sects. 5.1 and 5.2 are also suitable to those SPARK methods of order 2, 6 or 8, although the numerical results are only listed for the cases of order 4. According to these numerical results, the inertia representation of \(\gamma \)-type can be used to improve the numerical accuracy of integrations without destroying the conservation of invariants. These results further suggest that the improvement of numerical accuracy can be achieved simultaneously for both the energy and trajectory by choosing a proper value of the parameter \(\gamma \). In addition, the integrations of \(\gamma \)-type with the proposed optimal values \(\gamma _{\mathrm{m}}\) and \(\gamma _{\mathrm{h}}\) can give impressively good numerical accuracy, especially compared with those of \(\alpha \)-type, and \(\gamma _{ \mathrm{m}}\) is more robust for IMS and EMS if there are large differences among the three principal moments.
5.3 Comparisons between the integrations of \(\gamma \) and \(\alpha \)-types
The conservation of invariant and the numerical accuracy of the integrations of \(\alpha \)-type and \(\gamma \)-type have been investigated in the above. Many other differences of numerical performance will be found if we consider the convergence orders, error-parameter relations, the discretization schemes and their combinations, as discussed in the following.
5.3.1 The error-parameter relations for IMS, EMS and G-L SPARK methods
Figures 11, 12 and 13 shows the linear relation between the periodic error and \(1/\gamma \) for IMS-\(\gamma \), EMS-\(\gamma \) and G-L-\(\gamma \) in the example of fast spinning top. Figure 13 further shows that the linear relation remains unchanged for G-L SPARK methods of \(\gamma \)-type when the order of the integration is changed. This implies that the error estimation discussed in Sect. 3.2 is probably independent of the order conditions. Figure 14 shows the relation between the periodic error and \(1 / \alpha \) for the example of the fast spinning top. It can be observed that the parameter \(\alpha \) has nearly no influence on the energy error for the integrations of \(\alpha \)-type. As referred to the discussion in Sect. 4.2.2, all three integrations IMS, EMS and G-L show the mismatch of the discretized points between the differential part and the algebraic part. We believe that this mismatch makes these results highly consistent with the error estimation in Sect. 3.2.
5.3.2 The error analysis for LIIIA-B SPARK methods
Figure 15 shows the periodic error of LIIIA-B-\(\gamma \) changing with \(1 / \gamma \) for the example of the fast spinning top. The figures of LIIIA-B-\(\alpha \)are not shown in this paper because s-LIIIA-B-\(\alpha \) presents exactly the same results as s-LIIIA-B-\(\gamma \). An interesting numerical phenomenon can be observed: the numerical errors are linear functions with \(1 / \gamma \) for 2-LIIIA-B and 4-LIIIA-B, whereas 3-LIIIA-B and 5-LIIIA-B present a logarithmic increasing (or decreasing) error-curve. Figure 16 further shows the convergence rate for the LIIIA-B SPARK methods. It presents that the parameter \(\gamma \) influences the numerical accuracy of 2-LIIIA-B and 4-LIIIA-B regardless of the size of the time step, and in contrast the influence of parameter \(\gamma \) declines rapidly for 3-LIIIA-B and 5-LIIIA-B with the time step decreasing.
Although we predicted the mathematical equivalence of LIIIA-B-\(\alpha \) and LIIIA-B-\(\gamma \)in Sect. 4.2.2 and confirmed it by numerical results, the parameter \(\alpha \) or \(\gamma \) is not entirely useless for improving the numerical accuracy. Rather, it may somehow affect the integrations whose numbers of the stage are even, and we can still apply \(\gamma _{\mathrm{m}}\) and \(\gamma _{\mathrm{h}}\) to reduce the integration error, at least for even-stage schemes.
Though the results of 2-LIIIA-B and 4-LIIIA-B is preferable, the authors are not able to give an explanation to this phenomenon. Further work is needed to precisely study the role of parameters \(\alpha \) and \(\gamma \) for the LIIIA-B SPARK methods.
5.4 Robustness of the integrations with different parameters
Robustness of the parameters \(\gamma \) and \(\alpha \) is also discussed in this paper. The introduction of undetermined parameters to differential equations generally involves potential numerical risks if inappropriate values of the parameters are applied in the algorithm. Firstly, this may destroy the good long-time behavior, which has been discussed for the parameters \(\gamma \) and \(\alpha \) in Sect. 5.1. Secondly, an inappropriate value of the introduced parameter may cause an ill-conditioned problem of the iteration matrix, which means serious restriction of the time step to obtain a convergent result of Newton iteration.
Table 8 lists the maximum of the size of time-step (denoted as \(\Delta t_{\max } \)) to receive a convergent result of integrations for the example of the fast spinning top, where iter_max denotes the maximum number of iterations, \(\varepsilon _{r}\) denotes the maximum of the iteration error and \(N_{t}\) denotes the number of the total time steps. The Newton iteration stops and goes to the next time step if the iteration number is greater than the maximum iter_max or the iteration error is less than \(\varepsilon _{r}\). It can be observed that: IMS-\(\alpha \) and EMS-\(\alpha \) allow larger sizes of \(\Delta t_{\max } \) than IMS-\(\gamma \) and EMS-\(\gamma \); G-L-\(\gamma \) assigned with \(\gamma = \gamma _{\mathrm{m}}\) or \(\gamma _{\mathrm{h}}\) allows a larger size of \(\Delta t_{\max } \) than G-L-\(\alpha \); LIII A-B-\(\gamma \) assigned with \(\gamma = \gamma _{\mathrm{m}}\) or \(\gamma _{\mathrm{h}}\) allows a larger size of \(\Delta t_{\max } \) for \(s =3\), 4 and 5. Numerical results also suggest that 1-stage G-L-\(\alpha \) is divergent in simulation. It seems that \((1, 1)\)-G-L-\(\alpha \) suffers from serious morbidity of the iteration matrix, and plenty of numerical tests suggest that the energy error will increase linearly for 1-G-L-\(\alpha \) even if it is assigned with a very small size of time step.
Tables 9, 10, 11, 12, 13 and 14 list the mean values of iterations at which the iteration error becomes less than \(\varepsilon _{r}\) for IMS, EMS and LIII A-B. We select four different sizes of the time step to compare the convergent speeds of different integrations. It can be observed that the integrations of \(\gamma \)-type assigned with \(\gamma = \gamma _{ \mathrm{m}}\) generally have quicker convergence than those of \(\alpha \)-type. Table 9 shows that the iteration increases with decreasing size of the time step for IMS-\(\alpha \), which means much more computational cost compared with IMS-\(\gamma \). Tables 11–14 shows that LIII A-B-\(\gamma \) assigned with \(\gamma = \gamma _{\mathrm{m}}\) or \(\gamma _{\mathrm{h}}\) has quicker convergence speed than LIII A-B-\(\alpha\). This means less computational cost for the integrations of \(\gamma \)-type. Although we have not listed the numerical results, the G-L methods present the same numerical features as the LIIIA-B methods.
These numerical results suggest that the numerical performance for the integrations of \(\gamma \)-type are harmonious between the numerical accuracy and stability, which means we can obtain higher numerical accuracy as well as better convergence speed by choosing the proper parameter (\(\gamma _{\mathrm{m}}\) or \(\gamma _{\mathrm{h}}\)). Although these tables only list the numerical results for the example of the fast spinning top, a large amount of numerical testing demonstrates that nearly the same numerical phenomenon can be observed for other configuration parameters or initial conditions.
6 Conclusion
The inertia representations of \(\gamma \)-type and \(\alpha \)-type have been developed for the simulation of the quaternion-based rigid body dynamics. The two inertia representations formally lead to different formulations of Hamilton’s equations, which are theoretically equivalent if the constraint \(\boldsymbol{q}^{T}\boldsymbol{q} = 1\) is satisfied exactly. However, error estimation demonstrates that the two kinds of inertia representations are different due to the discretization and suggests that the parameter \(\gamma \) can be used to optimize the numerical performance of the integrations in simulation.
The implicit midpoint scheme (IMS), the energy–momentum conserving scheme (EMS), and two types of Gauss SPARK methods (G-L and LIIIA-B) are derived to investigate the two inertia representations in simulations. The numerical results show that the parameters \(\alpha \) and \(\gamma \) can greatly influence the numerical performance of the integrations in simulation and the numerical influences are the result of the comprehensive effect of the discretization scheme, the inertia representations and their combinations. To be specific, IMS-\(\gamma \), EMS-\(\gamma \) and G-L-\(\gamma \) present a linear relation between numerical errors and the parameter \(\gamma \) regardless of the convergence order of the integration, whereas the parameter \(\alpha \) has no influence on the numerical accuracy for these integrations of \(\alpha \)-type; s-LIIIA-B-\(\alpha \)and s-LIIIA-B-\(\gamma \) are of the same numerical accuracy in simulation, if the parameters \(\alpha \) and \(\gamma \) are assigned with the same value; all the integrations of \(\gamma \)-type can present quicker convergence speed and better stability than those of \(\alpha \)-type. A large amount of numerical testing demonstrates that the two values \(\gamma _{ \mathrm{m}}\) and \(\gamma _{\mathrm{h}}\), referring to three principal moments, can be considered as two reasonable values of \(\gamma \), with which the integrations of \(\gamma \)-type can present better numerical accuracy, convergence speed and stability for these integrations.
References
Goldstein, H., Poole, C.P., Safko, J.L.: Classical Mechanics, 3rd edn. Addison–Wesley, New York (2001)
Nikravesh, P.E., Chung, I.S.: Application of Euler parameters to the dynamic analysis of three-dimensional constrained mechanical systems. J. Mech. Des. 104, 785–791 (1982)
Nikravesh, P.E., Kwon, O.K., Wehage, R.A.: Euler parameters in computational kinematics and dynamics, part 2. J. Mech. Transm. Autom. Des. 107, 366–369 (1985)
Nikravesh, P.E.: Computer-Aided Analysis of Mechanical Systems. Prentice-Hall, New York (1988)
Haug, E.J.: Computer Aided Kinematics and Dynamics of Mechanical Systems, vol. 1: Basic Methods. Allyn and Bacon, Boston (1989)
Vadali, S.R.: On the Euler parameter constraint. J. Astronaut. Sci. 36, 259–265 (1988)
Chou, J.C.K.: Quaternion kinematic and dynamic differential equations. IEEE Trans. Robot. Autom. 8, 53–64 (1992)
Morton, H.S. Jr.: Hamiltonian and Lagrangian formulations of rigid-body rotational dynamics based on the Euler parameters. J. Astronaut. Sci. 41, 569–591 (1993)
Shivarama, R., Fahrenthold, E.P.: Hamilton’s equations with Euler parameters for rigid body dynamics modeling. ASME J. Dyn. Syst. Meas. Control-Trans. 126, 124–130 (2004)
Sherif, K., Nachbagauer, K., Steiner, W.: On the rotational equations of motion in rigid body dynamics when using Euler parameters. Nonlinear Dyn. 81, 343–352 (2015)
Betsch, P., Siebert, R.: Rigid body dynamics in terms of quaternions: Hamiltonian formulation and conserving numerical integration. Int. J. Numer. Methods Eng. 79, 444–473 (2009)
Moller, M., Glocker, C.: Rigid body dynamics with a scalable body, quaternions and perfect constraints. Multibody Syst. Dyn. 27, 437–454 (2012)
O’Reilly, O.M., Varadi, P.C.: Hoberman’s sphere, Euler parameters and Lagrange’s equations. J. Elast. 56, 171–180 (1999)
Udwadia, F.E., Schutte, A.D.: An alternative derivation of the quaternion equations of motion for rigid-body rotational dynamics. ASME J. Appl. Mech.-Trans. 77, 4 (2010)
Miller, T.F., Eleftheriou, M., Pattnaik, P., Ndirango, A., Newns, D., Martyna, G.J.: Symplectic quaternion scheme for biophysical molecular dynamics. J. Chem. Phys. 116, 8649–8659 (2002)
Nielsen, M.B., Krenk, S.: Conservative integration of rigid body motion by quaternion parameters with implicit constraints. Int. J. Numer. Methods Eng. 92, 734–752 (2012)
Simo, J.C., Wong, K.K.: Unconditionally stable algorithms for rigid body dynamics that exactly preserve energy and momentum. Int. J. Numer. Methods Eng. 31, 19–52 (1991)
Wendlandt, J.M., Marsden, J.E.: Mechanical integrators derived from a discrete variational principle. Physica D 106, 223–246 (1997)
Manchester, Z.R., Peck, M.A.: Quaternion variational integrators for spacecraft dynamics. J. Guid. Control Dyn. 39, 69–76 (2016)
Leitz, T., Leyendecker, S.: Galerkin Lie-group variational integrators based on unit quaternion interpolation. Comput. Methods Appl. Mech. Eng. 338, 333–361 (2018)
Shabana, A.A.: Euler parameters kinetic singularity. Proc. Inst. Mech. Eng., Proc., Part K, J. Multi-Body Dyn. 228, 307–313 (2014)
Celledoni, E., Safstrom, N.: A Hamiltonian and multi-Hamiltonian formulation of a rod model using quaternions. Comput. Methods Appl. Mech. Eng. 199, 2813–2819 (2010)
Xu, X.M., Zhong, W.X.: On the numerical influences of inertia representation for rigid body dynamics in terms of unit quaternion. ASME J. Appl. Mech.-Trans. 83, 11 (2016)
Jay, L.O.: Specialized partitioned additive Runge–Kutta methods for systems of overdetermined DAEs with holonomic constraints. SIAM J. Numer. Anal. 45, 1814–1842 (2007)
Hairer, E., Lubich, C., Wanner, G.: Geometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations, 2nd edn. (2006)
Krenk, S., Nielsen, M.B.: Conservative rigid body dynamics by convected base vectors with implicit constraints. Comput. Methods Appl. Mech. Eng. 269, 437–453 (2014)
Gonzalez, O.: Exact energy and momentum conserving algorithms for general models in nonlinear elasticity. Comput. Methods Appl. Mech. Eng. 190, 1763–1783 (2000)
Small, S.J.: Runge–Kutta Type Methods for Differential-Algebraic Equations in Mechanics. Dissertations & Theses – Gradworks (2011)
Jay, L.: Symplectic partitioned Runge–Kutta methods for constrained Hamiltonian systems. SIAM J. Numer. Anal. 33, 368–387 (1996)
Acknowledgements
The authors are grateful for the support of the Natural Science Foundation of China (grant Nos. 91748203 and 11432010) and the valuable discussion of Dr. Teng Zhang.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Disclosure of potential conflicts of interest
Conflict of Interest: The authors declare that they have no conflict of interest.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: The Gauss SPARK methods in unified form
1.1 A.1 A unified formulation of SPARK methods
In Sect. 4.2.1, we present two types of Gauss SPARK methods based on the discontinuous collocation type methods. It is more efficient in computation to derive a unified formulation of SPARK methods in which the discretization schemes are formulated with Butcher style tableaux of SPARK coefficients.
One step of an (\(s\), \(p\))-SPARK method applied to the Hamiltonian system of (12) with consistent initial values (\(\boldsymbol{q}_{k}\), \(\boldsymbol{p}_{k}\)) at \(t_{k}\) and step-size \(\Delta t\) is given as follows [24, 28]:
where \(\varLambda _{i}\) for \(i = 0, 1,\ldots,p\) is the Lagrange multiplier. \(\boldsymbol{Q}_{i}\), \(\tilde{\boldsymbol{Q}}_{i}\) and \(\boldsymbol{P} _{i}\) denote quantities discretized as the inner points, defined by
The coefficients \((b_{j},c_{j})_{j = 1}^{s}\) and \((\tilde{b}_{j}, \tilde{c}_{j})_{j = 0}^{p}\) are generally two distinct quadrature formulas and the SPARK coefficients can be expressed in the form of Butcher style tableaux:
To ensure the existence and uniqueness of the SPARK solution [24, 28], we should assume \(\bar{a}_{0j} = 0\) and \(\bar{a}_{pj} = b_{j}\) for \(j = 1,\ldots,s\), which imply that \(\tilde{\boldsymbol{Q}}_{0} = \boldsymbol{q}_{k}\) and \(\tilde{\boldsymbol{Q}}_{p} = \boldsymbol{q} _{k + 1}\). Hence Eqs. (A.2), (A.4) and (A.6) give \(p+1\) independent constraints to solve \(p + 1\) Lagrange’s multipliers (i.e., \(\varLambda _{i}\), \(i = 0,\ldots,p\)).
We are especially interested in the SPARK methods whose coefficients are the weights and nodes of Gauss quadrature, to have an optimal order of convergence. The Gauss SPARK coefficients satisfy the following conditions [24, 28]:
and
The two types of Gauss SPARK methods concerned in this paper can be obtained by the following conditions.
s-stage Lobatto IIIA-B method
Let\(p = s - 1\), \(\bar{a}_{(i - 1)j} = a_{ij}\), \(\tilde{a} _{i(j - 1)} = \hat{a}_{ij}\), \(b_{j} = \hat{b}_{j} = \tilde{b}_{j - 1}\), \(\tilde{c}_{i - 1} = c_{i}\), for\(i = 1,\ldots,s\), \(j = 1,\ldots,s\), and\(c_{1},\ldots ,c_{s}\), be the s nodes of the Lobatto quadrature. The Lobatto IIIA-B SPARK method is defined with the coefficients\(a_{ij}\), \(b_{j}\)and\(\hat{a}_{ij}\)determined by
and
with the conditions\(B(s)\), \(C(s)\)and\(\hat{C}(s)\)defined by (A.8) and (A.9).
s-stage Gauss Lobatto method
Let\(p = s\), \(\hat{a}_{ij} = a_{ij}\), \(b_{j} = \hat{b}_{j}\), for\(i = 1,\ldots,s\), and\(c_{1},\ldots ,c_{s}\)be the s nodes of the Gauss quadrature and\(\tilde{c}_{1}, \ldots ,\tilde{c}_{s}\)be the\(s+1\)nodes of the Lobatto quadrature. The Gauss–Lobatto SPARK method is defined with the coefficients\(a_{ij}\), \(b_{j}\), \(\tilde{a}_{ij}\), \(\tilde{b}_{i}\)and\(\bar{a}_{ij}\), determined by
and
with the conditions\(B(s)\), \(C(s)\), \(\tilde{B}(p)\), \(\tilde{C}(p)\)and\(\bar{C}(s)\)defined by (A.8)–(A.12).
1.2 A.2 Butcher style tableaux of Gauss SPARK coefficients
SPARK coefficients can be calculated by substituting nodes of quadrature and the solution conditions presented by Lobatto IIIA-B or Gauss–Lobatto SPARK methods into (A.8)–(A.12). The Lobatto nodes of quadrature \(c_{1},c_{2},\ldots ,c_{s}\) are the zeros of
The Gauss nodes of quadrature \(c_{1},c_{2},\ldots ,c_{s}\) are the zeros of the \(s\)th shifted Legendre polynomial
1.2.1 A.2.1 SPARK coefficients for s-stage -Lobatto IIIA-B SPARK methods
The 2-stage and 3-stage Lobatto IIIA-B SPARK methods correspond to the following Butcher style tableaux of SPARK coefficients:
and
1.2.2 A.2.2 SPARK coefficients for s-stage Gauss–Lobatto SPARK methods
The 1-stage and 2-stage Gauss–Lobatto SPARK methods correspond to the following Butcher style tableaux of SPARK coefficients:
and
Appendix B: Algorithms in pseudocode formats
2.1 B.3 Implicit midpoint scheme and energy–momentum conserving scheme
The implicit midpoint scheme and the energy–momentum conserving scheme presented by (53) and (61) can be summarized in pseudocode format in Table 15.
2.2 B.4 Gauss SPARK methods
Consider the SPARK method presented by (A.1)–(A.6). We can define the residual vectors in the following form:
where \(\boldsymbol{Q}_{i}\), \(\boldsymbol{P}_{i}\) and \(\tilde{\boldsymbol{Q}}_{i}\) are defined by (A.7) and \(\tilde{\boldsymbol{k}}_{i} = - g_{\boldsymbol{q}}( \tilde{\boldsymbol{Q}}_{i})\varLambda _{i}\). Define the unknowns as
Then the Gauss SPARK methods can be summarized uniformly in pseudocode format as in Table 16.
Rights and permissions
About this article
Cite this article
Xu, X., Luo, J. & Wu, Z. The numerical influence of additional parameters of inertia representations for quaternion-based rigid body dynamics. Multibody Syst Dyn 49, 237–270 (2020). https://doi.org/10.1007/s11044-019-09697-x
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11044-019-09697-x