AUTO-230 · Lesson 5 of 12 · 20 min

Fuel trims and closed-loop control

Van 3 comes in a week after van 2 left with its new pump module. Its check-engine lamp is on with two codes, P0171 and P0174, system too lean on bank 1 and bank 2, and its driver says it idles a little unevenly at traffic lights but drives normally. Theo, who has been at Ridgeline longer, looks at the codes and reaches for the parts catalog to look up oxygen sensors. Marty stops him. "Two lean codes on two banks with two different sensors," he says. "What are the odds both sensors failed the same week? The sensors are telling you the truth. Read the fuel trims and they'll tell you where to look."

This lesson covers how the engine computer uses oxygen sensor feedback to correct its fuel calculation: open-loop and closed-loop operation, short-term and long-term fuel trims, how to read them, and how the pattern of trims across idle, cruise and load points to the cause. Fuel trims are the single most useful piece of scan data for mixture problems, and reading them well saves more time than any tool.

Open loop and closed loop

When an engine starts cold, its oxygen or air-fuel sensors are not yet hot enough to work, and the engine needs extra fuel to run smoothly anyway. The computer runs in open loop: it calculates fuel from its sensors and stored tables, with enrichment for the cold engine, and does not check the result. As soon as the exhaust sensors reach working temperature, helped by their heaters, and the coolant is warm enough, it switches to closed loop. Now it compares the actual mixture reported by the upstream sensor with the target, usually lambda 1.00, and corrects the fuel quantity continuously to hold it there. The engine also goes back to open loop at full throttle on some engines, during deceleration fuel cut-off, and when a fault prevents closed-loop operation. Scan tools show the fuel system status as OL or CL, with sub-states such as open loop due to driving conditions or open loop due to a system fault.

With a narrow-band sensor, closed-loop control is a constant small oscillation. When the sensor says rich, the computer leans the mixture slowly; the moment the sensor crosses to lean, it jumps back a little and richens slowly; and so on, several times a second, so that the average stays at lambda 1. The upstream sensor voltage swings between about 0.1 and 0.9 volts. With a wide-band sensor, the computer knows how far the mixture is from the target and can correct smoothly and quickly without the swing. Either way, the corrections themselves are reported as fuel trims.

Short-term and long-term fuel trim

Short-term fuel trim (STFT) is the immediate correction the computer is applying, in percent. Zero means the base calculation is exactly right; +10 percent means the computer is adding 10 percent more fuel than its base calculation because the sensor reports lean; −10 percent means it is removing fuel because the sensor reports rich. Short-term trim moves constantly, especially with a narrow-band sensor, and is reset each time the engine stops.

Long-term fuel trim (LTFT) is the learned correction. If short-term trim stays away from zero for a while, the computer moves the long-term value in the same direction so that short-term can return toward zero. Long-term trim is stored in memory in cells for different engine speeds and loads, so an engine can learn, for example, +12 percent at idle and +2 percent at cruise. It is kept when the engine is switched off and is erased only when the computer's memory is cleared, by a scan tool or by disconnecting the battery, after which it must relearn. The correction actually applied is roughly the sum of the two, so the sum, called total fuel trim, is what technicians judge.

\[\text{total trim} \approx \text{STFT} + \text{LTFT}\]

As a rule of thumb, total trim within about ±10 percent is normal; beyond about ±10 percent the computer is working hard to correct something, and many computers set a too-lean or too-rich code when total trim reaches about ±25 percent for long enough. Engines are not identical, so a new engine might live at +3 percent and an older one at −4 percent; what matters is how far and in what pattern the trims move from that normal. Trim values are reported separately for each bank on engines with two upstream sensors, which on a V engine means one per cylinder bank. Bank 1 is always the bank containing cylinder 1.

# Total fuel trim and what it means (warm engine, closed loop)
def judge(stft, ltft):
    total = stft + ltft
    if abs(total) <= 10:
        verdict = "normal range"
    elif abs(total) < 25:
        verdict = "working hard to " + ("add fuel: running lean" if total > 0 else "remove fuel: running rich")
    else:
        verdict = "at or beyond the usual code limit (" + ("lean" if total > 0 else "rich") + ")"
    return total, verdict
for stft, ltft in ((2, 3), (4, 11), (3, 22), (-6, -18)):
    total, v = judge(stft, ltft)
    print(f"STFT {stft:+3d} %, LTFT {ltft:+3d} % -> total {total:+3d} %: {v}")
Output
STFT  +2 %, LTFT  +3 % -> total  +5 %: normal range
STFT  +4 %, LTFT +11 % -> total +15 %: working hard to add fuel: running lean
STFT  +3 %, LTFT +22 % -> total +25 %: at or beyond the usual code limit (lean)
STFT  -6 %, LTFT -18 % -> total -24 %: working hard to remove fuel: running rich

