---
title: Planning Quaternions
url: https://www.emergentmind.com/topics/planning-quaternions
type: topic
---

# Planning Quaternions

to=arxiv_search.search  玩大发快三  全民彩票天天送"query": "\"quaternion\" planning interpolation attitude representation guidance control arXiv", "max_results": 10}
to=arxiv_search.search  天天中彩票nbaions ,大香蕉"query": "\"Quaternions and Attitude Representation\" 1708.08680", "max_results": 5}
to=arxiv_search.search  เดิมพันฟรี  北京赛车有json_string
{"query": "\"RBF Solver for Quaternions Interpolation\" OR \"Symplectic Geometric Algorithm for Quaternion Kinematical Differential Equation\" OR quaternion interpolation control", "max_results": 10}
Planning quaternions are unit quaternions used as the native state for orientation planning, interpolation, propagation, and control, with conversion to Euler angles or axis–angle reserved for interfaces [1708.08680]. In this role, a quaternion is not merely a parameterization of attitude but the computational space in which orientation waypoints, geodesic interpolation, angular-velocity integration, and relative-attitude error are formulated. The relevant structure is the unit 3-sphere \(S^3 \subset \mathbb{R}^4\), together with the fact that \(q\) and \(-q\) represent the same physical rotation, so quaternion planning is simultaneously a problem in algebra, differential kinematics, and the topology of the double cover \(S^3 \to SO(3)\) [1708.08680].

## 1. Native orientation representation and algebraic conventions

A quaternion is a four-component extension of complex numbers,
\[
q = q_0 + q_1 i + q_2 j + q_3 k,
\]
or, in scalar-vector form,
\[
q = (q_0,\vec q) = (q_0,q_1,q_2,q_3),
\]
with \(q_0\) the real part and \(\vec q=(q_1,q_2,q_3)^T\) the imaginary part [1708.08680]. The Hamilton convention uses the right-handed algebra
\[
i^2=j^2=k^2=ijk=-1,
\]
together with
\[
ij=k,\; ji=-k,\qquad jk=i,\; kj=-i,\qquad ki=j,\; ik=-j
\]
[1708.08680]. In planning contexts the scalar-first ordering \((q_0,\vec q)\) and a fixed action convention are structurally important, because composition order and frame interpretation directly affect waypoint concatenation, incremental updates, and error-state definitions [1708.08680].

For attitude representation one restricts to unit quaternions,
\[
\|q\|=\sqrt{q_0^2+q_1^2+q_2^2+q_3^2}=1,
\]
for which
\[
q^{-1}=\bar q=q^*=(q_0,-\vec q)
\]
[1708.08680]. Quaternion multiplication composes rotations and is non-commutative. For \(q=(q_0,\vec q)\) and \(p=(p_0,\vec p)\),
\[
q\circ p=\left(p_0q_0-\vec p\cdot \vec q,\;\; q_0\vec p+p_0\vec q+\vec q\times \vec p\right),
\]
with \(\|q\circ p\|=\|q\|\|p\|\) and \(\overline{q\circ p}=\bar p\circ \bar q\) [1708.08680]. The non-commutativity is not incidental: it is the algebraic expression of the fact that rotation order matters physically and computationally [2406.00747].

A planning quaternion acts on a spatial vector by embedding the vector as a pure quaternion \(x=(0,\vec x)\) and applying conjugation. In one convention used in the attitude note,
\[
x'=\bar q\circ x\circ q,
\]
while another source formulates the left action as
\[
L_q(v)=qvq^*
\]
for a pure quaternion \(v\) [1708.08680; 2406.00747]. The distinction is not merely notational. It encodes whether one is rotating vectors actively or rotating frames passively, and planning algorithms must fix this choice before composing trajectory segments or interpreting angular velocities [2406.00747].

## 2. Geometry of the planning space

The set of unit quaternions is the 3-sphere
\[
S^3=\{q\in\mathbb{R}^4:\|q\|=1\},
\]
and each element can be written in axis-angle form
\[
q=\left(\cos\frac{\theta}{2},\; \vec n\sin\frac{\theta}{2}\right),
\]
where \(\|\vec n\|=1\) and \(\theta\) is the rotation angle [1708.08680]. Conversely,
\[
\theta = 2\arccos(q_0),\qquad
\vec n=\frac{\vec q}{\sin(\theta/2)}
\]
when \(\theta\neq 0\) [1708.08680]. This half-angle structure is central to quaternion planning because geodesics on \(S^3\) encode shortest rotational motions and because the Lie logarithm maps a unit quaternion to an axis-angle vector in \(\mathbb{R}^3\) [2006.04686].

