Why does gimbal lock happen? (read first)


I get the basic “axes double up” idea, but why are the axes not stationary in the first place? Why would motion change them? Isn’t there a better way to track motion that wouldn’t require something as complicated as quaternions?

If you track 7 points, one being the center, and then equal distance up, down, left, right, front, back, doesn’t that allow you to track all rotational motion with no need for four-dimentional number systems?

In: Physics

> but why are the axes not stationary in the first place?

The whole concept behind using a gyroscope to track motion requires that the axes not be fixed. When the craft changes orientation the spinning gyroscope will try to maintain its rotational momentum and so the craft’s orientation doesn’t affect that of the gyroscope. By measuring how the orientation of the craft differs from that of the gyroscope the actual orientation of the craft can be determined.

If the axes were stationary with respect to the craft it was mounted in then when the craft changed orientation the gyroscope would be forced to do so as well. That would defeat the entire purpose of the apparatus.

> If you track 7 points, one being the center, and then equal distance up, down, left, right, front, back, doesn’t that allow you to track all rotational motion with no need for four-dimentional number systems?

How are you determining and tracking, for example, “left”? How do you know what that direction is if you are in an aircraft that starts changing its orientation?

Quaternions are enormously more compact and efficient than any other system. Both your 7 points and the traditional 3 distances plus 3 rotations (yaw, pitch, roll) take more than 4 values to represent their transform.

If you track 7 points, that’s a 7-dimensional vector! Way more complicated than tiny little 4D quaternion.

Quaternions are more intimidating than their actual level of difficulty. The basic operation of a quaternion is that you use 3 components to define the axis of rotation, and then the fourth component to define the degree of rotation about that axis.

I don’t think any of the answers here actually addresses the problem, so let’s see if I can try to explain this.

Gimbal lock is about the discontinuity of the parameters that represent rotation in response to continuous change in rotation, ie. it’s possible to make small change to rotation that force massive changes to the parameters. The most basic example of this is a locked gimbal: there is a direction of rotation that cannot be achieved because it would require an infinite rate of change to the rotations of the axes. But this occur in many other methods of parameterizing rotations, and is in fact a mathematical issue rather than a physics one. It’s impossible to design any sort of mechanical device to measure continuous 3D rotation, or any methods of parameterization of rotation in 3D, such that it involves just 3 numbers and avoid gimbal locks.

This is why many of the answers given are not really correct. It *is* possible to represent rotation with 3 numbers, as long as you don’t expect it to be continuous. For example, a single 3D vector can represent rotation (length is angle to rotate, max out at pi, line is the axis of rotation, direction follows right hand rule). This is discontinuous because 2 vectors of the same length pi but opposite direction actually represent the same rotation, so your 3 numbers have to “jump” when you rotate that much.

The space of possible rotation is 3 dimensional (proof: previous paragraph). If you’re using just 3 parameters, then you cannot afford to have a redundant dimension, when your parameter can continuous change without changing the rotation; if you’re using more than 3 parameters, then that is not a problem. “axes double up” is an example of redundant dimension: you can rotate one axis in one direction, the other axis in another direction, and it’s still the same rotation. So this is not a problem if you have 4 axes, but a problem with 3 axes.

This is not a problem with 2D rotations. You can represent 2D rotation with a single number. And there is a good mathematical reason for that.

The most ELI5 reason is curvature. The set of 3D rotation looks similar to the quaternion, which is a sphere in 4 dimensions. You can’t wrap a flat 3D space into a sphere without wrinkle, the same way you can’t wrap a paper around a ball without wrinkle. But you *can* wrap a string around a circle no problems, because 1-dimensional object can’t have wrinkles. The set of 2D rotation is the circle (rotation can be represented by multiplication by complex number of norm 1, which form a circle), and you can wrap an infinite line into a circle, which is why 2D rotation can be represented by a single “angle” number.

But there are other ways to explain this. The set of *continuous* 2D rotation is the line, which is infinitely bigger than the circle, but the set of continuous 3D rotation is the quaternion, which is only twice as big. The reason is because knowing how to achieve the rotation in 3D (as opposed to just knowing the final result) tells you a lot less additional information than in 2D, a fact that can be demonstrated physically using what’s call the “belt trick” or “plate trick”. Attach a belt on top of an object on the table, and hold the other end. If you allow the object to only move on the surface, and rotate without lifting up its bottom (so 2D rotations), then knowing how the object rotated will tell you how many twists the belt have. But if you allow the object to move freely in 3 dimension and rotate freely in 3 dimension, knowing how to achieve the rotation only give you a single bit of information: whether the belt is untwistable or ununtwistable. This is because you can remove a double twist from the belt by simply moving in 3D, no rotations needed.

Because of that, even though the set of 2D and 3D rotations both have finite size, the set of *continuous* 2D rotation has infinite size, while continuous 3D rotation still has finite size. This is a problem for 3D, because you can’t “compress” 3D space into a set of continuous 3D rotation without forcing arbitrarily large derivative, and you can’t cut out a finite 2D piece of the 3D space because you don’t have enough dimension, and you can’t cut out a finite 3D piece because then you have discontinuity at the edge.

But with 4 parameters this is possible, because now you have 4D space, so you are allowed to use 1 redundant dimension. You either: cut out a finite 3D piece of 4D, or allow infinite compression along 1 dimension. The way to achieve this is either use unit quaternion or the full quaternion, both work. And of course, if you have even more parameters, it’s easier.

Unit quaternion is not just a way to track rotational motion in 3D. It’s the *essence* of 3D rotational motion. Every methods of tracking rotational motion have a quaternion inside it, it doesn’t matter how many parameters you use. For example, in physics, people usually use SU(2) instead, but that’s mathematically the same thing as unit quaternion.