|
A three dimensional rigid body orientation can be described by an axis and an angle. The axis is a unit vector
that is unchanged by the corresponding rotation, and the angle specifies the relative rotation of one reference frame with respect to another about that axis. Unit quaternions encode exactly this axis angle information in a compact algebraic form.
For the PhysicsLibrary convention, let frame be obtained from frame by a positive right hand rule rotation of the frame axes through angle about the unit axis
. The passive coordinate map
is represented by
 |
(1) |
The negative sign in the vector part is fundamental to the passive convention. It is not a storage convention and does not change Hamilton multiplication. It appears because a positive rotation of the coordinate frame produces the inverse coordinate motion of a fixed physical vector.
The appearance of the half angle is equally fundamental. It follows from the two sided quaternion action on three dimensional vectors.
This entry develops the passive axis angle form, explains the half angle, derives axis and angle recovery, and connects the result to the equivalent active rotor. The next PhysicsLibrary entry develops the full passive coordinate transformation formula and its relation to Rodrigues' formula.
Unless explicitly stated otherwise, this entry uses Hamilton multiplication,
with reversed products changing sign. Physical Cartesian frames are right handed, positive frame rotation follows the right hand screw rule, and quaternion components are displayed scalar first:
 |
(2) |
The canonical PhysicsLibrary attitude quaternion is
 |
(3) |
which maps coordinates from frame into frame :
 |
(4) |
The inverse frame map is
 |
(5) |
Scalar first versus scalar last storage is only a component layout choice; it does not change the quaternion multiplication law, frame map direction, or axis angle sign.
For a detailed comparison of convention choices, see Quaternions for Physics and Engineering: Orientation, Notation, and Conventions.
Euler's finite rotation result states that any proper relative orientation in three dimensions can be represented by a rotation through some angle about some axis. Let
 |
(6) |
The geometric axis
is identified with a pure quaternion. Because it is a unit pure quaternion,
 |
(7) |
Thus an arbitrary spatial unit axis behaves algebraically like an imaginary unit.
The pair
will mean throughout this article that frame is obtained from frame by a positive right handed rotation through about
.
In engineering the same information is often packaged into the frame rotation vector
 |
(8) |
Its direction is the Euler axis and its magnitude is the frame rotation angle. Under the PhysicsLibrary passive quaternion convention, the quaternion vector part points in the opposite direction from
for principal positive rotations.
Since
, the power series expansion of the quaternion exponential separates into even and odd powers exactly as it does for the complex exponential:
 |
(9) |
Indeed,
Therefore a quaternion of the form
 |
(10) |
has unit norm, because
Hence is a unit quaternion, and
 |
(12) |
For the passive frame map,
 |
(13) |
The conjugate,
 |
(14) |
is both the inverse coordinate map and the usual positive angle active rotor associated with the same relative geometry.
The half angle can be seen with a minimal coordinate transformation calculation. Let be a unit vector perpendicular to the rotation axis
, and define
 |
(15) |
For Hamilton multiplication and perpendicular pure quaternions,
Now write the candidate passive quaternion as
 |
(16) |
where
and
. Since is unit,
 |
(17) |
Applying the passive sandwich to the perpendicular test vector gives
Using the double angle identities,
 |
(19) |
The coordinate representation of the fixed physical vector has therefore rotated through in the plane perpendicular to
. That is exactly what must occur when the coordinate frame itself rotates positively through .
Hence the positive frame rotation angle is
 |
(20) |
Consequently the passive unit quaternion for a positive frame rotation through is
 |
(21) |
The minus sign determines the passive direction; the factor of one half comes from the two sided sandwich action.
This perpendicular vector calculation establishes the half angle and the passive sign. The next article carries out the general coordinate transformation for an arbitrary vector with components both parallel and perpendicular to the rotation axis.
With
the passive axis angle quaternion becomes
 |
(22) |
Thus
 |
