Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random  

quaternion kinematics and angular velocity

(Topic)

Quaternion kinematics and angular velocity

A quaternion describes orientation at an instant. Quaternion kinematics describes how that orientation changes when a rigid body has angular velocity. This connection is fundamental in inertial navigation, spacecraft attitude propagation, robotics, multibody dynamics, and simulation because gyroscopes measure angular rate while an attitude estimator or controller usually needs an orientation state.

The central result is simple but convention sensitive. For the PhysicsLibrary convention, angular velocity resolved in the inertial frame multiplies the attitude quaternion on the left, while angular velocity resolved in the body frame multiplies on the right.

1 Convention declaration and attitude meaning

This article uses the PhysicsLibrary quaternion convention:

  1. right-handed orthonormal frames;
  2. Hamilton multiplication, so ij = k;
  3. scalar-first display notation,
    q = qw + qxi + qyj + qzk;
    (1)

  4. the attitude quaternion is
    q ≡ IqB,
    (2)

    which maps coordinates from the body frame B to the inertial or reference frame I;

  5. a vector transforms according to
    I      B   ∗
 v =  q  vq .
    (3)

Scalar-last storage, such as [qx,qy,qz,qw]T , is also common in software. It changes only the array layout, not the kinematic equations once the components have been mapped correctly.

2 Angular velocity is one geometric vector

Let the physical angular velocity of the body relative to the inertial frame be ω. Its components depend on the frame used to resolve it. Write

     ⌊ ωI⌋             ⌊ωB ⌋
 I   ⌈  xI⌉        B    ⌈  xB⌉
ω  =   ωyI  ,     ω  =   ω yB  .
       ωz               ω z
(4)

The two coordinate descriptions are related by the attitude matrix from Q09:

|--------------|
|ωI = R (q)ωB. |
----------------
(5)

For quaternion multiplication, embed the angular rate vector as a pure quaternion:

ωB =  ωB i + ωB j + ωBk,
       x     y      z
(6)

and similarly for ωI.

Figure 1 emphasizes that ωI and ωB are not two different physical angular velocities. They are two coordinate descriptions of the same geometric vector.

PIC

Figure 1:Quaternion kinematics for the attitude q = Iq B. The body frame is shown in blue, the inertial frame in gray, and the physical angular velocity vector in green. The same angular velocity may be resolved in either frame. Inertial resolved components multiply the attitude quaternion on the left; body resolved components multiply it on the right.

3 Infinitesimal rotation over a short time

Over a short interval dt, a body rotating with angular speed ∥ω∥ turns through the small physical angle

d𝜃 = ∥ω ∥dt.
(7)

The corresponding incremental unit quaternion is

           d𝜃         d𝜃
dqrot = cos---+ ω^ sin --.
            2         2
(8)

Using

   d𝜃-           2          d𝜃-  d-𝜃       3
cos  2 =  1 + O (dt ),   sin 2  =  2 +  O(dt ),
(9)

gives the first order increment

|--------------------------|
dqrot = 1 + 1ω dt + O (dt2).|
------------2---------------
(10)

The multiplication side now depends on the frame in which the rate is resolved.

4 Body resolved angular velocity

A small rotation resolved about the current body axes composes on the right of Iq B. Therefore

                (    1      )
q(t + dt) = q(t)  1 + --ωBdt   + O (dt2).
                     2
(11)

Subtracting q(t), dividing by dt, and taking the limit gives

|----------|
q˙=  1qωB. |
-----2------
(12)

This is the form most directly associated with gyroscope measurements when the gyros report angular velocity resolved in body axes.

Writing q = qw + q and using the scalar vector product gives

|----------------|
|       1-    B  |
|˙qw = − 2 q ⋅ ω ,|
-----------------
(13)

and

|------(---------------)--|
q˙=  1- qwωB +  q × ωB  . |
-----2---------------------
(14)

5 Inertial resolved angular velocity

If the same infinitesimal physical rotation is resolved about inertial axes, it composes on the left:

            (     1 I  )            2
q (t + dt) =  1 +  -ω dt  q(t) + O (dt ).
                  2
(15)

Therefore

|----------|
|˙q = 1ωI q.|
-----2------
(16)

