Help for AE Tuning

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Help for AE Tuning

Post by whittlebeast »

I am trying to put together a general tuning guide for AE and Megasquirt Below is what I have come up with so far. This applies to several versions of Megasquirt.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

AE

There is a lot of confusion regarding the tuning of Acceleration Enrichment in the MegaSquirt family of programs. Over the last two years I have been involved, to a varying degree, in several of these ways to control AE. It is far easier to tune AE if you under the underling causes and effects.

There are a few that we have to consider. (Hang with me here)

1) You may remember from high school physics that water will boil at close to room temperature if you pull enough vacuum on it. Conversely, if you apply pressure you can raise the boiling temp up to 250F or more.

2) Water on the driveway always evaporated faster on a windy day than it does on a calm day.

3) Water on the driveway always evaporated faster on a hot day than it does on a cool day.

4) If you leave a cold glass of beer on the counter water droplets form on the side of the glass, apparently water from nowhere.

5) Cold air has more oxygen molecules per cubic foot that hot air.

6) A VE table as we in the MegaSquirt world is designed to balance the amount of fuel delivered from the injectors with the air flow. The internal math of the MegaSquirt estimates this airflow and in turn calculates the matching injector pulse width. This airflow calculation is based on intake air temperature, RPM, intake manifold absolute pressure (KPA), and RPM.

7) An intake manifold often has hot water in it. This manifold is attached to hot things and is being blown on by constantly changing amounts of hot air coming off of the radiator and from the exhaust system.

8 ) An intake manifold has a constantly changing amount of air properties and the amount of fuel that can condense on the walls.

9) Fuel in the intake constantly collects on the inside walls of the intake.

10) The amount (thickness) of this layer of fuel is constantly changing.

11) The earlier the fuel is injected in the intake airflow, the more area of the intake wall can get wet.

12) Back pressure on the exhaust, weather caused buy high atmospheric pressure at the end of the exhaust system or by trying to flow too much exhaust through the system causes the motor to need less fuel.

13) The injector delivers fuel only after it has opened. The injector opening time consists of about the first 1.0 millisecond of the pulse width. So if MT reports 10 ms pw1 the injector is only supplying fuel for about 9 ms. This is a big deal if you have a cruse pw of say 4ms and your AE added pw is 6ms. The amount of fuel delivered goes from (4-1) or 3ms of fuel to (4-1)+6 or 9ms or three times the fuel. Plenty of fuel to put out the fire.

14) Way too much fuel feels just like way too little fuel from the driver’s seat.

15) Fuel collecting in the walls and floor of the intake behaves much like the water examples above.


A few definitions.

MAP: Manifold air pressure. The units are KPA. The important part to remember is 100 KPA is close to amount of air the world has at sea level. At 6000 ft elevation you have 80% air or 80 KPA. 15 psi of boost amounts to about 200% air of 200 KPA. Most manifolds have on a steady state motor about 40 KPA at idle and 95 KPA at full throttle assuming normally aspirated.

MAPDot: The calculation of the change of MAP/sec An indication of how fast the MAP is changing. Extra and base BG code uses KPA/Sec where MS2 uses percent/sec MAPDot is normaly a better indication of a need for tempary additional fuel than TPS related schemes.

TPSADC: The location of the Throttle Position Sensor as the Squirt sees it.

TPSDot: The rate of change of the TPSADC/Sec but converted on the display of MegaTune to Volts/sec the volts of the TPS go from about .5 volts at idle to about 4.5 volts at full throttle so 4 Volts/sec means the throttle is moving at a rate on going from no throttle to full throttle in one sec. MS2 works with percent/sec.

AE driven fuel percent Gauge: This gauge displays the percent of added fuel taking into account the opening time of the injector. This little advertised is extremely valuable to put into perspective just how much fuel is being added at any given time. The opening time is assumed to be 1ms and is adjustable in the MsnsExtra.ini

TPS Threshold: The value of the TPSDot that activates the AE event

MAP Threshold: The value of the MAPDot that activates the AE event
Note: MS2 allows a mix of MAP and TPS threshold All versions of Extra are all of one or the there, pick one.


So how does all this pull together as it relates to tuning the motor?

