A summary of the theory of inertia tensors

Overview

Over the last 2 articles we laid out the ingredient list for rotational dynamics. Today we are going to tackle Inertia Tensors (also sometimes called moments of inertia, although they aren’t quite the same as we will see below). As we said before the inertia tensor plays the role of mass for physical rotations. Meaning it describes how resistant the object is to changes in angular position, just like inertial mass describes how resistant a point-like body is changes in position.

Definition

First we must accept a somewhat unfortunate fact (from a computational perspective). Take a broom, stand it vertically, and spin it by rolling it between your thumb and index finger. Easy right? Now take that same broom, hold it horizontally over your head, and try spinning it. It’s much harder this time. Why is that? Well turns out that the moment of inertia depends on the axis you are spinning the object around.

Given a system of particles about an origin the moment of inertia is the sum of the squared distance of each particle to the rotation axis weighted by the particle mass. That is: given a line , with being unit length, the inertia tensor is \[ I_{L} = \sum\limits_{i=1}^{N}m_{i}(||\vec{r}_{i}||^{2} - (\vec{D} \cdot \vec{r}_{i})^{2}) \] where is the distance vector of partcle from the origin .

Expansion

Now lets do some expanding \[ \begin{align} I_{L} &= \sum\limits_{i=1}^{N}m_{i}(||\vec{r}_{i}||^{2} - (\vec{D} \cdot \vec{r}_{i})^{2}) \\ &= d_{1}^{2}\sum\limits_{i=1}^{N}m_{i}(y_{i}^{2} + z_{i}^{2}) + d_{2}^{2}\sum\limits_{i=1}^{N}m_{i}(x_{i}^{2} + z_{i}^{2}) + d_{3}^{2}\sum\limits_{i=1}^{N}m_{i}(x_{i}^{2} + y_{i}^{2}) \\ &- 2d_{1}d_{2}\sum\limits_{i=1}^{N}m_{i}x_{i}y_{i} - 2d_{1}d_{3}\sum\limits_{i=1}^{N}m_{i}x_{i}z_{i}- 2d_{2}d_{3}\sum\limits_{i=1}^{N}m_{i}y_{i}z_{i} \\ &= d_{1}^{2}I_{xx} + d_{2}^{2}I_{yy} + d_{3}^{2}I_{zz} - 2d_{1}d_{2}I_{xy} - 2d_{1}d_{3}I_{xz} - 2d_{2}d_{3}I_{yz} \end{align} \]

Looking at the defintion for the moment of inertia it shouldn’t take much to convince you that is the moment of inertia about the axis. Likewise for and . The cross terms , , are sometimes called products of inertia

Tensor form

The expansion above is most compactly written as a matrix equation \[ I_{L} = \vec{D}^{T} \begin{bmatrix} I_{xx} & -I_{xy} & -I_{xz} \\ -I_{xy} & I_{yy} & -I_{yz} \\ -I_{xz} & -I_{yz} & I_{zz} \\ \end{bmatrix} \vec{D} = \vec{D}^{T}J\vec{D} \] The matrix is what is called the inertia tensor for the system. It is made up of moments of inertia. is what we really care about when discussing motion of rigid bodies in terms of Euler’s second law. For a quick motivation as to why that is the case let’s consider the example of a single particle. It’s angular momentum, , is written \[ \vec{L} = \vec{r} \times m\vec{v} = m(\vec{r} \times (\vec{w} \times \vec{r})) = m(||r||^{2}I - \vec{r}\vec{r}^{T})\vec{w} \] Where we made use of and Now \[ m(||r||^{2}I - \vec{r}\vec{r}^{T}) = m\begin{bmatrix} y^{2} + z^{2} & -xy & -xz \\ -xy & x^{2} + z^{2} & -yz \\ -xz & -yz & x^{2} + y^{2} \end{bmatrix} \] You can see by comparing to our earlier derivations that this matrix is just the matrix but for a single particle. So \[ \vec{L} = J\vec{w} \] which if we differentiate with respect to time gives us Euler’s second law.

Continous objects

Now in real life objects are made of neigh inummerable particles. Summing over all of them is intractable computationally. That is why we instead approximate real objects as solid objects containing infinite particles. In that case, the sums above get replaced by integrals over the region occupied by the mass of the object. \[ I_{xx} = \int\limits_{Q}(y^{2} + z^{2})dm \] And so on for the other moments.

If the mass is evenly distributed throughout the volume then can be written in terms of the mass density and the integral becomes a standard triple integral.

Coordinate systems

Up until this point I’ve avoided talking about coordinate systems on purpose. But we can’t ignore them any longer. There are 2 relevent coordinate systems we need to consider, model coordinates and world coordinates. It is often preferable to express in model coordinates. There we have the capability to orient the object in such a way that is easy to compute. In fact, as a real symetric matrix, there exists a coordinate system where is a diagonal matrix. However we will be expressing torque, , and in world coordinates so we need to know how to transfrom between coordinate systems.

First lets consider translations. Consider the translation . Well a simple variable substition, , returns all the integrals back to their original forms. So clearly translations don’t affect . However, if we rotate our coordinate system by degrees such that then clearly all the entries in pertaining to and will be swapped at the very least, if not sign flipped as well. From this we deduce that rotations can possibly affect .

So to transform from model to world coordinates we need to multiply it by the rotational part of the model matrix. Since the model matrix changes every time interval this means we’ll have to perform this multiplication every cycle. However this is much better than recomputing from scratch every cycle.

It is possible to instead transport and to model coordinates. There we have the benefit of remaining a diagonal matrix. However since the model coordinate system is rotating with respect to the world coordinate system Euler’s second law becomes a little more complicated. I may do an article about both ways to performing these calculations as I’m curious which is faster. More complicated inertia matrix or more complicated differential equation?

Conclusion

Next time we’ll tackle implementing this for our simple spheres and cubes.