RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Fri Aug 29, 2014 10:01 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Sat Jun 06, 2009 12:24 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
I started to write this while helping someone out via PM, but decided that this would make good reference material so I'm posting it here. After reading this post, you will know how to interpret the "AF Learning #1" values displayed in the Learning View utility. I will not explain how to act on that information, except to say that RomRaider has a MAF scaling feature built in, and there are spreadsheets available in the "tuning utilities" subforum.

To get a copy of Learning View, go here: topic2772.html"

Keep in mind the while Learning View is a nice way to get a rough idea of how good your tune is, there isn't much you can do the tune based on the information shown by Learning View. You'll generally need data logs to get enough information to actually make good changes.

Common misconception:

The "AF Learning" values in Learning View generally do not indicate that you are running rich or lean. They show how much fuel the ECU has learned to add or subtract in order to achieve the desired AFR during closed-loop fueling, which is the ECU's fueling mode for idle, cruise, and mild acceleration.

If they are pegged at their maximum or minimum value (+15% or -15% for most Subaru ECUs), then the ECU isn't able to correct for whatever is wrong, and you are indeed running rich or lean.

If they're not pegged, then you're neither rich or lean. The ECU has learned to achieve its target AFR. That target is generally 14.7:1, plus or minus a few percent, for the best compromise between fuel consumption and toxic exhaust emissions.

The AF Learning values do tell you how far your MAF scaling is off, and they show roughly how much it's off, in a few different airflow ranges, spanning idle, cruise, and mild acceleration.

Some background information:

The ECU has two methods to control fueling, which we call "closed loop" and "open loop." Closed loop is primarily for idle, cruise, and light acceleration; open loop is primarily for hard acceleration[1]. In both modes, the ECU uses the Mass Air Flow (MAF) sensor to measure the amount of air flowing through the engine. In open loop mode, the ECU simply commands the injectors to squirt the appropriate amount of fuel to reach the desired AFR for the air flow. In closed loop mode, the ECU additionally uses the O2 sensor to measure the AFR, and it uses this information to "close the loop," adjusting the amount of injected fuel for the next combustion cycle.

The transitions between open and closed loop are somewhat complex, but for the sake of discussion it is enough to know that the boundary between open and closed loop tends to be around 60 grams per second of airflow. Driving up a steep hill in 5th gear I've observed the car using closed loop at about 65 g/s, but I've also seen it switch at lower flows, around 50 g/s.

When operating in closed loop, the ECU maintains "fuel trims" which indicate how much fuel should be added or subtracted at different air flow ranges. This can compensate for variations in MAF sensors, MAF sensor housings, fuel composition, and so on.

The fuel trims can be observed with a logger or with the Learning View utility. Most stock Subaru tunes that I've seen, including my own car, use four trims, for the following air flow ranges:

AF Learning #1 A: 0-5 grams per second. This is idle.

AF Learning #1 B: 5-10 g/s. A little more than idle, but so low it's difficult to reach with the car in gear.[2]

AF Learning #1 C: 10-40 g/s. This covers most of your cruising.

AF Learning #1 D: 40+ g/s. This is light acceleration, or cruising uphill. There is no strict upper bound for this range, but again the switch to open loop tends to happen around 60 g/s.

Do not confuse the "AF Learning" parameters with "AF Correction." If you're looking at a number that fluctuates widely and rapidly, you're looking at the Correction value, which is not helpful. The ECU itself observes this value and uses it to make fueling adjustments, and over time it will adjust the Learning values based on trends in the Correction value. If you're familiar with signal processing, the Learning value is just a low-pass-filtered view of the Correction value. I have watched the A value climb to +15% over the course of several seconds while I had a vacuum leak, but under normal circumstances the Learning values change so slowly they're boring to watch.

AF Learning #2 may be for Subarus with stereo O2 sensors, such as the 6-cylinder naturally aspirated models with one O2 sensor for each bank of cylinders. However I'm not certain of this. I have not seen them in use on 4-cylinder Subaru yet, though.

The ROM has a table that determines the boundaries between the different air flow ranges, so you can adjust them if you wish. [3]

At last, we reach the interesting part:

On most Subarus, fuel trims are reset when the ECU is reflashed. It takes time for each fuel trim to 'settle in,' and of course the ECU can only make adjustments to the trim for the range that you're driving in, so you cannot trust the trims that you see right after a reflash. It may require a conscious effort to drive in the 40+ airflow range to get that trim to settle in, since normal cruise won't do it, and stabbing the throttle too hard will put you right into open loop. Watching the fuel trims in real time is instructive - you can do this with RomRaider's logger, or by refreshing Learning View every few seconds, or with SawMill's fuel trim gauge screen.

If the value of a fuel trim is positive, that means that the ECU has determined that it needs to add a bit more fuel to achieve the desired AFR.[4] In other words, the ECU has determined that the MAF sensor scaling is too low in the corresponding air flow range. Conversely, a negative fuel trim indicates that the ECU is reducing the fuel delivery for that range, meaning that the MAF scaling in that range is slightly too high.

