This section contains the settings necessary to do closed-loop Exhaust Gas Oxygen (EGO) control on the MegaSquirt III engine management system. Closed-loop EGO control allows the amount of fuel being injected to be changed so that the Air Fuel Ratio (AFR) matches the AFR set in the AFR table.
These settings are used to control the behavior of the closed-loop EGO algorithm.
The following settings are supported:
The EGO Ports settings allow the user to select the input port used to read the signal from the oxygen sensor. The number of EGO ports available depends on the number of sensors selected.
The following ports are available for the first EGO input:
The remaining EGO ports have the following input options:
The AFR/EGO Sensor Mapping settings allow individual injectors to be associated with available EGO sensors.
The following injector channels can be associated with a sensor:
The following EGO selections can be made for each injector channel:
A narrowband sensor is only accurate at exactly stoichiometric mixtures for the fuel being used (14.7:1 for gasoline). At around 0.5 volts, the mixture is stoichiometric. For leaner mixtures (above 14.7:1 for gasoline, above 1.0 lambda) the voltage dips slightly below 0.5 volts. For richer mixtures, the voltage goes above 0.5 volts. This behavior means that it is not possible to hold an exact mixture when running closed-loop with a narrowband sensor.
Because of this, the best algorithm to use with a narrowband sensor is the "simple" algorithm.
The simple algorithm adjusts the mixture richer if the sensor reads lean, and leaner if the sensor reads rich. It adjusts Controller Step Size percent every Ignition Events per Step. This can lead to a small oscillation in O2-based correction once the AFR reaches close to stoichiometric.
The following steps are recommended when tuning the simple algorithm with a narrowband sensor:
Tuning the simple algorithm with a wideband sensor is essentially the same as tuning it with a narrowband sensor with the caveat that the AFR target table is used to set the AFR target. It is still recommended that the EGO algorithm not be used at high throttle position/load due to the fact that the accuracy of the wideband sensor decreases dramatically with pressure and temperature changes caused by high load.
When using a narrowband sensor with the PID algorithm, all the same recommendations for settings given in the section describing the Simple algorithm should be followed.
Additionally, since it is nearly impossible to keep the narrowband sensor from oscillating, it is recommended to start by tuning the 'I' term until the target is reached with minimal oscillation. Once this point is reached. It is recommended that very little (if any) 'P' term is used since the 'P' part of the PID algorithm causes instantaneous reaction, and the response of the sensor is not proportional to the distance from stoichiometric.
When using a wideband sensor with the PID algorithm, the same steps as when using a narrowband sensor can be followed for tuning the 'I' term.
Additionally, since the response of most wideband controllers and sensors is linear with AFR, a larger 'P' term can be used to help correct for fast changes in AFR. Caution must still be used however since there is a significant delay between the amount of fuel being injected changing and MS3 registering an AFR change as a result.
Finally, a small amount of 'D' term can be used to help slow response during very fast changes. This helps reduce overshoot of the target.