# Part 3: Gimbal Lock

## Contents

# Part 3: Gimbal Lock#

The orientation of an object in 3D space can be described by a set of three values: \((\alpha, \beta, \gamma)\), where \(\alpha\) is roll, \(\beta\) is pitch, and \(\gamma\) is yaw.

Mathematically, any point \(\mathbf{p}\) on an object that undergoes rotation \((\alpha, \beta, \gamma)\) will have a new coordinate \(\mathbf{p'}\) calculated as follows:

Where:

## Gimbal Lock#

Ideally, we would hope that the parameters \((\alpha, \beta, \gamma)\) are enough to rotate any point \(\mathbf{p}\) (distance \(d\) from the origin) to any other point \(\mathbf{p'}\) (also distance \(d\) from the origin, since rotations do not change distance). Upon closer thought, it would seem as if we have more than enough parameters to do this, since it only takes two parameters \((\theta, \phi)\) to describe all points on the 3D unit sphere

However, this intuition is a bit off. If any one parameter is held fixed, it may be impossible for \(\mathbf{p}\) to be rotated to some other \(\mathbf{p'}\) by varying the remaining two parameters. Moreover, if a certain parameter is set to a certain problematic value, then varying the remaining two parameters will either sweep out a circle (not a sphere!), or not affect \(\mathbf{p}\) at all, depending on what \(\mathbf{p}\) is. This result is way different from what we expected! The name for this degenerate case is gimbal lock.

## Questions#

Suppose an airplane pitches the nose up to a pitch of \(-\pi / 2\) (\(90 \degree\) up):

Let \(R_{\text{gim} \beta}\) denote the rotation matrix \(R\) for \(\beta = -\pi / 2\). Prove that

\[\begin{split} R_{\text{gim} \beta} = \begin{bmatrix} 0 & -\sin(\alpha+\gamma) & -\cos(\alpha+\gamma) \\ 0 & \cos(\alpha+\gamma) & -\sin(\alpha+\gamma) \\ 1 & 0 & 0 \end{bmatrix} \end{split}\]Consider the point \(\mathbf{p} = [0 \quad 1 \quad 0]^T\) on the pitched airplane, i.e. the tip of the wing. Does there exist any \(\alpha, \gamma\) such that \(\mathbf{p'} = R_{\text{gim} \beta} \mathbf{p}\) for \(\mathbf{p'} = [1 \quad 0 \quad 0]^T\)?

Show your work and briefly explain your reasoning (1-2 sentences).

Consider the point \(\mathbf{p} = [0 \quad 1 \quad 0]^T\) on the pitched airplane, i.e. the tip of the wing: Can we set \(\alpha, \gamma\) such that:

\[ \mathbf{p'} = R_{\text{gim} \beta} \mathbf{p} \]for some \(\mathbf{p'}\) on the XY unit circle (e.g. \([\frac{\sqrt 2}{2} \quad \frac{\sqrt 2}{2} \quad 0]^T\))?

You do not have to show any work, but briefly explain your reasoning (1-2 sentences).

Consider the point \(\mathbf{p} = [0 \quad 1 \quad 0]^T\) on the pitched airplane, i.e. the tip of the wing. Can we set \(\alpha, \gamma\) such that:

\[ \mathbf{p'} = R_{\text{gim} \beta} \mathbf{p} \]for some \(\mathbf{p'}\) on the YZ unit circle (e.g. \([0 \quad \frac{\sqrt 2}{2} \quad \frac{\sqrt 2}{2}]^T\))?

You do not have to show any work, but briefly explain your reasoning (1-2 sentences).

Reflect on your answers to the previous 4 questions. What are the questions trying to portray? Why are the answers different? Why is \(-\pi / 2\) (i.e. pitched up \(90\degree\)) a “certain problematic value”? What would happen to an airplane that pitched that much? Could a pilot recover from such a situation? Are 3 parameters enough to allow for rotations in all situations?