# 6 DoF rigid body equations and tensor of inertia

I am writing here as I have a doubt on the tensor of inertia found in the Euler's equations.

As far as I have understood, people usually solve the Euler's equations in "body coordinates" as:

$$m \dot{v}_g + \omega \times(mv_g) = F$$

$$I\dot{\omega}+\omega\times I \omega = M$$

Mass is constant and does not change with time.

I have a (silly) question on the second equation in particular:

• Is the tensor of inertia a constant matrix, while the body is translating and rotating? Should I compute it with respect to the center of gravity of the body and forget about it?
• Can you please define $v_g$ and $\omega$ exactly (basis vectors, what is measured). Sep 6, 2022 at 5:19

Translation

\begin{align*} &\mathbf{v}_I=\mathbf{S}\,\mathbf{v}_B\quad\Rightarrow\, \mathbf{\dot{v}}_I=\mathbf{\dot S}\,\mathbf{v}_B+\mathbf{S}\,\mathbf{\dot{v}}_B\\ &\text{with}\quad \mathbf{\dot S}=\mathbf{S}\,\mathbf{\omega}_B^\times\\ &\Rightarrow \end{align*} \begin{align*} &\mathbf{\dot{v}}_I=\mathbf{S}\,\left(\mathbf{\omega}_B\times \,\mathbf{v}_B\right)+\mathbf{S}\,\mathbf{\dot{v}}_B\\ \end{align*} Newton equation \begin{align*} &m\,\mathbf{\dot{v}}_I=\mathbf{F}_I\quad \text{or}\quad, m\,\underbrace{\mathbf{S}^T\,\mathbf{\dot{v}}_I}_{(\mathbf{\dot{v}}_I)_B}=\mathbf{S}^T\,\mathbf{F}_I=\mathbf{F}_B \end{align*} you obtain \begin{align*} &\mathbf{S}^T\,\mathbf{\dot{v}}_I=\left(\mathbf{\omega}_B\times \,\mathbf{v}_B\right)+\mathbf{\dot{v}}_B=\frac{\mathbf{F}_B}{m}\\ &\boxed{\,\mathbf{\dot{v}}_B=\frac{\mathbf{F}_B}{m}-\left(\mathbf{\omega}_B\times \,\mathbf{v}_B\right)\,} \end{align*}

Rotation

Euler equation in B_system

\begin{align*} &\boxed{\,I_B\,\mathbf{\dot{\omega}}_B+\mathbf{\omega}_B\,\times \left(I_B\,\mathbf{\omega}_B\right)=\mathbf\tau_B\,} \end{align*}

• $$\mathbf S~$$ transformation matrix between Body and Inertial system
• Subscript $$~B~$$ Body system
• Subscript $$~I~$$ Inertial system

Notice that with those two equations of motion, you don't get the position and the orientation (angles) of the rigid body , you need additional equations

Edit

Rotation Matrix $$~\mathbf{S}~$$

\begin{align*} &\mathbf{S}=\mathbf{S}_z(\psi)\,\mathbf{S}_x(\varphi)\,\mathbf{S}_y(\vartheta)\\ &\mathbf{S}= \left[ \begin {array}{ccc} \cos \left( \psi \right) &-\sin \left( \psi \right) &0\\ \sin \left( \psi \right) &\cos \left( \psi \right) &0\\ 0&0&1\end {array} \right] \, \left[ \begin {array}{ccc} 1&0&0\\ 0&\cos \left( \varphi \right) &-\sin \left( \varphi \right) \\ 0 &\sin \left( \varphi \right) &\cos \left( \varphi \right) \end {array} \right] \, \left[ \begin {array}{ccc} \cos \left( \vartheta \right) &0&\sin \left( \vartheta \right) \\ 0&1&0 \\ -\sin \left( \vartheta \right) &0&\cos \left( \vartheta \right) \end {array} \right] \\ &\text{with}\quad \mathbf{\dot S}=\mathbf{S}\,\mathbf{\omega}^\times\\ &\Rightarrow\\ &\begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \\ \end{bmatrix} =\underbrace{ \left[ \begin {array}{ccc} \cos \left( \vartheta \right) &0&-\cos \left( \varphi \right) \sin \left( \vartheta \right) \\ 0&1&\sin \left( \varphi \right) \\ \sin \left( \vartheta \right) &0&\cos \left( \varphi \right) \cos \left( \vartheta \right) \end {array} \right] }_{\mathbf{J}_R} \,\begin{bmatrix} \dot{\varphi} \\ \dot{\vartheta} \\ \dot{\psi} \\ \end{bmatrix}\\ &\Rightarrow \end{align*} \begin{align*} & \boxed{\,\begin{bmatrix} \dot{\varphi} \\ \dot{\vartheta} \\ \dot{\psi} \\ \end{bmatrix}=\left[ \begin {array}{ccc} \cos \left( \vartheta \right) &0&\sin \left( \vartheta \right) \\ {\frac {\sin \left( \varphi \right) \sin \left( \vartheta \right) }{\cos \left( \varphi \right) }}&1&-{\frac {\sin \left( \varphi \right) \cos \left( \vartheta \right) }{\cos \left( \varphi \right) }} \\ -{\frac {\sin \left( \vartheta \right) }{\cos \left( \varphi \right) }}&0&{\frac {\cos \left( \vartheta \right) } {\cos \left( \varphi \right) }}\end {array} \right] \, \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \\ \end{bmatrix}\,}\tag 3 \end{align*}

Singularity at $$~\varphi=\pi/2~$$

Inertial Position vector $$~\mathbf R_I~$$

\begin{align*} &\mathbf{v}_I=\mathbf{S}\,\mathbf{v}_B\\&\Rightarrow \end{align*} \begin{align*} & \boxed{\,\mathbf{\dot{R}}_I=\mathbf{v}_I\,}\tag 4 \end{align*}

all together you obtained 12 first order differential equations for a rigid body solution

• Hello Eli, thanks for this. I am going to solve this numerically so those two equations should be enough for me. What about $I_B$? Is it a constatare whipe the body is moving? Aug 21, 2022 at 17:18
• The Inertia tensor is constant in body system
– Eli
Aug 21, 2022 at 17:44
• I was suspecting it. Should I compute it once with respect to the center of gravity? Aug 21, 2022 at 17:51
• Yes you can , because it is constant
– Eli
Aug 21, 2022 at 20:06
• Hello @Eli, thanks for the support, I managed to write down a fortran code for the 6dof rigid body dynamics with quaternion formulation using adams-bashforth 4th order! It was quite fun and instructive :) Aug 26, 2022 at 9:26