Central to an EFI system is a computer called the Engine Control Unit (ECU), which monitors engine operating parameters via various sensors. The ECU interprets these parameters in order to calculate the appropriate amount of fuel to be injected, among other tasks, and controls engine operation by manipulating fuel and/or air flow as well as other variables. The optimum amount of injected fuel depends on conditions such as engine and ambient temperatures, engine speed and workload, and exhaust gas composition.
The electronic fuel injector is normally closed, and opens to inject pressurized fuel as long as electricity is applied to the injector's solenoid coil. The duration of this operation, called the pulse width, is proportional to the amount of fuel desired. The electric pulse may be applied in closely-controlled sequence with the valve events on each individual cylinder (in a sequential fuel injection system), or in groups of less than the total number of injectors (in a batch fire system).
Since the nature of fuel injection dispenses fuel in discrete amounts, and since the nature of the 4-stroke-cycle engine has discrete induction (air-intake) events, the ECU calculates fuel in discrete amounts. In a sequential system, the injected fuel mass is tailored for each individual induction event. Every induction event, of every cylinder, of the entire engine, is a separate fuel mass calculation, and each injector receives a unique pulse width based on that cylinder's fuel requirements.
It is necessary to know the mass of air the engine "breathes" during each induction event. This is proportional to the intake manifold's air pressure/temperature, which is proportional to throttle position. The amount of air inducted in each intake event is known as "air-charge", and this can be determined using several methods. (See MAF sensor, and MAP sensor.)
The three elemental ingredients for combustion are fuel, air and ignition. However, complete combustion can only occur if the air and fuel is present in the exact stoichiometric ratio, which allows all the carbon and hydrogen from the fuel to combine with all the oxygen in the air, with no undesirable polluting leftovers. Oxygen sensors monitor the amount of oxygen in the exhaust, and the ECU uses this information to adjust the air-to-fuel ratio in real-time.
To achieve stoichiometry, the air mass flow into the engine is measured and multiplied by the stoichiometric air/fuel ratio 14.64:1 (by weight) for gasoline. The required fuel mass that must be injected into the engine is then translated to the required pulse width for the fuel injector. The stoichiometric ratio changes as a function of the fuel; diesel, gasoline, ethanol, methanol, propane, methane (natural gas), or hydrogen.
Deviations from stoichiometry are required during non-standard operating conditions such as heavy load, or cold operation, in which case, the mixture ratio can range from 10:1 to 18:1 (for gasoline). In early fuel injection systems this was accomplished with a thermotime switch.
Pulse width is inversely related to pressure difference across the injector inlet and outlet. For example, if the fuel line pressure increases (injector inlet), or the manifold pressure decreases (injector outlet), a smaller pulse width will admit the same fuel. Fuel injectors are available in various sizes and spray characteristics as well. Compensation for these and many other factors are programmed into the ECU's software.