What a fuel trim is

The module works out the fuel it thinks the engine needs, then corrects it. The correction is the trim. Short term trim (STFT) reacts within a second to the upstream sensor; long term trim (LTFT) learns whatever STFT keeps having to do, so STFT can return towards zero. What matters for diagnosis is the total, STFT plus LTFT, per bank and per load cell. Positive means the module is adding fuel because the sensor says lean; negative means it is taking fuel away.

A trim never says what is wrong. It says the module's arithmetic and the engine disagree, and by how much, in each cell. The shape of that disagreement across idle, 2,500 rpm and cruise, and what the MAF, the sensors and the coolant reading say alongside it, is what points to a fault.

Step 1: how much air the engine draws

A four stroke engine fills each cylinder once every two revolutions. The mass of air it draws is:

air (g/s) = VE x displacement (L) x rpm / 120 x MAP (kPa) / (0.287 x IAT in kelvin)

VE is volumetric efficiency relative to manifold density. The units fall out in grams per second directly, because a litre times a kilopascal divided by kilojoules per kilogram is one gram. A warm 2.0 L at 750 rpm and 30 kPa draws about 3 g/s. This is the speed density estimate, and the airflow check in every case divides the MAF reading by it, using the reference VE below, so you can redo it with a calculator.

CellReference VEIAT (C)Speed (mph)Purge command (%)
Idle0.723800
2,500 rpm, no load0.7435020
Cruise0.84306035
WOT snapshot0.929450
Engine familyrpm idle / 2500 / cruise / WOTMAP kPaHealthy air g/s
2.0 L inline four, narrowband upstream sensor750 / 2500 / 2100 / 500030 / 22 / 42 / 973.0 / 7.7 / 14.2 / 83.9
2.5 L inline four, wideband air fuel sensor700 / 2500 / 2000 / 500029 / 22 / 40 / 973.4 / 9.6 / 16.1 / 104.9
3.5 L V6, dual bank, wideband air fuel sensors650 / 2500 / 1800 / 500030 / 21 / 38 / 974.6 / 12.8 / 19.3 / 146.8
5.3 L V8, dual bank, narrowband upstream sensors600 / 2500 / 1600 / 450028 / 18 / 34 / 976.0 / 16.6 / 23.2 / 200.1

Step 2: the fuel the module meters, and what arrives

fuel commanded = (MAF + expected purge air) / 14.7 x enrichment x (1 + trim) - expected purge vapour fuel delivered = fuel commanded x sqrt(rail pressure / rated) + injector drip + purge vapour

The module meters from the air it measured, at the stoichiometric ratio of 14.7 to 1. Enrichment is 1 on a warm engine and rises by 0.0022 for each degree C the coolant reading sits below 80 C. The square root is how an injector behaves: flow through a fixed opening goes with the square root of the pressure across it. Unmetered air, a leak or the purge stream, is part of the true air but never part of the MAF reading.

Step 3: trim is the correction closed loop finds

actual lambda = true air / (14.7 x fuel delivered) gas lambda = actual lambda x (1 + exhaust leak air share) sensor lambda = gas lambda x (1 + misfire share) x sensor bias

In closed loop the module moves the trim until the upstream sensor reads lambda 1, so the model solves for that trim directly. The total is limited to plus or minus 25 percent; beyond that the module runs out of authority and the sensor is left reading lean or rich. At WOT the module runs open loop, commands lambda 0.85, applies the long term trim it learned at cruise, and the sensor reports whatever it sees.

The downstream sensor reads the gas after the converter. With the engine held at stoichiometry the converter flattens it to a steady 0.6 to 0.7 V. If the engine is rich overall, as it is when a biased sensor or a misfire fools closed loop, it sits near 0.85 V. An exhaust leak mixes its air in before both sensors, so the downstream sensor sees the same stoichiometric gas the upstream sensor was driven to.

Codes follow simple rules: a lean or rich code when a bank's total trim reaches plus or minus 20 percent, a misfire code for a cylinder with 20 or more misfires per 1,000 revolutions, and a cold running code when the coolant is below 80 C at cruise. The freeze frame is the cell where the first code set, or warm idle when there is none.

Reading the cells: fuel trim against load and airflow

Fuel trim only means something when you know which operating point it was taken at, so every case reports it in cells: idle, 2,500 rpm with no load, and a steady cruise, plus a WOT snapshot in open loop. The cells are ordered by airflow, the grams per second the engine draws, because that is what decides how big a fixed error looks. Calculated load does not follow the same order: at 2,500 rpm with no load the throttle is nearly shut, manifold pressure is lower than at idle, and calculated load is lower too, even though airflow is more than twice as high.

