Car physics - slip ratio and torque.

Started by
35 comments, last by soku11 14 years, 7 months ago
Hi all! I've got a problem with implementing a simple car physics to my secret game :) It's regarded to calculating the slip ratio at low speeds. I searched the whole web, but i couldn't find a valid solution. I only found this article: Stable simulator It should help me, but there are no important images there (I bet it's because the article is 7 years old!) :-/ I also know, that something called SAE950311 has a solution to this problem too. But it's not a free article and I cannot find any summary of it or something. The second problem is with understanding the something from other article: Car physics for games I don't really know how to calculate the net torque. The autor shows some basic equations such as:

F_{long}=F_{traction}+F_{drag}+F_{rr}

Than he presents the equations for resitance forces:

F_{drag}=-C_{drag}*v*|v| 
F_{rr}=-C_{rr}*v

But I think, that the second one is incorrect, because rolling resitance should take into consideration the weight on the wheel? Am i right? And one last thing: How to calculate wheel rotational acceleration? In the last link there is an equation for this:

E=T_{net}/I

Where T_{net} is the net torque on the wheel and I is the inertia of the wheel. The thing is how to calculate the T_{net}? Should I use the resultant force of the car (F_{long}) and multiply it by wheel radius? And what is the wheel inertia? I guess that about 1kg*m^2 for 10kg wheel... I'm asking because this formula gives me strange results I think :/ Can anybody help me, please? BTW. Sorry for my english :)
Advertisement
Not the wheel weight exactly.

This depends if you have shocks, or if your car is one fixed block.

If it has shocks etc, then your wheels are seperate objects from your vehicle. If not, then you can assume its one big block, that has 4 points of contact to transfer power.
Each of these also has a rotary inertial force.

Anyways, as for your coefficeint of friction.
Firstly, at lower force from rest you ahve static friction. This is kind of linear, and will exceed your kinetic friction. When the thing starts moving, it changes to kinetic.

As for rolling resistance, its kind of like:

Resistive_Force = Normal_Load * Coefficient_Of_Rolling_Resistance / Radius_of_wheel

This occurs in the opposite direction of the movement. Kind of hard to explain without a diagram really.
Anyways, although yuo said simple, your normal load is going to change depending on the angle yoru vehicle is at, and how much contact is on the ground etc (which wheels are on what or no surface), and if you have shocks.
Your normal load if the car is at rest, and is just a big solid rectangle with evenly spaced wheels, will be 1/4 of the weight of the car including the tyre.
coef of RR is some tiny number
radius of wheel is because of how the wheel sticks.

Also note, it depends upon your wheel material and the surface material.

eg:
Tyres bend more than steel train wheels or belted wooden cart wheels, or ones on yor roller skates/blades or skate board.
Sand really moves around and sticks to the wheel, steel rails are pretty much solid, bitchumen (dark coloured roads) is kind of rubbery, cement (lets say cement roads) is less rubbery.

The more the wheel and the surface is rubbery, the more it bends and the more surface are touches. This increases coeef of friction (also for static/kinetic when sliding etc).
This is why you can go faster on cement, but why you slip like crazy on it.

Otherthings effect this - sand - although it moulds around the wheel - unless its like sticky/muddy and non slippery, you'll get mroe traction, but if its liquidy or dead dry and soft (like a beach) the sand itself moves.
Beer - the love catalystgood ol' homepage

Low speed situations in a car simulator are tricky to solve. There are different approaches you can take, most (if not all) of them will be hacks.
I use to switch to a simpler tyre model under a given low speed, the simpler model is based on slip velocities instead of slip ratio, thus, not having the road speed in the division avoids large changes in the slip ratio value... IIRC it was inspired by a game called TORCS.

It really depends on what kind of game you are playing.. if it is a race kind of game then you can hack something for very low speed and be happy with it.. if it is more of a off road slow manouvering thing then you might want to rethink your entire approach to tyre modeling.

