Ed Hohenberg
July 1, 2006
Contributers: Ed Hohenberg

Some of us have been there. Others never have. For those who have seen the inside, we realize it's a scary and confusing place. We slowly found our way around the "safer areas," then ventured further as we felt more comfortable. Still, years later, there are unknown caverns where we fear to tread. The place we speak of does not exist in the physical world-it's in a virtual one. We're talking about the world of the Ford Electronic Engine Control system.

Not too many years ago, the means to get inside and reprogram the Ford Electronic Engine Control (or EEC, pronounced eek) system was reserved to few who possessed the specialized systems and electronic engineering knowledge to read and "reverse engineer" the Ford EEC system. But in this day and age, in addition to several stand-alone electronic engine control systems (that totally replace the stock system), there are many aftermarket systems available with the ability to reprogram your existing Ford EFI system, either through an add-on chip or by reflashing the stock processor.

In this three-part series, we'll give you the background info on how the EEC systems work. In Part 2 we will discuss simple tuning specifics (as far as the Ford EEC system parameters go), while in Part 3 we'll go through some actual tuning techniques (again, very much simplified). In the end, you'll hopefully understand what your hired tuning expert is doing.

The Simple ExplanationThe Electronic Control Unit (ECU, aka Powertrain Control Unit or PCM) is the brain of the entire EEC outfit. It uses various sensors to "see" current running conditions and under-stand driver demands, then make decisions and perform calculations based on its internal programming (on board memory). Finally, it sends electronic outputs to a host of actuators which control the fuel and spark delivery for the engine, emissions control systems, coolant fans, automatic transmission functions, and so on. As EEC systems have evolved and continue to do so, the ECU gains control over more and more variables. In this series, we will focus primarily on the fuel and spark control, since they have the greatest influence on engine performance.

Fuel Control BasicsBefore we go into detail on the three different fuel control strategies, you need to understand the fundamental similarities between all EFI systems. That leads us to the electronic fuel injectors and the EFI fuel system. It's a simple enough concept. For a constant air/fuel (A/F) ratio, as the airflow into the engine increases (from increased rpm, increased throttle opening, or increased boost, for example), the fuel flow must also increase proportionately. But with electronic fuel injectors, the added fuel flow does not come from increasing the flow through the injectors in the same way, as say, the throttle valve increased the airflow by opening the passage in the inlet path. Electronic fuel injectors are actually digital (on/off) devices.

An electronic fuel injector is an electrically controlled on/off valve for fuel flow. When it's on, it flows fuel in proportion to its nozzle size, and fuel pressure. When it's off, it flows no fuel at all. To vary the amount of fuel flowing, the injectors are pulsed on and off, meaning they are opened and closed quite rapidly. If more fuel is needed, the "on" pulse gets longer. The amount of time the injectors are open is termed Pulse Width.

Or, the time between successive pulses gets shorter. This is important, since many people don't understand how you can flow more fuel with a shorter PW. The ratio between injector "on time" and on time plus "off time" (total cycle time) is known as the Duty Cycle, DC. For example, if the PW (on time) is 2.5 milliseconds (ms), and there are 5 ms between injections, the DC will be 0.5, or 50 percent.

Injection events can either be done in batch fire mode, where groups (banks) of injectors are fired at the same time (usually once per engine revolution), or in sequential mode, where individual port injectors fire for their cylinder only, normally following the engine firing order (once every second engine revolution for four stroke engines). Sequential EFI (SEFI) systems have some advantages for fuel control over batch systems (like improved emissions and rev limiting ability), and are therefore used on all modern OEM EFI systems.

For a given injector size, at a fixed fuel pressure, the fuel flow rate will increase directly proportionally to the duty cycle. That is, until you reach 100 percent DC. At that point, the injectors are theoretically open all the time, and fuel flow can't increase unless the fuel pressure is increased-we'll get to that in a minute. If you get to the point of saturating the injectors (100 percent DC), your A/F ratio will go lean if additional air flows into the engine. Hence the reason to install larger flow injectors. In practice, you typically don't want to have the DC regularly exceed 85 percent, since the injectors can overheat from all the applied current. Also at high DC the injector pulse width can become unstable, and with some injectors, less fuel will actually flow at high DCs.

So maximum fuel flow will then be limited by the size of the injector, right? Not totally. The other variable is the fuel pressure acting across the injector (from the supply side to the intake manifold side). For a given nozzle size, you can push more flow through with a higher fuel pressure. This is why injectors are flow rated at a specific fuel pressure. It is also why you can get away with smaller injectors when using a Fuel Management Unit (FMU) that's included in many supercharger kits. The FMU basically cranks the fuel pressure way up under boost to force more fuel through the smaller injectors. It's really a Band-Aid solution to having properly sized injectors, because the high pressures can shorten the life of your injectors and your fuel pump.

So for a given injector size, we now have two variables to control our fuel flow: DC and Fuel Pressure (FP). To make life easier for the ECU to control the fuel flow precisely, we'd like to have only one variable, so the FP is fixed at a constant value, typically 39 psi for most stock EFI Fords. But if we want constant fuel pressure, why do we regulate it with manifold vacuum in order to maintain a constant pressure across the injector? As intake manifold vacuum increases, the intake pressure decreases, therefore we reduce the fuel rail pressure the same amount to maintain the constant pressure drop across the injector. For boosted applications, we need to do the same thing in the other direction, i.e., as boost increases manifold pressure, we need to similarly increase the fuel pressure (although most stock fuel pressure regulators will not do this). The confusing part is we normally talk about manifold vacuum in units of inches of Mercury (in. Hg.), while boost and fuel pressure are usually measured in pounds per square inch (psi). If you do the units conversion, at 15 in. Hg manifold vacuum (idle with a mild cam), we should reduce fuel pressure by about 7 psi.

The '86-'87 Mustang 5.0 port fuel-injected engines used SD fuel control, with a return-style fuel flow system. Note the lack of a MAF sensor on the air inlet.

On the earlier EEC cars, the fuel system was a return-style system, where the electric fuel pump in the tank simply pumped fuel at full flow all the time. The (manifold vacuum modulated) fuel pressure regulator then bypassed the excess fuel back to the tank. With the newer returnless fuel systems, it gets a bit more complicated. Now the ECU senses fuel pressure in the fuel rails relative to the manifold vacuum, and controls the fuel pressure across the injectors by pulsing the pump voltage. With this system, fuel is not needlessly pumped around and around, heating up in the process. But it requires a special pump to work with pulsed voltage.

Now that you understand the basics of fuel delivery, you need to understand how the ECU decides the proper injector pulse width or duty cycle for the required fuel flow, to achieve the desired A/F ratio.

There are basically three strategies used for EEC fuel control: alpha-N, Speed Density, and Mass Air. The alpha-N is the simplest system, but the least precise for part throttle and engine load transitions. Hence it is used only in racing applications or for coping with a failure mode on passenger vehicles. Speed Density and Mass Air can be much more precise, over a wider range of engine operating conditions, but their precision is only as good as the programmed volumetric efficiency calibration for SD, or air flow sensor accuracy for a Mass Air system.

Alpha-NFor alpha-N, the "alpha" refers to the angle of opening of the throttle blade, and "N" refers to the engine rpm. It's that simple. For the "black box" to know what's going on, a Throttle Position Sensor (TPS) will be needed, as well as some method of measuring the engine rpm (like a crank position sensor, or output from an electronic ignition distributor). Fuel control assumes a simplistic relationship between airflow, alpha, and N, i.e., at larger throttle openings, and/or higher rpm, more air flows into the engine, so it needs more fuel to maintain the proper A/F ratio. Therefore, EEC fuel control can simply be a programmed table of injector PW's for each value of alpha and N. This works well for naturally aspirated race engines (where radical cams leave little to no manifold vacuum), and the engine is either idling or at Wide Open Throttle (WOT), with not much in between. The in between and transition parts are where Alpha-N is not so precise, since the airflow varies with more than just rpm and throttle opening. For example, this system will not work well with a boosted application, since the ECU has no way of knowing if the airflow is being pushed into the engine, or with what pressure.

Here's an example of an Alpha-N fuel control table. Cell entries are actual fuel injector pulse widths for various throttle blade angles and engine rpm.

Another downside to Alpha-N is the painstaking process to determine the correct PW for each rpm, and at each throttle position. Then, of course, as soon as something in the engine is changed, like say a new intake manifold is bolted on, you have to go back and recreate the PW table from scratch. Even if you change to larger (or smaller) injectors, you need to rebuild the entire PW table.

Speed DensitySD systems take fuel control a step further. Actual intake manifold pressure is now measured, using a Manifold Absolute Pressure (MAP) sensor, as well as Inlet Air Temperature (IAT, previously known as Air Charge Temperature, ACT, in older EEC systems), in addition to the previously sensed TPS and engine rpm. Now the ECU fuel control programming includes a desired A/F ratio table, the injector flow rates, engine cubic inch displacement (CID), a volumetric efficiency (VE) table, and the programs necessary to instantaneously calculate inlet airflow, required fuel flow (for the desired A/F ratio found in the A/F ratio table), and finally the correct injector PW.

Here's how SD works: The ECU will first sense MAP and IAT. Using the ideal gas law, it can calculate the instantaneous inlet air density (hence the "density" in SD). From the engine rpm and MAP, the ECU will look up (interpolate, if necessary) the programmed VE. Using the VE, engine displacement, and rpm, the ECU can calculate the instantaneous mass airflow into the engine. Looking up the desired A/F ratio from the base fuel table, the ECU will calculate the required mass fuel flow to achieve the desired A/F ratio. Knowing the number of injectors, and flow rating of the injectors, the ECU can calculate the required DC for the injectors. Finally, knowing the DC and rpm, the ECU can calculate the required PW for the injectors. Whew!

Let's illustrate with an example. Let's say we have a 5.0 engine operating at a manifold vacuum of 5 in Hg., rpm of 3,000, IAT of 80 degrees Fahrenheit, desired A/F ratio of 14.6, and it has eight 19-lb/hr injectors. For these conditions of rpm and MAP, the VE table calls for 85 percent.

After 1999, Ford went to a returnless fuel system. Said system is found in any stock '03-'04 Cobra. A fuel rail pressure sensor (found on the driver-side fuel rail), monitors the fuel pressure, so the ECU can regulate the fuel pumps as necessary to maintain a constant pressure drop across the injectors.

From the ideal gas law, D = p/(RT), where D is density, p is absolute pressure, T is absolute temperature, and R is the gas constant for air. Before we can calculate the density, we need to fix the units so it all works. To save our sanity, we'll do the calculations in metric units. For the air temperature of 80 degrees F, the absolute temperature would be 300 degrees Kelvin. For an intake vacuum of 5 in. Hg, the absolute pressure would be 29.92-5 = 24.93 in. Hg. = 84.42 kPa. In metric units, R = 0.286 kJ/kg-K, the injectors would flow 8.36 kg/hr and the CID would be 0.005 m3.

So our inlet air density would be: D = 84.42/(0.286*300) = 0.984 kg/m2. Mass air flow is then: Ma = 11/42 D (VE)(CID)(RPM) = 11/42 (0.984)(0.85)(0.005)(3,000)= 6.72 kg/min. For an A/F ratio of 14.6, the fuel flow must then be: Mf = Ma/14.6 = 6.72/14.6 = 0.43 kg/min.

For eight injectors, each would need to flow 0.43/8 = 0.054 kg/min = 3.2 kg/hr. Since the injectors can flow 8.36 kg/hr when wide open, we only need an injector duty cycle DC = 3.2/8.36 = 0.385 or 38.5 percent. For a four-stroke engine (two revolutions per intake event), the time interval between intake events is t=2/rpm (in minutes) or 120,000/rpm (in milliseconds). At 3,000 rpm, the interval is then t=120,000/3,000 = 40 ms.

Finally, the required injector pulse width, PW = DC(t) = (.385)(40) = 15.4 ms. Isn't math fun?

Ultimately, what you're after with tuning the EEC is more power and torque, and improved efficiency. Stay tuned and we'll show you how it's done in the upcoming issues.

Mass AirWith the SD systems, the instantaneous mass airflow was calculated by the ECU; the only risk in the calculation was the programmed value for VE. If it's not correct, the fueling will be off. Therefore, anything you change on the engine that affects the VE (like a better flowing intake manifold or camshaft for example) will throw off the fueling calculations, unless the VE can be reprogrammed accurately. For that matter, it's a tough task to program all the VE values for every combination of MAP and rpm.

With a Mass Air system, the airflow is actually measured, using (you guessed it) a Mass Air Flow (MAF) sensor. Injector pulse width is still calculated in the same manner as shown previously, however now the airflow is actually measured instead of calculated. The big advantage of a MAF system is that you can change things on the engine that affect airflow, the MAF sensor will realize the change in airflow, and the fueling will still be correct. It makes the MAF system the most forgiving for engine modifications. However, just as the SD system is only as good as the VE programming, the MAF system is only as good as the MAF sensor accuracy, and, unfortunately, many aftermarket MAF meters have poor accuracy.

