Dynamics of a Spinning Symmetric Rigid Body


In [1]:
from miscpy.utils.sympyhelpers import *
init_printing()
th,psi,thd,psidd,thdd,psidd,Omega,I1,I2,t,M1,C = \
symbols('theta,psi,thetadot,psidot,thetaddot,psiddot,Omega,I_1,I_2,t,M_1,C')
diffmap = {th:thd,psi:psid,thd:thdd,psid:psidd}

Spinning Symmetric Rigid Body setup: The body's orientation in inertial frame $\mathcal I$ is described by a 3-1-2 $(\psi,\theta,\phi)$ rotation: the body is rotated by angle $\psi$ about $\mathbf e_3$ (creating intermediate frame $\mathcal A$), by an angle $\theta$ about $\mathbf a_1$ (creating intermediate frame $\mathcal B$), and finally spinning about $\mathbf b_2 \equiv \mathbf c_2$ at a rate $\Omega \equiv \dot\phi$, creating body-fixed frame $\mathcal C$. Note that while the body fixed frame is $\mathcal C$, all computations here are performed in $\mathcal B$ frame components.

${}^\mathcal{B}C^\mathcal{A}$:


In [2]:
bCa = rotMat(1,th);bCa


Out[2]:
$$\left[\begin{matrix}1 & 0 & 0\\0 & \cos{\left (\theta \right )} & \sin{\left (\theta \right )}\\0 & - \sin{\left (\theta \right )} & \cos{\left (\theta \right )}\end{matrix}\right]$$

$\left[{}^\mathcal{I}\boldsymbol{\omega}^\mathcal{B}\right]_\mathcal{B}$:


In [3]:
iWb_B = bCa*Matrix([0,0,psid])+ Matrix([thd,0,0]); iWb_B


Out[3]:
$$\left[\begin{matrix}\dot{\theta}\\\dot{\psi} \sin{\left (\theta \right )}\\\dot{\psi} \cos{\left (\theta \right )}\end{matrix}\right]$$

${}^\mathcal{I}\boldsymbol{\omega}^\mathcal{C} = {}^\mathcal{I}\boldsymbol{\omega}^\mathcal{B} + {}^\mathcal{B}\boldsymbol{\omega}^\mathcal{C}$.

$\left[{}^\mathcal{I}\boldsymbol{\omega}^\mathcal{C}\right]_\mathcal{B}$:


In [4]:
iWc_B = iWb_B +Matrix([0,Omega,0]); iWc_B


Out[4]:
$$\left[\begin{matrix}\dot{\theta}\\\Omega + \dot{\psi} \sin{\left (\theta \right )}\\\dot{\psi} \cos{\left (\theta \right )}\end{matrix}\right]$$

$\left[ \mathbb I_G \right]_\mathcal B$:


In [5]:
IG_B = diag(I1,I2,I1);IG_B


Out[5]:
$$\left[\begin{matrix}I_{1} & 0 & 0\\0 & I_{2} & 0\\0 & 0 & I_{1}\end{matrix}\right]$$

$\left[{}^\mathcal{I} \mathbf h_G\right]_\mathcal{B}$:


In [6]:
hG_B = IG_B*iWc_B; hG_B


Out[6]:
$$\left[\begin{matrix}I_{1} \dot{\theta}\\I_{2} \left(\Omega + \dot{\psi} \sin{\left (\theta \right )}\right)\\I_{1} \dot{\psi} \cos{\left (\theta \right )}\end{matrix}\right]$$

$\vphantom{\frac{\mathrm{d}}{\mathrm{d}t}}^\mathcal{I}\frac{\mathrm{d}}{\mathrm{d}t} {}^\mathcal{I} \mathbf h_G = \vphantom{\frac{\mathrm{d}}{\mathrm{d}t}}^\mathcal{B}\frac{\mathrm{d}}{\mathrm{d}t} {}^\mathcal{I} \mathbf h_G + {}^\mathcal{I}\boldsymbol{\omega}^\mathcal{B} \times \mathbf h_G$.

