rec.autos.simulators

Car physics; suspensions and energy

Ruud van Ga

Car physics; suspensions and energy

by Ruud van Ga » Mon, 29 Oct 2001 01:10:43

Hi there,

I recently read some more about SMD systems; spring-mass-dampers. In
there, the energy of the system was defined as:

E=Ep+Ek=constant (Ep=potential, Ek=kinetic energy).

Ep is defined as the amount of work done to get the
compression/decompression, so Ep is the integral over the spring
offset:

Ep=1/2*k*x^2 (k=spring rate, x=offset w.r.t. rest length)

Ek is defined as the usual 1/2*m*v^2.
I want to get a look at the energy in the system, since I've read
(from FastCar) that with Euler integration, when the car is in the
air, the suspensions and car can add energy into the system quite
quickly (again, with Euler integration), as the dampers don't really
do a lot of work once airborne.

The question is, how much is 'm' in the Ek formula? A regular SMD
system has 1 mass attached to it, but a suspension has both mass on
one end (the tire) and on the other end (the car). I'm not sure
whether to see one of both as the 'ground' and use the mass of the
other, as that doesn't seem right, since both can move considerably
(although the tire mass is very small compared to the car's mass).

Does anybody have an idea about this?

The reason for all this is to check my integrations; if I integrate,
and Ep+Ek becomes larger, I can reduce the suspension movement until I
get sort of an average new Ep+Ek that will keep things constant.

Thanks for any ideas,

Ruud van Gaal
Free car sim  : http://www.racesimcentral.net/
Pencil art    : http://www.racesimcentral.net/

redTe

Car physics; suspensions and energy

by redTe » Mon, 29 Oct 2001 05:52:38



Ummmm.......Can I call you back ?

(what the ***y hell is he talking about ?)

sudes

Car physics; suspensions and energy

by sudes » Mon, 29 Oct 2001 06:58:11

don't forget the heisenberg compensators!





> > Hi there,

> > I recently read some more about SMD systems; spring-mass-dampers. In
> > there, the energy of the system was defined as:

> > E=Ep+Ek=constant (Ep=potential, Ek=kinetic energy).

> > Ep is defined as the amount of work done to get the
> > compression/decompression, so Ep is the integral over the spring
> > offset:

> > Ep=1/2*k*x^2 (k=spring rate, x=offset w.r.t. rest length)

> > Ek is defined as the usual 1/2*m*v^2.
> > I want to get a look at the energy in the system, since I've read
> > (from FastCar) that with Euler integration, when the car is in the
> > air, the suspensions and car can add energy into the system quite
> > quickly (again, with Euler integration), as the dampers don't really
> > do a lot of work once airborne.

> > The question is, how much is 'm' in the Ek formula? A regular SMD
> > system has 1 mass attached to it, but a suspension has both mass on
> > one end (the tire) and on the other end (the car). I'm not sure
> > whether to see one of both as the 'ground' and use the mass of the
> > other, as that doesn't seem right, since both can move considerably
> > (although the tire mass is very small compared to the car's mass).

> > Does anybody have an idea about this?

> > The reason for all this is to check my integrations; if I integrate,
> > and Ep+Ek becomes larger, I can reduce the suspension movement until I
> > get sort of an average new Ep+Ek that will keep things constant.

> > Thanks for any ideas,

> Ummmm.......Can I call you back ?

> (what the ***y hell is he talking about ?)

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.racesimcentral.net/).
Version: 6.0.286 / Virus Database: 152 - Release Date: 9-10-01
Haqsa

Car physics; suspensions and energy

by Haqsa » Mon, 29 Oct 2001 10:02:38

I think you need two Ek terms, one for the sprung mass and one for the
unsprung mass.

E = Ep + Ek(s) + Ek(us)

OTOH I'm not sure why you are bothering.  Best just to use F=mA, IMO.  I
did some drag race simulation code in the 80's for a project I was
working on, and that was all I used.  The results came out quite
accurate as I recall.  Obviously the key is breaking down the F term
into as much detail as possible, and then simulating it in as tiny steps
as possible (I think I calculated every foot, but of course that is not
very convenient for real time code).  But when you start adding in
energy balance and Euler integration and all that other stuff it just
gets confusing.



Mike Stanle

Car physics; suspensions and energy

by Mike Stanle » Mon, 29 Oct 2001 20:39:50


I agree with that - each of the masses influences the spring and should
therefore make a contribution to the energy in the system. But like Ruud
said, the wheel's mass will be small compared to the vehicle, so the
contribution may be negligible. However if you decided to simulate a tractor
or a monster truck it would be a different story.

I agree with the energy thing. Personally I've never had to directly track
energy in a system in any physics sims I've written, but OTOH I'm not sure I
completely understand what Ruud's trying to do. However I don't see how you
could do a physical simulation without doing some form of numerical
integration - you need to somehow get from acceleration to velocity to
position. Could you explain how you avoided doing this?

Haqsa

Car physics; suspensions and energy

by Haqsa » Tue, 30 Oct 2001 01:58:55


I think I just got lost in the terminology.  I've been in a product
releasing position for the past 7 years or so, and so my knowledge of
theory is getting rusty.  ;o)  Yes I did do some form of integration,
you are absolutely right.  And I just looked up Euler integration to
refresh my memory, and that is of course one way to do it.  I think I
added some other methods to minimize error accumulation, but I don't
have the code here at home so I can't tell you for sure.  Sorry for the
confusion.