The general consensus is that if the fuel trim values are within -5% to +5%, then the sub-60-g/s (closed-loop) region of your MAF scaling is good enough.

Since the fuel trims float around as you drive, you should sample them a few times before making adjustments, if you're seeing values that are within a couple percent of zero. But, if they're off by more than 5%, then your scaling would certainly benefit from an adjustment.

If your top-end trim (40+ in the example above) is off by more than 5% you should stay out of boost until/unless you have verified that your AFRs are on target in open loop. The reason is that top-end trim value is in effect during open loop operation.

It's possible that your car was tuned with a value of zero in the top fuel trim. In that case, if you see a positive value in the top trim, your car is probably running richer than before. Conversely if the top trim goes negative, you are now running leaner than before, and at increased risk of detonation.

However it is also possible that your top trim was settled in (for example -3%) the last time you logged your open loop AFRs. Suppose that you then use those logs to adjust your open loop fueling. After resetting your fuel trims during the reflash, your AFRs will be off until the fuel trim settles in again. But once it settles to your original value (-3% in this example), then that value just means that you're back where you expected to be.

In other words, the significance of the top end fuel trim depends on your logging/tuning workflow, and on whether or not your fuel trims reset when your ECU is reflashed.

There is a table that governs the minimum and maximum values for the fuel trims. On my 2005 Legacy GT, these were -15% and +15%, but I've seen other values in other stock tunes. If you see one or more of your fuel trims equal to the minimum or maximum possible value, your MAF should be adjusted before you drive the car further than you're willing to walk. A trim of 15% on my car means that the MAF scaling is off by more than 15%, but there's no indication of how much further off it is. Maybe 16%, maybe 60%.

Values at the minimum or maximum indicate a serious problem that needs to be fixed. Perhaps you've changed your MAF sensor housing, and you need to revise your MAF scaling to accommodate it. Perhaps your O2 sensor is failing. Perhaps you've got a vacuum leak. Whatever the cause, it should be fixed ASAP.



[1] That's not 100% accurate, but it's usually true. ECU also uses open loop when the O2 sensor is warming up, or when the O2 sensor has failed, and so on. It uses closed loop for the onset of hard acceleration, as determined by the closed loop delays. All of this is outside the scope of this discussion though.

[2] My only guess is that Subaru created this range for light deceleration, however I have no confidence in that guess.

[3] Because the 5-10 g/s range is so difficult to reach, I decided that it was pointless, and changed my ranges to the following:

A: 0-10 g/s
B: 10-20 g/s
C: 20-40 g/s
D: 40+ g/s

That makes each range easy to reach. I am slightly curious about Subaru's reasons for dedicating a fuel trim to the 5-10 range, but I have not had any driveability issues with this scheme, and it makes the MAF easier to verify so I have no plans to change it back.

[4] As I write this, the desired AFR in closed loop mode is assumed to be 14.7. There is some speculation that the ECU may vary the desired AFR slightly for emissions control (for example, to heat up the cat), and Merchgod has hinted that a future ECU definition update might make it possible to adjust the desired AFR in closed loop, but for now, assume 14.7.

Revision history:

June 8 2009, added a paragraph about AF Correction parameters.
Sept 24 2011, added the 'misconception' section.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Last edited by NSFW on Fri Aug 13, 2010 12:29 am, edited 6 times in total.

Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Sat Jun 06, 2009 12:28 pm 
Offline
Administrator
User avatar

Joined: Wed Oct 25, 2006 12:32 am
Posts: 3040
You can always use "temporary" ranges to zero in on the ranges that you are initerested in.


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Sat Jun 06, 2009 3:27 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
mickeyd2005 wrote:
You can always use "temporary" ranges to zero in on the ranges that you are initerested in.


Cool idea.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Sat Jun 06, 2009 4:20 pm 
Offline
Experienced

Joined: Wed Jun 25, 2008 8:09 pm
Posts: 444
Very nice I don't think enough people really know all of this... Do things get stickied around here? If so do it up...


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Sun Jun 07, 2009 11:47 pm 
Offline
Newbie

Joined: Sun Oct 01, 2006 11:42 am
Posts: 1
mickeyd2005 wrote:
You can always use "temporary" ranges to zero in on the ranges that you are initerested in.


Care to elaborate on this at all? I'm kinda new to this and trying to learn as much as i can.


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Mon Jun 08, 2009 1:03 am 
Offline
Experienced

Joined: Tue Aug 28, 2007 2:16 am
Posts: 454
Location: Oklahoma City
he means that if you're interested in a specific g/s range, for instance, the range used to cruise at 40 mph, you could define an AF Learning range to that specific g/s area. This would allow you to log the car as you wish, then simply check it on Learning View, as opposed to running the MAF logger.


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Mon Jun 08, 2009 7:38 am 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
NSFW wrote:
I will not explain how to act on that information, except to say that RomRaider has a MAF scaling feature built in, and there are spreadsheets available in the "tuning utilities" subforum.


Actually, I will explain how to use the fuel trims to get injector scaling and latency in the ballpark - good enough to drive on, if you stay in closed loop (out of boost). But first, note that this process alone is not sufficient. To really dial in your injectors also need to use a wideband O2 sensor to verify fueling at high MAF, and by high I mean 200+ grams per second, which is way beyond what the fuel trims will help with. Also note that this process assumes that your MAF scaling is already accurate. If you change both injectors and intake or MAF housing, it takes a lot more work to dial in both of them at the same time.

There are two things that matter when tuning for injectors: latency and scaling. Latency tells the ECU how much time elapses between the ECU's request for fuel and the beginning of actual fuel injection. Scaling tells the ECU how much fuel the injectors spray while the ECU holds them open. Latency is measured in milliseconds, injector flow scaling is measured in cubic centimeters per minute (cc/min).

Since latency varies by voltage, the latency table contains values for various voltage ranges. When I make latency adjustments, I scale all values by the same percentage. I don't claim that this is the best way to do it, but I'm guessing it's close enough.

Now, the interesting part:

Latency has the greatest effect when very small amounts of fuel are being injected, which also means low airflow, and therefore the low end fuel trim (AFR Learning #1 A) can guide your adjustments to latency. (Latency does also affect fuel delivery at higher fuel and air flows, however.) Scaling has the greatest effect at maximum airflow, and while the high end fuel trim (usually AFR Learning #1 D) is not high enough to really know if your injectors are dialed in, it will get you in the ballpark and will at least let you drive around in closed loop with no worries.

If the low end fuel trim is positive, the ECU is injecting additional fuel, so the latency is greater than the ECU thought it would be, and the latencies should be increased to compensate for this. If the low end fuel trim is negative, the latencies should be decreased.

If the high end fuel trim is positive, the ECU is injecting additional fuel, so the injectors are smaller than the ECU thought they were, so the scaling should be decreased. Conversely, if the high end fuel trim is negative, the scaling should be increased. [I had that backward in the first version of this post.]

For latencies and scaling, start by making adjustments of 5% until you get a feel for how much adjustment affects results. For scaling you get a pretty much 1:1 relationship, but for latencies the difference is less intuitive.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Last edited by NSFW on Fri Aug 07, 2009 2:10 am, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Jun 10, 2009 9:33 am 
Offline
Newbie

Joined: Wed Jun 10, 2009 8:07 am
Posts: 13
Another Great Writeup. I have just started getting customers coming to me to start tuning there Subaru vehicles, and at first glance, the Subaru logic was very complicated.

After reading through this writeup, and several others, I am finally starting to get an understanding of how it works.

These writeups are worth there weight in gold.


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Fri Aug 07, 2009 2:09 am 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
Just FYI, I got an "increased" and "decreased" backward near the end of my last post. Ferraz caught it.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 6:09 am 
Offline
RomRaider Donator

Joined: Mon May 26, 2008 1:25 pm
Posts: 9
I would think that for latencies, you would want to increase the value if the ECU is pulling fuel in the low ranges. Conversely if the ECU is adding fuel you would decrease the latency value?


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 7:28 am 
Offline
RomRaider Donator
User avatar

Joined: Thu Aug 09, 2007 10:40 am
Posts: 211
Location: Colorado
NSFW - Great post. It should be a sticky. I will consider changing my AFR Learning B range also... I've thought that was an odd range too.

Mickey - I like the idea of temporary ranges to dial-in some fueling... that is a cool idea.

_________________
'05 LGT, BNR68+E85


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 1:02 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
Ridge Racer wrote:
I would think that for latencies, you would want to increase the value if the ECU is pulling fuel in the low ranges. Conversely if the ECU is adding fuel you would decrease the latency value?


Increasing latency means holding the injector open longer, which of course sprays more fuel. Not what you want to do if the ECU is already pulling fuel.

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 1:03 pm 
Offline
Moderator

Joined: Wed Nov 22, 2006 10:23 pm
Posts: 2306
Guy on the corner wrote:
NSFW - Great post. It should be a sticky. I will consider changing my AFR Learning B range also... I've thought that was an odd range too.


Thanks!

_________________
2005 Legacy GT w/ ATP 3076, IWG, MBC, BCS, LC, FFS, OMG
Please don't send me tuning questions via PM - use the forums instead. Thanks!


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 2:47 pm 
Offline
Experienced
User avatar

Joined: Mon Apr 30, 2007 8:02 pm
Posts: 521
Learning range D is seen when your car is in in fast idle (warming up) and I have seen it as high as 6 g/s with the AC on, so it does have a purpose.

If you have a vacuum leak in your car, your learning range A may max out at +15 real quick, but at 6 or 7 or 8 g/s it may only require +8% or so.

I could go on (and will if others don't quite get my reasoning) but I think it has a definite purpose, and should be left.

_________________
05 LGT (ST and OS tuning) AVO380/TMIC/header/TBE/alky/AEM CAI


Top
 Profile  
 
 Post subject: Re: How To: Use Learning View to verify closed-loop MAF scaling
PostPosted: Wed Sep 23, 2009 2:50 pm 
Offline
RomRaider Donator
User avatar

Joined: Thu Aug 09, 2007 10:40 am
Posts: 211
Location: Colorado
Good points, LBGT.

_________________
'05 LGT, BNR68+E85


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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