davidbrown3 : Angular Velocity Conversions

Introducing Euler Angles

A common requirement when modelling a dynamics system is the tracking of a bodies orientation. A common way to express orientation is through the use of Euler Angles; a sequence of 3 rotations, starting from some base inertial frame to the moving body. These are also commonly intrinsic, meaning that each sequential rotation is about the previous rotated co-ordinate system, rather than the inertial co-ordinate system. These rotation angles are denoted as:

There are 12 different variations of Euler Angles which differ in the axes in which each of these sequential rotations take place. For example, it would be equally valid to:

The choice of which variation to use to model a system is often determined by one of the following:

These 12 variations are generally broken into 2 groups; Euler Angles and Tait-Bryan Angles.

Euler Angles always take the form ABAA-B-A', where the first and last rotation are about the same axes, except one is in the base inertial frame, and one is the 2nd intermediate axes.

Tait-Bryan Angles always take the form ABCA-B-C where there are no repeats in the use of axes.

The only difference for this post is that each set of Euler Angles must be expressed in a slightly different form to account for the choice of which axes are being rotated around, whereas each set of Tait-Bryan Angles can be expressed in the same form.

Expressing Angular Velocity

There is also a common requirement to express the angular velocity of a system, not in terms of the rates of change of these Euler-Angles, but as a body-fixed angular velocity. This might be because you are considering kinetic energies or because you are using an IMU to track motion.

The conversion between body-fixed angular velocities and Euler-Angle rates involves a fair ammount of linear-algebra. Many places on the web provide a conversion that an engineer can refer to, but it often it is only expressed for 1 of the 12 variations of Euler-Angles. In this post I have attempted to provide a comprehensive list, automated using symbolic math.

Euler Angle Conversions

x-y-x / Roll-Pitch-Roll'

[ωxωyωz]=[cos(θ)01sin(θ)sin(ϕ)cos(ϕ)0cos(ϕ)sin(θ)sin(ϕ)0][ϕ˙θ˙ϕ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} \cos (\theta) & 0 & 1\\ \sin (\theta) \sin (\phi^{\prime}) & \cos (\phi^{\prime}) & 0 \\ \cos (\phi^{\prime}) \sin (\theta) & - \sin (\phi^{\prime}) & 0 \end{bmatrix} \cdot \begin{bmatrix} \dot \phi\\ \dot \theta\\ \dot \phi^{\prime} \end{bmatrix}

[ϕ˙θ˙ϕ˙]=[0sin(ϕ)/sin(θ)cos(ϕ)/sin(θ)0cos(ϕ)sin(ϕ)1sin(ϕ)/tan(θ)cos(phi)/tan(θ)][ωxωyωz] \begin{bmatrix} \dot \phi\\ \dot \theta\\ \dot \phi^{\prime} \end{bmatrix} = \begin{bmatrix} 0 & \sin(\phi^{\prime}) / \sin (\theta) & \cos (\phi^{\prime}) / \sin (\theta) \\ 0 & \cos (\phi^{\prime}) & - \sin (\phi^{\prime})\\ 1 & -\sin (\phi^{\prime})/\tan (\theta) & -\cos (phi^{\prime})/\tan (\theta) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

x-z-x / Roll-Yaw-Roll'