Mike Stanle

Car physics; suspensions and energy

by Mike Stanle » Tue, 30 Oct 2001 05:15:27

That's perfectly alright :)

Just thought there might have been some other method I've never heard of. I
must admit that when I first started games programming, I was using Euler
integration for a while without even knowing it was a form of numerical
integration :o)

Mike

Ruud van Ga

Car physics; suspensions and energy

by Ruud van Ga » Tue, 30 Oct 2001 21:56:23



Hm yes, that may be the right one. :)

Well, if you've tried*** an undamped wheel to a car which is
floating in air, you can see that Euler integrators (in math English;
pos+=vel*t, vel+=acc*t) can generate quite some error which allows the
suspension to not just bounce up & down indefinitely, but the
amplitude gets bigger and bigger and BIGGER until it all explodes. ;-)
There are multiple ways of doing rigid body physics; Newtonian is
known to most of us, but you also have LaGrangian mechanics, which
writes everything down as energy. The nice thing is (I think) that you
can check for constant energy in systems with the latter, where with
forces you just apply and see what happens.
The energy could *check* whether a given force and resulting
displacement is too much and would increase the energy. WSC uses it
for example, and it seems to make things <quote> 'rock-solid'
</quote>. So it's good to look into. :)

Thanks for the tip; I'll see how that would work out.

Ruud van Gaal
Free car sim  : http://www.racesimcentral.net/
Pencil art    : http://www.racesimcentral.net/

Gregor Vebl

Car physics; suspensions and energy

by Gregor Vebl » Tue, 30 Oct 2001 22:24:29

Hi Ruud,

I missed the thread earlier, obviously. :)

The energy indeed needs to be written for all components of the system.
Therefore, for each rigid body in the system you need to introduce 1/2 m
v^2 for translational, 1/2 omega^T J omega for rotational (omega is a
vector, J the inertia tensor and T means the transpose), and 1/2 k x ^2
for any spring in the system (including the tyre 'spring' I suppose).

However, if you indeed use a small enough timestep and have damping in
the system, the energy should by all means not increase, or something
wrong is happening in the system. The Euler integrators (once the
timestep is smaller than the one suggested by the highest frequency of
the system) do increase energy, but only after multiple oscillations.
The moment you introduce a sufficient damper in your system, the energy
should strictly decrease. Only if the timestep is too large this isn't
true anymore, and in that case keeping energy in check may provide
stability but most likely not accuracy.

-Gregor (who is by now a Dr. - cue congratulations ;) )




> >I think you need two Ek terms, one for the sprung mass and one for the
> >unsprung mass.

> >E = Ep + Ek(s) + Ek(us)

> Hm yes, that may be the right one. :)

Ruud van Ga

Car physics; suspensions and energy

by Ruud van Ga » Wed, 31 Oct 2001 01:35:38

On Mon, 29 Oct 2001 14:24:29 +0100, Gregor Veble

Hi Gregor!

(audience warmup man raises his hand)
*clap clap* Hurrah! Congratulations!
Jeez, a Dr.
Dr. Veble, hehe. But you deserve it, you're brilliant.

Back to the topic at hand then. If I read you correctly, this really
means I can mostly check the energy of the entire car (4 springs, 1
sprung mass, 4 tire masses) rather than isolate things to 1 suspension
and do a local check there?

*virtual beer* <= have one on me. ;-)

Ruud
PS With J you don't mean the inverse inertia tensor? (in other words,
I'll need the normal inertia tensor after all?)

>Hi Ruud,

>I missed the thread earlier, obviously. :)

>The energy indeed needs to be written for all components of the system.
>Therefore, for each rigid body in the system you need to introduce 1/2 m
>v^2 for translational, 1/2 omega^T J omega for rotational (omega is a
>vector, J the inertia tensor and T means the transpose), and 1/2 k x ^2
>for any spring in the system (including the tyre 'spring' I suppose).

>However, if you indeed use a small enough timestep and have damping in
>the system, the energy should by all means not increase, or something
>wrong is happening in the system. The Euler integrators (once the
>timestep is smaller than the one suggested by the highest frequency of
>the system) do increase energy, but only after multiple oscillations.
>The moment you introduce a sufficient damper in your system, the energy
>should strictly decrease. Only if the timestep is too large this isn't
>true anymore, and in that case keeping energy in check may provide
>stability but most likely not accuracy.

>-Gregor (who is by now a Dr. - cue congratulations ;) )




>> >I think you need two Ek terms, one for the sprung mass and one for the
>> >unsprung mass.

>> >E = Ep + Ek(s) + Ek(us)

>> Hm yes, that may be the right one. :)

Ruud van Gaal
Free car sim  : http://www.marketgraph.nl/gallery/racer/
Pencil art    : http://www.marketgraph.nl/gallery/
Stephen Ferguso

Car physics; suspensions and energy

by Stephen Ferguso » Wed, 31 Oct 2001 02:28:22


Hi Gregor

Do you feel that large weight lifting off your shoulders?  I certainly did
at the end of mine.

Congratulations
Stephen

p.s. don't worry, there another even heavier weight just around the
corner...

J. Todd Wass

Car physics; suspensions and energy

by J. Todd Wass » Wed, 31 Oct 2001 07:59:02

  Congratulations DR VEBLE!!!!!

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

Haqsa

Car physics; suspensions and energy

by Haqsa » Wed, 31 Oct 2001 08:07:08

Okay I see where you are going.  And as Mike Stanley reminded me, you do
of course have to do some kind of integration.  One way of minimizing
errors, though it may be too computationally intensive for real time, is
to do prediction/correction, sort of a real time equivalent of Simpson's
rule (unless I've forgotten still more terminology).  Basically you
calculate the acceleration a(0) at t(0) and then extrapolate from that
point to t(1) using your standard high school physics equations of
motion.  Then calculate a new acceleration a(1) at t(1) based on its
extrapolated position and velocity.  Now finally assume that the real
acceleration over the interval from t(0) to t(1) is the average of a(0)
and a(1), and calculate the actual state at t(1) using this new value.
Obviously that is a lot of overhead, but it works.  This is more or less
what I used in my drag race simulation (<cough> back in the days of
mainframes and FORTRAN), and I was quite happy with the results.





> >I think you need two Ek terms, one for the sprung mass and one for
the
> >unsprung mass.

> >E = Ep + Ek(s) + Ek(us)

> Hm yes, that may be the right one. :)

> >OTOH I'm not sure why you are bothering.  Best just to use F=mA, IMO.

> Well, if you've tried*** an undamped wheel to a car which is
> floating in air, you can see that Euler integrators (in math English;
> pos+=vel*t, vel+=acc*t) can generate quite some error which allows the
> suspension to not just bounce up & down indefinitely, but the
> amplitude gets bigger and bigger and BIGGER until it all explodes. ;-)
> There are multiple ways of doing rigid body physics; Newtonian is
> known to most of us, but you also have LaGrangian mechanics, which
> writes everything down as energy. The nice thing is (I think) that you
> can check for constant energy in systems with the latter, where with
> forces you just apply and see what happens.
> The energy could *check* whether a given force and resulting
> displacement is too much and would increase the energy. WSC uses it
> for example, and it seems to make things <quote> 'rock-solid'
> </quote>. So it's good to look into. :)

> Thanks for the tip; I'll see how that would work out.

> Ruud van Gaal
> Free car sim  : http://www.racesimcentral.net/
> Pencil art    : http://www.racesimcentral.net/

Gregor Vebl

Car physics; suspensions and energy

by Gregor Vebl » Wed, 31 Oct 2001 17:58:08

Hi Ruud,

thanks for the congrats! I may not be as brilliant as you say, but at
least I worked long enough on the Ph.D. to deserve it :).

Now, to the trick question you pose. In the large scheme of things,
energy gets converted all the time, so looking at the overall picture is
the correct way. However, since the frequencies are very much different,
looking at each individual wheel, perhaps even relative to the car (not
taking into account the overall translation due to car velocity), should
work very well, especially since it is the quick divergencies that you
are trying to take into account. Furthermore, the rotation of the wheel
is mostly uncoupled from the suspension movement, so if you just use the
1/2 mv^2 of the wheel and the spring 1/2kx^2 you should get a good
estimate of the energy stored in the suspension, and should clamp your
variables accordingly. Only if it doesn't work should you try to
consider other contributions (the KISS principle applies well here).

On the other hand, the rotational energy does contain the inertia tensor
and not its inverse; however, since you might not need it the point is
moot.

Greetings,

-Gregor


> On Mon, 29 Oct 2001 14:24:29 +0100, Gregor Veble

> Hi Gregor!

> (audience warmup man raises his hand)
> *clap clap* Hurrah! Congratulations!
> Jeez, a Dr.
> Dr. Veble, hehe. But you deserve it, you're brilliant.

> Back to the topic at hand then. If I read you correctly, this really
> means I can mostly check the energy of the entire car (4 springs, 1
> sprung mass, 4 tire masses) rather than isolate things to 1 suspension
> and do a local check there?

> *virtual beer* <= have one on me. ;-)

> Ruud
> PS With J you don't mean the inverse inertia tensor? (in other words,
> I'll need the normal inertia tensor after all?)

Gregor Vebl

Car physics; suspensions and energy

by Gregor Vebl » Wed, 31 Oct 2001 18:00:19

Hi Todd,

thanks for the congrats!

-Gregor


>   Congratulations DR VEBLE!!!!!

> Todd Wasson
> ---
> Performance Simulations
> Drag Racing and Top Speed Prediction
> Software
> http://PerformanceSimulations.Com


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.