# Nonlinear Analysis and Reliability Analysis of Multilink Mechanism Considering Mixed Clearance
## 3 Establishment of Rigid Body Dynamics Model for Mechanisms with Clearances
### Establishment of a Rigid Body Dynamics Model with Mixed Clearances
\begin{array}{l}x_{1}-L_{s1}\cos\theta_{1} \\ y_{1}-L_{s1}\sin\theta_{1}\\ x_{3}+L_{BO3}\cos(\theta_{3}-\beta_{1})-x_{2}-L_{s2}\cos\theta_{2}\\ y_{3}+L_{BO3}\sin(\theta_{3}-\beta_{1})-y_{2}-L_{s2}\sin\theta_{2}\\ x_{3}+L_{CO3}\cos(\theta_{3}-\beta_{2})-H_{ocx}\\ y_{3}+L_{CO3}\sin(\theta_{3}-\beta_{2})-H_{ocy}\\ x_{3}-L_{DO3}\cos(\theta_{3}-\beta_{3})-x_{4}+L_{s4}\cos\theta_{4}\\ y_{3}-L_{DO3}\sin(\theta_{3}-\beta_{3})-y_{4}+L_{s4}\sin\theta_{4}\\ x_{5}+L_{s5}\cos\theta_{5}-x_{4}-L_{s4}\cos\theta_{4}\\ y_{5}+L_{s5}\sin\theta_{5}-y_{4}-L_{s4}\sin\theta_{4}\\ x_{6}-L_{s6}\cos\theta_{6}-x_{5}-L_{s5}\cos\theta_{5}\\ y_{6}-L_{s6}\sin\theta_{6}-y_{5}-L_{s5}\sin\theta_{5}\\ x_{7}-x_{6}-L_{s6}\cos\theta_{6}\\ y_{7}-y_{6}-L_{s6}\sin\theta_{6}\\ \theta_{1}-\omega_{1}t-4.2692\end{array} \right]=\mathbf{0} \tag{39}\]  
where 4.2649 represents the radian value of the initial direction angle obtained when crank 1 rotates counterclockwise from the \(x\)-axis. By taking the first-order derivative with respect to time of Equation (39), the velocity constraint equation of the system can be obtained as follows:  
\[\mathbf{\Phi}_{\dot{q}}\dot{\boldsymbol{q}}=-\mathbf{\Phi}_{t}\equiv \boldsymbol{v} \tag{40}\]  
Figure 8: Structural diagram of an eight-bar planar mechanism with mixed clearances. where \(\mathbf{\Phi}_{q}\) represents Jacobian matrix, \(\mathbf{\Phi}_{q}=\frac{\partial\mathbf{\Phi}}{\partial\mathbf{\dot{q}}}\) and \(\mathbf{\Phi}_{t}\) represents derivate of bound equation with respect to time, \(\mathbf{\Phi}_{t}=\frac{\partial\mathbf{\Phi}}{\partial t}\). Jacobian matrix \(\mathbf{\Phi}_{q}\) of an institution can be represented as:  
\[\mathbf{\Phi}_{q}=\left(\mathbf{\Phi}_{q1},\mathbf{\Phi}_{q2},\mathbf{\Phi}_{ q3},\cdots,\mathbf{\Phi}_{q19},\mathbf{\Phi}_{q20},\mathbf{\Phi}_{q21}\right) \tag{41}\]  
When a rigid body mechanism has mixed dearances, the time partial derivative of the constraining equation is written as:  
\[\mathbf{\Phi}_{t}=\frac{\partial\mathbf{\Phi}}{\partial t}=\left[\mathbf{0}_ {1\times 14}-\omega_{1}\right]^{\mathrm{T}} \tag{42}\]  
Differentiating Equation (40) by time yields the equation of acceleration constraints:  
\[\mathbf{\Phi}_{q}\ddot{q}=-\left(\mathbf{\Phi}_{q}\dot{q}\right)_{\dot{q}} \dot{q}-2\mathbf{\Phi}_{q1}\dot{q}-\mathbf{\Phi}_{tt}\equiv\mathbf{\gamma} \tag{43}\]  
where \(\mathbf{\Phi}_{qt}=\mathbf{0}_{15\times 21}\), \(\mathbf{\Phi}_{tt}=\mathbf{0}_{15\times 1}\). Establish system dynamics equations based on the Lagrange multiplication:  
\[\mathbf{M}\ddot{q}+\mathbf{\Phi}_{q}^{\mathrm{T}}\mathbf{\lambda}=g \tag{44}\]  
where the matrix \(\mathbf{M}\) represents mass matrix, \(\mathbf{\lambda}\) is a column vector of Lagrange multipliers, which accounts for internal forces and moments between components connected by revolute joints, and \(g\) denotes column vector of generalized external forces. Quality matrix of the system is written as:  
\[\mathbf{M}=\mathrm{diag}(m_{1}\;m_{1}\;J_{1}\;m_{2}\;m_{2}\;J_{2}\cdot\cdots m _{6}\;m_{6}\;J_{6}\;m_{7}\;m_{7}\;J_{7}) \tag{45}\]  
From Equations (43) and (44), system dynamics equations are expressed as follows:  
\[ \begin{pmatrix}\mathbf{M}&\mathbf{\Phi}_{q}^{\mathrm{T}}\\ \mathbf{\Phi}_{q}&\mathbf{0}\end{pmatrix}\begin{pmatrix}\;\ddot{q}\\ \;\mathbf{\lambda}\end{pmatrix} = \begin{pmatrix}\;g\\ \;\mathbf{\gamma}\end{pmatrix}  \tag{46}\]  
From Equation (46), it can solve for the two variables \(\ddot{q}\) and \(\mathbf{\lambda}\). However, Equation (46) involves no displacement and velocity constraints, which can lead to constraint violations and computational divergence when solving the equation. Based on this phenomenon, an algorithm for constraint stabilization was introduced by [PERSON] that acceleration constraint equation contains both displacement and velocity constraints in order to enhance the stability of the solution. The resulting new dynamic equation is as follows:  
\[ \begin{pmatrix}\mathbf{M}&\mathbf{\Phi}_{q}^{\mathrm{T}}\\ \mathbf{\Phi}_{q}&\mathbf{0}\end{pmatrix}\begin{pmatrix}\;\ddot{q}\\ \;\mathbf{\lambda}\end{pmatrix}