Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random |  
Login
create new user
Username:
Password:
forget your password?
Main Menu
Sections

Meta

Talkback

Downloads

Information
Strapdown Inertial Navigation: Discrete Quaternion and Finite-Increment Propagation (Topic)

Strapdown Inertial Navigation: Discrete Quaternion and Finite-Increment Propagation

INS07 derived the continuous attitude kinematics. A real strapdown computer, however, does not receive a continuous angular-rate function. It receives sampled gyroscope data at discrete times. Depending on the IMU, the data may be reported as angular rate, integrated angle, or a manufacturer-corrected delta angle over each sample interval.

The implementation problem is therefore not merely

             [    ]
dqnb    1 n     0
dt--=  2qb ⊗  ωb   .
                nb
(1)

The computer must convert finite sensor samples into a finite rotation, compose that rotation with the existing attitude, preserve the unit-quaternion constraint, account for navigation-frame motion, and detect numerical or convention errors before they corrupt the velocity solution.

The central propagation chain is

|--------------------------------n-------|
-ω-−→--Δ-𝜃-−→--δq-−-→-qk+1-−-→-C-b (qk+1).
(2)

PIC

Figure. A digital attitude mechanization converts sampled gyroscope information into a finite angular increment, then into a unit quaternion increment, and finally composes that increment with the previous attitude.

1 Learning objectives

After completing this entry, the reader should be able to:

  1. distinguish angular rate, delta angle, and finite quaternion increment;
  2. derive the exact quaternion increment associated with a constant angular rate over a sample interval;
  3. propagate a body-to-navigation quaternion using right multiplication by a body-resolved finite increment;
  4. derive a two-sided discrete update that accounts separately for body rotation and navigation-frame rotation;
  5. derive stable small-angle approximations for the quaternion increment;
  6. explain why the first-order quaternion update is not exactly unit norm;
  7. normalize a quaternion without changing the represented attitude;
  8. explain the sign equivalence of q and −q;
  9. compare exact finite-increment propagation with forward-Euler integration of the quaternion differential equation;
  10. identify when coning corrections are needed and when exact sequential sample propagation already retains the finite-rotation information;
  11. formulate implementation invariants for quaternion norm, DCM orthogonality, determinant, one-axis motion, and stationary-Earth tests;
  12. design a numerically robust discrete attitude update suitable for a strapdown navigation loop.

2 From continuous gyro rate to sampled data

The ideal gyroscope measurement is the inertial angular rate of the body, resolved in body coordinates,

ωbib(t).
(3)

A sampled digital IMU may provide this rate at times tk, or it may provide the integrated angular increment over the interval

[tk,tk+1],    Δtk  = tk+1 − tk.
(4)

The ideal inertial body increment is

|---------∫-tk+1----------|
|Δ 𝜃b  =        ωb (t)dt.|
|   ib,k    tk    ib      |
-------------------------|
(5)

If the rate is approximately constant over the interval,

   b      b
Δ 𝜃ib,k ≈ ωib,kΔtk.
(6)

This distinction matters in software. If an IMU already reports Δ𝜃, multiplying by Δt again is a serious scale error.

2.1 Three quantities that should never share one variable name

A robust implementation should distinguish

ω angular rate, units rad/s, (7)
Δ𝜃 angular increment, units rad, (8)
δq dimensionless unit quaternion increment. (9)

The units alone catch many integration mistakes.

3 Navigation-relative angular increment

For a local-level NED attitude, INS07 showed that the propagation rate is

|--b-----b-----b--n--|
-ω-nb =-ωib −-C-nω-in,|
(10)

where

  n     n     n
ω in = ωie + ωen.
(11)

For a sufficiently short sample interval, a midpoint approximation gives

|--b---------b------b---------n-------------|
Δ-𝜃nb,k ≈-Δ𝜃-ib,k-−-C-n(tk+1∕2)ω-in-(tk+1∕2)Δtk.--
(12)

The attitude used in Cnb should represent the interval reasonably well. Using the beginning-of-step attitude is first order. A midpoint or predictor-corrector value is usually better when the interval or angular rate is not extremely small.

4 Exact finite quaternion increment

Suppose the navigation-relative angular rate is constant over one interval. Define

Δ 𝜃 = ωbnbΔt.
(13)

Let

α = ∥Δ 𝜃∥,     u =  Δ𝜃-.
                     α
(14)

The exact finite rotation over the interval is an axis-angle rotation by α about u. With the scalar-first Hamilton convention used throughout this series, its quaternion is

