The following example clarifies the singularity that occurs with the Euler angle representation of attitude as
Example D.1Consider the tangent to body direction cosine matrix corresponding to
which is well defined for anyHowever, there are multiple values ofthat yield the same orientation.
Consider two sequences of rotations. For each, assume that the tangent and body frames are initially aligned. The first rotation sequence is defined by a rotation ofrads. about the navigation frame y-axis to give v^
The second rotation sequence is defined by a rotation about the navigation frame z-axis byrads., rotation about the body frame y-axis byrads., and then rotation about the vehicle x-axis byrads to yield Both of these rotation sequences result in the same vehicle orientation.
For each of these rotation sequences the angular rate vectors in body frame are well defined. In the first case, e.g., (p,q,r) = (0, 90, 0)deg/s for 1.0s. In the second case, e.g.:
In both cases, the matrixinvolved in the computation of the Euler angle derivatives of eqn. (2.74) becomes singular. Forthe matrixis large (potentially infinite) which can greatly magnify sensor errors in the computation of the Euler angle derivatives.
The following example considers the motion similar to that of the previous example in the sense that the vehicle is maneuvering near but using a quaternion implementation.
Example D.2 For the initial conditionthe initial quaternion is
Figure D.1 shows the body frame angular rates [p, q, r]. The quaternion that results from the integration of either eqn. (D.28) or (D.30) is plotted in Figure D.2.
Figure D.1: Angular rates for Example D.2.
The Euler angles computed from the quaternion are plotted in Figure D.3. Throughout the simulation, the gain defined by the matrix Qb in eqn. (D.29) is small. For example, due to b being a unit quaternion each row has magnitude less than 1.0.
For an additional example of the use of quaternions, especially for attitudes with 0 near 90 degrees, see the discussion related to Figure 10.5.