Note: The EFI332 project is defunct, and these pages are no longer being actively maintained.
EFI332 Fuel Injection Equations
Note: Many of the units used may appear non-conventional, but were chosen in order to simplify the software implementation.
The following describes the fuel injection algorithm employed in my EFI332 software:
where: PW = Fuel Injector Pulsewidth in microseconds. InjTurnOn = Time (in microseconds) for injector to open fully when 12 volts is applied. Typical value is 1.5 ms. User-defined. BattComp = Compensation (+ or - microseconds) to turn-on time for fact that battery voltage may not be exactly 12 volts. 0.67 = Factor to account for the fact that the average fuel flow rate is only ~1/3 the max rate during turn-on time. The 1/3 factor comes from F=Ma applied to a solenoid, and assuming flow is proportional to the opening of the solenoid:
AccPw = Temporary extension of pulsewidth (in microseconds) during acceleration. User-defined. May be left as 0.0, as there is also an acceleration enrichment term in ReqdFuel, which is a function of throttle rate. InjFlowRate (IFR) = Injector flow rate at operating pressure (lbs/microsecond). User input. ReqdFuel = Total fuel required (pounds) for a particular cylinder firing:
GammaEnrich = Description below. PmFuel = a +/- integer incremented/decremented each time the user presses the +/- fuel adjustment buttons (located on the dash). Each increment represents a 1 percent increase/decrease in the fuel/air ratio. Always zeroed out at startup - only used as a temporary tuning aid, with the percent change entered into a permanant user tuning table at some later time. MassAirFa = Mass air (pounds per cylinder firing) for desired fuel/air ratio, also equal to the mass fuel required (exclusive of special enrichments):
with air density (in pounds per cubic feet) given by:
with BaroPress = barometric pressure in KPa * 10 (from sensor), 31 = 3.1 Kpa correction for vapor pressure, assuming a humidity of 75 percent at 85 degrees F temperature. This is arbitrary since we do not sense humidity, but should be better than assuming 0 percent relative humidity in most cases. MatTemp is the intake manifold air temperature in degrees F * 10 (from sensor). Mass Air Coefficient, which is a subset of the MassAirFa equation, is given by:
which is composed of (CID/1728) term which is the cubic inch displacement of the engine, converted into cubic feet, the (1/NCYL) which is the number of cylinders, the (1/14.7), which is the factor which normalizes air/fuel to stoichiometric, and the (1/MAP(WOT)) which is the manifold absolute pressure at wide-open-throttle (in KPa * 10) generally about 100 KPa. MAP = manifold absolute pressure (KPa * 10) from sensor for current cylinder firing. Another sub-term of the MassAirFa equation, is the VeafCorr(MAP, RPM), which is the volumetric efficiency over the normalized air/fuel ratio:
Ideally, all values in this table should be 1.0 (which corresponds to a 100% volumetric efficiency and stochiometric air/fuel). In practice, it has been assumed that:
It should also be assumed that the desired air/fuel at large MAP values (full power run) is 11 to 12 to 1, and at low MAP values (cruising speeds) is 14 to 15 to 1. With this assumption, and with dyno data for Ve(map,RPM), one can construct a rough order of magnitude VeafCorr table. Lacking dyno data, it can be assumed VE=0.75 to 0.85 at WOT (wide open throttle) for passenger cars, and 0.90 to 1.1 for hi-performance cars. At low RPM, the VE should fall off like the torque, reaching ~0.0 at 0 RPM. CylFuel[CylNumber] = individual cylinder tuning factors in percent. User-entered array of values. Generally leave all values at 100 percent, but can be used to richen cylinders which are prone to high exhaust gas temperatures. For example, a value of 102 would make that particular cylinder 2 percent richer. Can also be used to adjust for variances in fuel injector flow rates.
The formula for enrichments is:
which are the starting, warmup, and acceleration enrichments in units of gamma * 100, where (GammaEnrich/100 = 14.7/enrichment_A/F). For example, a value of 2.00 for (GammaEnrich/100) corresponds to an air/fuel ratio of 7.35. StartEnrich = Cranking enrichment. This is a function of the temperature at startup, according to the user's input coefficients, and lasts for a user-defined amount of time, after which the values are linearly "tailed-off" for a user-input tail-off time.
AfterStartEnrich = After startup enrichment. This is similar to StartEnrich in that it is a function of the temperature at startup, according to user-input coefficients, but it is meant to last longer, with the duration being a function of temperature.
WarmupEnrich = Warmup enrichment. This is a long-term warmup enrichment (can last for several minutes) which decreases as the coolant temperature rises, based on a user-entered table of values as a function of coolant temperature.
AccEnrich = Acceleration enrichment. This is calculated in three phases whenever the rates-of-change of the TPS (throttle position sensor) or MAP sensor exceeds a user-defined threshold(s). First, a coolant temperature-dependent acceleration enrichment (AccTemp) is calculated, if the car is still cold, from a user-defined table, as above. The an enrichment (AccRate) is calculated as a function of TPS and MAP time-derivatives using user-defined weighting factors. Two additional acceleration enrichments are also added in (in addition to a pulse-width extension, AccPw, ad defined above). These are AccelBurst, a user-defined burst enrichment for a user-specified time (TBurst), and a fixed acceleration enrichment (AccO). All of the enrichments (except AccBurst) are continued until acceleration ceases, as indicated by TPS and MAP less than a user-defined threshold.
Fuel Injection Timing:
This is the duration of the pulsewidth in crank degrees. At present time, there is only one injection per cylinder every 720 degrees. The goal of the timing is to (1) inject fuel as soon as possible after intake opens, (2) avoid injecting during intake/exhaust overlap period, (3) above all, avoid injecting fuel on closeing intake valve.
The preceeding leads to the following logic:
1. If PwDeg is short, start injection at exhaust close.
2. If PwDeg is long, end the injection about X degrees before the intake closes and back off PwDeg. This will mean some fuel will be injected during overlaps, but this cannot be helped, and will only occur under full power conditions.
Make X degrees approx. 15 percent * intake duration at near zero lift (roughly the 1/2 lift point). In program, StopInj = user input in crank degrees = intake close - X degrees.
From above it can be seen that the start of fuel injection relative to a cylinder cycle is:
This represents the point at which we want the fuel to reach the valve. To ensure this, we want to open the injectors earlier to account for the time it takes the fuel to travel from the injector to the valve. The fuel can get to the valve in two ways, either directly from the injection or by being carried in the airstream. In the program we use the minimum of these two times and include a tuning factor, InjAdv, a user input which allows the timing of the injection to be advanced or retarded.
The delay for air to travel through the cylinder port can be obtained by dividing the volume flow by the area of the port (=air speed), and dividing this speed into the length of the port. The equations are:
The last term is included because air is only moving while the intake valve is open.
Converting to crank degrees:
which is approx. 73 degrees for the small block Chevy. (Note the RPMs cancel, leaving only constants, hence DegReachValve is a user-input.)
The preceeding assumes 100 percent VE, so it represents the minimum delay. Now determine fuel speed leaving the injector:
With ThetaEntry = entry angle of injector into port. Note that (6 pounds fuel/231 cubic inch) = 1 gallon.
For 55 pounds/hour injectors, with 0.025 inch orfice, ThetaEntry=42 degrees, length of port=4.4 inches, FuelSpeedCoef=0.0296469
After calculating StartInjRel as above, we then include the minimum air/fuel speed delay and a tuning advance/retard, as follows:
For problems or questions regarding this collection of webpages contact email@example.com.
Thanks to Bowling & Grippo for their financial support of this site!