1

I am working my way through the datasheet of a electronic sensor. This one has a build-in processor to do the 'orientation' math. I see that all the sensor data (Acceleration, Magnetometer, Gyroscope, Heading, Roll, etc.) is in three dimensions x,y and z. It also gives the Quaternion numbers in x,y,z and w.
What is the advantage of, or what does the extra dimension of a quaternion offer?


I did a search for quaternion on this forum and worked my way through the first ten pages but did not have the courage to work through all 213 pages.

Oldfart
  • 113
  • 1
    If you do rotation with angles, you will in certain configurations get a problem called "gimbal lock", where two of the three numbers describe the same rotation and you lose a degree of freedom. Quaternions do not have that problem. – Arthur Jan 05 '18 at 17:08
  • Thank you, I have just looked up 'gimbal lock' on wikipedia and I think I understand the problem which is being solved with the quaternion. – Oldfart Jan 05 '18 at 17:14

1 Answers1

1

As mentioned in the comments, the major engineering problem is gimbal lock. There are actually many other nice features of quaternions. For example, if you use quaternion feedback in an orientation controller, you get rid of the annoying wrapping of angles (going instantaneously from 0 to $2\pi$ or $-\pi$ to $\pi$ since angular charts are periodic). That quaternions don't have such a problem can be seen most easily by realizing the unit quaternion for a one dimensional rotation is simply $e^{i\theta}$, which is a smooth function of orientation.

Quaternions are more closely connected with physical rotation than angles. The direction cosine matrices commonly found in engineering texts are actually elements of a mathematical object called a Lie group. It turns out that the set of all unit quaternions (using quaternion multiplication) is another Lie group which is in some sense provides a natural set of parameters for rotation, since the unit quaternion group covers all rotations (this is actually why no gimbal lock). This means you can use quaternions more effectively to do things like estimate orientation from a set of vector measurements. See, for instance this paper.

JMJ
  • 4,775