Skip to main content
GameDev.net gamedev.net
🔒 Locked

Car drive train

Started by d000hg May 12, 2004 at 7:31 AM 5 replies 1.2k views
Original Post
d000hg
d000hg
Can someone point me to a simple explanation of how the gearing, engine power/torque and wheels interact together? Like how to get a resultant force/torque at the tyre/ground interface based on car speed, gear and gas-pedal data etc. Many thanks.
fractoid
fractoid
An answer to your question, specifically regarding the Bugatti Veyron. This baby has a top speed of over 400kph. I want one.
szinkopa
szinkopa
For the engine you should have a torque curve. This can be approximated with a third degree polynom, or with descrete points, and interpolation.
The gas pedal value goes 0 to 1. First, you can just multiply the actual gas value with the actual torque from the curve to get the real torque of the engine.
The engine has a little inertia, about 0,1 (SI), this can be experimented to make it realistic.
The engine has also friction as everything It can be linear to rpm.

So you have a torque now, which comes from the engine.
Clutch is tricky a bit, I haven''t impemented it yet, so I ignore it now.

For the gearbox you define ratioes, positive for forward, negative for reverse, and 0 for neutral. The torque coming out of the gearbox is EngineTorque*GearRatio. You can also apply some friction here, for example 0.92 efficiency.

Then comes the differential. It has a ratio too. It''s about 3-5. You must multiply the incoming torque with this value.
The simplest differential is the open differential. It just sends the half of the torque to both wheel on the shaft. If you have a 4WD car, then you need 3 differentials. The middle can be modified to send more power to the rear shaft, for example 60%.
Better differentials takes in consideration the angular velocity of the two outgoing shaft, and send torque based on this: the slower the shaft is, the more torque it will get. I don''t know any formula for this, you can try anything that satisfies this requirement.

So now you have the torque at each driven wheel. From the tyre model you get a longitudinal force, which act on the wheel, as a reaction torque. And here can be applied brake torque, rolling resistance torque, handbrake torque. From the sum of the torques acting on a wheel you can calculate the new angular velocity of it with integration.

Then you go back to the engine through the drivetrain, but now with angular velocity, not torque. The differential''s output is now the average of the input velocities. The angular velocities must be multiplied with the final, and the current gear ratio. Then you get the new engine angular velocity. I have ignored clutch again.

This is a simple model for drivetrain, but with proper clutch it''s quite good for race game.

Maybe you will have some problems with tyre first, I also did.

Hope this helps.

If somebody thinks I am somewhere wrong please note.
d000hg
d000hg
How to apply torque from engine to tyres I understand, but going the other way, if the wheels turn at a speed that fixes the engine rpm (with no clutch). Should I treat the engine as a flywheel? Otherwise when the wheels slow down (due to braking) the engine won''t slow too will it? For a simple clutch can I just model it as clutch in range [0,1], torque output = engine torque curve*clutch, and torque applying to slow engine = torque on tyres*clutch?
szinkopa
szinkopa
I wrote the case when you don''t have clutch, so the engine''s and the tyres'' ang. velocity are always in sync.
Yes the engine must be a flywheel, not to achieve 8000 rpm at once, when you push the gas. I think you can imagine how it works with a real car. And in real each part in the driveline has some inertia, but they can be ignored in a simpler model. But the wheel and the engine, the ends of the driveline have to have inertia.
When braking, with this model the engine speed will adjust to the wheel''s speed.
In reality the engine stalls below say 800 rpm. That''s why you need clutch at very low speed.
The clutch pedal can be in range [0;1]. With slipping cluth there is a friction torque, which acts both direction: for example when starting with slippng clutch, the friction torque is what accelerates the car, and at the same time it deccelerates the engine.
I have found docs about this all:
http://www.fs.isy.liu.se/Publications/MSc/01_EX_3114_PN.pdf

Your last sentence''s end is wrong. Usually from the tyres to the engine we use angular velocity. So I don''t suggest you use tyre''s torque to slow the engine. The tyre''s torque can be applied to the wheel. And the wheel''s ang. velocity can be forwarded toward the engine.
But study this doc., especially its cluth-section and you will probably understand this all.
d000hg
d000hg
Thanks. I see that using angular vel is better - apply the torque from the engine''s initial rpm through to the wheels then force the engine''s rpm at the end of the update to match the wheel''s spin (taking gearing ratios etc into account). And the clutch is just needed to get the car started moving - I can''t see any way you''d ever get moving with no clutch!

Shall have a go and see what happens...
szinkopa
szinkopa
I cheated :D
This is neccesary if your model is not perfect, and it will never be perfect...

But I want to improve my drivetrain, according to this doc., so it will able to simulate the braking effect of the engine, and car speed change when changing gear.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.