|----[-----------]--|
|      cos(α ∕2)    |
δq =              . |
-------u-sin(α-∕2)----
(15)

Equivalently, without explicitly constructing u,

|----------------------|
|     ⌊  cos(α ∕2)  ⌋  |
|     ⌈             ⌉  |
|δq =   sin(α∕2)Δ 𝜃   .|
-----------α-----------|
(16)

The limit as α → 0 is well behaved because

    sin (α ∕2)   1
lαim→0 ---------= --.
       α       2
(17)

PIC

Figure. The gyro increment is a finite rotation vector. Its magnitude is the rotation angle α, its direction is the rotation axis u, and the equivalent quaternion uses the half angle α∕2.

5 Discrete quaternion propagation

The quaternion qbn represents the same body-to-navigation transformation as C bn. If the increment is body relative to navigation and is resolved in body coordinates, then the finite update is

|-n-------n--------|
-qb,k+1-=-qb,k-⊗-δqk.-
(18)

This right multiplication is the quaternion counterpart of

  n        n     (    b    )
C b,k+1 = C b,k exp [Δ 𝜃 nb,k]×  .
(19)

The multiplication order is not optional. Reversing it generally applies the same numerical increment in a different frame.

5.1 Quaternion product used here

For

    [  ]          [  ]
     p0            q0
p =  p   ,    q =   q  ,
(20)

the Hamilton product is

|--------[------------------]--|
|             p0q0 − p ⋅ q     |
|p ⊗ q =                      .|
----------p0q-+-q0p-+-p-×--q---|
(21)

This definition should appear explicitly in source code documentation because alternate quaternion conventions can reverse signs or multiplication order.

6 A full two-sided discrete navigation-frame update

There is another useful way to implement the attitude step. Instead of first subtracting navigation-frame rate from the gyro, propagate the two frame rotations separately.

Over one interval define the inertial body increment

Δ 𝜃bib
(22)

and the inertial navigation-frame increment

Δ 𝜃nin ≈ ωninΔt.
(23)

Construct

δq+ = q(Δ 𝜃b )
  b        ib
(24)

and

δq− =  q(− Δ𝜃n ).
  n           in
(25)

Then, to the accuracy with which these finite increments represent the interval,

|------------------------|
|n         −    n      + |
qb,k+1-≈--δqn-⊗-qb,k ⊗-δqb .
(26)

The left factor removes the inertial rotation of the navigation frame. The right factor applies the inertial rotation of the body. This is the finite-increment analogue of the continuous equation

             [    ]     [   ]
dqnb   1- n     0     1-  0      n
 dt  = 2 qb ⊗  ωbib −  2  ωnin  ⊗ qb.
(27)

For very small intervals, this two-sided update and the corrected-relative-rate update agree to the expected order. The two-sided form is especially useful for reasoning about frame bookkeeping.

7 Small-angle quaternion updates

For small α, expand the trigonometric functions:

cos(α∕2) = 1 −α2
---
 8 + α4
----
384 + O(α6), (28)
sin(α∕2-)
    α = 1-
2 −  2
α--
48 +   4
-α---
3840 + O(α6). (29)

Therefore

|-----⌊---------------⌋--|
|         1 − α2 ∕8      |
|δq ≈ ⌈ ( 1   α2)     ⌉ .|
|         -−  ---  Δ𝜃    |
----------2---48---------|
(30)

The simplest first-order approximation is

|------------------|
|        [      ]  |
|δqfirst =     1    .|
|         Δ 𝜃 ∕2   |
-------------------
(31)

It is often adequate for very small increments, but it is not exactly unit norm.

7.1 Norm of the first-order increment

Its squared norm is

∥δqfirst∥2 = 1 + 1-
4Δ𝜃T Δ𝜃 (32)
= 1 + α2
---
4. (33)

Thus

|------------------------|
|          ∘ ------2     |
|∥δqfirst∥ =   1 +  α--> 1 |
------------------4------
(34)

for every nonzero increment.

8 What normalization fixes, and what it does not

If a numerically propagated quaternion is

^q,
(35)

a standard correction is

|------------|
|     --^q--- |
|q ←  ∘ -T--.|
--------^q-^q--|
(36)

Normalization projects the four-component vector back onto the unit 3-sphere. It repairs norm drift. It does not, in general, repair an incorrect rotation axis, an incorrect multiplication order, an omitted Earth-rate correction, an incorrect sample interval, or a coning error.

For the normalized first-order increment

    1      [  1   ]
