# Design and Dynamic Simulation Verification of an On-Orbit Operation-Based Modular Space Robot
## 3 Dynamic Modeling of Spatial Modular Robot Based on R-W Method
### Attitude Motion of Each Rigid Body in the System  
For a tree system composed of \(N\) rigid bodies, the adjacent rigid body associated with joint \(H_{i}(i=1,\cdot\cdot\cdot,N)\) is denoted as \(B_{j}\) and \(B_{i}\) (\(B_{j}\) is internal rigid body of \(B_{i}\)) whose conjoined base are \(\underline{e}^{i}\) and \(\underline{e}^{i}\), respectively. Dynamic base \(\underline{e}^{h}\) of \(H_{i}\) is fixed to point \(P\) of the rigid body \(B_{i}\). The generalized coordinate matrix of this joint is recorded as \(\underline{q}^{i}\). In local basis \(\underline{e}^{h_{0}}\), the constant directional matrices of \(\underline{e}^{i}\) and \(\underline{e}^{h}\) are written as \(\underline{Q}^{i}\) and \(\underline{P}^{i}\). The direction cosine matrix of the dynamic base \(\underline{e}^{h}\) of joint \(H_{i}\) with respect to the reference base \(\underline{e}^{h_{0}}\) is recorded as \(\underline{A}^{h}_{i}\). The direction cosine matrix of the rigid body \(B_{i}\) relative to \(B_{j}\) is \(\underline{A}^{ji}=\underline{Q}^{i}\underline{A}^{h}_{i}\underline{P}^{j}\). Relative kinematics relationship between adjacent rigid bodies in tree systems is shown in Figure 14.  
The relative attitude of the adjacent rigid body depends on the joint's orientation matrix, which is a function of the joint's generalized coordinates. If the degrees of freedom of each joint of the system are \(\delta_{i}\), the motion of the system will be described by the generalized coordinate matrix of the system composed of the generalized coordinates of each joint. The attitude of a rigid body \(B_{i}(i=1,\cdot\cdot\cdot,N)\) with respect to the overall base of the system can be described by its cosine matrix with respect to the overall base direction of the system. Due to the properties of the directional cosine matrix, with the help of the inscribed rigid body array \(L(i)\), the rigid body has the following recursive formula for the directional cosine matrix \(\underline{A}^{i}\):  
Figure 14: Relative kinematics relationship between adjacent rigid bodies. \[\underline{A}^{i}= \begin{cases}\underline{A}^{0}\underline{A}^{01}&i=1\\ \underline{A}^{L(i)}\underline{A}^{L(i)i}&i=2\ldots,N\end{cases}  \tag{1}\]  
where \(\underline{A}^{0}\) is the cosine matrix of the root object with respect to the overall base direction of the system. The direction cosine matrix of the local basis of joint \(H_{i}\) is recorded as \(\underline{A}_{i}^{h_{0}}\) and the direction cosine matrix is a function of the generalized coordinates of all joints on the road, i.e., \(\underline{A}_{i}^{h_{0}}=\underline{A}^{L(i)}\underline{Q}^{L(i)}\). The absolute angular velocity of the rigid body \(B_{i}(i=1,\cdots,N)\) is recorded as \(\mathbf{\omega}_{i}\). Based on the angular velocity superposition principle, the absolute angular velocity of the rigid body \(B_{i}\) can be expressed as the following vector recursion formula. \[\mathbf{\omega}_{r}= \begin{cases}\mathbf{\omega}_{r}+\mathbf{\omega}_{0}&i=1\\ \mathbf{\omega}_{ri}+\mathbf{\omega}_{l(i)}&i=2\ldots,N\end{cases}  \tag{2}\]  
where \(\mathbf{\omega}_{0}\) is the absolute angular velocity of the root object. From another perspective, the absolute angular velocity of \(B_{i}\) is the vector sum of the relative angular velocities and \(\mathbf{\omega}_{0}\) of all rigid bodies on path \(B_{i}\) to \(B_{0}\). According to the definition of the path matrix, considering that the path matrix element corresponding to the joint \(H_{k}\) not on path \(B_{i}\) to \(B_{0}\) is zero, the absolute angular velocity of the rigid body \(B_{i}\) can also be expressed as:  
\[\mathbf{\omega}_{i}=\sum_{B_{k}\in(B_{i})}\mathbf{\omega}_{rk}+\mathbf{\omega}_{0}=-\sum_{ k=1}^{N}T_{ki}\mathbf{\omega}_{rk}+\mathbf{\omega}_{0}\quad(i=1,\ldots,N) \tag{3}\]  
The negative sign in the formula is because for regular labels, the elements of the path matrix are negative.