Numeric precision with iterative matrix rotations

AI Thread Summary
The discussion revolves around finding effective methods for matrix rotation and multiplication to address precision issues with poorly conditioned matrices, particularly in simulating the rotational physics of a thin rod. The inertia tensor used in the simulation is poorly conditioned, leading to drift in the simulation results. Quaternions are being utilized for orientation, but drift persists, suggesting that the integration method rather than matrix conditioning may be the root cause. Smaller simulation steps have been noted to reduce drift, prompting consideration of alternative integration techniques. Suggestions include exploring Verlet integration methods, such as the Velocity Verlet algorithm, which could potentially minimize errors associated with time steps. The conversation highlights the need for innovative approaches to integrate rigid body motion effectively while maintaining angular momentum without drift.
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..
 
In my discussions elsewhere, I've noticed a lot of disagreement regarding AI. A question that comes up is, "Is AI hype?" Unfortunately, when this question is asked, the one asking, as far as I can tell, may mean one of three things which can lead to lots of confusion. I'll list them out now for clarity. 1. Can AI do everything a human can do and how close are we to that? 2. Are corporations and governments using the promise of AI to gain more power for themselves? 3. Are AI and transhumans...
Sorry if 'Profile Badge' is not the correct term. I have an MS 365 subscription and I've noticed on my Word documents the small circle with my initials in it is sometimes different in colour document to document (it's the circle at the top right of the doc, that, when you hover over it it tells you you're signed in; if you click on it you get a bit more info). Last night I had four docs with a red circle, one with blue. When I closed the blue and opened it again it was red. Today I have 3...
Back
Top