Lean AFRs on transition, Accel increase table !?

Nistune topics related specifically to the 6303 cpu

Moderator: Matt

Post Reply
RomChip200
 

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

Lean AFRs on transition, Accel increase table !?

Post by RomChip200 »

I run E85 (ethanol) since 2007 on Z32, and now, with the background I have, I'm looking for the perfection :)
I run my timing maps at the limit of knock (E85 takes it without any trouble) but I would like to solve an issue I have more or less since the beginning.
I run quite lean values when cruising (typically AFR 16-17) to save fuel, not a problem with E85 too or about driveability, and AFR 11.5-12 on full boost.
Now, if I floor suddenly the throttle, TP increases quickly and I have too much lean values in this transition meaning the ECU is vuluntarily retarding timing and it keeps doing so till the full boost is reached (ECU is conservative, if light knock is detected in TP mid-range, timing is retarded during all the acceleration even if no more knock ...)
On the other hand, if I go "through" the TP range when accelerating (so more smoothly), at the same point, the AFR values are not lean.
So this is just a problem of very quick transition and typically the role of the famous "Acceleration increase volume" table.
I don't know where this table is on Z32 (I know it on CA18DET) and how this could help my problem of transitional values.
Adrian
 

Posts: 57
Joined: Tue Mar 13, 2012 1:57 pm

Re: Lean AFRs on transition, Accel increase table !?

Post by Adrian »

Try to change the values in last columb. As soon as you kick down the pedal to WOT. the ECU takes the values of the last columb. Look at the other thread for more details.
RomChip200
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by RomChip200 »

A&M-Motorsport wrote:Try to change the values in last columb. As soon as you kick down the pedal to WOT. the ECU takes the values of the last columb. Look at the other thread for more details.
This is not applicable to Z32.
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

Romchip - are you aware of any acceleration enrichment tables for Z32?

R32 has 4 x TPS enrich tables based on RPM and SR20 have some TPS enrich tables which I've been going through recently but havent found anything obvious for Z32 yet
RomChip200
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by RomChip200 »

I think there's no such tables on Z32, at least not in the same flavor.
I'm working on the routines managing the throttle and the quick variation on it and how this is echoed on the injection enrichment routine (that takes mainly knock situation, warmup (...) as inputs).
Need to log some internal variables related to throttle.


I'm going to find a solution for my own problem (first post). :lol:
To be continued.
RomChip200
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by RomChip200 »

Some news (applicable to Z32):

I found that:

Code: Select all

RAM2:14B5 acc_coefx100:       rmb 2   
RAM2:152E throttle_delta_pos: rmb 1
RAM2:152F throttle_delta_4:   rmb 1
RAM2:15A9 throttle_delta_10:  rmb 1
RAM2:15DF throttle_filt:      rmb 1 
acc_coefx100 is an offset added to injection time directly into the injection bank computation routine:

Code: Select all

CODE:98DC ; Compute bank 1 ---------------------------------------------------
CODE:98DC 
CODE:98DC                     tim #1, flags6                ; Bit 0: throttle switch (1=idle)
CODE:98DC                                                   ; Bit 1: high octane (if 1, becomes 0 when bit0 of flags5 is set to 1)
CODE:98DC                                                   ; Bit 2: neutral switch(1=neutral)
CODE:98DC                                                   ; Bit 3: power steering switch (1=on)
CODE:98DC                                                   ; Bit 4: A/C switch (1=on)
CODE:98DC                                                   ; Bit 7: gear engaged and high gear
CODE:98DF                     beq icb_11
CODE:98DF 
CODE:98E1                     ldd afr_var42
CODE:98E4                     bra icb_12
CODE:98E4 
CODE:98E6 
CODE:98E6 icb_11:                                           ; ...
CODE:98E6                     ldd afr_bank2_coef
CODE:98E9 
CODE:98E9 icb_12:                                           ; ...
CODE:98E9                     staa afr_learn_right
CODE:98EC                     addd afr_bank1_max
CODE:98EF                     sbca #100
CODE:98F1                     jsr mul16_D_P1                ; P1=D=D*P1
CODE:98F1 
CODE:98F4                     addb inj_tot_latency
CODE:98F7                     adca #0
CODE:98F9                     addd acc_coefx100
CODE:98FC                     std inj_bb1
throttle_delta_pos is calculated very early in the throttle computation routine. It's throttle variation over 3 periods (curent-previous value).
throttle_delta_4 is more or less the same, but centered around 128.
throttle_delta_10 is variation over 10 periods and centered around 128.
throttle_filt is the filtered value of throttle (=179 when throttle= 4.04 volts max)