The scalar equation is unchanged,

|----------------|
|       1-     I |
|q˙w = − 2 q ⋅ ω ,|
-----------------
(17)

but the cross product order in the vector equation changes:

|------(---------------)-|
|˙q = 1- qwωI +  ωI × q  .|
-----2--------------------
(18)

6 Why the two forms are equivalent

Since the pure angular velocity quaternions are related by the attitude rotation,

ωI = qωBq ∗,
(19)

we have

ωI q = qωBq ∗q = qωB
(20)

for unit q. Hence

|--------------|
|1- I    1-  B |
|2ω q =  2qω  .|
----------------
(21)

The two differential equations therefore describe exactly the same physical attitude motion. The multiplication side changes only because the angular-rate components are expressed in different frames.

7 Scalar-first matrix form

Define the scalar-first quaternion column

     [              ]T
q4 =  qw  qx  qy  qz   .
(22)

For body resolved angular velocity,

|-----1------------|
|˙q4 = --ΩR (ωB )q4, |
------2------------|
(23)

where

|---------⌊---------------------⌋--|
|           0   − ωx  − ωy  − ωz   |
|         | ωx   0     ωz   − ωy|  |
|ΩR (ω ) = |⌈                     |⌉ .|
|           ωy  − ωz   0     ωx    |
------------ωz---ωy---−-ωx---0------
(24)

For inertial resolved angular velocity,

|------------------|
|      1-    I     |
|q˙4 =  2ΩL (ω )q4, |
-------------------
(25)

where

|----------------------------------|
|         ⌊                     ⌋  |
|           0   − ωx  − ωy  − ωz   |
|Ω (ω ) = ||ωx    0    − ωz   ωy || .|
| L       ⌈ωy    ωz    0    − ωx⌉  |
|           ωz  − ωy   ωx    0     |
------------------------------------
(26)

The different sign patterns encode left versus right quaternion multiplication.

8 Rate form driven directly by a three vector

The body rate equation can also be written as a 4 × 3 matrix multiplying the measured angular rate vector:

|------------------------------|
|       ⌊ − q  − q   − q ⌋     |
|       |   x     y     z|     |
|˙q4 = 1-| qw   − qz   qy | ωB. |
|     2 ⌈  qz   qw   − qx⌉     |
|         − qy  qx    qw       |
-------------------------------
(27)

For inertial resolved components,

|------------------------------|
|       ⌊                ⌋     |
|         − qx  − qy − qz      |
|˙q  =  1||  qw   qz   − qy|| ωI. |
| 4    2⌈ − qz  qw    qx ⌉     |
|          qy   − qx  qw       |
-------------------------------
(28)

These forms are convenient in estimation and simulation code because they map a measured three component rate directly into a four component quaternion rate.

9 Norm preservation in continuous time

An exact attitude quaternion should remain unit length. Both rate matrices in equations (27) and (29) are skew symmetric, so

ΩTR = − ΩR,     ΩTL = − ΩL.
(29)

Therefore

d-(qT4q4 ) = 2qT4q˙4 =  qT4Ωq4  = 0.
dt
(30)

Hence

|------------|
| d          |
|--∥q ∥2 = 0.|
-dt----------
(31)

The continuous differential equation preserves quaternion norm exactly. Any norm drift in a numerical simulation is therefore a discretization effect, not a property of the exact kinematics.

10 Constant angular velocity

If ωB is constant in body coordinates, equation (13) has the exact solution

|---------------(-------------)--|
|                 1- B           |
|q(t) = q(t0) exp  2 ω (t − t0)  .|
---------------------------------
(32)

If ωI is constant in inertial coordinates,

|----------(------------)------|
|            1  I              |
q (t) = exp   -ω  (t − t0)  q(t0).|
-------------2------------------
(33)

For a nonzero angular rate vector, the exponential is

|---(-------)------------------------------|
|     1-            ∥ω-∥Δt-        ∥ω-∥Δt- |
|exp  2 ωΔt   = cos    2   +  ^ω sin    2   .|
--------------------------------------------
(34)

This is the exact finite quaternion increment for constant angular velocity over the interval.

