1
$\begingroup$

It is common to look at the orientation of a rigid body in term of a quaternion which encodes an axis and angle with a vector and scalar.

$$ \boldsymbol{q} = \pmatrix{ \boldsymbol{\hat{z}} \sin\left( \tfrac{\theta}{2} \right) \\ \cos \left( \tfrac{\theta}{2} \right)} \tag{1}$$

and then it is common to convert the rotational velocity vector $\boldsymbol{\vec{\omega}}$ into a time derivative of the orientation for use in simulation integrations.

$$ \dot{\boldsymbol{q}} = \tfrac{1}{2} \pmatrix{ \boldsymbol{\vec{\omega}} \\ 0 } \boldsymbol{q} \tag{2} $$

$$ \ddot{\boldsymbol{q}} = \tfrac{1}{2} \pmatrix{ \boldsymbol{\vec{\alpha}} \\ 0} \boldsymbol{q} + \dot{\boldsymbol{q}} \boldsymbol{q}^{-1} \dot{\boldsymbol{q}} \tag{3} $$

What I am asking about is keeping the angular quantities in quaternion form ($\boldsymbol{q}$, $\dot{\boldsymbol{q}}$ and $\ddot{\boldsymbol{q}}$) for direct use in equations of motion and kinematics, by deriving the regular rotational vectors from (2) and its derivative (3)

$$ \pmatrix{\boldsymbol{\vec{\omega}} \\ 0} = 2 \dot{\boldsymbol{q}} \boldsymbol{q}^{-1} \tag{4} $$ $$ \pmatrix{\boldsymbol{\vec{\alpha}} \\ 0} = 2 \left( \ddot{\boldsymbol{q}} - \dot{\boldsymbol{q}} \boldsymbol{q}^{-1} \dot{\boldsymbol{q}} \right) \boldsymbol{q}^{-1} \tag{5} $$

So that angular momentum would be on the form of $$\pmatrix{\boldsymbol{\vec{L}} \\ 0} = \mathcal{I}\, \dot{\boldsymbol{q}} \tag{6}$$

with $\mathcal{I}$ being the appropriate 4×4 form making (6) a matrix vector product type of calculation.

Similarly the rotational equations of motion would be

$$ \pmatrix{ \boldsymbol{\vec{\tau}} \\ 0} = \mathcal{I} \ddot{\boldsymbol{q}} + \underbrace{ \boldsymbol{u} }_{\dot{\boldsymbol{q}}\text{ related terms}} \tag{7} $$

In the spirit of Hamilton, I think there might be some significance to the structure of $\mathcal{I}$, and I was wondering if anyone knows of any prior work related to this line of thinking.

Practically I know the above would simplify the rigid body integrators (by keeping all rotational terms in 4-vectors and allowing linear algebra to do its thing). But I think, this might provide some insight into the behavior of rigid body orientation, just as the profile of translational accelerations gives us insight into velocities and displacements.

$\endgroup$
4
  • $\begingroup$ q is a vector so what is $q^{–1}$ ? $\endgroup$
    – Eli
    Commented Sep 10, 2020 at 14:30
  • $\begingroup$ $\boldsymbol{q}$ is a quaternion and $\boldsymbol{q}^{-1}$ is the inverse, such that $$ \boldsymbol{q} \boldsymbol{q}^{-1} = \pmatrix{ \vec{0} \\ 1 }$$ yields the identity (null rotation). $\endgroup$
    – JAlex
    Commented Sep 10, 2020 at 14:55
  • $\begingroup$ $\vec{q}$ is a $4 \times 1$ vector ? $\vec{q}^{-1}$ is not defined $\endgroup$
    – Eli
    Commented Sep 10, 2020 at 14:58
  • $\begingroup$ @Eli - no $\vec{q}$ is not a vector. It is quaternion that contains a vector and a scalar. See this article on how the inverse is defined. $\endgroup$
    – JAlex
    Commented Sep 10, 2020 at 19:45

1 Answer 1

1
$\begingroup$

If you start with the quaternion vector

$$\vec{z}=\begin{bmatrix} a(t) \\ b(t) \\ c(t) \\ d(t) \\ \end{bmatrix}= \begin{bmatrix} a \\ \vec{w} \\ \end{bmatrix}$$

where $\vec{z}\cdot\vec{z}=1$

you obtain:

$$\begin{bmatrix} 0 \\ \vec{\omega} \\ \end{bmatrix}=2\, \underbrace{\begin{bmatrix} a & \vec{w}^T \\ -\vec{w} & a\,I_3+\tilde{w} \\ \end{bmatrix}}_{Q (4\times 4)}\,\underbrace{\begin{bmatrix} \dot{a} \\ \vec{\dot w} \\ \end{bmatrix}}_{\vec{\dot{z}}}\tag 1$$

where $Q^T\,Q=I_4$, thus $Q$ matrix is orthogonal matrix , $\vec{\omega}$ is the angular velocity vector and $I_3$ is a $3\times 3$ unity matrix.

$$\tilde{w}=\left[ \begin {array}{ccc} 0&-w_{{z}}&w_{{y}}\\ w_{ {z}}&0&-w_{{x}}\\ -w_{{y}}&w_{{x}}&0\end {array} \right] $$.

for numerical simulation you can obtain from equation (1)

$$\vec{\dot{z}}=\frac 12 \,\begin{bmatrix} 0 & -\vec{\omega}^T \\ \vec{\omega} & -\tilde{\omega} \\ \end{bmatrix}\,\vec{z}+\frac{P}{2}\,(1-\vec{z}\,\cdot{\vec{z}})\,\vec{z}\tag 2$$

where the second part of the RHS is to fulfill the requirement that $\vec{z}\cdot\vec{z}$ must be equal to one.

Equation (2) together with the Euler equations are the EOM's, the separation between the kinematic equation (2) and the Euler equation, make the EOM's simple

Of course you can use equation (1) in the Euler equations, but I don't see how you get the requirement that $\vec{z}\cdot\vec{z}$ must be equal to one ?.

The Euler Equations:

$I\,\vec{\dot \omega}+\vec{\omega}\,\times (I\,\vec{ \omega})=\vec{\tau}$

$\endgroup$
4
  • $\begingroup$ What is $P$ in (2)? $\endgroup$
    – JAlex
    Commented Sep 10, 2020 at 20:02
  • $\begingroup$ P is a constant (PID Proportional part of the Controller) $\endgroup$
    – Eli
    Commented Sep 11, 2020 at 7:27
  • $\begingroup$ So if I understand correctly you suggest bringing by (4) into a matrix/vector operation, and then use it for integration, but with a artificial term that enforces the unit quaternion constraint. That answers another question of mine (of the proper way to integrate rotations), but in this case I was asking about doing something similar for $\dot{\vec{\omega}}$ (one more derivative up from (4) which is (5)) and using it into EOM directly. $\endgroup$
    – JAlex
    Commented Sep 11, 2020 at 13:10
  • $\begingroup$ yes the controller is necessary to fulfill the norm of $\vec{z}$. you can do it, but because you obtain second order differential equations $\vec{\ddot z}=...$ you have to integrate this equation twice to get $\vec{z}$, the problem that i see ,is how you fulfill the requirement $\vec{z}\cdot \vec{z}=1$ ?, also your equations of motion are huge compare with my solution $\endgroup$
    – Eli
    Commented Sep 11, 2020 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.