I've been working on my own physics simulation (semi-gamish)
and this site came up in some search. I have a few
quibbles/suggestions regarding some of the angular momentum
pages.
I haven't read every page on the site
from start to finish, and there could definitely be more links
when concepts are referenced (like intertia matrix), so what I'm
saying may be covered somewhere I didn't read. My math notation is
also bad, so some creative interpretation may be required. Please
cut me a little slack, I'm trying to make a positive contribution,
really. ;)
So here are my comments on the
following
pages:
https://www.euclideanspace.com/physics/dynamics/energy/rigidbody/index.htm (Inertia
Matrix)
https://www.euclideanspace.com/physics/dynamics/rotation/index.htm (spinning pencil and other principle axis examples)
It
seems to me that it's better (or at least enlightening) to
consider torque, angular acceleration, and angular velocity
starting from angular momentum.
So my attempt
at equations would be:
(with T = torque, L = angular
momentum, a = angular acceleration, w = angular velocity, I =
moment of inertia; please interpret the correct representations
and operations)
L = Iw
dL/dt =
d(Iw)/dt
= I'w + Iw'
= I'w + Ia
T
= dL/dt
= I'w + Ia
(all analogous
to:
p = mv
dp/dt = d(mv)/dt
=
m'v + mv'
= m'v + ma
F = dp/dt
=
m'v + ma
if m' = 0
F = ma )
Angular
momentum is a vector and torque is a vector expressing its change
over time. That's all easy to understand and visualize. The
problem is how angular momentum relates to the motion of an
object.
So let's just start here:
L
= Iw
'w' is a vector representing the axis of
rotation and angular velocity about that axis. 'I' is the inertia
matrix which combined with w gives us the angular momentum of the
object.
The first problem is that of initial
conditions. Just as with "p = mv" we must start with two
values, calculate the third, and then integrate over time to find
subsequent values. It's an unusual problem to be solving for the
inertia matrix, so we'll take that as one given and also one that
we can calculate or know at any time for any object. At the start
of the simulation we could have either the angular momentum given
and solve for angular velocity (although given some inertia
maxtrices there may be no solution) or be given the initial
angular velocity and solve for initial angular momentum. In either
case we begin knowing all three.
Let's start by
examining an object which begins life with a non-zero angular
momentum and experiences no net torque (constant angular
momentum).
L = Iw = constant (non-zero)
dL/dt
= I'w + Ia = 0
Now if I is constant over time
then angular acceleration is zero and angular velocity is constant
over time. The question is if I' can be non-zero.
I
believe the answer is yes. Take the following example:
Imagine
the point-mass dumbell from the example of inertia matrices in the
referenced page above. Lay it in the x-y plane, and rotate it
about the z-axis. The angular momentum is pointing straight up
along the z-axis (<0,0,something>) and w is likewise
pointing straight up. As the dumbell rotates about the z-axis you
can see that the inertia matrix will change over time. When it is
aligned along the y-axis the Ixx value is at its largest, when it
is aligned along the x-axis its Ixx value is near-zero. QED, the
inertia matrix changes over time.
Back
to:
dL/dt = I'w + Ia = 0
So
if the inertia maxtrix does vary over time then I' is non-zero and
both I and I' must be recomputed for each time step. Furthermore,
as demonstrated in the dumbell example, the rate of change over
time of I depends on w (I changes as the object rotates, and
rotation is w).
However, for the dumbell lying
in the x/y plane and rotating about the z-axis this isn't so
bad:
Ixx = ?? (variable)
Iyy = ??
(variable)
Izz = lzz (constant)
Ixy = ??
(variable)
Ixz = 0 (z = 0, so xz = 0)
Iyz = 0 (z
= 0, so yz = 0)
So Ia =
??
?? 0 ax
?? ?? 0 * ay
0 0 Izz az
and
I'w =
?? ?? 0 0
?? ?? 0 * 0
0
0 0 wz
(okay, with the simple dumbell example
we could solve equations for the ?? in the matrices, but it's not
important here.)
With so many zeroes the
equation isn't bad. We're left with having to solve:
(from
dL/dt = I'w + Ia = 0 )
ax*Ixx - ay*Ixy =
0
-ax*Ixy + ay*Iyy = 0
az*Izz = 0
which
produces a = <0, 0, 0>. As the dumbell is already rotating
about one of its principle axis there is no angular
acceleration.
Because angular momentum is a
vector in the global frame of reference but an object's inertia
matrix is changing as it rotates, the object's angular velocity
may change over time (may just be the axis moving) in order to
maintain constant angular momentum. So combined the terms (I'w)
and (Ia) determine how an object tumbles when it is not rotating
about one of its principle axis.
(For non-rigid
objects such as the physics class experiment of a student sitting
on a spinning stool with weights in his/her hands changing their
moment of inertia, knowing (I'w) lets you solve for the angular
acceleration in (Ia); the faster the student pulls in their arms
the greater the accompanying acceleration and the greater the
initial w the greater the needed acceleration, e.g. if I is
changed so that w is doubled, then doubling 2/s to 4/s requires
greater acceleration than doubling 1/s to 2/s.)
Now
to the example of the inclined dumbell. There is a sign error
here, I believe, a value error, and I think it needs a note as
well.
If the maxtrix equation for the example
is:
[Tx] [ 1 -1 0] [ax]
[Ty] = [-1 1
0] [ay]
[Tz] [ 0 0 2] [az]
(the masses
need to be 0.5kg each for that to be the matrix, that's the value
error)
(is that a better way to represent matrices in
text?)
then I think the solutions are
actually:
Tx = ax - ay
Ty = -ax +
ay
Tz = 2az (unsed in the example)
Tx =
-Ty
so that the acceleration is actually on a
line of x = -y. The image(GIF) of the equation also has an (-Ixy)
in the upper-right corner of the inertia matrix where it should
have an (-Ixz).
One problem I have with the
example is that in simulations it seems to me you usually know
what the angular momentum at any given moment should be (as you
calculate the forces you also calculate the torques and therefore
know how angular momentum is changing; integrating torque over
time gives you L), and have to calculate angular velocity and
angular acceleration from that. The example treats T as an unknown
instead of a known.
If we instead proceed
through the inclined dumbell example with a known dL/dt then
another problem is exposed. Let's say we know we have an external
torque producing a change in angular momentum of <0, 1, 0>
(along the y-axis). Then the equation gives us:
0
= ax - ay
1 = -ax + ay
ax = ay
1
= -ay + ay
1 = 0 (Ooops!)
The example
dumbell with its point masses has a moment of inertia of zero
about its long axis. This would mean that however fast it rotates
about its long axis it would never generate any angular momentum,
or that any torque about that axis produces infinite (or undefined
if that's how you prefer to describe dividing by zero) angular
acceleration; this is the note I feel should be added. Real
objects wouldn't have any axis of rotation about which they had a
moment of inertia of zero. So having any angular momentum along
this axis is impossible ( L * <1, 1, 0> = 0 ), which is what
solving for torque in the example has actually proven.
If
we amend the example to give the dumbell a non-zero moment of
inertia through its long axis by having four masses of 0.25kg at
<1.1, 0.9> <0.9, 1.1> <-1.1, -0.9> and <-0.9,
-1.1>, and setting dL/dt to <0, 1, 0> we have the
following equation:
[Tx] [ Ixx -Ixy -Ixz]
[ax]
[Ty] = [-Ixy Iyy -Iyz] [ay]
[Tz] [-Ixz -Iyz
-Izz] [az]
[0] [ 1.01 -0.99 0] [ax]
[1]
= [-0.99 1.01 0] [ay]
[0] [ 0 0 2.02] [az]
ax
= 0.9802ay
ax = 24.75
ay = 25.25
az =
0
So with a torque producing a dL/dt of <0,
1, 0> the resulting angular acceleration is <24.75, 25.25,
0>, or very nearly but not quite along the long axis of the
dumbell. Why is this? If we look at this revised dumbell's moment
of inertia along its long axis it's still very small, only 0.04 by
my calculation, compared to the ~4 about any axis perpendicular to
the long axis. Any rotation about the long axis provides very
little angular momentum, so we need the axis of rotation very
close to the long axis if the angular momentum has any significant
component parallel to that axis.
To better
illustrate that and to provide a sanity check, let's rotate the
dumbell so that it's long axis is in line with the x-axis. That
gives us:
[Tx] [ 0.04, 0, 0] [ax]
[Ty]
= [ 0, 2, 0] [ay]
[Tz] [ 0, 0, 2.02] [az]
Hey!
It's the principle axes! ;) (Sorry, it's getting later at night as
I write this now.)
Tx = 0.04*ax
Ty =
2*ay
Tz = 2.02*az
So if Tx (dLx/dt) is
non zero it produces a very large angular acceleration along the x
axis, as (ax = 25*Tx).
If dL/dt = < 1.414,
1.414, 0 >, at 45-degrees from the long axis again,
then:
0.707 = 0.02*ax
0.707 = 2*ay
ax
= 35.355
ay = 0.354
az = 0
The
magnitude of the angular acceleration is the same as before, and
once again very nearly in line with the long axis, which has been
rotated to be the global x-axis now.
If we use
this initial I then we can also pretend we started in this
orientation with a large L at 45-degrees to the long axis, say L =
<100, 100, 0>. With [L] = [I][w] then [w] is along the same
vector as [a] was before, that is nearly in line with the long
axis but "cheated" just a hair toward the [L] vector,
with the same solutions as for a:
100 =
0.02*wx
100 = 2*wy
wx = 5000
wy =
50
L = <100, 100, 0>
w = <5000,
50, 0>
(because we are not rotating about a
principle axis the axis of rotation is not in line with the
angular momentum)
Notice that the angular
momentum, angular velocity, and long axis of the dumbell are all
in the same plane, the x-y plane at the start. I believe that this
relation must hold as long as the angular momentum remains
constant (net torque is zero).
What does it
mean physically for the axis of rotation to be nearly but not
quite in line with the dumbell's long axis? Well, if the dumbell
is rotating about that axis, and its own long-axis is not in line
with that axis, then the long axis must be rotating about that
axis, at least at that initial moment in time. Since the axis of
rotation has a slight y component the dumbbell is rotating
slightly around the y axis, which gives the long axis a slight
negative-z velocity at the positive x end.
If
the angular momentum hasn't changed (still pointed off at <100,
100, 0>), but the axis of rotation is not in line with that
then the axis of rotation must also change. When we solved for the
angular velocity we found that we needed a very small component
perdendicular to the long axis of the dumbbell in the direction of
the angular momentum. In order to keep that the case I think the
axis of rotation must itself rotate about the angular momentum
vector. If we were already rotating about a principle axis then
the axis of rotation would be in line with the angular momentum
vector and so it wouldn't move. As this is not the case it must.
This changing of the axis of rotation is the a in (dL/dt = I'w +
Ia).
As some further examples of this I think
wobbling semi-gyroscopes are the best. A "lame duck"
thrown football is obviously spinning very nearly along its long
axis, while that long axis is also rotating about the angular
momentum vector. This is not caused by air resistance and you can
toss a football just slightly into the air in front of you with
this same behavior. A wobbling frisbee does the same. This ties in
to the pencil example. You can't make the pencil rotate about an
arbitrary axis, but you can give it an angular momentum pointed in
an arbitrary direction about which its axis of rotation will
rotate. You can demonstrate this also by tossing a flashlight,
mug, or other cylindrical object into the air and trying to almost
but not quite spin it about its long axis. Perhaps a bicycle wheel
gently tossed and spun in the air will also give you proof that
the gyroscopic "wobbling" effects are real and don't
depend on external forces. ;)
So all this
stems from properly differentiating angular momentum over time,
giving us:
dL/dt = I'w + Ia
I
don't know if there's an easy way to calculate I and I'. There are
those three orthogonal principle axes, but I don't know if you can
simply rotate that inertia matrix to find the correct I for any
given orientation of the object. I'm not sure the total physical
properties of the object needed for the computation of the inertia
matrix are completely encoded in those nine numbers. If you have a
simple, fairly symmetrical object maybe you can rotate the inertia
matrix, but I really doubt a highly asymmetric object can be
recontructed just from the matrix. You may be need a specific
formula for each object. I'll have to play with some
numbers.
Anyway, the inertia matrix is what I
was looking for, even though I had come up with the principles
I've expounded on here; I didn't have the right mathematics to
express it and I thank you for publishing them on your pages. I
hope I've helped in return, although it's possible all this was
already hidden somewhere on the site that I hadn't read.
Oh,
I was also working on the constraint equations for the different
joints, trying to model them as simply distances between points on
objects that must be maintained. If you could point me at a
reference describing the basic joints that would also be
appreciated; I don't think I found exactly what I was looking for
where I looked, and there might be some more information somewhere
that I missed. I mentioned that I'm approaching my effort more as
a physics simulation, and my most recent efforts have been in
working out using Euler's Method (which I think I independently
re-invented from a physics-simulation-application-specific
perspective because I had forgotten it from my purely
theoretically mathematical classwork. ;) ). I could help write a
bit more about that if you'd like.
*yawn* Very
late now. Sorry if this has all been covered here already. |