Multi-body system dynamics simulation method and system based on Lie group description rotation and storage medium
Through the Lie group description of rotation and the generalized α integrator, the rotation singularity and rotational speed saturation problems in multi-body system dynamics simulation are solved, continuous integration and efficient calculation are achieved, and it is suitable for large-scale simulation.
Patent Information
- Application Number
- CN202410723217.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-05
AI Technical Summary
In multi-body system dynamics simulation, existing technology cannot effectively avoid rotation singularity and rotational speed saturation problems of Euler quaternions, resulting in low computational efficiency, especially in large-scale simulations and high-speed rotation scenarios.
Lie groups are used to describe rotations. Through the local rotation frame and generalized α integrator, the calculation of the rotation matrix is converted into operations near the unit matrix to avoid numerical singular points. Local rotation vectors are introduced in the integrator to achieve continuous integration and efficient calculation. .
The rotation method described by Lie groups avoids the singularity of the three parameters of rotation and the additional constraint equation of Euler quaternion, overcomes the problem of rotational speed saturation, and improves the adaptability and simulation efficiency of large-scale calculations.
Smart Images

Figure CN118734545A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-body system dynamics simulation, and in particular to a multi-body system dynamics simulation method, system and storage medium based on Lie group description of rotation. Background Art
[0002] In order to solve the system of differential algebraic equations, a suitable numerical integration algorithm is needed. General numerical integrators need to meet basic conditions such as accuracy, efficiency and robustness. Depending on whether the calculation process requires iteration, integrators can be divided into implicit and explicit types. In multi-body system dynamics simulation, the mainstream general integrator is generally an implicit format. The most widely used in practice are the integrator family of the generalized α method and the integrator family of the backward difference formula.
[0003] The above integrator can solve the dynamic equations that use quaternions to describe rotation. The quaternion method can solve most multi-body dynamics simulation problems. The advantage is that it avoids rotation singularities. The disadvantage is that it introduces additional constraint equations in the calculation, which increases the number of equations to be solved. Studies have shown that global parameters with three components, such as Euler angles and rotation vectors, will cause rotation singularities. In order to solve this type of singularity problem, special strategies need to be adopted. For example, for Euler angles, they can be reparameterized by switching variables to avoid singularities; this is also the strategy adopted by the commercial software ADAMS. In addition, the Hilber-Hughes-Taylor method and the Newmark method based on local rotation vectors can also be used, in which the local rotation vector represents the increment of each step, that is, the rotation parameters of each time step are used to describe the rotation of the current rotation frame relative to the rotation frame of the previous time step.
[0004] All three-parameter methods of describing rotation have singular configurations, which are likely to cause problems in large-scale multi-body system dynamics simulations, especially finite element flexible bodies. Although two sets of parameters can be replaced with each other to avoid singularities, this approach is not perfect and is not suitable for high-performance computing.
[0005] The quaternion itself will add a set of constraint equations to the dynamic equations; on the other hand, if the quaternion description method is used, saturation problems will occur in high-speed rotation problems. For example, Figure 1 As shown in the figure, a constant space torque acts on the rigid body ball. In theory, the angular velocity of the rigid body rotation should increase linearly. However, the actual calculation results show a strange angular velocity saturation phenomenon, such as Figure 2As shown. The simulation found that when using the Lagrange equation derived from quaternions for calculation, no matter how the integrator is selected or how the error control is selected, the angular velocity will always reach saturation at a certain moment. This saturation phenomenon can be solved by using the Euler equation, but due to limitations, its integration time step is generally very small, and the simulation calculation efficiency is not high. Summary of the invention
[0006] The present invention provides a multi-body system dynamics simulation method based on Lie group description of rotation, comprising the following steps:
[0007] Step 1: Input parameters into the integrator, including the output number n, the initial time step h, the initial time t(1), and the initial value, including the initial value of the displacement q n , the initial value of speed Initial value of acceleration Initial value λ of the Lagrange multiplier n , and the acceleration auxiliary variable a n The initial value of
[0008] Step 2: Estimate the displacement estimate for the next time step Speed Estimation Acceleration estimate and Lagrange multiplier estimates and acceleration auxiliary variable estimation
[0009] Step 3: Solve the Jacobian matrix jacobi(n+1) and the residual residual(n+1);
[0010] Step 4: Newton iteration, correct the estimated value, and solve the tolerance value to1;
[0011] Step 5: Determine whether the result converges. If so, execute step 6, otherwise return to step 3;
[0012] Step 6: Solve the error value err;
[0013] Step 7: Determine whether the step size meets the acceptance criteria. If so, proceed to step 8. Otherwise, update the step size and return to step 2.
[0014] Step 8: Output the displacement q of the next time step n+1 ,speed Acceleration a n+1 and the Lagrange multiplier λ n+1 ;
[0015] Step 9: Determine whether time t is the last step, if so, then end, otherwise go to step 10;
[0016] Step 10: n=n+1, update the step size, and then return to step 2.
[0017] As a further improvement of the present invention, in step 3, the Jacobian matrix is where η, β, and γ are the integral parameters of the generalized-α integral, M is the mass matrix of the kinetic equation, and F q and are the partial derivatives of the generalized force with respect to displacement and velocity, respectively.
[0018] The present invention also provides a multi-body system dynamics simulation system based on Lie group description of rotation, comprising: a memory, a processor and a computer program stored on the memory, wherein the computer program is configured to implement the steps of the multi-body system dynamics simulation method of the present invention when called by the processor.
[0019] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the multi-body system dynamics simulation method described in the present invention when called by a processor.
[0020] The beneficial effects of the present invention are: the rotation described by the Lie group avoids the singularity of the rotation three parameters, making the integration process continuous and without the need for frequent restarts; avoiding the additional constraint equations of the Euler quaternion, while overcoming the speed saturation problem of the Euler quaternion; and being more suitable for large-scale calculations than the rotation three parameters and the Euler quaternion. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a schematic diagram of a rotating rigid body;
[0022] Figure 2 It is a schematic diagram of the rotational saturation phenomenon;
[0023] Figure 3 It is a flow chart of Lie group generalized-α integral method;
[0024] Figure 4 This is the flowchart of the Lie group backward difference algorithm. DETAILED DESCRIPTION
[0025] The present invention utilizes the Lie group characteristics of rotational motion to convert the relevant calculations of the rotation matrix into operations near the unit matrix, thereby avoiding the phenomenon of numerical singular points.
[0026] In the dynamics of multibody systems, the choice of rotation parameters directly affects the design of the integrator algorithm. In engineering practice, the most widely used rotation parameters are Euler angles, rotation vectors, and quaternions. In order to avoid singularities without introducing redundant constraints in dynamic simulation, a feasible solution is to use the Lie group method to describe the rotation. Unlike integrators based on global rotation parameters such as quaternions or Euler angles, Lie group integrators use a local rotation frame.
[0027] Now consider a matrix R that satisfies
[0028] R(t)=A T (t n )A(t)
[0029] It is easy to see that R∈SO(3), that is, R is on the Lie group manifold SO(3) composed of the set of rotation matrices. The matrix A can be parameterized using the local rotation vector θ as
[0030]
[0031] where θ is the local rotation vector and is the antisymmetric matrix of the local rotation vector, such as
[0032]
[0033] It can be deduced from the above formula that the obtained rotation matrix meets the orthogonality requirement. This method can not only ensure the orthogonality of the rotation matrix at each step, but also avoid the singularity of the rotation without introducing redundant constraints.
[0034] By using the Lie group characteristics of rotational motion, the calculations related to the rotation matrix are converted into operations near the unit matrix, thus avoiding the numerical singular point phenomenon. This idea can be directly used in the implementation of generalized α integrator and BDF integrator.
[0035] Lie Group Generalized α-Integral Method
[0036] For the Lie group generalized α integrator, assuming that at time t n The rotation matrix is A n , the angular velocity is ω n , the angular acceleration is The auxiliary angular acceleration is a n ; Assuming that the estimated time step h of the next step is known, the following solution is t n+1 =t n +h state variables. Assume a n+1 The predicted value is The correction amount is Then by the Lie group generalized α format:
[0037]
[0038]
[0039]
[0040]
[0041] where θ n+1 represents the rotation vector in the local coordinates at time n+1, is θ n+1 The estimated value of n+1 is the body angular velocity at time n+1, Yes n+1 The estimated value of is the body angular velocity at time n+1, yes A n+1 is the direction cosine matrix at time n+1. β, γ, and η are the generalized α integrator parameters.
[0042] The above predictions are:
[0043]
[0044]
[0045]
[0046] where α m and α f is the generalized α integrator parameter.
[0047] Substituting the above formula for the next time step calculation into the dynamics equations to solve the dynamics equations is the Lie group generalized α-integral format. In the Lie group generalized α-integral, there is no requirement that the norm of θ must not be greater than 2π, which means that the rotation angle in a single time step may be greater than one circle. In this case, the simulation efficiency of the high-speed system will be greatly improved.
[0048] Lie Group Integrator Backward Difference Method
[0049] In the Lie group integrator backward difference method, the time t n is the reference node, in addition to requiring the rotation vector θ at time n n =0, other time nodes t need to be calculated n+1 (j=1,2,3,…,k+1) relative to t n The local rotation variable θ at the nj moment n-j . Given the rotation matrix A n-j The size of A n-j satisfy
[0050]
[0051] The definition is shown in formula (1.1), from which θ can be calculated n-j .
[0052] Record the time step vector from 1 to k+1 steps
[0053]
[0054] in, Assume that the rotation vector is n is the rotation vector variable θ(t) on a uniform grid t n ,t n -h,t n -2h,…,t n -kh value is obtained by iterating the following formula
[0055] ▽ j+1 θ n =▽ j θ n -▽ j θ n-1
[0056] =▽ j-1 θ n -2▽ j-1 θ n-1 +▽ j-1 θ n-2
[0057] =…
[0058] Assume that x n+1 , x n is any variable at time n+1 and time n, the post-difference operator The definition is as follows
[0059]
[0060] Therefore, the difference matrix Can be expressed as
[0061]
[0062] The expression of the difference matrix can be derived
[0063]
[0064] in is the coefficient matrix of the difference matrix.
[0065] The local rotation vector and its first-order derivative with respect to time can be written as
[0066]
[0067] Among them, their corresponding estimated values are
[0068]
[0069] Calculate θ n+1 ,Can Calculate the rotation matrix.
[0070] The invention discloses a multi-body system dynamics simulation method based on Lie group description of rotation, while the translational motion variables are still described by Cartesian coordinates, which is no different from a general integrator.
[0071] like Figure 3 As shown, the generalized-α integral method for multi-body dynamics based on Lie group description of rotation includes the following steps:
[0072] Step 1: Input parameters into the integrator, including the number of outputs n, the initial step length h (the initial step length h is the initial time step length h, which will change as the calculation proceeds), and the initial time t n , and initial values, including the initial value of the displacement q n , the initial value of speed Initial value of acceleration Initial value λ of the Lagrange multiplier n , and the acceleration auxiliary variable a n The initial value of .
[0073] Step 2: Estimate the displacement estimate for the next time step Speed Estimation Acceleration estimate and Lagrange multiplier estimates and acceleration auxiliary variable estimation
[0074] Step 3: Solve the Jacobian matrix jacobi(n+1) and the residual residual(n+1). The Jacobian matrix is where η, β, and γ are the integral parameters of the generalized-α integral, M is the mass matrix of the kinetic equation, and F q and are the partial derivatives of the generalized force with respect to displacement and velocity, respectively.
[0075] Step 4: Newton iteration, correct the estimated value, solve the tolerance value to1, and use Newton iteration to obtain the variable x.
[0076] Step 5: Determine whether the result converges. If so, execute step 6; otherwise, return to step 3.
[0077] Step 6: Solve for the error value err.
[0078] Step 7: Determine whether the step size meets the acceptance criteria. If so, proceed to step 8. Otherwise, update the step size and return to step 2.
[0079] Step 8: Output the displacement q of the next time step n+1 ,speed Acceleration a n+1 and the Lagrange multiplier λ n+1 And other parameters.
[0080] Step 9: Determine whether time t is the last step (i.e., determine whether the integration is completed). If so, then end; otherwise, execute step 10.
[0081] Step 10: n=n+1, update the step size, and then return to step 2.
[0082] In step 2, at each time step t n Introducing alpha m and α f and variable a n and a n+1 , making them and Satisfies the following relationship
[0083]
[0084] Similarly, when calculating the generalized coordinates q and velocity The acceleration terms used in the interpolation are introduced into γ and β respectively.
[0085]
[0086] Introduce a correction x so that And let the predicted value is a n+1 The predicted value of n+1 Substitute the expression into the above formula and sort it out to get the expressions of acceleration, velocity and position vector
[0087]
[0088] In the Lie group integrator, the physical quantities describing translation and deformation are described by the above formulas; however, the description of rotation is described by the Lie group method, which means that the rotation variables used in each step of the calculation are local rotation variables relative to the reference time node. Assume that at time tn The rotation matrix is A n , the angular velocity is ω n , the angular acceleration is a n+1 The predicted value is The correction amount is At time t n is the reference time node, for the rotation variable, q n =θ n =0, then t n+1 =t n The state variables at +h are
[0089]
[0090] The angular velocity ω n+1 Its predicted value Angular acceleration term Its predicted value Rotation vector θ n+1 Its predicted value
[0091] The rotation matrix for each time step is calculated by
[0092]
[0093] Substituting the above into the equations to be solved, we get a nonlinear equation system about the unknown small quantity x. At each step, we calculate θ n+1 After that, the rotation matrix is obtained by formula (1.5). In the program implementation, each time step needs to correspond to the rotation variable part of formula (1.4), and the rotation matrix is updated by formula (1.5).
[0094] Backward difference method based on Lie group method to describe rotation:
[0095] In the Lie group backward difference method, except for the parameters used to describe the rotation, the discretization of all other generalized coordinates is obtained using the conventional backward difference format; for the rotation parameters, the rotation parameters of multiple known time steps need to be differentiated in each time step, and they are all local quantities relative to the reference configuration at the current moment. Figure 4 As shown, the following introduces a backward difference integrator based on the Lie group method to describe the rotation:
[0096] In t n Near the moment, the local coordinates are used as the generalized coordinates to describe the rotation, satisfying
[0097]
[0098] Among them A nis the direction cosine matrix at time n. A(t) and θ(t) are the direction cosine matrix and local rotation vector at time t, respectively.
[0099] Redefine
[0100]
[0101] In the above formula, A represents the rotation matrix, θ represents the local rotation vector, and the subscript represents the time step, n time step, nj time step.
[0102] The next time step can use θ n-1 ,θ n-2 ,θ n-3 ,…,θ n-k-1 Calculate
[0103]
[0104] The formula is explained in formula (1.2, 1.3). It can be calculated from time data using two algorithms:
[0105] The first is the algorithm of the quasi-fixed step size formula:
[0106] Step (1): Normalize where h = t n -t n-1 , is the current time step, For historical time data;
[0107] Step (2): Calculate the Vandermonde matrix P k =V(x k );
[0108] Step (3): Generate matrix O k , whose (i,j) component is
[0109] Step (4): Calculate Replace k with k+1 to get the desired value.
[0110] The second is the algorithm of variable step size formula:
[0111] Step a: Calculation
[0112] Step b: Take
[0113] Step c: Calculate Q = (1 k o T ). / O
[0114] Step d: Calculation Replacing k with k+1 is the desired value, which is the upper triangular matrix of the matrix calculated in step c.
[0115] The above steps only change the parameters such as displacement, velocity, acceleration and Lagrange multiplier of the next time step estimated in step 2 of the generalized α-Lie group integrator, and the other steps are the same as above.
[0116] Figure 4 The Lie group backward difference algorithm is a Figure 3 The improvement of Lie group generalized-α integral method includes:
[0117] In step 1, the parameters also include the initial order K, and a is replaced by the initial value of μ(1) n The initial value of; after step 1, the judgment step is performed;
[0118] Determine whether n is greater than or equal to a specified number (the specified number is 3). If so, solve the difference matrix Dnk+1 of the k+1 step, and then execute step 2. Otherwise, solve the difference matrix Dnk of the k step, and then execute step 2.
[0119] In step 2, t(n+1)=t(n)+h is calculated to estimate the displacement estimate of the next time step. Speed Estimation Acceleration estimate and Lagrange multiplier estimates and
[0120] In step 4, the Newton iteration residual newnrm is calculated without solving to1;
[0121] In step 6, two types of error parameters err and err1 are solved;
[0122] In step 7, determine whether the step size meets the acceptance criteria. If yes, execute step 8. Otherwise, update the step size, the order K, and Dnk+1, and then return to execute step 2.
[0123] In step 8, the variable order elements e1, e2, and e3 are first calculated, and then the displacement q of the next time step is output. n+1 ,speed Acceleration Lagrange multiplier λ n+1 , μ (n+1) ;
[0124] In step 10, n=n+1, solving three types of error indicators error1, error2, error3;
[0125] The multi-body system dynamics simulation method also includes:
[0126] Step 11: Determine whether n is greater than a specified value (the specified value is 3). If so, execute step 12. Otherwise, Dnk=e3, and then return to execute the determination step.
[0127] Step 12: Solve the relevant error indicators, step sizes and orders: err1, err2, err3, t1, h1, k1;
[0128] Step 13: Update the order k and step size h, and then return to the judgment step.
[0129] The present invention has the following beneficial effects:
[0130] 1. The rotation described by the Lie group avoids the singularity of the three rotation parameters, making the integration process continuous and without the need for frequent restarts.
[0131] 2. It avoids the additional constraint equations of the Euler quaternion and overcomes the speed saturation problem of the Euler quaternion.
[0132] 3. Compared with rotation three parameters and Euler quaternion, it is more suitable for large-scale calculation.
[0133] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A multi-body system dynamics simulation method based on Lie group description of rotation, characterized in that: The steps include: Step 1: Input parameters into the integrator, including the output number n, the initial time step h, the initial time t(1), and the initial value, including the initial value of the displacement q n , the initial value of speed Initial value of acceleration Initial value λ of the Lagrange multiplier n , and the acceleration auxiliary variable a n The initial value of Step 2: Estimate the displacement estimate for the next time step Speed Estimation Acceleration estimate and Lagrange multiplier estimates and acceleration auxiliary variable estimation Step 3: Solve the Jacobian matrix jacobi(n+1) and the residual residual(n+1); Step 4: Newton iteration, correct the estimated value, and solve the tolerance value to1; Step 5: Determine whether the result converges. If so, execute step 6, otherwise return to step 3; Step 6: Solve the error value err; Step 7: Determine whether the step size meets the acceptance criteria. If so, proceed to step 8. Otherwise, update the step size and return to step 2. Step 8: Output the displacement q of the next time step n+1 ,speed Acceleration a n+1 and the Lagrange multiplier λ n+1 ; Step 9: Determine whether time t is the last step, if so, then end, otherwise go to step 10; Step 10: n=n+1, update the step size, and then return to step 2.
2. The multi-body system dynamics simulation method according to claim 1, characterized in that: In step 3, the Jacobian matrix is where η, β, and γ are the integral parameters of the generalized-α integral, M is the mass matrix of the kinetic equation, and F q and are the partial derivatives of the generalized force with respect to displacement and velocity, respectively.
3. The multi-body system dynamics simulation method according to claim 1, characterized in that: In step 2, the physical quantities describing translation and deformation are expressed by the following formula: Where x is the correction amount, η, β, γ are the generalized-α integral integration parameters.
4. The multi-body system dynamics simulation method according to claim 1, characterized in that: In step 2, the rotation is described using the Lie group method, and θ is calculated at each step. n+1 After that, the rotation matrix is updated by formula (1.5); in the program implementation, each time step needs to correspond to the rotation variable part of formula (1.4), and the rotation matrix is updated by formula (1.5); Among them, A n is the rotation matrix, β and γ are the generalized-α integral integration parameters, is the antisymmetric matrix of the local rotation vector, θ n+1 Represents the rotation vector in local coordinates at time n+1.
5. The multi-body system dynamics simulation method according to claim 1, characterized in that: In step 1, the parameters also include the initial order K, and a is replaced by the initial value of μ(1) n The initial value of; after step 1, the judgment step is performed; Judgment step: determine whether n is greater than or equal to the specified number. If so, solve the difference matrix Dnk+1 of the K+1 step, and then execute step 2. Otherwise, solve the difference matrix Dnk of the K step, and then execute step 2. In step 2, t(n+1)=t(n)+h is calculated to estimate the displacement estimate for the next time step. Speed Estimation Acceleration estimate and Lagrange multiplier estimates and In step 4, the Newton iteration residual newnrm is calculated without solving to1; In step 6, two types of error parameters err and err1 are solved; In step 7, determine whether the step size meets the acceptance criteria. If yes, execute step 8. Otherwise, update the step size, the order K, and Dnk+1, and then return to execute step 2. In step 8, the variable order elements e1, e2, and e3 are first calculated, and then the displacement q of the next time step is output. n+1 ,speed Acceleration Lagrange multiplier λ n+1 , μ(n+1); In the step 10, n=n+1, and three types of error indicators error1, error2, and error3 are solved; the multi-body system dynamics simulation method also includes: Step 11: Determine whether n is greater than the specified value. If so, execute step 12. Otherwise, Dnk=e3, and then return to execute the determination step; Step 12: Solve the relevant error indicators, step sizes and orders: err1, err2, err3, t1, h1, k1; Step 13: Update the order k and step size h, and then return to the judgment step.
6. The multi-body system dynamics simulation method according to claim 5, characterized in that: In the judging step, the designated number is 3; in step 11, the designated value is 3.
7. The multi-body system dynamics simulation method according to claim 5, characterized in that: In step 2, the next time step uses θ n-1 ,θ n-2 ,θ n-3 ,…,θ n-k-1 Calculate it, It is calculated by the following steps: Step (1): Normalize where h = t n -t n-1 , is the current time step, For historical time data; Step (2): Calculate the Vandermonde matrix P k =V(x k ); Step (3): Generate matrix O k , whose (i,j) component is Step (4): Calculate Replace k with k+1 to get the desired value.
8. The multi-body system dynamics simulation method according to claim 5, characterized in that: In step 2, the next time step uses θ n-1 ,θ n-2 ,θ n-3 ,…,θ n-k-1 Calculate it, It is calculated by the following steps: Step a: Calculation Step b: Take and Step c: Calculate Q = (1 k o T ). / O Step d: Calculation Replace k with k+1 to get the desired value.
9. A multi-body system dynamics simulation system based on Lie group description of rotation, characterized in that: include: A memory, a processor and a computer program stored in the memory, wherein the computer program is configured to implement the steps of the multi-body system dynamics simulation method according to any one of claims 1 to 8 when called by the processor.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to implement the steps of the multi-body system dynamics simulation method according to any one of claims 1 to 8 when called by a processor.
Citation Information
Patent Citations
Spatial complex flexible structure multi-body system dynamics modeling and calculating method
CN107220421A
Invariance center differential filter method for autonomous mobile robot vision SLAM
CN110610513A
Map-based consistent efficient filtering algorithm for visual inertial positioning
CN115014346A
Configuration establishment transfer strategy based on toroidal topology equivalence
CN118012114A
Optimization on lie manifolds
WO2002088690A1
