1 Introduction

The contact (collision) process between components of multi-body systems exists in practical projects, such as spacecraft docking [1], manipulator control [2, 3], chain transmission [4], mechanism analysis with clearance [5,6,7,8], and folding wing deployment [9]. Before and after the moment of contact or impact, the discontinuity of constraints can lead to sudden changes in relative velocity and acceleration between contact pairs. The dynamic process, including a contact or collision phenomenon, has significant non-smooth characteristics and represents a complex nonlinear problem [10, 11].

The related research [12, 13] has shown that there are two main factors that affect the accuracy of numerical calculation of non-smooth processes, the accuracy of the non-smooth dynamic model and the efficiency of an algorithm for solving contact processes. In algorithms for dealing with the contact or impact process, the key problem to be solved is how to reduce the computational cost of detecting the state transition, such as determining whether a contact or collision event occurs [14]. The previous studies [15, 16] have shown that for the simulation model with a large number of contact surfaces, the determination of the contact state requires much computational cost, and even 50 percent of the total CPU time can be required for detecting the contact state. Moreover, with the increase in the number of contact surfaces in a model, the computational cost will increase rapidly, which denotes the so-called Delassus problem [17]. The linear complementarity method [18] transforms the contact problem into a mathematical programming problem with a linear complementarity constraint. With the help of the complementary relation, if one of the paired complementary quantities is calculated, the complementary quantity will be obtained automatically so that the computational cost can be saved.

There are two popular solution methods for non-smooth dynamic models [19, 20]: the penalty method based on the contact interface deformation [21,22,23,24], and the non-smooth contact method [25, 26] based on the geometric constraint of the contact body. In a dynamic model with a non-smooth process, inequalities are used to describe unilateral constraints when a contact or a collision occurs. However, it is difficult to deal with the inequality constraints effectively. The penalty model, which is also known as continuous contact force model [27,28,29], has been widely studied in contact (impact) dynamic model. This model assumes that in the contact or impact process, there is a small amount of intrusion between the contact surfaces and that the contact and damping forces are continuous functions of the intrusion amount. The calculation results of the penalty model mostly depend on material properties, relative impact velocity, and penetration depth [30]. Therefore, for different load magnitude, contact stiffness, impact recovery coefficient, and dimensional compatibility, many versions of the penalty model have been proposed [31] based on the Hertz model to adapt to the contact process in different situations, among which the main one is the modification of the damping force that produces the effect of energy dissipation. The continuous contact force models have their own scope of application, so it is necessary to have certain experience when selecting the most appropriate model and its parameters for a particular problem. The non-smooth dynamic model defines and deals with unilateral constraints using the idea of differential inclusion [32]. In [33], Moreau combined convex analysis with differential inclusion theory and solved the dynamics problem of rigid body collision with friction. The mechanical and mathematical definitions of the non-smooth model were derived. And the research on modern non-smooth mechanics has developed vigorously. Many mathematical theoretical frameworks, including the linear complementarity problem (LCP), differential inclusion [34], and measure differential inclusion (MDI) [35], have been established and used to describe non-smooth and set-valued relationships in a system, revealing the essential characteristics of the non-smooth process.

Compared with the continuous contact force model, the non-smooth model avoids the difficulty of calculating the stiffness differential equations in the flexible model by virtue of the rigid local contact while improving the calculation accuracy [36], so it can deal with the energy incongruence problem in the collision process [37]. The event-driven algorithm [38,39,40] and the time-stepping algorithm [41,42,43] are the two main types of non-smooth contact methods. With the help of accurate contact collision detection, the event-driven algorithm can achieve high computational accuracy and stability by using a short time step. However, the event-driven algorithm requires a short time step, otherwise, error accumulation will occur and decreasing the calculation accuracy [44]. Different from the event-driven algorithm, the time-stepping algorithm is insensitive to the time step when there is no strict requirement for convergence accuracy. In addition, the time-stepping algorithm based on the velocity-impulse complementary condition can deal with the multi-contact problem. Charles [45] proposed a time-stepping strategy with good convergence stability, which can control the energy incongruity problem to a certain extent, as a solution strategy of the time-stepping algorithm. Brüls et al. [46] proposed a frictionless contact calculation method satisfying the bilateral constraints of velocity and displacement based on the generalized-α integral. Schindler et al. [47] used the discrete-time Galerkin method to propose a semi-explicit time-stepping scheme, which reduced the energy drift effect. There have been two main solution strategies for the time-stepping algorithm: the Schatzman–Paoli method [48] based on the central difference scheme, which solves the problem from the displacement level, and the Moreau midpoint algorithm [33, 49] based on the improved Gore–Gupta–Leimkuhler (GGL) scheme, which solves the problem from the velocity level.

The traditional integral algorithm like the Moreau midpoint method to solve LCP formed non-smooth dynamic models has low accuracy in solving the contact force. In engineering applications such as space manipulators and folding wing extensions, getting the accurate contact force is very important. In this paper, a new implicit integration algorithm is proposed to improve the efficiency of calculating non-smooth dynamic models in the form of LCP. Using the proposed algorithm, the contact state switching can be judged with less computational costs, and more accurate numerical calculation results and more stable energy retention performance can be obtained compared with Moreau's midpoint algorithm. The accuracy and stability of the implicit integral method are verified by three numerical experiments. The first study case is to calculate the swing-collision process of a rigid, simple pendulum, which is used to verify the calculation accuracy of the collision force and the stability to geometric constraints of the proposed algorithm; the second numerical experiment is used to test the performance of the proposed algorithm in dealing with oblique impact with friction; and third study case is used to test the computational ability of the proposed algorithm for contact processes including stiction-sliding transition.

The rest of the paper is organized as follows. In Sect. 2, the non-smooth dynamic model of the multibody system is derived, and the linear complementary form of the non-smooth dynamic model is constructed. In Sect. 3, the calculation method of the non-smooth dynamic model in LCP form is introduced, and the construction process of the implicit integration algorithm is given in detail. In Sect. 4, three numerical experiments are tested and compared with other algorithms. The calculated results of the numerical experiments and the discussion of the results are in Sects. 4.4 and 5. The results show that the proposed algorithm performs well for the multibody system with non-smooth dynamic process. Eventually, some conclusions are summarized in Sect. 6.

2 Non-smooth Dynamic Model of Collision Process

2.1 Multi-body Dynamic Equations of Collision-Free Phase

The absolute Cartesian coordinate system is selected to define the configuration of internal components of a multi-body system. In the free-motion phase without collision, there are only smooth bilateral constraints in the system. The Lagrange multiplier method can be used to combine differential equations describing motion with algebraic equations describing constraints. The Euler–Lagrange equation for the multi-body system containing n degrees of freedom and m bilateral constraint such that m < n can be expressed as:

$${\varvec{M}}{\ddot{\varvec{q}}} + {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} {{\varvec{\lambda}}} = {\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t)$$
(1)
$${{\varvec{\varPhi}}}({\varvec{q}},t) = {\mathbf{0}}$$
(2)

where t is time, \({\varvec{M}} \in {\mathbf{R}}^{n \times m}\) is the generalized mass matrix of the system; \({\varvec{q}} \in {\mathbf{R}}^{n}\) is the generalized coordinate vector; \({{\varvec{\lambda}}} \in {\mathbf{R}}^{m}\) is the Lagrange multiplier vector; \({{\varvec{\varPhi}}}({\varvec{q}},t) \in {\mathbf{R}}^{m}\) is bilateral constraint function, and its partial differentiation of generalized coordinates \([\partial {{\varvec{\varPhi}}}({\varvec{q}},t)/\partial {\varvec{q}}] \in {\mathbf{R}}^{m \times n}\) denotes the Jacobian matrix with a bilateral constraint function; \({\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t) \in {\mathbf{R}}^{n}\) is the generalized force vector of the system.