[ωxωyωz]=[cos(ψ)01cos(ϕ)sin(ψ)sin(ϕ)0sin(ϕ)sin(ψ)cos(ϕ)0][ϕ˙ψ˙ϕ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos (\psi) & 0 & 1\\ - \cos(\phi^{\prime}) \sin (\psi) & \sin(\phi^{\prime}) & 0\\ \sin(\phi^{\prime}) \sin (\psi) & \cos(\phi^{\prime}) & 0 \end{bmatrix} \cdot \begin{bmatrix} \dot \phi\\ \dot \psi\\ \dot \phi^{\prime} \end{bmatrix}

[ϕ˙ψ˙ϕ˙]=[cos(ϕ)/sin(ψ)sin(ϕ)/sin(ψ)0sin(ϕ)cos(ϕ)1cos(ϕ)/tan(ψ)sin(ϕ)/tan(ψ)][ωxωyωz] \begin{bmatrix} \dot \phi\\ \dot \psi\\ \dot \phi^{\prime} \end{bmatrix} = \begin{bmatrix} & -\cos(\phi^{\prime})/\sin (\psi) & \sin(\phi^{\prime})/\sin (\psi)\\ 0 & \sin(\phi^{\prime}) & \cos(\phi^{\prime})\\ 1 & \cos(\phi^{\prime}) /\tan (\psi) & -\sin(\phi^{\prime})/\tan (\psi) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

y-x-y / Pitch-Roll-Pitch'

[ωxωyωz]=[sin(θ)sin(ϕ)cos(θ)0cos(ϕ)01cos(θ)sin(ϕ)sin(θ)0][θ˙ϕ˙θ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} sin(\theta^{\prime}) \sin (\phi) & \cos(\theta^{\prime}) & 0\\ \cos (\phi) & 0 & 1\\ - \cos(\theta^{\prime}) \sin (\phi) & \sin(\theta^{\prime}) & 0 \end{bmatrix} \cdot \begin{bmatrix} \dot \theta\\ \dot \phi\\ \dot \theta^{\prime} \end{bmatrix}

[θ˙ϕ˙θ˙]=[sin(θ)/sin(ϕ)0cos(θ)/sin(ϕ)cos(θ)0sin(θ)sin(θ)/tan(ϕ)1cos(θ)/tan(ϕ)][ωxωyωz] \begin{bmatrix} \dot \theta\\ \dot \phi\\ \dot \theta^{\prime} \end{bmatrix} = \begin{bmatrix} sin(\theta^{\prime})/\sin (\phi) & 0 & -\cos(\theta^{\prime})/\sin (\phi)\\ \cos(\theta^{\prime}) & 0 & \sin(\theta^{\prime})\\ -\sin(\theta^{\prime})/\tan (\phi) & 1 & \cos(\theta^{\prime})/\tan (\phi) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

y-z-y / Pitch-Yaw-Pitch'

[ωxωyωz]=[cos(θ)sin(ψ)sin(θ)0cos(ψ)01sin(θ)sin(ψ)cos(θ)0][θ˙ψ˙θ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos(\theta^{\prime}) \sin (\psi) & - \sin(\theta^{\prime}) & 0\\ \cos (\psi) & 0 & 1\\ \sin(\theta^{\prime}) \sin (\psi) & \cos(\theta^{\prime}) & 0 \end{bmatrix} \cdot \begin{bmatrix} \dot \theta\\ \dot \psi\\ \dot \theta^{\prime} \end{bmatrix}

[θ˙ψ˙θ˙]=[cos(θ)/sin(ψ)0sin(θ)/sin(ψ)sin(θ)0cos(θ)cos(θ)cos(ψ)/sin(ψ)1cos(ψ)sin(θ)/sin(ψ)][ωxωyωz] \begin{bmatrix} \dot \theta\\ \dot \psi\\ \dot \theta^{\prime} \end{bmatrix} = \begin{bmatrix} cos(\theta^{\prime})/\sin (\psi) & 0 & \sin(\theta^{\prime})/\sin (\psi)\\ - \sin(\theta^{\prime}) & 0 & \cos(\theta^{\prime})\\ -\cos(\theta^{\prime}) \cos (\psi)/\sin (\psi) & 1 & -\cos (\psi) \sin(\theta^{\prime})/\sin (\psi) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

z-x-z / Yaw-Roll-Yaw'

[ωxωyωz]=[sin(ϕ)sin(ψ)cos(ψ)0cos(ψ)sin(ϕ)sin(ψ)0cos(ϕ)01][ψ˙ϕ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} sin (\phi) \sin(\psi^{\prime}) & \cos(\psi^{\prime}) & 0\\ \cos(\psi^{\prime}) \sin (\phi) & - \sin(\psi^{\prime}) & 0\\ \cos (\phi) & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} \dot \psi\\ \dot \phi\\ \dot \psi^{\prime} \end{bmatrix}

[ψ˙ϕ˙ψ˙]=[sin(ψ)/sin(ϕ)cos(ψ)/sin(ϕ)0cos(ψ)sin(ψ)0cos(ϕ)sin(ψ)/sin(ϕ)cos(ϕ)cos(ψ)/sin(ϕ)1][ωxωyωz] \begin{bmatrix} \dot \psi\\ \dot \phi\\ \dot \psi^{\prime} \end{bmatrix} = \begin{bmatrix} sin(\psi^{\prime})/\sin (\phi) & \cos(\psi^{\prime})/\sin (\phi) & 0\\ \cos(\psi^{\prime}) & - \sin(\psi^{\prime}) & 0\\ -\cos (\phi) \sin(\psi^{\prime})/\sin (\phi) & -\cos (\phi) \cos(\psi^{\prime})/\sin (\phi) & 1 \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

z-y-z / Yaw-Pitch-Yaw'

[ωxωyωz]=[cos(ψ)sin(θ)sin(ψ)0sin(θ)sin(ψ)cos(ψ)0cos(θ)01][ψ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} \cos(\psi^{\prime}) \sin (\theta) & \sin(\psi^{\prime}) & 0\\ \sin (\theta) \sin(\psi^{\prime}) & \cos(\psi^{\prime}) & 0\\ \cos (\theta) & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} \dot \psi\\ \dot \theta\\ \dot \psi^{\prime} \end{bmatrix}

[ψ˙θ˙ψ˙]=[cos(ψ)/sin(θ)sin(ψ)/sin(θ)0sin(ψ)cos(ψ)0cos(θ)cos(ψ)/sin(θ)cos(θ)sin(ψ)/sin(θ)1][ωxωyωz] \begin{bmatrix} \dot \psi\\ \dot \theta\\ \dot \psi^{\prime} \end{bmatrix} = \begin{bmatrix} \cos(\psi^{\prime})/\sin (\theta) & \sin(\psi^{\prime})/\sin (\theta) & 0\\ \sin(\psi^{\prime}) & \cos(\psi^{\prime}) & 0\\ \cos (\theta) \cos(\psi^{\prime})/\sin (\theta) & -\cos (\theta) \sin(\psi^{\prime})/\sin (\theta) & 1 \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

Tait-Bryan Angle Conversions

x-y-z / Roll-Pitch-Yaw

[ωxωyωz]=[cos(θ)cos(ψ)sin(ψ)0cos(θ)sin(ψ)cos(ψ)0sin(θ)01][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos (\theta) \cos (\psi) & \sin (\psi) & 0\\ - \cos (\theta) \sin (\psi) & \cos (\psi) & 0\\ \sin (\theta) & 0 & 1 \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[cos(ψ)/cos(θ)sin(ψ)/cos(θ)0sin(ψ)cos(ψ)0cos(ψ)sin(θ)/cos(θ)sin(θ)sin(ψ)/cos(θ)1][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} cos (\psi)/\cos (\theta) & -\sin (\psi)/\cos (\theta) & 0\\ \sin (\psi) & \cos (\psi) & 0\\ -\cos (\psi) \sin (\theta)/\cos (\theta) & \sin (\theta) \sin (\psi)/\cos (\theta) & 1 \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

x-z-y / Roll-Yaw-Pitch

[ωxωyωz]=[cos(θ)cos(ψ)0sin(θ)sin(ψ)10cos(ψ)sin(θ)0cos(θ)][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos (\theta) \cos (\psi) & 0 & - \sin (\theta)\\ - \sin (\psi) & 1 & 0\\ \cos (\psi) \sin (\theta) & 0 & \cos (\theta) \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[cos(θ)/cos(ψ)0sin(θ)/cos(ψ)cos(θ)tan(ψ)1sin(θ)tan(ψ)sin(θ)0cos(θ)][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} cos (\theta)/\cos (\psi) & 0 & \sin (\theta)/\cos (\psi)\\ \cos (\theta) \tan (\psi) & 1 & \sin (\theta) \tan (\psi)\\ - \sin (\theta) & 0 & \cos (\theta) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

y-x-z / Pitch-Roll-Yaw

[ωxωyωz]=[cos(ψ)cos(ϕ)sin(ψ)0sin(ψ)cos(ϕ)cos(ψ)00sin(ϕ)1][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos (\psi) & \cos (\phi) \sin (\psi) & 0\\ - \sin (\psi) & \cos (\phi) \cos (\psi) & 0\\ 0 & - \sin (\phi) & 1 \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[cos(ψ)sin(ψ)0sin(ψ)/cos(ϕ)cos(ψ)/cos(ϕ)0tan(ϕ)sin(ψ)cos(ψ)tan(ϕ)1][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} cos (\psi) & - \sin (\psi) & 0\\ \sin (\psi)/\cos (\phi) & \cos (\psi)/\cos (\phi) & 0\\ \tan (\phi) \sin (\psi)& \cos (\psi) \tan (\phi) & 1 \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

y-z-x / Pitch-Yaw-Roll

[ωxωyωz]=[1sin(ψ)00cos(ϕ)cos(ψ)sin(ϕ)0cos(ψ)sin(ϕ)cos(ϕ)][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} 1 & \sin (\psi) & 0\\ 0 & \cos (\phi) \cos (\psi) & \sin (\phi)\\ 0 & - \cos (\psi) \sin (\phi) & \cos (\phi) \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[cos(ϕ)tan(ψ)sin(ϕ)tan(ψ)0cos(ϕ)/cos(ψ)sin(ϕ)/cos(ψ)0sin(ϕ)cos(ϕ)][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} & -\cos (\phi) \tan (\psi) & \sin (\phi) \tan (\psi)\\ 0 & \cos (\phi)/\cos (\psi) & -\sin (\phi)/\cos (\psi)\\ 0 & \sin (\phi) & \cos (\phi) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

z-x-y / Yaw-Roll-Pitch

[ωxωyωz]=[cos(θ)0cos(ϕ)sin(θ)01sin(ϕ)sin(θ)0cos(θ)cos(ϕ)][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} cos (\theta) & 0 & - \cos (\phi) \sin (\theta)\\ 0 & 1 & \sin (\phi)\\ \sin (\theta) & 0 & \cos (\theta) \cos (\phi) \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[cos(θ)0sin(θ)sin(θ)tan(ϕ)1cos(θ)tan(ϕ)sin(θ)/cos(ϕ)0cos(θ)/cos(ϕ)][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} cos (\theta) & 0 & \sin (\theta)\\ \sin (\theta) \tan (\phi)& 1 & -\cos (\theta) \tan (\phi)\\ -\sin (\theta)/\cos (\phi) & 0 & \cos (\theta)/\cos (\phi) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}

z-y-x / Yaw-Pitch-Roll

[ωxωyωz]=[10sin(θ)0cos(ϕ)cos(θ)sin(ϕ)0sin(ϕ)cos(θ)cos(ϕ)][ϕ˙θ˙ψ˙] \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix} = \begin{bmatrix} 1 & 0 & - \sin (\theta)\\ 0 & \cos (\phi) & \cos (\theta) \sin (\phi)\\ 0 & - \sin (\phi) & \cos (\theta) \cos (\phi) \end{bmatrix} \cdot \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix}

[ϕ˙θ˙ψ˙]=[tan(θ)sin(ϕ)cos(ϕ)tan(θ)0cos(ϕ)sin(ϕ)0sin(ϕ)/cos(θ)cos(ϕ)/cos(θ)][ωxωyωz] \begin{bmatrix} \dot \phi \\ \dot \theta \\ \dot \psi \end{bmatrix} = \begin{bmatrix} & \tan (\theta) \sin (\phi)& \cos (\phi) \tan (\theta)\\ 0 & \cos (\phi) & - \sin (\phi)\\ 0 & \sin (\phi)/\cos (\theta) & \cos (\phi)/\cos (\theta) \end{bmatrix} \cdot \begin{bmatrix} \omega_x \\ \omega_y \\ \omega_z \end{bmatrix}