Fuel trim calculations are obtained from the oxygen or air-fuel sensor signals while the system is in closed loop. The driver controls the amount of airflow into the combustion chamber by pressing the accelerator pedal, the PCM controls the amount of fuel.
The PCM uses pulse width fuel injection to adjust the fuel trim; it controls the amount of fuel injector on time. Fuel trim is a method used by the PCM to add fuel to or subtract fuel from the air-fuel mixture. The longer the injector is left open spraying fuel behind the intake valve, the richer the mixture. The shorter the length of time the injector is left open, the leaner the fuel mixture.
When a vacuum line is damaged or left disconnected, the oxygen sensor senses this increase of oxygen in the exhaust. The PCM receives this voltage signal and then compensates for the lean mixture by holding the fuel injectors open longer, resulting in an enriched fuel mixture.
Long term fuel trim LTFT changes as the engine's cylinders wear. Typically if LTFT and STFT percentages combined go beyond 10% either negative or positive, the PCM illuminates the check engine light indicating something a problem. LTFT is calculated by the PCM over time and many key cycles. The PCM saves this information for the next time it enters closed loop. Short term fuel trim is between key cycles.