Numeric precision with iterative matrix rotations

Click For Summary

Discussion Overview

The discussion revolves around numerical methods for matrix rotations and integration techniques in the context of simulating the rotational physics of a thin rod. Participants explore issues related to precision problems with poorly conditioned matrices and seek effective algorithms for integrating rigid body motion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks methods for matrix rotation/multiplication that address precision issues in poorly conditioned matrices related to simulating rotational physics.
  • Another participant suggests using quaternions for rotation, referencing a document that discusses the encoding of rotations.
  • A participant mentions using quaternions but still experiences drift, attributing it to the integration method rather than matrix conditioning.
  • There is a proposal to explore parametrization in spherical space and integrating angles of rotation instead of using naive Euler integration.
  • One participant recommends considering a Verlet algorithm, noting its error characteristics and suggesting further research into related techniques like Leap Frog and velocity Verlet.
  • A participant expresses interest in the particle-based simulation approach and its potential advantages, particularly regarding angular control laws.
  • Another participant shows interest in the velocity Verlet method as a possible solution.

Areas of Agreement / Disagreement

Participants do not appear to reach a consensus, as multiple competing views and methods are discussed without resolution. The discussion remains open-ended with various suggestions and considerations being explored.

Contextual Notes

Some limitations include the dependence on the choice of integration methods, the potential impact of matrix conditioning, and the unresolved nature of the proposed solutions. The discussion reflects uncertainty regarding the best approach to mitigate drift in simulations.

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
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
4
Views
7K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K