Eliminating the Euler Angle singularity without quaternions?

Click For Summary

Discussion Overview

The discussion revolves around the challenges of eliminating the singularity associated with Euler angles in the context of modeling a spinning top using Lagrangian mechanics. Participants explore alternative approaches to quaternions for addressing the gimbal lock issue that arises at specific angles.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant has formulated equations of motion for a spinning top using Lagrangian formalism and is seeking methods to avoid the singularity at theta=0 without using quaternions.
  • Another participant suggests restricting the range of theta to avoid singularities, but acknowledges that the simplest solution involves quaternions.
  • A participant expresses concern that their specific case leads to a steady position at theta=0, complicating the avoidance of singularities.
  • There is a discussion about the possibility of converting equations from Euler angles to quaternions, with one participant questioning whether this requires a complete redefinition of the equations.
  • One participant provides a link to a resource detailing the conversion process from Euler angles to quaternions, including a code snippet for quaternion multiplication.
  • A participant notes the difficulty in applying quaternion conversions to their equations of motion, which are expressed in terms of second derivatives of the angles.

Areas of Agreement / Disagreement

Participants express differing views on the feasibility and necessity of using quaternions, with some suggesting alternative methods to avoid singularities while others indicate that quaternions may be the simplest solution. The discussion remains unresolved regarding the best approach to take.

Contextual Notes

Participants have not reached a consensus on the effectiveness of various methods to address the singularity issue, and there are unresolved questions about the application of Lagrangian mechanics to quaternions.

James_Frogan
Messages
27
Reaction score
0
Hi all,

I've formulated using Lagrangian formalism the equations of motion for a spinning top. I know about the gimbal lock/singularity that occurs at theta=0 and I was wondering if there was any other way to do it without dwelving into quaternions.

Yogi published a paper "A Motion of Top by Numerical Calculation" suggesting a replacement: [itex]\dot{\beta} = \dot{\varphi} cos \vartheta[/itex] and [itex]\dot{\alpha} = \dot{\varphi} sin \vartheta[/itex], but this hasn't worked for me (I find myself getting [itex]\ddot{\alpha} = 0[/itex], which isn't true)

I've had a look at quaternions but I'm not inclined to understand it or be able to simply 'convert' my equations over into quaternion calculus, neither (I believe) can I use Lagrangian mechanics on quaternions.
 
Physics news on Phys.org
One way to avoid the problem without using quaternions is to lock the possible values of theta to a given range that doesn't include the singularities. For example, theta cannot be smaller than 1E-6 degrees and larger than 179.99999 degrees. But the simplest way is using quaternions.

M.
 
Thanks Mbert, unfortunately the case I am looking at causes the top to rise to the steady position.. which unfortunately is the theta 0 position.

Looks like I'll have to dwelve into quaternions. Is it possible to 'convert' my equations in Euler angles into quaternions if I have the equations in Euler's (rigid body) equations? Or must everything be redefined again?
 
To convert from Euler angles to quaternions take a look at this website:

http://www.flipcode.com/documents/matrfaq.html#Q60"

Especially the part:

Q60. How do I convert Euler rotation angles to a quaternion?
-------------------------------------------------------------------

Converting Euler rotation angles to quaterions can be achieved through
the use of quaternion multiplication. Each rotation angle is converted
to an axis-angle pair, with the axis corresponding to one of the
Euclidean axii. The axis-angle pairs are converted to quaternions and
multiplied together. The final quaternion is the desired result.

The following code segment demonstrates this:
---------------------------------------------

quaternion_from_euler( QUATERNION *q, VFLOAT ax, VFLOAT ay, VFLOAT az )
{
VECTOR3 vx = { 1, 0, 0 }, vy = { 0, 1, 0 }, vz = { 0, 0, 1 };
QUATERNION qx, qy, qz, qt;

quaternion_from_axisangle( qx, &vx, rx );
quaternion_from_axisangle( qy, &vy, ry );
quaternion_from_axisangle( qz, &vz, rz );

quaternion_multiply( &qt, &qx, &qy );
quaternion_multiply( &q, &qt, &qz );
}
---------------------------------------------

M.
 
Last edited by a moderator:
Thanks Mbert, I came across several articles on how to convert the angles themselves to quaternion, however the equations of motion are in the forms of: [itex]\ddot{\phi},\ddot{\psi},\ddot{\vartheta} = f(\phi,\psi,\vartheta,\dot{\phi},\dot{\psi},\dot{\\theta})[/itex], so I cannot apply the conversions in that manner.

Does Lagrange formalism work on quaternions?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K