O2 feedback at idle and general O2 questions

Nistune topics related specifically to the 6303 cpu

Moderator: Matt

RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: O2 feedback at idle and general O2 questions

Post by RomChip200 »

foliage wrote: I think you should post up what you have done and a guide, there would be LOTS of people interested in this sort of thing.
viewtopic.php?f=6&t=2344

Here's is one of the latest versions (I roughly did 33 main versions accross 4 years):
Test_v33_3.txt
(59.66 KiB) Downloaded 248 times
There're 2 main features:
_auto K adjustment with monitoring lambda sensors in idle (lambda sensors are not monitored when cruising, I disabled it, because I want to cruise @17 AFR on ethanol)
_knock warning : the dashboard MIL is lighted up when knock starts to occur (all thresholds can be tuned in the asm)
foliage
 

Posts: 64
Joined: Sat Aug 07, 2010 9:29 pm

Re: O2 feedback at idle and general O2 questions

Post by foliage »

How does the O2 tuning work currently, just adjust the pulsewidth?
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: O2 feedback at idle and general O2 questions

Post by Torque »

RomChip200 wrote:On Z32, O2 sensors are monitored at idle when TPS is closed, neutral switch has not impact.
Personnally I'm in closed loop at idle and in open loop the rest of the time (I modded the bin for that)
I achieve to make my Z32 flex fuel in this way: I monitor richness at idle and modify K on the fly, with of course some hysteresis and algorithm from my mind.

Hi!

I think Lambda is not observed while being idle on Z32.
I took many logs and the O2 graph only fluctuates while giving the engine some revs

My WB-Sensor confirmed this.

Also the Z32 manual states that you have to keep rpm at about 2000 rpm to check the lambda sensor.
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: O2 feedback at idle and general O2 questions

Post by RomChip200 »

Torque wrote: Hi!

I think Lambda is not observed while being idle on Z32.
I took many logs and the O2 graph only fluctuates while giving the engine some revs

My WB-Sensor confirmed this.

Also the Z32 manual states that you have to keep rpm at about 2000 rpm to check the lambda sensor.
You should go deeper.

O2 OEM Sensors are monitored in idle, and these factors are corrected after about 30seconds standing in idle:
afr_left EQU 0x1625
afr_right EQU 0x1626
afr_learn_left EQU 0x1623
afr_learn_right EQU 0x1624
so, afr_learn_maps (0x1700 & 0x1780) are also filled in idle and these factors are affected in idle and are also used to apply correction :
afr_var42 EQU 0x16A5
afr_var24 EQU 0x16A7

To calculate afr_var42 and afr_var24, the ECU "averages" the full afr learn map.
In idle, afr_var42/24 are copied into afr_learn_left/afr_learn_right locations

My 300 achieves a perfect 14.7 on both banks (measured with my 2 widebands). How do you think the ECU achieves such thing ?
Nothing magic.

Note: I just disassembled RB20DETT (roughly the parts I was interested in) and this is the same ..... Many routines are the same but just located in different locations :
(04U12)

Code: Select all

CODE:8DA4  Compute bank injection
CODE:8DA4                 tim     #1, flags6      ; Bit 0: throttle switch (1=idle)
CODE:8DA4                                         ; Bit 1: high octane (if 1, becomes 0 when bit0 of flags5 is set to 1)
CODE:8DA4                                         ; Bit 2: neutral switch(1=neutral)
CODE:8DA4                                         ; Bit 3: power steering switch (1=on)
CODE:8DA4                                         ; Bit 4: A/C switch (1=on)
CODE:8DA4                                         ; Bit 7: gear engaged and high gear
CODE:8DA7                 beq     loc_8DAE
CODE:8DA9                 ldd     afr_var42
CODE:8DAC                 bra     loc_8DB1
CODE:8DAE ; ---------------------------------------------------------------------------
CODE:8DAE 
CODE:8DAE loc_8DAE:                               ; CODE XREF: inj_compute_banks+5Ej
CODE:8DAE                 ldd     afr_bank2_coef
CODE:8DB1 
CODE:8DB1 loc_8DB1:                               ; CODE XREF: inj_compute_banks+63j
CODE:8DB1                 staa    afr_learn_left
CODE:8DB4                 addd    afr_bank2_max
CODE:8DB7                 sbca    #100
CODE:8DB9                 jsr     mul16_D_P1
CODE:8DBC                 addb    inj_tot_latency
CODE:8DBF                 adca    #0
CODE:8DC1                 addd    acc_coefx100
CODE:8DC4                 std     inj_bb2
CODE:8DC7                 rts
Good luck.
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: O2 feedback at idle and general O2 questions

Post by Torque »

Thanks for that .. but I can only report my findings using the empirical data I collected.

Have you ever considered drawing a flow diagram of the Z32 ASM code?
By now (25 years on) every single bit should have been analysed ..
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: O2 feedback at idle and general O2 questions

Post by Torque »

Here's a log showing that there is no Lambda trimming taking place unless you rev the engine up (RPM=RED)
Its pretty obvious, isn't it?
Attachments
LAMBDA_RB.jpg
(323.3 KiB) Downloaded 3528 times
foliage
 

Posts: 64
Joined: Sat Aug 07, 2010 9:29 pm

Re: O2 feedback at idle and general O2 questions

Post by foliage »

It might still be trimming but something is keeping it rich, eg if you assist tpmin like I did it essentially breaks the o2 learn
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: O2 feedback at idle and general O2 questions

Post by RomChip200 »

This is what also happens when your injector latency is set too high ...

Read the afr learn maps tables in 0x1700 (left bank) and 0x1780 (right bank), each table is 128 bytes.
I'm pretty sure the correction values in the tables will give you some tricks.

This is why you need to tune the closed loop area. with widebands.
If you put stupid values there, you will be wrong mainly in mid range, just after the closed loop, on full boost (but so rich that is less noticeable) and in idle ...

Too lean values in closed loop, your afr learn maps will be maxed out (max 110 in OEM), mid range will be too rich and idle too ...
Too rich values in closed loop, your afr learn maps will be min (min 90 in OEM), mid range will be leaned out and idle will be too much lean (so you think wrongly you need to compensate with other factors as ttp min or latency).
foliage
 

Posts: 64
Joined: Sat Aug 07, 2010 9:29 pm

Re: O2 feedback at idle and general O2 questions

Post by foliage »

Is that the short term and long term afr learn vales you are talking about? If so that might be my issue, I will check them
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: O2 feedback at idle and general O2 questions

Post by RomChip200 »

Here is an example of afr learn maps (don't care about the values, this is wanted values in my case, my values go from 75 to 125):

Code: Select all

Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F

00001700   64 32 6B CC 72 65 71 C7  6C A7 67 34 64 43 64 1E   d2kÌreqÇl§g4dCd.
00001710   70 2A 7D 9A 7D 00 7D C3  7D 6C 6F B5 64 98 64 60   p*}š}.}Ã}loµd˜d`
00001720   7D 00 7D 00 7D 00 7D 00  7D 03 7D 00 6B A9 6A E4   }.}.}.}.}.}.k©jä
00001730   7D 67 7D 00 7D 00 7D 00  7D 00 7D 54 78 C1 75 3E   }g}.}.}.}.}TxÁu>
00001740   7D 00 7D 00 7D 00 7D 00  7D 00 7D 00 79 A7 70 C6   }.}.}.}.}.}.y§pÆ
00001750   7D 00 7D 00 7D 00 7D 00  7D 00 7D 0F 71 A9 64 1C   }.}.}.}.}.}.q©d.
00001760   7D 01 7D 00 7D 00 7D 82  7D 06 7D D1 6A 92 64 00   }.}.}.}‚}.}Ñj’d.
00001770   65 EE 6E E6 73 9D 7B 68  7D FA 68 FC 64 14 64 00   eînæs{h}úhüd.d.


00001780   64 3E 6D 04 78 5F 79 15  6F 0D 68 1B 64 55 64 00   d>m.x_y.o.h.dUd.
00001790   71 29 7D D6 7D 00 7D EC  7D 83 6F 20 64 B0 64 3B   q)}Ö}.}ì}ƒo d°d;
000017A0   7D 00 7D 00 7D 00 7D 00  7D 49 7D 0A 6B 73 6A 0B   }.}.}.}.}I}.ksj.
000017B0   7D 72 7D 00 7D 00 7D 00  7D 00 7D B6 79 3A 75 2D   }r}.}.}.}.}¶y:u-
000017C0   7D 00 7D 00 7D 00 7D 00  7D 00 7D 00 7A 51 70 77   }.}.}.}.}.}.zQpw
000017D0   7D 00 7D 00 7D 00 7D 00  7D 00 7D 13 72 1A 64 1B   }.}.}.}.}.}.r.d.
000017E0   7D 00 7D 00 7D 00 7D 72  7D 07 7D DD 6A A5 64 00   }.}.}.}r}.}Ýj¥d.
000017F0   65 E2 6E CA 73 E4 7A 8F  7D D9 69 69 64 27 64 00   eânÊsäz}Ùiid'd.
The factors are at even addresses e.g. 64 is 100, 6B is 107 etc .... 7D is 125
RPM scale is on Y axis and TP scale is on X axis

Code: Select all

afr_tp_scale	EQU	0xFBA0
afr_rpm_scale   EQU	0xFBA8

        org afr_tp_scale
afr_tp_scale_       fcb  4,7,10,15,19,23,27,31		      ; OEM values: fcb   6,  6,  8, 36, 56, 56,255,255 

        org afr_rpm_scale
afr_rpm_scale_      fcb  16,24,36,48,56,64,76,88              ; OEM values: fcb  16, 16, 16, 16, 40, 80,104,104
;  800,1200,1800,2400,2800,3200,3800,4400
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: O2 feedback at idle and general O2 questions

Post by Torque »

foliage wrote:It might still be trimming but something is keeping it rich, eg if you assist tpmin like I did it essentially breaks the o2 learn
Thanks ..
Can you elaborate a bit more please?

TP MIN break the learn?
Interesting ..
RomChip200
 

Posts: 426
Joined: Mon May 11, 2009 7:58 pm
Location: FRANCE

Re: O2 feedback at idle and general O2 questions

Post by RomChip200 »

Torque wrote:
foliage wrote:It might still be trimming but something is keeping it rich, eg if you assist tpmin like I did it essentially breaks the o2 learn
Thanks ..
Can you elaborate a bit more please?

TP MIN break the learn?
Interesting ..

This is quite evident in fact ... ttp_min and ttp_max put boundaries on TP itself.
Once TP gets a certain value, there's a range for which it cannot be corrected by afr learn factors .... their OEM range is 90% ... 110% ... 0.9 ... 1.1
Intrinsically, it doesn't break the learn activity, it trims the correction factor to the its range limit
Example:
Your target TP @idle is 6 (wideband AFR measured=14.7), if TTP_min @400-800rpm is 10, 10x0.9 = 9 ...
How do you think to reach 6 in such way ???

Code: Select all

CODE:97B4 ict_11:                                           ; ...
CODE:97B4                     ldx ttp_min
CODE:97B7                     cpx tp
CODE:97BA                     bcs ict_12                    ; If tp>ttp_min then branch
CODE:97BA 
CODE:97BC                     stx tp                        ; Else tp=ttp_min
CODE:97BF 
CODE:97BF ict_12:                                           ; ...
CODE:97BF                     ldx ttp_max
CODE:97C2                     cpx tp
CODE:97C5                     bcc ict_13                    ; If tp<ttp_max then branch
CODE:97C5 
CODE:97C7                     stx tp                        ; Else tp=ttp_max
CODE:97CA 
CODE:97CA ict_13:                                           ; ...
CODE:97CA                     rts
CODE:97CA 
CODE:97CA ; End of function inj_compute_tp
Matt
Site Admin
 

Posts: 8993
Joined: Sun Jan 29, 2006 1:45 am
Location: Adelaide, Australia
Contact:

Re: O2 feedback at idle and general O2 questions

Post by Matt »

Thanks for posting those self-learn maps. I recently found the scales for these in SR20 code. I'm thinking of adding a 3D map display by copying the RAM values into it for visual display
Torque
 

Posts: 639
Joined: Wed Jun 16, 2010 10:08 am

Re: O2 feedback at idle and general O2 questions

Post by Torque »

What is the relationship of these 3D maps to the trimming values?
UNISA JECS
 

Posts: 367
Joined: Wed Jun 04, 2008 3:48 am
Location: USA Socal

Re: O2 feedback at idle and general O2 questions

Post by UNISA JECS »

Sorry to post this in the Type 2 section but this came up when I was searching and seemed similar to the issue I been having.

I to have noticed specifically with my Type 3 Nistune B13SR20DE that it is very hard to get the car to stay at 14.7AFR continuously at idle vs my Type 4 Nistune B14 ECU.

On my Type 3 Nistune I can usually get it to hold ~14.7 pretty much rock solid for up to about 5 minutes or at idle, then after that 5 minutes or so no matter what will drop and hold consistant 13.8AFR all day long. My LTFT will be at 100% and STFT will very a little bit on the positive side so leads me to believe I am close as it is not tacking on to my LTFT.


My Type 4 Nistune will idle beautiful with my LTFT and STFT rock sold at 100% pretty much and will hold idle for hours on end without moving from 14.7AFR +/- .2~.

This is a video with my Type 4 Nistune ECU which doesn't have the idle issue.
http://youtu.be/EFbESRH0r6Q
Post Reply