On the graph below, AFR Alpha Learn LHS/RHS are in fact acc_coefx100
AFR alpha LHS is in fact throttle_delta_pos
Nistune_accel_increase.jpg
(272.92 KiB) Downloaded 5258 times
On the graph below, Injection time LHS is in fact throttle_delta_4 and Injection time RHS is in fact throttle_delta_10
Nistune_accel_increase2.jpg
(275.62 KiB) Downloaded 5258 times
So, now you can track the quick variations of throttle and do additional things.

Some interesting tables:

Code: Select all

DATA:F900 acc_throttle_delta_map:fcb   5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5 ; ...
DATA:F910 acc_throttle_map:   fcb  64, 64, 64, 64, 40, 22,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0 ; ...
DATA:FBC0 acc_temp_map:       fcb 143,143,132,125,119,113,108,100, 96, 88, 80, 72, 64, 64, 64, 64 ;
acc_throttle_delta_map is interpolated by 16 with throttle_delta_pos as input (multiplied 3 times by 2 and eventually maxed out)
acc_throttle_map is interpolated by 16 with throttle_filt as input
acc_temp_map is temperature contribution

Code: Select all

CODE:9FEE ; Compute enrichment on throttle position variation ----------------------------
CODE:9FEE 
CODE:9FEE ct_46:                                            ; ...
CODE:9FEE                     tst throttle_var6
CODE:9FF1                     bne ct_45
CODE:9FF1 
CODE:9FF3                     ldaa rpm_d4_lo                ; rpm_div_4_lo=lo(Engine speed/50)
CODE:9FF6                     cmpa rpm_limit1
CODE:9FF9                     bcc ct_45
CODE:9FF9 
CODE:9FFB ; Throttle position variation contribution
CODE:9FFB 
CODE:9FFB                     ldaa throttle_delta_pos       ; Throttle variation if positive (while opening)
CODE:9FFE                     asla
CODE:9FFF                     bcs ct_47
CODE:9FFF 
CODE:A001                     cmpa throttle_const13
CODE:A004                     bcs ct_45
CODE:A004 
CODE:A006                     asla
CODE:A007                     bcs ct_47
CODE:A007 
CODE:A009                     asla
CODE:A00A                     bcc ct_48
CODE:A00A 
CODE:A00C 
CODE:A00C ct_47:                                            ; ...
CODE:A00C                     ldaa #255
CODE:A00E 
CODE:A00E ct_48:                                            ; ...
CODE:A00E                     ldx #acc_throttle_delta_map
CODE:A011                     jsr interp_16                 ; X=table adress
CODE:A011                                                   ; A=value to look up
CODE:A011                                                   ; 
CODE:A011                                                   ; A=output value
CODE:A011 
CODE:A014                     staa acc_throttle_delta
CODE:A017                     beq ct_45
CODE:A017 
CODE:A019 ; Throttle position contribution
CODE:A019 
CODE:A019                     ldaa throttle_filt            ; Low-pass filtered throttle position
CODE:A01C                     ldx #acc_throttle_map
CODE:A01F                     jsr interp_16                 ; X=table adress
CODE:A01F                                                   ; A=value to look up
CODE:A01F                                                   ; 
CODE:A01F                                                   ; A=output value
CODE:A01F 
CODE:A022                     staa acc_throttle
CODE:A025                     beq ct_45
CODE:A025 
CODE:A027 ; Engine temperature contribution
CODE:A027 
CODE:A027                     ldaa engine_temp2             ; engine_temp*1.6+0.5
CODE:A029                     ldx #acc_temp_map
CODE:A02C                     jsr interp_16                 ; X=table adress
CODE:A02C                                                   ; A=value to look up
CODE:A02C                                                   ; 
CODE:A02C                                                   ; A=output value
CODE:A02C 
CODE:A02F                     staa acc_temp
CODE:A032                     beq ct_45
CODE:A032 
CODE:A034                     ldaa acc_throttle_delta
CODE:A037                     ldab acc_throttle
CODE:A03A                     mul
CODE:A03B                     std P1
CODE:A03D                     ldaa acc_temp
CODE:A040                     jsr mul16_A_P1                ; P1=D=A*(P1+P2/256)
CODE:A040 
CODE:A043                     std acc_coef
CODE:A046                     ldaa #100
CODE:A048                     jsr mul16_A_P1                ; P1=D=A*(P1+P2/256)
CODE:A048 
CODE:A04B 
CODE:A04B ct_49:                                            ; ...
CODE:A04B                     std acc_coefx100
Bernardd
 

Posts: 253
Joined: Thu Jan 26, 2006 3:20 am

Re: Lean AFRs on transition, Accel increase table !?

Post by Bernardd »

So the "Fuel Increase Rate" constant is the "acc_coefx100"? ROM/Matt, have you tested the tables to see how the injection time reacts?

This is my understanding of ROM's descriptions:

F900 tells the ecu to decide if the throttle is being opened. Does it decide by how much?

F910; is the actual tps enrichment map or pump shot in the carb world. Are the values based on tp or rpm?

FBC0; is another enrichment map based on engine temp.

Matt, can a moates emulator be setup to trace these maps for testing incar? I have some free time today to run around with the car and I have access to a moates if it'll work.

EDIT:

Fired up the car to do some real world testing. F900 and F910 have influence on throttle input. I'm able to stall the car with a quick blip of the throttle with the values doubled. Inj pw went over 20ms.
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

Good work with the disassembly romchip

Bernard - current address for 'fuel increase rate' which is actually not valid for Z32 so this parameter is getting removed in the next release address file

Moates 2.0 with 'hardware maptracing' enabled and ECU powered on (the hardware tracing on this thing only really works when the ECU program is running, otherwise it doesnt respond to us as expected) will trace where in those tables
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

Rom chip has detailed all the calculations in the code above and indicated the lookup indexes

F900 based from positive throttle variation (change in position - hence a delta table)
F910 based from filtered throttle position (TPS)

FBC0 adjustments from the above maps are multiplied against the coolant temperature

I'll add the maps in and verify the TPS tracing matches via hw tracing
Bernardd
 

Posts: 253
Joined: Thu Jan 26, 2006 3:20 am

Re: Lean AFRs on transition, Accel increase table !?

Post by Bernardd »

What about the acc_coefx100 ? Is this a constant?
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

RAM2:14B5 acc_coefx100: rmb 2
RAM = memory address. cannot comment on where it is computed at the moment without looking at code again
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

I've put the table as 0, 256mv, 512mv, 768mv etc to fit between 0.. 4096mv
This on the bench traces a delta between current and new TPS position so we cannot intuitively trace this one within the software.

Accel enrichment Delta is just leave as raw entries 1..16 and values

Accel temp hysterisis just traces against coolant temp similar to other tables
Torque
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Torque »

The explanation that the last column of the fuel table would be
used when TPS hits a certain value was always a known myth.

I questioned this a few times on this forum.

It always had to be about a delta over time if it should make any sense.
Sadly I am not as deep into the machine code as you guys but I hope
that this riddle gets solved.

Good work!
Matt
Site Admin
 

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

Re: Lean AFRs on transition, Accel increase table !?

Post by Matt »

For the Z32 it was not valid. Even though it does work this way on many other ECU types (like SR20 and RB20). Just Nissan tends to vary the code functionality on some models which messed up the address file for this one
Post Reply