Integrating a 3x3 orientation matrix

In summary, Eric reports that he is trying to integrate a 3x3 orientation matrix, but is having trouble due to roundoff error and approximation error. He eventually solves the problem by using a rotation matrix and multiplying the matrix by the original vector.
  • #1
minionx
3
0
Hi there, (I hope this post is in the right forum)

I'm trying to integrate a 3x3 orientation matrix using a vector representing rotational velocity (in 3d)

This is the formula I'm using:

newOrientation = orientation + (dt)(~w)(orientation)

where w is the vector rotational velocity, and the tilde operator creates a “skew-symmetric” matrix out of w.

The problem is, I don't see how this could possibly produce a legitimate orientation matrix. I'm using column-major matricies, so each column of an orientation matrix should contain a normalized vector, right?

I understand that over time, error will creep into things, and the result orientation matrix will begin to be *not quite* orthogonal, and not quite normalized, but what it seems to be producing for me is an orientation matrix containing vectors that arn't REMOTELY normalized.

because of this, when I try to transform a 3d object with it, the object stretches, and essentially tears itself apart.

Am I screwing this up some how? Any help is EXTREMELY appreciated.
 
Physics news on Phys.org
  • #2
Let me restate the problem, just to be sure:

You have a matrix function A(t). That is, you have a matrix whose entries are a function of time.

Then, you are updating the matrix via:
A(t + dt) = A + dt W A(t)


Your problem is that you're accumulating both roundoff error, and approximation error. It's directly analogous to trying to compute 1^2 by starting with 0^2 and trying to use the differential approximation (x + dx)^2 = x + 2x dx to step from 0 to 1 in small increments.


What you really want to do is simply multiply A by a rotation matrix. You know the axis of rotation, you know the angular velocity, and you know the time elapsed. From these, you can determine the angle of rotation, and then compute the appropriate rotation matrix.


There are ways to directly compute the rotation matrix from W, but they're not pretty... if the above is at all possible, that's what you want to do.
 
  • #3
Thanks for the response...

Yes, you reworded my question correctly (and better :) )
I'm afraid I don't follow the big about differential approximation, it only stirs up memories of a high-school calculus course almost 1 year ago... But as it turns out, I managed to solve the problem. For others reading, here is what I came up with:

From what I had read, this "tilde" operator nonsense, when applied to a vector, produces a matrix (we'll call it A). if this matrix is then multiplied against another (B), the resulting matrix is the cross product of the original vector and matrix B.

this is supposed to be the same as taking the original vector, and doing a cross product with each column of matrix B. So this is what I did (the three manual cross products), and now it works like a charm. So I guess I must not have been implementing the tilde thing right...

Thanks for the help though
-Eric
 
  • #4
For the record, I think you're still accumulating approximation error... but I guess it's small enough that it doesn't matter. :smile:
 
  • #5
I do have to "orthonormalize" the rotation matrix every now and then... what you say interests me though, because for physics simulations, I would think one would want to minimize the accumulation of error...
 

1. What is a 3x3 orientation matrix?

A 3x3 orientation matrix is a mathematical representation of the orientation of an object in three-dimensional space. It consists of nine elements arranged in a 3x3 grid, which can be used to describe the rotation and orientation of an object relative to its original position.

2. How is a 3x3 orientation matrix created?

A 3x3 orientation matrix is typically created using a combination of rotation and transformation matrices. The rotation matrix describes the rotation of an object around its center point, while the transformation matrix describes its translation or displacement in three-dimensional space.

3. Why is it important to integrate a 3x3 orientation matrix?

Integrating a 3x3 orientation matrix is important because it allows for the accurate tracking and representation of an object's orientation and position in three-dimensional space. This is crucial in fields such as robotics, computer graphics, and virtual reality.

4. What are some common applications of a 3x3 orientation matrix?

A 3x3 orientation matrix has many practical applications, including video game graphics, animation, flight simulation, and navigation systems. It is also commonly used in engineering and scientific fields for tracking the orientation and movement of objects.

5. How is a 3x3 orientation matrix used in robotics?

In robotics, a 3x3 orientation matrix is used to represent the position and orientation of robot arms and grippers. It is also used in robot navigation and mapping systems to track the movement and orientation of the robot in its environment.

Similar threads

Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
7
Views
2K
  • Special and General Relativity
Replies
1
Views
539
  • Precalculus Mathematics Homework Help
Replies
5
Views
4K
  • Mechanics
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Special and General Relativity
Replies
6
Views
1K
Replies
11
Views
1K
Replies
2
Views
2K
Back
Top