Next Article in Journal
Explicit Continuity Conditions for G1 Connection of S-λ Curves and Surfaces
Next Article in Special Issue
An Overview of the Hamilton–Jacobi Theory: the Classical and Geometrical Approaches and Some Extensions and Applications
Previous Article in Journal
Almost Hermitian Identities
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Variational Integrators in Holonomic Mechanics

State Key Laboratory of Structural Analysis for Industrial Equipment, Department of Engineering Mechanics, Faculty of Vehicle Engineering and Mechanics, Dalian University of Technology, Dalian 116023, China
*
Author to whom correspondence should be addressed.
Submission received: 30 June 2020 / Revised: 7 August 2020 / Accepted: 10 August 2020 / Published: 13 August 2020

Abstract

:
Variational integrators for dynamic systems with holonomic constraints are proposed based on Hamilton’s principle. The variational principle is discretized by approximating the generalized coordinates and Lagrange multipliers by Lagrange polynomials, by approximating the integrals by quadrature rules. Meanwhile, constraint points are defined in order to discrete the holonomic constraints. The functional of the variational principle is divided into two parts, i.e., the action of the unconstrained term and the constrained term and the actions of the unconstrained term and the constrained term are integrated separately using different numerical quadrature rules. The influence of interpolation points, quadrature rule and constraint points on the accuracy of the algorithms is analyzed exhaustively. Properties of the proposed algorithms are investigated using examples. Numerical results show that the proposed algorithms have arbitrary high order, satisfy the holonomic constraints with high precision and provide good performance for long-time integration.

1. Introduction

Numerical integrators for nonlinear dynamic mechanics should reflect the properties of the underlying mechanical systems [1,2]. The characterization of symplectic integrators in terms of variational integrators has proven to be very fruitful. Compared with the traditional algorithms, the variational integrator has clear advantages, such as symplectic preserving, momentum preserving and excellent long-time behaviors [3,4,5].
Variational integrators are based on variational principles. The existence, uniqueness, regularity and other qualitative properties of variational problems have been well studied in appropriate function spaces [6,7]. Based on these studies, variational methods are widely used in mathematics, mechanics, physics, astronomy, economics and other fields of natural sciences and engineering. The theory of the discrete calculus of variations was originally formulated for optimal control problems [8,9,10] and gradually developed into the field of mechanics. Within the scope of discrete mechanics, the discrete Euler–Lagrange equations, the discrete Nother’s theorem and the discrete action sum were clearly understood in [11,12,13], and these theories form the foundation of variational integrators. Using the idea of variational integrators, the Verlet method develops a series of algorithms. The SHAKE algorithm was first proposed by Ryckaert for molecular dynamics in [14] and is a constrained form of the Verlet algorithm. Another constrained version of the velocity Verlet integrator, called RATTLE, was proposed in [15] by Anderson and was later shown to be a symplectic integrator [16]. The Newmark method could be derived from variational integrators by choosing appropriate parameters, and an analysis of the symplecticity was given in [17]. The partitioned Runge–Kutta methods are a class of integrators that generalize the standard Runge–Kutta method. It has also been generalized to multi-symplectic partial differential equations, thus resulting in the multi-symplectic product partitioned Runge–Kutta methods [18]. The spectral and symplectic integrability analysis of the nonlinear dynamical systems are given by Blackmore [19]. Traditionally, variational integrators have been used to study conservative systems [20], but modern variational integrators have been developed for various problems, such as Hamiltonian systems [21,22], Lagrangian PDEs [23,24,25], non-holonomic systems [26,27,28] and forced and controlled systems [29,30,31,32]. By introducing suitable new variables and using integral representations, a dissipative system can be transformed into a system of conservative form; then, the Lagrangian of the associated system can be used to develop a variational integrator that inherits the advantageous properties of the conservative counterpart [33,34].
In recent years, high-order systems have received renewed interest due to new and relevant applications in optimal control for robotics and aeronautics and in the study of air traffic control and computational anatomy [35,36,37]. Galerkin variational integrators comprise a general method for constructing high-order variational integrators. They rely on the discretization of the action, which is then approximated by the finite-dimensional function space and a numerical quadrature rule. For unconstrained systems, the Galerkin variational integrator with the highest order is derived by using the Gauss–Legendre quadrature [5]. When using m degree polynomials for the approximation of the coordinates and the m points Gauss–Legendre quadrature rule, the order of this Galerkin variational integrator is s = 2 m . Meanwhile, for the constrained system, the Galerkin variational integrator with the highest order is constructed by taking the Lobatto quadrature rule [5]. When using m degree polynomials for the approximation of the coordinates and the m points Lobatto quadrature rule, the order of this Galerkin variational integrator is s = 2 m 2 .
It is fairly well known that, for a given number of points, the Gauss–Legendre rule has the highest order. However, according to the above discussion, the Gauss–Legendre rule is not used for the constrained system. Recently, a new kind of variational integrator for dynamic systems with holonomic constraints was constructed and analyzed in [38]. In this study, the augmented Lagrangian is split into two parts, which makes it possible to use the Gauss–Legendre quadrature rule for constrained systems. This practice not only improves the accuracy of the algorithm but also makes the construction of the algorithm more flexible. However, the quadrature points for the integral of the constrained term is still restricted to be part of the control points of the Lagrangian multipliers, and this makes it impossible to determine the effect of each factor on the accuracy of the algorithm. Evidently, clarifying the effect of each factor on the accuracy of the algorithm can provide a basis for constructing higher-precision algorithms. In our work, the augmented Lagrangian for constructing variational integrators follows [38]. However, in contrast to [38], the position of quadrature points used by two parts of the integral are both independent of the position of the control points. In this way, we put forward eight algorithms by choosing different types of control points and quadrature points. Based on these eight algorithms, the influence of control points and quadrature points on the accuracy of the algorithm is discussed in detail using numerical examples, and the effect of each factor on the accuracy of the algorithm is determined. This paper is structured as follows. In Section 2, we recall the basic definitions and concepts of constrained variational mechanics and variational integrators. In Section 3, a new construction of the Galerkin variational integrator for the constrained system is presented. In Section 4, the numerical properties are assessed using numerical examples and the influence of control points and quadrature points on the accuracy of the algorithm are discussed. Finally, a conclusion is given in Section 5.