11 Gyroscope propagation

A body mounted gyroscope normally reports a sample of body resolved angular velocity. If the rate is approximated as constant during a sample interval Δt, form

           B                 B
δq = cos ∥ω--∥Δt-+  ^ωB sin ∥-ω-∥Δt-,
            2                 2
(35)

and update

|------------|
|q   =  q δq.|
--k+1----k----
(36)

This exact constant rate step is preferable to memorizing a sign pattern without first establishing the frame and multiplication convention. Numerical integration methods and normalization strategies are treated in Q13.

12 Checks that catch convention errors

Several simple cases are especially useful for implementation testing.

  1. If ω = 0, then q = 0.
  2. Starting from q = 1 with constant positive z-axis rate,
              ωt-       ωt-
q(t) = cos  2 + k sin  2 .
    (37)

  3. Replacing q by −q also replaces q by −q, so the physical attitude trajectory is unchanged.
  4. Body and inertial rate forms must agree after applying ωI = R(q)ωB.
  5. The exact continuous rate equation must preserve ∥q∥ = 1.

13 Common pitfalls

The most common mistakes are:

  1. using a body rate equation with inertial resolved angular velocity or the reverse;
  2. putting angular velocity on the wrong multiplication side;
  3. importing a kinematic equation from a source that defines the attitude quaternion in the opposite frame direction;
  4. confusing scalar-first and scalar-last memory layouts with different kinematic physics;
  5. forgetting the factor of 1∕2, which follows from the quaternion half angle representation;
  6. interpreting numerical norm drift as physical attitude behavior rather than integration error.

14 What comes next

The next entry introduces relative attitude and error quaternions. Later, Q13 returns to quaternion propagation and compares discrete numerical integration methods, exact exponential updates, normalization, and sign continuity.

15 Sources and historical notes

Quaternion rate equations have long been used in spacecraft attitude systems. The 1977 NASA Space Shuttle working relationships note by D. M. Henderson is a useful historical engineering reference connecting Euler Angles, quaternions, and transformation matrices. Bach and Paielli’s NASA Technical Memorandum 102798 develops quaternion attitude formulations in the context of rigid-body state estimation and spacecraft control. The equations here are written in the PhysicsLibrary convention rather than copied from either source, because the multiplication side and signs depend on the precise frame and quaternion mapping definitions.

References

[1]   D. M. Henderson, Euler Angles, Quaternions, and Transformation Matrices Working Relationships, NASA JSC-12960, July 1977.

[2]   R. Bach and R. Paielli, Direct Inversion of Rigid-Body Rotational Dynamics, NASA Technical Memorandum 102798, 1990.

License

This article is an original synthesis prepared for PhysicsLibrary and intended for release under CC BY-SA 4.0.


"quaternion kinematics and angular velocity" is owned by bloftin.
(view preamble)
View style:
See Also: quaternion series overview and article guide, Quaternions for Physics and Engineering: Orientation, Notation, and Conventions, quaternion definition and basic algebra, example of quaternion definition and basic algebra, quaternion product, example of quaternion product, quaternion conjugate, example of quaternion conjugate, quaternion norm, example of quaternion norm, quaternion inverse, example of quaternion inverse

Keywords:  quaternion, angular velocity, quaternion kinematics, attitude propagation, body angular rate, inertial angular rate, rigid body

Attachments:
example of quaternion kinematics and angular velocity (Example) by bloftin

Cross-references: Euler Angles, systems, relative attitude and error quaternions, representation, testing, norm, quaternion norm, differential equations, vector product, scalar, unit, speed, quaternion multiplication, matrix, vector, angular velocity, rigid body, kinematics, quaternion
There are 6 references to this object.

This is version 4 of quaternion kinematics and angular velocity, born on 2026-08-24, modified 2026-08-27.
Object id is 1105, canonical name is QuaternionKinematicsAndAngularVelocity.
Accessed 337 times total.

Classification:
Physics Classification: 45.40.-f (Dynamics and kinematics of rigid bodies)
 02.40.Yy (Geometric mechanics )
 02.10.Hh (Rings and algebras)

Pending Errata and Addenda

None.

Discussion

No messages.

Interact