∘----------        ,
  1 + α2∕4  Δ 𝜃∕2
(37)

the represented rotation angle is

|------------------(--)--|
|                −1  α-  |
-αfirst,norm-=-2-tan-----2--.-
(38)

For small α,

                    α3
α − 2 tan −1(α∕2) =  ---+ O (α5).
                    12
(39)

So normalization removes the norm error, while a third-order attitude error remains.

PIC

Figure. After normalization, the first-order quaternion still represents a slightly smaller rotation than the exact finite increment. The residual angle error scales approximately with the cube of the increment magnitude.

9 A numerical finite-increment example

Take

       ⌊       ⌋
         0.010
Δ 𝜃 =  ⌈− 0.020⌉ rad.
         0.015
(40)

Its magnitude is

       ----------------------------
α  = ∘ 0.0102 + (− 0.020 )2 + 0.0152 ≈ 0.0269258240 rad.
(41)

The exact finite quaternion increment is

|-----⌊---------------⌋--|
|       0.9999093764     |
|     || 0.0049998490  ||  |
|δq ≈ ⌈− 0.0099996979 ⌉ .|
|       0.0074997734     |
--------------------------
(42)

The first-order increment is

        ⌊        ⌋
             1
δq    = ||  0.005  ||.
  first   ⌈ − 0.010 ⌉
          0.0075
(43)

Its norm is slightly greater than one. Renormalizing it makes the result very close to the exact increment, but not mathematically identical.

10 Exact finite increment versus forward Euler integration

A common alternative is to integrate the differential equation directly using forward Euler,

                  [   ]
qFkE+1 = qk + 1-qk ⊗  0   Δt.
            2      ωk
(44)

Factor qk on the right-hand increment:

            [   1    ]
qFkE+1 = qk ⊗           .
             ωk Δt ∕2
(45)

Thus forward Euler on the quaternion differential equation is exactly the same first-order increment discussed above. Normalizing after the step repairs its norm but does not turn it into the exact exponential-map solution.

For a constant angular rate over the interval, constructing the finite quaternion increment from sine and cosine is inexpensive and gives the exact constant-rate rotation. There is little reason to use plain forward Euler when the finite increment is available.

11 Numerically stable evaluation near zero angle

The expression

sin(α ∕2)
---------
   α
(46)

is mathematically regular at zero but can lose floating-point accuracy if evaluated carelessly for very small α. Two practical approaches are common.

First, switch to the series

sin(α∕2 )   1   α2     α4
---------≈  --− ---+  -----.
    α       2   48    3840
(47)

Second, use a numerically stable sinc implementation. If

sinc (x) = sin-x-,
            x
(48)

then

sin(α∕2)-   1-
    α    =  2 sinc(α ∕2).
(49)

The threshold between direct evaluation and series evaluation should be chosen based on the floating-point type and implementation environment.

12 Quaternion normalization in a real mechanization

Exact multiplication of unit quaternions preserves unit norm algebraically. Floating-point arithmetic introduces roundoff. Approximate integration can introduce additional drift. A practical update therefore often ends with

qk+1 ←  -qk+1-.
        ∥qk+1∥
(50)

PIC

Figure. Normalization projects a numerically perturbed quaternion back to the unit-quaternion manifold. It fixes the constraint qT q = 1, but it does not correct a physically wrong attitude update.

12.1 Do not hide gross failures with normalization

Normalization should not replace input validation. Before normalizing, an implementation should reject or flag conditions such as

∥q∥ ≈ 0,
(51)

nonfinite components, impossible sample intervals, or unexpectedly large norm errors. A tiny norm correction is Normal. A large correction is diagnostic information.

13 The sign ambiguity of a quaternion

The two quaternions

q    and      − q
(52)

represent the same physical attitude. Therefore a perfectly correct algorithm may occasionally change the sign of all four quaternion components without changing Cbn.

For continuous logging, interpolation, or plotting, it is often useful to enforce sign continuity. If

qTk qk− 1 < 0,
(53)

replace

------------
|qk ← − qk.|
------------
(54)

This does not change the attitude. It only chooses the closer of the two equivalent quaternion representations.

14 Multiple gyro samples within one navigation update

Suppose a navigation update contains m gyro increments,

Δ 𝜃1,Δ 𝜃2,...,Δ 𝜃m.
(55)

If each increment is propagated sequentially with its own exact finite quaternion,

|----------------------------------|
|q    = q  ⊗ δq  ⊗ δq ⊗  ⋅⋅⋅ ⊗ δq ,|
--k+m----k-----1-----2----------m--
(56)

