|
This article is a consolidated problem set for the PhysicsLibrary quaternion sequence. The problems begin with algebra and conventions, then move through rotation geometry, direction cosine matrices, Euler angles, quaternion kinematics, attitude errors, and IMU propagation.
All problems are stated first. Complete solutions appear afterward so that the article can be used for self study.
Unless a problem explicitly states otherwise, use the following conventions:
- all physical frames are right-handed orthonormal Cartesian frames;
- Hamilton multiplication is used,
 |
(1) |
- quaternions are displayed in scalar-first form,
 |
(2) |
- an active vector rotation is
 |
(3) |
for unit ;
- the attitude quaternion
 |
(4) |
maps body coordinates into inertial coordinates;
- body resolved angular velocity satisfies
 |
(5) |
Write
 |
(6) |
as a scalar part and vector part.
Evaluate
 |
(7) |
Let
 |
(8) |
Compute .
Using the same and as Problem 3, compute and show explicitly that .
For
 |
(9) |
write the quaternion product in scalar vector form.
Let
 |
(10) |
Treat them as pure quaternions and compute
.
For
 |
(11) |
compute .
For the quaternion in Problem 7, compute and .
For the quaternion in Problem 7, compute .
Determine whether
 |
(12) |
is a unit quaternion.
Find the unit quaternion for a active rotation about
 |
(13) |
Explain why and represent the same physical rotation.
Use
 |
(14) |
to rotate
 |
(15) |
Write the vector only quaternion rotation formula in terms of , , and .
A unit quaternion represents rotation about axis
. What happens to a vector parallel to
?
Quaternion acts first and quaternion acts second. What is the net quaternion?
Apply a active rotation about and then a active rotation about to
 |
(16) |
Then reverse the order. Compare the results.
Find for
 |
(17) |
What is the geometric meaning of the columns of an active rotation matrix ?
For a unit quaternion, show the relation among
 |
(18) |
Recover one quaternion corresponding to
 |
(19) |
For
 |
(20) |
find a corresponding quaternion and explain why a trace formula based on division by is poor here.
For the 3 2 1 yaw pitch roll convention
 |
(21) |
find the quaternion for
 |
(22) |
Find the quaternion corresponding to
 |
(23) |
For the 3 2 1 sequence, at what pitch angles does the Euler angle representation become singular, and what geometric alignment occurs?
State the quaternion differential equation for when angular velocity is resolved in body coordinates.
State the corresponding equation when angular velocity is resolved in inertial coordinates.
A body starts at
 |
(24) |
and rotates at a constant body rate
 |
(25) |
Find .
An IMU reports a bias corrected body rate of
rad/s |
(26) |
for
s |
(27) |
Find the exact incremental quaternion.
For Problem 29, compute the first order small angle incremental quaternion.
An uncorrected gyro bias is
s |
(28) |
Estimate the resulting attitude error after five minutes.
Write one forward Euler quaternion update and explain why normalization is commonly applied afterward.
Let be the actual attitude and the desired attitude. Write the inertial side error quaternion
such that
 |
(29) |
Write the body side error quaternion
such that
 |
(30) |
For a small attitude error, relate the vector part of to the three component error vector
.
Why is it often useful to choose the equivalent error quaternion with
 |
(31) |
For two small body delta angles applied in chronological order, write the leading approximation for the equivalent rotation vector.
Let
 |
(32) |
Compute the leading cross term
 |
(33) |
Describe the order in which gyro data, quaternion attitude, accelerometer specific force, and velocity are used in a basic strapdown navigation propagation.
A vehicle has current attitude
 |
(34) |
The gyro measurement is
rad/s |
(35) |
the estimated gyro bias is
rad/s |
(36) |
and
s |
(37) |
Compute the corrected rate, delta angle, and a first order propagated quaternion.
The scalar part is
 |
(38) |
and the vector part is
 |
(39) |
Hamilton multiplication gives
 |
