RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Thu Apr 17, 2014 11:56 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 129 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next
Author Message
 Post subject: Closed Loop to Open Loop fueling transition explained
PostPosted: Fri Apr 13, 2007 1:21 am 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
Please do not copy and post this information elsewhere. Instead, provide a link to this post.

Overview
The basic steps for determining the transition from closed loop to open loop are as follows:

  • If the current 'CL to OL Delay' value is zero, skip to the last step. Some tables ('CL Delay Maximum...","CL Delay Minimum...") will clear the delay if any one of those table's thresholds are met having the same effect.
  • If the current delay is non-zero, the 'CL to OL Transition with Delay (Throttle)' and 'CL to OL Transition with Delay (Base Pulse Width)' will be involved in determining the potential transition, in addition to the last step.
  • A counter is incremented when either the throttle or base pulse width (BPW) thresholds for the tables above are continuously exceeded, otherwise the counter is reset to zero.
  • If the counter reaches the current delay value, then the transition from CL to OL will potentially occur depending on the last step.
  • The last step is always dependent on the primary open loop fuel enrichment. If the 'Primary Open Loop Fueling' desired AFR is richer than the "Minimum Active Primary Open Loop Enrichment" value AND this value calls for enrichment after the 'Minimum Primary Open Loop Enrichment (Throttle)' and 'Primary Open Loop Fueling Compensation (Coolant Temp)' are applied, then the transition from closed loop to open loop will occur.


'CL to OL Transition with Delay (Throttle)' and 'CL to OL Transition with Delay (Base Pulse Width)' tables
16-bit and 32-bit ECUs

If the current delay is greater than zero (any non-zero value -> even 1), these tables will be used to potentially determine the closed loop to open loop transition (and vice versa). If either (or both) table's thresholds are exceeded, then a counter is incremented from zero. As long as either (or both) thresholds are continuously exceeded, the counter will be incremented by 1, otherwise it will be reset to zero. When this counter's value is equal to or exceeds the current delay value, then fueling will potentially switch to open loop depending on the primary enrichment value (see last section). When throttle and BPW are both below the tables' thresholds (hysteresis) then the counter is reset to zero and you potentially enter closed loop, again, depending on the primary fuel enrichment. You can briefly exceed the thresholds in either table and if the delay is high enough, you might not switch to open loop (the counter would be reset to zero).

However, if the current delay is zero, these tables are effectively disabled and not used. In this case, the primary fuel enrichment alone is used to determine the transition (see last section).


'CL to OL Delay' table
The ECU selects one of the delay values from the 'CL to OL Delay' table at any given time. The basis for which value is chosen can vary widely among ECUs. The higher the delay, the longer the "CL to OL Transition with Delay" throttle OR base pulse width thresholds will have to be exceeded before a potential transition from closed loop to open loop can occur.

16-bit ECUs:

The 'CL to OL Delay' data consists of 16 values, in 4 groups of 4 (A1-A4, B1-B4, C1-C4, D1-D4 in RomRaider). When a delay is called for, only 1 of the 4 groups is used and then one value from that group is selected for the delay per execution. Groups are chosen as shown below for these specific ECUs:

example USDM 02/03 WRX (factory values):
Group A Delays - 366, 2075, 1098, 122 - Automatic transmission and atmospheric pressure < 13.38 psi
Group B Delays - 122, 976, 488, 366 - Manual transmission and atmospheric pressure < 13.38 psi
Group C Delays - 366, 2075, 1098, 366 - Automatic transmission and atmospheric pressure >= 13.54 psi
Group D Delays - 122, 732, 366, 3662 - Manual transmission and atmospheric pressure >= 13.54 psi

Note: The atmospheric pressure thresholds are determined by the 'CL Delay Throttle Atmospheric Pressure Thresholds' table which also is the deciding factor for the atmospheric pressure related max throttle table for automatic transmissions. 13.38-13.54 psi is the hysteresis range.

example USDM 04/05 WRX (factory values):
Group A Delays - 366, 2075, 732, 732 - Automatic transmission
Group B Delays - 366, 732, 366, 366 - Manual transmission
Group C Delays - 366, 2075, 732, 732 - Effectively disabled from the factory (based on coolant temp threshold that would never be reached)
Group D Delays - 366, 732, 366, 366 - Effectively disabled from the factory (based on coolant temp threshold that would never be reached)

So, essentially, the ECU is only dealing with 1 group of 4 of the 16 values. When this part of the code is executed, only one value is chosen for the delay. Which one of the 4 depends on how long since the engine was started. A counter counts off about 1 per second. Starting at the first value, every 2 minutes or so, it skips to the next value until it uses the last (4th) value from then on.

32-bit ECUs:
A lot more variation among different ECUs as far as which delay is used by the ECU. As with the 16-bit ECUs, only one of the delay values is factored in at any one time.


'CL Delay Maximum...' and 'CL Delay Minimum...' tables
16-bit and 32-bit ECUs

The following tables have only one function. If any of these individual table's high value is exceeded (or below the threshold for the coolant temp table), the current delay becomes zero, regardless of the 'CL to OL Delay' table. These can be thought of as extremes where you do NOT want the transition influenced by the 'CL to OL Transition with Delay' throttle and base pulse width tables, but instead solely by primary fuel enrichment. Note: If the 'CL to OL Delay' values in your tune are all zero, then these tables will effectively do nothing.

  • 'CL Delay Minimum Coolant Temp'
  • 'CL Delay Maximum Engine Speed'
  • 'CL Delay Maximum Vehicle Speed'
  • 'CL Delay Maximum EGT'
  • 'CL Delay Maximum Throttle (MT)' - some 16-bit ECUs have 4 values for this table. Which is chosen is based on the counter that starts on engine start.
  • 'CL Delay Maximum Engine Load' - Select 32-bit ECUs. This parameter also has its own delay threshold which much be satisfied before the primary delay is cleared.

The ATs (16-bit) have slightly different logic.


Primary Open Loop Enrichment - the final determination in the transition
The primary open loop enrichment value, which is always the last step in determining the CL to OL and OL to CL transition, is determined as follows:

  • The 'Primary Open Loop Fueling' table determines the initial enrichment.
  • If this desired enrichment is less (i.e leaner) than the 'Minimum Active Primary Open Loop Enrichment', then the enrichment is zero (i.e. an effective 14:7:1 AFR) regardless of the fuel map.
  • The 'Minimum Primary Open Loop Enrichment (Throttle)' is then applied to this value. This table (ex. 16-bit ECU) has an effective AFR of 12.97:1 at about 89% throttle and above (due to interpolation it would ramp richer than stoich from above 70% throttle opening). This is the minimum enrichment. Therefore, even if the fuel map called for no enrichment (i.e. 14.7:1 AFR), if throttle position was greater than 89%, for example, the enrichment would be an effective 12:97:1 AFR. Note: this table is not currently defined for the 16-bit ECU, but will be added in the next ECU definition update.
  • Finally, the 'Primary Open Loop Fueling Compensation (Coolant Temp)' is applied.
  • This final enrichment value determines if the transition takes place. If it calls for no enrichment (i.e. 14.7:1 AFR), you will remain in closed loop (or switch to closed loop). Any non-zero enrichment (i.e. anything richer than 14.7:1 AFR at this point), will result in the transition to open loop in this last step in the decision process.

To simplify things, if the 'Minimum Primary Open Loop Enrichment (Throttle)' and 'Primary Open Loop Fueling Compensation (Coolant Temp)' are NOT impacting the enrichment at a given time, you can determine the transition by looking at your primary open loop fuel map. If the desired AFR in the current cell is leaner than the 'Minimum Active Primary Open Loop Enrichment', then you will remain in closed loop. If the desired AFR is richer than this threshold, you will switch to open loop when you reach this last step in the process.

With more recent logger definitions, you can log the primary open loop enrichment value that is involved in this last step if your ECU is supported for extended parameters. This will include the compensations mentioned above. The parameter is 'Primary Open Loop Map Enrichment'.


FAQ

Q: What happens when the closed loop delay is zero? Are you always in open loop?

No.

As described above, the primary open loop enrichment is always the final determination in the transition. A delay of zero effectively skips all other steps with the primary fuel enrichment being the final determination.

Q: What is cause of the well-known problematic delay with the USDM 04/05 WRX from the factory? Are the delay values too high? Why doesn't the USDM 02/03 WRX have the same issue?

Note: The following examples apply to the USDM ECUs.

High delay values are not the issue with 04/05 WRX. Depending on which delay value is being used, the 04/05 WRX may actually have the same or lower delay values than the 02/03 WRX. For example, looking at the delay examples above, for a manual transmission around sea level, the selected delay groups would be the following:

USDM 02/03 WRX - 122/732/366/3662
USDM 04/05 WRX - 366/732/366/366

The delay value chosen depends on the time since engine start. So, after about 8 minutes, the last delay value is chosen for both ECUs, which is going to be the delay value used most of the time when we are driving (unless you are taking extremely short trips). As you can see, the delay value is much higher in the 02/03 WRX (3662) than the 04/05 WRX (366)

So what causes the known issues? The problem is how the 04/05 WRX has the 'CL to OL Transition with Delay (Base Pulse Width)' and 'CL to OL Transition with Delay (Throttle)' setup from the factory. For the 02/03 WRX (and all other 16-bit ECUs besides the USDM 04/05 WRX), the BPW and throttle thresholds are referenced against rpm in a 2D table. For example, with the 02/03 WRX, the base pulse width threshold is 5.63 ms from 0-3600 rpm and zero at 4000+ rpm. It is similar for the throttle thresholds (69.4% from 0-3600 rpm and zero from 4000+ rpm). This means that above 3600 rpm, the threshold for BPW and throttle will begin to drop (due to interpolation) and will have zero threshold at and above 4000 rpm. However, with the 04/05 WRX there is only a single threshold for BPW and throttle. Although the single threshold matches the lower rpm thresholds in the 02/03 WRX (5.63 ms MT, 69.4% throttle), there is no drop off above 3600 rpm since they are just single value thresholds and are not referenced by rpm. That means that, even above 3600 rpm, the 04/05 WRX will maintain the same thresholds for BPW and throttle until one of the "misc." tables clears the delay (rpm, veh. speed, etc.). The 'CL Delay Maximum Engine Speed' table in the 04/05s also has higher thresholds (5100/5200 rpm) as compared to the 02/03s (4200/4300).

So, in the 04/05 WRX, this can result in remaining in closed loop longer from over 3600-5200 rpm, whereas with the 02/03 WRX, the transition with delay would occur much sooner (lower or zero BPW/throttle thresholds) or there would be no delay at all (above 4300 rpm due to the 'CL Delay Maximum Engine Speed' table).


Q: Why do some of the misc. closed loop tables have unobtainable values from the factory? For example, the USDM 04-05 WRX 'CL Delay Maximum Engine Speed' table in AT ECUs is 8000/8200 rpm. Or the 32-bit ECUs have a throttle threshold over 100%?

This is likely Subaru/Denso's method of removing a trigger from the decision process. Rather than having to recode the entire routine, it would be much easier to simply set a table's values in a range that will never be achieved so that it will be effectively disabled. An individual 'CL Delay Maximum/Minimum' table essentially does nothing if the high threshold is never exceeded. So, setting the maximum engine speed table to 8000/8200 rpm means that this table is removed from the decision process.


Q: What exactly is the base pulse width value as used in the 'CL to OL Transition with Delay (Base Pulse Width)' table?

It is the base pulse width in ms for stoich fueling at a given engine load. You can determine the equivalent engine load (g/rev) for your ROM by the following calculation (these are assuming you using the latest RomRaider ECU definitions):

engine load g/rev = base pulse width table value / (2707.090 / Injector Flow Scaling)

For example:
base pulse width table value = 6.0 ms
injector flow scaling = 550 cc/min

engine load g/rev = 6.0 / (2707.090 / 550)
engine load = 1.22 g/rev


Last edited by merchgod on Fri Oct 19, 2007 2:03 pm, edited 9 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 8:37 am 
Offline
Senior Member

Joined: Thu Aug 03, 2006 10:40 am
Posts: 1263
fantastic explanation, bill.


:)


-ken


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 9:49 am 
Offline
RomRaider Developer
User avatar

Joined: Tue Jan 23, 2007 5:11 pm
Posts: 964
Location: Austin, Texas
Nice explanation.

_________________
2007 STI, 2006 STI (wife's car)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:04 am 
Offline
Experienced
User avatar

Joined: Thu Oct 19, 2006 11:34 am
Posts: 838
Location: Putnam, CT
Awesome explanation. My countless useless hours of messing with the delays and logging to find when in CL and OL can absolutely comfirm all of this information. And I will add that when the delay table is zero, the fuel enrichment table will override idle fueling as well, and your car will get very pissed off if it idles in open loop lol.

_________________
93 Mustang LX 32 valve swap
95 Mustang GTS 347 kenne bell
04 Ram twin turbo 6 speed
94 Grand Cherokee locked and lifted
99 Civic HX sweet commuter car


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:14 am 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
Turbo_Mike wrote:
Awesome explanation. My countless useless hours of messing with the delays and logging to find when in CL and OL can absolutely comfirm all of this information. And I will add that when the delay table is zero, the fuel enrichment table will override idle fueling as well, and your car will get very pissed off if it idles in open loop lol.

I'm always in closed loop at idle even when the delay is zero. Unless your fuel map is modified for enrichment at low loads?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:20 am 
Offline
Experienced
User avatar

Joined: Thu Oct 19, 2006 11:34 am
Posts: 838
Location: Putnam, CT
Right thats what I said. If the delay is at zero, the fuel enrichment table will override closed loop even at idle. So any value less than 14.5 at idle RPM will kick it into open loop even when the TPS threshold is at idle. This map idles in open loop..... and if the enrichment is zero (14.7) then it runs in closed loop as you explained above.


You do not have the required permissions to view the files attached to this post.

_________________
93 Mustang LX 32 valve swap
95 Mustang GTS 347 kenne bell
04 Ram twin turbo 6 speed
94 Grand Cherokee locked and lifted
99 Civic HX sweet commuter car


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:28 am 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
Turbo_Mike wrote:
Right thats what I said. If the delay is at zero, the fuel enrichment table will override closed loop even at idle. So any value less than 14.5 at idle RPM will kick it into open loop even when the TPS threshold is at idle. This map idles in open loop..... and if the enrichment is zero (14.7) then it runs in closed loop as you explained above.

Ahh, ok. That's what I thought you meant.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:35 am 
Offline
Experienced
User avatar

Joined: Thu Oct 19, 2006 11:34 am
Posts: 838
Location: Putnam, CT
merchgod wrote:
Turbo_Mike wrote:
Right thats what I said. If the delay is at zero, the fuel enrichment table will override closed loop even at idle. So any value less than 14.5 at idle RPM will kick it into open loop even when the TPS threshold is at idle. This map idles in open loop..... and if the enrichment is zero (14.7) then it runs in closed loop as you explained above.

Ahh, ok. That's what I thought you meant.


Yeah if you recall I was pulling my hair out for a couple weeks trying to figure out why certain roms were getting stuck in open loop... thats why it was doing it :P

_________________
93 Mustang LX 32 valve swap
95 Mustang GTS 347 kenne bell
04 Ram twin turbo 6 speed
94 Grand Cherokee locked and lifted
99 Civic HX sweet commuter car


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 11:55 am 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
Turbo_Mike wrote:
Yeah if you recall I was pulling my hair out for a couple weeks trying to figure out why certain roms were getting stuck in open loop... thats why it was doing it :P

Well, there you go. :D

On a side note, I've noticed some of the jdm sti roms (and some others) are set up from the factory to run no delay all the time.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 12:20 pm 
Offline
RomRaider Developer
User avatar

Joined: Tue Jan 23, 2007 5:11 pm
Posts: 964
Location: Austin, Texas
I wonder if zeroing out the delay in the 07 STI map would fix the issue of being stuck in C/L under boost (wondering if the richer fuel table would take over priority and switch over to O/L). This worked very well on my 06 WRX and response was great, also idle was unaffected.

_________________
2007 STI, 2006 STI (wife's car)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 1:01 pm 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
gabedude wrote:
I wonder if zeroing out the delay in the 07 STI map would fix the issue of being stuck in C/L under boost (wondering if the richer fuel table would take over priority and switch over to O/L). This worked very well on my 06 WRX and response was great, also idle was unaffected.

The logic on the 32bit ecus is essentially the same except for how the delay comparison value is used (counter). I haven't had a chance to look at it closely, but it is not as simplistic as the 16bit ecus. Also, this part of the code is different in the 07 sti compared to the 06 wrx. Once I get done with the ecu defs, I can send you some logger defs and we can verify exactly the effect of the delay on the CL\OL transistion.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 1:28 pm 
Offline
RomRaider Developer
User avatar

Joined: Tue Jan 23, 2007 5:11 pm
Posts: 964
Location: Austin, Texas
merchgod wrote:
The logic on the 32bit ecus is essentially the same except for how the delay comparison value is used (counter). I haven't had a chance to look at it closely, but it is not as simplistic as the 16bit ecus. Also, this part of the code is different in the 07 sti compared to the 06 wrx. Once I get done with the ecu defs, I can send you some logger defs and we can verify exactly the effect of the delay on the CL\OL transistion.


Thanks Bill. :D

-Gabe

_________________
2007 STI, 2006 STI (wife's car)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 4:30 pm 
Offline
Experienced
User avatar

Joined: Mon Sep 04, 2006 10:43 am
Posts: 260
Location: Georgia
noob and just want to confirm
so out of the 16 values
which are the MT and AT and
which are the Lower ATM and higher ATM

_________________
2005 Black SAAB Aero 92x | MY mods
Intake: Silicone MAF Elbow and Turbo inlet - Ported TB
Engine: NGK IX (#2667)., TGV delete, ixizICE, ixizAOS, ixizEBCS
Exhaust: PPC Headers - STI UP - EVO3-16G - DWG DP(coated) - HiFlow CAT MP - Prodrive Oval


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 4:35 pm 
Offline
Administrator
User avatar

Joined: Wed Mar 29, 2006 10:38 pm
Posts: 5340
goixiz wrote:
noob and just want to confirm
so out of the 16 values
which are the MT and AT and
which are the Lower ATM and higher ATM

I haven't checked other roms to see if it is the same, but for the 02 usdm wrx, table 2 is MT (AP < 13.38 psi) and table 4 is MT (AP > 13.38 psi).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 4:38 pm 
Offline
Experienced
User avatar

Joined: Thu Oct 19, 2006 11:34 am
Posts: 838
Location: Putnam, CT
I can confirm the same as well for 03 WRX MT

_________________
93 Mustang LX 32 valve swap
95 Mustang GTS 347 kenne bell
04 Ram twin turbo 6 speed
94 Grand Cherokee locked and lifted
99 Civic HX sweet commuter car


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 129 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl