rec.autos.simulators

My Sim: Integration accuracy

Alex Smit

My Sim: Integration accuracy

by Alex Smit » Sat, 04 May 2002 06:15:49

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 :)

Ruud van Ga

My Sim: Integration accuracy

by Ruud van Ga » Sat, 04 May 2002 07:03:08

On Thu, 2 May 2002 21:15:49 +0000 (UTC), "Alex Smith"


>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.

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; }.

I'm not familiar with the method. I do know he uses relaxation lengths
(SAE950311).

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/

J. Todd Wass

My Sim: Integration accuracy

by J. Todd Wass » Sat, 04 May 2002 07:48:15

 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! ;-)

 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

Alex Smit

My Sim: Integration accuracy

by Alex Smit » Sat, 04 May 2002 20:35:52

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!
Gregor Vebl

My Sim: Integration accuracy

by Gregor Vebl » Sat, 04 May 2002 21:33:37

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


> 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 :)

Gregor Vebl

My Sim: Integration accuracy

by Gregor Vebl » Sat, 04 May 2002 21:51:46

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


> 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 Smit

My Sim: Integration accuracy

by Alex Smit » Sat, 04 May 2002 23:18:09

Apologies Gregor!
Matthew V. Jessic

My Sim: Integration accuracy

by Matthew V. Jessic » Sun, 05 May 2002 11:15:57


> 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


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.