Remember that the VE table is designed to deliver the correct amount of fuel at steady state and normally will not be designed to cover for extra fuel required during these transition times in the fuel requirements caused by all these rules stated above. Any motor that is properly tuned to give a stable AFR at steady will have a huge demand for added fuel if the motor is exposed to more pressure in the intake. At low RPM the manifold AMP may jump from 45 KPA to 99 KPA in a very short amount of time. The added fuel is going to wetting the manifold up to the amount of fuel that can now coat it given the newfound pressure in the intake. Any time the opposite happens, fuel has to be pulled from the normal amount fuel required. This is referred to as the Decel setting. 90 is 90% of the normal amount of delivered fuel. The other 10% comes from the fuel that was on the walls of the intake and are now evaporating off the walls caused by the huge decrease in MAP pressure. At high RPM the motor may be running 90 kpa and a punch from ½ throttle to full throttle may only raise the manifold MAP from 90 KPA to 95 KPA. This is a relatively small change in MAP and as such very little AE is required. As you can see from this MAPDot may be a better gauge of the required amount of added fuel. But what do you do if your cam makes it so that you have virtually no workable MAP change to work with and TPSDot does not seem to be a workable solution. What about this thing called decay and where do I ever start on tuning this thing.


Over the last year, several ways to tune AE have evolved.

1) The original BG method: based purely on the rate of change of the TPSDot or the MAPDot. The AE, once activated can remain on for a certain amount of time (or in some versions of code) for a number of ignition cycles. The advantage of engine cycles is that at 4000 RPM the AE time is ½ of the amount of time that AE is active at 2000 RPM. The wider the powerband and the more high strung the motor is the more difficult this method gets to tune both the high RPM and the low RPM requirements. ITB’s make this method almost useless. 5000 RPM v8s with an automatic is doable. All existing codes to date

2) The RPM based AE method: With this method, the RPM of the motor is constantly taken into account. There 4 separate RPM values that can be set. Below the lowest RPM setting the max AE is controlled by the lowest ms cell. Between the lowest RPM cell and the highest RPM cell a linear interpolation happens between the two closest RPM cells. Above the highest RPM the highest RPM ms value is used. Only one threshold is in effect when using the AE scheme, depending on the choice of MAPDot or TPSDot. The AE table on the AE wizard is ignored. Note: This option is on Extra 026h8 and Extra 029M and later. All other versions have known issues.
Image

3) Hybrid BG/RPM based: This is "normal AE/ Non x-tau" option in the MS2 v2.64 and later code. This method is a combination of the two above schemes. The terminology in the this graph and the terminology used on the final release of this scheme may change but the basic idea is that there is the ability to have large AE events at low RPM and less as RPM raises. The base settings would be set at low RPM and taper off to zero AE at some high RPM. This method has advantages and disadvantages compared to the RPM based logic used in the Extra code. I feel it is a huge improvement to the original B&G code. By setting both RPM values higher than your redline the result will be AE just like the original B&G code. Very promising.
Image
Please not that the red lines that go from the upper left to the lower right of the graph are not necessarily linear but to draw them that way is too confusing.

4) X-Tau: This method is by far the most elaborate and potentially difficult to understand and tune but very promising. The just of the scheme is that virtually all of the inputs listed above are in the algorithm. It takes into account the airflow of the air in the intake (based on RPM), the pressure in the intake (MAP), the temp of the intake walls (coolant temp and air temp) and fudge factors for all of the other stuff. My fear is the numbers of variables involved and if we will ever be able to get a handle on the setup. This will be in the 2.62 and later codes yet to be released. This is used buy many OEM motors.



Tuning the Extra RPM Based AE

Tuning is a fairly simple procedure. As with all MS installs, the very first thing to do is sort out ALL input signals to the Squirt. IAT, CLT, RPM, MAF if installed, TPS and MAP signals must be all very stable. The goal of all of these AE methods is to have a very flat AFR during all transitions of the throttle. Once perfected, the motor will be very smooth throughout the entire power band including throttle stabs, shifts and throttle roll-ons. I always try to run MAPDot if I have a reasonable idle MAP to work with.

This all assumes that you have a tuned VE map. If using RPM based AE, start by setting the lowest of the four bins close to the RPM that your motor idles at. Say 800 RPM. The next cell to set is the highest RPM bin. This is the highest that you are likely to ever activate AE, say 80% of your redline. This should be close to the RPM that your motor drops to after a 3-4 shift. The two other RPM settings should be evenly spaced from the two extremes. For our example 800, 2000, 3000 and 4500 RPM. The second RPM number is where your motor will most likely need the greatest amount of AE in terms of total ms and percent on the AE Driven Fuel Percent gauge. I normally tune the base AE settings by getting on a stim and temporarily set the AE time to 2 sec and the decay to No Decay. Note that you will need to guess the MAP at say 85 KPA for this test. I use a syringe to apply 85 KPA to the Squirt. Play with the ms of AE numbers until from the lowest RPM thru the second RPM setting get close to a flat 150% AE through this range. The 150% is just a guess on my part but it is a place to start. Now go to the third RPM with the stim and set the third ms of AE to get about 115% Next go to the highest RPM and set the highest ms to get about 103% on the gauge. Set the AE time to .7 sec and the decay back on. If you do not own a stim then the numbers can be guessed at. Now start data logging, drive the car locked in second gear and put the motor at 2000 RPM, stab the throttle and have a friend watch the o2 gauge and the AE driven Fuel Percent. Play with the time and ms of the second RPM cell till you get good throttle response and most likely the best response will be when the o2 remains close to about stoch or a little richer. Lean holes are never the correct answer. Now try applying the throttle with a lighter stab. This ends up a compromise. Once a balance is set go to the third RPM and play with just the ms of the third cell to get good response. The highest RPM cell will be for high RPM (redline) shifts. Last go to idle and tune the ms of the lowest cell to get a reasonable off idle response from the motor. Note that as the RPM climbs, the AE will get stepped down by either the timer and the decay function or slammed down by the rising RPM.

See pages 101 thru 120 of 591 on... http://fordfuelinjection.com/files/GUFB.pdf for lots more light reading on the subject.

Have fun tuning.

AW
Last edited by whittlebeast on Fri Apr 07, 2006 9:35 am, edited 12 times in total.
scirturbo
Experienced MS/Extra'er
Posts: 162
Joined: Sun May 02, 2004 8:20 am
Location: Netherlands

Attempting to Help with AE Tuning

Post by scirturbo »

Did you also think about the fact that on one cyl the air is not flowing, e.g. squirting against a closed valve, or maybe flowing in the opposite direction because a other valve is fully open. So the amount of extra fuel is not the same for every cyl. at a certain time. Maybe if it is running sequential or high rpm. Or doesn't it matter?
 
SFC
Last edited by scirturbo on Sun Feb 19, 2006 10:13 am, edited 1 time in total.
Boris740
Experienced MS/Extra'er
Posts: 232
Joined: Tue May 04, 2004 5:46 pm
Location: Aurora, Ontario
Contact:

Post by Boris740 »

I am little confused whether the RPM AE being upside down has been fixed
http://msefi.com/viewtopic.php?t=15337&start=120

Also quote from your post above

"Note: This option is on Extra 026h4 and Extra 030a and later"

The latest I can find is 029h4 in
http://megasquirt.sourceforge.net/extra/files/alpha/
Got Knock? - see:
Viatrack Printed Circuit Designs (among other things) http://www.viatrack.ca
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Boris

Phil just fixed this last week and posted the change in 026h4 Phill also passed the change on to James to roll into the next release of Extra (I guessed on the next Number that James will use but I was fairly shure that any release named later than 030? would include this change. I will fix the above reverance once James posts the next release.

AW
Last edited by whittlebeast on Sun Feb 19, 2006 2:22 pm, edited 1 time in total.
daxtojeiro
Master MS/Extra'er
Posts: 835
Joined: Sun May 02, 2004 2:16 pm
Location: Norwich UK
Contact:

Post by daxtojeiro »

Hi all,
this is the location for 026h4, James will release the fixed version of 029 is due course, http://megasquirt.sourceforge.net/extra ... /026h4.zip
Phil
Image
http://www.msextra.com/manuals/MS_Extra ... _Index.htm for MS1 Extra Manuals
http://www.msextra.com/ms2extra/ for MS2-Extra Manuals
http://www.extraefi.co.uk/cobra/accobra.htm 5.0L TVR powered Cobra Replica (MSnS-E)
newtyres1
Master MS/Extra'er
Posts: 632
Joined: Mon Feb 06, 2006 8:32 pm
Location: Brisbane, Australia

Post by newtyres1 »

Phil,

Has the "accel time (ms)" been changed to "accel time (secs)" in MT yet (from Andy's MT screenshot above)? Andy thanks for the post, the old rpm-based AE (with issue) was still a huge improvement on my setup, looking forward to trying this latest one.

Ian.
rs2000
Master MS/Extra'er
Posts: 472
Joined: Mon Mar 07, 2005 9:32 pm
Location: Perth, Australia

Post by rs2000 »

i know these questions get asked 1000 x a day but i'm still not sure..

I have extra 024s9 and megatune 225b514 and i would like to upgrade to allow me to use rpm based accel enrichment. What would be the most stable megatune/extra combination and will i have to re write my map or will it transfer?

thanks

andrew
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Accel time in the screen shot REALY is sec. I have seen that before but WE keep forgetting to change the label in the ini. WE are also rewording the verbage at the top of that screen. (EDIT:2/21/06: see the corrected screen shot above for the new verbage, this is not a programing change)

I like 026h8 as the most stable. It should load an 024s msq. 029i is fairly different on the ini and paging setup and may still have issues, but not related to AE.

The MT we use is at http://www.not2fast.com/megasquirt/mt/2 ... _setup.exe

Extra 026h8 is at
http://www.extraefi.co.uk/software/026h8.zip

The Latest Extra is at
http://prdownloads.sourceforge.net/mega ... p?download

Loging Software at
http://www.ideasandsolutions.biz/MSGrap ... -v1.3b.msi

AW
Last edited by whittlebeast on Sun Apr 23, 2006 6:13 am, edited 2 times in total.
rs2000
Master MS/Extra'er
Posts: 472
Joined: Mon Mar 07, 2005 9:32 pm
Location: Perth, Australia

Post by rs2000 »

Thanks, the new code is mint my car feels 100% happier for it!!
Boris740
Experienced MS/Extra'er
Posts: 232
Joined: Tue May 04, 2004 5:46 pm
Location: Aurora, Ontario
Contact:

Post by Boris740 »

I am quite happy with the RPM based accel enrichments when the engine is warm. Are the settings in Accel Wizard for Cold Accel Enrichment and Cold Accel Multiplier still used? I seem to be getting huge leanouts when I step on the accel from idle just after the engine has started. This is with 029i and MT 2.25
Got Knock? - see:
Viatrack Printed Circuit Designs (among other things) http://www.viatrack.ca
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Boris

heheheheheheheh I never thought about it. Phil is going to kill me if I even ask. All the stuff I have ever Squirted has always been pampered till I got warmed up so if it starts moves and eventualy warms up....all is good. I have no idea what the code does when cold. Try it on the stim with about 200% in the warmup AE bin and see what happens. On the ski a cold motor is 80deg F water temp and 120deg F is getting overheated so I have some strange settings on all of that stuff.

AW
Daryl
Helpful MS/Extra'er
Posts: 109
Joined: Sat May 22, 2004 9:41 am
Location: Vancouver, BC

Post by Daryl »

Andy,
Thanks a bunch. Your writeup answers a lot of my questions and will help my tuning efforts.
Nice work.

Daryl
daxtojeiro
Master MS/Extra'er
Posts: 835
Joined: Sun May 02, 2004 2:16 pm
Location: Norwich UK
Contact:

Post by daxtojeiro »

Boris740 wrote:I am quite happy with the RPM based accel enrichments when the engine is warm. Are the settings in Accel Wizard for Cold Accel Enrichment and Cold Accel Multiplier still used? I seem to be getting huge leanouts when I step on the accel from idle just after the engine has started. This is with 029i and MT 2.25
Boris,
I did reply to this but I think I must have put it in the wrong thread :oops: anyhow, it shouldnt be any differnet, it still uses the same cold accel algorithm as it did, I will double check it though for you,
Phil
Image
http://www.msextra.com/manuals/MS_Extra ... _Index.htm for MS1 Extra Manuals
http://www.msextra.com/ms2extra/ for MS2-Extra Manuals
http://www.extraefi.co.uk/cobra/accobra.htm 5.0L TVR powered Cobra Replica (MSnS-E)
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Phil and I are thinking about making one more small change to the fuel side of things. The decel in all existing versions of the code (excluding the x-tau stuff yet to be released) treats decel as a on_off_on___off type function. There is no hysteresis in this algorithm at all right now. We are thinking about adding a hard coded say .2 sec hold on the decel so that once activated the decel will stay active for a minimum of .2 sec. This change may require a slight adjustment to your decel percent setting. This is only an issue when the throttle is being rolled at close to the threshold.

Does anyone see a down side if we can squeeze it into the code.

now it looks like
Image

I am trying to make it look more like
Image
69 1/2 Six Pack Bee
Experienced MS/Extra'er
Posts: 345
Joined: Fri Aug 20, 2004 11:12 am
Location: Ontario, CA

Post by 69 1/2 Six Pack Bee »

This is great but how does this method work with MS-II running V2.35 code and using this AE tuning tool in MT 2.25?Image

Thanx,
Bud
Last edited by 69 1/2 Six Pack Bee on Wed Mar 15, 2006 11:14 pm, edited 1 time in total.
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Personaly I would jump all the way up to 2.64 so that you can utilize the RPM based AE. As I remember the majority of the setup has to be re-entered as lots of changes were made. Most of the concepts that I talked about above applies. With a little reading of the recently unhidden bata testers forum, the details to into plenty of new features can be uncovered. Generaly it appears the your AE time is too low and your ms of AE is too large. I would load 2.64 and post a compleate MSQ and datalog. Remember that AE in the MS2 world is based on both rate of change and RPM. Extra triggers on just a singe threshold if running RPM based.

AW
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Post by Peter Florance »

The second RPM number is where your motor will most likely need the greatest amount of AE in terms of total ms and percent on the AE Driven Fuel Percent gauge.
Great writeup Andy. Any idea where this might occur? Peak torque point? Or before it, as sort of a feed-forward type of thing? Of course mine was so flat on the dyno Saturday, I might need a carpenter's level to find it. (note to self: get bigger exhaust)

Image

If you're going to go into details of map-dot, you might get Mike Robert's input. I had a very illuminating conversation with him when we were hanging out in Holiday Inn lobby. Unfortunately I need to ping on him again as the holes in my sieve-like brain are getting larger and I've lost some of the tuning details. :x

Sorry you guys didn't make it to the nautical museum. For me, it was a great experience hanging out with all you guru's that day. :D
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
whittlebeast
Super MS/Extra'er
Posts: 2221
Joined: Tue May 04, 2004 8:20 pm
Location: St Louis
Contact:

Post by whittlebeast »

Pete

Remember the two most dominent things on a warmed up motor is changing RPM and changing MAP. The MAP changes huge at 1000 - 2500 when driving in traffic. Just watch the gauge. Then look at the PW1 gauge and at least with my motor at idle the pw1 is in the 2 ms range but at 2500 it is fairly easy to require 3 ms of pw1. Fuel flow is (pw1-opening time) * MAP/100 * VE/100 * RPM * (other less dynamic stuff)

low rpm little load may be (2-1) * 30/100 * 45/100 * 1000 = 135

in the mid range say (3-1) * 45/100 * 60/100 * 2000 = 1080 or 8 times as much fuel

If you are running late versions of extra, just turn on the Fuel Delivered gauge and the AE dirven fuel percent.

At high rpm the MAP is already high so throttle movement has very little effect on MAP so no change in MAP and no change in RPM means no big need for AE

Bottom line is at 2000 RPM and a sudden punch of throttle can produce a huge instantainous demand for added fuel to cover for all this. The same amount of fuel at 1000 RPM measured in ms may be enough to nearly flood the motor. With Extra WE tried to make the best of a complex situation with a very limited amount of processing horsepower.

AW

from the megamanual

PW = {[REQ_FUEL * VE * MAP * (Warmup/100) * (O2_Closed Loop/100) * (AirCorr/100) * (BaroCorr/100) + accel ] * decel% } + Injector_open_time
Peter Florance
Super MS/Extra'er
Posts: 3653
Joined: Fri Apr 02, 2004 8:40 pm
Location: Virginia Beach, VA
Contact:

Post by Peter Florance »

Andy
I reformatted and printed out your writeup, set it on my dash and read it a number of times to drill it into my head. Enabled the RPM based AE and even with half-fast tuning, it runs better than it ever has since MS installed

Good stuff, Andy! Should be required reading.

What would be neat would to be able to 'weight' the AE by map. If I'm in a low gear at 5500 rpm I'll have a lot less load then if I'm in 4th gear at same rpm (friction of pushing barn-door shaped sedan at 100mph)

But as you say, RPM-based AE is trying to do a lot without a lot of processing and it appears to do a fine job of it.

Thanks
Peter Florance
PF Tuning
81 BMW Euro 528i ESP Car
60-2 Wheel LS2 Coils, Low Z Inj
Co-Driver 1999 BMW E46 DSP car.
ochizon
Experienced MS/Extra'er
Posts: 169
Joined: Mon Jan 16, 2006 2:59 pm

Post by ochizon »

I agree about the RPM and load and different gears issue. I am having a heck of a time trying to get my roll-on throttle response just right and so far thr RPM based AE has been the only way to accomplish it. But now, when I am at a high gear low rpm, I go way lean when I get on it.


BTW, what kind of MAP Threshold are you guys getting good results with?
Post Reply