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

Meta

Talkback

Downloads

Information
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.

Convention declaration and attitude meaning

This article uses the PhysicsLibrary quaternion convention:

  1. right-handed orthonormal frames;
  2. Hamilton multiplication, so $\mathbf i\mathbf j=\mathbf k$;
  3. scalar-first display notation,
    $\displaystyle q=q_w+q_x\mathbf i+q_y\mathbf j+q_z\mathbf k;$ (1)
  4. the attitude quaternion is
    $\displaystyle q \equiv {}^{I}q_B,$ (2)
    which maps coordinates from the body frame $B$ to the inertial or reference frame $I$;
  5. a vector transforms according to
    $\displaystyle {}^{I}\mathbf v=q\,{}^{B}\mathbf v\,q^*.$ (3)

Scalar-last storage, such as $[q_x,q_y,q_z,q_w]^T$, is also common in software. It changes only the array layout, not the kinematic equations once the components have been mapped correctly.

Angular velocity is one geometric vector

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

$\displaystyle \boldsymbol\omega^{I}= \begin{bmatrix} \omega_x^{I}\\ \omega_y^{I... ...^{B}= \begin{bmatrix} \omega_x^{B}\\ \omega_y^{B}\\ \omega_z^{B} \end{bmatrix}.$ (4)
The two coordinate descriptions are related by the attitude matrix from Q09:
$\displaystyle \boxed{\boldsymbol\omega^{I}=R(q)\boldsymbol\omega^{B}.}$ (5)

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

$\displaystyle \omega^{B}=\omega_x^{B}\mathbf i+\omega_y^{B}\mathbf j+\omega_z^{B}\mathbf k,$ (6)
and similarly for $\omega^{I}$.

Figure [*] emphasizes that $\boldsymbol\omega^{I}$ and $\boldsymbol\omega^{B}$ are not two different physical angular velocities. They are two coordinate descriptions of the same geometric vector.

Figure: 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.
Image Q11_quaternion_kinematics

Infinitesimal rotation over a short time

Over a short interval $dt$, a body rotating with angular speed $\Vert\boldsymbol\omega\Vert$ turns through the small physical angle

$\displaystyle d\theta=\Vert\boldsymbol\omega\Vert dt.$ (7)
The corresponding incremental unit quaternion is
$\displaystyle dq_{\mathrm{rot}} =\cos\frac{d\theta}{2} +\widehat{\boldsymbol\omega}\sin\frac{d\theta}{2}.$ (8)
Using
$\displaystyle \cos\frac{d\theta}{2}=1+O(dt^2), \qquad \sin\frac{d\theta}{2}=\frac{d\theta}{2}+O(dt^3),$ (9)
gives the first order increment
$\displaystyle \boxed{dq_{\mathrm{rot}}=1+\frac12\omega\,dt+O(dt^2).}$ (10)
The multiplication side now depends on the frame in which the rate is resolved.

Body resolved angular velocity

A small rotation resolved about the current body axes composes on the right of ${}^{I}q_B$. Therefore

$\displaystyle q(t+dt)=q(t)\left(1+\frac12\omega^{B}dt\right)+O(dt^2).$ (11)
Subtracting $q(t)$, dividing by , and taking the limit gives
$\displaystyle \boxed{\dot q=\frac12 q\omega^{B}.}$ (12)
This is the form most directly associated with gyroscope measurements when the gyros report angular velocity resolved in body axes.

Writing $q=q_w+\mathbf q$ and using the scalar vector product gives

$\displaystyle \boxed{ \dot q_w=-\frac12\mathbf q\cdot\boldsymbol\omega^{B}, }$ (13)
and
$\displaystyle \boxed{ \dot{\mathbf q}=\frac12\left(q_w\boldsymbol\omega^{B}+\mathbf q\times\boldsymbol\omega^{B}\right). }$ (14)

Inertial resolved angular velocity

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

$\displaystyle q(t+dt)=\left(1+\frac12\omega^{I}dt\right)q(t)+O(dt^2).$ (15)
Therefore
$\displaystyle \boxed{\dot q=\frac12\omega^{I}q.}$ (16)
The scalar equation is unchanged,
$\displaystyle \boxed{ \dot q_w=-\frac12\mathbf q\cdot\boldsymbol\omega^{I}, }$ (17)
but the cross product order in the vector equation changes:
$\displaystyle \boxed{ \dot{\mathbf q}=\frac12\left(q_w\boldsymbol\omega^{I}+\boldsymbol\omega^{I}\times\mathbf q\right). }$ (18)

Why the two forms are equivalent

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

$\displaystyle \omega^{I}=q\omega^{B}q^*,$ (19)
we have
$\displaystyle \omega^{I}q=q\omega^{B}q^*q=q\omega^{B}$ (20)
for unit $q$. Hence
$\displaystyle \boxed{ \frac12\omega^{I}q=\frac12 q\omega^{B}. }$ (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.

Scalar-first matrix form

Define the scalar-first quaternion column

$\displaystyle \mathbf q_4= \begin{bmatrix} q_w&q_x&q_y&q_z \end{bmatrix}^{T}.$ (22)
For body resolved angular velocity,
$\displaystyle \boxed{ \dot{\mathbf q}_4=\frac12\Omega_R(\boldsymbol\omega^{B})\mathbf q_4, }$ (23)
where
$\displaystyle \boxed{ \Omega_R(\boldsymbol\omega)= \begin{bmatrix} 0&-\omega_x&... ...\omega_y&-\omega_z&0&\omega_x\ \omega_z&\omega_y&-\omega_x&0 \end{bmatrix}. }$ (24)
For inertial resolved angular velocity,
$\displaystyle \boxed{ \dot{\mathbf q}_4=\frac12\Omega_L(\boldsymbol\omega^{I})\mathbf q_4, }$ (25)
where
$\displaystyle \boxed{ \Omega_L(\boldsymbol\omega)= \begin{bmatrix} 0&-\omega_x&... ...\omega_y&\omega_z&0&-\omega_x\ \omega_z&-\omega_y&\omega_x&0 \end{bmatrix}. }$ (26)
The different sign patterns encode left versus right quaternion multiplication.

Rate form driven directly by a three vector

The body rate equation can also be written as a $4\times3$ matrix multiplying the measured angular rate vector:

$\displaystyle \boxed{ \dot{\mathbf q}_4 =\frac12 \begin{bmatrix} -q_x&-q_y&-q_z... ...&-q_z&q_y\ q_z&q_w&-q_x\ -q_y&q_x&q_w \end{bmatrix}\boldsymbol\omega^{B}. }$ (27)
For inertial resolved components,
$\displaystyle \boxed{ \dot{\mathbf q}_4 =\frac12 \begin{bmatrix} -q_x&-q_y&-q_z... ...&q_z&-q_y\ -q_z&q_w&q_x\ q_y&-q_x&q_w \end{bmatrix}\boldsymbol\omega^{I}. }$ (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.

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

$\displaystyle \Omega_R^T=-\Omega_R, \qquad \Omega_L^T=-\Omega_L.$ (29)
Therefore
$\displaystyle \frac{d}{dt}(\mathbf q_4^T\mathbf q_4) =2\mathbf q_4^T\dot{\mathbf q}_4 =\mathbf q_4^T\Omega\mathbf q_4 =0.$ (30)
Hence
$\displaystyle \boxed{\frac{d}{dt}\Vert q\Vert^2=0.}$ (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.

Constant angular velocity

If $\omega^{B}$ is constant in body coordinates, equation (13) has the exact solution

$\displaystyle \boxed{ q(t)=q(t_0)\exp\left(\frac12\omega^{B}(t-t_0)\right). }$ (32)
If is constant in inertial coordinates,
$\displaystyle \boxed{ q(t)=\exp\left(\frac12\omega^{I}(t-t_0)\right)q(t_0). }$ (33)
For a nonzero angular rate vector, the exponential is
$\displaystyle \boxed{ \exp\left(\frac12\omega\Delta t\right) =\cos\frac{\Vert\b... ...widehat{\boldsymbol\omega} \sin\frac{\Vert\boldsymbol\omega\Vert\Delta t}{2}. }$ (34)
This is the exact finite quaternion increment for constant angular velocity over the interval.

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 $\Delta t$, form

$\displaystyle \delta q =\cos\frac{\Vert\boldsymbol\omega^{B}\Vert\Delta t}{2} +... ...t{\boldsymbol\omega}^{B} \sin\frac{\Vert\boldsymbol\omega^{B}\Vert\Delta t}{2},$ (35)
and update
$\displaystyle \boxed{q_{k+1}=q_k\delta q.}$ (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.

Checks that catch convention errors

Several simple cases are especially useful for implementation testing.

  1. If $\boldsymbol\omega=0$, then $\dot q=0$.
  2. Starting from $q=1$ with constant positive $z$-axis rate,
    $\displaystyle q(t)=\cos\frac{\omega t}{2}+\mathbf k\sin\frac{\omega t}{2}.$ (37)
  3. Replacing by $-q$ also replaces $\dot q$ by $-\dot q$, so the physical attitude trajectory is unchanged.
  4. Body and inertial rate forms must agree after applying $\boldsymbol\omega^{I}=R(q)\boldsymbol\omega^{B}$.
  5. The exact continuous rate equation must preserve $\Vert q\Vert=1$.

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.

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.

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.

Bibliography

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:
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: systems, relative attitude and error quaternions, representation, testing, norm, quaternion norm, motion, differential equations, vector product, scalar, speed, quaternion multiplication, matrix, vector, reference frame, velocity, rigid body, kinematics, quaternion
There is 1 reference to this object.

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

Classification:
Physics Classification45.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
Style: Expand: Order:

No messages.

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