then the noncommutativity of those finite sample rotations is retained.

If instead the software collapses the samples into one vector by

          ∑
Δ 𝜃naive =    Δ 𝜃j,
            j
(57)

cross-axis information is lost. INS07E2 showed how coning corrections recover the leading noncommutative terms.

Thus an important design distinction is:

Exact sequential propagation of each resolved sample is not the same as naive vector summation followed by one update.

15 A robust discrete attitude-update sequence

A practical quaternion mechanization can be organized as follows.

  1. Read the IMU timestamp and gyro data.
  2. Determine whether the gyro quantity is rate or already-integrated delta angle.
  3. Convert all angular quantities to radians and seconds.
  4. Correct deterministic gyro errors available at this stage, such as estimated bias.
  5. Compute Earth rate and navigation-frame transport rate.
  6. Form either the navigation-relative increment or separate body and navigation increments.
  7. Apply coning compensation if multiple subincrements are being collapsed into one update.
  8. Construct the finite unit quaternion increment using the exact or stable small-angle formula.
  9. Compose the increment with the previous quaternion in the documented multiplication order.
  10. Normalize the result.
  11. Optionally enforce quaternion sign continuity for logs or interpolation.
  12. Convert to a DCM if the velocity mechanization requires Cbnfb.
  13. Run invariants and diagnostic checks.

16 Implementation checks

A strapdown attitude propagator should be surrounded by tests that are simple enough to verify analytically.

16.1 Zero-increment test

If

Δ𝜃 =  0,
(58)

then

      [          ]T
δq =  1  0   0  0
(59)

and the attitude must remain unchanged.

16.2 Single-axis test

For a positive body z increment ψ,

     ⌊         ⌋
      cos(ψ ∕2)
     ||    0    ||
δq = ⌈    0    ⌉ .
       sin(ψ ∕2)
(60)

The corresponding DCM should match the series sign convention for positive yaw.

16.3 Unit-norm test

Require

|--------------|
||qT q − 1| < 𝜀q.
----------------
(61)

The tolerance should be appropriate to the floating-point precision and normalization strategy.

16.4 DCM orthogonality test

After conversion from quaternion,

|--T-----------------------------------|
∥C---C-−-I∥-<-𝜀C-,----|det-C-−-1-| <-𝜀d.
(62)

Both are useful. Determinant alone is not a sufficient DCM test.

16.5 Quaternion-DCM round trip

Test

q →  C (q) → qrec.
(63)

The recovered quaternion should equal either q or −q to numerical precision.

16.6 Composition-order test

Apply a known x increment followed by a known y increment. Reverse the multiplication order and confirm that the final attitudes differ. This prevents an accidental switch between body-resolved and navigation-resolved increment conventions.

16.7 Stationary Earth-fixed test

For a body fixed to Earth and aligned with NED,

   b      b n
Δ 𝜃ib ≈ Cn ωieΔt.
(64)

After Earth-rate subtraction, the relative increment should be approximately zero and the NED attitude should remain fixed.

16.8 Rate versus delta-angle test

Feed the same physical rotation once as rate data and once as preintegrated angle data. The two paths should produce the same result when the software handles their units correctly.

PIC

Figure. A discrete attitude mechanization should be treated as a testable numerical component. Quaternion norm, DCM orthogonality, one-axis motion, frame-rate cancellation, and unit consistency expose different classes of implementation error.

17 Why time tagging matters

If the software uses rate data,

Δ 𝜃 ≈ ω Δt.
(65)

An error in Δt therefore directly scales the inferred angular increment. A timestamp slip, dropped sample, or duplicated sample can become an attitude error even if the gyro measurement itself is perfect.

If the IMU supplies delta angles integrated internally over its own sample interval, the navigation computer should use those increments consistently with the associated timestamps. It should not silently assume that every packet corresponds to an identical nominal Δt if the hardware documentation says otherwise.

18 Small-angle threshold selection

There is no universal physical angle at which the small-angle formula suddenly becomes invalid. The threshold is a numerical-design decision based on the required accuracy.

For a normalized first-order quaternion, the leading angle error is approximately

       3
𝜖α ≈  α-.
      12
(66)

For example:

Increment magnitudeNormalized first-order angle error


1∘ approximately 0.091 arcsec
5∘ approximately 11.4 arcsec
10∘ approximately 91.0 arcsec
20∘ approximately 718 arcsec