The unit-quaternion group is a double cover of \(SO(3)\): \(q\) and \(-q\) represent the same physical orientation [1708.08680]. This topological fact governs continuity management. A planned attitude sequence cannot be treated as an arbitrary curve in \(\mathbb{R}^4\); it must be lifted to a continuous curve on \(S^3\) with antipodal sign choices resolved so that successive samples remain close. In practical interpolation this is implemented by checking the dot product \(q_1\cdot q_2\) and replacing \(q_2\leftarrow -q_2\) when the dot product is negative [1708.08680].

The group-theoretic formulation identifies unit quaternions with \(SU(2)\), and the rotation action \(qvq^*\) defines a surjective homomorphism \(S^3\to SO(3)\) with kernel \(\{\pm 1\}\) [2406.00747; 1606.03315]. This viewpoint clarifies why quaternion planning is often smoother than planning directly on Euler coordinates. Euler representations introduce singular rate maps and gimbal-lock loci, whereas unit quaternions give a compact manifold representation with globally defined composition and inversion [1708.08680].

A geometric construction due to ordered pairs of unit vectors \((v,w)\in S^2\times S^2\) shows that unit quaternions may also be understood as equivalence classes of spherical arcs, and that quaternion multiplication corresponds to a composition law built from dot and cross products in \(\mathbb{R}^3\) [1011.6279]. In that construction, interpolation may be viewed directly on \(S^2\), while the induced quaternion path remains on \(S^3\). This suggests a geometric interpretation of planning quaternions as “half-angle arcs” whose concatenation yields full 3D rotations.

## 3. Coordinate interfaces and kinematic relations

Quaternion planning is typically internal, but planning systems still require interface maps to and from rotation matrices, Euler angles, or axis-angle data. For a unit quaternion \(q=(q_0,q_1,q_2,q_3)\), the corresponding rotation matrix is
\[
R = \begin{bmatrix}
q_0^2+q_1^2-q_2^2-q_3^2 & 2(q_1q_2-q_0q_3) & 2(q_0q_2+q_1q_3) \\
2(q_1q_2+q_0q_3) & q_0^2-q_1^2+q_2^2-q_3^2 & 2(q_2q_3-q_0q_1) \\
2(q_1q_3-q_0q_2) & 2(q_0q_1+q_2q_3) & q_0^2-q_1^2-q_2^2+q_3^2
\end{bmatrix},
\]
mapping local coordinates to global coordinates in the cited convention [1708.08680]. In simulation, rendering, and legacy dynamics code, quaternion trajectories are often converted to \(R(t)\) at evaluation time rather than planned directly in matrix space [1708.08680].

The same note gives the XYZ Euler convention with successive rotations about original \(X\), then new \(Y\), then new \(Z\), and derives the conversion
\[
\phi = \tan^{-1}\left(\frac{-2(q_2q_3-q_0q_1)}{q_0^2-q_1^2-q_2^2+q_3^2}\right),
\]
\[
\theta = \sin^{-1}\left(2(q_0q_2+q_1q_3)\right),
\]
\[
\psi = \tan^{-1}\left(\frac{-2(q_1q_2-q_0q_3)}{q_0^2+q_1^2-q_2^2-q_3^2}\right)
\]
together with the inverse construction
\[
q=q_\phi\circ q_\theta\circ q_\psi
\]
[1708.08680]. Because Euler angles suffer from gimbal lock, these interface formulas are typically used only at boundaries of the planning pipeline, not as the propagation coordinates [1708.08680].

Quaternion kinematics under angular velocity are equally central. Represent angular velocity as a pure quaternion \(w=(0,\vec\omega)\) or \(w'=(0,\vec\omega')\), in global or body coordinates respectively. Then
\[
\dot q=\frac12\,w\circ q \qquad\text{(global-frame angular velocity)},
\]
\[
\dot q=\frac12\,q\circ w' \qquad\text{(body-frame angular velocity)}
\]
with inverse relations
\[
w'=2\,\bar q\circ \dot q,\qquad w=2\,\dot q\circ \bar q
\]
[1708.08680]. These identities allow a planner to translate between a prescribed angular-velocity profile and a quaternion trajectory, or conversely to compute an angular-velocity schedule from a time-parameterized quaternion path.

For rigid-body systems the same relations can be written as matrix differential equations. The quaternion kinematical differential equation
\[
\dot{\mathbf q}(t)=\frac12\,\Omega(\boldsymbol\omega(t))\,\mathbf q(t)
\]
with
\[
\Omega(\boldsymbol\omega)=
\begin{bmatrix}
0 & -\omega_1 & -\omega_2 & -\omega_3\\
\omega_1 & 0 & \omega_3 & -\omega_2\\
\omega_2 & -\omega_3 & 0 & \omega_1\\
\omega_3 & \omega_2 & -\omega_1 & 0
\end{bmatrix}
\]
is the standard propagation model in guidance, navigation, and control [2212.06414; 1610.07109]. It is this equation, rather than any Euler-angle rate system, that defines the propagation layer of many quaternion planners.

