Let us suppose we have two orthogonal rotation matrices representing a three-dimensional rotations $$\mathbf{R}(t)$$ and $$\mathbf{R}(t+\Delta t)$$

How is it possible to extract the angular velocity of the rotation $\boldsymbol \omega \in \mathbb{R}^3$ or equivalently the angular velocity tensor (represented by the skew-symmetric matrix) $$\boldsymbol \Omega = \begin{pmatrix} 0 & -\omega_z(t) & \omega_y(t) \\ \omega_z(t) & 0 & -\omega_x(t) \\ -\omega_y(t) & \omega_x(t) & 0 \\ \end{pmatrix}$$ from them?

I would ask you if the following approach make sense...

1) By mean of exponential map $\mathbf{R}(t+\Delta t) = e^{\boldsymbol \Omega \Delta t} \mathbf{R}(t)$

2) Solve for $\boldsymbol \Omega$ then $$\boldsymbol \Omega = \frac{ \log\left( \mathbf{R}(t)\mathbf{R}^{-1}(t+\Delta t) \right)}{\Delta t}$$

3) Call $\boldsymbol Y = \mathbf{R}(t) \mathbf{R}^{-1}(t+\Delta t) -\mathbf{I}$ and approximate the logarithm with its Taylor expansion

$$ \boldsymbol \Omega(t) = \dfrac{ \log\left(\mathbf{R}(t) \mathbf{R}^{-1}(t+\Delta t) \right)}{\Delta t} \approx \frac{1}{\Delta t} \left( \mathbf{Y} - \frac{\mathbf{Y}^2}{2} + \frac{\mathbf{Y}^3}{3} - \frac{\mathbf{Y}^4}{4} + \ldots \right ) $$

  • $\begingroup$ I think you mean "between two consecutive points in time"? Though that raises the question what makes two points in time consecutive. I think it should simply say "between two points in time". $\endgroup$ – joriki Sep 7 '11 at 9:01
  • $\begingroup$ Is $dt$ just a normal time interval? Then it might be preferable to denote it by $\Delta t$ to prevent confusion with the differential. $\endgroup$ – joriki Sep 7 '11 at 9:02
  • $\begingroup$ Rotation matrices are evaluated on a rigid-body at two consecutive time intervals, so I would have used $\Delta t$, yes. $\endgroup$ – linello Sep 7 '11 at 9:07
  • $\begingroup$ I pointed out that "at two consecutive time intervals" makes no sense, but you used it again -- do you disagree? $\endgroup$ – joriki Sep 7 '11 at 9:13
  • 1
    $\begingroup$ excuse me corrected... $\endgroup$ – linello Sep 7 '11 at 9:21

You don't need any series expansions to do this. $\mathbf Y^{-1}=\mathbf R(t+\Delta t) \mathbf R^{-1}(t)$ is a rotation matrix that rotates the body from the position at time $t$ to the position at time $t+\Delta t$. This is a rotation around the axis along $\boldsymbol\omega$ through the angle $|\boldsymbol\omega|\Delta t$. The trace of a rotation matrix with angle $\phi$ is $1+2\cos\phi$, so you can calculate $|\boldsymbol\omega|$ directly from the trace. To get the direction, you can solve the homogoeneous linear system $\mathbf Yx=x$.

  • $\begingroup$ Ok it works: first I compute the angle $\phi$ as $\phi = \arccos \left( \dfrac{\textrm{trace}(\mathbf{Y}(t)) - 1}{2}\right)$ and then the direction as the eigenvector of $\mathbf{Y}$ with the largest eigenvalue. Does this make sense? $\endgroup$ – linello Sep 7 '11 at 9:48
  • $\begingroup$ @linello: The first part does; the second part is unnecessarily complicated -- you don't have to solve an eigenvalue problem; you already know that the eigenvalue for the axis is $1$, so you can solve the linear system $Yx=x$, which is easier. $\endgroup$ – joriki Sep 7 '11 at 9:55
  • $\begingroup$ maybe even easier is to use the following? $$\boldsymbol \omega = \frac{1}{2 \sin(\phi)} \begin{bmatrix} \mathbf{Y}_{3,2}(t)-\mathbf{Y}_{2,3}(t) \\ \mathbf{Y}_{1,3}(t)-\mathbf{Y}_{3,1}(t) \\ \mathbf{Y}_{2,1}(t)-\mathbf{Y}_{1,2}(t) \end{bmatrix} $$ $\endgroup$ – linello Sep 7 '11 at 10:15
  • $\begingroup$ @linello: Yes, that's a good idea. All methods (including these two) will become ill-conditioned as $\Delta t\to0$; I can't say at first sight which of these two will be worse numericaly in case you have to handle small $\Delta t$; you might want to try both and compare. $\endgroup$ – joriki Sep 7 '11 at 10:51
  • $\begingroup$ Thanks, I need a method to estimate the angular velocity tensor in a virtual environment head tracking system, where I also have to compute velocity of fingers with respect to head reference frame, the frame rate is around 100Hz, I will verify if this approach still holds or more advanced numerical methods must be applied. Thanks for your very useful suggestions! $\endgroup$ – linello Sep 7 '11 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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