Keeping the ECM in control

Jan. 1, 2020
Serious racers of previous eras had a keen interest in track elevation, relative humidity and air temperature, all numbers they used to calculate relative air density.

This article was originally published March 2, 2010. Some of the information may no longer be relevant, so please use it at your discretion.

When I first started in this business in the late 1970s, I worked with an older mechanic who raced a 327 cid-equipped Camaro at the local drag strip. Serious racers of the era had a keen interest in track elevation, relative humidity and air temperature, all numbers they used to calculate relative air density. They kept a record of carburetor settings in a little notebook and would set up their initial tuning based on past performances under similar conditions.

Next came a few wide open passes down the track, followed by a close examination of the spark plugs. A light brown center porcelain meant a slightly rich air/fuel ratio — a mixture where there was just a little more fuel than needed for a stoichiometric mix, and one that helped insure maximum horsepower.

Modern NASCAR shops take this idea to the technological extreme. Hendricks Motorsports, for example, uses climate controlled engine dyno rooms to recreate any race on any track on the circuit, all the while monitoring engine performance to get every last ounce of power out of their engines. They can alter temperature, humidity — nearly every possible climate/track combination — to be better prepared for every race.

Science in the bays

For our customers' cars, the engine control module (ECM) is in charge of tuning to meet changing needs. Power, however, is of secondary concern to it. First and foremost, the ECM has to make sure that the exhaust gasses reaching the catalytic converter arrive at a level the converter can handle. Too much left over fuel or air both affect the efficiency of the converter and can lead to permanent damage to the substrate and an increase in emissions from the tail pipe.

The ECM protects the converter by taking in information from a number of sensors and calculating continuously how much fuel to add to the incoming air charge, attempting to maintain a stoichiometric mix. To check on itself, it uses feedback from the oxygen sensors and makes adjustments accordingly. When it determines it no longer can control the fuel mixture, it sets a system rich or lean code and turns on the malfunction indicator lamp (MIL).

A stoichiometric mixture is one in which there is just the right amount of air to mix with the fuel to use it all up. With gasoline, that mixture is 14.65 lbs. of air for every one lb. of fuel. While that may represent the perfect ratio of air to fuel, it is not always the best ratio. Engines run more efficiently and burn less fuel when the ratio is on the lean side, that is, with more air than fuel. More power is best achieved with the ratio on the rich side, or less air in the mix.

Another term used to describe the air/fuel ratio is called the excess air factor or lambda. In a perfect combustion event, with a stoichiometric mix, lambda would be 1:1, written as 1.0. This means, simply, that the amount of air actually supplied for a given fuel charge was equal to the amount of air theoretically required for complete combustion of the given fuel charge (the stoichiometric amount of air needed by that fuel charge).

Too much air would result in a lambda greater than 1, or lambda > 1. A rich mixture, or one with not enough air, would be expressed as lambda < 1. To keep a modern catalytic converter happy, lambda needs to stay between 0.995 (slightly rich) and 1.005 (slightly lean). There’s not much play room there.

MAF sensors are becoming more common and actually measure the weight of the air drawn into the engine. Any air leaking on the engine side of the sensor, however, will not be measured causing system lean codes.

MAF sensors are becoming more common and actually measure the weight of the air drawn into the engine. Any air leaking on the engine side of the sensor, however, will not be measured causing system lean codes.

To maintain such a tight window, the ECM must precisely calculate how much fuel to add to any given air charge ingested by the engine. The fuel side of the equation is easy enough. The ECM knows how much fuel the injectors will flow and simply adjusts the amount of time the injector is open to control fuel quantity. That time is called injector pulse width. What the ECM needs help in determining is how much air is getting in.

Putting the ECM to Work