The very simple formulas you posted look ok to me.. of course rolling resistence can be made funcion of wheel load, but then.. it is also function of slip angle, surface type, temperature, wear.. where you want to stop?
Again it depends of the kind of game you are trying to make.. if you are more into a sim-like thing then, again, you should rethink your entire approach to the matter and get some decent books about car dynamics... stuff found of the internet aren't good enough.

Finally.. for the wheel rotational inertia, the simplest thing is to treat it as a solid cylinder and have I=m*0.5*r^2.. so for a 10kg tyre with a 0.3m radius you get 0.45 kg/m inertia.

And yes.. T_net would be F_long * tyre radius.

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

@Dredge-Master:
I'm writing a simple 2D top down game. It won't be a real simulation, but I need to use simple physics in order to model some of the car's behaviours. With this implementation everything will results from physics :)

About the friction:
To calculate the longitudinal force of the car I should use this formula in my first post without any modifications, right? And rolling resistance equation should be changed to static friction at lower speeds ('mu' multiplied by the weight on the rear wheel - RWD car) and kinetic friction at higher (kinetic friction would be only the rolling resistance now?)? And how is speed related to this frictions?



@kunos:
I know, that the best solution is to switch the tyre (or tire?) model. The thing is that I cannot find any SIMPLE equations to model ie tyre as a spring.

And about the inertia stuff:
This kind of calculations (using these formulas) give really strange results. Let's assume that the car isn't driving:
F_{drive}=12000NF_{N}=15000NF_{friction}=0.5*7500/0.34~11000NF_{drag}=0NSR=0.08 (peak ratio)F_{traction}=1.3 (due to good SR) * 12000N=15600NF_{long}=15600N-11000N-0N=4600NT_{net}=4600N*0.34m=1564NmI=0.45kg*m^2E=1564/0.45=3475 [1/s^2]


This gives us the wheel angular velocity (with some random delta time):
w+=E*dtw+=3475 [1/s^2]*0.05 s~173 1/s


Isn't it too much? Such an angular velocity will give us extreme engine rotation number... Am I doing something wrong?

Thanks for the responses. I hope you'll be able to help me more. I'll appreciate this :)

[Edited by - soku11 on July 31, 2009 4:00:40 PM]
Quote:Original post by soku11
Isn't it too much? Such an angular velocity will give us extreme engine rotation number... Am I doing something wrong?


I don't know anything about car physics, and I didn't follow all of your equations, but I couldn't see where you take the mass of the car into account. Assuming the wheel is attached to the car, it surely would matter, no?
Yeah you're right. I've managed to solve this problem. However I've got another one. It's related with engine rpm.

I calculate it with this formula:
engineRpm=wheelAngularVelocity*differentialRatio*gearRatio*60


Starting with let's say 3000 rpm we get some force on the wheel minus the friction force and drag force. And now we can calculate the wheel rotation rate. It'll of course be less than the rate of rotation without any friction forces.
So we have lower wheel rpm which gives lower engine rpm. When we update the car physics next time, we get less engine rpm => less force and so on...

How can I correct this?
Why do you get less rpm after integrating the physics? Is the car "coasting?"

The first step is taking the current engine speed and computing the driveline inertia and torque. If the clutch is in, there is zero of either. Inertia is mostly constant (multiplied by gear ratio) and the torque is based on the power curve of the engine, the throttle, and the gear ratio.

Use these drive line parameters (inertia and torque) when integrating the wheel angular velocity (also considering the friction force and wheel inertia). After you have a new wheel velocity, you can compute the new engine RPM per your equation.

Engines have a stall RPM. Anything below this RPM and the engine cannot run. So if your car rolls to a stop with the clutch engaged, the engine will stall, and you will have zero engine torque. Automatic transmisions have a torque converter to allow the engine to continue running at some minimum RPM even after the driveline has completely stopped or is even running backwards. You'll need to implement this logic in your engine simulator, or use a faux power curve which includes a reasonable amount of torque at zero RPM. But that isn't going to work too well for your sound system. Unless you're making an electric vehicle..

Hope that helped some.
I don't know what "coasting" mean :/

I get less rpm, because of the friction. The friction and drag force reduce the wheel resultant torque:

T_{net}=T_{drive}-T_{friction}-T_{drag}-T_{brake}


Let's assume that we got only the first two torques. T_{drive} is for example 3000Nm and T_{friction} is 2040Nm (friction force is mu (0.8) times the half of the car weight - 7500). This gives us the T_{net} of 960Nm. The inertia is for instance 4. We got rotational acceleration of 240. With 0.01 time delta we got wheel angular velocity of 2.4 1/s. And now I calculate the engine rpm:
engineRpm=2.4*8*60=1152 1/min


Where's the problem?
I'm not sure. You jumped straight into an example before i even understand your scenario.

Where are you getting friction force? It sounds like youre only computing the normal force and multiplying it by the friction coefficient.

First off we need to know exactly what kind of friction you're talking about. There are 3. Rolling resistance of the tire patch, viscous friction of the driveline, and tire patch friction of the road. The first two are simply functions of the normal force and can be considered resistance on the cars movment. They're very simple so we'll just ignore them right now (think of them as wind resistance).

The more important friction is the tire patch friction which is i think what you're trying to compute but not doing so properly.

If you're familiar with coulomb friction, in the the static state, the friction contact can provide a maximum friction force equal to the normal force times the coefficient. Can, but may also provide zero force.

Consider a car traveling at 100mph. If there was no resistance, the car would continue along at 100mph with no driveline torque required. You could push the clutch in and "coast" forever at the same speed.

This effect will happen regardless of the weight of the vehicle or the maximum friction force of the tire patch because the wheels are traveling at exactly 100mph, so there is no force asked of the friction patch. Friction force equals zero and will not slow the vehicle down.

Is it only when you apply the brakes or apply a torque that the friction force will be tested. A force is applied to the contact patch and a friction response force is applied back into the vehicle creating an acceleration. If this static friction limit is exceeded then the tire will slide and a new friction model will take over, kinetic.

This may be a good time to plug this: http://www.gamedev.net/reference/programming/features/2dcarphys/
It's not the most mathematically advanced simulation but it illustrates my points. In a very lazy approach, the friction force is computed based on the relative velocity at the tire patch. In other words it's in a constant state of kinetic friction. Not very accurate, but very simple and playable.

To restate it one more time, to give you a mental image. Imagine the car is at rest, wheels stopped, 0mph. The driver opens the throttle and a torque is applied to the wheels. The wheels spin and now there is a non zero relative velocity between the tire and the ground. Scale this by some imaginary friction coefficient and apply that as a force to the chassis. Now the vehicle is moving and the wheels are turning. Their total tire patch velocity (vehicle velocity + tire angular velocity * radius) just so happens to equal zero so now the relative velocity between the tire patch and road is zero again. Repeat. Multiply this velocity by the friction coefficient which results in a zero sized force to be added to the vehicle. The vehicle speeds is now at equilibrium until a new torque is applied to the wheels or some other outside force (wind resistance, turning, IED).

You can also think of the wheels like your feet. The goal of walking or running is to maintain your bodies velocity by moving your feet in just such a way that the soles of your feet are actually not moving at all relative to the ground (bodyV + footVRelativeToBody == 0). This is the tire patch.

[Edited by - bzroom on August 3, 2009 1:56:53 PM]
You're probably right about the friction force :-/

I just assumed that when the wheel isn't rolling I must obtain a force with a value of at least coefficient of surface friction times the load on the tire. When I use greater force there is only a kinematic friction which is constant regardless of the car's velocity. I compute it with the same formula, but different (lower) coefficient.

Unfortunatelly I haven't heard of the friction type you're talking about :/ The situation which you presented can be true, because the coefficient of friction for such surface is 0. The friction of the contact path is transferring force for the car. When I use 100N of force by the engine, the wheel will push the surface back, and in reaction the surface will use the force which moves the car forward.

But the problem is, that no matter what friction is acting, the wheel rpms would be lower which gives the lower engine rpm. Only when there's no friction the wheel rpm will give me the same engine rpm as at the start.

I must misunderstood something in the article :/

This topic is closed to new replies.

Advertisement