(40) |
Write
![$\displaystyle p=(1,[2,-1,0]^T), \qquad q=(2,[1,0,3]^T).$ $\displaystyle p=(1,[2,-1,0]^T), \qquad q=(2,[1,0,3]^T).$](https://images.physicslibrary.org/cache/objects/1112/l2h/img83.png) |
(41) |
The scalar part is
![$\displaystyle 1(2)-[2,-1,0] \begin{bmatrix} 1\\ 0\\ 3 \end{bmatrix}=2-2=0.$ $\displaystyle 1(2)-[2,-1,0] \begin{bmatrix} 1\\ 0\\ 3 \end{bmatrix}=2-2=0.$](https://images.physicslibrary.org/cache/objects/1112/l2h/img84.png) |
(42) |
The vector part is
 |
(43) |
Therefore
 |
(44) |
The scalar part is again zero. The vector part is
 |
(45) |
Thus
 |
(46) |
which differs from .
The scalar vector product is
 |
(47) |
For pure vectors,
 |
(48) |
The dot product is
 |
(49) |
The cross product is
 |
(50) |
Therefore
 |
(51) |
The conjugate reverses the vector part:
 |
(52) |
The squared norm is
 |
(53) |
Hence
 |
(54) |
Using
 |
(55) |
we obtain
 |
(56) |
The squared norm is
 |
(57) |
Therefore it is a unit quaternion.
For angle
,
 |
(58) |
Thus
 |
(59) |
The rotated vector is
 |
(60) |
Replacing by gives
 |
(61) |
Therefore the physical rotation is unchanged.
The quaternion is a active rotation about . Therefore
 |
(62) |
The vector only formula is
 |
(63) |
A vector parallel to the rotation axis is unchanged:
 |
(64) |
If acts first and acts second, then
 |
(65) |
Starting from
, a rotation about gives
 |
(66) |
A subsequent rotation about leaves
unchanged, so
 |
(67) |
Reversing the order,
 |
(68) |
under the rotation, and the later rotation leaves
unchanged. Therefore
 |
(69) |
The different answers demonstrate noncommutativity.
The matrix is
 |
(70) |
The columns are the images of the basis vectors:
 |
(71) |
For a unit quaternion,
 |
(72) |
The matrix is a active rotation about , so one choice is
 |
(73) |
Its negative is equally valid.
The matrix is a active rotation about , so
 |
(74) |
or
is valid. Here
 |
(75) |
Therefore a recovery formula that divides by is singular or numerically fragile. A largest component branch should be used instead.
This is pure yaw, so
 |
(76) |
This is pure roll, so
 |
(77) |
The 3 2 1 representation becomes singular at
 |
(78) |
At these attitudes the yaw and roll axes align, so the coordinate representation loses one independent direction.
For body resolved angular velocity,
 |
(79) |
For inertial resolved angular velocity,
 |
(80) |
The rotation is about the axis through angle , so
 |
(81) |
The delta angle is
rad |
(82) |
Thus
 |
(83) |
The first order small angle increment is
 |
(84) |
Five minutes is 300 s. The approximate error is
Forward Euler gives
 |
(86) |
This step is only tangent to the unit quaternion sphere to first order, so
 |
(87) |
in general. A common correction is
 |
(88) |
From
 |
(89) |
right multiply by :
 |
(90) |
From
 |
(91) |
left multiply by :
 |
(92) |
For a small error,
![$\displaystyle \delta q \approx \begin{bmatrix} 1\\ [1mm] \dfrac12\delta\boldsymbol\theta \end{bmatrix}.$ $\displaystyle \delta q \approx \begin{bmatrix} 1\\ [1mm] \dfrac12\delta\boldsymbol\theta \end{bmatrix}.$](https://images.physicslibrary.org/cache/objects/1112/l2h/img167.png) |
(93) |
Therefore
 |
(94) |
The quaternions and represent the same relative rotation. Choosing
 |
(95) |
selects the representative associated with the principal rotation angle from 0 to . This is usually the smaller attitude correction.
For two small body increments,
 |
(96) |
The cross product is
 |
(97) |
Therefore
 |
(98) |
A basic strapdown propagation proceeds as follows:
- correct the body gyro measurement using the current sensor calibration and gyro bias estimate;
- integrate the corrected gyro data to propagate the quaternion attitude;
- use the propagated attitude to rotate measured body specific force into the inertial or navigation frame;
- combine the rotated specific force with gravity and any required frame terms;
- integrate acceleration to update velocity and then position.
The corrected gyro rate is
rad/s |
(99) |
The delta angle is
rad |
(100) |
The first order incremental quaternion is
 |
(101) |
Since is the identity,
 |
(102) |
A production implementation would normally normalize this first order result, or use the exact exponential increment directly.
This article is an original synthesis prepared for PhysicsLibrary and intended for release under CC BY-SA 4.0.
|