## 4. Interpolation, smooth trajectories, and Lie-algebra planning

The most immediate planning task is interpolation between orientation waypoints. Because \(S^3\) is the native manifold, shortest-path interpolation is geodesic. The text on attitude representation does not explicitly derive SLERP, but all the ingredients are present; this suggests the standard spherical interpolation
\[
\operatorname{Slerp}(q_1,q_2;t)=
\frac{\sin((1-t)\theta)}{\sin\theta}\,q_1+
\frac{\sin(t\theta)}{\sin\theta}\,q_2,
\]
where \(\cos\theta=q_1\cdot q_2\), after first enforcing the shorter arc by replacing \(q_2\leftarrow -q_2\) if \(q_1\cdot q_2<0\) [1708.08680]. This construction preserves unit norm and gives a constant-speed rotation along a great circle on \(S^3\) [1708.08680].

For multiple samples, irregular parameter domains, or higher-dimensional keys, quaternion planning can be performed through the Lie algebra. The RBF interpolation method maps each sample quaternion \(q_i\in S^3\) to a 3-vector
\[
x_i=\log(q_e q_i)\in\mathbb{R}^3
\]
relative to a reference quaternion \(q_e\), interpolates the \(x_i\) with a standard radial basis function in Euclidean space, and maps back with the exponential:
\[
\bar q = q_e \exp\Big(\sum_{i=1}^K w_i \log(q_e q_i)\Big)
\]
[2006.04686]. This converts a nonlinear interpolation problem on \(S^3\) into an interpolation problem in a tangent \(\mathbb{R}^3\) model while guaranteeing that the reconstructed result is again a unit quaternion [2006.04686].

The same source formulates the general RBF system with keys \(T\in\mathbb{R}^{K\times N}\), samples \(S\in\mathbb{R}^{K\times M}\), kernel matrix \(D_{ij}=\varphi(\|t_{i,*}-t_{j,*}\|)\), weights \(W=D^{-1}S\), and evaluation \(\Omega=\xi W\) for \(\xi_j=\varphi(\|L-t_{j,*}\|)\) [2006.04686]. In the quaternion setting the outputs are the Lie-algebra coordinates \(x_i\), so \(M=3\) for a single orientation trajectory [2006.04686]. Because the interpolation is global, the resulting path is suited to smooth motion design, scattered-data orientation fields, and animation or manipulator orientation maps that depend on more than one planning parameter [2006.04686].

Relative-motion planning introduces error quaternions. If \(q\) is the current attitude and \(q_d\) the desired one, the error quaternion
\[
q_e=q_d^{-1}\circ q=\bar q_d\circ q
\]
satisfies \(q=q_d\circ q_e\), and its dynamics under body-frame angular-velocity error \(\tilde w=w^B-w_d^B\) obey
\[
\dot q_e=\frac12 q_e\circ \tilde w
\]
[1708.08680]. This gives a planning-compatible local state on the same manifold as the full attitude, which is why quaternion error dynamics are widely used in tracking and feedback formulations.

## 5. Dynamic propagation and structure-preserving numerical schemes

Quaternion planning is not limited to geometric interpolation. In guidance, navigation, control, and trajectory optimization, a planner often receives or computes an angular-velocity profile \(\boldsymbol\omega(t)\) and must propagate the quaternion state over long horizons. The quaternion kinematical differential equation is sensitive to accumulated integration error because the associated matrix \(\Omega(\boldsymbol\omega)\) is skew-symmetric with eigenvalues \(\{0,0,\pm j\|\boldsymbol\omega\|\}\), so naive integration may drift off the unit sphere or accumulate phase error [2212.06414].

Structure-preserving propagation addresses this by exploiting the Hamiltonian and symplectic structure of the QKDE. For linear time-invariant angular velocity, the even-order explicit symplectic geometric algorithms use the diagonal Padé approximant of the matrix exponential and, because \((\tau\Omega/2)^2=-cI\), reduce the step map to a Cayley transform:
\[
G(\ell,\tau)=\frac{1}{1+\alpha(\ell,c)}
\Big[(1-\alpha(\ell,c))I+\tau\beta(\ell,c)\Omega\Big]
\]
with
\[
c=\frac{\|\boldsymbol\omega\|^2\tau^2}{4},\qquad
\alpha(\ell,c)=c[\beta(\ell,c)]^2
\]
[2212.06414]. The update
\[
\mathbf q_{k+1}=G(\ell,\tau)\mathbf q_k
\]
is symplectic and orthogonal, hence preserves quaternion norm exactly at the discrete level [2212.06414]. The maximum absolute error over \([t_0,t_f]\) is
\[
\mathcal{O}((t_f-t_0)\tau^{2\ell})
\]
with linear time complexity and constant space complexity, which is why these schemes are described as appropriate for real-time applications in aeronautics, astronautics, robotics and so on [2212.06414].

