1. Introduction
Computational geometric mechanics can keep the geometric characteristics of a system and have higher stability than traditional methods. In addition, the geometry-based model are more concise than trigonometric functions, which has incomparable advantages for spatial rigid–flexible coupling multi-body systems. Geometric methods are also used in the fields of informatics and information geometry [
1], which a provides unified mathematical basis for the integration of mechanics and other disciplines. Therefore, the exploration of geometric representations, numerical calculations and physical significance will promote the engineering applications of geometric mechanics.
Geometric mechanics exploration has two directions: symplectic geometry and Lie group methods. The symplectic geometry method is used to solve differential algebraic equations of dynamic systems which combine dynamic analysis and differential equation solving. The discrete Lie group variational integrator is another geometry method which can conserve the energy, momentum and geometric structure. It is a recursive equation which can be used in the optimal control of a space dynamics system. In recent years, Shi et al. [
2] studied the indirect symplectic method for solving optimal control problems of differential algebraic equations, which improved calculation efficiency, and Peng et al. [
3] established the discrete Singer formula for optimal control of compressed bodies based on the Lagrange–D’Alembert principle and discrete variational principle, which reduced the number of drives required for optimal control. Peng, H.J. et al. [
4] studied a symplectic optimal control method for robot trajectory control and obtained a symplectic discrete format for differential algebraic equations based on the discrete variational principle. Hu et al. [
5] studied the relationship between symmetry rupture and energy dissipation in dynamics based on multi-symplectic theory. Hu et al. [
6] explored structure conservation based on local structure conservation of the multi-symplectic method and established a dynamic model of the flexible damping plate-spring mass system. These show the symplectic geometry method has developed towards the direction of multi-symplectic theory, mainly based on the conservation of local symplectic structure.
Differently from symplectic method, Lie group method seeks global conservation of geometry structure of system. Recent research achievements of Lie group are as follows: Leitz et al. [
7] studied the polysymplectic Galerkin Lie group of geometrically accurate beams. Tariverdi et al. [
8] explored flexible continuous manipulator modeling using a Lie group variational integrator. Sjoberg et al. [
9] studied the dynamic model of a crane system based on Lie group theory. Mueller et al. [
10] studied the application of spinor and Lie group theory in a recursive algorithm for a topologically tree-based multi-body system. Zdravko et al. [
11] studied the forward dynamics of fixed-wing aircraft on the Lie group and realized the attitude non-singular reconstruction on SO(3). Zdravko et al. [
12] studied the momentum and energy conservation Lie group integral method for rigid body rotational dynamics. Liu et al. [
13] studied the finite-time optimal control of dynamic systems on Lie groups. Lee et al. [
14,
15,
16] studied a Lie group variational integrator for full rigid body systems. Demoures et al. [
17] studied a Lie group variational integrator for geometrically accurate beam dynamics.
In recent years, the moving frame method has provided a new idea for solving dynamics equations based on Lie group theory. The main results are: Zenkov et al. [
18] studied Hamel form and variational integrators on a sphere. Shi et al. [
19] studied the Hamel form under classical field theory and used the variational integrator in sledge model [
20]. He also studied the minimum time optimal control based on a Hamel product molecule [
21] and the Hamel form of infinite dimensional mechanical system [
22]. Wang et al. [
23] established the Hamel field variational product molecule of geometrically accurate beams. Wang et al. [
24] carried out path planning for a manipulator based on a geometric mechanics method.
The above analysis shows that the discrete Lie group variational integrator and the Hamel method both change an ordinary differential equation into nonlinear equations for a numerical solution. Lie algebra works in the vector space which is mapped from a Lie group. The three methods solve the dynamics equations from different perspectives. The Hamel and Lie algebra methods reduce the equations’ complexity. Based on the above explorations, some problems need to be analyzed. Firstly, the numerical simulations in the above explorations were performed with their own modeling methods, so the relation of different geometry expressions should be analyzed. Secondly, the extension of complexity of different geometry models and their numerical solutions should be analyzed. Thirdly, the numerical accuracy and stability of different geometry models need to be compared. The above analysis can help the engineer chose the best method to solve their own problem. Thus, in this paper, the geometric models for planar and 3D pendulums are established from three perspectives as reduced attitude, Lie group and Lie algebra, respectively. Based on the three models, the dynamics equations were transformed into nonlinear equations, and the Jacobi matrices of different equations were obtained. The numerical solutions were carried out by Newton iteration. Three methods were compared and analyzed based on the numerical results. This study provides a basis for the study of geometric dynamics of multi-body systems.
The structure of this research is as follows. In the
Section 2 and
Section 3, the concepts of a Lie group, Lie algebra and Newton iteration are introduced based on basic mathematical expressions. In the
Section 4, three kinds of geometric dynamics model of planer pendulum are built. In the
Section 5, four types of geometry dynamics model of 3D pendulums are built. In the
Section 6, the simulation results of different geometric dynamics models are presented. The conclusions are summarized in the
Section 7. The concrete derivation of each model is presented step by step, which should help the readers to understand the methods easily.
2. Lie Group and Lie Algebra
The Lie group and Lie algebra are abstract mathematical concepts and difficult to understand. Thus, in this section, the concepts are explained based on concrete examples. Consider a rotation problem in plane. The coordinate transformation is expressed as in
Figure 1. Suppose the initial coordinate is xOy, after a counterclockwise rotation with
. The new coordinate is x′Oy′. The rotation matrix between them is as shown in Equation (1).
The physical significance of the first and second column of
R is the projection of Ox′ and Oy′ on Ox and Oy respectively.
R can be written as the exponential type, as in Equation (2).
In Equation (2), .
The derivation of
is Equation (3).
The derivation of
can be written as Equation (4) according to Equation (2).
The results agree with the trigonometric functions type. Considering the system in space, the attitude matrices corresponding to the rotation along
x,
y, and
z axes are in Equations (5)–(7), respectively.
Derive Equations (5)–(7). The results are in Equation (8).
In Equation (8),
.
Equations (5)–(7) can also be written exponentially, as in Equation (9).
The derivation of Equation (9) is similar to Equation (4). can be seen as the Lie group expression of planer rotation through the concept of kinematics, and is the Lie algebra which corresponds to the Lie group. If represents the rotation in space, then the Lie algebra which corresponds to is .
According to the above analysis,
is a function about
, no matter the triangle function or exponent type. The above theory can be used as the basis for modeling the dynamics of a single body or a series of single bodies combined together which rotate in space. In practical engineering, some rigid body has three degrees of rotational freedom, such as a ship, plane, spacecraft or UAV. They have triangle function expression based on the classical multibody theory. For example, with the Cardan expression, the rotation of a rigid body in space is as the series of X–Y–Z, as in
Figure 2, and the rotation matrix can be written as (10).
Differentiate
; then, substitute Equation (8) into Equation (10). The derivation of
can be written as Equation (11).
Equation (11) can be rewritten as Equation (12) according to
.
From the above equation, the rotation of a rigid body in space can be written as the nonlinear combination of the rotations on different axes Cardan order. Using the physics definition of
R in plane, the physics definition of each row of
R in space can be explained as the projection of X′Y′Z′ on X, Y, Z. Using
to represent the absolute angular velocity of a rotation body in space, the differential of
R can be written as in Equation (13).
In Equation (13),
.
is the skew matrix of
, as in Equation (14).
According to Equations (12) and (13), the angular velocity can be written as the combination of the rotation matrix and angular velocities across each axis, as in Equation (15).
The above derivations are the expressions of the rotation matrix and their differentials of rigid body rotations in plane and in space. As part of dynamics solving, the above equations usually need to transform to the triangle type, which may make the expressions more complex due to the triangle transformation, especially for the rotation in space or multibody systems.
In order to avoid these problems, the overall natures of Lie group and Lie algebra need to be analyzed. From the overall point of view, R satisfies the characteristics in Equation (16), no matter the plane or space.
Expect the above characteristics, each row of
R also satisfies similar characteristics, as the moduli are one in each row.
If each row of
R is one element, Equation (13) can be divided into three parts, as in Equation (18).
Suppose
. Then, the derivation of
is
For planer rotation, the solution of any part of Equation (19) can obtain the complete rotation matrix according to inverse derivation. For rotation in space, Equation (19) needs to be completely solved to obtain the rotation matrix. The above method avoids complex triangle transformations. The exponential type of rotation matrix is
is the Lie algebra type. The exponential matrix can be obtained according to the Rodriguez parameter or Cayley transformation, as in Equations (21) and (22), respectively. The Cayley transformation avoids triangle expression completely.
The discussion of the exchangeability of the rotation matrix is as follows. Supposing that
, when
i =
j,
is called isomorphism, which means it has the same structure. If and only if
,
satisfies the relation as in Equation (23), which means that the rotation matrix has the same structure satisfying the exchange relation.
Suppose that the rotation matrix in space is
. The definitions of
are in Equation (9). According to Cardan relation, the exponential type of
R is in Equation (24).
It is necessary to declare , which is important in the following derivation.
3. Newton Iterative
Traditionally, the dynamics equation which is ODE type is solved by the Runge–Kutta method. However, the error accumulation of this method may lead to the distortion of long simulations. The Lie group method and the Hamel method can avoid this problem. One reason is that modeling the dynamics of the geometry method can maintain the geometry characteristics of the system, and the other is that both of these methods solve the nonlinear equation, which is the coal character of these two methods. The distinguishing feature between the Lie group method and the Hamel method is that the Lie group method transforms the structure preserving part to be a nonlinear equation, and the Hamel method transforms the ODE to be a nonlinear equation directly. The nonlinear equation is often solved by Newtonian iteration. Thus, the error of each step can be reduced to be the lowest level and avoids error accumulation, which can guarantee the reliability of long simulations.
Suppose that the nonlinear equation is as Equation (25).
Using
,
, Equation (25) can be written as a vector as in Equation (26).
Suppose that
.
is the initial number of iterations. Substitute it into Equation (26). Then the linear equation system is Equation (28).
Expanding Equation (28), we get the expression of
.
In Equation (29),
is the Jacobi matrix of
, which is written as Equation (30).
According to continuous iteration under the given initial value, the exact solution of the system can be obtained which can satisfy the limiting condition. Then, the stop criterion of iteration is
For example, Equation (18) can be discrete with Lie group or Lie algebra. Using the discrete model of a discrete Lie group variational integrator, the discrete rotation matrix can be written as Equation (32).
According to
, the discrete pattern on vector domain is shown in Equation (33).
can be obtained by the given
. The calculation can also use the difference as the unknown quantity, and the discrete schemes can be written as
Based on the given values of and , the accuracy value of can be obtained according to the iterations, along with the accuracy value of .
Suppose that there is a transfer matrix between
and
. The discrete value of the rotation matrix is
Substitute Equation (35) into Equation (32) and get the expression of Equation (36).
The above expression can also transform to be exponential in type:
Equation (35) is the discrete form of a Lie group, so map the discrete relation to Lie algebra space. The discrete transformation can directly make Lie algebra space as it is in Equation (38). Thus, the goal of an iterative solution is
or
based on the known
.
4. The Solution of the Dynamics of a Planer Pendulum
In this chapter, a planner pendulum is used to explain the above theory. The planer pendulum is shown in
Figure 3, which considers its geometry. The mass and the rotational inertia of the pendulum are
m and
J, respectively. The length between the center of mass and pivot is
l. The dynamics model of the pendulum is written as Equation (39) with rotation matrix
R and angular velocity
ω.
Equation (39) can also be written as triangle type:
Let
. Then, Equation (39) can change to be of Hamilton type, as in Equation (41).
In general, Equation (41) can be solved by the Runge–Kutta method. Here, the difference method is used to solve it. The parameters are discrete:
Substitute Equation (42) into Equation (40). Then, the dynamics equation is
The Jacobi matrix of Equation (43) is
Discretize
as Equation (45) to use
and
as parameters of a difference operation.
Substitute it into Equation (40) to obtain the dynamics equation as Equation (46), which uses
as parameters.
The Jacobi matrix of Equation (46) is
Let
. Then, the Lie group expresses the dynamics equation as Equation (48).
is discrete in a similar regular form as in Equation (42). The discrete regular of
is
Substitute Equation (49) into Equation (48). The dynamics equation is
Then, the Jacobi matrix is Equation (51), achieved by deriving
.
Using
and
as parameters, the discretion of
is Equation (44), and the discretion of
is Equation (52).
Substitute Equation (52) into Equation (48). The dynamics equation of system is Equation (53).
The Jacobi matrix of Equation (53) is a 3 × 3 matrix:
If
is discrete by Equations (35) and (36), and
is discrete as in Equation (45), then substitute them into Equation (39) to get the dynamics equation of Equation (55).
The latter two equations can change into the vector equation via multiplying them by
and
. Let
. Equation (55) changes to be Equation (56).
are the variables of Equation (56). The Jacobi matrix is a 5 × 5 matrix, as shown in Equation (57).
In Equation (57),
. The above method changes
into vector
. Although the numerical result is correct, the complete character of
is broken, which may lead to constraint loss of the system. In order to reflect the complete structure of
, let
; then, Equation (39) can be written as Equation (58).
The discrete regulars of
and
are Equation (49) and Equation (42), respectively. With these regulars, the discrete dynamics equation is Equation (59).
It is necessary to notice that the significance of parameters in Equation (59) is different from those in Equation (56). If the equation is discrete with
, the result is Equation (60).
If the parameters are
, Equations (59) and (60) have the same Jacobi matrix as Equation (61).
The above dynamics equations have Lie group expression. Next, the dynamics equation with Lie algebra is discussed. Firstly, the dynamics equation is changed to be the exponential type:
The discrete dynamics equation is shown in Equations (63) and (64). The discrete regulars are shown in Equations (42) and (45), respectively.
The Jacobi matrixes corresponding to Equations (63) and (64) are in Equations (65) and (66).
The exponential part of Equations (63) and (64) can be factorized by the Cayley transformation as Equation (67).
In the above analysis, the dynamics equations of a planer pendulum were built on different points. The dynamics equation with Lie algebra expression is more concise, and from the dimension point of view, the calculation based on Lie group theory needs more dimensions than is common. Although the dynamics equation has higher dimensionality, it can avoid the complex triangle transformation.
5. Dynamics Modeling of a 3D Pendulum
Based on the dynamics analysis of a planer pendulum, the dynamics modeling for a 3D pendulum was derived with Lie group and Lie algebra theory. The model of a 3D pendulum is shown in
Figure 4. The 3D pendulum means that the pendulum has three degrees of freedom which can rotate along the pivot
O in space, and C is the center of mass.
is the position vector of the center of mass. The dynamics equation of 3D pendulum is Equation (68).
is the rotational inertia,
is angular velocity along the inertia’s principle axis and
is the attitude matrix. Using
as variables, the discrete regular is as Equation (69), which is similar to Equations (35) and (36).
Let
. Substitute Equation (69) into Equation (68), and the dynamics equation of central difference type is Equation (70).
Let
. Substitute it into Equation (70) to obtain the simplifier dynamics equation.
Then, the dynamics equation changes to be a nonlinear equation with variables of
and
. In order to obtain the Jacobi matrix, the variation of Equation (71) is Equation (72).
Next, we change Equation (72) to matrix type:
is a Jacobi matrix of Equation (71), which is a 6 × 6 matrix.
The reduced dynamics equation is Equation (75).
Define the discrete regular as Equation (76).
Then, the dynamics equation with
and
as variables is Equation (77).
By combining the same item together, the nonlinear equation changes to Equation (78).
The expression levels of parameters
in Equation (78) are as follows.
Equation (79) is the variant of Equation (78) of matrix type.
is the Jacobi matrix in Equation (80).
Similarly, if using
as parameters to discretize, the dynamics equation and Jacobi matrix are Equations (81) and (82), respectively.
The parameters are as follows.
The reduced dynamics only consider part of the Lie group, which cannot represent the whole structure. Next, the calculation with a complete Lie group is derived. According to Equation (20), the dynamics equation with a complete Lie group is obtained. The discrete equation using
as parameters is Equation (83).
The parameters are as follows.
The Jacobi matrix is in Equation (84).
In Equation (84),
. The dynamics analysis of Lie algebra is derived as follows. For the Lie group which corresponds to the 3D pendulum is not exchangeable, discretizing the Lie group directly is not available. Here, the Cardan transformation is used as the basis for the discrete use of Lie algebra. Combined with Equation (12), the dynamics equation is Equation (85).
The discrete regular is defined in Equation (86).
Substitute the former into Equation (86). The discrete dynamics equation of the system is then Equation (87).
In Equation (87),
. The dimensions of Equation (87) number 6, and
are their variables. The Jacobi matrix is Equation (87).
6. Simulation
Suppose that the mass of the pendulum is 2 kg, the rotational inertia is 0.48 kg·m
2, the length of the planer pendulum is 0.6 m, the initial angle is 0 rad, the initial angular velocity is 1 rad/s and the simulation time is 50 s. According to Equations (43) and (46), the simulation results are in
Figure 5,
Figure 6,
Figure 7 and
Figure 8.
According to
Figure 5, the dynamics parameters of the planer pendulum are damped as the simulation time increases under the Runge–Kutta method. The simulation results under the difference method conserve the long-term stability of the attitude and angular velocity. The comparisons between the first and last 5 s for these two methods are shown in
Figure 6 and
Figure 7, respectively. At the beginning of the calculation, the two results coincide, but in the last 5 s as in
Figure 7, the differences between these two methods are obvious—not only the amplitude, but also the time period.
Figure 8 shows a comparison of simulations under two difference methods, Equations (43) and (46), for the last 5 s. The simulation results highly coincide.
Figure 9 shows the simulation results of two difference calculation under reduced attitude. The simulation results also highly coincide.
Figure 10 and
Figure 11 are the comparison results of the difference calculations with reduced attitude or triangle expression with standard results, respectively. According to
Figure 10, the three results highly coincide in the first 5 s, but the results appear obviously distinguishable from the standard values.
Figure 12 is a comparison of simulation results with different time steps and reduced attitude expression. When the time step is 0.05 s, the results are obviously distinguishable, but the results coincide when the time step is 0.01 s. This figure indicates that a long time step will lead to time hysteresis in the simulation.
Figure 13 is a comparison between the simulation results according to Equation (56) and the standard results. The figure indicates that the results of the recursive method and the standard results highly coincide with a time step of 0.01 s.
Figure 14 and
Figure 15 are the simulation results which consider the complete Lie group structure. According to
Figure 14, the two difference simulation results approximately coincide when the same big time step is used, 0.05 s, but the simulation results show some differentiation in the last 5 s. According to
Figure 15, the simulation results which consider the complete Lie group structure highly coincide with the standard results when the time step is 0.01 s.
Figure 16 and
Figure 17 are the comparisons of difference calculation results using Lie algebra. These two figures indicate that the two difference calculation results coincide when using same time step and also coincide with the standard value using the time step of 0.01 s.
The dynamics calculations of a 3D pendulum are analyzed as follows. Supposing that the mass is 10 kg, the rotation inertias of the principle axes are Jx = 1 kg·m2; Jy = 1 kg·m2, Jz = 1 kg·m2. The position vector of the center of mass is [0;0;0.7] m, and the initial value of rotation matrix is , which can derived by the Cardan method.
Supposing Cardan angles which correspond to attitude are : the correspond rotation matrixes are , respectively. Thus, the rotation matrix can be derived by . The initial angular velocity is .
The dynamics calculation results based on Equation (70) are shown in
Figure 18 and
Figure 19. The simulation time was 100 s. The time step was
. The simulation results of angular velocity and attitudes from 95to 100 s show good long-term stability under a large time step.
Figure 20 and
Figure 21 are the simulation results of Equation (78), which is expressed by the reduced attitudes. The simulation time step was 0.1 s, and the simulation time was 100 s. According to the simulation results, the dynamics equation which is expressed by reduced attitudes has good long-term stability under Newton iteration with the time step of 0.1 s. This means that the reduced attitude expression has low sensitivity to the time step in the dynamics calculation.
Figure 22,
Figure 23,
Figure 24 and
Figure 25 are the simulation results based on equation (83), which is expressed by the complete Lie group method. The simulation results indicate that the results of complete the Lie group method also have good long simulation stability under the time step of 0.1 s. Compared with the reduced attitude expression, the complete Lie group method can obtain the results of all attitudes.
Figure 26 and
Figure 27 are simulation results of using Equation (87), which has the Lie algebra type expression. The simulation results were obtained with the time steps of 0.01 and 0.005 s. According to the simulation results, the dynamics results were lost under the Lie algebra, which is determined by Cardan rotation. It is very sensitivity to the time step.