2. Variational Principle for Constrained Mechanics

2.1. Constrained Dynamics

In this section, a brief review of constrained dynamics is presented following [4]. Consider a mechanical system defined on the d dimensional configuration manifold Q with the corresponding tangent bundle T Q . Let q = { q 1 ,   q 2 ,   ,   q d } T Q and q ˙ = { q ˙ 1 ,   q ˙ 2 ,   ,   q ˙ d } T T q Q be the generalized coordinates and velocity of this system, respectively. Suppose that the system is constrained by c holonomic constraints:
g ( q ) = { g 1 ( q ) ,   g 2 ( q ) ,   ,   g c ( q ) } T = 0
Then, the dynamic equation of motion for this system is given by
d d t ( L q ˙ ) L q + G T ( q ) λ = 0
g ( q ) = 0
in which λ = { λ 1 ,   λ 2 ,   ,   λ c } T are the Lagrange multipliers, G ( q ) = g ( q ) / q is a c × d matrix, and L ( q , q ˙ ) is the Lagrangian of the unconstrained system.
The action of the constrained system in the time interval [ 0 ,   T ] is defined as
S = 0 T [ L ( q , q ˙ ) g T ( q ) λ ] d t
and Hamilton’s principle for Equations (2) and (3) can be given by
δ S = δ 0 T [ L ( q , q ˙ ) g T ( q ) λ ] d t , δ S = 0
If the generalized coordinates at times t = 0 and t = T are given, such as δ q ( 0 ) = δ q ( T ) = 0 , then Hamilton’s principle gives Equations (2) and (3).

2.2. Constrained Discrete Variational Dynamics

The concept of variational integrators is based on a discretization of the action. Consider a time grid Δ t = { t k = k η | k = 0 ,   1 ,   ,   N } , N η = T where N is a positive integer and η is the step size. Replace the generalized coordinates q and Lagrange multipliers λ by the discrete curve q d = { q k } k = 0 N and λ d = { λ k } k = 0 N with q k = q d ( t k ) and λ k = λ d ( t k ) as approximations to q ( t k ) and λ ( t k ) , respectively. The discrete augmented Lagrangian in interval [ t k ,   t k + 1 ] is defined as [38]
L d ( q k , q k + 1 , λ k , λ k + 1 ) t k t k + 1 L ( q , q ˙ ) d t t k t k + 1 g T ( q ) λ d t
and for the entire time interval [ 0 ,   T ] , the discrete action is defined as
S d ( q d , λ d ) = k = 0 N 1 L d ( q k , q k + 1 , λ k , λ k + 1 )
The variation of the discrete action is formulated by finding stationary points of the discrete action given by
δ S d = 0
with δ q 0 = δ q N = 0 . Performing the variational calculation gives
D 2 L d ( q k 1 , q k , λ k 1 , λ k ) + D 1 L d ( q k , q k + 1 , λ k , λ k + 1 ) = 0 ,     k = 1 ,   2 ,   ,   N 1
D 3 L d ( q 0 , q 1 , λ 0 , λ 1 ) = 0
D 4 L d ( q k 1 , q k , λ k 1 , λ k ) + D 3 L d ( q k , q k + 1 , λ k , λ k + 1 ) = 0 ,     k = 1 ,   2 ,   ,   N 1
D 4 L d ( q N 1 , q N , λ N 1 , λ N ) = 0
where D i denotes the partial derivatives with respect to the i-th variables, respectively, such that
D i f ( x 1 , x 2 , x 3 , x 4 ) = f ( x 1 , x 2 , x 3 , x 4 ) x i , i = 1 ,   2 ,   ,   4
Equations (9) and (11) provide a discrete iteration scheme for Equations (2) and (3) that determines q k + 1 and λ k + 1 for given q k 1 , q k , λ k 1 and λ k .

3. Galerkin Variational Integrators for Holonomic Constrained Systems

3.1. Galerkin Methods

To obtain accurate variational integrators, the discrete action should approximate the action over short intervals. One way to do this is to approximate the generalized coordinates and Lagrange multipliers via polynomials and approximate the integral via numerical quadrature rules. This approximation can be shown to be equivalent both to a class of continuous Galerkin methods and to a subset of symplectic partitioned Runge–Kutta methods [4].
The construction of our new algorithms falls within the framework of generalized Galerkin variational integrators, which were studied and analyzed in [4,38,39,40,41]. In this section, we first provide a brief review of the generalized Galerkin variational integrators and two well-known algorithms in unconstrained systems. Then, they are generalized to the holonomic constrained systems. By comparing the order of the algorithms in the unconstrained and constrained systems, some contradictions inspire us to develop new algorithms for constrained systems.
For unconstrained systems, the exact discrete Lagrangian L d E of the first time interval [ 0 , η ] is
L d E ( q 0 , q 1 , η ) = 0 η L ( q , q ˙ ) d t
The motivating idea of the generalized Galerkin variational integrators is to replace the generally non-computable exact discrete Lagrangian L d E ( q 0 , q 1 ) with a highly accurate computable discrete analogue L d ( q 0 , q 1 ) . Specifically, given a Lagrangian L and t [ 0 ,   η ] , the construction of a Galerkin variational integrator for unconstrained systems can be divided into two factors [39]:
  • Control points: Choose n + 1 control points 0 = d 0 < d 1 < < d n 1 < d n = 1 that determine an n order polynomial space to approximate the space of trajectories
  • Quadrature rule: Choose a g point quadrature rule ζ ( . ) that satisfies ζ ( f ) = η i = 1 g b i f ( c i η ) 0 η f ( t ) d t in the time interval [ 0 ,   1 ] with integral points 0 c 1 < c 2 < < c g 1 < c g 1 and weight b i , i = 1 ,   2 ,   ,   g to approximate the integral of the Lagrangian.
