<?xml version="1.0" encoding="UTF-8"?>

<record version="2" id="1105">
 <title>quaternion kinematics and angular velocity</title>
 <name>QuaternionKinematicsAndAngularVelocity</name>
 <created>2026-08-24 02:14:32</created>
 <modified>2026-08-24 02:22:23</modified>
 <type>Topic</type>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="pacs" code="45.40.-f"/>
	<category scheme="pacs" code="02.40.Yy"/>
	<category scheme="pacs" code="02.10.Hh"/>
 </classification>
 <keywords>
	<term>quaternion</term>
	<term>angular velocity</term>
	<term>quaternion kinematics</term>
	<term>attitude propagation</term>
	<term>body angular rate</term>
	<term>inertial angular rate</term>
	<term>rigid body</term>
 </keywords>
 <preamble>% this is the default PhysicsLibrary preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics).
% If you use \includegraphics{figure} with no file extension, PhysicsLibrary
% will prefer figure.png before falling back to figure.eps.
\usepackage{graphicx}
\DeclareGraphicsExtensions{.png,.jpg,.jpeg,.pdf,.eps}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here</preamble>
 <content>\section*{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.

\section{Convention declaration and attitude meaning}

This article uses the PhysicsLibrary quaternion convention:
\begin{enumerate}
\item right-handed orthonormal frames;
\item Hamilton multiplication, so $\mathbf i\mathbf j=\mathbf k$;
\item scalar-first display notation,
\begin{equation}
q=q_w+q_x\mathbf i+q_y\mathbf j+q_z\mathbf k;
\end{equation}
\item the attitude quaternion is
\begin{equation}
q \equiv {}^{I}q_B,
\end{equation}
which maps coordinates from the body frame $B$ to the inertial or reference
frame $I$;
\item a vector transforms according to
\begin{equation}
{}^{I}\mathbf v=q\,{}^{B}\mathbf v\,q^*.
\end{equation}
\end{enumerate}

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.

\section{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
\begin{equation}
\boldsymbol\omega^{I}=
\begin{bmatrix}
\omega_x^{I}\\ \omega_y^{I}\\ \omega_z^{I}
\end{bmatrix},
\qquad
\boldsymbol\omega^{B}=
\begin{bmatrix}
\omega_x^{B}\\ \omega_y^{B}\\ \omega_z^{B}
\end{bmatrix}.
\end{equation}
The two coordinate descriptions are related by the attitude matrix from Q09:
\begin{equation}
\boxed{\boldsymbol\omega^{I}=R(q)\boldsymbol\omega^{B}.}
\end{equation}

For quaternion multiplication, embed the angular rate vector as a pure
quaternion:
\begin{equation}
\omega^{B}=\omega_x^{B}\mathbf i+\omega_y^{B}\mathbf j+\omega_z^{B}\mathbf k,
\end{equation}
and similarly for $\omega^{I}$.

Figure~\ref{fig:q11-kinematics} 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.

\begin{figure}[h]
\centering
\includegraphics[width=0.94\textwidth]{Q11_quaternion_kinematics.png}
\caption{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.}
\label{fig:q11-kinematics}
\end{figure}

\section{Infinitesimal rotation over a short time}

Over a short interval $dt$, a body rotating with angular speed
$\|\boldsymbol\omega\|$ turns through the small physical angle
\begin{equation}
d\theta=\|\boldsymbol\omega\|dt.
\end{equation}
The corresponding incremental unit quaternion is
\begin{equation}
dq_{\mathrm{rot}}
=\cos\frac{d\theta}{2}
+\widehat{\boldsymbol\omega}\sin\frac{d\theta}{2}.
\end{equation}
Using
\begin{equation}
\cos\frac{d\theta}{2}=1+O(dt^2),
\qquad
\sin\frac{d\theta}{2}=\frac{d\theta}{2}+O(dt^3),
\end{equation}
gives the first order increment
\begin{equation}
\boxed{dq_{\mathrm{rot}}=1+\frac12\omega\,dt+O(dt^2).}
\end{equation}
The multiplication side now depends on the frame in which the rate is resolved.

\section{Body resolved angular velocity}

A small rotation resolved about the current body axes composes on the right of
${}^{I}q_B$.  Therefore
\begin{equation}
q(t+dt)=q(t)\left(1+\frac12\omega^{B}dt\right)+O(dt^2).
\end{equation}
Subtracting $q(t)$, dividing by $dt$, and taking the limit gives
\begin{equation}
\boxed{\dot q=\frac12 q\omega^{B}.}
\end{equation}
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
\begin{equation}
\boxed{
\dot q_w=-\frac12\mathbf q\cdot\boldsymbol\omega^{B},
}
\end{equation}
and
\begin{equation}
\boxed{
\dot{\mathbf q}=\frac12\left(q_w\boldsymbol\omega^{B}+\mathbf q\times\boldsymbol\omega^{B}\right).
}
\end{equation}

\section{Inertial resolved angular velocity}

If the same infinitesimal physical rotation is resolved about inertial axes, it
composes on the left:
\begin{equation}
q(t+dt)=\left(1+\frac12\omega^{I}dt\right)q(t)+O(dt^2).
\end{equation}
Therefore
\begin{equation}
\boxed{\dot q=\frac12\omega^{I}q.}
\end{equation}
The scalar equation is unchanged,
\begin{equation}
\boxed{
\dot q_w=-\frac12\mathbf q\cdot\boldsymbol\omega^{I},
}
\end{equation}
but the cross product order in the vector equation changes:
\begin{equation}
\boxed{
\dot{\mathbf q}=\frac12\left(q_w\boldsymbol\omega^{I}+\boldsymbol\omega^{I}\times\mathbf q\right).
}
\end{equation}

\section{Why the two forms are equivalent}

Since the pure angular velocity quaternions are related by the attitude
rotation,
\begin{equation}
\omega^{I}=q\omega^{B}q^*,
\end{equation}
we have
\begin{equation}
\omega^{I}q=q\omega^{B}q^*q=q\omega^{B}
\end{equation}
for unit $q$.  Hence
\begin{equation}
\boxed{
\frac12\omega^{I}q=\frac12 q\omega^{B}.
}
\end{equation}
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.

\section{Scalar-first matrix form}

Define the scalar-first quaternion column
\begin{equation}
\mathbf q_4=
\begin{bmatrix}
q_w&amp;q_x&amp;q_y&amp;q_z
\end{bmatrix}^{T}.
\end{equation}
For body resolved angular velocity,
\begin{equation}
\boxed{
\dot{\mathbf q}_4=\frac12\Omega_R(\boldsymbol\omega^{B})\mathbf q_4,
}
\end{equation}
where
\begin{equation}
\boxed{
\Omega_R(\boldsymbol\omega)=
\begin{bmatrix}
0&amp;-\omega_x&amp;-\omega_y&amp;-\omega_z\\
\omega_x&amp;0&amp;\omega_z&amp;-\omega_y\\
\omega_y&amp;-\omega_z&amp;0&amp;\omega_x\\
\omega_z&amp;\omega_y&amp;-\omega_x&amp;0
\end{bmatrix}.
}
\end{equation}
For inertial resolved angular velocity,
\begin{equation}
\boxed{
\dot{\mathbf q}_4=\frac12\Omega_L(\boldsymbol\omega^{I})\mathbf q_4,
}
\end{equation}
where
\begin{equation}
\boxed{
\Omega_L(\boldsymbol\omega)=
\begin{bmatrix}
0&amp;-\omega_x&amp;-\omega_y&amp;-\omega_z\\
\omega_x&amp;0&amp;-\omega_z&amp;\omega_y\\
\omega_y&amp;\omega_z&amp;0&amp;-\omega_x\\
\omega_z&amp;-\omega_y&amp;\omega_x&amp;0
\end{bmatrix}.
}
\end{equation}
The different sign patterns encode left versus right quaternion
multiplication.

\section{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:
\begin{equation}
\boxed{
\dot{\mathbf q}_4
=\frac12
\begin{bmatrix}
-q_x&amp;-q_y&amp;-q_z\\
q_w&amp;-q_z&amp;q_y\\
q_z&amp;q_w&amp;-q_x\\
-q_y&amp;q_x&amp;q_w
\end{bmatrix}
\boldsymbol\omega^{B}.
}
\end{equation}
For inertial resolved components,
\begin{equation}
\boxed{
\dot{\mathbf q}_4
=\frac12
\begin{bmatrix}
-q_x&amp;-q_y&amp;-q_z\\
q_w&amp;q_z&amp;-q_y\\
-q_z&amp;q_w&amp;q_x\\
q_y&amp;-q_x&amp;q_w
\end{bmatrix}
\boldsymbol\omega^{I}.
}
\end{equation}
These forms are convenient in estimation and simulation code because they map
a measured three component rate directly into a four component quaternion rate.

\section{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
\begin{equation}
\Omega_R^T=-\Omega_R,
\qquad
\Omega_L^T=-\Omega_L.
\end{equation}
Therefore
\begin{equation}
\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.
\end{equation}
Hence
\begin{equation}
\boxed{\frac{d}{dt}\|q\|^2=0.}
\end{equation}
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.

\section{Constant angular velocity}

If $\omega^{B}$ is constant in body coordinates, equation (13) has the exact
solution
\begin{equation}
\boxed{
q(t)=q(t_0)\exp\left(\frac12\omega^{B}(t-t_0)\right).
}
\end{equation}
If $\omega^{I}$ is constant in inertial coordinates,
\begin{equation}
\boxed{
q(t)=\exp\left(\frac12\omega^{I}(t-t_0)\right)q(t_0).
}
\end{equation}
For a nonzero angular rate vector, the exponential is
\begin{equation}
\boxed{
\exp\left(\frac12\omega\Delta t\right)
=\cos\frac{\|\boldsymbol\omega\|\Delta t}{2}
+\widehat{\boldsymbol\omega}
\sin\frac{\|\boldsymbol\omega\|\Delta t}{2}.
}
\end{equation}
This is the exact finite quaternion increment for constant angular velocity over
the interval.

\section{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
\begin{equation}
\delta q
=\cos\frac{\|\boldsymbol\omega^{B}\|\Delta t}{2}
+\widehat{\boldsymbol\omega}^{B}
\sin\frac{\|\boldsymbol\omega^{B}\|\Delta t}{2},
\end{equation}
and update
\begin{equation}
\boxed{q_{k+1}=q_k\delta q.}
\end{equation}
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.

\section{Checks that catch convention errors}

Several simple cases are especially useful for implementation testing.
\begin{enumerate}
\item If $\boldsymbol\omega=0$, then $\dot q=0$.
\item Starting from $q=1$ with constant positive $z$-axis rate,
\begin{equation}
q(t)=\cos\frac{\omega t}{2}+\mathbf k\sin\frac{\omega t}{2}.
\end{equation}
\item Replacing $q$ by $-q$ also replaces $\dot q$ by $-\dot q$, so the physical
attitude trajectory is unchanged.
\item Body and inertial rate forms must agree after applying
$\boldsymbol\omega^{I}=R(q)\boldsymbol\omega^{B}$.
\item The exact continuous rate equation must preserve $\|q\|=1$.
\end{enumerate}

\section{Common pitfalls}

The most common mistakes are:
\begin{enumerate}
\item using a body rate equation with inertial resolved angular velocity or the
reverse;
\item putting angular velocity on the wrong multiplication side;
\item importing a kinematic equation from a source that defines the attitude
quaternion in the opposite frame direction;
\item confusing scalar-first and scalar-last memory layouts with different
kinematic physics;
\item forgetting the factor of $1/2$, which follows from the quaternion
half angle representation;
\item interpreting numerical norm drift as physical attitude behavior rather
than integration error.
\end{enumerate}

\section{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.

\section{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.

\begin{thebibliography}{9}

\bibitem{Henderson1977}
D. M. Henderson,
\emph{Euler Angles, Quaternions, and Transformation Matrices Working Relationships},
NASA JSC-12960, July 1977.

\bibitem{BachPaielli1990}
R. Bach and R. Paielli,
\emph{Direct Inversion of Rigid-Body Rotational Dynamics},
NASA Technical Memorandum 102798, 1990.

\end{thebibliography}

\section*{License}

This article is an original synthesis prepared for PhysicsLibrary and intended
for release under CC BY-SA 4.0.</content>
</record>
