Quaternions

(MMG640 / MVE080)

Overview

  • Quaternion algebra
  • Relation between unit quaternions and rotation matrices
  • Euler's equations for rigid body motion
  • Lie-Euler method

Quaternion algebra

Brief history: found by Hamilton in 1843 as a generalization of complex numbers

q = a + b_1i + b_2j + b_3k

Multiplication rules:

i^2=-1 \quad j^2=-1
ij=k \quad ji=-k

Alternative notation

q = (a,\underline{b}), \quad \text{where}\quad\underline{b} = (b_1,b_2,b_3)

Pure quaternions: \[\mathcal{Q}_0 = \{q\mid q = (0,\underline{b}) \} \]

Unit quaternions: \[\mathcal{Q}_1 = \{q\mid q^cq = 1 \} \]

Conjugate: \[q^c = (a,-\underline{b})\]

Multiplication: \[q_1q_2 = (a_1a_2-\underline{b}_1\cdot\underline{b}_2,a_1\underline{b}_2 + a_2\underline{b}_1+\underline{b}_1\times\underline{b}_2)\]

Unit quaternions determine rotations

Let \(q=(\cos(\theta/2),\sin(\theta/2)\underline{b})\in\mathcal{Q}_1\) where \(|\underline{b}|=1\)

Then \(q\) corresponds to a rotation about the axis \(\underline{b}\) by the angle \(\theta\)

Notation: \(\mathrm{qexp}(\theta\underline{b}) = (\cos(\theta/2),\sin(\theta/2)\underline{b})\)

R = 2\begin{pmatrix} (a^2+b_1^2-b_2^2-b_3^2)/2 & b_1b_2-ab_3 & b_1b_3 + a b_2 \\ b_1 b_2 + a b_3 & (a^2-b_1^2+b_2^2-b_3^2)/2 & b_2b_3 - a b_1 \\ b_1b_3 - ab_2 & b_2b_3 + a b_1 & (a^2-b_1^2-b_2^2+b_3^2)/2 \end{pmatrix}

Let \(q= (a,\underline{b})\) be unitary. Then \(q\) determines a rotation matrix

Map \(\mathcal{R}_1\ni q\mapsto Q \in SO(3)\) is a double covering

Let \( \underline{\omega}\in\mathbb{R}^3\) and \(v = (0,\underline{\omega})\in\mathcal{Q}_0\)

Matrix multiplication \(R\underline{\omega}\) corresponds to \(qvq^{-1}\in\mathcal{Q}_0\)

Rigid body dynamics

\mathcal{B}\subset\mathbb{R}^3

Orientation of rigid body described by \(R(t)\mathcal{B}\) for \(R(t)\in SO(3)\)

Body angular velocity \(\underline{\omega}(t) = R(t)^{-1}\dot R(t)\)

How does a rigid body move in space? Answer: according to Euler's equations

\mathbb{I}\dot{\underline{\omega}} = -\underline{\omega}\times\mathbb{I}\underline{\omega}\quad \dot R = R\hat{\underline{\omega}}
\displaystyle\mathbb{I} = \int_{\mathcal{B}}\begin{pmatrix}y^2+z^2 & xy & xz \\ xy & x^2+z^2 & yz \\ xz & yz & x^2+y^2 \end{pmatrix}\rho\, dV
\displaystyle\hat{\underline{\omega}} = \begin{pmatrix} 0 & -\omega_3 & \omega_2 \\ \omega_3 & 0 & -\omega_1 \\ -\omega_2 & \omega_1 & 0 \end{pmatrix}

moments of inertia tensor

Lie-Euler method

Euler's equations

\dot{\underline{\omega}} = -\mathbb{I}^{-1}(\underline{\omega}\times \mathbb{I}\underline{\omega})\quad \dot R = R\hat{\underline{\omega}}

Matrix exponential (rotation about \(\underline{\omega}\) by angle \(|\underline{\omega}|\))

\exp(h\hat{\underline{\omega}}) \in SO(3)

Lie-Euler time-stepping scheme

\underline{\omega}^{(k+1)} = \underline{\omega}^{(k)} - h \mathbb{I}^{-1}(\underline{\omega}^{(k)}\times \mathbb{I}\underline{\omega}^{(k)})
R^{(k+1)} = R^{(k)}\exp(h\hat{\underline{\omega}}^{(k+1)})
q^{(k+1)} = q^{(k)}\mathrm{qexp}(h\underline{\omega}^{(k+1)})

Motion of an ellipsoid moving freely in space