An earlier symplectic geometric algorithm derives related Cayley-form updates for both autonomous and non-autonomous QKDEs. In the autonomous case,
\[
G_\tau^{(q)}=
\frac{1}{1+\alpha}\left[(1-\alpha)I+\frac{\tau}{2}A(\omega)\right]
=
\cos\theta(\omega,\tau)\,I+\sin\theta(\omega,\tau)\,\hat A,
\]
with
\[
\alpha=\frac{\tau^2}{16}\|\omega\|^2,\qquad
\theta(\omega,\tau)=2\arctan\left(\frac{\|\omega\|\tau}{4}\right)
\]
[1610.07109]. Because \(G_\tau^{(q)}\) is orthogonal, the unit-norm condition is preserved exactly, and because it is symplectic in the Hamiltonian embedding, long-horizon propagation avoids the secular drift typical of standard explicit methods [1610.07109].

These integrators matter for planning because orientation trajectories are frequently embedded in optimal control loops, model-predictive control, or long simulation horizons. In such settings a planner needs more than local coordinate regularity; it needs a numerical stepper that respects the geometry of \(S^3\) and the structure of the kinematical flow [2212.06414; 1610.07109].

## 6. Conventions, extraction, and advanced planning contexts

A recurrent methodological issue in quaternion planning is convention management. One source argues that the “flipped” quaternion multiplication used in some aerospace conventions is avoidable and that Hamilton’s original multiplication should be retained, with passive world-to-body usage handled by choosing the appropriate quaternion-to-matrix mapping rather than reversing the multiplication order [1801.07478]. The practical implication is that a planning pipeline must document its multiplication, frame action, scalar order, and matrix convention, because otherwise composition order, kinematic signs, and error definitions become inconsistent across libraries and subsystems [1801.07478].

Quaternion extraction from rotation data is itself a planning-adjacent problem because planners often pass between rotation matrices, optimization variables, and quaternion states. The adjugate-matrix approach to quaternion pose extraction shows that quaternions parameterized by their corresponding rotation matrices cannot be expressed as single-valued functions; instead, the quaternion solution must be treated as a manifold with several single-valued sectors represented by the adjugate matrix [2205.09116]. In exact form,
\[
\operatorname{Adj}(\chi)=
\begin{bmatrix}
q_0^2 & q_0q_1 & q_0q_2 & q_0q_3\\
q_0q_1 & q_1^2 & q_1q_2 & q_1q_3\\
q_0q_2 & q_1q_2 & q_2^2 & q_2q_3\\
q_0q_3 & q_1q_3 & q_2q_3 & q_3^2
\end{bmatrix},
\]
so each row is proportional to the true quaternion and different rows become singular on different submanifolds [2205.09116]. For planning and estimation, this means that branch management and sign continuity are not implementation afterthoughts but consequences of the topology of the quaternion representation.

Beyond rigid-body attitude, quaternion planning appears in discrete-time quaternionic control, where “poles” become similarity classes of quaternionic right eigenvalues and feedback design is formulated through a genuine quaternionic polynomial equation
\[
a_\ell(d)p_r(d)+b_\ell(d)q_r(d)=c(d)
\]
[2506.08034]. It also appears in regularized orbital dynamics, where the spatial Kepler problem is transformed into the quaternionic linear equation
\[
2\boldsymbol u''+h\boldsymbol u=0
\]
through the mapping \(\boldsymbol x=\boldsymbol q\boldsymbol q^*\) and the fictitious-time relation \(dt=r\,d\tau\) [2107.02678]. These formulations broaden the meaning of planning quaternions from “using quaternions to encode 3D attitude” to “using quaternionic state spaces in which difficult geometric planning problems become linear, structure-preserving, or algebraically tractable” [2506.08034; 2107.02678].

In that broader sense, planning quaternions are not simply a data type. They are a methodological choice: represent orientation on \(S^3\), compose by quaternion multiplication, interpolate through geodesics or Lie-algebra maps, propagate with structure-preserving QKDE integrators, and treat conversion to matrices or Euler angles as an interface problem rather than the core state evolution [1708.08680; 2006.04686].

Source: https://www.emergentmind.com/topics/planning-quaternions