The acceleration constraint equation of the system is obtained by differentiating Eq. (2) with respect to time twice, and it can be expressed as:

$${{\varvec{\varPhi}}}_{q} {\ddot{\varvec{q}}} + ({{\varvec{\varPhi}}}_{q} {\dot{\varvec{q}}})_{q} {\dot{\varvec{q}}} + 2{{\varvec{\varPhi}}}_{qt} {\dot{\varvec{q}}} + {{\varvec{\varPhi}}}_{tt} = {\mathbf{0}}$$
(3)

Equations (1) and (2) form a set of differential equations, which are used to describe the motion laws and acceleration constraints of the system. Rewriting Eqs. (1) and (2) into the matrix form yields to:

$$\left[ {\begin{array}{cc} {\varvec{M}} & {{{\varvec{\varPhi}}}_{q}^{{\text{T}}} } \\ {{{\varvec{\varPhi}}}_{q} } & {\mathbf{0}} \\ \end{array} } \right]\left[ {\begin{array}{c} {{\ddot{\varvec{q}}}} \\ {{\varvec{\lambda}}}\\ \end{array} } \right] = \left[ {\begin{array}{c} {{\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t)} \hfill \\ {\quad - {{\varvec{\omega}}}} \hfill \\ \end{array} } \right]$$
(4)

where ω is the remaining term of the acceleration constraint equation, and it is expressed as follows:

$${{\varvec{\omega}}} = ({{\varvec{\varPhi}}}_{q} {\dot{\varvec{q}}})_{q} {\dot{\varvec{q}}} + 2{{\varvec{\varPhi}}}_{qt} {\dot{\varvec{q}}} + {{\varvec{\varPhi}}}_{tt}$$
(5)

Equation (4) represents a system of differential equations. The Gauss elimination method can be used to obtain \({\ddot{\varvec{q}}}\) and λ at the same time and then integrate \({\ddot{\varvec{q}}}\) to obtain \({\dot{\varvec{q}}}\) and q. However, the constraints in Eq. (2) cannot be strictly defined due to the error in the integration process. After updating Φq using \({\dot{\varvec{q}}}\) and q that contain integral errors, the errors will accumulate cyclically, resulting in a larger deviation between the sum obtained in subsequent time steps and the actual value.

In view of the error accumulation problem, Baumgart [50] introduced position and velocity constraints into the acceleration constraint equation based on the principle of automatic control, and the constraint stabilization form of Eq. (4) is expressed as follows:

$$\left[ {\begin{array}{*{20}c} {\varvec{M}} & {{{\varvec{\varPhi}}}_{q}^{{\text{T}}} } \\ {{{\varvec{\varPhi}}}_{q} } & {\mathbf{0}} \\ \end{array} } \right]\left[ {\begin{array}{*{20}l} {{\ddot{\varvec{q}}}} \\ {{\varvec{\lambda}}} \\ \end{array} } \right] = \left[ {\begin{array}{*{20}l} {\quad \quad {\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t)} \hfill \\ { - {{\varvec{\omega}}} - 2\alpha {\dot{\varvec{\varPhi }}} - \beta^{2} {{\varvec{\varPhi}}}} \hfill \\ \end{array} } \right]$$
(6)

To minimize the time needed for the system to reach a stable response, values of α and β are usually set as \(\alpha = \beta \in [5,50]\) so that, in every time step, the position and velocity constraints of the system are satisfied at the same time, and the integral error is suppressed. It should be noted that Eq. (6) represents the complete dynamic equation of a smooth bilaterally constrained multi-body system.

2.2 Non-smooth Dynamics Model Based on LCP

When a contact or a collision occurs between internal components of a multi-body system, system topology changes. In addition to the original bilateral constraints, additional unilateral constraints are added to the system model to describe sudden changes in the motion state of system components. For all contact surfaces that are potentially subjected to positive and oblique collisions in a multi-body system, normal and tangential constraint reaction forces can be obtained by the Lagrange multiplier method as follows:

$${\varvec{M}}{\ddot{\varvec{q}}} + {{\varvec{\varPhi}}}_{q}^{{\text{T}}} {{\varvec{\lambda}}} + {\varvec{W}}_{{\text{N}}} {{\varvec{\lambda}}}_{{\text{N}}} + {\varvec{W}}_{{\text{T}}} {{\varvec{\lambda}}}_{{\text{T}}}={\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t)$$
(7)

where λN and λT denote normal collision force and tangential friction force, respectively; WN and WT represent the transposes of the Jacobian matrix of the normal and tangential distance constraint functions, respectively, and they are defined as follows:

$${\varvec{W}}_{{\text{N}}} = \left[ {\frac{{\partial {\varvec{g}}_{{\text{N}}} ({\varvec{q}},t)}}{{\partial {\varvec{q}}}}} \right]^{{\text{T}}}$$
(8)
$${\varvec{W}}_{{\text{T}}} = \left[ {\frac{{\partial {\varvec{g}}_{{\text{T}}} ({\varvec{q}},t)}}{{\partial {\varvec{q}}}}} \right]^{{\text{T}}}$$
(9)

where \({\varvec{g}}_{{\text{N}}} ({\varvec{q}},t)\) and \({\varvec{g}}_{{\text{T}}} ({\varvec{q}},t)\) denote the normal and tangential distance function vectors on the contact surface, respectively.

Since a collision process lasts shortly, and the impact force between the contact surfaces is usually very strong, the velocity of a component changes discontinuously and abruptly before and after the collision. By integrating the force–acceleration relationship in Eq. (7) over the time of the collision period Δt, the impulse-velocity form can be obtained as follows:

$${\varvec{M}} \Delta {\dot{\varvec{q}}} + {{\varvec{\varPhi}}}_{q}^{{\text{T}}} {{\varvec{\Lambda}}} + {\varvec{W}}_{{\text{N}}} {{\varvec{\Lambda}}}_{{\text{N}}} + {\varvec{W}}_{{\text{T}}} {{\varvec{\Lambda}}}_{{\text{T}}} = {\varvec{F}}\cdot \Delta t$$
(10)

where \(\Delta t = t_{b} - t_{a}\), ta and tb denote the start and end times of the impact or contact process, respectively; \(\Delta {\dot{\varvec{q}}} = {\dot{\varvec{q}}}^{{({\text{b}})}} - {\dot{\varvec{q}}}^{{({\text{a}})}}\), and it denotes the generalized velocity difference in the collision process; Λ is the impulse of the bilateral binding force in interval Δt, and it is calculated by:

$${{\varvec{\Lambda}}} = \mathop {\lim }\limits_{{t_{a} \to t_{b} }} \int_{{t_{a} }}^{{t_{b} }} {{\varvec{\lambda}}} {\text{d}}t$$
(11)

In Eq. (10), ΛN and ΛT denote the unilateral constraint force impulses in the normal and tangential directions, respectively. It is worth noting that when the type of contact is a collision, the duration of the collision phenomenon represents an instant, but the value of the collision force is usually enormous, which makes the result of the integral in Eq. (11) different from zero. Differentiating Eq. (2) with respect to time, the velocity constraint of the target component at the end of the collision can be defined as follows:

$${{\varvec{\varPhi}}}_{q} {\dot{\varvec{q}}}^{{({\text{b}})}} + {{\varvec{\varPhi}}}_{t} = {\mathbf{0}}$$
(12)

The generalized velocity can be used to express the normal and tangential relative velocities between the contact surfaces at the end of the collision, and they are, respectively, expressed as follows:

