The electric motor has it's own power.lut where you configure the torque curve.
Let's keep it easy:
The petrol engine has a torque curve, the throttle controls how much of that torque is applied. (to keep it easy we take a NA engine, with turbo it gets more complicated again) Let's say we have a 100% linear throttle.lut, this means you apply 30% throttle then you have 30% of the torque applied for the rpm you are at currently.
You can modify this in by a non-linear throttle.lut, i.e. 20% on your throttle pedal of you wheel means 40% throttle of the engine in-game (this is usually done in motorsports to better control top end of the power or in newer road cars with their Eco/Normal/Sport modes).
OK, now the more complex ERS/KERS systems, these have more complex modifiers:
- speed: depending on the speed the car is at you can create a LUT
- gear: depending on the gear you can have a LUT
- throttle: depending on the throttle you can have a LUT
The applied electric power is calculated like this:
P = torque value * throttle factor * speed factor * gear factor
To show examples:
gear LUT:
Code:
0|0
1|0.5
2|1
3|1
4|0.8
5|0.5
6|0
1st gear 50%, 2nd + 3rd gear 100%, 4th gear 80%, 5th gear 50%, 6th gear 0%
(i.e. limit first gear for traction, high power for low/mid speeds acceleration, lower power on high gears to not waste too much energy)
each gear has it's set value
speed LUT:
Code:
0|0
50|0
80|1
150|1
180|0.5
200|0
0-50km/h: 0%, 50-80: linear scaling from 0% at 50km/h to 100% at 80km/h, 80-150km/h: steady 100%, 150-180km/h: linear scaling from 100% to 50%, 180-200km/h: linear scaling from 50% to 0%
gas (throttle) LUT:
Code:
0|0
0.4|0.0
0.5|0.1
0.7|0.5
0.9|0.9
1|1.0
0% to 40% throttle input: throttle factor=0, 40%-50% throttle input: throttle factor scaling from 0 to 10%, etc. (LUT to only apply electric power on high throttle input)
2 examples:
a) 120km/h, 3rd gear, 100% throttle:
P= torque value (at coherent rpm) * 1 (gear) * 1 (speed) * 1 (throttle)
So the torque from the torque graph is applied to 100%.
b) 65km/h, 2nd gear, 60% throttle:
P= torque value (at coherent rpm) * 1 (gear) * 0.5 (speed) * 0.3 (throttle) = torque * 0.15
So only 15% of the torque of the graph is applied.
This is only true for cars whose electric engine also uses the cars gearbox, for hub-motor or central motor with only 1 fixed gear you don't have the gear factor. (well, to be exact it's always 1 for driving forward at least)
Cars with manual override of course by-pass the scaling factors and you get max. torque as it's specified in the torque curve.