(23) |
For a principal positive frame rotation, the quaternion vector part points opposite the positive frame rotation axis. This is the passive counterpart of the familiar active rotor, whose vector part points along
.
Suppose
 |
(24) |
Define
 |
(25) |
For a principal positive frame rotation with
a numerically useful extraction is
 |
(26) |
When , the positive frame rotation axis is
 |
(27) |
The minus sign is essential under the PhysicsLibrary passive convention.
The equivalent expression
is common, but
uses both scalar and vector information and is generally preferable in numerical software. The quaternion should be normalized before extracting an angle.
If a principal rotation with
is desired, a common engineering choice is first to replace by
when . This selects the representative with nonnegative scalar part and therefore chooses the shorter equivalent frame rotation.
An equally valid alternative is to extract the axis and angle of the coordinate motion rather than of the positive frame rotation. In that interpretation the coordinate motion axis is
 |
(28) |
and the coordinate motion angle is . PhysicsLibrary uses the positive frame axis and angle as the canonical axis angle pair.
A unit quaternion and its negative represent the same frame to frame coordinate transformation. The passive action satisfies
 |
(29) |
Therefore the mapping from unit quaternions to proper frame orientations is two to one. This is the practical source of the familiar sign ambiguity in attitude data.
The passive axis angle form makes the same fact visible. Increasing the positive frame angle by gives
A further returns to the same quaternion:
 |
(31) |
The deeper and interpretation of this double covering belongs to the later mathematical branch of the PhysicsLibrary quaternion sequence.
For ,
 |
(32) |
The frames coincide. The axis is physically irrelevant and therefore undefined. This is why axis extraction becomes ill conditioned when the vector part of the quaternion is very small.
For
,
 |
(33) |
The scalar part is zero. Because and represent the same orientation,
 |
(34) |
represents the same orientation as well. This is consistent with the geometric fact that at , reversing the axis gives an equivalent axis angle description.
For
,
 |
(35) |
This is the same physical frame orientation as
, although the quaternion itself has changed sign.
Let the positive frame rotation vector be
For a small frame rotation,
rad,
Therefore the passive frame quaternion satisfies
 |
(36) |
when the rotation vector is identified with a pure quaternion.
In scalar first components,
 |
(37) |
This negative sign is important in attitude error filters, inertial navigation, and local frame linearizations. A formula using
may still be correct, but it is using either the inverse frame map, an active rotation increment, or an oppositely defined error vector.
The approximation above is first order. The quaternion should not be assumed to have exactly unit norm after arbitrary finite updates unless it is renormalized or constructed from the exact trigonometric formula.
The defining equation of this article,
 |
(38) |
represents a positive frame rotation through about
and acts passively on coordinates:
 |
(39) |
The conjugate is
 |
(40) |
The same numerical quaternion also serves as the familiar positive active rotor for rotating a physical vector through about the same right hand rule axis in a fixed frame:
 |
(41) |
Equivalently, if
 |
(42) |
then
 |
(43) |
For a positive rotation of frame relative to frame about
,
 |
(44) |
A fixed vector with
 |
(45) |
has coordinates
 |
(46) |
By contrast, the conjugate active rotor sends a physical
vector to
in a fixed frame.
The sign change must not be confused with scalar first versus scalar last storage or with Hamilton versus flipped quaternion multiplication. Those are separate convention choices established in the PhysicsLibrary convention entry.
The passive axis angle quaternion is designed to agree directly with the PhysicsLibrary direction cosine matrix convention.
For the same positive frame rotation,
 |
(47) |
For a rotation about
,
 |
(48) |
corresponding to
 |
(49) |
At
this matrix maps
to
exactly as the quaternion does.
This quaternion DCM agreement is one of the central convention checks used throughout the revised PhysicsLibrary orientation series.
Axis angle representation describes one finite frame rotation. Euler Angles describe the same final orientation through a sequence of elementary frame rotations.
PhysicsLibrary interprets named Euler sequences intrinsically. For an intrinsic – – sequence with successive positive frame angles
, define
 |
