When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Seems like every time I spend some time working on my tune, or reading about different features I find out some new little trick, or a new approach to tuning something. So I thought I would start a thread where people can post things that may not have been obvious to them, and helped them out. I'll start out with a few. Please keep the thread somewhat clean, so it can be a bit of an encyclopedia, instead of a discussion.
1. Working with Autotune.
Autotune can be both awesome and annoying at the same time. There are a few things that I change to make it work a little better.
Lock out your idle cells. Idle should not be autotuned. It produces weird results. So select the cells that you normally idle in, right click, and select "Lock Selected Cells"
Set up your minimum fuel load. One issue that I constantly ran into was autotune pulling fuel as I entered and exited overrun. To stop this set your minimum fuel load (Advanced Settings) to around what you idle at. That way it will still tune low load cruising, and not get confused with overrun. This works better than locking out your lowest row of fuel cells, because it allows proper interpolation with the lowest row.
If you are starting out fresh I like to start with the cell change resistance on easy. This will allow big changes, but also leave you with some jerky spots. So switch to normal afterwards and it will help smooth it out.
Finally, an autotuned fuel table is not a finished fuel table. Smooth it out, look for patterns and interpolate where you can. Then make some pulls, and look at your logs. Check that AFRs are correct and that it all looks good.
2. Re-bin Table
This one took me a while to find, but when I did it changed my life. If you already knew this, then it will be obvious, but if you didn't know this existed it will be great. When looking at any sort of table, you can click on the box with the 2 arrows at the bottom left corner of the table. This will open a new window that will allow you to edit the axis of your table, and then it will interpolate to match. This allows you to scale tables easily, compare to other tables, and is generally awesome.
3. Incorporate AFR Target
This is a setting that I just found out about that is pretty cool. It is in your general settings menu under "Incorporate AFRTarget". I'll do my best to explain how it works. This wont be of as much use for people who are already tuned, but if you are starting fresh I definitely suggest you use this.
When you aren't including AFRTarget the Megasquirt fueling equation looks something like this:
PW = ReqFuel * VE(rpm,map) * MAP * GammaE
With this equation, your VE table also specifies what AFR you want. So if you want to go richer, you add to the VE table, want to go leaner, you remove from the VE table. When you include AFR Target your fueling equation changes, and it pulls the AFR target out of the VE variable. Which allows separate control of AFR and VE.
PW = ReqFuel * VE(rpm,map) * MAP * stoich / targetAFR(rpm,map) * GammaE
What this allows you to do, is tune for the "actual" volumetric efficiency of your motor. Your VE table will be a lot flatter, and will represent the actual efficiency of the engine. This allows you to change what AFR you are targeting by just changing the AFR target table, instead of the whole VE table. Pretty cool.
I'll start with those 3. I'd love to hear from @DNMakinson about his EAE tuning experiences. And anyone else who found something they think might help. Could be anything, don't be afraid to share because its stupid, we might have missed it.
I think I need to redo things because my fast accel and decel have changed since the turbo install, so if you want to come up with a 'walkthrough' of sorts, I can do the tests and take logs for all of them and post the logs and tune/screenshots of where the settings go and how they changed things. I think that would be really helpful since that's the direction the developers seem to be taking.
Some of the things that I've been interested in, but haven't yet taken the time to figure out or play around with (mostly because I didn't get around to it before starting the V8 swap) are knock sensor settings and long term fuel trims. I know there is lots of info on both of these around here, so at some point I'll gather up info and include them, unless someone else already has this stuff gathered.
1.4.1 didnt have engine states. They are the backbone of the tune. Used for cl idle, idle ve, idle timing, overrun, etc.
Here is my best guess on how to tune engine states. Waiting on confirmation from Ken. And tuning them myself.
Fast acceleration threshold: Some low gear, step on the throttle. Pick the lowest(?) RPMdot while accelerating. Set the fast acceleration threshold just below that?
Slow acceleration threshold: Datalog idle and see what the highest RPMdot is during idle. Add and remove loads to get rpm changes. Set to just above the highest RPMdot at idle
Fast deceleration threshold: Rev high in neutral and let it drop back to idle. Set it slightly above the highest RPMdot from that test.
Slow deceleration threshold: Same as Slow acceleration threshold, but with negative RPMdot
TPS: Pretty self explanatory, value when tps is closed, and when full throttle
Overrun Map Threshold: Set as high as possible, I usually use a MAP value just under the lowest MAP I see on idle.
You can get great results autotuning idle cells by allowing the car to idle in gears 1-3 on various road grade angles. Use a slow clutch to hit the high left.
+1 x 1000 on incorporate AFR target
you can export sections of logs from MLV and then open them again in MLV if you copy the header from the original file into the short exported file.
autotuning the decel load cells (no fuel cut) can give you an indication of how close your dead-time is to the actual value. High numbers indicate too short, low numbers indicate too long. Vintage injectors need not apply, the open close transition is junk.
dead-time voltage correction can be characterized at idle by turning on various accessories and then post processing the data
dead-time characteristic curve can be plotted at idle by changing AFR target
the dead time stuff up is a bit complicated may put something more official together.
I only do VEAL after disabling all other features that affect fueling. I turn Overrun Cut and Accel Enrichments completely off, and set EGO authority to zero. I'm finding that this leaves me with a much more stable VE "base" to work from when I turn those features back on, and makes it easier to tune them.
My opinions on smoothing the VE table keep changing. I went through the progression of VEAL easy, medium and hard resistance. By the time I got to hard, it made no changes at all. The table was indeed jagged/spikey, and I tried several different smoothing methods. No matter how I did it, I had numerous lean/rich spots. So I autotuned again, and the table went right back to the same jagged pattern I tried to smooth out. At this point I think the motor wants what the motor wants, the table doesn't have to look pretty to my eye. My car has the best driving characteristics without smoothing after VEAL.
I've read your section about "Incorporate AFR Target" about 20 times, and I still don't really get it. I turned it on anyway (prior to tuning). I think the implication is that now that the car is tuned, I can change the fueling by either adjusting the AFR target table or the VE table. With the "incorporate" feature turned off, the AFR target table is basically useless for anything except autotuning. Do I have that right?
You guys have much more experience than I do, feel free to straighten me out if anything I wrote above is incorrect. Keep up the good work, this thread is great.
I too am tuning with ego on. Thing is my controller authority is not fixing **** and it is set to 25%. When I experimented veal with ego off it dropped the numbers a bunch. Need to test more.
So Ted, according to Aidan's math above- if the Incorporate feature is turned on, then during driving the injector pulsewidth will be influenced by:
1) a factor of the AFR target (at instant load, rpm) vs. stoich mix; and
2) EGO corrections using a factor of the AFR target (at instant load, rpm) vs. instantaneous AFR
This seems peculiar to me. It's basically doing the same correction against the AFR table twice over; in one case it's referencing 14.7 stoich, in the other case it's referencing instantaneous AFR. Seems like potential for conflicting inputs, feedback loops or overshoot. One wouldn't it be better (in theory) to use either Incorporate OR EGO correction? Maybe it's more accurate to say that if Incorporate is on, EGO authority should be more conservative.
Any thoughts on my comment regarding smoothing above? Everyone seems determined to do it, I feel like it's unneccesary or maybe bad. Or maybe I just haven't found the best method.
Did a test yesterday. Turned off ego and started veal. Obviously pulled a lot of fuel. Turned ego on, nothing. No correction. Authority is set to 20%. Anyone can confirm that ego works for him and corrects real time?
So Ted, according to Aidan's math above- if the Incorporate feature is turned on, then during driving the injector pulsewidth will be influenced by:
1) a factor of the AFR target (at instant load, rpm) vs. stoich mix; and
2) EGO corrections using a factor of the AFR target (at instant load, rpm) vs. instantaneous AFR
This seems peculiar to me. It's basically doing the same correction against the AFR table twice over; in one case it's referencing 14.7 stoich, in the other case it's referencing instantaneous AFR. Seems like potential for conflicting inputs, feedback loops or overshoot. One wouldn't it be better (in theory) to use either Incorporate OR EGO correction? Maybe it's more accurate to say that if Incorporate is on, EGO authority should be more conservative.
Any thoughts on my comment regarding smoothing above? Everyone seems determined to do it, I feel like it's unneccesary or maybe bad. Or maybe I just haven't found the best method.
Not exactly. The AFR target table and the VE table are used to calculate the initial value or bias. This pulse width will be close to the required fuel. Other factors and error sources will cause this initial value to be off by some amount. This calculation is an open loop calculation, where feedback is not used.
The EGO uses the AFR table as a target input to a closed loop PID equation. Megasquirt uses a funky PID form, but essentially the current AFR is subtracted from the target AFR resulting in a residual error. This residual error is then used to vary the output parameter to force zero error. The P is an instant reaction, the I is a reaction averaged over time, and the D is a POS that is used to compensate for an overly aggressive P term.
a PID that has less error to compensate out will reach target more quickly and is easier to stabilize. Additionally, the VE and AFR tables serve to normalize/linear-ize the system plant or transfer function. In simple terms, this allows you to use a single set of PID coefficients for the entire operating space. PID output changes at low load and RPM have the same effect on the error term as high load, high RPM operating points.
the fuel table-AFR calculation and EGO do not interact. VEAL backs out the EGO correction prior to making changes. So with EGO on ( and properly configured for a damped response) VEAL will actually work better because the engine is operating at the AFR you are trying to tune to.
Incorporate allows you to change the AFR for a given cell or cells without a re-tune. Plus, you get a real VE table, which contains very useful information.
Thanks Ted- great information, appreciate you taking the time to clarify. It all makes perfect sense. I've been doing a lot of experimenting and reading up on PID tuning methods while dialing in my closed loop idle, but I'm still using the simple algorithm for EGO. I'll probably try to tackle that one next.
I also used the re-bin feature described in Aidan's OP tonight. Worked like a charm, and saved me a ton of time. Great stuff!
Can you elaborate on how to setup the minimum fuel load to what your idle is and incorporate afr.
New to tuning and there seems to be a few weird spots i cant get smoothed out in ny tune. A/f reads great (13.0) part throttle but seems like its busting up lean
Use a Custom Linear WB for your EGO Sensor when calibrating the AFR table.
One size does not fit all. Wiring, grounding points, controllers, etc. all affect each car, differently.
Set the Custom Linear to say, .94 volts/11.88 for Point 1 and 3.28 volts/16.54 for Point 2.
Get the car up to operating temp.
Turn off EGO control.
Turn off Incorporate AFR.
Fix your ignition table.
Get the car idling at 14.2 by adjusting the VE values.
Then.
Fatten up the idle cells until you are at 11.88 or so on your Wideband and then adjust the voltage in Tuner Studio as required for the TS values and WBO2 values to match.
Then, lean out the idle cells until you're at 16.54 on the Wideband and adjust your TS values as well, for Point 2, until they match as well.
I've found that you can get them your values to be within one to two tenths of a point difference by setting the two end points for your particular setup.
Then, re-enable EGO control and incorporate AFRs in your tune.
VEAL will thank you for this. Not to mention logging will be much more accurate.
Last edited by SchmoozerJoe; 12-09-2017 at 03:43 AM.
A lot of this guys stuff is related to MLV more than TS, but it's good knowledge on how to use datalogging to tune an engine with math. I really like his "Advanced Hand Fuel Tuning and Blended Tables" video, which even if you don't use blended maps, is useful on how to plot a useful scatter plot for VE tuning.