Like any control system, there are two basic fuel modes in the DSM ECU: open loop and closed loop
In a nut shell, while running open loop the ECU just assumes it knows how much fuel is really going in and it assumes that accurate airflow data is being presented to it. It does not check these assumptions against anything. It just calculates how much fuel is needed to achieve a certain A/F ratio based on airflow data. It looks this target A/F ratio up in an open loop fuel table indexed by RPM and engine load.
In closed loop mode, the ECU checks itself by “watching” the front O2 sensor feedback. The factory front O2 sensor switches abruptly around 14.7:1 A/F ratio (assuming gasoline). The ECU tries to adjust fuel so that the O2 sensor swings back and forth around this target. To do that, the ECU has to have some way to vary its basic fuel calculation. It uses fuel trims for this purpose. Think of these variables as dials if you want. Turn the dial one way and the ECU adds fuel, turn the dial the other way and the ECU reduces fuel.
While running closed loop mode, the ECU uses what's called a “short term fuel trim” (STFT) variable for quick changes. This is the variable it uses to force the O2 sensor to cycle. In a perfect setup, this variable would swing from positive to negative values of about equal amplitude. As it's swinging up and down, the front O2 sensor signal should swing up and down. This is the basic closed loop mode of operation.
The ECU will also watch what's going on with the short term fuel trim variable. If conditions are right and the short term variable has stayed positive or negative long enough, the ECU will move the long term STFT pattern into the long term variable (LTFT). This is called a learning mode. Let's say instead of swinging around 0%, STFT is swinging up and down around -5%. The ECU will eventually take note of this and move that -5% adjustment into the appropriate LTFT variable and then zero out the STFT variable. Since both are factored in, the end result will be the same but STFT should now swing around 0%.
The ECU uses at least a couple different LTFT variables depending primarily on airflow. Lower airflow values seen at idle will typically result in the LTFT Lo variable being used (and updated). Higher airflow values seen at cruise will result in LTFT Mid (2G) or LTFT Hi (1G) typically being used.
There are several reasons the ECU might switch into or out of closed loop mode. In addition, even while running in closed loop mode, the ECU may or may not be running in a mode that allows learned STFT adjustments to propogate into the LTFT variables (learn mode). So there are really three different modes of operation.
We'll attempt to document some of the conditions that will force the ECU into or out of these modes. First, it's probably no surprise that these conditions are different between 1G and 2G ECU codebases. So the conditions will be listed separately for each.
The ECU will force open loop mode for a number of different reasons. The following is intended to list out the more common reasons. If any one of these is true, then the ECU will run in full open loop mode. That is, STFT will not be used and, of course, learn mode will not be active either.
All of the following have to be true for a full 5 seconds. If any single one is not true even for a millisecond, the timer starts over and trends in STFT will *not* be moved into LTFT.
In the direct access tab, you'll see an item called “LTFTSelect”. That table defines which of the 3 long term fuel trim variables (lo, mid, or hi) are selected for use/update at any given time. The selection is done based on MAF sensor frequency (after user compensation is applied).
You'll notice the stock values on a 2G DSM are:
Mid on/off: 88/75 High on/off: 1594/1594
Meaning the mid will be selected above 88hz and continue to be selected until the MAF sensor frequency drops below 75hz.
The 1594/1594 values effectively disable the high fuel trim selection on a 2G! If you want to re-enable, try these values instead (taken from an EVO3 ECU, which uses the same MAF sensor as a 2G DSM but has high fuel trims enabled!).
Mid on/off: 75/62 High on/off: 156/144
That will give you three long term fuel trim values, just like the 1G guys.