Can I simulate procession with Newton?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Can I simulate procession with Newton?

Postby Julio Jerez » Thu Jul 19, 2007 11:45 am

Absolutely.
Procession or Gyroscopic torque is nothing but an external torque applied to a rotating body.
There is nothing magic about gyroscopic torque, it is just a consequence of Newton second law of motion, which state that a body will continue its state of motion unless there is an external agent affecting its motion.
The key word is "external agent" and "state of motion".
Rigid bodies in reality are composed by a continue set of particles rigidly connected. So when a rigid body is spinning each particle is changing its direction of motion.
Therefore there must be some force external to each particle creating this effect.
This force nothing but the centripetal force the particle feels, this force is generated by the solid link to neighbor particles.
When the math is done the summation of all these forces add to zero but the summation of the torque this force generates over the entire body add to the gyroscopic torque.
The expression can be derived using differential calculus, but is can also be derived from higher level expressions like the formula for the angular momentum of a solid.
I will derive the expression from the definition of angular momentum and use it in a force and torque function callback.
The expression for angular momentum L is

L = I * W

Where:
I is the moment of inertia,
W is the angular velocity.

This is a generic expression valid on any coordinate system. So to express this expression on the local system I will use the suffix l

Ll = Il * Wl

This is a convenient frame to work because here we know that the moment of inertia is a constant meaning it removes complexity.
If we want to get the angular momentum of a body in global space all we need to do is rotate the local angular momentum by the rotation matrix of the rigid body, that is:

L = R * Ll = R * Il * Wl

The second law of physics says the external force generete a change of motion, and again the key word is change of motion.
Changes in calculus is calculated by differeciating an expression with respect to time, so if we take the derivative of the above expretion relative to time the result is the a the net Torque acting on the body,
so let us see what happens

T = dL/dt = D (R * Il * Wl) / dt

Where:
D is the differential operator,
T is the next torque in global space.

The expression on the right side must be derived by the derivative of a product

T = dL/dt = D (R)/dt * Il * Wl + R * D (Il * Wl) / dt

Now we see how the magic of differential calculus bring one expression from the thing air, let us further analyze it to see what it is.
in expression: R * D (Il * Wl) / dt
Il is constant, so we ca write the derivative as:
R * D (Il * Wl) / dt = R * Il * D(Wl) / dt = R * Il *Al
Where D(Wi)/dt = local angular acceleration

This expression is no convenient so we will apply an arithmetic transformation that will not change it but will let us transform it into a more familiar expression.
Let R be the rotation matrix which is orthonormal, then the product R' * R is the identity matrix, where R' is the transpose of R
Now we can write:

R * Il *Al = R * Il * (R' * R) * Al = (R * Il * R') * (R * Al) = I * A

Now let us see what we can do with the first term

D (R)/dt * Il * Wl

What is the derivation of a time varying matrix?
The easiest way to understand this is by seen the matrix as three perperdicular unit vectors that are changing with the matrix.
Since the vectors are unit, when the matrix changes orientation, only their orientation changes but not the magnitude.
Now we can change the problem to the derivative of three unit vectors, and the derivative of a time varying unit vector is the cross product of the angular velocity of the three vectors time the three vector itself.
We can also arrange the cross produc operation into a matrix form and call it W~ Now we have

D(R)/dt * Il * Wl = W~ * R * Il * Wl = - R' * Wl~ * Il * Wl

Since W~ * R = - R' * W~

This expression is what it called gyroscopic torque
Putting is altogether we have

T = D (R)/dt * Il * Wl + R * D (Il * Wl) / dt
T = -R * Wl~ * Il * Wl + I * A
I * A = T + R * Wl~ * Il * Wl


And this is all the mystery of the gyroscopic torque.
Notice that for the expression Wl~ * Il * Wl To be different than zero, Il must be non spherical, otherwise the expression

Wl~ * Il * Wl = Il * Wl~ * Wl = zero

since W~ * W is the cross product of two collinear vectors.

Now we can write and force and torque function that will apply both gravity and gyroscopic force

Code: Select all
void PhysicsApplyGravityForceAndGyroTorque (const NewtonBody* body)
{
   dFloat Ixx;
   dFloat Iyy;
   dFloat Izz;
                dFloat mass;
   dVector omega;
   dMatrix rotation;

   // get body motion state
   NewtonBodyGetOmega(body, &omega[0]);
   NewtonBodyGetMatrix(body, &rotation[0][0]);
   NewtonBodyGetMassMatrix (body, &mass, &Ixx, &Iyy, &Izz);

               // apply gravity
   dVector force (0.0f, mass * GRAVITY, 0.0f);
   NewtonBodySetForce (body, &force.m_x);

   //apply gyroscope torque   
   omega = rotation.UnrotateVector(omega);
   dVector gyro(omega.m_x * Ixx, omega.m_y * Iyy, omega.m_z * Izz, 0.0f);
   dVector torque (rotation.RotateVector(omega * gyro));
   NewtonBodySetTorque(body, &torque.m_x);
}


As you can see gyroscopic forces are to angular motion what gravity is to linear motion.
No really a breakthrough in science and certainly nothing really special that warrant the dedication of a turn paper, master's thesis or PHD dissertation, Gyroscopic torques are just an algebraic exercise.

Also notice that the expression Wl~ * Il * Wl is a quadratic on the magnitude of the angular velocity,
therefore spinning body with non spherical inertial will required an small simulation time step in order to maintain the integrity of the numerical integrator.
The other point is the normally gyroscopic forces are of very little interest outside academia.
They are good for tow kind of problems: simulation for gyroscopic tops and the verification that angular moment is preserved.
For any practical simulation or for engineering purposes Gyroscopic forces do not contribute anything,
in fact in 99.9% of the cases gyroscopic forces are an undesirable effect that is to be avoided unless the problem was the simulation of an actual Gyroscopic.
Julio Jerez
Moderator
Moderator
 
Posts: 11122
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron