EGO profile tuning

Ludis Langens ludis at cruzers.com
Thu May 21 10:52:47 GMT 1998


steve ravet <steve at sun4c409.imes.com> wrote:
>
> > standard O2 input, and change the 4 or 5 PROM bytes needed
> >to deal with the different voltage profile.
>
> Ludis, can you expand on this a little?  Is it that simple to change the
> EGO profile in the ECM?

Yup.  I checked how two different ECMs handle the O2 sensor.  In these
ECMs, there are ten specific sensor voltages that the ECM checks or
uses.  (Ok, so that's twice as many as my initial recollection.)  All
ten are tunable in the PROM.  Sorted by voltage (lean to rich) they are:

  Code 44 limit
  Transitioning lower bound
  Code 13 lower bound
  Stoich value
  Default value
  Target average lower bound
  Target average upper bound
  Code 13 upper bound
  Transitioning upper bound
  Code 45 limit

There are also constants for the expected sensor response rate, time
delays, filtering ratios, and etc.  All of these are also tunable in the
PROM.

The ECM maintains three variables with the O2 sensor value: One variable
with the latest raw AtoD result, and two filtered values.  These filters
are real simple - the equivalent of an analog RC filter.  One filter is
set to either a slow or moderate (depending on the ECM) level of
filtering.  This filter is used for codes 44 and 45.  The other filter
is set to respond slowly.  It should provide a long term average over
several rich/lean cycles.  This filter is used for fine adjustments of
the integrator.

The default value is used to initialize these variables.

The ALDL reports the raw AtoD value.


Here's how the constants are used:

if (codeO2Filter < Code 44 limit)
  {
  <other conditions>
  <time delay (~ half a minute)>
  Set code 44
  Set bad O2  /* forces open loop */
  }

if (codeO2Filter > Code 45 limit)
  {
  <other conditions>
  <time delay (~ one minute)>
  Set code 45
  Set bad O2  /* forces open loop */
  }

if (Code 13 lower bound < rawO2 < Code 13 upper bound)
  {
  <other conditions>
  <time delay (~10 seconds)>
  Set code 13
  }

if (Transitioning lower bound < rawO2 < Transitioning upper bound)
  {
  <time delay (~10 seconds)>
  Force open loop
  }

if (rawO2 < Stoich)
  {
  Flag "lean"
  Fuel adjustment = Integrator + tunable constant;
  }
else
  {
  Flag "rich"
  Fuel adjustment = Integrator - tunable constant;
  }

<~10 times a second>
  {
  if (slowO2Filter < Target average lower bound)
    Integrator++
  else if (slowO2Filter > Target average upper bound)
    Integrator--
  }


The transitioning bounds are used to make sure the O2 sensor is
switching back and fourth.  Once it transitions away from one peak, it
must switch to the other peak or return back to the original peak within
a certain time limit.  If the sensor hovers in an intermediate range,
that is considered a failure.

The target average makes sure that the rich peaks cancel out the lean
peaks.  The target is specified as two values (i.e. a range).  However,
I've never seen a case where both numbers weren't the same.  This seems
to be GM's favorite tuning constant.  Just about every calibration has a
different value.  For example, a manual transmission is set to average
at stoich, while an automatic is set quite rich.  (Note, the Integrator
is also adjusted elsewhere.)


Both of the ECMs I checked are older C3 variants.  Neither is a 1227747
or similar.  The '747 (and probably most newer ECMs) has a much more
complex closed loop feedback function.  In particular, it adds a third
filter, which is set to respond very quickly.  The fuel adjustment
appears to have an intermediate state where it is equal to the
integrator.  Some of the filtering ratios and response time delays are
also no longer simple constants.  I haven't yet had occasion to figure
out this code.  If someone wishes to stare at several hundred 68xx
instructions, I can point out the code in a disassembly.  I also know
what most of this code's RAM variable inputs/outputs are.


If the EGO profile is changed, the ten specific values can be simply
mapped to the new profile.  The only difficult item is the target
range:  If the profile has a much different shape, this will skew the
average as parts of the profile gain/lose influence.  (This isn't a
problem with the code 44/45 filter as that filter is mostly used to
detect an open or shorted O2 circuit.)

One change that a PROM tweak can't handle is an inverted input.  The
program expects lean to be zeroish and rich to be one voltish.  (But, in
a newer ECM with all the code in PROM, the sense of the compare
instructions could be flipped.)

               unsigned long BinToBCD(unsigned long i) {unsigned long t;
Ludis Langens     return i ? (t = BinToBCD(i >> 1), (t << 1) + (i & 1) + 
ludis at cruzers.com            (t + 858993459 >> 2 & 572662306) * 3) : 0;}





More information about the Diy_efi mailing list