# Angular velocity vs Quaternions

Hello everyone,

I need some information with angular velocity in 3D and since I'm a math student, it's been a long time I haven't worked with physics, especially mechanics. This is why I need your help.

Let's say I have this billiard ball (it's just an example) and I hit the ball with a cue with a certain angle so the ball with start rolling on the table, with a specific curve. Let's say that I know the initial angular velocity $$\omega(0)$$. I'd like to know the ball's angular velocity at time $$t$$ with some equation using quaternions. After that, I think I'll be able to do what I want : integrate to get the angular displacement at time $$t$$.

Also, let $$f$$ be the known friction force. It's constant.

Thanks for your help and sorry for my bad English, I'm French.
If something isn't clear enough, just tell me and I'll try to give you the missing information.

EDIT : I forgot to say that the ball radius is $$R$$ and the inertia tensor is $$I = \frac{2\cdot m\cdot R^2}{5}$$ with $$m$$ the mass of the ball

Last edited:

## Answers and Replies

mathman
Science Advisor
The description of your question is very puzzling. What do quarternions have to do with describing the motion of a billiard ball?

well, I like to find an equation that looks like :

$$\omega(t) = something(t)\bullet something.else(t)$$

where the "somethings" are quaternions or whatever. And I'd like to define those "somethings" so it looks like :

$$something(t) = something.I.might.already.know + something.else.I.might.already.know \bullet t$$

wow I'm so clear :P

I just put randoms "+" or " * ", but I'd like to have an equation that tells me the angular velocity at time $$t$$.

Preferably using quaternions.

EDIT : Also, this is important, I need 3D equations for rigid body

D H
Staff Emeritus
Science Advisor
A big caveat here: I use right transformation quaternions. If you use left quaternions or rotation quaternions you will have to do things a bit differently.

What I mean by the above: Start with matrices. Imagine you have two sheets of clear plastic with grid lines on them and a piece of white paper with a single dot on it. Lay one of the sheets of plastic on the paper. You can read the coordinates of the dot directly from the sheet's gridlines. Now put the second transparency on top of the first so the grids line up. As the grid lines match the coordinates will be the same for the two transparencies. Now rotate the top sheet by some angle. You can use a matrix (or any other map) to describe this physical rotation of the top sheet. Even though the dot hasn't moved, its coordinates on the top sheet will have changed. You can use a matrix to describe the transformation of coordinates from the bottom sheet frame to the top sheet frame.

These two matrices, the physical rotation matrix (rotation matrix for short), and the coordinate transformation matrix (transformation matrix for short), are not the same. They are in fact transposes of one another. Which one is "better"? Neither. It is important to beware that this distinction exists. Most people are clueless regarding this distinction.

The same applies to quaternions. Rotations versus transformations are conjugate operations. Quaternions add a second twist. Writing a 3 vector as a pure imaginary quaternion, the relationship between two coordinate frames can be described via

$$\bmatrix 0 \\ \boldsymbol x' \endbmatrix = \mathcal Q \, \bmatrix 0 \\ \boldsymbol x \endbmatrix \, \mathcal Q^*$$

or by

$$\bmatrix 0 \\ \boldsymbol x' \endbmatrix = \mathcal Q^* \, \bmatrix 0 \\ \boldsymbol x \endbmatrix \, \mathcal Q$$

where Q is a unit transformation quaternion. Both are perfectly valid forms; the only difference is whether the unconjugated quaternion is to the left or right of the quaternion to be transformed. The first form is what I call a left transformation quaternion because the unconjugated quaternion appears on the left. The second form is a right transformation quaternion. Left transformation quaternions chain right-to-left, which is exactly how column vector transformation matrices chain. Right transformation quaternions chain left-to-right. So, enough of that.

Nomenclature:

$$\mathcal Q_{R\to I}$$ The left transformation matrix from a rotating frame R to an inertial frame I.

$$\mathcal Q_{I\to R}$$ The left transformation matrix from frame I to frame R. (This is of course just the conjugate of the former quaternion.)

$$\boldsymbol x_R$$ The position vector of some point in frame R. Similarly, a subscript of I indicates the position vector expressed in frame I.

With this,