A healthy 2.0 L inline four in each closed loop cell, and the same engine with a vacuum leak
CellrpmMAP (kPa)Calculated load (%)MAF (g/s)Vacuum leak total trim (%)
Idle7503020.73.02+14.9
2,500 rpm, no load25002215.67.61+5.4
Cruise21004234.414.09+2.8

Read the last column against the MAF column, not the load column. The leak adds +14.9 at 3.02 g/s, +5.4 at 7.61 g/s and +2.8 at 14.09 g/s: it shrinks steadily as airflow rises. Sorted by calculated load instead, 2,500 rpm would come first and the pattern would look broken. A fault whose error is a fixed mass (a leak, a drip) falls with airflow; a fault whose error grows with flow (a weak fuel supply, a MAF losing signal) rises with it; a fault that scales everything (fuel pressure, a MAF gain error, a coolant reading) stays flat.

Step 4: what each fault changes

One physical quantity per fault, at its clean reference size. Everything else in a case follows from the steps above.

FaultWhat changes in the model
Vacuum leakAn orifice from the atmosphere into the manifold, sized so it flows 13 percent of healthy idle air. Choked below the critical pressure ratio, so the same mass at idle, 2,500 and cruise.
EVAP purge valve stuck openThe purge valve open all the time. Its full flow is 10 percent of healthy idle air, carrying 0.123 g of fuel vapour per gram of air (a loaded canister). Only flow beyond the commanded duty is a surprise to the module.
MAF under reportingThe MAF reports metered air times (1 minus (0 + 0.26 x square root of flow over healthy WOT flow)).
MAF over reportingThe MAF reports metered air times 1.1.
Restricted exhaustVolumetric efficiency falls by 0.25 x (flow over WOT flow) squared x (baro over MAP). Off WOT the throttle opens to hold airflow, so MAP rises; at WOT airflow falls.
Restricted fuel filter or weak pumpRail pressure over rated = 1 minus k x fuel demand squared, with k set so the drop at healthy cruise demand is 12 percent, and a floor of 0.4.
Fuel pressure too high (regulator stuck closed)Rail pressure 25 percent above rated in every cell.
Leaking injectorOne injector passes a constant drip while shut, sized so its bank's idle trim moves 12 percent. The drip only flows for the part of each cycle the injector is closed.
Exhaust leak upstream of the upstream sensorAir drawn into the exhaust ahead of the upstream sensor: 12 percent of the bank's flow at idle, scaled by (idle flow over flow) to the power 0.8, and none at WOT.
Upstream O2 or A/F sensor biased leanThe upstream sensor on one bank reports lambda 1.07 times the gas it sits in.
Single cylinder misfireOne cylinder fails to burn 24 percent, 12 percent, 18 percent, 20 percent of its events in the four cells. The unburned charge reads as oxygen at the upstream sensor.
ECT sensor stuck coldThe coolant reading is frozen at about 38 C (the noisy tier draws 28 to 48 C). The coolant itself is at 90 C.
Thermostat stuck openThe coolant runs 16 C, 17 C, 26 C, 24 C below 90 C in the four cells.

The tiers, and how a case is made

A case code such as C-XX-1A2B3C names the tier, the fault family and a seed. The seed fixes the answer, the engine, the fault size and the noise, so a code gives the same case on every screen.

Noise goes into the operating point (rpm, MAP, IAT), so the MAF follows it the way it would on a running engine, and a little measurement noise sits on the MAF itself. Engines run at sea level, 100 kPa barometric pressure, fully warm unless a coolant fault says otherwise.

What the model leaves out

TrimCase is a training aid built on a simulated engine model. It is not a diagnostic instruction for any real vehicle. The model has 13 faults and a control, and a test proves that at the clean tier each fault's fingerprint matches its own cases and no other on 500 seeded cases. Rated coolant temperature in the model is 90 C and barometric pressure 100 kPa.

Frequently asked questions

Why is calculated load lower at 2,500 rpm with no load than at idle?

Calculated load compares the air per intake stroke with the most the engine could draw. With no load the throttle is nearly shut at 2,500 rpm, manifold pressure drops below its idle value, and each stroke draws less air, even though more strokes per second mean more airflow overall.

Should fuel trim be read against load or airflow?

Against airflow when you are judging how a fixed error scales. A leak or a dripping injector is a fixed mass, so its share of the total, and the trim that corrects it, falls as airflow rises.