Race Sim Central
Rec.Autos.Simulators Archive

Car physics; suspensions and energy

17 posts by 8 people · 27 Oct 2001 16:10 UTC - 30 Oct 2001 09:00 UTC

Ruud van Gaal 27 Oct 2001 16:10 UTC#155821
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.marketgraph.nl/gallery/racer/ Pencil art : http://www.marketgraph.nl/gallery/
"Ruud van Gaal" <[email hidden]> wrote in message news:[email hidden]...
Quoted text (35 lines)> 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 bloody hell is he talking about ?)
redTed 27 Oct 2001 20:52 UTC#528561
Ummmm.......Can I call you back ? (what the ***y hell is he talking about ?)
sudesh 27 Oct 2001 21:58 UTC↳ reply to redTed#155758
don't forget the heisenberg compensators! "redTed" <[email hidden]> schreef in bericht news:9rf6ub$t060e$[email hidden]...
Quoted text (44 lines)> > "Ruud van Gaal" <[email hidden]> wrote in message > news:[email hidden]... > > 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 bloody hell is he talking about ?) > >
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.286 / Virus Database: 152 - Release Date: 9-10-01
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. "Ruud van Gaal" <[email hidden]> wrote in message news:[email hidden]...
Quoted text (38 lines)> 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.marketgraph.nl/gallery/racer/ > Pencil art : http://www.marketgraph.nl/gallery/
"Haqsau" <[email hidden]> wrote in message news:OOIC7.38771$[email hidden]... > I think you need two Ek terms, one for the sprung mass and one for the > unsprung mass. > > E = Ep + Ek(s) + Ek(us) 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. > 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. > 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?
"Mike Stanley" <[email hidden]> wrote in message news:m7SC7.11472$[email hidden]... > > > I agree with the energy thing. Personally I've never had to directlytrack > energy in a system in any physics sims I've written, but OTOH I'm notsure I > completely understand what Ruud's trying to do. However I don't seehow 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? > 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.
Quoted text (9 lines)> 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. >
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
On Sun, 28 Oct 2001 01:02:38 GMT, "Haqsau" <[email hidden]> wrote: >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 hanging 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.marketgraph.nl/gallery/racer/ Pencil art : http://www.marketgraph.nl/gallery/
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 ;) ) Ruud van Gaal wrote:
Quoted text (11 lines)> > On Sun, 28 Oct 2001 01:02:38 GMT, "Haqsau" <[email hidden]> > wrote: > > >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. :) >
On Mon, 29 Oct 2001 14:24:29 +0100, Gregor Veble <[email hidden]> wrote: 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?)
Quoted text (34 lines)>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 ;) ) > >Ruud van Gaal wrote: >> >> On Sun, 28 Oct 2001 01:02:38 GMT, "Haqsau" <[email hidden]> >> wrote: >> >> >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/
Gregor Veble <[email hidden]> wrote in message news:[email hidden]... > > -Gregor (who is by now a Dr. - cue congratulations ;) ) > 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...
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. "Ruud van Gaal" <[email hidden]> wrote in message news:[email hidden]... > On Sun, 28 Oct 2001 01:02:38 GMT, "Haqsau" <[email hidden]> > wrote: > > >I think you need two Ek terms, one for the sprung mass and one forthe
Quoted text (29 lines)> >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 hanging 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.marketgraph.nl/gallery/racer/ > Pencil art : http://www.marketgraph.nl/gallery/
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 Ruud van Gaal wrote:
Quoted text (22 lines)> > On Mon, 29 Oct 2001 14:24:29 +0100, Gregor Veble > <[email hidden]> wrote: > > 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 Stephen, it sure felt that way, indeed! But, as you say, the curse of science, which is another heavy weight always being around the corner, is probably looming large already ;). Thanks for the congrats! -Gregor Stephen Ferguson wrote:
Quoted text (11 lines)> > 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...

Sponsors

Affiliate Links

Sim Gaming Expo MOZA Racing Sim-Lab Fanatec TrakRacer Asetek Internet Privacy From NordVPN Dreamhost Capital One Credit Card Application Fanatical CDKeys Amazon Amazon UK Project Motor Racing iRacing Get your racing gloves, boots and more from Demon Tweeks. Enlist at Roberts Space Industries, developers of Star Citizen and Squadron 42


Back from the ashes since July, 2019. First created in 2001 with the merger of Legends Central (founded 1999) and simracing.dk.

A site by a sort of sim racer, for sim racers, about racing sims. News and information on both modern and historic sim racing software titles.

All products and licenses property of their respective owners.


Facebook Threads Bluesky Twitter Mastodon Instagram YouTube Tiktok Twitch Reddit Google News Apple News Subscribe via WordPress Flipboard eBay

Race Sim Central © 1999-2026 | Some links pay RSC a commission. Advertising does not equal endorsement.Cookie Policy