Putting fuel into an engine isn't just a matter of putting some in and blowing it up. Getting the right mixture allows the engine to make the most power it can, without using up too much fuel.
Open Loop
When OBD II computers were standardized in 1996, all production cars were programmed to have open and closed loop fuel trims. In an open loop setting, the amount of fuel injected is pre-programmed from the factory for the most likely conditions. Sometimes some intake sensor readings are taken into account, but most of the time the ECU runs blind (no sensor input) until certain conditions are met.
Closed Loop
Optimally, closed loop will occur when the oxygen sensors are warmed up to their operating temperature (usually 600°F) and the engine is warmed up. When the computer decides to enter closed loop depends on how the programmers/manufacturers designed the ECU; which conditions they think best determine when the engine and sensors are ready. The most common condition picked is the reading from the coolant temperature sensor.
Closed loop allows the ECU to use the information from all its sensors to determine the most likely optimal amount of fuel to inject for the next combustion.
Sensor | Higher Input | Lower Input | Reason |
Oxygen Sensor | More O2 | Less O2 | If oxygen is detected, it means not all of it was used in the combustion process. |
Mass Air Flow | More Air Flor | Less Air Flow | When more air flows in, more fuel must be added to compensate. |
Intake Air Temperature | Warmer Air | Cooler Air | Cooler air is more dense, and contains more oxygen molecules per cubic inch, which requires more fuel to compensate. |
Throttle Position | Opening | Closing | The position of the throttle control plate is checked for consistency with other sensors, such as the Mass Air Flow Sensor, to make sure there are no issues. |
Manifold Absolute Pressure | Higher Pressure | Lower Pressure | Air that is under pressure is similar to colder air, in that there is more oxygen per cubic inch. |
Oxygen Level Uncertainty & Perfect Combustion
There are limits to how much the ECU can know. The engine may take in an unusual oxygen-rich pocket of air, not add enough fuel for that particular instant, detect unused oxygen as it passes through the exhaust, and try to compensate for what won't be there the next instant. Another thing it depends on is the air passing by the oxygen sensors to be a perfect representation of all the current exhaust gasses. Sometimes the combustion doesn't finish off all the fuel, and more fuel is put in to compensate for oxygen that can't be burned due to design/ignition issues. The additional sensors added over the years have helped engine efficency quite a bit, but it is theoretically impossible to always achieve perfect combustion.