## Re: [Algorithms] Car engine behaviour

 Re: [Algorithms] Car engine behaviour From: - 2006-04-29 08:35:17 ```> > What I've > done so is translate engine revs into velocity of the tire tread which > by means of friction induces movement, and viceversa, friction on the > tires affects the wheel velocity which affects engine revs. Here I'm > thinking that so far this is quite good but I'm missing the bit that > determines how much feedback should be given by the wheel velocity, I > have a scalar for this I can set between 0, giving the engine infinite > power, and 1, giving the engine no power. I'm hoping that I can now > procede by adjusting this value. > A simple model suggestion follows: 1) Your compute your engine torque based on: -current rpm -throttle -turbo/boost pressure -(this is sort of simple) 2) calculate your wheel (rotation) speed through the differential and your gearbox so that get the rotational speed of you clutch (gearbox side) 3) Now you have rpm:s for both sides of the clutch, calculate a "correcting" torque based on those and of course based on the clutch pedal. Apply this torque (opposite directions) to both engine and through the gearbox to the wheels. 4) For engine substract it from the engine output torque, and divide by engine inertia to get engine acceleration (integrate for next RPM) 5) For wheels combine the torque with: -wheel rotation -wheel movement -friction -brakes -(this can get difficult...) to get the (rotational) acceleration of the wheels. (integrate to get the next wheel rotation) You also get the force between ground and the wheels, and this will actually move your car. Eero ```