# Long Time Simulation Analysis of Geometry Dynamics Model under Iteration
## 5 Dynamics Modeling of a 3D Pendulum  
Based on the dynamics analysis of a planer pendulum, the dynamics modeling for a 3D pendulum was derived with Lie group and Lie algebra theory. The model of a 3D pendulum is shown in Figure 4. The 3D pendulum means that the pendulum has three degrees of freedom which can rotate along the pivot \(O\) in space, and C is the center of mass. \(\rho_{C}\) is the position vector of the center of mass. The dynamics equation of 3D pendulum is Equation (68). \[ \begin{array}{l}\mathbf{J}_{C}\dot{\omega}_{C}+\mathbf{S}( \mathbf{\omega}_{C})\cdot\mathbf{J}_{C}\mathbf{ \omega}_{C}-m_{C}gS(\rho_{C})\mathbf{R}_{C}^{T}\mathbf{e}_{3 }=\mathbf{0}_{3\times 1}\\ \mathbf{R}_{C}-\mathbf{R}_{C}\mathbf{S}(\mathbf{\omega}_{C})=\mathbf{0}_{3\times 3}\end{array}  \tag{67}\]  
\(\mathbf{J}_{C}\) is the rotational inertia, \(\omega_{C}\) is angular velocity along the inertia's principle axis and \(\mathbf{R}_{C}\) is the attitude matrix. Using \(\Delta\omega_{C,k},\mathbf{F}_{C,k}\) as variables, the discrete regular is as Equation (69), which is similar to Equations (35) and (36). \[ \begin{array}{l}\mathbf{\omega}_{C,k+\frac{1}{2}}=\mathbf{ \omega}_{C,k}+\frac{\Delta\omega_{C,k}}{2},\mathbf{R}_{C,k+1}=\mbox {\boldmath$R$}_{C,k}\mathbf{F}_{C,k},\dot{\mathbf{\omega}}_ {C,k+\frac{1}{2}}=\frac{\Delta\omega_{C,k}}{h},\\ \mathbf{R}_{C,k+\frac{1}{2}}=\frac{1}{2}\mathbf{R}_{C,k}( \mathbf{F}_{C,k}+\mathbf{I}),\mathbf{R}_{C,k+\frac {1}{2}}=\frac{1}{h}\mathbf{R}_{C,k}(\mathbf{F}_{C,k}-\mathbf{I})\end{array}  \tag{68}\]  
Let \(\mathbf{R}_{C}^{T}\mathbf{e}_{3}=-S(\mathbf{\omega$ }_{C})\mbox{\boldmath$R}_{C}^{T}\mathbf{e}_{3}\). Substitute Equation (69) into Equation (68), and the dynamics equation of central difference type is Equation (70). \[ \begin{array}{l}\mathbf{K}_{1}\Delta\omega_{C,k}+h\mathbf{S }(\Delta\omega_{C,k})\mathbf{J}_{C}\Delta\omega_{C,k}-\mathbf{K}_{4}\mathbf{F}_{C,k}^{T}\mathbf{K}_{3}+\mathbf{K}_{2}=\mathbf{0}\\ \Big{(}\mathbf{K}_{6}\mathbf{F}_{C,k}^{T}+\mathbf{h} \mathbf{S}(\Delta\omega_{C,k})\Big{(}\mathbf{F}_{C,k}^{T}+ \mathbf{I}\Big{)}\Big{)}\mathbf{K}_{3}+\mathbf{K} _{5}=0\end{array}  \tag{69}\]  
\(\mathbf{K}_{1}=4\mathbf{J}_{C}-2h\mathbf{S}(\mathbf{J}_{C}\omega_{C,k})+2h\mathbf{S}(\mathbf{\omega$ }_{C,k})\mbox{\boldmath$J}_{C},\mathbf{K}_{2}=4h\mathbf{S}( \mathbf{\omega}_{C,k})\mathbf{I}_{C}\omega_{C,k}-2 hm_{C}gS( \rho_{C})\mathbf{K}_{3}\),  
\(\mathbf{K}_{3}=\mathbf{R}_{C,k}^{T}\mathbf{e}_{3}, \mathbf{K}_{4}=2 hm_{C}gS(\rho_{C}),\mathbf{K}_{5}=2h\mathbf{S}(\mathbf{\omega}_{C,k})\mathbf{K}_{3}-4\mathbf{K}_{3},\mathbf{K}_{6}=4\mathbf{I}+2h\mathbf{S}(\mathbf{\omega}_{C,k})\)  
Let \(\mathbf{F}_{C,k}^{T}\mathbf{K}_{3}=\mathbf{X}\). Substitute it into Equation (70) to obtain the simplifier dynamics equation. \[ \begin{array}{l}\mathbf{K}_{1}\Delta\omega_{C,k}+h\mathbf{S$ }(\Delta\omega_{C,k})\mbox{\boldmath$I}_{C}\Delta\omega_{C,k}-\mathbf{K}_{4}\mathbf{X}+\mathbf{K}_{2}=\mathbf{ 0}\\ \mathbf{K}_{6}\mathbf{X}+h\mathbf{S}(\Delta\omega_{C,k}) \mathbf{X}+h\mathbf{S}(\Delta\omega_{C,k})\mathbf{ K}_{3}+\mathbf{K}_{5}=\mathbf{0}\end{array}  \tag{70}\]  
Figure 4: 3D rigid pendulum. Then, the dynamics equation changes to be a nonlinear equation with variables of \(\Delta\omega_{C,k}\) and \(X\). In order to obtain the Jacobi matrix, the variation of Equation (71) is Equation (72). \[\left\{ \begin{array}{l}K_{1}\delta\Delta\omega_{C,k}+h\mathsf{S}(\delta \Delta\omega_{C,k})\mathsf{J}_{C}\Delta\omega_{C,k}+h\mathsf{S}(\Delta\omega_{ C,k})\mathsf{J}_{C}\delta\Delta\omega_{C,k}-\mathsf{K}_{4}\delta X=0\\ K_{6}\delta X+h\mathsf{S}(\delta\Delta\omega_{C,k})\mathbf{X}+h\mathsf{S}( \Delta\omega_{C,k})\delta X+h\mathsf{S}(\delta\Delta\omega_{C,k})K_{3}+\mathsf{ K}_{5}=0\end{array} \right. \tag{71}\]  
Next, we change Equation (72) to matrix type:  
\[\mathbf{H}\left[ \begin{array}{c}\delta\Delta\omega_{C,k}\\ \delta\mathbf{X}\end{array} \right]=\mathbf{0}_{6\times 1} \tag{72}\]  
\(\mathbf{H}\) is a Jacobi matrix of Equation (71), which is a \(6\times 6\) matrix. \[\mathbf{H}=\left[