Full text
1. Introduction
Dynamic simulation of multi-body system has become one of the important contents of Engineering simulation, and has been widely used in mechanical, aerospace, vehicle, robotics and biomechanics fields. The dynamics of multi-body systems is usually described as differential-algebraic equations, and the study of numerical integration method is an important part of the computational dynamics of multi-body systems. The traditional methods for solving differential-algebraic equations in this field are extended from the numerical solution of ordinary differential equations. The focus of the study is to achieve the stability of differential-algebraic equations by constrained stability [1,2]. In recent years, some methods developed gradually, such as generalized-alpha method [3], symplectic algorithm [4], energy method [5,6], symplectic preserved variable fraction integral method [7], Lie group method [8], have achieved good simulation results.
Particle swarm optimization (PSO) is a group-based stochastic optimization technique proposed by Eberhart and Kennedy in 1995 [9]. Subsequently, Kennedy and Eberhart proposed a particle swarm optimization algorithm for discrete space [10]. Clerc proposed a particle swarm algorithm with contraction factor [11,12].
The idea of this method is to simulate the social behavior of flocks and fish schools. A particle swarm is randomly generated, where each particle represents a possible solution to an optimization problem, and the position of each particle is evaluated by the objective function. The particle finds the optimal solution through the process of iterative process. Compared with other optimization algorithms, particle swarm optimization algorithm has the advantages of simple algorithm, fast convergence, high optimization efficiency and strong robustness. At present, it has achieved very good results in various multidimensional continuous space optimization problems. Production scheduling, robotic intelligent control and image processing have been widely used.
In this paper, the Lagrange interpolation method is combined with the Gauss numerical integration method to transform the differential-algebraic equation problem into an optimization problem, and then the particle swarm optimization algorithm is designed for the optimization problem. Finally, the simulation experiment of the planar two-link manipulator shows that the algorithm has high precision while maintaining the constraint.
2. DAEs of Multibody system Dynamics
The DAEs of index-3 in multibody systems dynamics can be described as follows: {π(π, π‘)πΜ + Ξ¦π ππ = πΉ(πΜ , π, π‘) Ξ¦(π, π‘) = 0 #(1) where πππ π is the generalized coordinate, πΜ ππ π is the generalized velocity, π is the Lagrange multiplier, Ξ¦ is the constraint equation of the generalized coordinate π,Ξ¦π is the Jacobian matrix of the constraint equation.
The constraint equation Ξ¦(π, π‘) = 0 is used to find the second-order derivative. Equation (1) can be reduced from 3 to index 1, and the equation form is as follows: [ π Ξ¦π π Ξ¦π 0 ] [πΜ π] = [ πΉ β(Ξ¦ππΜ )ππΜ ] #(2) The simulation time [0οΌ ] is equally divided into several cells ,π‘ , π‘ - , π = 0,1, , π . In the time interval ,π‘ , π‘ - ,use Lagrangian interpolation to approximate π(π‘): π(π‘) = β ππ(π‘)ππ π π=0 #(3) ππ(π‘) = β (π‘ β π‘ ) (π‘π β π‘ ) π =0, β π #(4) Then
πΜ (π‘) = β ππΜ (π‘)ππ π π=0 #(5) πΜ (π‘) = β ππΜ (π‘)ππ π π=0 #(6) Interpolation node π satisfies the constraint Ξ¦(π, π‘) = 0. The interpolation functions π(π‘), πΜ (π‘), πΜ (π‘) are brought into the index 1 differential-algebraic equation to obtain the equation (7): π(π‘) = [πΜ (π‘) π ] β [ π Ξ¦π π Ξ¦π 0 ] β [ πΉ(πΜ (π‘), π(π‘), π‘) β(Ξ¦ππΜ )ππΜ ] #(7) βπ‘ β ,π‘ , π‘ - If π(π‘) = 0 for βπ‘ β ,π‘ , π‘ - , the interpolation function π(π‘) is the exact solution of equation (1) in ,π‘ , π‘ - . Obviously, the equation (7) is a nonlinear equation, and the analytical solution cannot be normally found. This means that when equation (7) is close to zero, π(π‘) is the solution of equation (7) in ,π‘ , π‘ -.Can be converted into the following optimization problems:
ππ β« πππππ₯ π π #(8) The Gauss numerical integration of the above formula can be transformed into the following form:
ππ β ππ(π‘ )π(π‘ )
= #(9) where is the Gauss integral coefficient, and π‘ is the Gauss integral node. Obviously, equation (9) is a non-convex optimization problem [13]. The existing research shows that the traditional mathematical optimization method is difficult to solve such problems effectively. The intelligent optimization algorithm is an effective algorithm for solving such problems. Particle swarm optimization is an intelligent algorithm that mimics population motion and provides new theories and methods for solving engineering problems.
3. Design of particle swarm optimization algorithm
The traditional particle swarm optimization algorithm consists of a particle swarm system with π particles X = *π , π2, π3, , ππ+ , π β π π· . The position and velocity of the π particle at time π : π (π) = (π (π), π 2(π), , π π·(π)) and π (π) = (π (π), π 2(π), , π π·(π)) οΌ (π = 1,2,3, , π) . The historical optimal position of a certain particle π is ππππ π‘ . The overall optimal position of the particle swarm system X is gbest . During the iteration, the particle position and velocity update formula is as follows: π π = ππ π + π π (ππππ π‘π β π π ) +π2π2(gπππ π‘π β π π ) π π = π π + π π#(10) where Ο is the inertia weight; π and π2 are the acceleration coefficients; π and π2 are random numbers uniformly distributed between (0, 1).
The particle swarm optimization algorithm is used to solve the interpolation function π(π‘) of the interval ,π‘ , π‘ -. The initial point π0 = π(π‘ ) β π π is known, and the interpolation node ππ, π = 1,2 π Is the node to be optimized, and ππ satisfies the constraint Ξ¦(π, π‘) = 0.
Define the objective function as follows: (ππ) = β ππ(π‘ )π(π‘ )
= #(11) If (ππ) = 0, then ππ, π = 1,2 π is the exact value. Since the objective function is a nonlinear function, there is generally no analytical solution, so (ππ) can only be as close as possible to the exact solution, and the convergence precision ππ π and the maximum iteration step ππππ₯ are set. If the convergence precision is reached or the maximum iteration step is reached, then output the optimization result.
The solution steps of the particle swarm algorithm are as follows: 1) Set the initial parameters of the particle swarm algorithm: population size, particle dimension d, range of particle position, maximum number of iterations, and randomly generate the initial population, defining the objective function . 2) Calculate the fitness value of each particle according to the set objective function. 3) Compare the fitness of each particle, determine the historical optimal position of each particle and the historical optimal position of the population. 4) Update all particles according to formula (10). 5) If (gbest) < ππ π or reaches the maximum iteration step ππππ₯, the optimal solution gbest is output, otherwise steps 2)-step 5) are repeated until the preset termination condition is satisfied.
4. Numerical Example
The slider-double link system is taken as an example to verify and analyze the above method. As shown in Figure 1, the length of the link are πΏ and πΏ2 and the masses are π and π2. The corners are denoted by π and π2. Suppose the system is only affected by gravity.
Figure 1.Three-degree-of-freedom robotic arm.
Taking the state variable π = (π₯ , π¦ , π , π₯2, π¦2, π2) , the system dynamics index 3 differential-algebraic equation is: [ π Ξ¦π π Ξ¦π 0 ] [πΜ π] = [ πΉ β(Ξ¦ππΜ )ππΜ ] #(11) where π = d ag(π , π , π½ , π2, π2, π½2) is a generalized mass matrix, πΉ = (0, βπ π, 0,0, βπ2π, 0) is a generalized force vector, π½ =
2 π πΏ 2 and π½2 =
2 π2πΏ2 2 are the moments of inertia of the connecting rod. Ξ¦π = (
1 0 πΏ 2 s π 0 0 0 0 1 β πΏ 2 cos π 0 0 0 β1 0 πΏ 2 s π 1 0 πΏ2 2 s π2 0 β1 β πΏ 2 cos π 0 1 β πΏ2 2 cos π2)
#(12) (Ξ¦ππΜ )π = (
0 0 πΏ 2 cos π π Μ 0 0 0 0 0 πΏ 2 s π π Μ 0 0 0 0 0 πΏ 2 cos π π Μ 0 0 πΏ2 2 cos π2 π2Μ 0 0 πΏ 2 s π π Μ 0 0 πΏ2 2 s π2 π2Μ )
#(13) Approximate π(π‘) with three-point Lagrange interpolation: π(π‘) = (π‘ β π‘ )(π‘ β π‘2) (π‘0 β π‘ )(π‘0 β π‘2) π0 + (π‘ β π‘0)(π‘ β π‘2) (π‘ β π‘0)(π‘ β π‘2) π + (π‘ β π‘ )(π‘ β π‘0) (π‘2 β π‘ )(π‘2 β π‘0) π2 πΜ (π‘) = (π‘ β π‘ ) + (π‘ β π‘2) (π‘0 β π‘ )(π‘0 β π‘2) π0 + (π‘ β π‘0) + (π‘ β π‘2) (π‘ β π‘0)(π‘ β π‘2) π + (π‘ β π‘ ) + (π‘ β π‘0) (π‘2 β π‘ )(π‘2 β π‘0) π2 πΜ (π‘) = 2 (π‘0 β π‘ )(π‘0 β π‘2) π0 + 2 (π‘ β π‘0)(π‘ β π‘2) π + 2 (π‘2 β π‘ )(π‘2 β π‘0) π2 From the initial value π(π‘0) = π0, πΜ (π‘0) = πΜ0: π = (ππΜ0 + 3π0 + π2 4 ) οΌπ = π‘ β π‘ #(14) The interpolation node π , π = 0,1,2 satisfies the constraint Ξ¦(π, π‘) = 0: π = (
πΏ 2 cos π πΏ 2 s π π πΏ cos π + πΏ2 2 cos π2 πΏ s π + πΏ2 2 s π2 π2 )
#(15) Two-point Gauss numerical integration method is used to solve the objective function.
π2 (β ππ(π‘ )π(π‘ ) = ) #(16) {
= 2 = 2 π‘ = ββ3 3 β π 2 + π‘ + π‘ 2 π‘2 = β3 3 β π 2 + π‘ + π‘ 2
Take the mass of the connecting rod π = 1ππ, π2 = 2ππ, the length of the rod πΏ = 1π, πΏ2 = β3π, the acceleration of gravity π = 9.81, the step length = 0.002s. Initial state of the connecting rod: π = π 3 , π2 = β π 6 , generalized speed πΜ = 0. Particle swarm algorithm parameter setting [14]: population size π = 120οΌπ = π2 = 2οΌΟ = 0.1, convergence precision ππ π = 10β 5 , maximum iteration step ππππ₯ =500. The simulation results are shown in the figure:
Figure 2.The trajectory of the end of connecting rod.
Figure 3.Total System Energy.
Figure 4.System Kinetic Energy and Potential Energy.
Figure 5.Planar manipulator restraint.
As shown in Figure 3 and Figure 4, the maximum error of the total energy of the system is ax0< <π|π»(π‘ ) β π»(π‘0)| = 2.2838354400690 Γ 10β2. The average error of the total energy of the system is 2.727479433485 Γ 10β3, Kinetic energy and potential energy change stable. It can be seen from Figure 5 that the system guarantees displacement constraints, and the speed and acceleration constraints are large.
5. Conclusion
In this paper, the particle swarm optimization algorithm is used to solve the multi-body system dynamics differential-algebraic equations, and the planar two-link manipulator system is simulated. The experimental results show that the energy error of the system is small when the constraint of index 1 is satisfied. The particle swarm algorithm has few parameters and is simple and does not need the derivative information of the objective function. It has achieved good results for solving the differential-algebraic equations of multi-body systems, and illustrates the feasibility of applying the intelligent optimization algorithm to multi-body dynamics simulation. However, this method has the disadvantages of large computational complexity and long running time of the algorithm. In the future, it is a major research direction in effectively reducing the running time and improving the accuracy of the algorithm.
Acknowledgments
The financial support was provided by the National Natural Science Foundation of China(NNSFC) through grant Nos 11772166οΌ11472143.
Figures