There are three methods in use for doing just that:

  • The speed density method. The speed density method uses several inputs to calculate the amount of air ingested by the engine. More precisely, it calculates the weight of the air taken in. This method uses input primarily from the manifold absolute pressure (MAP) sensor, but the ECM also needs to know barometric pressure (BARO), and intake air temperature (IAT). In addition, the volumetric efficiency of the engine is included (usually as a preprogrammed value) as is the amount of exhaust gas recirculation (EGR).
  • This information allows the ECM to calculate a base pulse width (BPW). Once the BPW is calculated, the ECM needs to know how the engine is being operated: Is it accelerating, decelerating or cruising? This info comes from the throttle position sensor (TPS). It also needs to monitor battery voltage. Why? If battery voltage is low, voltage to the fuel pump will be low. If that happens, fuel pressure/flow will be less than it should be, causing a lean mixture.

    Last, the ECM checks engine coolant temperature (ECT), looking primarily to see if the engine is cold or too hot. With this additional information, the ECM calculates modified pulse width (MPW). Typically, it is this pulse width the ECM will use to open the injectors when the engine is in an open loop condition. More on that in a bit.

  • The next method you may or may not have seen is the volume airflow method. This system is similar to the speed density method in that it also has to calculate the weight of the incoming air charge, but instead of a MAP sensor, it uses a vane type airflow meter, or a Karman Vortex airflow meter, both designs popular on older European models. Other than that important difference, the two methods are similar.
  • Becoming more and more the norm, the last method used is the mass airflow (MAF) system. This system uses a MAF sensor, either hot wire or hot film design, to actually measure the weight of the air passing through it. While more accurate, this system’s weakness is air entering the engine without passing through the sensor first. Vacuum leaks downstream (engine side) of the sensor, caused by a variety of reasons, will easily lead to system lean codes.
  • Up to this point, all three methods have helped the ECM determine the mass (weight) of the air entering the engine. With this information in hand, the ECM can then calculate injector pulse width (IPW), adding the exact amount of fuel needed for a lambda mixture.

    What if a sensor is lying to the ECM? What about normal engine and component wear?

    The ECM needs feedback on how it did its job. This feedback comes primarily from the upstream (engine side of the catalytic converters) oxygen sensors (Remember lambda, or the excess air factor?).

    Getting feedback

    Oxygen sensors react to the presence of oxygen in the exhaust stream. They do not, however, actually measure the oxygen content. They work more like a switch — varying in voltage from just under 1.00V when lambda < 1.0 (rich), to just over 0.100V when lambda > 1.0 (lean). The greatest shift in voltage occurs right at lambda = 1.0, or roughly 0.450V. When the oxygen sensor has reached operating temperature and started to provide its feedback to the ECM, the system is considered to be in closed loop.

    Because the sensor acts as a switch, it is necessary to make it switch. The ECM does this by altering IPW, more or less, until the oxygen content in the exhaust gas alters enough to cause the sensor to react. Once it does, the ECM alters IPW in the opposite direction until the sensor reacts again. Ideally, the ECM will go slightly rich on one pulse, see the sensor voltage go high, then reverse and go slightly lean with the sensor responding with a low voltage signal. You can watch this on your scan tool.

    The PID (parameter identifier) is called Short Term Fuel Trim, or STFT. STFT is a percentage modifier that is added to MPW to come up with the final IPW. On your scan tool, it typically will read as a numerical value that is either positive or negative.

    To get the actual modifier, simply add 100 to the displayed value. For example, a STFT of +5 would mean the ECM is multiplying MPW by 105 percent, and a STFT of -5 would mean the multiplier is 95 percent. The ECM’s goal is to keep this number switching evenly to either side of 0, or 100 percent. If the ECM can do this, the ECM has established fuel control.

    If not, you will see STFT remaining either high (positive) or low (negative). It will still switch, but it will be on one or the other side of center, or 0. This, by itself, is not abnormal.

    Components wear, fuel injectors get dirty, and engines get old. When the ECM sees a trend, positive or negative, it starts to learn that trend and attempts to correct for it. This is the Long Term Fuel Trim or LTFT PID you see on your scan tool. This also is a multiplier and is read the same way as STFT.

    The difference is this multiplier is added to BPW as part of the base calculation. It will vary with different load and rpm conditions and is stored in the ECM memory in cells. The ECM will slowly add to this modifier until it once again sees STFT switching across its center, so, LTFT can be a double digit number and the ECM can still be in total control of the feed gasses heading to the converter.

    However, when the ECM reaches its maximum limits for LTFT and still cannot establish control, it sets a system lean or rich code. System lean, if the corrections are all positive and system rich if they are negative. When diagnosing these codes, consider what the ECM needs to control fuel in the first place.

    Make sure that the input information to the ECM is correct and accurate. MAF sensors can be tested for accuracy using a volumetric efficiency test.

    Consider the integrity of the feedback from the oxygen sensors. Sensors that don’t switch at all can cause the ECM to think that the engine is running too lean or too rich, depending on the sensor’s bias. An exhaust gas analyzer is one method in verifying the integrity of the oxygen sensor. Sensors that are old can get lazy, and cause STFT to vary by more than ±10 percent, actually impacting fuel economy.

    Last, don’t forget to consider what banks are affected. Many new four cylinders actually divide the engine into two banks of two. If both banks are the same, consider problem sources common to both. Fuel pressure that is too high or too low is one example of a factor that will affect both banks.

    If only one bank is in trouble, pay more attention to factors unique to that bank or that group of cylinders. Misfires, for example, can cause one bank to vary in its trim numbers as can a restricted exhaust with dual converters.

    Of course, be sure to check technical service bulletins (TSBs) related to ECM programming. I've had more than one case where it was the ECM’s calculations that were faulty and only a reflash would correct the problem.

    Sponsored Recommendations

    Best Body Shop and the 360-Degree-Concept

    Spanesi ‘360-Degree-Concept’ Enables Kansas Body Shop to Complete High-Quality Repairs

    How Fender Bender Operator of the Year, Morrow Collision Center, Achieves Their Spot-On Measurements

    Learn how Fender Bender Operator of the Year, Morrison Collision Center, equipped their new collision facility with “sleek and modern” equipment and tools from Spanesi Americas...

    ADAS Applications: What They Are & What They Do

    Learn how ADAS utilizes sensors such as radar, sonar, lidar and cameras to perceive the world around the vehicle, and either provide critical information to the driver or take...

    Banking on Bigger Profits with a Heavy-Duty Truck Paint Booth

    The addition of a heavy-duty paint booth for oversized trucks & vehicles can open the door to new or expanded service opportunities.