Now you may be wondering about aftermarket MAF meters that are "calibrated" to work with larger injectors. For example, say you have a MAF and injector combination for 36-lb/hr injectors, and you install that into an original 19-lb/hr setup, with no other changes. It somehow magically works without having to reprogram the ECU, right? How it really works is by fooling the ECU. The recalibrated MAF sends roughly half the voltage signal to the ECU, causing the ECU to "think" only half the air is flowing into the engine. If there's only half the air, then only half the fuel flow is required, so the ECU will command roughly half the injector PW. This works out fine with the 36-lb/hr injectors because they flow about twice what the 19-lb/hr injectors did, and in the end, roughly the same amount of fuel still flows into the engine. The problem with this approach is the inaccurate load calculation, which can screw up the spark advance and desired A/F ratio.

Loading UpLoad is analogous to VE with the mass air systems. In the later EECs, load is exactly calculated as VE, but in some of the earlier EEC-IV applications, load was a "normalized" VE (often called "Percent Load"), where the raw load (VE) was divided by a maximum expected load for each rpm, at sea level. This Percent Load (if the peak sea-level load function was programmed correctly) would then calculate 100 percent load as full power output, at all values of rpm.

In some ways, this is a more accurate description of load, since at any rpm, whenat 100 percent load, the engine is giving its all. With raw load, you would see load values over 100 percent on supercharged applications, which might seem confusing at first. Another advantage of Percent Load is the ability to use all rows in any column of a programmed fuel or spark table (more about this in Part 2).

In the SD systems, load was analogous to MAP. At 100 percent load, you'd be at zero manifold vacuum (note: this system doesn't work well for boosted applications). In some other oddball applications, load is actually calculated from Throttle Position (i.e. at WOT, Load = 100 percent).

With Open Loop fuel control, the ECU takes its best guess at the injector PW to achieve a desired A/F ratio. With a Closed Loop system, the ECU can actually use Exhaust Gas Oxygen sensors to check and see how well it's doing for fuel control, and make adjustments as necessary, including updating its programming.

Load is used for many purposes in the ECU. The important ones for our discussion are to properly manage the A/F ratio and spark advance, i.e., at low loads the A/F ratio can be stoichiometric (or even leaner), and spark timing can be advanced much farther to achieve Maximum Brake Torque (MBT). At higher loads, the A/F ratio should get richer, and spark advance reduced for MBT (and to guard against combustion detonation).

Open Loop vs. Closed Loop Fuel ControlAll of the previous discussions on how the ECU calculates fueling are based on an Open Loop (OL) control strategy. In OL mode, the ECU reads all its sensors, checks with its programming to determine the desired A/F ratio, calculates the required injector PW (as detailed previously), then sends that PW to the injectors, hoping for the best. It never really knows if it achieved the desired A/F ratio or not.

With Closed Loop (CL) control, the ECU has feedback to tell it whether it hit the desired A/F ratio target or not (well, sort of, as we'll find out). At part throttle, when the engine runs at the stoichiometric (chemically correct) 14.6 A/F ratio (required for minimum emissions, and maximum catalytic converter efficiency), the combustion products should ideally be only water vapor and carbon dioxide. If the A/F ratio was a little lean (too much air and/or not enough fuel), the excess (unburned) oxygen will show up in the exhaust gases. Using an O2 sensor, the ECU can now detect when the engine is running lean. Problem is, the factory O2 sensors have a narrow band for sensing oxygen. In other words, they can really only tell the ECU if there is some oxygen in the exhaust, but not precisely how much. So the ECU doesn't really know how lean the engine is running, only that it's running lean.

So what happens when the engine is running rich and there is no oxygen in the exhaust? The ECU will assume that if there's no oxygen present in the exhaust, then the A/F ratio must be rich. At that point, the ECU makes a conscious decision to lean the A/F ratio, that is, until it reads oxygen in the exhaust again. At that point, the ECU knows it went too far (it's now lean), so it will richen things up again until the oxygen disappears, but now it's rich again, so the ECU will again lean things out, and so on. In CL mode, the ECU will continually cycle the A/F ratio lean, then rich, over and over, hovering the A/F ratio closely around the stoichiometric point.

