Race Sim Central
Rec.Autos.Simulators Archive

My Sim: Integration accuracy

8 posts by 5 people · 02 May 2002 21:15 UTC - 04 May 2002 02:15 UTC

Alex Smith 02 May 2002 21:15 UTC#122332
Hi again :) Probably my last post before my baby gets handed in (sob) At rest and at low speed my FX and FY oscillate wildly, especially if the timestep is large, say when being run on a slow computer. At the moment all integration is done by newVel = oldVel + timeStep * acc I remember threads that talked about different integration methods, or even damping functions. Do these reduce the oscillations by much? Any suggestions welcome! I've seen a method for reducing longitudinal force in a paper by Eric Lowndes, but am not sure exactly what to do with the result!, is it just a subtraction!? PS. I hope some of you do not mind being acknowledged in my report for your assistance with this ( Ruud Van Gaal, Greger Veble, Sebastien Tixier, Ashley McConnell, J. Todd Wasson, anyone else?) as I dont think I would have ever got as far as I have, even with Milliken and Genta books :)
On Thu, 2 May 2002 21:15:49 +0000 (UTC), "Alex Smith" <[email hidden]> wrote: >Hi again :) >Probably my last post before my baby gets handed in (sob) > >At rest and at low speed my FX and FY oscillate wildly, especially if the >timestep is large, say when being run on a slow computer. Hm, the slow computer should probably also be able to readily handle small timesteps; I've found that graphics takes most of the time. But anyway. >At the moment all integration is done by > >newVel = oldVel + timeStep * acc > > I remember threads that talked about different integration methods, or even >damping functions. SAE950311 describes a much-used method, but I guess that's too late. You can try cutting Fx/Fy down to 0 at low speed, and perhaps low throttle (so if things are really at rest, take the forces down, but let them go once you want to drive). Like if(v<1){ Fx*=v; Fy*=v; }. > Do these reduce the oscillations by much? Any suggestions >welcome! I've seen a method for reducing longitudinal force in a paper by >Eric Lowndes, but am not sure exactly what to do with the result!, is it >just a subtraction!? I'm not familiar with the method. I do know he uses relaxation lengths (SAE950311). >PS. > >I hope some of you do not mind being acknowledged in my report for your >assistance with this ( Ruud Van Gaal, Greger Veble, Sebastien Tixier, Ashley >McConnell, J. Todd Wasson, anyone else?) as I dont think I would have ever >got as far as I have, even with Milliken and Genta books :) No problem, as a matter of fact it's cool. :) Ruud van Gaal Free car sim: http://www.racer.nl/ Pencil art : http://www.marketgraph.nl/gallery/
Hi Alex, The low speed problems might be a little bit improved with a different integration method, but I think basically you'll just see a situation where the problems become visible at a lower speed, but are still there. In the slip ratio case it's simply because you're dividing by the tire's velocity. The smaller it gets, the more extreme the slip ratios become. (Bang bang!) The same thing happens at low speed slip angles too, and doesn't really go away no matter what you do. At low speed, the slip angles can jump very quickly to very big positive and then negative numbers. Another integration method might help, but the problem will still intrinsically be there. IIRC, Matt Jessick mentioned that he worked for many years on aerospace simulators where the problem also existed. Motion simulators don't like to stop, generally. The quickest way to fix/improve this that I know of is to have a low cutoff speed, where the slip ratio calculation changes to a simple subtraction problem. Here's what I do: IF ABS(Tire_Long_Vel) < 1 THEN Slip_Ratio(Tire) = ((Tire_Rot_Vel(Tire) * Tire_Radius(Tire)) - Tire_Long_Vel) * .5 ELSE '//Brian Beckman's formula-- Slip_Ratio(Tire) = ((Tire_Rot_Vel(Tire) * Tire_Radius(Tire)) - Tire_Long_Vel) / '// ABS(Tire_Long_Vel) END IF When the tire velocity is below 1 ft/sec, it simply leaves out the division part. Then I throw in a little factor to multiply by. Works for me. Of course, you can't stop on hills with that though, but if you're 2-D here, this should work fine. (You might play with the constants of course to get it to work with your system, or maybe even have them self adjust according to velocity. Hmm...) I don't know how to fix it in the lateral/slip angle direction either. Haven't given it much thought anyway because sideways jitters aren't visible with cars. The only way a really slow computer hurts my low speed performance is if it is so slow that it can't do the calculations in real time any longer, which just doesn't happen on my 333Mhz laptop. Graphics and intersection calcs (unless you're good at trees) will take up most of the CPU time, probably. If it starts to happen anyway, it's time to raise the "minimum system requirements", I think! ;-) >I hope some of you do not mind being acknowledged in my report for your >assistance with this ( Ruud Van Gaal, Greger Veble, Sebastien Tixier, Ashley >McConnell, J. Todd Wasson, anyone else?) as I dont think I would have ever >got as far as I have, even with Milliken and Genta books :) > > That would be great! Thanks :-) Will you be continuing on and making another simulator of your own for us to play with? :-D Todd Wasson --- Performance Simulations Drag Racing and Top Speed Prediction Software http://PerformanceSimulations.Com My little car sim screenshots: http://performancesimulations.com/scnshot4.htm
I have tried SAE 950311, initially just for slip ratio, but it produced results that were making it worse rather than better, the car accelerates quicker than the wheels are turning, so I abandoned it. Would look very nice in my report if I get it working (its due in a week), the code is there, is just doesn't work!
Hi Alex! I think Ruud and Todd explained the reasons for why the calculations become unstable and soultions for it already. I just need to reply because I saw my name below ;). The problem is in the slip angles and ratios having a denominator that is the absolute value of velocity, and clearly this will give you problems when velocity becomes really small. As proposed by Todd, the quickest solution (that works really nice) is to limit the absolute value of velocity with which you divide. In your definitions of SA and SR just put instead of what currently looks like (...)/|V|, something like (...)/|V_mod|, where |V_mod| is given simply as |V| if (|V|>v_cutoff), or else |V_mod|=v_cutoff. This then coincides with the usual definitions for velocities over v_cutoff, and regularizes things below v_cutoff. Make v_cutoff as small as possible to keep the calcs stable. It's nice to be quoted in your project, hey, maybe we'll get famous, guys :) ! (btw, it's Gregor, not Greger, I'm not worthy of such an alien name :) ) -Gregor On Thu, 2 May 2002, Alex Smith wrote:
Quoted text (29 lines)> Hi again :) > Probably my last post before my baby gets handed in (sob) > > At rest and at low speed my FX and FY oscillate wildly, especially if the > timestep is large, say when being run on a slow computer. > > At the moment all integration is done by > > newVel = oldVel + timeStep * acc > > I remember threads that talked about different integration methods, or even > damping functions. Do these reduce the oscillations by much? Any suggestions > welcome! I've seen a method for reducing longitudinal force in a paper by > Eric Lowndes, but am not sure exactly what to do with the result!, is it > just a subtraction!? > > PS. > > I hope some of you do not mind being acknowledged in my report for your > assistance with this ( Ruud Van Gaal, Greger Veble, Sebastien Tixier, Ashley > McConnell, J. Todd Wasson, anyone else?) as I dont think I would have ever > got as far as I have, even with Milliken and Genta books :) > > > > > > >
Hi Alex, ah I see that you put the relax. lengths in then. These should not produce the result you mention. Is the behaviour of the car changed any when you drive at a normal speed? -Gregor On Fri, 3 May 2002, Alex Smith wrote:
Quoted text (8 lines)> I have tried SAE 950311, initially just for slip ratio, but it produced > results that were making it worse rather than better, the car accelerates > quicker than the wheels are turning, so I abandoned it. Would look very nice > in my report if I get it working (its due in a week), the code is there, is > just doesn't work! > > >
Alex Smith wrote: > > I have tried SAE 950311, initially just for slip ratio, but it produced > results that were making it worse rather than better, the car accelerates > quicker than the wheels are turning, so I abandoned it. Would look very nice > in my report if I get it working (its due in a week), the code is there, is > just doesn't work! This sounds like good experience for the real world! (That is, a months work in a week ;) And having to work the overtime during summer is extremely realistic to the world of videogame programming. ;) - Matt

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