$$\bmatrix 0 \\ \boldsymbol x_I \endbmatrix = \mathcal Q_{R\to I} \, \bmatrix 0 \\ \boldsymbol x_R \endbmatrix , \mathcal Q_{R\to I}^*$$

I'll outline the approach. If you need help, ask.
1. Differentiate the above with respect to time.
2. Assume the point x is fixed in the rotating frame. This means the x derivative term on the right-hand side vanishes and the left-hand side is basically $\boldsymbol{\omega} \times \boldsymbol x$ ...
3. ... except for the nasty fact that the angular velocity is inevitably expressed in rotating frame coordinates. You will need to insert a transformation on the left-hand side.
4. You might find the trick below very handy.
5. In the end you should get a nice, simple quaternionic multiplicative relationship involving the quaternion, the angular velocity, and the time derivative of the quaternion.

The trick: let

\aligned \mathcal Q_a \equiv \bmatrix 0 \\ \boldsymbol a \endbmatrix \\ \mathcal Q_b \equiv \bmatrix 0 \\ \boldsymbol b \endbmatrix \endaligned

be two pure imaginary quaternions. Then

$$Q_aQ_b - Q_bQ_a = 2\,\bmatrix 0 \\ \boldsymbol a \times \boldsymbol b \endbmatrix$$

I'm sorry but I really don't know what to do. How do I find $$\mathcal Q_{R\to I}$$ using the information I gave in my first post? Also, as I said earlier, I'm not really advanced in physics, so, basically, I really don't know how to end up with a $$\omega(t)$$ somewhere. This is so much complicated for my level :(

I'm sorry to bother.

Also, I found, on the internet, some equation :

$$\omega(t) = 2 \cdot q^*(t) \cdot \frac{dq(t)}{dt}$$

where $$q(t)$$ is a normalized quaternion of rotation and $$q^*(t)$$ is the conjugate of the quaternion.

Is that right? If yes, how do I find $$q(t)$$ with the given information?

Last edited:
D H
Staff Emeritus
Science Advisor
I'm sorry but I really don't know what to do. How do I find $$\mathcal Q_{R\to I}$$ using the information I gave in my first post?
You're a math student. Assume the quaternion and the angular velocity exist. Treat finding the relationship between them is an interesting math exercise.

Also, I found, on the internet, some equation :

$$\omega(t) = 2 \cdot q^{*}(t) \cdot \frac{dq(t)}{dt}$$
The above expression is sloppy. That is one of the several forms that the relationship between a unit quaternion, its time derivative, and the angular velocity can take. Exactly which form the takes depends on which quaternion you are using (inertial to rotating frame versus rotating to inertial), in which frame you represent the angular velocity (inertial or rotating), whether you are using left or right quaternions, and whether you are using transformation or rotation quaternions. That makes for 24 combinations, and all 16 are in use.

When reading the literature you must be aware that there are multiple conventions. You will see apparently contradictory expressions in the literature. Most authors are, to be blunt, sloppy and ignorant. They are blissfully unaware of the multiplicity of conventions.

You need to pick a convention. I very strongly suggesting that you represent angular velocity in the rotating frame. The remaining three choices are pretty much a coin toss.

If yes, how do I find $$q(t)$$ with the given information?
Except for some very simple toy problems, you can't find a closed form solution. You need to resort to numerical integration.

Ok, I think I know how to get $$\mathcal Q_{R\to I}$$ : maybe with some angle $$\theta$$ ? Maybe something like : $$Q = (cos\frac{\theta}{2}, sin\frac{\theta}{2}, sin\frac{\theta}{2}, sin\frac{\theta}{2})$$

I feel like completely wrong, but now, how do I get that angle? Is it the angle by which I rotated the "top sheet"? How is this related to the initial angular velocity? I feel completely wrong... again...

At first, I really thought there was a simple equation I could use to find the 3D angular velocity using the given information, I think I was wrong.

Also, I said I was a math student, but still a beginner =) I just finished my first year in the baccalaureate. That may explain why it's hard for me to understand everything that is said here. By the way, thanks for trying to help me out, it's very useful.

any guess?

EDIT : Or at least, is there an equation that could tell me the angular velocity at time 't' without using quaternions? something like : $$\omega(t) = \omega(0) + \alpha \cdot t$$ but for this "billiard" problem.