Search code examples
eigentensoraxesprincipal

Principal axis form of Inertia tensor with eigen


I want to compute the principal axis form of an inertia tensor that stays consistent with changes of the inertia. Currently eigen outputs the computed eigenvalues(Ia,Ib,Ic) from smallest to largest, which scrambles the order of the x,y and z inertia moments. This doesn't allow me to map the eigenvalues directly to the diagonal inertia tensor.

To start, I have a multibody system for which I calculate the inertia moments Ixx, Iyy, Izz and products Ixy, Ixz, Iyz around the center of mass. From here I construct a 3x3 inertia matrix. This inertia is in coordinate frame A and can have non-zero off-diagonal components. I can observe this inertia matrix change continuously depending on the movement of my bodies.

For example, initially my computed inertia looks something like this:
0.25 0 0
0 0.22 0
0 0 0.02

then the eigenvalues look something like this:
0.02
0.22
0.25

and the eigenvectors look something like this:
0 0 1
0 1 0
1 0 0

As you can see, the eigensolver sorts the eigenvalues in ascending order, which results in a Izz,Iyy,Ixx vector, which isn't the desired Ixx,Iyy,Izz order. As I move the bodies around, the inertia changes and so does the ordering of the eigenvalues (Ixx,Iyy and Izz can easily swap places). Two of these eigenvalues can stay constant, while the third one changes so much that it influences the ordering. I would like to find the mapping that keeps the values consistent - achieve always a Ixx,Iyy and Izz order of my eigenvalues.


Solution

  • Eigenvalues quantify inertia along principal axes, their ordering is irrelevant as long as the correspondance with eigenvectors is preserved. Don't be confused by the fact that they are equal to diagonal Ixx,Iyy,Izz elements in your example, the eigenvalues have nothing to do with x-y-z coordinates, in particular, they are orientation-agnostic. If you want to compare inertias of different body configurations, you have to take into account the eigenvectors as well, e.g., draw ellipsoids.