This makes the engineering trade clear. At high-rate IMU sampling, individual increments are usually small. During low-rate propagation or very rapid vehicle motion, exact finite increments are preferable.

19 Connection to the velocity mechanization

The propagated attitude is used immediately to rotate accelerometer specific force,

|-n-----n----b-|
-fib-=-C-b (q)fib.
(67)

The NED velocity equation is then

   n
dv-eb=  Cnfb + gn −  (2 ωn + ωn  ) × vn .
 dt      b ib           ie    en     eb
(68)

Thus a quaternion propagation error is not confined to the attitude output. It immediately rotates the accelerometer vector incorrectly and becomes a velocity and position error.

20 Connection to coning and sculling

INS07E2 showed that finite rotations do not commute. When several gyro subincrements are combined before an attitude update, coning corrections are required to recover the leading cross-product terms.

The accelerometer analogue is sculling. If the body rotates while accelerometer delta velocity is accumulated, the direction in which each increment acts changes during the interval. Later lessons will derive the coupled angular-increment and delta-velocity corrections needed for a full sampled-data strapdown mechanization.

21 Summary

A digital gyro may provide angular rate or integrated delta angle. The software must distinguish them explicitly.

For a finite navigation-relative angular increment

Δ 𝜃,     α = ∥Δ 𝜃∥,
(69)

the exact quaternion increment is

|----------------------|
|     ⌊  cos(α ∕2)  ⌋  |
|     ⌈             ⌉  |
|δq =   sin(α∕2)Δ 𝜃   .|
-----------α-----------|
(70)

For the convention used here,

|--------------|
qk+1-=-qk-⊗-δq.-
(71)

A useful two-sided inertial update is

|----------------------------------|
qnb,k+1 ≈  q(− Δ 𝜃nin) ⊗ qnb,k ⊗ q(Δ 𝜃bib).
------------------------------------
(72)

The small-angle approximation

     [      ]
         1
δq ≈  Δ 𝜃 ∕2
(73)

is not exactly unit norm. Normalization restores the constraint but does not remove every finite-angle approximation error.

A robust implementation should verify quaternion norm, DCM orthogonality, determinant, one-axis propagation, multiplication order, Earth-rate cancellation, timestamp handling, and rate-versus-delta-angle units.

The discrete quaternion mechanization is therefore more than a formula. It is a finite-rotation algorithm with explicit frame conventions, sampling assumptions, numerical constraints, and testable physical invariants.

References

[1]   David H. Titterton and John L. Weston, Strapdown Inertial Navigation Technology, 2nd ed., Institution of Electrical Engineers, 2004.

[2]   Paul D. Groves, Principles of GNSS, Inertial, and Multisensor Integrated Navigation Systems, 2nd ed., Artech House, 2013.

[3]   Christopher Jekeli, Inertial Navigation Systems with Geodetic Applications, Walter de Gruyter, 2001.

[4]   Paul G. Savage, “Strapdown Inertial Navigation Integration Algorithm Design Part 1: Attitude Algorithms,” Journal of Guidance, Control, and Dynamics, vol. 21, no. 1, pp. 19–28, 1998.

[5]   John E. Bortz, “A New Mathematical Formulation for Strapdown Inertial Navigation,” IEEE Transactions on Aerospace and Electronic Systems, vol. AES-7, no. 1, pp. 61–66, 1971.


"Strapdown Inertial Navigation: Discrete Quaternion and Finite-Increment Propagation" is owned by bloftin.
(view preamble)
View style:
Other names:  INS08
Keywords:  strapdown inertial navigation, quaternion, attitude propagation, finite rotation, angular increment, gyroscope, normalization, small angle, matrix exponential, SO(3), discrete mechanization

Cross-references: commute, position, force, formula, noncommutative, representations, algorithm, Normal, manifold, type, regular, magnitude, vector, determinant, quaternion norm, differential equation, norm, quaternion, unit, velocity, detect, motion, function, computer, kinematics, INS07

This is version 1 of Strapdown Inertial Navigation: Discrete Quaternion and Finite-Increment Propagation, born on 2026-10-02.
Object id is 1358, canonical name is StrapdownInertialNavigationDiscreteQuaternionAndFiniteIncrementPropagation.
Accessed 8 times total.

Classification:
Physics Classification: 06.30.Gv (Velocity, acceleration, and rotation)
 02.20.Qs (General properties, structure, and representation of Lie groups)
 07.07.Df (Sensors ; remote)
Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:

No messages.

Interact
rate | post | correct | update request | add example | add (any)