In CL mode, the ECU will still go through its normal PW calculation, then adjust the PW if necessary, based on what the feedback loop (O2 sensors) is saying. Any adjustment to the calculated PW is handled by the ECU as a Short Term Fuel Trim (STFT). With modern (second generation) On Board Diagnostics (OBD II), many ECU parameters can now easily be logged in real time, including the STFT. Depending on the ECU and data-logging system being used, STFT can be reported differently, sometimes as a plus or negative percent (minus STFT meaning the engine is running lean, so the ECU is reducing its calculated A/F ratio in order to get the actual desired A/F ratio), or as a number around 1.00 (STFT numbers less than one, meaning the ECU is correcting a lean condition).

Adaptive StrategyIf the ECU constantly needs to shorten calculated PW to achieve the desired 14.6 A/F ratio in CL mode, it knows its programming is calculating a PW too long (possibly from erroneous sensor inputs), and it will remember that correction for next time it makes a PW calculation for the same operating conditions of load and rpm. In other words, the ECU actually learns. The remembered corrections are known as Long Term Fuel Trims (LTFT). The LTFT work oppositely to the STFT, i.e., a plus LTFT (or LTFT greater than one) indicates the ECU is adding some to the calculated PW, in order to get the A/F it wants, based on what it's learned in the past.

Even though the ECU only knows it's hitting the desired A/F ratio when the A/F ratio is stoichiometric (in CL mode), the ECU can also apply the learned corrections (LTFT) any time the ECU is operating in OL mode, and commanding an A/F ratio other than stoichiometric. This Adaptive Strategy allows sensors to age and drift in their readings, but the ECU can now correct for the errors, and still hit the desired A/F ratio in the end.

Typical EFI systems use low-cost, "narrow band" Heated Exhaust Gas Oxygen sensors, like this Ford unit.

In the real world, adaptive strategy can be a problem. For some ECUs, corrections learned at one set of operating conditions (e.g., idle) are also applied under other operating conditions (like high-rpm WOT). In that case, if you have a MAF sensor that reads too rich at idle (typical of many aftermarket MAF sensors), a leaned idle correction is learned, which if also applied at WOT, can spell disaster. For these applications, it's necessary to either rework the adaptive learning table in the programming to prevent learned corrections from being applied under other operating conditions, or make certain the MAF sensor calibration is corrected. The least desirable, last-ditch technique is to disable adaptive learning in the tune. Whichever way, a custom tune is required.

Closed Loop mode (and Adaptive Strategy learning) is usually only active during part throttle modes, when the engine and O2 sensors are up to stabilized temperatures, and the goal is an A/F ratio right at stoichiometric. During the first few minutes after the engine is first started, and during high-load periods (like WOT) when a richer A/F ratio is intentionally desired, OL fueling strategy is typically used. Thus for maximum power, we need to ensure the ECU calculates the correct OL injector PW, so we get the WOT A/F ratio right. This is where a proper tune comes in.

In Part 2, we'll cover some of the specific Ford EEC tuning parameters, then in Part 3 we'll actually put the science to the test, with a step-by-step custom tune of an '04 Cobra. Stay tuned.

List Of Acronyms
ACT Air Charge Temperature (same as IAT)
A/F Air/Fuel
{{{CL}}} Closed Loop
DC Duty Cycle
ECU Engine Control Unit (same as PCM)
EEC Electronic Engine Control
EFI Electronic Fuel Injection
FMU Fuel Management Unit
FP Fuel Pressure
IAT Intake Air Temperature (same as ACT)
in. Hg. Inches of {{{Mercury}}} (pressure unit)
kPa Kilopascals (metric pressure unit)
LTFT Long Term Fuel Trim
MA Mass Air
MAF Mass Air Flow
MAP Manifold Absolute Pressure
MBT Maximum Brake Torque
ms Milliseconds
OBD On Board Diagnostics
OEM Original Equipment Manufacturer
O2 Oxygen
OL Open Loop
PCM Powertrain Control Unit (same as EEC)
psi pounds per square inch (pressure unit)
PW Pulse Width
SD Speed Density
SEFI Sequential Electronic Fuel Injection
STFT Short Term Fuel Trim
TPS Throttle Position Sensor
VE Volumetric Efficiency
WOT Wide Open Throttle