Abstract
The continuous and discrete Euler-Lagrangian equations with holonomic constraints are presented based on continuous and discrete Hamiltonian Principle. Using Lagrangian polynomial to interpolate state variables and Gauss quadrature formula to approximate Hamiltonian action integral, the higher order variational Galerkin integrators for multibody system dynamics with constraints and the computation procedure are given. Numerical examples are provided to show the long-time behavior of the methods proposed in this paper via comparisons with traditional Runge-Kutta methods.
1. Introduction
Dynamics of multibody systems [1] are usually described by a set of differential-algebraic equations (DAEs) [2, 3], which are solved traditionally using numerical methods of ordinary differential equations (ODEs) and combining some constraint stabilization techniques. In the community of numerical analysis, numerical methods for ODEs are always designed in a small area with local stability analysis, which lead to a lot of difficulties for long-time simulation. Geometric numerical integration methods [3] originated from long-term simulation of molecular dynamics and planet dynamics in solar system with global numerical stability due to the property of structure-preserving provide alternatives to overcome these problems. These numerical methods are referred to as the ones preserving the invariants in their corresponding continuous systems, such as preserving symplectic, energy, momentum, symmetry, and orthogonality, in the original systems, thus revolutionizing the traditional concepts of numerical stability. It has been widely accepted that the more invariants conserved in a numerical method, the more stable it is.
Symplectic algorithms [4] and energy conservation methods [5] are two frequently used methods for numerical integration of constrained Hamiltonian systems, but they are designed for conservative systems and it is difficult to design an algorithm that is symplectic and energy preserving at the same time [6]. The variational integrators [7, 8] based on discrete variational principle [9] provides an excellent framework for design of geometric numerical integrators with many merits: it preserves momentum naturally with good behavior of approximate energy conservation, even preserves strictly symplectic-momentum-energy [10]; it can be easily extended to a large class of problems [11, 12], such as the construction of geometric structure-preserving numerical integrators for PDEs [13], nonsmooth collisions [14, 15], stochastic systems [16, 17], nonholonomic systems [18, 19], and constrained systems [20], dissipative systems [21], optimal control [22, 23], parameter optimization [24]; it can generate easily a large class of higher order methods based on polynomial interpolation and numerical quadrature formulas systematically [25–29] and some Lie group variational integrators [30–32] combining Lie group methods [33].
For the general conservative systems without constraints, [25, 26] propose the same framework of design higher order variational Galerkin integrators using numerical interpolation and quadrature techniques for state variables and action integral, respectively, during one integration step based on discrete variational principle. Motivated by these works, we will investigate higher order variational Galerkin integrators for multibody system dynamics with constraints for the long-term simulation purpose. Due to the space limit, we will focus on the cases with holonomic constraints, but the results can be easily extended to the cases with nonholonomic constraints and the cases with nonconservative forces.
The paper is organized as follows. In Section 2, the continuous and discrete Euler-Lagrangian equations with holonomic constraints are presented based on continuous and discrete Hamiltonian Principle, respectively; in Section 3, we derive the higher order variational Galerkin integrators for multibody system dynamics with constraints using Lagrangian polynomial to interpolate state variables and using Gauss quadrature formula to approximate Hamiltonian action integral; the computation procedure is given in Section 4; numerical examples are provided in Section 5 to show the long-time behavior of the methods proposed in this paper via comparisons with traditional methods. The last one is concluding remarks including summary and future works.
2. Discrete Euler-Lagrangian Equations with Constraints
The Hamilton Principle of a multibody system with holonomic constraints and conservative forces can be stated as
where S is Hamilton action integral, L is Lagrangian,
Via variational method, the following Euler-Lagrange equations of a constrained mechanical system can be got:
It is a typical differential-algebraic equation which can be solved using different traditional numerical methods of DAEs [2, 3].
Following the variational integrators based on discrete variational principle, the time interval t∈[0,t
f
] is divided into N subintervals with time step h = t
f
/N equally along with N + 1 grids, 0 = t0,t1,t2,…, tN–1, t
N
= t
f
, t
i
= ih, i = 0,1,2,…, N. The discrete generalized displacement and velocity and Lagrangian multiplier can be denoted as
where L
d
(
Using standard variational method, the discrete Euler-Lagrangian (DEL) equations are derived as
where D j L d (j = 1, 2) is the partial derivative of L d with respect to the jth variable.
3. Higher Order Variational Galerkin Integrators of Multibody Systems with Constraints
The key technique to improve the accuracy of variational integrators is the approximation of the discrete Hamiltonian action integral, which can be realized through general Galerkin methods [24, 25]. Using the same methods in this section, Hamiltonian action integral is approximated in a subinterval
Given s + 1 control points 0 = τ0<τ1<⋯<τ s = 1, for k = 0, 1,…, s, Lagrange interpolation polynomial l k (τ):[0, 1]→R is defined as
The state variables
where
where
Lagrange interpolation polynomials in (9) and comparable derivatives with respect to τ in (10) are listed in Table 1.
Lagrange interpolation polynomials and comparable derivatives with respect to τ.
Using Gauss quadrature formula, which has maximal degree of accuracy 2n–1 for a fixed number n of quadrature points, we have
where A
r
is the weights and
Quadrature points and weights of the Gauss quadrature formula with respect to the interval [−1, 1].
Apply discrete Hamilton's principle, the derivatives of the action with respect to
4. Computation Procedure
The following computation procedure can be used to get the solution of the discrete Euler-Lagrange equations (13).
Step 1. Given the order of Lagrange interpolation polynomial s, the number of Gauss quadrature points n, fixed time step h, initial state variables
Step 2. Get
Step 3. For i = 2 to N–1, solve (13) by Newton iteration method to get
Step 4. Use the solution
5. Numerical Example
Consider a simple double pendulum system shown in Figure 1 the state variables are chosen as
The mass matrix is a constant matrix as follows:
The constraint equations are

Double pendulum.
Given m1 = m2 = 1 kg, l1 = l2 = 1 m, with time step h = 0.01's, the results of the method presented in this paper are compared with the Runge-Kutta method in Table 3 for the terminal time 100's. Here, P1L-Q2G means that the order of Lagrange interpolation polynomial is 1 and the number of Gauss quadrature points is 2, and the same as P2L-Q2G and P2L-Q3G. ε(Η), ε(
Comparison of the methods mentioned with time step h = 0.01.
Using the traditional method such as Runge-Kutta method, to keep the errors of the total energy H and constraints
It is also shown in Tables 3 and 4 that when the order of Lagrange interpolation polynomial is higher, the total energy and constraints can be kept better, but there are no big differences between 2 or 3 points in Gauss quadrature formula.
Comparison of the methods mentioned with time step h = 0.001.
Figure 2 shows the energies of the previously mentioned methods. With the time step h = 0.01's, the total energy is up and down around zero with little errors during the long-time simulation by the methods presented in this paper, while increases quickly during the simulation by Runge-Kutta method. The results of high order variational Galerkin integrators are better than low order integrators.

Total energy of double pendulum by different method, h = 0.01.
In the case of nonconstant mass matrix, the methods of higher order variational Galerkin integrators are also applicable. For another example, Figure 3 shows a rotary rod slider system. OA is a rigid rod with uniform mass m A and length l, which rotates round O in the plane OXY. B is a slider with the mass m B , and the stiffness of the spring on it is k; the mass of the spring is ignored. Suppose only gravity in the plane OXY is considered for the system.

A rotary rod slider system.
The state variables are chosen as
The constraint equations are
Given l1 = 2m, m
A
= 2 kg, m
B
= 5 kg, k = 1000 N/m. With the initial step length h = 0.01's and the terminal time 100's, using the method P1L-Q2G, where the order of Lagrange interpolation polynomial is 1 and the number of Gauss quadrature points is 2, the results are also satisfying. The total computer time is 86.0034's; the maximum errors of the total energy H and constraints

Energies of rotary rod slider system by method P1L-Q2G, h = 0.01.

Constraints of rotary rod slider system by method P1L-Q2G, h = 0.01.
6. Conclusions
Based on Lagrange interpolation and Gauss quadrature, higher order variational Galerkin integrators have been developed for multibody systems with constraints. Numerical results validate the accuracy of the method for longer time step and long-time simulation. Nevertheless, as the computation is more complex, the computation cost is higher. Further study is needed to have more efficient integrators.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Footnotes
Acknowledgments
This research was supported by the National Natural Science Foundation of China (Grants nos. 11272166, 11002075, 10972110).