In [5,39], the Galerkin variational integrators are based on the m points Gauss–Legendre quadrature rules, and choosing m + 1 equidistant points as the control points is shown to be equivalent to the collocation Gauss–Legendre method of order s = 2 m . If the system is stiff, better numerical performance will result from using the m points Lobatto quadrature rule and m + 1 Lobatto points as the control points. The Galerkin variational integrator generated in this way has the order of s = 2 m 2 .
The collocation of the Gauss–Legendre method and the Lobatto IIIA–IIIB partitioned Runge–Kutta method provides the best two methods for the unconstrained system. Now, we extend them into the holonomic constrained systems. Due to the existence of constraints given by Equation (1), the construction of a Galerkin variational integrator in constrained systems includes one more factor than in unconstrained systems, i.e.,
  • Constraint points: Choose r + 1 constraint points 0 = a 0 < a 1 < < a r 1 < a r = 1 so that Equation (1) can be accurately satisfied at time a i η , such that g ( q ( a i η ) ) = 0 for i = 0 ,   1 ,   ,   r .
For constrained systems, Galerkin variational integrators based on the m points Lobatto quadrature rule with the choice of the m Lobatto points as the control points and constraint points is shown to be equivalent to the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method of order s = 2 m 2 [5,38], which is most widely used for constrained systems. However, at first glance, it seems natural to consider a Galerkin variational integrator based on the Gauss–Legendre quadrature rule, which has the highest order for a given number of quadrature points. Thus, we implemented this algorithm by using the m points Gauss–Legendre quadrature rule and equidistant points as the control points and constraint points. The order of the resulting algorithm is listed in Table 1, which shows that the order does not grow linearly as m increases, and it is far below s = 2 m 2 .
It is well known that, for a given number of quadrature points m , the order of the Gauss–Legendre quadrature rule and the Lobatto quadrature rule are 2 m and 2 m 2 , respectively. Based on the above discussion, it is clear that, in unconstrained systems, the order of the quadrature rules are completely preserved by the collocation of the Gauss–Legendre method and the Lobatto IIIA–IIIB partitioned Runge–Kutta method. However, in constrained systems, the algorithm with the Gauss–Legendre quadrature rule, which should have the highest order, does not achieve the order of 2 m , and this inspires us to explore better algorithms for constrained systems.

3.2. New Construction of Galerkin Variational Integrators for Constrained Systems