What a positive or negative trim really means

A positive trim means the computer is adding fuel because the upstream sensor sees more oxygen than it expects. That can happen because air is entering that the computer did not measure, such as through a vacuum leak or a cracked intake duct after the MAF sensor; because the injectors are delivering less fuel than the computer thinks, from low fuel pressure or restricted injectors; because the MAF sensor is under-reporting air, like Harold's; or because outside air is getting into the exhaust ahead of the sensor through a leak, which makes the sensor see oxygen that never went through the engine. That last case is called a false lean, and it is the reason a lean code does not always mean a lean engine.

A negative trim means the computer is removing fuel because the sensor sees too little oxygen. Causes include high fuel pressure, leaking injectors like the Lindqvists' minivan in Lesson 3, a MAF sensor that over-reports, a purge valve stuck open drawing fuel vapor from the evaporative system, fuel in the engine oil, which happens on some direct-injection engines on short trips in cold weather, and an engine computer that thinks the engine is colder than it is. A misfire can confuse the picture: on engines with narrow-band sensors, the oxygen from the unburned cylinder can make the sensor read lean, and the computer adds fuel to an engine that is in fact rich.

Reading the pattern

The most powerful thing about fuel trims is their pattern across operating conditions. Kiran learns to record them at three points: warm idle, a steady 2,500 rpm with no load, and a road test at cruise and under moderate load. A vacuum leak is a fixed-size hole that lets in roughly the same mass of air at any speed. At idle, when the engine draws only a few grams of air per second, that extra air is a large fraction of the total, so the trim is large; at 2,500 rpm and at cruise, when the engine draws ten times as much air, the same leak is a small fraction and the trim falls toward normal. So a lean trim that is worst at idle and improves with speed points to unmetered air.

A fuel supply problem works the other way. A weak pump or restricted filter can keep up at idle but not at high flow, so the trim is near normal at idle and grows with load, which is what van 2 would have shown if the computer had not set its rail pressure code first. A contaminated MAF sensor also shows trims that grow with airflow. A problem in one bank only, such as a vacuum leak at one intake runner gasket, a restricted injector, or an exhaust leak ahead of one bank's sensor, shows up in that bank's trim alone, because anything shared, the MAF, the fuel pump, the pressure regulator, affects both banks equally.

# Reading the trim pattern: total trim at idle and at 2,500 rpm, both banks
cases = {
    "van 3 as found": ((+24, +22), (+5, +4)),
    "example: weak pump": ((+3, +2), (+17, +16)),
    "example: bank 1 only": ((+14, +1), (+12, +2)),
}
for name, ((b1_idle, b2_idle), (b1_2500, b2_2500)) in cases.items():
    if abs(b1_idle - b2_idle) > 8 or abs(b1_2500 - b2_2500) > 8:
        hint = "one bank only: look for something that bank does not share"
    elif b1_idle > 10 and b1_2500 < b1_idle - 10:
        hint = "lean at idle, better with airflow: unmetered air (vacuum leak)"
    elif b1_2500 > b1_idle + 10:
        hint = "lean that grows with airflow: fuel supply or MAF under-reading"
    else:
        hint = "no clear pattern: gather more data"
    print(f"{name:<22} idle {b1_idle:+3d}/{b2_idle:+3d}  2500 {b1_2500:+3d}/{b2_2500:+3d} -> {hint}")
Output
van 3 as found         idle +24/+22  2500  +5/ +4 -> lean at idle, better with airflow: unmetered air (vacuum leak)
example: weak pump     idle  +3/ +2  2500 +17/+16 -> lean that grows with airflow: fuel supply or MAF under-reading
example: bank 1 only   idle +14/ +1  2500 +12/ +2 -> one bank only: look for something that bank does not share
A bar chart of total fuel trim for van 3. For bank 1 and bank 2, two pairs of bars show the trim at warm idle and at 2,500 rpm. At idle both banks are about plus 23 percent, well above a shaded normal band from minus 10 to plus 10 percent. At 2,500 rpm both banks have fallen to about plus 4 percent, inside the band. A second set of bars, labeled after repair, shows both banks within a few percent of zero at both speeds.
Van 3's trims were high at idle and nearly normal at 2,500 rpm on both banks: the signature of a vacuum leak.

Finding van 3's leak

