rec.autos.simulators

My Sim: General Probs :)

Alex Smit

My Sim: General Probs :)

by Alex Smit » Sat, 13 Apr 2002 20:36:57

Okeydokey

Q1.
Before, I didnt have any road reaction force, I simply accelerated the car
by using the FX from Pacejka * friction.
Now that I do have road reaction, I was wondering how to calculate this
reaction torque.
At the moment is is simply (radius * FX) Right? (But see Q2)
Am I then using this force to accelerate the car?

Q2.
To increase the angular velocity of the wheels I am doing
angAcc = (engineTorque - brakeTorque - frictionTorque  -
roadReactionTorque)/inertia .

However this is giving me a very jittery acceleration, even when beyond
40mph.

Q3.
How do you calculate the inertia of a wheel, or is there a standard value to
give one.
At the moment it is just 1.0

Thanks :-|) (For now!)

Sébastien Tixie

My Sim: General Probs :)

by Sébastien Tixie » Sat, 13 Apr 2002 21:18:30

On Fri, 12 Apr 2002 11:36:57 +0000 (UTC), "Alex Smith"


>Okeydokey

>Q1.
>Before, I didnt have any road reaction force, I simply accelerated the car
>by using the FX from Pacejka * friction.
>Now that I do have road reaction, I was wondering how to calculate this
>reaction torque.
>At the moment is is simply (radius * FX) Right? (But see Q2)

torque = force * radius, that's right

the force that accelerate the car is FX = Pacejka( SlipRatio, Load ),
-(FX * radius) is the ground resistive torque

Do your inertia take acount of all the drive train ? wheel + gearbox +
engine + clutch + differential + other rolling stuff ;) ?
If Inertia is too smal, then the wheel will change of velocity very
quickly, creating jittery FX.

You 'll alway have jittery, but with good inertia value, low steps
integration and robust inegrator ( we use a "triangle" method )
it might be okey.

Euler : Integrate_M(new_val,last_val,val_int,last_val_int)
((new_val)=(last_val) + (val_int) * DYN_DT)

Triangle : Integrate_M(new_val,last_val,val_int,last_val_int)
((new_val)=(last_val) + DYN_DT*0.5f*(val_int) )

exemple

Integrate_M( Speed, LastSpeed, Accel, LastAccel )

Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24   Monster:-124.44

Alex Smit

My Sim: General Probs :)

by Alex Smit » Sat, 13 Apr 2002 22:43:33


> On Fri, 12 Apr 2002 11:36:57 +0000 (UTC), "Alex Smith"

> >Q2.
> >To increase the angular velocity of the wheels I am doing
> >angAcc = (engineTorque - brakeTorque - frictionTorque  -
> >roadReactionTorque)/inertia .

> Do your inertia take acount of all the drive train ? wheel + gearbox +
> engine + clutch + differential + other rolling stuff ;) ?
> If Inertia is too smal, then the wheel will change of velocity very
> quickly, creating jittery FX.

Hehe I wish! I don't want to run before I can crawl :) My inertia is just
the wheel,
I found somewhere that you can calculate inertia by inertia = mass * radius
* radius / 2
Dunno if anyone else uses this. At the mo I'm using a mass = 20 and a radius
= 0.3
so I get an intertia of 0.9 ish

When I say jittery I mean *really* jittery, like osciliiating FX of around
1000N.
even at 40mph.

So thats just the same as halving the timestep?

Ruud van Ga

My Sim: General Probs :)

by Ruud van Ga » Sat, 13 Apr 2002 23:43:27

On Fri, 12 Apr 2002 11:36:57 +0000 (UTC), "Alex Smith"


>Okeydokey

>Q1.
>Before, I didnt have any road reaction force, I simply accelerated the car
>by using the FX from Pacejka * friction.

First, don't multiple Pacejka's Fx by friction. Friction is the 'D' in
the Pacejka formula (some load dependencies; b1*Fz+b2 or something).
So b2 is the friction coefficient (*1000); if b2=1655, the friction
coefficient is 1655 (well, at peak force).

And, Pacejka==road reaction! :)

Yep, if Fx=1000, R=0.3, with T=F*r you get T=1000N*0.3m=300Nm.

Yep, Pacejka's Fx.

Looks like your timestep is too large then. For about 100Hz and up
this should be quite ok I think.
On the other hand, if you only have the wheel inertia, then indeed it
doesn't remain stable; you need to add the inertia of the entire
drivetrain. But be careful; there are squares involved in adding up
the intertiae of the drivetrain. There's an article on this on my
site: www.racer.nl -> Docs -> Technical docs -> Calculating a single
effective intertia for geared components.

The idea behind it all is that you can replace the entire drivetrain
inertia by just 1 number with an effective inertia (as 'felt' at the
wheel). So add driveshaft inertia, gearbox inertia and engine inertia,
with appropriate gear factors in there (as seen from the wheel ->
engine), squared (!).

That's empirical. As Doug would say, 'it is all over the place'. ;-)
But 1.0 is a nice start, perhaps a bit high even.

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

Sébastien Tixie

My Sim: General Probs :)

by Sébastien Tixie » Sun, 14 Apr 2002 00:37:17

OUPS, wrong copy-paste

new_val = last_val + DYN_DT * ( val_int + 0.5f * last_val_int )

Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24   Monster:-124.44

Sébastien Tixie

My Sim: General Probs :)

by Sébastien Tixie » Sun, 14 Apr 2002 00:46:52