$${\dot{\varvec{g}}}_{{\text{N}}}^{{({\text{b}})}} = {\varvec{W}}_{{\text{N}}}^{{ {\text{T}}}} {\dot{\varvec{q}}}^{{({\text{b}})}} + {\tilde{\varvec{\omega}}}_{{\text{N}}}$$
(13)
$${\dot{\varvec{g}}}_{{\text{T}}}^{{({\text{b}})}} = {\varvec{W}}_{{\text{T}}}^{{ {\text{T}}}} {\dot{\varvec{q}}}^{{({\text{b}})}} + {\tilde{\varvec{\omega}}}_{{\text{T}}}$$
(14)

where \({\tilde{\varvec{\omega}}}_{{\text{N}}}\) and \({\tilde{\varvec{\omega}}}_{{\text{T}}}\) denote the partial derivatives of the normal and tangential relative distance functions to time. At the beginning of the contact or collision process, \({\dot{\varvec{q}}}^{{({\text{a}})}}\) is known, so the non-smooth dynamics model defined by Eq. (10) and Eqs. (1214) contains six unknown parameters: \({\dot{\varvec{q}}}^{{({\text{b}})}}\), Λ, ΛN, ΛT, \({\dot{\varvec{g}}}_{{\text{N}}} ,{\dot{\varvec{g}}}_{{\text{T}}}\). However, there are only four equations, that is, the equation set is incomplete. To make the collision process solvable, it is necessary to regularize the problem by introducing new equations so that the number of unknown parameters in the system of equations is equal to the number of equations.

The complementarity theory from the perspective of non-smooth dynamics represents a description of the laws followed by physical parameters in a nonlinear process, such as contact or collision. Based on the complementary theory, for a contact surface that meets the condition of \({\varvec{g}}_{{\text{N}}} ({\varvec{q}},t) = 0\), there is a complementary relationship between the impulse of the normal collision force ΛN and the composite of the normal generalized velocity ξN, which can be expressed as follows:

$$0\; \le {{\varvec{\Lambda}}}_{{\text{N}}} \bot \;{{\varvec{\xi}}}_{{\text{N}}} \ge 0$$
(15)

where symbol “⊥” indicates that two vectors are perpendicular; in other words, the product of elements in the corresponding positions in the two vectors equals zero; the inequality sign means that every member of the vector is greater than or equal to zero. The impulse of the friction margin in the tangential direction is defined as \({{\varvec{\Lambda}}}_{{{\text{TS}}}} = \mu {{\varvec{\Lambda}}}_{{\text{N}}} - {{\varvec{\Lambda}}}_{{\text{T}}}\). Further, ξN and ξT denote the synthetic velocity in the normal and tangential directions, respectively, which are defined as:

$${{\varvec{\xi}}}_{{\text{N}}} = {\dot{\varvec{g}}}_{{\text{N}}}^{{({\text{b}})}} + {\varvec{e}}_{{\text{N}}} {\dot{\varvec{g}}}_{{\text{N}}}^{{({\text{a}})}}$$
(16)
$${{\varvec{\xi}}}_{{\text{T}}} = {\dot{\varvec{g}}}_{{\text{T}}}^{{({\text{b}})}} + {\varvec{e}}_{{\text{T}}} {\dot{\varvec{g}}}_{{\text{T}}}^{{({\text{a}})}}$$
(17)

where eN and eT are the diagonal matrices of the collision and friction coefficients in the normal and tangential directions, respectively.

The existing studies on system dynamics [51,52,53] have shown that different friction-related parameters and models can lead to bifurcation [54] or even chaos [55] in the response of multi-body systems with non-smooth phenomena. Hence, in the non-smooth dynamic modeling of the contact process, especially the oblique collision process, the calculation of friction is an important part. In this work, by linearizing the spatial friction cone into a polygonal cone, Coulomb’s friction law in the non-smooth dynamic model can be expressed as a complementary relation so that the friction force in the process of contact and collision can be solved. To simplify the derivation and make the solution converge, this study assumes that system constraints are stable in a single contact state. In the states of stiction and sliding, Coulomb's law of friction can be expressed as follows:

$$\left| {{{\varvec{\lambda}}}_{{{\text{Ti}}}} } \right| < \mu {{\varvec{\lambda}}}_{{{\text{Ni}}}} \quad {\text{when}}\quad \left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = 0$$
(18)
$$\left| {{{\varvec{\lambda}}}_{{{\text{Ti}}}} } \right| = \mu {{\varvec{\lambda}}}_{{{\text{Ni}}}} \quad {\text{when}}\quad \left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| > 0$$
(19)

where Eq. (18) refers to the stiction state and Eq. (19) refers to the sliding state. The boundary between dynamic and static frictions defined by Eqs. (18) and (19) forms a spatial cone, which is called a friction cone.

When a contact or an oblique collision occurs between the contact surface pairs, there are four types of relationships between the tangential friction force of the contact surface and the motion state, and they are as follows:

  1. 1.

    The sliding state, which can be expressed as: \({{\varvec{\Lambda}}}_{{{\text{TS}}}} = {\mathbf{0}},\) and \(\left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right|\; \ge \;0\;({\text{when}}\left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = 0,\;\left| {{\ddot{\varvec{g}}}_{{{\text{Ti}}}} } \right|>0)\); the basis for judging the transition from a sliding state to the stiction state is \({\dot{\varvec{g}}}_{{{\text{Ti}}}}\);

  2. 2.

    The transition from a sliding state to the stiction state, which can be expressed as: \({{\varvec{\Lambda}}}_{{{\text{TS}}}} = {\mathbf{0}}\), and \(\left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = \left| {{\ddot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = 0\);

  3. 3.

    The stiction state, which can be expressed as: \({{\varvec{\Lambda}}}_{{{\text{TS}}}} \ge {\mathbf{0}}\), and \(\left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = \left| {{\ddot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = 0\); the basis for judging the transition from a stiction state to the sliding state is ΛTS;

  4. 4.

    The transition from a stiction state to a sliding state, which can be expressed as: \({{\varvec{\Lambda}}}_{{{\text{TS}}}} = {\mathbf{0}}\), and \(\left| {{\dot{\varvec{g}}}_{{{\text{Ti}}}} } \right| = 0\;,\;\left| {{\ddot{\varvec{g}}}_{{{\text{Ti}}}} } \right| > 0\).

The spatial friction cone needs to be linearized so that Coulomb's law in the above four cases is written in the complementary form. The linear complementary method then can be used to solve the spatial friction problem in the non-smooth model.

Definition 1

FC0(q) is a closed convex set in the generalized velocity space, which represents the existence range of the friction force under the action of the normal unit force [56], and it can be expressed as:

$$FC_{0} (q) \approx \mu \cdot {\text{co}}\{ d_{i} (q)\,|\, i = 1,2, \ldots ,p\}$$
(20)

where μ denotes the coefficient of friction, co{·} represents the smallest closed convex set that contains a certain set, and p is the number of edges at the bottom of the approximate polygon cone.

Then, the friction cone FC(q) at the contact position can be expressed in FC0(q) and can be obtained as:

$$\begin{aligned} FC(q) & \approx {\text{cone}}\{ {\varvec{W}}_{{\text{N}}} {{\varvec{\lambda}}}_{{\text{N}}} + \mu {{\varvec{\lambda}}}_{{\text{N}}} \cdot d_{i} (q)\,|\,i = 1,\,2,\,\ldots\,,p\} \\ & = \{ {\varvec{W}}_{{\text{N}}} {{\varvec{\lambda}}}_{{\text{N}}} + {\varvec{W}}_{{\text{D}}} {{\varvec{\lambda}}}_{{\text{D}}}\,|\,{{\varvec{\lambda}}}_{{\text{N}}} \ge 0 , \;{{\varvec{\lambda}}}_{{\text{D}}} \ge 0, {\text{I}}^{{\text{T}}} \cdot {{\varvec{\lambda}}}_{{\text{D}}} \le \mu {{\varvec{\lambda}}}_{{\text{N}}} \} \\ \end{aligned}$$
(21)

where \({\varvec{W}}_{{\text{D}}} = [d_{1} (q), \;d_{2} (q), \ldots ,d_{p} (q) ]\), and \({{\varvec{\lambda}}}_{{\text{D}}} = \mu \cdot {{\varvec{\lambda}}}_{{\text{N}}}\). After introducing an auxiliary parameter γ to represent the numerical value of the relative sliding velocity vector, Coulomb’s friction law can be expressed as follows:

$$0 \le \;\gamma {\text{I}} + {\varvec{W}}_{{\text{D}}}^{{\text{T}}} {\dot{\varvec{q}}}\; \bot \;{{\varvec{\lambda}}}_{{\text{D}}} \; \ge \; 0$$
(22)
$$0 \le \;\mu \lambda_{{\text{N}}} - {\text{I}}^{{\text{T}}} {{\varvec{\lambda}}}_{{\text{D}}} \; \bot \;\gamma \; \ge \; 0$$
(23)

The non-smooth dynamics model in the linear complementary form is defined by the following seven equations:

$$\left\{ {\begin{array}{*{20}l} {{\varvec{M}} \Delta {\dot{\varvec{q}}} + {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} {{\varvec{\Lambda}}} + {\varvec{W}}_{{\text{N}}} {{\varvec{\Lambda}}}_{{\text{N}}} + {\varvec{W}}_{{\text{D}}} {{\varvec{\Lambda}}}_{{\text{D}}} = {\varvec{F}}\cdot\Delta t} \hfill \\ {{{\varvec{\varPhi}}}_{q} {\dot{\varvec{q}}}^{{({\text{b}})}} + {{\varvec{\varPhi}}}_{t} = {\mathbf{0}}} \hfill \\ {{{\varvec{\xi}}}_{{\text{N}}} = {\dot{\varvec{g}}}_{{\text{N}}}^{{ ({\text{b}})}} + {\varvec{e}}_{{\text{N}}} {\dot{\varvec{g}}}_{{\text{N}}}^{{ ({\text{a}})}} } \hfill \\ {{{\varvec{\xi}}}_{{\text{T}}} = {\dot{\varvec{g}}}_{{\text{T}}}^{{ ({\text{b}})}} + {\varvec{e}}_{{\text{T}}} {\dot{\varvec{g}}}_{{\text{T}}}^{{ ({\text{a}})}} } \hfill \\ {0\; \le \;{{\varvec{\Lambda}}}_{{\text{N}}} \; \bot \;{{\varvec{\xi}}}_{{\text{N}}} \; \ge \;0} \hfill \\ {0 \le \;\gamma {\text{I}} + {\varvec{W}}_{{\text{D}}}^{{\text{T}}} {\dot{\varvec{q}}}\; \bot \;{{\varvec{\lambda}}}_{{\text{D}}} \; \ge \; 0} \hfill \\ {0 \le \mu \lambda_{{\text{N}}} - {\text{I}}^{{\text{T}}} {{\varvec{\lambda}}}_{{\text{D}}} \; \bot \;\gamma \; \ge \;0} \hfill \\ \end{array} } \right.$$
(24)

It should be noted that there are seven unknowns in the above model, which are as follows: \({\dot{\varvec{q}}}^{{({\text{b}})}}\), Λ, ΛN, ΛT, ξN, ξT, and γ. Among them, ΛTS can be obtained by ΛN and ΛT, so Eq. (24) represents a set of closed and complete non-smooth dynamic equations.

3 Calculation Method of Non-smooth Dynamic Model

The DAEs given in Eq. (24) describe the movement law of a multi-body system when a contact or a collision occurs from the velocity-impulse perspective. In the case of a smooth motion stage without a non-smooth process, Eq. (24) degenerates to Eq. (6), and a method, such as the Runge–Kutta method or the Newmark method, can be used to obtain accurate results. This paper mainly discusses the solution to the non-smooth process. Although Eq. (24) illustrates that there is a complementary relationship between the unilateral constraint impulse and the resultant velocity, the quantitative relationship between these two is not explicitly given and thus cannot be solved directly. This section considers the LCP form of Eq. (24) to solve the non-smooth process. The solution process mainly involves two parts, calculation of paired complementary parameters and iterative solution to DAEs. By determining an implicit integration format of the generalized velocity and coordinates at adjacent time points, the DAEs expressed in the form of Eq. (24) can be solved by the time-stepping algorithm.

3.1 LCP Form of Non-smooth Model

In this study, Coulomb’s friction model is used to describe the dynamic-static friction state switching process between contact surfaces. The dynamic Coulomb’s friction model represents a differential inclusion [21]. When the relative tangential velocity is zero, the friction force denotes a multi-valued function.

Based on Eq. (21), in the case of two-dimensional case, it holds that \({{\varvec{\Lambda}}}_{{\text{D}}} = \{ {{\varvec{\Lambda}}}_{{\text{L}}},\ {{\varvec{\Lambda}}}_{{\text{R}}} \}\). To facilitate the judgment on the contact state conversion, for a contact pair having relative distance and velocity of zero in the normal and tangential directions, the impulse of the friction margin can be decomposed into left and right components as follows:

$${{\varvec{\Lambda}}}_{{\text{L}}} = \mu {{\varvec{\Lambda}}}_{{\text{N}}} - {{\varvec{\Lambda}}}_{{\text{T}}}$$
(25)
$${{\varvec{\Lambda}}}_{{\text{R}}} = \mu {{\varvec{\Lambda}}}_{{\text{N}}} + {{\varvec{\Lambda}}}_{{\text{T}}}$$
(26)

which means that,

$${{\varvec{\Lambda}}}_{{\text{R}}} = 2\mu {{\varvec{\Lambda}}}_{{\text{N}}} - {{\varvec{\Lambda}}}_{{\text{L}}}$$
(27)

Accordingly, the tangential composite velocity can be expressed by left and right components:

$${{\varvec{\xi}}}_{{\text{T}}} = {{\varvec{\xi}}}_{{\text{R}}} - {{\varvec{\xi}}}_{{\text{L}}}$$
(28)

Substituting Eqs. (25) and (21) in Eq. (24), and then combining Eqs. (24) and (27), the matrix form of non-smooth dynamic equations can be obtained as:

$$\left[ {\begin{array}{ccccc} {\varvec{M}} & {{{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} } & {{\varvec{W}}_{{\text{N}}} - \mu {\varvec{W}}_{{\text{T}}} } & {{\varvec{W}}_{{\text{T}}} } & {\mathbf{0}} \\ {{{\varvec{\varPhi}}}_{q} } & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{0}} \\ {{\varvec{W}}_{{\text{N}}}^{{\text{T}}} } & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{0}} \\ {{\varvec{W}}_{{\text{T}}}^{{\text{T}}} } & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{0}} & {\mathbf{I}} \\ {\mathbf{0}} & {\mathbf{0}} & {2\mu {\mathbf{I}}} & { - {\mathbf{I}}} & {\mathbf{0}} \\ \end{array} } \right]\left[ {\begin{array}{c} {{\dot{\varvec{q}}}^{{({\text{b}})}} } \\ {{\varvec{\Lambda}}} \\ {{{\varvec{\Lambda}}}_{{\text{N}}} } \\ {{{\varvec{\Lambda}}}_{{\text{R}}} } \\ {{{\varvec{\xi}}}_{{\text{L}}} } \\ \end{array} } \right] + \left[ {\begin{array}{c} { - {\varvec{M}}{\dot{\varvec{q}}}^{{({\text{a}})}} - {\varvec{F}}({\varvec{q}},{\dot{\varvec{q}}},t) \cdot \Delta t} \\ {{{\varvec{\varPhi}}}_{t} } \\ {{\tilde{\varvec{\omega}}}_{{\text{N}}}^{{({\text{b}})}} + {\varvec{e}}_{{\text{N}}} ({\varvec{W}}_{{\text{N}}}^{{ {\text{T}}}} {\dot{\varvec{q}}}^{{({\text{a}})}} + {\tilde{\varvec{\omega}}}_{{\text{N}}}^{{({\text{a}})}} )} \\ {{\tilde{\varvec{\omega}}}_{{\text{T}}}^{{({\text{b}})}} + {\varvec{e}}_{{\text{T}}} ({\varvec{W}}_{{\text{T}}}^{{ {\text{T}}}} {\dot{\varvec{q}}}^{{({\text{a}})}} + {\tilde{\varvec{\omega}}}_{{\text{T}}}^{{({\text{a}})}} )} \\ {\mathbf{0}} \\ \end{array} } \right] = \left[ {\begin{array}{c} {\mathbf{0}} \\ {\mathbf{0}} \\ {{{\varvec{\xi}}}_{{\text{N}}} } \\ {{{\varvec{\xi}}}_{{\text{R}}} } \\ {{{\varvec{\Lambda}}}_{{\text{L}}} } \\ \end{array} } \right]$$
(29)

Equation (29) can be simplified to:

$$\left[ \begin{array}{c} {\mathbf{0}} \\ {\mathbf{0}} \\ {\varvec{y}} \\ \end{array} \right] = \left[ \begin{array}{ccc} {\varvec{M}} & {{{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} } & {{\varvec{W}}_{{\text{Q}}} } \\ {{{\varvec{\varPhi}}}_{q} } & {\mathbf{0}} & {\mathbf{0}} \\ {{\varvec{W}}_{{\text{P}}} } & {\mathbf{0}} & {\varvec{N}} \\ \end{array} \right]\left[ \begin{array}{c} {{\dot{\varvec{q}}}^{{({\text{b}})}} } \\ {{\varvec{\Lambda}}} \\ {\varvec{x}} \\ \end{array} \right]\,+\,\left[ \begin{array}{c} {\varvec{b}}_{1} \\ {\varvec{b}}_{2} \\ {\varvec{b}}_{3} \\ \end{array} \right]$$
(30)

where vectors \({\varvec{y}} = \left[ {{{\varvec{\xi}}}_{{\text{N}}} ,\; {{\varvec{\xi}}}_{{\text{R}}} ,\; {{\varvec{\Lambda}}}_{{\text{L}}} } \right]^{{\text{T}}}\) and \({\varvec{x}} = \left[ {{{\varvec{\Lambda}}}_{{\text{N}}} , \;{{\varvec{\Lambda}}}_{{\text{R}}} ,\; {{\varvec{\xi}}}_{{\text{L}}} } \right]^{{\text{T}}}\) denote a pair of complementary quantities;\({\varvec{W}}_{{\text{Q}}} = \left[ {{\varvec{W}}_{{\text{N}}} - \mu {\varvec{W}}_{{\text{T}}} , \;{\varvec{W}}_{{\text{T}}} ,\; {\mathbf{0}}} \right]\), and \({\varvec{W}}_{{\text{P}}} = \left[ {{\varvec{W}}_{{\text{N}}}^{{ {\text{T}}}} , \;{\varvec{W}}_{{\text{T}}}^{{ {\text{T}}}} ,\; {\mathbf{0}}} \right]^{{\text{T}}}\). By deriving the three sub-equations of Eq. (30), the standard linear complementary form of y and x can be obtained. According to the first sub-equation in Eq. (30), the expression of \({\dot{\varvec{q}}}^{{({\text{b}})}}\) can be obtained as follows:

$${\dot{\varvec{q}}}^{{({\text{b}})}} = - {\varvec{M}}^{ - 1}\, {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} {{\varvec{\Lambda}}} - {\varvec{M}}^{ - 1}\, {\varvec{W}}_{{\text{Q}}} \cdot {\varvec{x}} - {\varvec{M}}^{ - 1}\, {\varvec{b}}_{1}$$
(31)

By substituting Eq. (31) into the second equation of Eq. (30), Λ can be obtained as:

$${{\varvec{\Lambda}}} = - \left[ {{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1}\, {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} } \right]^{ - 1}\ {{\varvec{\varPhi}}}_{q}\, {\varvec{M}}^{ - 1}\, {\varvec{W}}_{{\text{Q}}}\,{\varvec{x}} - \left[ {{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} } \right]^{ - 1} \left( {{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1}\,{\varvec{b}}_{1} - {\varvec{b}}_{2} } \right)$$
(32)

Further, by substituting Eqs. (31) and (32) into the third equation of Eq. (30), the standard linear complementary form between y and x is obtained as:

$$\left\{ {\begin{array}{*{20}l} {{\varvec{y}} = {\varvec{A}} \cdot {\varvec{x}} + {\varvec{b}}} \hfill \\ {{\varvec{y}} \ge {\mathbf{0}},\ {\varvec{x}} \ge {\mathbf{0}},\ {\varvec{y}}^{{\text{T}}} \cdot {\varvec{x}} = 0} \hfill \\ \end{array} } \right.$$
(33)

where,

$$\begin{aligned} {\varvec{A}} & = {\varvec{W}}_{{\text{P}}} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} [{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} ]^{ - 1} {{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {\varvec{W}}_{{\text{Q}}} - {\varvec{W}}_{{\text{P}}} {\varvec{M}}^{ - 1} {\varvec{W}}_{{\text{Q}}} + {\varvec{N}} \\ {\varvec{b}} & = {\varvec{W}}_{{\text{P}}} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} [{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} ]^{ - 1} {{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {\varvec{b}}_{1}\,-\, {\varvec{W}}_{{\text{P}}} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} [{{\varvec{\varPhi}}}_{q} {\varvec{M}}^{ - 1} {{\varvec{\varPhi}}}_{q}^{{ {\text{T}}}} ]^{ - 1} {\varvec{b}}_{2}\,-\,{\varvec{W}}_{{\text{P}}} {\varvec{M}}^{ - 1} {\varvec{b}}_{1} + {\varvec{b}}_{3} \\ \end{aligned}$$

Equation (33) represents the LCP form of the non-smooth dynamic model defined by Eq. (24). An improved Lemke algorithm [57] is used to solve Eq. (33), and a pair of y and x value satisfies the complementary requirements. After substituting x in Eq. (32) to calculate impulse Λ of the bilateral binding force in the collision or contact process, by substituting x and Λ in Eq. (31), the generalized velocity \({\dot{\varvec{q}}}^{{({\text{b}})}}\) can be obtained. Finally, by integrating \({\dot{\varvec{q}}}^{{({\text{b}})}}\) with respect to time, q(b) can be obtained.

3.2 Implicit Integration Method of Non-smooth Model

In Eq. (31), at time ta, the generalized velocity \({\dot{\varvec{q}}}^{{({\text{b}})}}\) at time tb is unknown, so the generalized displacement cannot be obtained by a definite integral of the generalized velocity over time. As defined by Eqs. (2), (8) and (9), values of Φq, WN, and WT at different moments depend on the generalized displacement of these moment. On the right side of Eq. (31), Φq and WQ at moment tb are also unknown before \({\dot{\varvec{q}}}^{{({\text{b}})}}\) is calculated. Therefore, it is necessary to construct an implicit integral format over the collision process’ time, so that Eq. (31) can be solved by an implicit algorithm.

The implicit iterative expressions of \({\dot{\varvec{q}}}\) and q at adjacent time moments t and t + Δt can be constructed as follows:

$$\left\{ {\begin{array}{*{20}l} {{\tilde{\dot{\varvec{q}}}}^{(t + \Delta t)} }\ \ \ =&\ {- {\varvec{M}}^{ - 1} \left( { [{{\varvec{\varPhi}}}_{q}^{(t)} ]^{{\text{T}}} {{\varvec{\Lambda}}} - {\varvec{W}}_{{\text{Q}}}^{{({\text{t}})}} - {\varvec{b}}_{1} } \right)}\\ {{\varvec{q}}^{(t + \Delta t)} }\ \ \ =&\ {{\varvec{q}}^{(t)} + [\ {\dot{\varvec{q}}}^{(t)} + {\tilde{\dot{\varvec{q}}}}^{(t + \Delta t)}\ \ ] \cdot \Delta t / 2} \\ {{{\varvec{\varPhi}}}_{q}^{(t + \Delta t)} } \ \ =&\ {\partial {{\varvec{\varPhi}}}({\varvec{q}}^{(t + \Delta t)}, \ t + \Delta t)/\partial {\varvec{q}}} \\ {{\dot{\varvec{q}}}^{(t + \Delta t)} } \ \ \ =&\ {- {\varvec{M}}^{ - 1} \left( { [{{\varvec{\varPhi}}}_{q}^{(t + \Delta t)}\ \ ]^{{\text{T}}}\ {{\varvec{\Lambda}}} - {\varvec{W}}_{{\text{Q}}}^{\ {({\text{t}} + \Delta {\text{t}})}}\ - {\varvec{b}}_{1} } \right)} \\ \end{array} } \right.$$
(34)

where \({\tilde{\dot{\varvec{q}}}}^{(t + \Delta t)}\) denotes the approximate generalized velocity at time t, which is obtained from Φq and WQ at time t. Then, based on the implicit Euler method, the weighted average of \({\tilde{\dot{\varvec{q}}}}^{(t + \Delta t)}\) and \({\dot{\varvec{q}}}^{(t)}\) can be used to obtain \({\varvec{q}}^{(t + \Delta t)}\), as shown in the second formula in Eq. (34). According to the Jacobian matrix definition of bilateral and unilateral constraints, Φq and WQ at moment (t + Δt) can be obtained, and by substituting Φq and WQ in Eq. (31), the generalized velocity at time (t + Δt) denoted as \({\dot{\varvec{q}}}^{(t + \Delta t)}\) can be calculated.

By deriving the above equations, an implicit integration algorithm of the non-smooth dynamic model in the velocity-impulse form is constructed. The steps of the time-stepping method based on implicit integration algorithm are shown in Fig. 1.

Fig. 1
figure 1

Flow chart of time stepping algorithm based on implicit integral algorithm

The time-stepping method steps in Fig. 1 based on the algorithm proposed in this paper can be simply summarized as follows: obtain the system state at time ti and judge whether the distances between the contact surfaces are zero in the normal or tangential directions; if so, use the Newmark implicit iterative scheme to obtain the generalized coordinates and velocity of the system running smoothly at the next moment; otherwise, conclude that contact or a collision has occurred between the components and convert the dynamic equations from Eqs. (6)–(29); after obtaining complementary constraining impulse and composite velocity, calculate the generalized displacement and velocity at the next moment ti+1 in the non-smooth process using Eq. (34) and enter the loop iteration that lasts until the total calculation time is reached.

4 Numerical Experiments

In the previous chapter, the non-smooth dynamic model in LCP form is introduced in detail, as shown in Eq. (29), and the advanced time-stepping method based on the implicit integration algorithm proposed in this paper, as shown in Sect. 3.2. To highlight the characteristics of the proposed non-smooth models based on the implicit integration algorithm, three numerical experiments are presented in this section. The first example is to calculate the swing-collision process of a rigid, simple pendulum, which is used to verify the calculation accuracy of the collision force and the stability to geometric constraints of the proposed algorithm; the second example is a cylindrical hinge with a clearance, and it was used to test the performance of the proposed algorithm in dealing with oblique impact with friction. The third study case is used to test the computational ability of the proposed algorithm for contact processes including stiction-sliding transition. The results of the implicit integration algorithm and Moreau's midpoint method were compared for both cases. Detailed results are presented and discussed in the following sections.

4.1 Collision of Rigid Pendulum

In this section, the collision of a rigid pendulum with both bilateral and unilateral constraints is studied. As shown in Fig. 2, the pendulum consisted of a bar, which was a homogeneous rigid rod. The simple pendulum model is a frequently used case in dynamics research, for example, in [12]. In this section, due to the need to investigate the algorithm's performance for solving non-smooth processes, the collision process is added based on the simple pendulum model. The used system parameters are listed in Table 1. The cross section of the pendulum rod was circular. In static equilibrium, the swing rod was in the vertical position, the horizontal distance between the swing rod and the stop was zero, and there was no force between them. At the initial moment, there was a certain angle between the swing rod and the vertical line. After releasing, the pendulum bar swung clockwise under the action of gravity torque, and the friction at the hinge was zero. When the pendulum reached the vertical position, the swing rod collided with the stop and rebounds.

Fig. 2
figure 2

Simple rigid pendulum system with frictionless collision

Table 1 Parameters of the simple rigid pendulum collision system

In the inertial Cartesian coordinate system xOy with the hinge point as the origin, the non-smooth dynamic model of the system was established according to the modeling method presented in Sect. 3.1. The kinematics of the rigid pendulum was defined by three dependent coordinates as follows \({\varvec{q}} = [x , \;y ,\; \theta ]^{{\text{T}}}\). The bilateral constraint function of the rigid pendulum was given by:

$${{\varvec{\varPhi}}}({\varvec{q}},t) = \left[ {\begin{array}{*{20}c} {x - (L/2)\cos \theta } \\ {y + (L/2)\sin \theta } \\ \end{array} } \right]$$
(35)

The system was time-independent, and the expression of Φ(q, t) did not contain time explicitly, so the bilateral constraint equation of the system could be expressed as Φ(q) = 0. The unilateral constraint function of the pendulum in the collision process was expressed as:

$$\left\{ {\begin{array}{*{20}l} {g_{{\text{N}}} = L \cdot \sin \theta } \hfill \\ {g_{{\text{T}}} = L(1 - \cos \theta )} \hfill \\ \end{array} } \right.$$
(36)

By substituting the corresponding terms in Eqs. (29), the non-smooth dynamics model of a simple pendulum collision process was obtained. After adopting the implicit integration algorithm presented in Sect. 3.2 and setting the time step of the collision process to Δt = 0.005 s, the LCP-based non-smooth dynamic model was solved, and the values of angular displacement and velocity of the free end of the pendulum at different times during the swing-collision process were calculated; the obtained results are shown in Fig. 3.

Fig. 3
figure 3

Angular velocity and displacement of the pendulum bar

As shown in Fig. 3, in the initial state, the pendulum bar was in the horizontal position, and the initial angular velocity was zero. The pendulum rod was released at t = 0; the angular displacement gradually decreased, and the absolute value of the angular velocity gradually increased. Until the first collision occurred, the magnitude and direction of the angular velocity changed suddenly, and the pendulum rod bounced in the opposite direction.

Using the proposed implicit integration algorithm, the collision force impulse at a different time during the collision-bounce process between the pendulum and the block was calculated, and the result is shown in Fig. 4.

Fig. 4
figure 4

The impact force change with time

4.2 Clearance Cylindrical Hinge with Friction Oblique Collision

The 2D structure of the cylindrical hinge with clearance is presented in Fig. 5, where it can be seen that there was a clearance inside the cylindrical hinge connecting the pendulum rod and the bracket. The collision between shaft and hole inside the cylindrical hinge with clearance is the research focus in recent years [58]. The non-smooth model based on the linear complementary method was used to deal with the oblique collision process between the hinge shaft and the hole, and Coulomb’s friction model was used to deal with the friction process in the oblique collision. As shown in Fig. 5, the diameter of the hinge hole was larger than the diameter of the hinge shaft, and the center of the hinge hole was fixed at the Cartesian coordinate origin.

Fig. 5
figure 5

The 2D structure of the cylindrical hinge with clearance

To produce an oblique impact, at the initial moment, points O1 and O were at the same height, and there was a nonzero distance (ΔX) between them in the horizontal direction. The pendulum rod was in the horizontal position at the initial moment, i.e., it coincided with the x-axis. The system parameters and initial configuration settings are listed in Table 2. The tangential contact coefficient eT was zero. After the pendulum body was released from the initial horizontal position, it first was falling freely, and then there was an oblique collision between the hinge shaft and the hole, and the pendulum rod swung at the same time.

Table 2 System parameters and initial configuration settings

There was no bilateral constraint in the system, and when the hinge axis that constructed the clearance fit moved into the hinge hole, the unilateral constraint function was given by:

$$\left\{ {\begin{array}{*{20}l} {g_{{\text{N}}}}\ =&\ {\Delta r\,-\,\sqrt {\left( {x - \frac{l}{2}\sin (\theta )} \right)^{2} + \left( {y - \frac{l}{2}\cos (\theta )} \right)^{2} } } \hfill \\ {g_{{\text{T}}}}\ =&\ {R \cdot \varphi = R \cdot \arctan \left( {\frac{x - l/2 \cdot \sin (\theta )}{{ - (\;y + l/2 \cdot \cos (\theta ))}}} \right)} \hfill \\ \end{array} } \right.$$
(37)

where \(\Delta r = R - r\), which represented the difference between the shaft and hole radius of the cylindrical hinge; angle φ is shown in Fig. 5; and θ was an angle between the axial direction of the rod and the negative direction of the y-axis.

According to the unilateral constraint function, the non-smooth dynamics model was constructed using the method presented in Sect. 2.2, and the implicit integration algorithm introduced in Sect. 3.2 was used to calculate the system state parameters. The trajectory of the hinge axis of the simple pendulum in the first three seconds was obtained. As shown in Fig. 6, the star-shaped point was the initial position of the center of the hinge shaft. The hinge shaft and hinge hole had the first oblique collision at the position denoted by the red dot in Fig. 6. In Fig. 6, the part pointed by the arrow represents the point where the hinge shaft and hinge hole were temporarily separated when φ angle was smaller than –π/2 or larger than π/2 in the swing, and in such a situation, there was a short oblique collision between the shaft and the hole.

Fig. 6
figure 6

Motion track of the center of the hinge shaft

The calculation results of pendulum angular displacement θ and angular velocity \(\dot{\theta }\) are shown in Fig. 7. In Fig. 7, the first horizontal segment of the curve corresponds to the free-fall phase of the pendulum between the star point and the dot, and the short horizontal section in the angular velocity curve corresponds to the stage, wherein the hinge shaft and the hinge hole were temporarily separated. The bar was affected only by the gravity force in the vertical direction, and there was no moment, so the angular velocity did not change. The impact of the collision process on the angular displacement was small but could cause sudden changes in the angular velocity and acceleration. After the collision process terminated, unlike the fixed-axis rotation in the case of an ideal column hinge, the swing process of the pendulum body denoted a plane motion, and there was friction between the hinge axis and the hole. The existence of friction made the amplitudes of the angular displacement and angular velocity gradually decrease.

Fig. 7
figure 7

Angular displacement and velocity of the pendulum bar with clearance hinge

The impact force along the radial direction of the hinge axis and the friction force in the circumferential direction of the hinge axis were calculated using the algorithm proposed in this paper. According to the relationship between the force and impulse, the unilateral restraint force impulse in the normal and tangential directions in a time step was converted into the mean value of the restraint force in two directions, and the curves of the mean values of the normal and tangential contact forces changed with time in all time steps, as shown in Fig. 8.

Fig. 8
figure 8

The radial impact force and tangential friction force of the hinge axis

4.3 Stiction-Sliding State Transform Law of Crank-Slider Mechanism with Friction

This study case is used to verify the computational effect of the algorithm proposed in this paper on the stick–slip transition process. The crank-slider mechanism is shown in Fig. 8, and the system parameters are shown in Table 3. There was a force couple \(P = P_{0} \cdot \sin (\omega t)\) acting on the crank, and the spring did not deform when \(x = - (R + L)\). Ignoring the gap between the slider and the slot, a non-smooth dynamic model was established for the system displayed in Fig. 9, and the proposed implicit integration algorithm was used to solve the model. The results are shown in Figs. 10 and 11.

Table 3 The crank-slider mechanism system parameters
Fig. 9
figure 9

Schematic diagram of the crank-slider mechanism

Fig. 10
figure 10

The variations in the angular displacement and velocity with time under different friction coefficients

Fig. 11
figure 11

The state-space curve under different friction coefficient settings

The mass matrix and generalized force matrix of the system shown in Fig. 9 were expressed as follows:

$${\varvec{M}}\,=\,\left[{\begin{array}{*{20}c}{(\tfrac{1}{3}m_{1}+m_{2} + m_{3})L_{1}^{2}}&{\tfrac{1}{2}(m_{1}+ 2m_{3} )L_{1} L_{2} (\sin \theta_{1} \sin \theta_{2} + \cos \theta_{1} \cos \theta_{2} )} \\ {\tfrac{1}{2}(m_{1} + 2m_{3} )L_{1} L_{2} (\sin \theta_{1} \sin \theta_{2} + \cos \theta_{1} \cos \theta_{2} )} & {(\tfrac{1}{3}m_{2} + m_{3} )L_{2}^{2} } \\ \end{array} } \right]$$
(38)
$${\varvec{h}}\,=\,\left[{\begin{array}{*{20}c} {Q_{1} - \tfrac{1}{2}(m_{2} + 2m_{3} )L_{\;1} L_{\;2} (\sin \theta_{1} \cos \theta_{2} - \cos \theta_{1} \sin \theta_{2} ) \cdot \dot{\theta }_{2}^{2} } \\ {Q_{2} - \tfrac{1}{2}(m_{2} + 2m_{3} )L_{\;1} L_{\;2} (\cos \theta_{1} \sin \theta_{2} - \sin \theta_{1} \cos \theta_{2} ) \cdot \dot{\theta }_{1}^{2} } \\ \end{array} } \right]$$
(39)

where,

$$Q_{1}\,=\,P-\tfrac{1}{2}m_{1}\cdot g\cdot L_{1} \sin \theta_{1} - (m_{2} + m_{3} )\cdot g\cdot L_{1} \sin \theta_{1} - k(L_{1}+L_{2} - L_{1} \cos \theta_{1}-L_{2} \cos \theta_{2} )L_{1} \sin \theta_{1}$$
(40)
$$Q_{2} = - \tfrac{1}{2}m_{2}\cdot g\cdot L_{2} \sin \theta_{2} - m_{3}\cdot g\cdot L_{2} \sin \theta_{2} - k(L_{1} + L_{2} - L_{1} \cos \theta_{1} - L_{2} \cos \theta_{2} )L_{2} \sin \theta_{2}$$
(41)

The calculation results of angular velocity and displacement obtained by the proposed implicit integration algorithm for different friction coefficient values are shown in Fig. 10.

The curves in Fig. 10a, b show the angular displacement and angular velocity of θ1 and θ2 when the value of μ was 0.1. Under this friction coefficient, the stiction-sliding transition did not occur in the crank-slider system. However, when the friction coefficient was from 0.1 to 0.5, the motion state parameters of the crank-slider mechanism changed with time, as shown in Fig. 10c, d, where the occurrence of the stiction-sliding phenomenon can be observed. In addition, the difference in the friction coefficient resulted in different amplitudes of angular displacement and angular velocity.

The calculation results in Fig. 10 indicate that the proposed implicit integration algorithm can calculate the dynamic state of the system accurately when solving non-smooth dynamics problems with friction. The calculation results of the state space of (θ1, \(\dot{\theta }_{1}\)) under two sets of friction coefficient settings are presented in Fig. 11.

4.4 Comparison with Other Algorithms

To test the calculation accuracy and stability of the proposed algorithm, the results of the proposed algorithm were compared with the previously reported results. Namely, to verify the accuracy of the proposed algorithm, the calculation results of the proposed algorithm for the calculation example presented in Sect. 4.1 were compared with the results presented in [30], which also maintained the ability to hold geometric constraints. As for the oblique collision process with friction presented in Sect. 4.2, the proposed method was compared with two other methods, the Moreau midpoint method [33] and the continuous force model [23]. The results of the methods were compared regarding accuracy and efficiency.

As for the example presented in Sect. 4.1, the same parameters were used as in the numerical calculation, and the rigid simple pendulum direct impact system was simulated using RecurDyn® software [59] for multi-body dynamics. The comparison of the angular displacement and angular velocity of the pendulum bar calculated by the two algorithms is shown in Fig. 12.

Fig. 12
figure 12

Comparison between numerical calculation and simulation results

The numerical calculation results were consistent with the simulation results. Namely, after the first collision, the maximum rebound angular displacement and rebound angular velocity obtained by the numerical calculation were slightly larger than those of the simulation results. This was because the continuous contact force model was used in the RecurDyn® software to calculate the collision force between the components, and this model assumed that the interface of an object could undergo tiny penetration during mutual contact or collision, and the collision force consisted of two parts, contact force and damping force composition, both of which denoted a function of the amount of mutual invasion of the interface. Since the damping force in the continuous force model played a role in dissipating energy during the contact or collision process, the simulation result calculated using the penalty function model was slightly smaller than the numerical calculation result. In addition, the curve in Fig. 12 shows that after the first collision, the angular displacement and angular velocity of the pendulum obtained by the two methods had very small errors in the amplitude, but discernible errors appeared at subsequent time points. This was because the basic assumptions of the continuous force model needed to consider the generation process of the interface intrusion and the elimination of the intrusion after the dynamic contact stiffness increased. The time for the occurrence and elimination of the intrusion was considered to cause the accumulation of errors in the total time, making the subsequent collision lag. The inset in Fig. 12a shows that during the first and second collisions, the minimum values of the simulated angular displacement were slightly smaller than zero, indicating that a slight amount of mutual intrusion had occurred between the components.

The example presented in Sect. 4.2 was used to evaluate the calculation efficiency of the proposed implicit integration algorithm and to compare it with those of the Moreau midpoint algorithm and the continuous force model. For the system shown in Fig. 5, the diameter of the hinge hole was kept unchanged, while the ratio of the shaft diameter to the hole diameter was changed, and the initial parameter settings were as given in Table 2. The three methods were used to calculate the value of the contact force during the first oblique collision, and the obtained calculation times are presented in Table 4. The result of the continuous force model was calculated by the RecurDyn® software; the contact type was "ClyInCly," and the minimum time step was 0.0001 s. The results of the other two methods were calculated by the Python program written by the authors, and the time step was 0.005 s.

Table 4 The calculation results of the three methods

Based on the results presented in Table 4, the continuous force model (calculated using RecurDyn) had a smaller time step, and the calculated accuracy was higher compared to the other models. Therefore, the results of the continuous force model were selected as the baseline, and the calculation results of the proposed algorithm and Moreau's midpoint algorithm were compared to verify the calculation efficiency and accuracy of the proposed implicit integration algorithm. By analyzing the data shown in Table 4, the following conclusions can be drawn: as the ratio r/R decreased, the calculation time required by the two algorithms increase; for a specific r/R value, the calculation time of the two algorithms were similar; for the calculation of collision force, the calculation result of the proposed algorithm was closer to the standard value than the result of Moreau's midpoint algorithm. Lastly, as the value of r/R decreased, the error of the result of Moreau's midpoint algorithm increases.

5 Discussion

The calculation of dynamic and kinematic parameters in the contact process seriously depends on the solution of the non-smooth dynamic model (NSDM). The non-smooth dynamic model based on LCP helps to simplify the calculation. However, the traditional integral algorithm like the Moreau midpoint method to solve LCP formed NSDM has low accuracy in solving the contact force. In engineering applications such as space manipulators and folding wing extensions, getting the accurate contact force is urgent. A new implicit integration algorithm is proposed to solve the NSDM in LCP form to meet this requirement. Three numerical experiments are calculated by the implicit integration algorithm constructed in this paper to verify the stability and accuracy of the algorithm. Based on the data in Table 4, in terms of the accuracy of the collision solution, based on the calculation results of RecurDyn software, the relative error of the algorithm proposed in this paper is 1.243%, and the relative error of Moreau's midpoint method is 2.715%; in terms of computing cost, taking the time of the algorithm proposed in the paper as the benchmark, the time needed for RecurDyn was 1.568 times that of the algorithm in this paper, and the time required for Moreau's midpoint method was 0.985 times that of the algorithm in this paper. The reason why Moreau midpoint method takes a short time is that the algorithm in this paper needs to construct the approximate speed on the next time step, which takes extra time. In summary, the implicit integration algorithm proposed in this paper can improve the calculation accuracy while keeping the calculation speed similar to the Moreau midpoint method.

6 Conclusion

In this paper, a linear complementary form of a multi-body system with contact nonlinearity is designed based on the existing velocity-impulse non-smooth dynamic model, and it is used to calculate the contact (impact) process between the internal components of a multi-body system. The non-smooth dynamic model based on the linear complementary form can detect and judge the touch–detachment, hysteresis, and stiction-sliding switching with less computational cost than FEM method, which saves the computational resources needed for event detection.

An implicit integral algorithm is proposed for iteratively solving the LCP-based non-smooth dynamics models, and a time-stepping method is constructed using the proposed implicit integral algorithm. The proposed integral algorithm is based on the implicit Euler method, which uses the real velocity at the previous moment and the approximate velocity at the next moment to construct displacement, update the state variables, and calculate the real velocity at the next moment. Compared with Moreau's midpoint algorithm, the proposed implicit integral algorithm has higher computational accuracy, thus making the time-stepping method based on the proposed algorithm efficient when solving the non-smooth processes involving a single-point collision. Finally, three numerical examples are presented to verify the accuracy and stability of the time-stepping algorithm integrating the proposed integral algorithm. The proposed algorithm is also compared with other algorithms regarding calculation accuracy and stability. The test results of the proposed algorithm are shown in Sects. 4 and 5. The algorithm can stably calculate the contact phenomena including the stick-sliding transition process; compared with the Moreau midpoint method, the method has higher accuracy. Therefore, the algorithm proposed in this paper is suitable for engineering practices that require an accurate solution of contact forces, such as aerospace manipulators, military manufacturing, etc.

The deficiency of this paper lies in that the spatial friction cone is linearized based on Coulomb friction law, and the influence trend of other friction models on the calculation results is not fully considered. This problem will be studied deeply and carefully in the following research work.