Van 3's pattern, about +23 percent on both banks at idle and +4 percent at 2,500 rpm, says unmetered air entering after the MAF sensor somewhere both banks share: the intake plenum, the throttle body gasket, a hose to the brake booster, the purge line, or the positive crankcase ventilation system. Kiran checks the basics first. The air duct between the MAF and the throttle is intact and its clamps are tight. Manifold absolute pressure at idle is 11.2 inHg, a little high for this engine, which fits extra air entering. Spraying anything flammable around an engine to find a leak is not Ridgeline's method; Marty has seen the fires it causes. Instead she uses the shop's smoke machine, which fills the intake, sealed at the air filter, with a harmless visible vapor at very low pressure.

Smoke curls out from behind the intake manifold at the rear of the engine. With a light and a mirror, she finds the crankcase ventilation hose cracked through at a molded elbow, hardened by heat and opened further by every cold start of the winter. The crack lets air from the crankcase, which the computer never measured, into the intake. She replaces the hose with the manufacturer's part, checks the oil separator and the fresh-air side of the ventilation system for blockage, and clears the codes. She deliberately does not clear long-term trim by itself first: she wants to see it relearn. After a twenty-minute drive, total trim is +3 percent on bank 1 and +2 percent on bank 2 at idle, +1 and +2 at 2,500 rpm, and the idle is smooth.

Marty adds a point about altitude. At Denver, the manifold pressure at idle is lower than at sea level for the same engine, because barometric pressure is lower, and the engine draws a smaller mass of air. A small leak therefore has a slightly larger effect on idle trim here than the same leak would have at sea level. Service information written at sea level for expected idle MAP or MAF has to be scaled, as Lesson 4 showed, before deciding that a reading is wrong.

Worked problem

Is it the engine or the sensor?

A four-cylinder engine has STFT +6 percent and LTFT +19 percent at idle, and STFT +2 percent and LTFT +18 percent at 2,500 rpm. Fuel pressure is normal at idle and under load. What does the pattern suggest, and what would you check next?

Show solution
  1. Total trim is +25 percent at idle and +20 percent at 2,500 rpm: lean at both speeds.
  2. The trim does not fall much with airflow, so a vacuum leak is less likely.
  3. Fuel pressure is normal, so the supply side is probably fine.
  4. Next, compare the MAF reading with the calculated airflow and check for an exhaust leak ahead of the upstream sensor, which would cause a false lean.

Answer: A lean condition that does not improve with airflow: check MAF accuracy and look for an exhaust leak before the sensor.

Common mistakes

  • MistakeReplacing oxygen sensors because of lean codes.

    InsteadThe sensors are usually reporting correctly; the trims show where the extra oxygen comes from.

  • MistakeJudging only short-term trim.

    InsteadAdd short-term and long-term together; the sum is the correction being applied.

  • MistakeClearing codes and trims before recording the data.

    InsteadRecord freeze frame and trims first; they are evidence.

  • MistakeSpraying carburetor cleaner around a running engine to find leaks.

    InsteadUse a smoke machine; flammable sprays cause fires.

  • MistakeForgetting that an exhaust leak ahead of the sensor reads lean.

    InsteadOutside air pulled into the exhaust makes a false lean.

Summary and key terms

  • In open loop the computer meters fuel from tables; in closed loop it corrects using the exhaust sensor.
  • Short-term trim is the immediate correction; long-term trim is the learned correction stored by speed and load.
  • Total trim is roughly STFT plus LTFT; within about ±10 percent is normal, about ±25 percent often sets a code.
  • Positive trim means adding fuel because the sensor sees lean; negative means removing fuel.
  • Lean at idle that improves with airflow points to a vacuum leak.
  • Lean that grows with airflow points to fuel supply or a MAF under-reading.
  • A trim difference between banks points to something one bank does not share.
Open loop
Fuel control from stored tables without exhaust sensor feedback.
Closed loop
Fuel control corrected continuously by the upstream exhaust sensor.
Short-term fuel trim (STFT)
The immediate percentage correction to the base fuel calculation.
Long-term fuel trim (LTFT)
The learned percentage correction, stored by speed and load.
Total fuel trim
The sum of short-term and long-term trim.
Unmetered air
Air that enters the engine without being measured by the MAF sensor.
False lean
A lean sensor reading caused by outside air leaking into the exhaust ahead of the sensor.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. STFT is −4 percent and LTFT is −15 percent. Is the engine adding or removing fuel, and how much in total?

    Show answer

    Removing about 19 percent: the computer sees a rich condition.

  2. Bank 1 total trim is +16 percent; bank 2 is +2 percent. Could the MAF sensor be the cause?

    Show answer

    Unlikely: the MAF is shared by both banks, so the cause is specific to bank 1.

  3. Trims are +20 percent at idle and +3 percent at 2,500 rpm. What is the most likely cause?

    Show answer

    A vacuum leak or other unmetered air.

  4. Why must long-term trim relearn after the battery is disconnected?

    Show answer

    The learned values are erased with the computer's memory.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz