now simulating front O2 signal using WB signal
Understood. Although this could possibly work for closed loop fueling under a mixed fuel condition, how would open loop work. You would still need seperate fuel maps, thus making this idea not a true "set it and forget it" method. Right?
Thread Starter
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
v1.1
I must say its much bigger than any of my previous rinky-dink patches. Almost ready to post it. Its working fine in sim, but want to try driving it (this evening) before posting the source code.
I must say its much bigger than any of my previous rinky-dink patches. Almost ready to post it. Its working fine in sim, but want to try driving it (this evening) before posting the source code.
Thread Starter
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Source code is attached as a zipped Excel file. I thought about starting a new thread, but didn't see the point. I'll start a new thread when I'm ready to post a patch with instructions.
The basic concept of the NBO2 simulation is straightforward -- create a simulated NBO2 signal with a high plateau for rich AFR, a low plateau for lean AFR, and then connect the plateaus with a steep transition region. The width of the transition in my sim is about 0.6 AFR (gasoline). From my observations of AFR using the LC-1, the width of Evo front O2 sensor transition region is about 0.6 AFR. I can easily go more narrow to a width of about 0.3 AFR and will try this after getting a little more seat time with the 0.6 AFR width.
The other key feature is that subroutine calls the octane averaged AFR value from the AFR lookup subroutine and uses that octane averaged AFR as the target AFR for closed loop driving, so now those tables can be used to adjust closed loop AFR.
Its all pretty straightforward concepts. I have been using v1 since Sunday. It has just a single target closed loop AFR value. I'm going try v4 on Thursday. It keys off the AFR maps for the target AFR value and has a cold engine global closed loop AFR value.
Some people I'm sure are going to be interested in the idea of trying to run closed loop over the full load and rpm range. This patch simulates standard NBO2 sensor behavior which generates a relatively wide fluctuation in AFR (about 0.6 AFR wide). This is really is too wide of an AFR window for high loads. If the target afr were 11.3:1, the AFR would swing between 11.0:1 and 11.6:1. Not good.
The new definitions for ECUFlash are shown below. mL and bL are the slope and intercept of the WBO2 calibration from ADC values to AFR values.
The basic concept of the NBO2 simulation is straightforward -- create a simulated NBO2 signal with a high plateau for rich AFR, a low plateau for lean AFR, and then connect the plateaus with a steep transition region. The width of the transition in my sim is about 0.6 AFR (gasoline). From my observations of AFR using the LC-1, the width of Evo front O2 sensor transition region is about 0.6 AFR. I can easily go more narrow to a width of about 0.3 AFR and will try this after getting a little more seat time with the 0.6 AFR width.
The other key feature is that subroutine calls the octane averaged AFR value from the AFR lookup subroutine and uses that octane averaged AFR as the target AFR for closed loop driving, so now those tables can be used to adjust closed loop AFR.
Its all pretty straightforward concepts. I have been using v1 since Sunday. It has just a single target closed loop AFR value. I'm going try v4 on Thursday. It keys off the AFR maps for the target AFR value and has a cold engine global closed loop AFR value.
Some people I'm sure are going to be interested in the idea of trying to run closed loop over the full load and rpm range. This patch simulates standard NBO2 sensor behavior which generates a relatively wide fluctuation in AFR (about 0.6 AFR wide). This is really is too wide of an AFR window for high loads. If the target afr were 11.3:1, the AFR would swing between 11.0:1 and 11.6:1. Not good.
The new definitions for ECUFlash are shown below. mL and bL are the slope and intercept of the WBO2 calibration from ADC values to AFR values.
Code:
<table name="Narrow Band Sim On/Off" category="Front/Rear_02" address="8734" type="1D" level="1" scaling="uint8"/>
<table name="Low Coolant Temp Closed Loop AFR" category="Front/Rear_02" address="8736" type="1D" level="1" scaling="AFR16"/>
<table name="Min Coolant Temp For AFR Table" category="Front/Rear_02" address="8738" type="1D" level="1" scaling="Temp"/>
<table name="AFR Table Multiplier High Word" category="Front/Rear_02" address="873A" type="1D" level="1" scaling="Hex16"/>
<table name="AFR Table Multiplier Low Word" category="Front/Rear_02" address="873C" type="1D" level="1" scaling="Hex16"/>
<scaling name="x8" units="%" toexpr="x/8" frexpr="x*8" format="%.1f" min="0" max="100" inc="0.1" storagetype="uint16" endian="big"/>
<table name="LC-1 AFR Correlation 1/mL Value" category="Front/Rear_02" address="873E" type="1D" level="1" scaling="x8"/>
<table name="LC-1 AFR Correlation bL/mL Value" category="Front/Rear_02" address="8740" type="1D" level="1" scaling="uint16"/>
Sorry if I sound stupid, but how is this different to using the narrow band output of the wideband sensor? I guess the difference is that it allows changing the target AFR whereas the a regular narrowband signal will always have 0.5v be 14.7:1.
Thread Starter
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Finally got a working version that follows the fuel map during closed loop cruise. Overall its working as intended. I set the fuel leanest in the cruise cells, and then richen it up progressively as load increases. This keeps the car from feeling too anemic when attempting to accelerate in closed loop. I also set the idle closer to 14.7 to help keep the idle smooth. I want to tweak the code a little more to see if I can tighten up the AFR oscillations, and then I'll release a patch for the 88590015 ROM. I'm sure a large part of the range of the oscillations is the relatively large distance of the WBO2 sensor from the cylinders, so probably not too much I can do.
A few people asked how simulating the front O2 will affect the trims. The ECU still setting the base fuel pulse to follow 14.7 AFR, but the simulated O2 signal is telling the ECU the AFR 15.x, so the end result is that the ECU pulls fuel using the trims. The idle trim had dropped to about -6.5 after 20 minutes of stop and go. Hadn't been long enough for the cruise trim to change. In a future version, I'll probably alter the ECU programming set the base fuel pulse to follow the fuel map. I'll need to do some analysis of the fuel subroutines before I can do this though.
Here are some pics of the ECUFlash tables and a few logs. In the second log, the effect of the large distance between the exhaust ports and the WBO2 can clearly be seen. During very mellow cruise where the exhaust flow is reduced, the oscillations are slower and the swings are wider. When I bump up the load and increase the air volume through the motor, the time it takes for the exhaust gas to reach the WBO2 is decreased, and the sensor can provide feedback more quickly and more accurately, so the oscillations are faster and the swings are more narrow.


A few people asked how simulating the front O2 will affect the trims. The ECU still setting the base fuel pulse to follow 14.7 AFR, but the simulated O2 signal is telling the ECU the AFR 15.x, so the end result is that the ECU pulls fuel using the trims. The idle trim had dropped to about -6.5 after 20 minutes of stop and go. Hadn't been long enough for the cruise trim to change. In a future version, I'll probably alter the ECU programming set the base fuel pulse to follow the fuel map. I'll need to do some analysis of the fuel subroutines before I can do this though.
Here are some pics of the ECUFlash tables and a few logs. In the second log, the effect of the large distance between the exhaust ports and the WBO2 can clearly be seen. During very mellow cruise where the exhaust flow is reduced, the oscillations are slower and the swings are wider. When I bump up the load and increase the air volume through the motor, the time it takes for the exhaust gas to reach the WBO2 is decreased, and the sensor can provide feedback more quickly and more accurately, so the oscillations are faster and the swings are more narrow.


Thread Starter
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
During closed loop cruise in an unmodified ECU, the ECU sets a base fuel injector pulse width for 14.7 AFR. The closed loop system can then trim this base pulse width value. The ECU reads the front NBO2 sensor to determine whether its above or below the target 14.7 AFR. If its above, then it adds fuel, and if its below it pulls fuel out.
My patch does not take control of the base pulse width, so that base pulse width does not change when my patch is operating. What the patch does is send a simulated front O2 sensor reading to the ECU. The simulated signal is modified so that the desired AFR (say 15.5:1) appears to the ECU as if its actually 14.7 AFR. The ECU will then modify the trims (in this example pull fuel out) to stabilize on this simulated signal. Its the exact same concept as used by Innovate and Zeitronix, but by creating the simulated front O2 signal in the ECU, I can make the patch follow the values in the fuel map rather than be stuck at a single simulated value (what you get when the simulation is done in the WBO2 sensor controller).
At any rate, after running some errands this morning, I can say that this is a far better solution than controlling to a single value of say 15.5:1. Driveability is much better.
My patch does not take control of the base pulse width, so that base pulse width does not change when my patch is operating. What the patch does is send a simulated front O2 sensor reading to the ECU. The simulated signal is modified so that the desired AFR (say 15.5:1) appears to the ECU as if its actually 14.7 AFR. The ECU will then modify the trims (in this example pull fuel out) to stabilize on this simulated signal. Its the exact same concept as used by Innovate and Zeitronix, but by creating the simulated front O2 signal in the ECU, I can make the patch follow the values in the fuel map rather than be stuck at a single simulated value (what you get when the simulation is done in the WBO2 sensor controller).
At any rate, after running some errands this morning, I can say that this is a far better solution than controlling to a single value of say 15.5:1. Driveability is much better.
Wow that is really awesome stuff! That is a TON more adjustability than I have in my DSM. I can't wait to start testing this out. I think I'm going to put my wideband sensor closer to the cylinder head.
Thread Starter
EvoM Guru
iTrader: (50)
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Tried out one modification this morning that I was hoping would tighten up the swings in AFR, but it had no significant effect. First graph below is a log from the latest version. The second graph is one where the stock NBO2 system is controlling closed loop. The swings are tighter and the rate of oscillation is at least twice as fast. I'm sure its due to the placement of the WBO2 sensor at the end of the DP.
Overall though, its working great. The slower, wider swings don't seem to be having any noticeable impact on drivability. However, I'm still going to considering moving the WBO2 sensor further up the DP because I'm already thinking about how to implement a high performance closed loop fuel system.
At any rate, I'll post the patch instructions for 88590015 soon, maybe today.

Overall though, its working great. The slower, wider swings don't seem to be having any noticeable impact on drivability. However, I'm still going to considering moving the WBO2 sensor further up the DP because I'm already thinking about how to implement a high performance closed loop fuel system.
At any rate, I'll post the patch instructions for 88590015 soon, maybe today.




I'm a fan of "it just works", rather than worrying whether my trims have enough resolution to handle a changeover tank's fuel mix.