🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

[Car Physics] - Front wheels slipRatio calculation

Started by
11 comments, last by Evangelia 7 years, 3 months ago
Hi everyone !

In my car simulation i have some problems with the calculation of the front wheels slip Ratio.
My car is a RWD.

Basically, my calculation are the same as the rear wheels :
I use (wheel local Vel Z / wheelAngularVelocity).
This work very nice, and the friction generated by the slip, became the traction force that make the wheels turn.

The problem happen when i start to turn the front wheels.
The difference beetween the wheelAngularVelocity and the ground velocity became stronger, and the result is the front wheels longitudinal Force became very high !

This act as a kind of break or sometimes it reduce the steering ability of my car drastically.

For the moment the hack i found was to apply the front wheels longitudinal Force only when i brake...
This hack work quite well but unfortunately it create some other issues in some different situations..


I have a question :
For a RWD car, when i am not braking the front wheels should be rolling all the time right ? So the returned longitudinal force from this wheel should be 0 all the time ?


I know it is a very specific question but i hope i can get some input about this.
Thank you in advance for any help.

Best Regards.
Advertisement
Front wheels are not different from rear, the only difference is that they don't have the drivetrain/engine attached, but the calculations are the same (actually they are simpler because their rotation is indipendent from other rotating parts):

1) calculate slpis
2) generate forces
3) translate FX into a torque that act on the wheel

For undriven wheels, the FX "feedback force" act in the wheel with its rotational inertia. A free rotating wheel will then auto accelerate itself to stay a ~0 slip ratio or a slighly negative slip if you are calculating rolling resistance as well.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

Hi Kunos !
Alright, i got it, i will apply everything normally.

But i am sure i wil have this strange problem again...
Anyway, i will try to debug to see what kind of output i have. This may help to solve my problem.

One question i have is the wheel velocity of the front wheels should be calculated in the direction their pointing or the direction their heading ?

Right now, in my code, i calculate the wheel velocity in the direction their pointing. (Local Z vel).
It depends what you need this "wheelVelocity" for. If you need it to calculate the slip ratio then yes, the local Z velocity component is the right value.
If for wheelVelocity you mean wheel Angular velocity then now, you do not calculate that, that is an output of your calculations.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

It make sens, i will try that and give some more feedback.
As always, thank you so much kunos.
Hum, after some investigation i see what make my car to not turn completely and to slow down when turn.
Basically as i said before, i just calculate the front wheels slip ratio normally, and get a resulting force.

But when i turn the wheels very fast, for a short instant, i got a very high slip ratio value at the front.
This makes my car slow down, like if i was locking the front wheels...

Lets take a stupid example :
Let say that you can turn the front wheels to 90 instantly.

you go 50 kmh straight, front wheels are rolling and then you turn the wheels 90 degrees. The wheels are not rolling anymore, and the front slip ratio is very very high !
So, in this case, the longitudinal force is also slowing down my car.

This is exactly what happen in my simulation but of course it is less pronounced because i can't turn the front wheels instantly..

Again, i am sorry to ask such a specific questions, but i hope car physics guru can help me on this one.
Best regards.
Forget about the 90 degrees example because it doesn't make sense.

Unless you are using HUGE time deltas (which you shouldn't) it is very unlikely to see an instant change in slip angle of more than 4 degrees. Such a change will produce a tiny slip ratio (around 0.002 for speeds around 150 kmh).
Now unless you are using huge wheel angular inertia the wheel itself should immediately realign to zero slip ratio. Hard to understand what your problem is without seeing some code. You might have problems in the slip ratio calculation or in the way you generate forces and torques. Remember:

Positive slip ratio generate a force at the ground wanting to accelerate the car in the direction of the tyre. The very same force also generates a torque that wants to slow down the tyre.
Negative slip ratio is the opposite, it'll generate a force pointing backward and a torque wanting to accelerate the angular speed of the tyre.
So, a free rotating tyre is "self balancing", it will very quickly align its speed to the ground speed.

If the behaviour above is confirmed at 0 slip angle, but breaks as soon some lateral slip appears, then your bug is in the slip ratio calculations.

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

Hum, i see, i will investigate some more.
Anyway, i like how the car is moving right now, it does not feel strange at all. I maybe just need to see if the way i calculate the slip ratio is correct.

Thank you again for your input kunos !
Hum, i think the way i calculate sleep ratio is different from what i saw on the net right now.

I just found these 2 formulas :

SR = (Rotational Velocity / Translational Velocity) -1

or

SR% = ( (Vehicle Speed - Wheel Speed) / Vehicle Speed) * 100

Both give the same results.


But i find something strange on this way of calculating the slip.
(4/2)-1= 1;
(2/4)-1=-0.5;

Is this normal that the values are different ?

In my way of calculating the slip, whatever the order of the calculation, the slip ratio output remain the same.
But, i am probably wrong...

That may explain why i spin so fast when i pull the handbrake at high speed ^^.....

SR = (Rotational Velocity / Translational Velocity) -1

But i find something strange on this way of calculating the slip.
(4/2)-1= 1;
(2/4)-1=-0.5;

Is this normal that the values are different ?

That may explain why i spin so fast when i pull the handbrake at high speed ^^.....


yes that is correct. Slip Ratio as the name says is a ratio, not an absolute velocity. It is expressing the amount of slip in relation to the current speed of the tyre. Positive values can range from 0 (free rolling, no slippage) to infinite. Negative values range from 0 to -1 (locked tyre, full slip).

It is correct to spin VERY fast after using the handbrake.. :D

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

This topic is closed to new replies.

Advertisement