(50) |
and similarly for the second and third axes. Frame chaining gives
 |
(51) |
The corresponding passive DCM is
 |
(52) |
Thus the quaternion and DCM products have the same factor order.
For the common intrinsic – – yaw pitch roll sequence,
 |
(53) |
where is yaw, is pitch, and is roll.
- Forgetting to normalize the axis. The vector
in the passive axis angle formula must have unit length.
- Using the full angle inside the sine and cosine. The quaternion phase is
because the sandwich action produces twice the quaternion phase.
- Using the active sign for a passive frame quaternion. For a positive frame rotation,
The plus sign belongs to the conjugate active rotor or inverse passive map.
- Extracting the frame axis without the passive minus sign. For the principal passive quaternion,
- Treating
and as different orientations. They are distinct points on the unit quaternion sphere but represent the same proper frame orientation.
- Extracting an axis at zero rotation. When
, the rotation axis is physically indeterminate and numerically poorly conditioned.
- Using
as an inverse for a nonunit quaternion. The identity
holds only when
.
- Changing signs to match another source without checking its convention. Active/passive interpretation, frame direction, axis angle sign, and Hamilton/flipped multiplication can each alter the appearance of formulas.
- Assuming a small positive frame rotation gives a positive quaternion vector part. Under the PhysicsLibrary passive convention,
The passive axis angle formula produces the unit quaternion associated with a finite frame orientation. The next PhysicsLibrary article, rotating vectors with quaternions, is being revised into a frame coordinate transformation article. Under the present convention it derives
 |
(54) |
and reduces the vector part to the passive Rodrigues form
 |
(55) |
with the usual care that all vector quantities in a single algebraic cross product expression must be resolved in a common basis.
A separate companion entry, Axis Angle Representation and Unit Quaternion: Examples, Exercises, and Solutions, provides a self study problem set with all exercises stated before the solutions and uses the same passive signs established here.
Hamilton's Elements of Quaternions develops the versor as the unit quaternion carrying axis and angle information. Joly gives a clear historical statement that the transformation
rotates vectors about the axis of through twice the quaternion's angle. Hathaway develops finite rotations before introducing quaternions, making the axis angle geometry explicit. Macfarlane similarly uses half angle versors in the composition of finite rotations.
Those historical treatments are valuable for understanding the algebraic origin of the half angle, but their rotation language should not be assumed to match the modern PhysicsLibrary frame map convention term for term. The revised PhysicsLibrary convention uses the passive scalar first Hamilton form
 |
(56) |
Its conjugate,
 |
(57) |
is the conventional positive active rotor used in many historical and modern derivations. The two contain the same half angle geometry and represent inverse operations.
The convention itself is established in Quaternions for Physics and Engineering: Orientation, Notation, and Conventions.
- 1
- W. R. Hamilton, Elements of Quaternions, 2nd ed., Vol. I, edited by C. J. Joly, Longmans, Green, and Co., London, 1899. Public domain historical source. Internet Archive copy https://archive.org/details/elementsofquater01hamiuoft
- 2
- C. J. Joly, A Manual of Quaternions, Macmillan and Co., London, 1905. Public domain historical source.
- 3
- A. S. Hathaway, A Primer of Quaternions, 1896. Public domain text; Project Gutenberg edition and LATEX source available. Project Gutenberg edition https://www.gutenberg.org/ebooks/9934
- 4
- A. Macfarlane, Vector Analysis and Quaternions, John Wiley & Sons, New York, 1906. Public domain historical source; Project Gutenberg edition available. Project Gutenberg edition https://www.gutenberg.org/ebooks/13609
Unless otherwise noted, this PhysicsLibrary entry is intended for release under the Creative Commons Attribution ShareAlike 4.0 International license.
|