Considering the first time interval [ 0 ,   η ] , the generalized coordinates q i ( t ) and the Lagrange multipliers λ i ( t ) are approximated by the Lagrange polynomials of degree n that interpolate n + 1 control points at time d k η , ( 0 = d 0 < d 1 < < d n 1 < d n = 1 ) , i.e.,
q i ( t ) = k = 0 n N k ( t ) q 0 , i k , i = 1 ,   2 ,   ,   d
λ i ( t ) = k = 0 n N k ( t ) λ 0 , i k , i = 1 ,   2 ,   ,   c
in which
q 0 , i k = q i ( d k η ) ,   i = 1 ,   2 ,   ,   d ,   k = 0 ,   1 ,   ,   n
λ 0 , i k = λ i ( d k η ) ,   i = 1 ,   2 ,   ,   c ,   k = 0 ,   1 ,   ,   n
N k ( τ ) = i = 0 , i k n τ d i η d k η d i η ,   k = 0 ,   1 ,   ,   n
Then, the generalized coordinate and Lagrange multiplier vectors can be written as
q ( t ) = k = 0 n N k ( t ) q 0 k ,   λ ( t ) = k = 0 n N k ( t ) λ 0 k
in which
q 0 k = { q 0 , 1 k ,   q 0 , 2 k ,   ,   q 0 , d k } T ,   λ 0 k = { λ 0 , 1 k ,   λ 0 , 2 k ,   ,   λ 0 , c k } T ,   k = 0 ,   1 ,   ,   n
Substituting the approximate generalized coordinates and Lagrange multipliers into Equation (4) gives
S d ( q 0 0 ,   q 0 1 ,   ,   q 0 n ;   λ 0 0 ,   λ 0 1 ,   , λ 0 n ) = L ¯ d ( q 0 0 ,   q 0 1 ,   ,   q 0 n ) g ¯ d ( q 0 0 ,   q 0 1 ,   ,   q 0 n ;   λ 0 0 ,   λ 0 1 ,   ,   λ 0 n )
in which
L ¯ d ( q 0 0 ,   q 0 1 ,   ,   q 0 n ) = 0 η L ( k = 0 n N k ( t ) q 0 k ;   k = 0 n N ˙ k ( t ) q 0 k ) d t g ¯ d ( q 0 0 ,   q 0 1 ,   ,   q 0 n ;   λ 0 0 ,   λ 0 1 ,   ,   λ 0 n ) = 0 η g T ( k = 0 n N k ( t ) q 0 k ) k = 0 n N k ( t ) λ 0 k d t
where L ¯ d and g ¯ d denote the approximate actions of the unconstrained term and the constrained term, respectively.
Since S d depends on variables q 0 0 ,   q 0 1 ,   ,   q 0 n and λ 0 0 ,   λ 0 1 ,   ,   λ 0 n , the total differential of S d is given by
d S d = S d q 0 0 d q 0 0 + S d q 0 1 d q 0 1 + + S d q 0 n 1 d q 0 n 1 + S d q 0 n d q 0 n + S d λ 0 0 d λ 0 0 + S d λ 0 1 d λ 0 1 + + S d λ 0 n 1 d λ 0 n 1 + S d λ 0 n d λ 0 n
Taking q 0 0 and q 0 n as the independent variables, and using the theory of generating functions [5], the action S d satisfies the following equation:
d S d = p 0 0 d q 0 0 + p 0 n d q 0 n
Comparing Equations (24) and (25), the partial derivative of S d with respect to q 0 0 ,   q 0 1 ,   ,   q 0 n , gives
p 0 0 = S ¯ d q 0 0 g ¯ d q 0 0 0 = S ¯ d q 0 i g ¯ d q 0 i ,     i = 1 ,   2 ,   ,   n 1 p 0 n = S ¯ d q 0 n g ¯ d q 0 n
and the partial derivative of S d with respect to λ 0 0 ,   λ 0 1 ,   ,   λ 0 n , gives
0 = g ¯ d λ 0 i ,     i = 0 ,   1 ,   ,   n
As mentioned in Section 3.1, the integrals of action S d will be approximated by numerical integrations. With integral points 0 c 1 < c 2 < < c g 1 < c g 1 and weight b i , i = 1 ,   2 ,   ,   g , Equation (27) gives
g ¯ d λ 0 i = 0 η g T ( k = 0 n N k ( t ) q 0 k ) N i ( t ) d t = j = 1 g b j g T ( k = 0 n N k ( c j η ) q 0 k ) N i ( c j η ) ,     i = 0 ,   1 ,   ,   n
in which N i is the Lagrange polynomial obtained by Equation (19). When the position of the interpolation points of the Lagrange polynomials coincides with the position of the integral points c i , the Lagrange polynomial N i satisfies N i ( c j η ) = 0 for j i and N i ( c j η ) = 1 for j = i . Then, Equation (28) gives
g ¯ d λ 0 i = g ( q 0 i ) ,     i = 1 ,   2 ,   ,   n
In this condition, Equation (29) can be written as the following equation:
D = { g T ( q 0 1 ) ,   g T ( q 0 2 ) ,   ,   g T ( q 0 n ) } T = 0
When the position of the interpolation points of the Lagrange polynomials does not coincide with the position of the integral points, Equation (30) is still used to replace Equation (29) as it can ensure that the holonomic constraints precisely satisfied on the interpolation points. Moreover, Equation (27) includes ( n + 1 ) c equations while Equation (30) includes n c equations, so that c additional equations are required for replacing Equation (27). Here, the velocity constraint at time t = η is used, i.e.,
V = G ( q 0 n ) H p ( q 0 n , p 0 n ) = 0
Therefore, Equation (27) is replaced by Equations (30) and (31), in which Equation (30) precisely satisfies the holonomic constraints at control points and Equation (31) satisfies the velocity constraint at the terminal time of the subintervals. So far, the problem of solving holonomic constrained systems is transformed into solving Equations (26), (30) and (31).
Let
q ¯ = { ( q 0 1 ) T ,   ( q 0 2 ) T ,   ,   ( q 0 n ) T } ,     λ ^ = { ( λ 0 0 ) T ,   ( λ 0 1 ) T ,   ,   ( λ 0 n ) T }
N = { N 0 ,   N 1 ,   ,   N n } ,     N ¯ = { N 1 ,   N 2 ,   ,   N n }
and define the Kronecker product of matrix A R k × l and B R s × t as the matrix A B R k s × l t
A B = [ a 11 B a 1 l B a k 1 B a k l B ]
Then, Equation (26) can be written as
E ( q ¯ , λ ^ , p 0 n ) = 0 η ( N T L q + N ˙ T L q ˙ ) d t 0 η N T [ G T ( q ) λ ] d t + { p 0 0 0 0 p 0 n } = 0
The variables q 0 0 and p 0 0 are known; thus, Equations (30), (31) and (35) include ( n + 1 ) ( d + c ) equations that are dependent on ( n + 1 ) ( d + c ) variables q ¯ , p 0 n and λ ^ . In this paper, the Newton iteration method is used to solve these nonlinear algebraic equations. The Jacobi matrix Ψ of Equation (30), (31) and (35) with respect to variables q ¯ , p 0 n and λ ^ can be given as a block matrix
Ψ = [ Ψ 11 Ψ 12 Ψ 13 Ψ 21 Ψ 22 Ψ 23 Ψ 31 Ψ 32 Ψ 33 ]
in which
Ψ 11 = E q ¯ = 0 η { ( N T N ¯ ) 2 L q q + ( N T N ¯ ˙ ) 2 L q q ˙ + ( N ˙ T N ¯ ) 2 L q ˙ q + ( N ˙ T N ¯ ˙ ) 2 L q ˙ q ˙ } d t 0 η ( N T N ¯ ) G T q ( q ) λ d t
Ψ 12 = E λ ^ = 0 η N T N G T ( q ) d t
Ψ 13 = E p 0 n = [ 0 0 I d ]
Ψ 21 = D q ¯ = diag ( [ G ( q 0 1 ) G ( q 0 2 ) G ( q 0 n ) ] )
Ψ 22 = D λ ^ = 0
Ψ 23 = D p 0 n = 0
Ψ 31 = V q ¯ = [ 0 0 G q ( q 0 n ) H p ( q 0 n , p 0 n ) + G ( q 0 n ) 2 H p q ( q 0 n , p 0 n ) ]
Ψ 32 = V λ ^ = 0
Ψ 33 = V p 0 n = G ( q 0 n ) 2 H p p ( q 0 n , p 0 n )
As mentioned in Section 3.1, the construction of a Galerkin variational integrator in a constrained system depends on three factors: control points, quadrature rules and constraint points. Combined with the construction process given in this section, it is clear that in Equations (30), (31) and (35), the approximation of the generalized coordinates and the Lagrange multipliers depends on the control points, the approximation of the integral depends on the quadrature rules, and the approximation of the holonomic constraint depends on the constraint points. Furthermore, from Equation (30), we can see that the position of the constraint point is actually determined by the control points. Therefore, different algorithms can be constructed by choosing different control points and quadrature rules.
In Section 3.1, we have discussed four Galerkin variational integrators: two for the unconstrained system and two for the constrained system. This shows that the variational integrators for the constrained system do not achieve the expected order. In our research, the variational integrator does not prevent the position of quadrature points from being the same as the position of the control points. This practice not only makes the construction more flexible and general but also makes it possible to determine the effect of quadrature points and control points on the accuracy of the algorithm. Evidently, clarifying the effect of each factor on the accuracy of the algorithm can provide a basis for constructing higher-precision algorithms. To do this, several new Galerkin variational integrators are implemented following the proposed procedure. Two kinds of control points are studied (equidistant control points and Lobatto control points), and two kinds of quadrature rules are studied (Gauss–Legendre quadrature and Lobatto quadrature). Furthermore, the approximate action in Equation (22) is divided into two parts that can be integrated independently. Therefore, we choose different quadrature rules for them to give insight into the quadrature rule. Then, eight algorithms can be constructed by choosing different control points and quadrature rules. The algorithms and their corresponding control points and quadrature rules are listed in Table 2. Based on the comparison and analysis of these algorithms, the influence factors are explored, providing the general notion for building a better algorithm for constrained systems.

