# Long Time Simulation Analysis of Geometry Dynamics Model under Iteration
## 5 Dynamics Modeling of a 3D Pendulum
\begin{array}{cc}\mathbf{K}_{1}+h\mathsf{S}(\Delta\omega_{C,k}) \mathsf{J}_{C}-h\mathsf{S}(\mathsf{J}_{C}\Delta\omega_{C,k})&-\mathsf{K}_{4} \\ -h\mathsf{S}(\mathbf{X}+\mathsf{K}_{3})&\mathsf{K}_{6}+h\mathsf{S}(\Delta\omega_{C, k})\end{array} \right] \tag{73}\]  
The reduced dynamics equation is Equation (75). \[ \begin{array}{l}J_{C}\dot{\omega}_{C}+\mathsf{S}(\omega_{C})\cdot\mathsf{J} _{C}\omega_{C}-m_{C}g\mathsf{S}(\rho_{C})\mathbf{\Gamma}_{C}=\mathbf{0}\\ \dot{\Gamma}_{C}=-\mathsf{S}(\omega_{C})\mathbf{\Gamma}_{C}\end{array}  \tag{74}\]  
Define the discrete regular as Equation (76). \[ \begin{array}{l}\mathbf{\Gamma}_{C+\frac{1}{2}}=\frac{1}{2}(\mathbf{\Gamma}_{C,k+1} +\mathbf{\Gamma}_{C,k}),\dot{\mathbf{\Gamma}}_{C,k+\frac{1}{2}}=\frac{1}{h}(\mathbf{ \Gamma}_{C,k+1}-\mathbf{\Gamma}_{C,k}),\\ \mathbf{\omega}_{C,k+\frac{1}{2}}=\frac{1}{2}(\mathbf{\omega}_{C,k+1}+\omega_{C,k}), \dot{\mathbf{\omega}}_{C,k+\frac{1}{2}}=\frac{1}{h}(\mathbf{\omega}_{C,k+1}-\mathbf{ \omega}_{C,k})\end{array}  \tag{75}\]  
Then, the dynamics equation with \(\mathbf{\omega}_{C,k+1}\) and \(\mathbf{\Gamma}_{C,k+1}\) as variables is Equation (77). \[ \begin{array}{l}4\mathsf{J}_{C}\mathbf{\omega}_{C,k+1}+h\mathsf{S}(\mathbf{\omega}_ {C,k+1})\mathsf{J}_{C}\mathbf{\omega}_{C,k+1}+h\mathsf{S}(\mathbf{\omega}_{C,k}) \mathsf{J}_{C}\mathbf{\omega}_{C,k+1}+h\mathsf{S}(\mathbf{\omega}_{C,k+1})\mathsf{J}_ {C}\mathbf{\omega}_{C,k}\\ -2 hm_{C}g\mathsf{S}(\rho_{C})\mathbf{\Gamma}_{C,k+1}+\mathsf{Q}_{A}=0\\ 4\mathsf{T}_{C,k+1}+h\mathsf{S}(\mathbf{\omega}_{C,k+1})\mathbf{\Gamma}_{C,k+1}+h \mathsf{S}(\mathbf{\omega}_{C,k+1})\mathbf{\Gamma}_{C,k}+h\mathsf{S}(\mathbf{\omega}_{C,k} )\mathbf{\Gamma}_{C,k+1}+\mathbf{Q}_{B}=0\end{array}  \tag{76}\]  
By combining the same item together, the nonlinear equation changes to Equation (78). \[ \begin{array}{l}\mathbf{Q}_{C}\omega_{C,k+1}-\mathbf{Q}_{D}\mathbf{\Gamma}_{C,k+1}+h \mathsf{S}(\mathbf{\omega}_{C,k+1})\mathsf{J}_{C}\mathbf{\omega}_{C,k+1}+\mathbf{Q}_{A}= \mathbf{0}\\ \mathbf{Q}_{E}\mathbf{\Gamma}_{C,k+1}+h\mathsf{S}(\mathbf{\omega}_{C,k+1})(\mathbf{\Gamma}_{C,k +1}+\mathbf{\Gamma}_{C,k})+\mathbf{Q}_{B}=\mathbf{0}\end{array}  \tag{77}\]  
The expression levels of parameters \(\mathbf{Q}_{A},\mathbf{Q}_{B},\mathbf{Q}_{C},\mathbf{Q}_{D},\mathbf{Q}_{E}\) in Equation (78) are as follows. \[ \begin{array}{l}\mathbf{Q}_{A}=h\mathsf{S}(\mathbf{\omega}_{C,k})\mathsf{J}_{C}\mathbf{ \omega}_{C,k}-4\mathsf{J}_{C}\mathbf{\omega}_{C,k}-2 hm_{C}g\mathsf{S}(\rho_{C})\mathbf{ \Gamma}_{C,k},\mathbf{Q}_{B}=h\mathsf{S}(\mathbf{\omega}_{C,k})\mathbf{\Gamma}_{C,k}-4 \mathbf{\Gamma}_{C,k},\\ \mathbf{Q}_{C}=4\mathsf{J}_{C}+h\mathsf{S}(\mathbf{\omega}_{C,k})\mathsf{J}_{C}-h \mathsf{S}(\mathsf{J}_{C}\mathbf{\omega}_{C,k}),\mathbf{Q}_{D}=2 hm_{C}g\mathsf{S}(\rho_{C })\mathbf{Q}_{E}=4\mathsf{I}+h\mathsf{S}(\mathbf{\omega}_{C,k})\end{array}  \tag{78}\]  
Equation (79) is the variant of Equation (78) of matrix type. \[\mathbf{T}\left[ \begin{array}{c}\delta\mathbf{\omega}_{C,k+1}\\ \delta\mathbf{\Gamma}_{C,k+1}\end{array} \right]=\mathbf{0} \tag{79}\]  
\(\mathbf{T}\) is the Jacobi matrix in Equation (80). \[\mathbf{T}=\left[ \begin{array}{cc}\mathbf{Q}_{C}-h\mathsf{S}(\mathsf{J}_{C}\mathbf{ \omega}_{C,k+1})+h\mathsf{S}(\mathbf{\omega}_{C,k+1})\mathsf{J}_{C}&-\mathbf{Q}_{D}\\ -h\mathsf{S}(\mathbf{\Gamma}_{C,k+1}+\mathbf{\Gamma}_{C,k})&\mathbf{Q}_{E}+h\mathsf{S}(\mathbf{ \omega}_{C,k+1})\end{array} \right] \tag{80}\]  
According to Figure 5, the dynamics parameters of the planer pendulum are damped as the simulation time increases under the Runge-Kutta method. The simulation results under the difference method conserve the long-term stability of the attitude and angular velocity. The comparisons between the first and last 5 s for these two methods are shown in Figures 6 and 7, respectively. At the beginning of the calculation, the two results coincide, but in the last 5 s as in Figure 7, the differences between these two methods are obvious--not only the amplitude, but also the time period.