Derivative of rotating a time changing vector by a time changing quaternion

433 Views Asked by At

I have a quaternion $q(t)$ that is a function of $t$ and a vector $v(t)$ that is a function of $t$ and I rotate the vector by the quaternion: $f(t) = q(t) v(t) q^*(t)$ but now I want to find the derivative (and second derivative) of $f(t)$.

Specifically, $v(t)$ is a polynomial with vector coefficients and $q(t)$ I have in the form of an initial quaternion $q_0$ with angular velocity and angular acceleration in axis magnitude form.

I see I may be able to get the derivative of $q(t)$ by this formula $dq/dt = 1/2 w q$ (where w appears to be in the form I have it, thought its not clear). If that works, is it then a matter of applying the derivative product rule to $q v q^*$ to get $q (v {q^*}' + v' q^*) + q' (v q^*)$? If so, would the vectors be pure quaternions and addition would be elementwise and all the multiplications Hamilton?

1

There are 1 best solutions below

0
On

First: this is only a pure rotation for unit quaternions. For a general $q\in H$ the result will be scaled by $|q|^2$.

Now, the bottom line up front: $\dot{f}$ is the inertial derivative of $v$ when $v$ is seen in a rotating reference frame whose instantaneous angular velocity $\omega$ satisfies $\dot{q} = \frac{1}{2}\omega q$.

The conjugation $(\cdot)\rightarrow q(\cdot)q^{*}$ is equivalent to the action $SO_3\times\mathbb{R}^3\rightarrow \mathbb{R}^3$ which puts $f = A(q)v$, where $A(q)$ denotes $SO_3$ parameterized by the unit quaternions. Since $q= q(t)$ we also have $A = A(t)$ and thus find $$\dot{f} = \dot{A}v + A\dot{v},$$ which you can work out is equivalent to the derivative of a vector in a rotating frame (with the right picture chosen for passive vs. active rotations). You can find more info on rotating frame derivatives here and I recently answered a similar question which connects them at Can quaternions be used to represent rotation rate?.

Your way would be to evaluate the derivative directly to obtain the formula

$\dot{f} = q(v\dot{q}^*+\dot{v}q^*) + \dot{q}vq^*$

which (to my knowledge) there's nothing wrong with per se, but writing $v = v_1i+v_2j+v_3k$ as a pure quaternion and evaluating the RHS you should check that you end up with the same derivative in a rotating frame.