Numeric precision with iterative matrix rotations

Click For Summary
SUMMARY

This discussion focuses on overcoming precision issues in matrix rotations, particularly in the context of simulating the rotational physics of a thin rod with a poorly conditioned inertia tensor. The use of quaternions for rotation representation is suggested, although the participant experiences drift issues regardless. The conversation highlights the importance of integration methods, with specific mention of Verlet integration and its variants, such as the Velocity Verlet algorithm, as potential solutions to improve simulation accuracy and reduce drift.

PREREQUISITES
  • Understanding of matrix rotation and multiplication techniques
  • Familiarity with quaternions and their application in 3D rotations
  • Knowledge of numerical integration methods, specifically Euler and Verlet integration
  • Basic concepts of rigid body dynamics and inertia tensors
NEXT STEPS
  • Research "Verlet integration" and its applications in physics simulations
  • Explore "Velocity Verlet algorithm" for improved numerical stability
  • Study quaternion mathematics and its advantages over traditional rotation matrices
  • Investigate alternative integration schemes for rigid body motion, such as "Leap Frog integration"
USEFUL FOR

Physics simulation developers, numerical analysts, and anyone working on improving the accuracy of rotational dynamics in computational models.

Kludgy
Messages
10
Reaction score
0
I couldn't find a forum section on numerical analysis, so I'm writing this here.

I'm on the lookout for simple matrix rotation/multiplication methods that can overcome the precision problems associated with poorly conditioned matrices.

In my case I'm trying to simulate the rotational physics of a thin rod, so the inertia tensor I'm using is very poorly conditioned. (In the basic simulator the major spin axis eventually converges on the angular momentum axis, which is at least stable but not ideal.)


Or if anyone knows of any fast numerical algorithms designed to integrate rigid body motion, that might be useful as well...


thanks!
 
Computer science news on Phys.org
Have you considered using quaternions to do the rotation? If you search for the phrase "The main problem with encoding a rotation" in this document http://www.sjbrown.co.uk/quaternions.html it will explain a little why I think using quaternions might help.

If you find a solution to your problem outside of PF please post it here. I'm interested.
 
Last edited:
Well I am using a quaternion to describe the orientation. Quaternions or not, I get the same drift problem.

Now that you mention that I think I'm wrong and it's not matrix conditioning but just the poor naive integration involved. I noticed yesterday that using smaller simulation steps delays the drift.

Maybe the solution is to do something funky like creating a parametrization in some sort of spherical space and integrating the angles of rotation instead of naively applying euler integration to each element of a quaternion and normalizing.

I'm pretty much making guesses since I don't know where to go with the math...
 
If the problem is your integration scheme then have you considered using a Verlet algorithm? The error in a Verlet integration is 4th power of the time step. You can google for Leap Frog and "velocity verlet" algorithms in addition to the plain verlet algorithm if it looks like you can adapt this integration technique to your problem.
 
Last edited:
Yeah I read that paper on particle based simulation. I do like the advantage of the particle part of that, not having any explicit angular state at all. I wonder how it would behave with my angular control laws?

Verlet integration in general would let me drop the first order state variables, but I'm still looking for a solution to propagate an explicit angular momentum through the body without drift.
 
Velocity verlet does look interesting! Looking at that now..
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
4
Views
6K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K