From: "Martin Baker"
Subject: Simple question about rotations
Date: 16 December 2002 10:05
Could anyone help me derive an equation relating the angular velocity
of an solid object when viewed in a local frame-of-reference and when
viewed in an absolute frame-of-reference (when the frame-of-reference
is itself rotating - about a different point). Can I just add the
local angular velocity to the frame-of-reference angular velocity?
(even though they are rotating about different points).
For example, if the earth is rotating once per day, and orbiting the
sun once per 365 days, then in the f-of-r of the sun, can I just add
the angular velocities to give 1+1/365 rotations per day, even though
its motion is a spiral?
I have made an attempt to solve this here, but I've got bogged down:
https://www.euclideanspace.com/physics/dynamics/rotation/rotationfor/index.htm#angularvelocity
I can see how to find the instantaneous angular velocity of a point on
the object by taking the cross-product of its linier velocity and its
distance from the point about which we are measuring the rotation.
This would mean that each point on the solid object would have a
different angular velocity. The only time that each point on the
object has the same angular velocity is if you measure the angular
velocity about its centre of rotation. Does this mean that it is not
meaningful to ask what the angular velocity of the earth is, or the
moon is, in the frame of reference of the sun? If it is meaningful to
ask this, how would you define such an angular velocity?
Thank you for any help or ideas of how to proceed.
Martin
From: "J. Todd Wasson" <jtw62074@aol.com>
Subject: Re: Simple question about rotations
Date: 19 December 2002 01:47
I think that in the context you're describing, the angular velocity of (for
example) the Earth around the sun can't be obtained by adding the angular
velocities together. The Earth's angular velocity is simply a rotation about
its axis, while the motion around the sun is really a translation. The angular
velocity of the Earth in its own coordinate frame would remain constant
regardless of the velocity around the sun.
In my own simulation coding stuff, angular velocity only happens on an axis
through the center of mass. All other movement is translation, although you
could of course do things differently depending on the situation.
Are you sure you're really trying to find the angular velocity here? In your
post and webpages you described the angular velocity as being different for
every point on a spinning body, which is not true. The true instantaneous
*linear* velocity of each point is different as you've described, however, so
I'm wondering what you're really trying to get.
It seems to me that you're really trying to get this linear velocity given
all
the coordinate frames. I'm lousy at mathematical notation, so I'll describe
this the long way:
Following that assumption, if you're trying to find the linear velocity of
a
point on the Earth in the sun's coordinate frame (which would remain fixed in
this example), you can take the position vector on the Earth (with the Earth's
center as the origin), and multiply it by it's rotation matrix, (adding in the
translation from the sun seperately if you're doing 3x3 instead of 4x4
matrices.) This would give you the point's location in the sun's coordinate
frame.
After that, you could do a cross product operation on the earth's angular
velocity vector (described in the sun's coordinate frame) and the position
vector minus the earth's position (sort of a "difference" vector,
which you
already know how to do.) This would give the velocity vector of the point with
no movement around the sun.
After this, you can simply do a cross product operation on the angular velocity
of the Earth's center (in the sun's frame) with the Earth's center position.
This would give the velocity vector of the center of the Earth around the sun.
Then, yes, you can simply add the two velocity vectors together and you'll have
the final velocity vector of the point on the Earth as it rotates and moves
around the sun in the sun's coordinate frame.
Actually, at this point, you could probably get the angular velocity of the
point on the Earth around the sun as you described in radians/sec (true angular
velocity), now that you have the the point's position and linear velocity
vectors. But the only way off the top of my head is to break all this down
into linear velocity vectors first as described.
Am I following you correctly, or did I misunderstand the question?
>I can see how to find the instantaneous angular velocity of a point on
>the object by taking the cross-product of its linier velocity and its
>distance from the point about which we are measuring the rotation.
>This would mean that each point on the solid object would have a
>different angular velocity.
For instance, here it looks like you're really trying to find the instantaneous
linear velocity resulting FROM the angular velocity. The angular velocity is
simply "spin at xx rad/sec around vector xyz." The instantaneous linear
velocity is different though and works just like you've described here.
Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com
My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm
From: "Martin Baker"
Subject: Re: Simple question about rotations
Date: 19 December 2002 11:09
Todd,
> For instance, here it looks like you're really trying to find the instantaneous
> linear velocity resulting FROM the angular velocity.
I was trying to do the inverse of this, to find the instantaneous
angular velocity resulting FROM the linear velocity of a point. Do you
think this is a valid thing to do? It seemed to me that it was
provided one defined a point about which the rotation is measured. Or
is angular velocity to linear velocity a one-way function?
What I am trying to is define a model where all mechanics quantities
can be defined in a scene graph and where necessary calculated above
and below a transform group node (equivalent to changing the frame of
reference).
The idea is that some problems would be easier to solve if I could
change the frame of reference in this way, for instance, collision
response would be easier to calculate in the frame of reference of one
of the objects.
Perhaps I should only translate certain mechanical quantities in this
way, for instance angular momentum might be easier to translate to a
different frame of reference than angular velocity, and perhaps it
would be more useful to solve these dynamics problems?
Also I would like general-purpose equations that I can use to describe
the motion of solid objects, even when they are constrained to rotate
about different points at once (for instance, planetary motion,
gyroscopes, etc.). Perhaps a precise definition of angular velocity
might help me here.
Thank you for your reply, I think it is helping me to clarify my
thinking; I will read it again and mull it over.
Martin
From: <meron@cars3.uchicago.edu>
Subject: Re: Simple question about rotations
Date: 19 December 2002 20:26
In article <14f4f692.0212190309.5639bb54@posting.google.com>, Martin
Baker writes:
>Todd,
>
>> For instance, here it looks like you're really trying to find the instantaneous
>> linear velocity resulting FROM the angular velocity.
>I was trying to do the inverse of this, to find the instantaneous
>angular velocity resulting FROM the linear velocity of a point. Do you
>think this is a valid thing to do? It seemed to me that it was
>provided one defined a point about which the rotation is measured. Or
>is angular velocity to linear velocity a one-way function?
>
No, why. You've v = w x r, and you've w = (r x v)/|r|^2, where r, v
and w are vectors, of course, and x signifies vector product.
Mati Meron | "When you argue with a fool,
meron@cars.uchicago.edu | chances are he is doing just the same"
From: "J. Todd Wasson" <jtw62074@aol.com>
Subject: Re: Simple question about rotations
Date: 21 December 2002 00:51
>I was trying to do the inverse of this, to find the instantaneous
>angular velocity resulting FROM the linear velocity of a point. Do you
>think this is a valid thing to do? It seemed to me that it was
>provided one defined a point about which the rotation is measured. Or
>is angular velocity to linear velocity a one-way function?
Oh, ok. I was mistaken. Yes, you could do this if you wanted I suppose with
a
cross product op, but I can't think of a reason why it would be done. If
you're writing a rigid body dynamics program, you probably won't start out
knowing the linear velocity of some arbitrary point on a body at the beginning
of a time step. Although if you did know it ahead of time, and subtracted the
body's center of mass velocity from it, you could calculate the angular
velocity the way you described.
However, this is backwards from how the system I'm familiar with works (the
one
I use for my sim stuff). Instead, it's better to have an angular momentum
vector and a linear velocity vector assigned to each body. From that, you
would calculate the angular velocity vector, and from there if you wanted to
know the instananeous linear velocity of some point on the body you could make
the calculation. The point here being that you must have the angular momentum
vector, inertia tensor, and the body's orientation matrix to get the angular
velocity vector. Once that's known, you can calculate the velocity of a point.
This doesn't necessarily mean it's a "one way function"; if you happened
to
know the linear velocity first, you could reverse it I'm sure, but it's
unlikely to happen or be necessary.
>Perhaps a precise definition of angular velocity
>might help me here.
The angular velocity vector simply defines the axis about which the object is
rotating at a given instant. Note that in this system, the angular velocity
always goes through the center of mass. (If you wanted to arbitrarily
calculate it relative to another location somewhere, you could by crossing the
instantaneous **linear** velocity with the other vector. I.e., the earth's
"angular velocity" around the sun is xx radians/second.) The length
of the
angular velocity vector (the one through the center of mass) is the rotation
rate of the body (all points on the body) in radians/sec around the vector.
The angular velocity is not a state variable in most rigid body code; it's
calculated "fresh" each loop from the angular momentum and inertia
tensor, and
is only used to construct another matrix that transforms the orientation
matrix. After that, the angular velocity vector can simply be thrown away.
You don't "add a little" to it every time step like you do with other
variables
using this method.
By the way, in 3D dynamcs the angular velocity vector doesn't usually remain
fixed in space unless you've started with a stationary object and only spun
it
in one direction. For instance, if you spin an object around its x axis, the
angular velocity and angular momentum vectors both point along the x axis. But
if you take that object and give it a little kick in another direction (torque
it around another axis), the angular momentum vector moves to a new orientation
and remains fixed as long as you aren't applying any more torque to the body.
The angular velocity vector on the other hand will be offset from the angular
momentum vector now (there will be an angle between the two). The angular
velocity vector will itself rotate around the angular mometum vector (which
is
fixed.) Meanwhile, from one instant to the next, the body rotates around the
angular velocity vector. Maybe that sounds confusing, but if you see an
animation of it with both vectors drawn, it's easy. The angular momentum
vector just sits there while the angular velocity vector slowly orbits it, as
the body spins quickly around the angular velocity vector. Anyway, this is how
nutation/precession occurs in this system (I'm not sure of the correct term.)
I think you might be overcomplicating the solutions through using all these
frames of reference. The angular momentum and angular velocity vectors need
to
be changed/calculated in what 3D game and simulation programmers call the
"world coordinate system." For your purposes, this would be the "highest"
frame of reference. From there, if you want to transform the vectors to
another frame, you can simply do successive matrix multiplies until you're down
to the frame you want.
For instance, I do this in my car simulator in at least one place because I
need to know the velocity of each contact patch. I start with the angular
momentum vector, then calculate the car's angular velocity vector (all in
"world" coordinates), then calculate the tire contact patch velocity
vector
with a cross product (with the car's CG velocity added in as well, of course).
This resultant velocity vector then needs to be projected on to the appropriate
plane so slip angle and slip ratio can be calculated to get tire forces and
stuff, but it's the same idea. I generally start at the top and work down
through the reference frames.
If I want to know the angular velocity vector in the car's coordinate frame,
or
even a wheel's coordinate frame (2 levels down), I just multiply the "world"
angular velocity by the car's rotation matrix, then multiply the result of that
by the tire's rotation matrix. (I don't actually need to do this, but if it
was necessary, that's how it would work. I'd start at the top frame and go
down.)
The point here being that angular momentum isn't likely to be useful or really
mean anything except in the top most frame of reference: the world coordinate
system. Adding a force (and resulting torque) to the body simply does a cross
multiply op, which directly changes the angular momentum in world coords. Yes,
I could probably change it in body coords instead, but then I'd need to
transform that back up to the world frame to add it. That's another matrix
multiply that could have been avoided.
>What I am trying to is define a model where all mechanics quantities
>can be defined in a scene graph and where necessary calculated above
>and below a transform group node (equivalent to changing the frame of
>reference).
>
>The idea is that some problems would be easier to solve if I could
>change the frame of reference in this way, for instance, collision
>response would be easier to calculate in the frame of reference of one
>of the objects.
I don't know what other problems you have in mind that would more easily be
solved through a system like this, but basic rigid body collision response is
easily done within the world coordinate system. If you transformed things down
to a local system to find an impulse vector in the body's frame of reference,
you would have to transform the resulting impulse vector back up xx levels in
order to add it to the world angular momentum vector. It's best in my opinion
to just calculate the impulse vector and do it all in the world coordinate
frame. The math is pretty much the same either way, minus a handful of
multiplications because the impulse magnitude calculation becomes a little
smaller.
To calculate the impulse vector, you need the angular momentum and angular
velocity vectors of both colliding objects (I think you need both, I don't
recall now) in world coordinates anyway. From there you can calculate the
"closing velocity vector" of the contact points during the collision.
There
are a couple of cross product ops done to get the right perpendicular vector,
and then the impulse can be calculated easily and applied along the appropriate
normal. Doing it in world coordinates is probably the easiest way.
In order to move and rotate the objects around with angular momentum and so
forth, you have to calculate a lot of the same stuff that can be used during
collision response too. To do it locally in a body's frame of reference, you
would have to transform the world coordinate inertia tensor, angular velocity
vector, and whatever else to get all this in the body's coordinate frame (or
whatever lower frame that you're interested in.) All this would probably do
is
make the impulse magnitude calculation a little smaller and easier , but
performance is lost to doing a lot of unnecessary calculations to get the same
result. That just seems very slow and inefficient to me, but it's possible
that there's a different problem you're envisioning that would benefit from
this approach.
>Perhaps I should only translate certain mechanical quantities in this
>way, for instance angular momentum might be easier to translate to a
>different frame of reference than angular velocity, and perhaps it
>would be more useful to solve these dynamics problems?
>
I can't think of a reason why you'd ever want to know the angular momentum
vector in any frame other than the top-most one, but if you wanted it at a
lower level, multiplication by successive orienation matrices will handle it.
The same goes for angular velocity. They're just vectors after all, they work
the same way as any other vectors do.
>Also I would like general-purpose equations that I can use to describe
>the motion of solid objects, even when they are constrained to rotate
>about different points at once (for instance, planetary motion,
>gyroscopes, etc.). Perhaps a precise definition of angular velocity
>might help me here.
My favorite papers on this subject are by Chris Hecker and Dr. ? Baraff (I
don't recall his first name. I think it might be David.) Chris Hecker does a
great job of explaining the steps involved in doing all this stuff, and gets
into some of the "why's" of the math behind it. I've read it several
times,
but some of it is still over my head. Like I said, I'm not very good at math!
Chris Hecker's paper is here:
http://www.d6.com/users/checker/pdfs/gdmphys4.pdf
I'd also go here and check out the first link that pops up; Chris' pages. He
provides TONS of references to material on this subject.
http://www.yahoo.com/r/sx/*-http://search.yahoo.com/bin/search?p=chris+hecker+rigid+body
If you can put together the equations from this paper, my hat's off to you.
I
couldn't do it. You might be able to though. Judging by your site's content
I'd say you're more mathematically inclined than I am. Thankfully, somebody
was gracious enough to explain it to me in a more direct, step by step approach
that I could follow. I don't get the benefit of actually understanding WHY
angular momentum is as it is, but as long as I can use it, I'm happy. When I
get some more time, maybe I'll come back and show the steps.
> even when they are constrained to rotate
>about different points at once (for instance, planetary motion,
>gyroscopes, etc.).
Approaches to constraints in systems like this are very different from one app
to the next. I am not familiar with how they work, though. I have read
discussions between people on the subject and am usually lost quickly. Phrases
like "Jacobian matrix" get thrown around a lot, and also "it's
too slow to
calculate things this way" is uttered on occasion:-P
The only place I use anything like this is for the suspension systems on my
simulated cars. However, I cheat a little bit and don't do it the way an
engineer or physicist normally would (although Lotus did do it this way at one
point, so I figure it's ok). It doesn't really matter much in my application,
but it might in yours depending on what effects you want to see.
Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com
My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm
metadata block |
|
see also: |
|
Correspondence about this page | |
Book Shop - Further reading. Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them. |
Engineering Mechanics - Includes Statics book and dynamics book below.. Engineering Mechanics Vol 2: Dynamics - Gives theory for rigid dynamics, aims to allow prediction of effects of force and motion. Includes rotating frame of reference. Lots of colour diagrams, I guess its college / University level. |
Commercial Software Shop Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them. |
|
This site may have errors. Don't use for critical systems.
Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.