# Design and Modelling of an Amphibious Spherical Robot Attached with Assistant Fins
## 3 Dynamic Model of the Robot
### Kinematics  
Kinematic parameters that are necessary for deducing the dynamic equations, i.e., the translational velocities of the center of mass of each rigid body and the angular velocities with respect to each center of mass, are presented in the following. Let \(\mathbf{r}_{O}=(x,y,z)\) be the position vector of the geometric center of the spherical shell \(O\) whose velocity is \(\dot{\mathbf{r}}_{O}=(\dot{x},\dot{y},\dot{z})\), \(\mathbf{r}_{P}=(x_{P},y_{P},z_{P})\) be the position vector of the center of mass of the IDU platform whose velocity equals to \(\dot{\mathbf{r}}_{O}\), i.e., \(\dot{\mathbf{r}}_{P}=\dot{\mathbf{r}}_{O}\), and \(\mathbf{r}_{A}=(x_{A},y_{A},z_{A})\) be the position vector of the center of mass of the rotator \(A\). Let \(\,{}^{D}\mathbf{r}_{OA}=(0,0,-l_{OA})\) denote the position vector of the point \(A\) with respect to the \(O_{D}\)-\(X_{D}Y_{D}Z_{D}\) frame; \(\mathbf{r}_{A}\) then is  
\[\mathbf{r}_{A}=\mathbf{r}_{O}+\,{}^{U}_{D}\mathbf{R}^{D}\mathbf{r}_{OA}, \tag{1}\]  
where \(\,{}^{U}_{D}\mathbf{R}\in SO(3)\) denotes the rotation matrix between the \(U\)-\(XYZ\) frame and the \(O_{D}\)-\(X_{D}Y_{D}Z_{D}\) frame, which can be expressed in terms of the Euler angles, that is,  
\[\,{}^{U}_{D}\mathbf{R}=\left[ \begin{array}{ccc}\text{c}\psi c\theta&-\text{s} \psi c\phi+\text{c}\psi s\theta\phi&\text{s}\psi s\phi+\text{c}\psi c\phi s \theta\\ \text{s}\psi c\theta&\text{c}\psi c\phi+\text{s}\psi s\theta s\phi&-\text{c} \psi s\phi+\text{s}\theta s\psi c\phi\\ -\text{s}\theta&\text{c}\theta s\phi&\text{c}\theta c\phi\end{array} \right], \tag{2}\]  
where c\(\phi\) is the shorthand for \(\cos\phi\), \(\phi\) for \(\sin\phi\), and so on. Substituting \(\,{}^{U}_{D}\mathbf{R}\) into Equation (1), we get  
\[\mathbf{r}_{A}=(x-(\text{s}\psi\text{s}\phi+\text{c}\psi c\phi s\theta)|_{OA},y-( -\text{c}\psi s\phi+\text{s}\theta\text{s}\psi c\phi)|_{OA},z-\text{c}\theta c \phi|_{OA}). \tag{3}\]  
The velocity of the rotator's center of mass \(\dot{\mathbf{r}}_{A}\) can be obtained by differentiating \(\mathbf{r}_{A}\), its three components are  
\[ \begin{array}{l}\dot{x}_{A}=\dot{x}-\left(\text{c}\phi s\psi\left(\dot{\phi} -\dot{\psi}\text{s}\theta\right)+\text{s}\phi c\psi\left(\dot{\psi}-\dot{ \phi}\text{s}\theta\right)+\dot{\theta}c\phi c\psi c\theta\right)|_{OA}\\ \dot{y}_{A}=\dot{y}-\left(\text{s}\phi s\psi\left(\dot{\psi}-\dot{\phi}\text{ s}\theta\right)-\text{c}\phi c\psi\left(\dot{\phi}-\dot{\psi}\text{s}\theta \right)+\dot{\theta}c\phi s\psi c\theta\right)|_{OA}\\ \dot{z}_{A}=\dot{z}+\left(\dot{\theta}c\phi s\theta+\dot{\phi}s\text{c}\theta \right)|_{OA}\end{array}  \tag{4}\]  
As the rotation matrix \(\,{}^{U}_{D}\mathbf{R}\) is an orthonormal matrix, \(\,{}^{U}_{D}\mathbf{R}^{-1}=\,{}^{U}_{D}\mathbf{R}^{\text{T}}\), so  
\[\,{}^{U}_{D}\mathbf{R}\,{}^{U}_{D}\mathbf{R}^{\text{T}}=\mathbf{I}_{3\times 3}. \tag{5}\]  
Differentiating both sides of Equation (5), we have  
\[\,{}^{U}_{D}\dot{\mathbf{R}}\,{}^{U}_{D}\mathbf{R}^{\text{T}}+\left(\,{}^{U}_{D}\dot{ \mathbf{R}}\,{}^{U}_{D}\mathbf{R}^{\text{T}}\right)^{\text{T}}=0. \tag{6}\]  
If we define \(\,{}^{U}_{D}\dot{\mathbf{R}}\,{}^{U}_{D}\mathbf{R}^{\text{T}}\), then \(\,{}^{S}_{p}+\,{}^{S}_{p}=0\). So \(\,{}^{S}_{p}\in so(3)\) is an anti-symmetric matrix whose diagonal elements are all zero:  
\[\,{}^{S}_{p}=\left[ \begin{array}{ccc}0&-\dot{\psi}+\dot{\psi}\text{s}\theta &\dot{\theta}c\psi+\dot{\phi}\text{s}\psi c\theta\\ \dot{\psi}-\dot{\phi}\text{s}\theta&0&-\dot{\phi}c\psi c\theta+\dot{\theta}s \psi\\ -\dot{\theta}c\psi-\dot{\phi}\text{s}\psi c\theta&\dot{\theta}c\psi c\theta- \dot{\theta}s\psi&0\end{array} \right]. \tag{7}\]The matrix \(S_{p}\) can be made up from \(\mathbf{\omega}_{p}=\left(\omega_{px},\omega_{py},\omega_{pz}\right)\), the angular velocity of the IDU platform with respect to the \(U\)-\(XYZ\) frame, that is,  
\[S_{p}=\overset{\mathbf{\wedge}}{\mathbf{\omega}}_{p}=\left[ \begin{array}{ccc}0&- \omega_{pz}&\omega_{py}\\ \omega_{pz}&0&-\omega_{px}\\ -\omega_{py}&\omega_{px}&0\end{array} \right].