|
|
|
Main Menu
|
|
Sections
Meta
Talkback
Downloads
Information
|
|
|
|
|
example of numerical quaternion propagation and IMU attitude state integration
|
(Example)
|
|
|
This companion article belongs to the PhysicsLibrary entry Numerical quaternion propagation and IMU attitude-state integration. All exercises are stated first. Complete solutions appear only after the exercise section.
We use the attitude quaternion
 |
(1) |
Hamilton multiplication, scalar-first display, and body-resolved gyroscope measurements. Therefore
 |
(2) |
and body-frame incremental rotations multiply on the right.
An IMU reports
rad/s |
(3) |
The estimated gyro bias is
rad/s |
(4) |
For
s, compute the corrected angular rate and the delta-angle vector.
For a delta-angle vector
rad |
(5) |
compute the exact incremental quaternion.
For the increment of Exercise 2, compute the first-order small-angle approximation and compare its norm with one.
Starting from the identity attitude, propagate one sample using the exact increment from Exercise 2.
Starting from
 |
(6) |
apply a small body-frame delta angle
rad. Write the update in correct multiplication order.
A programmer uses
 |
(7) |
for body-resolved gyroscope data. Explain the mistake.
Derive the forward Euler propagation formula from
.
Show that the forward Euler step does not preserve quaternion norm exactly.
A gyroscope has a constant uncorrected bias of /s about one axis. Approximately how large is the attitude error after ten minutes?
An IMU runs at 200 Hz and measures a constant rotation rate of /s about the axis. Compute the delta angle per sample and the exact incremental quaternion.
For two small body-frame increments
and
, derive the leading cross-product term in the equivalent rotation vector.
Let
 |
(8) |
Compute the first coning cross term.
Explain why normalizing a forward Euler update does not make it identical to an exact exponential update.
A quaternion time history contains consecutive samples and with
 |
(9) |
What continuity operation is commonly applied, and why?
For a right-error state, use the approximation
![$\displaystyle \delta q_B \approx \begin{bmatrix} 1\\ [1mm] \dfrac12\delta\boldsymbol\theta^B \end{bmatrix}$ $\displaystyle \delta q_B \approx \begin{bmatrix} 1\\ [1mm] \dfrac12\delta\boldsymbol\theta^B \end{bmatrix}$](https://images.physicslibrary.org/cache/objects/1110/l2h/img23.png) |
(10) |
to explain why a three-component attitude error can coexist with a four-component nominal quaternion.
A strapdown navigation state contains quaternion attitude, velocity, position, and gyro bias. Describe the propagation order connecting gyro measurement, quaternion update, accelerometer rotation, and velocity update.
Suppose an IMU reports delta angles directly. Why is it usually preferable to use those delta angles rather than first divide by to construct an angular rate and then multiply by again?
Compare the intended use of the small-angle approximation in direct IMU propagation with its use in a multiplicative error-state filter.
The corrected rate is
rad/s |
(11) |
Therefore
rad |
(12) |
The increment magnitude is
rad. Therefore
 |
(13) |
The first-order approximation is
 |
(14) |
Its norm is
 |
(15) |
Thus it is not exactly a unit quaternion until normalized.
The identity quaternion is , so
 |
(16) |
Hence the propagated attitude is exactly the increment from Exercise 2.
Because the gyro increment is body-resolved, it multiplies on the right:
 |
(17) |
For the small increment,
 |
(18) |
Thus
 |
(19) |
followed by normalization if the first-order increment is used.
For , body-resolved angular velocity satisfies
 |
(20) |
Therefore its finite increment multiplies on the right. Left multiplication corresponds to an inertial-resolved rate under this convention.
Forward Euler gives
 |
(21) |
Substituting the quaternion kinematic equation gives
 |
(22) |
Let
 |
(23) |
The added term is tangent to the unit-quaternion sphere only to first order. The squared norm therefore differs from one by terms of order
. Hence repeated unnormalized Euler steps drift away from unit norm.
A constant /s bias accumulates approximately linearly. Ten minutes is 600 s, so
This illustrates why gyro-bias estimation is essential.
At 200 Hz,
s |
(25) |
The sample rotation is
The exact increment is
 |
(27) |
or approximately
 |
(28) |
Use
 |
(29) |
For body increments in time order,
 |
(30) |
The vector part contains
 |
(31) |
Multiplying by two to recover the equivalent small rotation vector gives
 |
(32) |
The cross product is
 |
(33) |
Therefore the leading coning term is
rad |
(34) |
Normalization restores the constraint , but it does not reconstruct the higher-order phase terms omitted by the Euler discretization. The exact exponential update follows the unit-quaternion manifold for a constant sample rate, whereas normalized Euler only projects an approximate step back onto that manifold.
One commonly applies
 |
(35) |
Because and represent the same attitude, the physical orientation is unchanged. The sign flip simply chooses the representative closer to the previous quaternion, improving continuity for plotting, interpolation, and finite differencing.
The nominal attitude needs four quaternion components to represent a global orientation without Euler-angle singularities, subject to the unit-norm constraint. A local attitude perturbation has only three independent degrees of freedom. Therefore an estimator can propagate the nominal state as a full quaternion while carrying only the small three-vector
in its linearized error state.
A typical order is:
- read the body gyro and accelerometer measurements;
- correct the gyro measurement using the current bias estimate;
- form the delta angle and propagate the quaternion;
- rotate the measured body specific force into the navigation or inertial frame using the updated or appropriately time-centered attitude;
- combine specific force with gravity and other frame terms to propagate velocity and position;
- propagate gyro bias and other estimator states according to their process models.
A delta-angle output is already the sensor's estimate of integrated angular motion over the sample. Converting it to an average rate and then integrating again adds unnecessary numerical operations and may discard information if the device applied internal high-rate integration or coning compensation.
In direct propagation, the small-angle approximation may replace the exact increment only when the physical sample rotation is sufficiently small. In an error-state filter, the approximation has a different role: it represents a small local attitude error while the nominal attitude remains an exact full quaternion. The latter use is fundamental even when the nominal vehicle attitude itself is large.
This article is an original synthesis prepared for PhysicsLibrary and intended for release under CC BY-SA 4.0.
| "example of numerical quaternion propagation and IMU attitude state integration" is owned by bloftin.(view preamble)
|
|
This object's parent.
Cross-references: motion, force, manifold, cross product, kinematic, magnitude, position, velocity, operation, quaternion norm, formula, identity, norm, vector, section, quaternion
This is version 1 of example of numerical quaternion propagation and IMU attitude state integration, born on 2026-08-24.
Object id is 1110, canonical name is ExampleOfNumericalQuaternionPropagationAndIMUAttitudeStateIntegration.
Accessed 8 times total.
Classification:
|
|
|
|
|
|
|
|
Pending Errata and Addenda
|
|
|
|
|
|
|
|
|
|
|