Probably O/T but this is an interesting old post from another forum member about how the ECU works and it's complexities.........
(just thought it was interesting more than necessarily relevant)
_________________________________________________________
Unfortunately it's a bit more complicated than that! (last time i checked Me7.1.1 has approx 14,700 calibrateable parameters, including something like 600 2 and 3 D "maps". The strategy
guide is 6000 pages long!
Basically the ecu takes throttle pedal position as a driver torque demand, looks at current engine torque, calculates the new torque, splits off the torque delta into igntion / airside / fuelling torque demands, then tries to get to this condition.
It takes a lambda demand value (a product of a large number of maps including steady state fuelling, component protection lambda, the 2 main ones) Then measures the current plenum conditions from it's temp / MAF / MAP sensors, then corrects for manifold filling effects, again MAP / TPS / EGT / BARO / TEMPS etc, comes up with a base fuel mass. Then if within the "closed loop region" as defined by a further sub strategy, it adds the upstream lambda PID controller correction, and the rear sensor bias fueling offset, then adds the current filtered value of the fuel adaption RAM. This final fuel mass is then corrected for transient effects based on MAP and TPS, then a final fuel mass is turned into a fuel injection pulse width with further correction from fuel temp / pressure. Finally it looks up the injection angle, calculates the start and end of injection crank angle, then at the right moment actually injects the fuel. The resultant fuelling and air flow conditions are then reworked back into a flywheel torque figure and this is compared to the driver demand.
And i havent even mentioned
OBD, Purge, Ignition, EGAS, CCM, traction control, transmision torque control, boost control and about 30 other important things, believe me, modern EMS systems are seriously trick bit of kit.
Always makes me laugh when i hear F1 comentators going on about how F1 technology improves road cars when it's really the other way around!
______________________________________________________