4. Numerical Examples and Discussion

4.1. Common Features of the Examples

In this paper, we use dimensionless quantities and the quadruple precision floating-point format for all numerical examples. Since the Hamiltonian is a first integral, the relative error e H of the Hamiltonian can be defined as
e H = H k H 0 H 0
in which H k is the Hamiltonian at time k η , and H 0 is the exact value of the Hamiltonian. The global error e can be given by
e = max ( | e H | )
If the order of an algorithm is s , the numerical error for time step η is C η s , in which C is a constant. Thus, the errors e 1 and e 2 for two different time steps η 1 and η 2 can be given by
e 1 = C η 1 s ,     e 2 = C η 2 s
and the order of the algorithm can be given by
s = [ log ( e 1 ) log ( e 2 ) ] / [ log ( η 1 ) log ( η 2 ) ] .

4.2. Example 1: The Nonlinear Spring Pendulum

Consider a dynamic system that consists of a nonlinear spring, a point particle A with mass m 1 , generalized coordinates ( q 1 , q 2 ) and a pendulum B with mass m 2 , generalized coordinates ( q 3 , q 4 ) and length l (see Figure 1). The point particle A slides without friction along a horizontal plane and point O is the equilibrium position. The Lagrangian and constraints are given by
L = 1 2 m 1 ( q ˙ 1 2 + q ˙ 2 2 ) + 1 2 m 2 ( q ˙ 3 2 + q ˙ 4 2 ) 1 2 q 1 2 1 2 q 1 4 + m 2 g q 4
g ( q ) = { q 2 ( q 3 q 1 ) 2 + ( q 4 q 2 ) 2 1 } = 0
In this paper, m 1 = m 2 = l = g = 1 are used, and the initial conditions are given by
q ( 0 ) = { 0 ,   0 ,   2 / 2 ,   2 / 2 } T ,    q ˙ ( 0 ) = 0
In Section 3.1 and Section 3.2, we stated that the construction of the algorithm depends on three factors: control points, quadrature rules and constraint points. Since the position of the constraint points and control points are the same, the actual factors are the control points and quadrature rules. We have constructed eight algorithms using different control points and quadrature rules. The influences of the control points and quadrature rule on the algorithm are studied by comparing the order and the global error of the algorithms.
To discover the influence of the control points on the algorithms, we divide eight algorithms into four groups. Group A includes ELL and LLL, group B includes EGL and LGL, group C includes ELG and LLG, and group D includes EGG and LGG. The two algorithms in the same group follow the same quadrature rule but different control points, since evidently the different precision between the two algorithms is determined by the type of control points. Figure 2 shows the log-log plot of the global error of the Hamiltonian during time 0 ~ 400 s , where rows (a)–(e) correspond to m = 2 ,   3 ,   ,   6 , respectively. The first column corresponds to group A, the second column corresponds to group B, the third column corresponds to group C, and the fourth column corresponds to group D. When m = 2 or 3, the equidistant points and Lobatto points are located on the same position, which means that the two algorithms in each group are constructed by the same quadrature rule and the same control points. That is, they are identical; thus, the two curves are coincidental in rows (a) and (b). When m > 3 , the equidistant points and Lobatto points are not located on the same position anymore, and the differences of control points can lead to different precisions. By comparing the two algorithms of each group, we found that, for a given m , the algorithm using Lobatto control points always has a higher order than those that use equidistant control points.
The numerically determined order for the eight algorithms is summarized in Table 3. For the algorithms LGG, LGL, LLG and LLL that use Lobatto control points, their orders are s = 2 m 2 . For the algorithms EGG, EGL, ELG and ELL that use equidistant control points, their order satisfies
s = { m ,    m   is   even m + 1 ,    m   is   odd
Therefore, the Lobatto control points should be selected to obtain a higher order. Next, to assess the influence of the quadrature rules on the algorithm, LLL, LGL, LLG and LGG are further studied. Figure 3 shows the global errors of Hamiltonian of LLL, LGL, LLG and LGG for m = 2 ,   3 ,   ,   6 and time step η = 0.1 . Firstly, it shows that the global error of LGG is always better that LLL. This means that, when the control points are given, using the Gauss–Legendre quadrature rule for both the unconstrained term and the constrained term will achieve higher precision than using the Lobatto quadrature rule. Furthermore, the global errors of LLL and LGL are basically the same, as are the global errors of LLG and LGG. This outcome means that only changing the quadrature rule of the unconstrained term has little effect on the precision of the algorithms, and the influence of the quadrature rules on the precision of the algorithm is mainly through the constrained term.
In order to evaluate the computational efficiency, we made a comparison between our method and the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method. When the number of points is m , our method is a system of m d + m c equations, while the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method is a system of 2 m d + ( m 2 ) c equations. As the dimension of generalized coordinates is generally greater than the number of holonomic constraints, i.e., d > c , the number of equations of our method is generally less than the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method. Meanwhile, according to [38], when choosing Lobatto points as control points and the Lobatto quadrature rule for both unconstrained item and constrained item, the associated algorithm LLL has the same precision as the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method. This means that, compared with the constrained Lobatto IIIA–IIIB partitioned Runge–Kutta method, algorithms LLG and LGG have higher precision while taking less computational time.

4.3. Example 2: The Triple Pendulum

In this section, the triple pendulum is taken to reconfirm the conclusions in Section 4.2. The coordinate selection method of the triple pendulum is shown in Figure 4. The Lagrangian and constraints are given by
L = 1 2 m 1 L 2 q ˙ 1 2 + 1 2 m 2 L 2 ( q ˙ 1 2 + q ˙ 2 2 + 2 q ˙ 1 q ˙ 2 cos ( q 1 q 2 ) ) + 1 2 m 3 ( q ˙ 3 2 + q ˙ 4 2 ) + m 1 g L cos q 1 + m 2 g L cos q 1 + m 2 g L cos q 2 + m 3 g q 4
g ( q ) = ( q 3 L ( sin q 1 + sin q 2 ) ) 2 + ( q 4 L ( cos q 1 + cos q 2 ) ) 2 L 2 = 0
In this paper, m 1 = m 2 = m 3 = L = g = 1 is used, and the initial conditions are given by
q ( 0 ) = { 0 ,   0 ,   2 / 2 ,   2 + 2 / 2 } T , q ˙ ( 0 ) = 0
The log-log plot of the global error of the triple pendulum is shown in Figure 5, which shows that algorithms using Lobatto control points have higher orders than those using equidistant control points. The comparison of the global error of Hamiltonian of LLL, LGL, LLG and LGG is given in Figure 6, which shows that LGG has the best precision between the three algorithms. In fact, several other examples are tested and verified, and the results agree well with the nonlinear spring pendulum and the triple pendulum.

4.4. Example 3: Six Balls

In this section, we show the long-time energy behaviors, the conservation of angular momentum and the structure-preserving properties through a numerical example.
Consider a system of six balls [16] with the configuration shown in Figure 7. The natural lengths of the springs and the lengths of the rigid bars are 1. The balls are numbered 1 to 6, and the number i-th ball has mass m i , generalized coordinates ( x i , y i ) and momentum ( p i x , p i y ) . The Lagrangian and constraints are given by
L = 1 2 i = 1 6 ( x ˙ i 2 + y ˙ i 2 ) 1 2 i = 1 4 ( ( x i + 2 x i ) 2 + ( y i + 2 y i ) 2 1 ) 2
g i ( q ) = ( x i + 1 x i ) 2 + ( y i + 1 y i ) 2 1 = 0 ,    i = 1 ,   2 ,   ,   5
In this paper, the following initial condition is used:
q ( 0 ) = { 1 2 2 ,   3 2 2 ,   1 2 ,   3 2 ,   1 ,   0 ,   3 2 ,   3 2 ,   2 ,   0 ,   2 + 2 2 ,   2 2 } T q ˙ ( 0 ) = 0
The symplectic algorithm has good long-time energy behavior. Figure 8 shows the energy error of LGG and LLL for m = 2 ,   3 ,   ,   6 with a long-time duration of 0 400 s . It shows that the energy errors of both algorithms have definite upper and lower bounds and will not increase or decrease even after a long-time simulation.
For the six balls problem, the angular momentum
I ( q , p ) = i = 1 6 ( p i x y i + p i y x i )
is a conserved quantity based on the discrete Noether theorem for the constrained system [4]. Figure 9 shows the error of angular momentum of LGG with η = 1 and m = 2 . It shows that the angular momentum attains numerical accuracy, even when using a large step and a low order.
The variational integrator can inherit the specific properties of the underlying mechanical system. The trajectory of the six balls is shown in Figure 10 as simulated by LGG during the time 300 400 s with m = 2 and time step η = 0.1 , which shows that antisymmetric is an inherent property of this system. For example, considering ball 1 and ball 6, due to their antisymmetric property, their generalized coordinates satisfy
x 1 + x 6 C 1 = 0 ,    y 1 + y 6 C 2 = 0
in which C 1 and C 2 are constant. Figure 11 shows the value of Equation (61) during the time 0 400 s as simulated by LGG. It shows that, even after long-time simulations, the antisymmetric property is still perfectly conserved.

5. Conclusions

New variational integrators for dynamics with holonomic constraints are proposed in this paper based on the Galerkin variational integrators. The augmented Lagrangian is split into two parts, the position of quadrature points used by two parts of the integral are both independent of the position of the control points. Then, eight algorithms are practically constructed using different control points and quadrature rules. Based on these eight algorithms, the influence of control points and quadrature points on the accuracy of the algorithm is discussed in detail using numerical examples. Firstly, the numerical results show that the type of control point will influence the order of the algorithms, i.e., using Lobatto control points will achieve a higher order than using equidistant control points. The order obtained by the Lobatto control points is s = 2 m 2 , and the order of the equidistant control points follows Equation (53). On the other hand, quadrature rules will influence the global error of the algorithms: using Gauss–Legendre quadrature rules will achieve better precision than using Lobatto quadrature rules, and the influence of quadrature rules on the precision of the algorithm is mainly through the constrained term.

Author Contributions

Conceptualization, S.M. and Q.G.; formal analysis, S.M. and Q.G.; investigation, S.M.; methodology, S.M. and Q.G.; writing—original draft, S.M. and Q.G.; writing—review and editing, S.M., Q.G. and W.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China, grant number 11972107 and 91748203, and the Special Fund for Fundamental Scientific Research Business of Central Universities, grant number DUT2019TD37.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Hairer, E.; Nørsett, S.P.; Wanner, G. Solving Ordinary Differential Equations I: Nonstiff Problems; Springer: Berlin, Germany, 1993. [Google Scholar]
  2. Hairer, E.; Wanner, G. Solving Ordinary Differential Equations II: Nonstiff Problems; Springer: Berlin, Germany, 1996. [Google Scholar]
  3. Reich, S. Momentum conserving symplectic integrators. Phys. D Nonlinear Phenom. 1994, 76, 375–383. [Google Scholar] [CrossRef] [Green Version]
  4. Marsden, J.E.; West, M. Discrete mechanics and variational integrators. Acta Numer. 2001, 10, 357–514. [Google Scholar] [CrossRef] [Green Version]
  5. Hairer, E.; Lubich, C.; Wanner, G. Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations; Springer: Berlin/Heidelberg, Germany, 2006. [Google Scholar]
  6. Enyi, C. Sobolev Spaces and Variational Methods Applied to Elliptic PDE’s; LAP Lambert Academic Publishing: Saarbrücken, Germany, 2012. [Google Scholar]
  7. Scapellato, A. New Perspectives in the Theory of Some Function Spaces and their Applications. In Proceedings of the AIP Conference, International Conference of Numerical Analysis and Applied Mathematics (ICNAAM 2018), Rhodes, Greece, 13–18 September 2018; Volume 1978, p. 140002. [Google Scholar] [CrossRef]
  8. Jordan, B.W.; Polak, E. Theory of a Class of Discrete Optimal Control Systems. Int. J. Electron. 1964, 17, 697–711. [Google Scholar] [CrossRef]
  9. Hwang, C.L.; Fan, L.T. A Discrete Version of Pontryagin’s Maximum Principle. Oper. Res. 1967, 15, 139–146. [Google Scholar] [CrossRef]
  10. Cadzow, J.A. Discrete calculus of variations. Int. J. Control 1970, 11, 393–407. [Google Scholar] [CrossRef]
  11. Logan, J.D. First integrals in the discrete variational calculus. Aequ. Math. 1973, 9, 210–220. [Google Scholar] [CrossRef]
  12. Maeda, S. Canonical structure and symmetries for discrete systems. Math. Jpn. 1980, 25, 405–420. [Google Scholar]
  13. Lee, T.D. Difference equations and conservation laws. J. Stat. Phys. 1987, 46, 843–860. [Google Scholar] [CrossRef]
  14. Jean-Paul, R.; Giovanni, C.; Berendsen, H.J.C. Numerical integration of the cartesian equations of motion of a system with constraints: Molecular dynamics of n-alkanes. J. Comput. Phys. 1977, 23, 327–341. [Google Scholar]
  15. Andersen, H.C. Rattle: A velocity version of the shake algorithm for molecular dynamics calculations. J. Comput. Phys. 1983, 52, 24–34. [Google Scholar] [CrossRef] [Green Version]
  16. Leimkuhler, B.J.; Skeel, R.D. Symplectic Numerical Integrators in Constrained Hamiltonian Systems; Academic Press Professional, Inc.: Cambridge, MA, USA, 1994. [Google Scholar]
  17. Skeel, R.D.; Zhang, G.; Schlick, T. A Family of Symplectic Integrators: Stability, Accuracy, and Molecular Dynamics Applications. Siam J. Entific Comput. 1997, 18, 203–222. [Google Scholar] [CrossRef]
  18. Reich, S. Multi-Symplectic Runge–Kutta Collocation Methods for Hamiltonian Wave Equations. J. Comput. Phys. 2000, 157, 473–499. [Google Scholar] [CrossRef] [Green Version]
  19. Blackmore, D.; Prykarpatsky, A.K.; Samoylenko, V.H. Nonlinear Dynamical Systems of Mathematical Physics: Spectral and Symplectic Integrability Analysis; World Scientific: Singapore, 2011. [Google Scholar]
  20. Lew, A.; Marsden, J.; Ortiz, M.; West, M. Variational time integrators. Int. J. Numer. Methods Eng. 2004, 60, 153–212. [Google Scholar] [CrossRef] [Green Version]
  21. Lall, S.; West, M. Discrete variational Hamiltonian mechanics. J. Phys. A Math. Gen. 2006, 39, 5509–5519. [Google Scholar] [CrossRef] [Green Version]
  22. Leok, M. Discrete Hamiltonian variational integrators. Ima J. Numer. Anal. 2011, 31, 1497–1532. [Google Scholar] [CrossRef] [Green Version]
  23. Marsden, J.E.; Patrick, G.W.; Shkoller, S. Multisymplectic geometry, variational integrators, and nonlinear PDEs. Commun. Math. Phys. 1998, 199, 351–395. [Google Scholar] [CrossRef] [Green Version]
  24. Lew, A.; Marsden, J.E.; Ortiz, M.; West, M. Asynchronous Variational Integrators. Arch. Ration. Mech. Anal. 2003, 167, 85–146. [Google Scholar] [CrossRef] [Green Version]
  25. Tyranowski, T.M.; Desbrun, M. R-Adaptive Multisymplectic and Variational Integrators. Mathematics 2019, 7, 642. [Google Scholar] [CrossRef] [Green Version]
  26. Cortés, J.; Martínez, S. Non-holonomic integrators. Nonlinearity 2001, 14, 1365–1392. [Google Scholar] [CrossRef]
  27. De León, M.; De Diego, D.M.; Santamaria-Merino, A. Geometric integrators and nonholonomic mechanics. J. Math. Phys. 2004, 45, 1042–1064. [Google Scholar] [CrossRef] [Green Version]
  28. Fedorov, Y.N.; Zenkov, D.V. Discrete nonholonomic LL systems on Lie groups. Nonlinearity 2005, 18, 2211–2241. [Google Scholar] [CrossRef] [Green Version]
  29. Kane, C.; Marsden, J.E.; Ortiz, M.; West, M. Variational integrators and the Newmark algorithm for conservative and dissipative mechanical systems. Int. J. Numer. Methods Eng. 2000, 49, 1295–1325. [Google Scholar] [CrossRef]
  30. Pekarek, D.; Ames, A.D.; Marsden, J.E. Discrete Mechanics and Optimal Control Applied to the Compass Gait Biped. In Proceedings of the 46th IEEE Conference on Decision & Control, New Orleans, LA, USA, 12–14 December 2007. [Google Scholar]
  31. Campos, C.M.; Ober-Bloebaum, S.; Trelat, E. High order variational integrators in the optimal control of mechanical systems. Discret. Contin. Dyn. Syst. 2015, 35, 4193–4223. [Google Scholar] [CrossRef] [Green Version]
  32. De Leon, M.; Martin De Diego, D.; Santamaria-Merino, A. Discrete variational integrators and optimal control theory. Adv. Comput. Math. 2007, 26, 251–268. [Google Scholar] [CrossRef] [Green Version]
  33. Ruggieri, M.; Valenti, A. Symmetries and reduction techniques for dissipative models. J. Math. Phys. 2009, 50. [Google Scholar] [CrossRef]
  34. Limebeer, D.J.N.; Ober-Blobaum, S.; Farshi, F.H. Variational Integrators for Dissipative Systems. IEEE Trans. Autom. Control 2020, 65, 1381–1396. [Google Scholar] [CrossRef]
  35. Burnett, C.L.; Holm, D.D.; Meier, D.M. Inexact trajectory planning and inverse problems in the Hamilton-Pontryagin framework. Proc. R. Soc. A Math. Phys. Eng. Sci. 2013, 469. [Google Scholar] [CrossRef]
  36. Colombo, L.; Martin de Diego, D. Higher-Order variational problems on lie groups and optimal control applications. J. Geom. Mech. 2014, 6, 451–478. [Google Scholar] [CrossRef]
  37. Crouch, P.; Leite, F.S. The dynamic interpolation problem: On Riemannian manifolds, Lie groups, and symmetric spaces. J. Dyn. Control Syst. 1995, 1, 177–202. [Google Scholar] [CrossRef]
  38. Wenger, T.; Ober-Blobaum, S.; Leyendecker, S. Construction and analysis of higher order variational integrators for dynamical systems with holonomic constraints. Adv. Comput. Math. 2017, 43, 1163–1195. [Google Scholar] [CrossRef]
  39. Hall, J.; Leok, M. Spectral variational integrators. Numer. Math. 2015, 130, 681–740. [Google Scholar] [CrossRef]
  40. Leok, M.; Shingel, T. General techniques for constructing variational integrators. Front. Math. China 2012, 7, 273–303. [Google Scholar] [CrossRef] [Green Version]
  41. Ober-Bloebaum, S.; Saake, N. Construction and analysis of higher order Galerkin variational integrators. Adv. Comput. Math. 2015, 41, 955–986. [Google Scholar] [CrossRef]
Figure 1. Nonlinear spring-pendulum.
Figure 1. Nonlinear spring-pendulum.
Mathematics 08 01358 g001
Figure 2. Nonlinear spring pendulum: Log-log plot of the global error of Hamiltonian during 0 ~ 400 s with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Figure 2. Nonlinear spring pendulum: Log-log plot of the global error of Hamiltonian during 0 ~ 400 s with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Mathematics 08 01358 g002
Figure 3. Nonlinear spring pendulum: Global error of Hamiltonian of LLL, LGL, LLG and LGG with m = 2 ,   3 ,   ,   6 and time step η = 0.1 .
Figure 3. Nonlinear spring pendulum: Global error of Hamiltonian of LLL, LGL, LLG and LGG with m = 2 ,   3 ,   ,   6 and time step η = 0.1 .
Mathematics 08 01358 g003
Figure 4. Triple pendulum.
Figure 4. Triple pendulum.
Mathematics 08 01358 g004
Figure 5. Triple pendulum: Log-log plot of the global error of Hamiltonian during 0 ~ 400 s with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Figure 5. Triple pendulum: Log-log plot of the global error of Hamiltonian during 0 ~ 400 s with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Mathematics 08 01358 g005
Figure 6. Triple pendulum: Global error of Hamiltonian of LLL, LGL, LLG and LGG with m = 2 ,   3 ,   ,   6 and time step η = 0.1 .
Figure 6. Triple pendulum: Global error of Hamiltonian of LLL, LGL, LLG and LGG with m = 2 ,   3 ,   ,   6 and time step η = 0.1 .
Mathematics 08 01358 g006
Figure 7. Six balls.
Figure 7. Six balls.
Mathematics 08 01358 g007
Figure 8. Six balls: Energy error of LGG and LLL with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Figure 8. Six balls: Energy error of LGG and LLL with (ae) corresponding to m = 2 ,   3 ,   ,   6 , respectively.
Mathematics 08 01358 g008
Figure 9. Six balls: Angular momentum error of LGG with time step η = 1 and m = 2 .
Figure 9. Six balls: Angular momentum error of LGG with time step η = 1 and m = 2 .
Mathematics 08 01358 g009
Figure 10. The trajectory of the six balls of the LGG algorithm during the time 300 400 s with m = 2 and η = 0.1 .
Figure 10. The trajectory of the six balls of the LGG algorithm during the time 300 400 s with m = 2 and η = 0.1 .
Mathematics 08 01358 g010
Figure 11. Six balls: Antisymmetric property of the generalized coordinates
Figure 11. Six balls: Antisymmetric property of the generalized coordinates
Mathematics 08 01358 g011
Table 1. Numerical convergence order of the algorithm using the m points Gauss–Legendre quadrature rule and m equidistant control points in constrained system.
Table 1. Numerical convergence order of the algorithm using the m points Gauss–Legendre quadrature rule and m equidistant control points in constrained system.
m 23456789
s 244668810
Table 2. Eight algorithms and their corresponding control points and quadrature rules.
Table 2. Eight algorithms and their corresponding control points and quadrature rules.
Control PointQuadrature Rule for Unconstrained ItemQuadrature Rule for Constrained Item
ELLEquidistant pointLobatto quadrature ruleLobatto quadrature rule
EGLEquidistant pointGauss–Legendre quadrature ruleLobatto quadrature rule
ELGEquidistant pointLobatto quadrature ruleGauss–Legendre quadrature rule
EGGEquidistant pointGauss–Legendre quadrature ruleGauss–Legendre quadrature rule
LLLLobatto pointLobatto quadrature ruleLobatto quadrature rule
LGLLobatto pointGauss–Legendre quadrature ruleLobatto quadrature rule
LLGLobatto pointLobatto quadrature ruleGauss–Legendre quadrature rule
LGGLobatto pointGauss–Legendre quadrature ruleGauss–Legendre quadrature rule
Table 3. Numerical convergence order of the eight algorithms.
Table 3. Numerical convergence order of the eight algorithms.
m 23456789
s (EGG, EGL, ELG, ELL)244668810
s (LGG, LGL, LLG, LLL)246810121416

Share and Cite

MDPI and ACS Style

Man, S.; Gao, Q.; Zhong, W. Variational Integrators in Holonomic Mechanics. Mathematics 2020, 8, 1358. https://0-doi-org.brum.beds.ac.uk/10.3390/math8081358

AMA Style

Man S, Gao Q, Zhong W. Variational Integrators in Holonomic Mechanics. Mathematics. 2020; 8(8):1358. https://0-doi-org.brum.beds.ac.uk/10.3390/math8081358

Chicago/Turabian Style

Man, Shumin, Qiang Gao, and Wanxie Zhong. 2020. "Variational Integrators in Holonomic Mechanics" Mathematics 8, no. 8: 1358. https://0-doi-org.brum.beds.ac.uk/10.3390/math8081358

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop