Automotive fuel injection can be a though subject to wrap ones head around. Exactly what does a fuel injected Engine Control Unit (ECU) calculate? What kind of input has it been presented with that it can output a stable running engine in so many varying load and climate conditions? We are going to define the ECU, inputs, outputs, and really go in depth into a mathematical formula to get an idea of what the ECU calculates for fuel delivery. But first let’s define the most common components of an internal combustion engine so we have a better understanding of what events an ECU controls. The Figure below details the intake and exhaust, cams, ports, and valves; cylinder head; block; spark plug; combustion chamber; piston, rod; and crank. It is important to note that for every 360 degree rotation of the cams the crank will complete two rotations or 720 crank degrees.

Now let’s look at a single 4 stroke engine cycle to understand what the ECU must calculate. The 4 strokes of an engine cycle are intake, compression, power, and exhaust. During the intake stroke the cam lobe forces the intake valve open against spring pressure, the piston moving downward creates a vacuum in the intake port pulling the intake charge (mixture of fuel and air) filling the cylinder then closing the valve to contain the mixture. In the compression stroke the valves are closed while the piston moves back up the cylinder compressing the contained mixture in the combustion chamber. Now the power stroke begins. The spark plug ignites the compressed mixture a few crank degrees before the piston reaches top dead center (TDC) allowing time for combustion in the cylinder to build maximum downward force on the piston a few degrees after TDC and force the piston down 180 degrees of the crank rotation. Now in the exhaust stroke the exhaust cam lobe forces the exhaust valve open against spring pressure to expel the burned mixture out of the exhaust port as the piston moves back up the cylinder. The exhaust valve closes and the engine cycle is complete and ready to be repeated. An engine cycles four stroke events are illustrated below.

Notice there are four 180 deg strokes equaling two full crank rotations to complete an engine cycle. In this engine cycle the ECU must calculate the correct air to fuel ratio in order to fill the cylinder with a safe and powerful mixture that burns evenly through the power stroke. A lean mixture (not enough fuel mixed with air) may burn hot and erratic in the cylinder creating hot spots on combustion chamber surfaces, possibly melting chamber components or pre-igniting the next combustion event. A rich mixture (to much fuel) may not fully burn within the 180 deg window of the power stroke degrading power potential and sending unused fuel out of combustion chamber.
So how does the ECU determine proper fuel control? It utilizes sensors like crank and TDC position, throttle position, ambient air temperature, engine water temperature, exhaust oxygen sensor, etc. and has been preprogrammed with fuel and ignition tables to lookup and output a fuel injector on time and a timed spark event for each engine cycle. Below we see a random RPM snapshot of one cycle for a four stroke engine. The injector on time and spark event will vary through out the engines rev range.

Fuel injection
The ECU injects fuel into an intake port via the fuel Injector. A fuel pump sends fuel from the gas tank to a pressure regulator which maintains a constant pressure usually 43.5 PSI above its referenced intake manifold pressure and returning any excess fuel to the tank. So what ever pressure the ECU and fuel pressure regulator see in the manifold the pressure regulator is holding fuel pressure 43.5 PSI above this value. In between the pump and pressure regulator is a fuel rail where the fuel injector is holding back pressurized fuel till the ECU opens the injector for a calculated time period allowing fuel to flow into the intake port. Injectors are flow rated in either pounds per hour (Lbs / hr) or cubic centimeters per minute (CC / min) at a known pressure. If we know the flow rate we can calculate an injector open time for desired amount of fuel.
Let’s look at some calculations in order to better understand how an ECU determines the Injector on time or also known as an injector pulse width. We will look at a real world example 2 liter 4 cylinder engine running at 5000 revolutions per minute (RPM).
Base Air flow, Air Fuel, and Pulse Width.
We need to figure out how much air the engine can pump at this rpm in cubic feet per minute.
Base CFM (cubic feet per minute) for 2 liters.
A 2 liter engine converted to cubic inch displacement is 122 cubic inches displacement.
122 cid / 1728 cubic inches in a cubic foot = .0706 cubic feet of engine displacement.
5000 rpm / 2 crank revolutions per cycle = 2500 cycles per min.
2500 cycles x .0706 cubic feet = 176.5 CFM.
We could assume 100% of the 176.5 CFM could be filling the cylinders but in the real world valve and port size can cause a complete cylinder filling loss. We are going to assume for this example a 10% filling loss and that at this rpm the engine is about 90% efficient or has a 90% volumetric efficiency (VE).
176.5 CFM x .90 or 90% VE = 158.85 CFM.
Calculated Air flow.
One cubic foot of air weighs .076 lbs at standard atmospheric pressure and temperature.
158.85 CFM x .076 conversion to lbs/min at sea level = 12.07 lbs/min.
12.07 lbs/min / 4 cyl = 3.02 lbs/min per each cyl.
A/F Ratio.
Target Ratio 13.5 to 1.
Or 13.5 parts of air to every 1 part fuel.
So we divide the known air by the desired ratio to get the single part fuel quantity.
3.02 lbs/min / 13.5 = .2237 lbs/min of fuel targeted.
Injector.
The ECU is working with a known injector size. We will assume our known injector size per cylinder is 30 lbs per hr at 43.5 PSI fuel pressure.
30 lbs/hr injector.
How much fuel can this injector flow in 60 seconds.
30 lbs / 60 sec = 0.5 lbs/min of fuel capable.
Engine cycle injector hold open time.
5000 rpm / 2 crank revolutions per cycle = 2500 cycles per min.
2500 cycles / 60 sec = 41.6 cycles per sec.
1 sec / 41.6 cycles = .024 seconds per each cycle.
.024 sec x 1000 = 24 milliseconds in an engine cycle that the injector may be opened.
Pulse width.
.2237 lbs/min targeted fuel / 0.5 lbs/min capable fuel = .4474 duty cycle.
.4474 x 100 = 44.74% duty cycle.
Or the injector is open 44.74% of the time it takes to complete a single engine cycle at 5000 RPM.
24ms in an engine cycle x .4474 = 10.74 ms pulse width.
Or the injector is open for 10.74 milliseconds out of the 24 ms available for a single engine cycle at 5000 RPM.