On Fri, 12 Apr 2002 17:37:17 +0200, Sbastien Tixier


>>> Euler : Integrate_M(new_val,last_val,val_int,last_val_int)
>>> ((new_val)=(last_val) + (val_int) * DYN_DT)

>>> Triangle : Integrate_M(new_val,last_val,val_int,last_val_int)
>>> ((new_val)=(last_val) + DYN_DT*0.5f*(val_int) )

>>So thats just the same as halving the timestep?

>OUPS, wrong copy-paste

>new_val = last_val + DYN_DT * ( val_int + 0.5f * last_val_int )

Ho Gosh,
i can't wait we finish our game ! I'm so tired i post dumb integrator
on RAS ;o)

So the real one is =

new_val = last_val + DYN_DT * 0.5f * ( val_int + last_val_int )

Sort of average damping/medium.

I need vacancies !!!

BTW, i'll be at L.A. from  July 11st to August 8th
I'll be at the Superbike round at Laguna Seca the 12 and 13 of July
... anyone from ras ?

Sebastien TIXIER - Game Developer
Dynamics and Car Physics
http://www.eden-studios.fr
GPLRank Normal:-44.24   Monster:-124.44

Tony Van Caute

My Sim: General Probs :)

by Tony Van Caute » Sun, 14 Apr 2002 01:05:05

I was just thinking you guys were just making this up, just to have a
laugh .. seems like you are serious ! In the first case, I would be able
to make a contribution, but ... being the serious guy I am ...


> On Fri, 12 Apr 2002 17:37:17 +0200, Sbastien Tixier

> >>> Euler : Integrate_M(new_val,last_val,val_int,last_val_int)
> >>> ((new_val)=(last_val) + (val_int) * DYN_DT)

> >>> Triangle : Integrate_M(new_val,last_val,val_int,last_val_int)
> >>> ((new_val)=(last_val) + DYN_DT*0.5f*(val_int) )

> >>So thats just the same as halving the timestep?

> >OUPS, wrong copy-paste

> >new_val = last_val + DYN_DT * ( val_int + 0.5f * last_val_int )
> Ho Gosh,
> i can't wait we finish our game ! I'm so tired i post dumb integrator
> on RAS ;o)

> So the real one is =

> new_val = last_val + DYN_DT * 0.5f * ( val_int + last_val_int )

> Sort of average damping/medium.

> I need vacancies !!!

> BTW, i'll be at L.A. from  July 11st to August 8th
> I'll be at the Superbike round at Laguna Seca the 12 and 13 of July
> ... anyone from ras ?

> Sebastien TIXIER - Game Developer
> Dynamics and Car Physics
> http://www.eden-studios.fr
> GPLRank Normal:-44.24   Monster:-124.44

--

rgds,
Tony

_____________________________________________________
Tony Van Cauter
Staff Consultant
Applications SysAdmin/DBA

Oracle Belgium
Airport Business Center
Vuurberg 80, 1831 Diegem
 +32-(0)2-719.12.11
_____________________________________________________
32-(0)2-719.57.95                       0497/59.66.44

  Tony.Van.Cauter.vcf
< 1K Download
Alex Smit

My Sim: General Probs :)

by Alex Smit » Sun, 14 Apr 2002 06:25:28



> On Fri, 12 Apr 2002 11:36:57 +0000 (UTC), "Alex Smith"

> And, Pacejka==road reaction! :)

> >Now that I do have road reaction, I was wondering how to calculate this
> >reaction torque.
> >At the moment is is simply (radius * FX) Right? (But see Q2)

> Yep, if Fx=1000, R=0.3, with T=F*r you get T=1000N*0.3m=300Nm.

> >Am I then using this force to accelerate the car?

> Yep, Pacejka's Fx.

Thanks, thats cleared that up once and for all!

I've looked at the document, very helpful :)
How does this sound for inertia at the wheel ( I think its in the right
sequence :)

inertia = engineInertia
    + [ square(onGear.ratio) * onGear.inertia ]
    + [ square(onGear.ratio * finaldrive.ratio) * finaldrive.inertia ]
    + [ square(onGear.ratio * finaldrive.ratio * wheel.radius) *
wheel.inertia ]

??

This does actually reduce the oscillation considerably, thanks! Although the
acceleration is quite slow,
although I am only trying to simulate typical road vehicles that have 100hp
or less.

(i've used inertia values similar to that in racer's default car.ini)

Ruud van Ga

My Sim: General Probs :)

by Ruud van Ga » Tue, 16 Apr 2002 21:55:27

On Fri, 12 Apr 2002 21:25:28 +0000 (UTC), "Alex Smith"




...
>> But be careful; there are squares involved in adding up
>> the intertiae of the drivetrain. There's an article on this on my
>> site: www.racer.nl -> Docs -> Technical docs -> Calculating a single
>> effective intertia for geared components.

>I've looked at the document, very helpful :)

You're welcome. :)

I think you need to take out the wheel.radius, since that isn't a
gearing ratio. So you add finaldrive.inertia to wheel.inertia and
multiply those with (gearRatio*finalDriveRatio)^2.

It also depends on which torque you use. On the engine side, the
engine torque is small (say 100Nm). On the tire side, it has increased
(gearRatio*finalDriveRatio*engineTorque).

Getting a 100m or 1000m track and do actual timing to see if it looks
realistic may help here (taking a 1.5 friction coefficient and
calculating what time it might take with a car with certain load).

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


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.