$\left[\vphantom{\frac{\mathrm{d}}{\mathrm{d}t}}^\mathcal{I}\frac{\mathrm{d}}{\mathrm{d}t} {}^\mathcal{I} \mathbf h_G\right]_\mathcal{B}$:


In [7]:
dhG_B = difftotalmat(hG_B,t,diffmap) + skew(iWb_B)*hG_B; dhG_B


Out[7]:
$$\left[\begin{matrix}I_{1} \dot{\psi}^{2} \sin{\left (\theta \right )} \cos{\left (\theta \right )} + I_{1} \ddot{\theta} - I_{2} \dot{\psi} \left(\Omega + \dot{\psi} \sin{\left (\theta \right )}\right) \cos{\left (\theta \right )}\\I_{2} \left(\ddot{\psi} \sin{\left (\theta \right )} + \dot{\psi} \dot{\theta} \cos{\left (\theta \right )}\right)\\I_{1} \ddot{\psi} \cos{\left (\theta \right )} - 2 I_{1} \dot{\psi} \dot{\theta} \sin{\left (\theta \right )} + I_{2} \dot{\theta} \left(\Omega + \dot{\psi} \sin{\left (\theta \right )}\right)\end{matrix}\right]$$

Note that the $\mathbf b_2$ component of ${}^\mathcal{I}\boldsymbol{\omega}^\mathcal{B} \times \mathbf h_G$ is zero:


In [11]:
skew(iWb_B)*hG_B


Out[11]:
$$\left[\begin{matrix}I_{1} \dot{\psi}^{2} \sin{\left (\theta \right )} \cos{\left (\theta \right )} - I_{2} \dot{\psi} \left(\Omega + \dot{\psi} \sin{\left (\theta \right )}\right) \cos{\left (\theta \right )}\\0\\- I_{1} \dot{\psi} \dot{\theta} \sin{\left (\theta \right )} + I_{2} \dot{\theta} \left(\Omega + \dot{\psi} \sin{\left (\theta \right )}\right)\end{matrix}\right]$$

Define $C \triangleq \Omega + \dot\psi\sin\theta$ and substitute into $\left[\vphantom{\frac{\mathrm{d}}{\mathrm{d}t}}^\mathcal{I}\frac{\mathrm{d}}{\mathrm{d}t} {}^\mathcal{I} \mathbf h_G\right]_\mathcal{B}$:


In [8]:
dhG_B_simp = dhG_B.subs(Omega+psid*sin(th),C); dhG_B_simp


Out[8]:
$$\left[\begin{matrix}- C I_{2} \dot{\psi} \cos{\left (\theta \right )} + I_{1} \dot{\psi}^{2} \sin{\left (\theta \right )} \cos{\left (\theta \right )} + I_{1} \ddot{\theta}\\I_{2} \left(\ddot{\psi} \sin{\left (\theta \right )} + \dot{\psi} \dot{\theta} \cos{\left (\theta \right )}\right)\\C I_{2} \dot{\theta} + I_{1} \ddot{\psi} \cos{\left (\theta \right )} - 2 I_{1} \dot{\psi} \dot{\theta} \sin{\left (\theta \right )}\end{matrix}\right]$$

Assume an external torque generating moment about $G$ of $\mathbf M_G = -M_1\mathbf b_1$:


In [9]:
solve([dhG_B_simp[0] + M1,dhG_B_simp[2]],[thdd,psidd])


Out[9]:
$$\left \{ \ddot{\psi} : \frac{\dot{\theta} \left(- \frac{C I_{2}}{\cos{\left (\theta \right )}} + 2 I_{1} \dot{\psi} \tan{\left (\theta \right )}\right)}{I_{1}}, \quad \ddot{\theta} : \frac{C I_{2} \dot{\psi} \cos{\left (\theta \right )} - \frac{I_{1} \dot{\psi}^{2} \sin{\left (2 \theta \right )}}{2} - M_{1}}{I_{1}}\right \}$$

In [ ]: