Oxygen sensors
Dale Ulan
ulan at ee.ualberta.ca
Thu Nov 3 16:48:08 GMT 1994
> ok, so if its cold the output voltage stays between, say, .3V and .6V
> for an extended period of time. Once it exceeds these thresholds, we
> declare it's hot enough to use.
Something like that, anyways. There are a couple timers in there
as well.
> If the amplitude primarily indicates temperature, wouldn't a
> correction based on expected temperature have to be applied *before*
> a PID controller? I imagine that is, in part, what the tables
> do. Can you give us a better description of the tables?
>
***************************************************************************
*
* Airflow dependant INTEGRATOR rate
*
KO2INTEG1 time12 180
time12 110
time12 79
time12 55
time12 40
KO2MEANTRIP
db $64,$60,$5E,$5E,$5E ;Mean trip value
KO2RICHSTEP
db $73,$68,$5E,$5E,$5E ;rich step trip
KO2NORMTRIP
db $5A,$5C,$5E,$5E,$5E ;centre step trip
TO2AFFILT ;airflow filter to slow ramp of O2 sensor
db $07,$0A,$10,$16,$1A
****************************************************************************
*
* Differentiator step size based on O2 osc size
*
*
TO2PK fac256 47 ;
fac256 47 ;
fac256 47 ;
fac256 47 ;
fac256 51 ;
fac256 63 ;
fac256 63 ;
fac256 71 ;
fac256 86 ;
fac256 110 ;
fac256 125 ;
fac256 141 ;
fac256 157 ;
****************************************************************************
*
* Maximum allowed cross time. If the sensor is slower, than try to
* correct by using the INTEGRATOR. Uses O2 osc size as a scale.
*
TO2CROSSTIME
time12 10
time12 16
time12 24
time12 24
time12 32
time12 40
time12 64
time12 94
time12 188
time12 376
time12 752
time12 1876
****************************************************************************
*
* Oxygen Sensor expected cross-time adjustment for airflow
*
TO2CROSSTIMEADJ ;airflow adjustable O2 cross-time
time12 0 ; 0 Counts
time12 0 ;10 Counts
time12 10 ;20 Counts
time12 10 ;30 Counts
time12 0 ;40 Counts
****************************************************************************
*
* Decay rate of the D section of the PID controller (max: 1.000)
*
*
TO2IRATE fac256 137 ; 0 Counts
fac256 176 ;10 Counts
fac256 273 ;20 Counts
fac256 313 ;30 Counts
fac256 375 ;40 Counts
****************************************************************************
*
* Integrator Time in ms.
*
* indexed by O2 osc size This is the integrator holdoff time.
*
TO2INTEG2 time12 2000
time12 2000
time12 2000
time12 1750
time12 1500
time12 1250
time12 876
time12 750
time12 750
time12 876
time12 1500
time12 1500
****************************************************************************
*
* O2 trip voltage adjustment
*
TO2ECTTBL ;voltage effects vs. engine temperature
db $c0 ;header
db 0 ;HOT Engine Temp
db 0 ;138.5 C
db 0 ;108.5 C
db 0 ;92.0 C
db 4 ;80.5 C
db 4 ;71.5 C
db 4 ;63.5 C
db 4 ;56.5 C
db 4 ;49.7 C
db 4 ;43.7 C
db 4 ;37.3 C
db 4 ;31.0 C
db 0 ;24.0 C and colder
> What do you think of the approach of just hard-limiting the sensor
> output once it warms-up and integrating?
It'll work but won't be that good.
> Do the PID coefficients look like it's dominated by I?
Actually, the I section is kinda wierd, as the coefficient is 0 until
the D section has timed out. This time is in the order of 2 seconds,
as in the table above...
PID controllers become wierd when you start putting holdoff timers
all over the place. I can't simulate this very easily in Matlab, but
I certainly can run it on my HC11 board and figure out what's happening.
It looks as though the 'D' section is the dominating factor. As far
as I can tell from the source code, anyways. I don't think it's legal
for me to post source code in here, though. The source I have is disassembled
from ROM, and any comments are those that I figured out...
-Dale
More information about the Diy_efi
mailing list