Angular Velocity from Orthogonal Rotation Matrix

In summary: In every case you need to keep track of the orientation of the rigid body you are rotating.In summary, calculating the time derivative of the orthogonal rotation matrix in a rigidbody simulation involves using the derivative of the rotation matrix along with the inverse of the rotation matrix at a different time point to compute the angular velocity tensor. This can be done by finding the logarithm of the normalized difference between the two matrices and multiplying it by the inverse of the time interval. The use of complex numbers or quaternions can make this process simpler and more stable, but it is still necessary to consider the ambiguity of small versus large rotations and the orientation of the rigid body.
  • #1
ZachGriffin
20
0
Hi All,

I have a rigidbody simulation and I'm trying to calculate the local angular velocity of the object using the derivative of it's orthogonal rotation matrix. This is where I'm stuck as I haven't been able to find an example on calculating the time derivative from two matrices at t=n and t=n+1. Would subtracting the corresponding matrix elements give me the derivative? My current workings on paper would suggest that isn't the method.

Once I have the derivative matrix, I'm assuming I multiply that by the inverse of the rotation matrix at t=n+1 which should give me the angular velocity tensor?

Could anyone offer any pointers on calculating the time derivative?

Cheers,

Zach
 
Physics news on Phys.org
  • #2
If your angular velocity vector (also, a pseudovector) is A
[ 0 -Az Ay ]
| Az 0 -Ax ]
[ -Ay A x 0 ]

Then you can produce a rotation over time t via exp(At) = 1 + At + (A^2)t^2/2! + (A^3)t^3/3! + etc.

So you know that M' = exp(Adt) M
Thus M'/M = e^(Adt)
Thus your answer is (1/dt) * log[M'/M] = A

To compute the logarithm, let Y = M'/M - I where I is the identity matrix
Then log(M'/M) = log(I + Y) = Y - Y^2/2 + Y^3/3 - Y^4/4 + etc.

Note that there is not really any means for you to distiguish a tiny rotation (slowly rotating system) from a full rotation or multiple full rotations (quickly rotating system) by comparing two samples even if they are close in time. The ability to use different choices for the logarithm corresponds to this ambiguity. If M' and M are very close then Y will be near zero and you will get the smallest rotation possible as the answer with the above formula.

If you have trouble understanding any of this then just think about a simpler case where everything takes place in a plane. Then your angular velocity shrinks to
[ 0 -Az ]
| Az 0 ]
which is basically just the imaginary number iAz and exp(iAz t) generates a rotation over time.
 
Last edited:
  • #3
Thanks very much for the response. The issue with distinguishing between small and large rotations shouldn't be an issue as I'm integrating the simulation at 3000hz and dealing with a vehicle system.

I'll try and work the example below using your technique. If for example, we have two orthogonal matrices M (rotation at t=0, identity matrix in this case) and M' (rotation at t=1) which describe a rotation of 45 degrees around the z axis:

M M'
[ 1 0 0 ] [ 0.707 0.707 0 ]
[ 0 1 0 ] [ -0.707 0.707 0 ]
[ 0 0 1 ] [ 0 0 1 ]

if M'/M = e^(Adt) then M' * M^-1 = e^(Adt)

let Y = M' * M^-1 (M^-1 is still the identity matrix)
so (1/dt) * log(Y) = A

If that's correct then I would calculate the log of Y as in your explanation. Could you explain a little more on taking the log? I'm assuming that its a taylor series? You'll have to excuse my lack of knowledge in that area as I'm self taught.
 
  • #4
A 45 degree rotation is rather large for 1/3000 second. I'm not sure if the series will converge with that particular matrix.

Anyway, you must use Y = (M'/M) - I
The -I is important because it changes something near identity to something near zero, which means the series converges quickly. It also means if no rotation occurs you get Y = 0 and a final result of 0, i.e. no rotation. BTW I just picked the name "Y" without any rhyme or reason.

Note also you must compute log(I + Y), not logY

Yes, the log can be computed with a Taylor series. log( 1+ x) = x - x^2/2 + x^3/3 - ...
To easily prove the validity of this, differentiate each side and then multiply by 1+x to arrive at the true equation 1=1. There's no reason you can't shove a matrix in for "x".

Anyway, with your example, Y =
[ -0.293 0.707 0 ]
[ -0.707 -0.293 0 ]
[ 0 0 0 ]

And your angular acceleration can be computed via
A = (1/dt) log(1+Y) = (1/dt)( Y - Y*Y/2 + Y*Y*Y/3 - Y*Y*Y*Y/4 + ...)

Your computed A is analagous to computing the slope of a line between two points f(t) and ft+dt) to estimate the derivative.
There are more advanced techniques (like quadratic interpolation) involving more than just two samples to get a better (or different) result.
 
Last edited:
  • #5
BTW, in two dimensions it is much easier to convert the matrices into a complex number and deal with complex number multiplications from then on.

In three dimensions, quaternions are an excellent choice as they are simpler to use and numerically more stable than matrices.

In every case, though, you will still need to contend with computing a logarithm of a complex number, a quaternion, or a matrix (or for complex numbers it might be an arctangent which is basically the same thing). In every case there is the ambiguity of whether a tiny rotation or a huge rotation occured.
 

FAQ: Angular Velocity from Orthogonal Rotation Matrix

What is Angular Velocity from Orthogonal Rotation Matrix?

Angular Velocity from Orthogonal Rotation Matrix is a way to represent the rate of change of an object's orientation in 3-dimensional space. It is a measure of how fast an object is rotating around a fixed axis.

How is Angular Velocity from Orthogonal Rotation Matrix calculated?

The formula for calculating Angular Velocity from Orthogonal Rotation Matrix involves taking the time derivative of the rotation matrix and converting it into a vector representation. This vector represents the direction and magnitude of the angular velocity.

What is the unit of measurement for Angular Velocity from Orthogonal Rotation Matrix?

The unit of measurement for Angular Velocity from Orthogonal Rotation Matrix is radians per second. This represents the amount of rotation in radians that occurs in one second.

What is the relationship between Angular Velocity from Orthogonal Rotation Matrix and Linear Velocity?

Angular Velocity from Orthogonal Rotation Matrix and Linear Velocity are related through the radius of rotation. The linear velocity of a point on a rotating object is equal to the angular velocity multiplied by the distance from the axis of rotation to that point.

How is Angular Velocity from Orthogonal Rotation Matrix used in real-world applications?

Angular Velocity from Orthogonal Rotation Matrix is used in various fields such as robotics, aerospace engineering, and computer graphics. It is used to model and control the orientation of objects in 3-dimensional space, which is essential in designing and programming complex systems.

Similar threads

Replies
3
Views
736
Replies
4
Views
816
Replies
4
Views
401
Replies
4
Views
931
Replies
7
Views
2K
Replies
6
Views
2K
Back
Top