Turbocharged Tuning strategy using MAF only (MS3-pro)

Tuning concepts, methods, tips etc.

Moderators: jsmcortina, muythaibxr

E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

With spring around the corner i'm looking to try tuning with a maf sensor on my 1996 BMW 318ti w/ a forged m52b28. I have a PMAS hpx maf that I had been using sucessfully with the stock ecu so the maf setup is proven in that regard. I got the car running sucessfully on ms3-pro with the GM 3-bar map sensor and would like to make the switch to maf to calculate fuel load (maybe spark afr as well.) The tuning strategy in the manual I tried before parking my car for winter but didn't get the car running well no matter what I did. Does anyone have their own strategy that worked for them? With the car being turbo charged I want to have a fool-proof solid strategy so I stay safe while tweaking. I have the transfer table data for the maf as well in relation to the intake piping size (3"). There was a member here who had a technique that involved creating a new calculation in MLV. They were n/a so I'm thinking a different strategy would be in order for a turbo car. Anyone? I'm open to suggestions of all sorts. If any additional infomation is needed please let me know.

Thanks in advance!
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by winstonusmc »

I used the strategy with making new calculations with my turbo L28 Datsun. I would say it works better with turbo than NA being that the piping would help smooth out the airflow. You still have to be close. I used the stock MAF curve and could a ratio that worked well at idle and free revving throughout. That got me within 15%. Then cruised without going into too heavy boost. Once I nailed light load, then the curve was pretty spot on. I will post more later. It was much easier than MAP tuning, took less gas to tune.
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Excellent to know you found it easier than MAP. Were you using the new style with the fully exposed Flow curve or the old style? I await your next post!
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by winstonusmc »

OK, here is my background with MAF:

I started tuning Nissans about 8 years ago with ROM tuning. I learned that the Nissan used a 2byte x 64 table for the MAF curve, starting off with 0000 to FFFF in hex and 0 to 65535 in dec. Each data point is .08v Then scales it with another call the "K" constant to calculate fuel. So all we had to do in the Nissan ROM tuning community was upload the correct table belonging to whatever MAF we were using and scale the "K" constant to give the correct fueling. I am writing this to kind of make sense on the Excel doc I put together to help me with tuning the MAF.

Now fast foreward to the Megasquirt "new" MAF tuning with the exposed curve. I got kind of a love hate opinion of the G/sec entries in the flow curve as I am used to just using the constant in the Nissan way. So I set up an Excel doc that uses the Hex curve straight from the ROMs of the ECU. I then used a formula in Excel to kind of mimic the constant that I am familiar with to get a workable G/Sec to enter into Tuner Studio. I have attached this excel sheet below. I am not sure how any other manufacturer of MAF does it, but this can get you close with any MAF, as long as you know the voltage curve. Now I also included an error percentage column in the excel sheet that come directly from the scatter plot in Mega Log Viewer (MLV) that I will discuss later. Just plug in whatever error is at any given MAF Voltage. Also setup VE1 as a trim table with all values starting at 100, this happens to be percent correction BTW.

When you first need to start the engine with the new MAF, its kind of trial and error. I was lucky and guessed "5" for my origional correction factor in Excel. This allowed the engine to actually start. You can also use VE1 and enter in a value throught the entire map till the engine starts. Once it can idle, just use VE1 to get a good idle AFR and use that value in Excel to adjust the MAF curve and get it close enough to cruise around the block. I found in my case it got me within 15% throughout the MAF curve.

Now setting up MLV to give you Error correction is dicussed her http://msextra.com/forums/viewtopic.php?f=134&t=49504. Here is a brief synapsis:
subwoofer wrote:I will present a method that appears to work, and give good corrections fast. You will need a fairly long log (the longer the better) of the engine running on MAF, and a registered copy of MLV. The rest is just work...

1. Define custom fields in MLV
To easily adjust the MAF transfer function you need more resolution on the crosshairs readout than MLV will provide for the MAF voltage, so define

MAF millivolts = [MAF volts]*1000

Next, define the correction factor (I called it MAFcorr2 for short). It must also be scaled to get enough resolution, I chose a factor 100 to get a readout in percent.

MAFcorr2 = [Field.AFR]*[Field.egoCorrection]*[VE2]/(10000*[AFR 1 Target])*100

Substitute my fuel correction factors with all your active corrections, I use VE2 in alpha-n mode for corrections along with EGO.

2. Load scatter plots
Set up a scatter plot plotting MAF voltage vs. MAFcorr2. Third axis is up to you, I use EGO correction.

The more stable your MAF system is - along with the correctness of dead time and other factors - the narrower the band will be. Resonant spots will likely show up as a tall cloud of correction values for a band of voltages.

I also plotted a plot with the same axis as my VE2 correction table to see the distribution of the EGO corrections.

3. Adjust MAF curve and trim table
Use the crosshairs in the plots to find the correction factor for each MAF voltage bin. Multiply the old mass flow value by the correction factor to get the new mass flow value for that particular voltage.

The trim table will be easy to correct, as the EGO value will point to any areas that are too rich or too lean.


Hope this is useful, don't be shy to comment on the method!
This will allow you to view how far off you are. You can even use VE1 as a trim table and tune with VEAL. The formulas above will display the actual error before all corrections of VE1 and EGO. So this means that if you drive around all day using VEAL and your AFRs are spot on, the graph will show you how far offf the MAF is even if the AFRs are exact. Once you plug the error percentage into the excel doc, you copy and paste the new correction numbers into the correction column. I then line up the excel sheet up with the MAF table and enter in the G/Sec values one at a time. This is the part that sucks.

You will notice on the first couple datalogs, that it doesn't go into the upper ranges of MAF Volts as you really dont want to bring it into the higher loads till the tune is closer. Its ok, as you can just carry the correction numbers from the highest values recorded out the entire range. It really only takes a couple times doing it this way to get it pretty spot on.

A note on the attached Excel doc. This is the doc I am currently using on my Datsun L28ET motor running a Z32 300zx MAF (N62). Feel free to copy and use whatever. I feel that something should be added in Tunerstudio, like a drop down calibration on different MAFs like on the old style MAF tuning in Megasquirt.
NissanMAFcurvesCalculator.zip
MAF tuning2.JPG
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by winstonusmc »

Just took a look at the flow sheet for the HPX MAF, very similar to what I put together. You can use that datasheet with tuner studio, just use every four numbers in the 256 region. I tried to modify that doc, but they have it protected, bastards! I really want one of those MAFs, but the price of a used N62 from a 300zx is much lower.
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Thank you, thank you, thank you! :mrgreen:

I really appreciate you sharing your trials and tribulations w/maf tuning even with the stock ecu. I have access to some transfer function files for a few bosch bmw maf sensors that I may try in the future setting up a flow curve for in TS using your excel sheet. I already have subwoofer's custom MLV fields plugged into my Megalogviewer but until you presented the sheet to be used alongside the mafCorr I didn't find it really effective in getting the curve dialed in. Also, as you can see by the new name (2014) on the hpx excel sheet they never added the 256-point version until recently which is great for plugging in the curve into TS accurately versus the 40-point. Great timing on their part! I also had to bump the range as well to the 1300g/sec (& having to start over mid way :o) So I am interested to see how the car reacts with that change. When I was tuning the stock ecu with this same maf I was lucky enough to get a flow curve that I didn't need to make much changes to so this will be new territory for me. With a solid plan of attack I may just be looking forward to getting this figured out for my setup. Thanks again I will try everything you've suggested and report back hopefully soon when the snow melts here in Toronto.

as you can see, the newer curve entered looks more promising:

Image

Image
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by winstonusmc »

I think using their sheet might be an advantage in the beginning, by using the pipe diameter to scale the whole map. Or just plug in each g/sec value into excel and setting up a error percentage. But if that MAF is as good as they say it is, then scaling the entire curve by manipulating the tubing diameter may be all that is necessary. Just remember when scaling, more air is more fuel. The higher numbers on the scatter plot means the numbers need to increase on the MAF scale.

On a side note, I am kind of excited on these slot style MAF Meters as they are on a great number of cars. They advertise much higher resolution than the old "tonsil style" MAF sensors of the 80s and 90s. You will learn to appreciate consistancey, as the slot style has over the tonsil style. Looks like I might retire my old 300zx MAF for something like the slot style Hitachi unit in my G35. Those can be had for real cheap, as its the same on almost everything Nissan V6. And if it maxxes out, then just up it to a PMAS unit.
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

So, I fired up the car in the garage this week for a bit, eager to test the new curve. I let the car warm up fully on the sorted map tune then went ahead and switched to MAF. the car won't start with this new curve. the main changes besides the obvious to the curve was I changed the range to 650 to 1300g/s since the max value is ~800g/s. What should I be looking at to assist to get the engine running with the curve? is my curve off possibly? my other curve was able to start the car and get it idling.
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by subwoofer »

:msq:

Both before and after the changes.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Here's what I've got. I logged the car warming up at idle using the old style calibration curve with a custom .inc file I had created using mafanalyzer. Car idles pretty well and when messing with the old style correction curve i was able to get the car to happily idle @ stoich when fully warmed up. New style/curve however gives me a car that won't at all.

LOG: http://www.mediafire.com/view/4nroqz2ef ... logold.msl
MSQ For that log: http://www.mediafire.com/view/tihbaq0ps ... rtable.msq
.INC calibration file used: http://www.mediafire.com/view/quh34oa1x ... factor.inc

Here is the MSQ using the new style maf curve that will not start the car even when warm. I didn't see a point of logging as you would just see the car cranking:

MSQ: http://www.mediafire.com/view/7rjjea1mb ... dcurve.msq
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by subwoofer »

E30_Driv3r wrote:Here is the MSQ using the new style maf curve that will not start the car even when warm. I didn't see a point of logging as you would just see the car cranking:
Au contraire... Logging the cranking is very important indeed, because it tells you the difference from the running setup. Pay special attention to the pulse width and MAF (g/s). They should be (roughly) the same for both cases, otherwise you have to tweak the new setup until the MAF value matches. I don't think you'll be able to plug some calculated value in and expect it to run well, you must tweak the curve. Easily done, but a bit confusing at first. Also see http://msextra.com/forums/viewtopic.php?f=134&t=53625 for a small gotcha in that respect.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

I appreciate your input subwoofer bigtime, as I see you as one of the "leaders" in MAF tuning on ms3. Thanks for that tip. I didn't expect it to run perfectly but I was thinking a correctly/accurately entered curve based from the maf's specs would be a good start to get tuning on the car. I will adopt your strategy and see where it gets me. Your confidence and speed where you dial in a curve gives me confidence that I can get mine sorted out well and in a fair amount of time. I will log, try tweaking the curve and report back.

Small n00b Q but just wanted to be sure. To get the correct mass flow value using MLV and your custom fields, for example lets say a flow value is 13.6g/sec with a correction factor of 82.0, I would do 13.6 * 0.82 = corrected new mass flow value?
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Got two more logs of me cranking it. Still no start. It's still very rich. I've been trying the mlv maf Correction factor In the lower voltage ranges of the flow curve. Not sure if I'm doing it right but I've done two checks/adjustments and mafcorr2 still remains unchanged which I find odd. I would assume some revisions would yield a change in the correction factor but it remains at 68 at the lower range voltages that my log covers.

http://www.mediafire.com/view/?0146348um14bchr

http://www.mediafire.com/view/?uoityc7i9qx9cdx

Please also see my other post I just want to know I'm correctly plugging in the numbers.
winstonusmc
Experienced MS/Extra'er
Posts: 204
Joined: Sun Jul 31, 2011 7:45 am

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by winstonusmc »

Use VE1 to help you get it started. Its a quick way to change the entire map without changing a lot of values. Once you get it to idle with VE1 changed, scale the entire curve to whatever scale is in VE1.
Nissan Skyline R34 RB26DETT ran MS3/MS3X w/ factory Hitachi CAS (sold)
Nissan Silvia S14 RB25DE ITB/NA ran MS3/MS3X w/ factory Mitsubishi CAS (disassembled)
Datsun 240z RB25DE ITB/NA with MS3/MS3X
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

I was re-reading your posts..Makes sense to use VE1 to start. I wanted to work with the raw curve first but using VE1 seems like a much, much better& quicker idea to get things going. Giving the laptop a charge and heading back out to the garage shortly!
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Ok so I got her idling. I had to drop the entire ve1 table to 1.5% correction value that nets me an afr when warm of about 12.5-13.0....giving it throttle it tends to run lean so I will have to add back above idle loads. 1.5% is a really low number! How do I scale the curve using this info from ve1 as you've described winstonusmc? I'm thinking i need to scale the curve, set the VE1 table back to 100 and then log/correct again till I hit my desired afrs? sound right? I promise i'm slowly getting the idea here....

edit: i'm thinking because I raised the range to the 1300g/sec to fit my values in I killed my low end resolution. I'm going to swap the table back to the 650g/s range (my max value is 669) so I'll drop it down to 650 so it fits in the lowest range. I think this will make VE1 more usable.
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by subwoofer »

Getting warmer!

You probably won't need more than 650g/s (at least until you really go crazy with the boost), so leave it at that for now and get the rest dialed in first. I really don't know how much testing has gone into 1300g/s mode yet, so you could easily be the guinea pig...

So, in order of priority:
===================
1. Make sure the AFR target table is sound*, you don't have to use MAFload for the load axis if you have other/better ideas (I use TPS for load - because I can...)
2. Make absolutely sure your deadtime and REQ_FUEL settings are sound
3. Get the car started by whatever fudging of the MAF curve necessary, take a slow drive around the block to let VEAL do its job and to get the lower part of the MAF curve logged. Make sure you have EGO enabled, makes the process quicker.
4. Use the above log and correct the MAF curve with whatever data you have. Scale the remainder of the curve with the same correction factor you found for the highest MAF voltage in the log. You can actually use logs that have been taken during VEAL to make corrections, at least for the first iteration. This speeds the process up even more. Filter out "Transitions" and "Overrun" from the scatter plots, those situations just blur the picture.
5. Reset the VE1 table to all 100s, enable VEAL again and take another drive. Watch your AFRs, but by slowly working up in load you should be in the ballpark in 30 minutes.
6. Rinse and repeat the cycle, two or three iterations should get you to the point where your VE1 table only contains values between 98 and 102 (or so). Smooth that table, load it back to the ECU and call it a day.


*) Please upload the .msq to the forums instead of on Mediafire, I just get "File blocked for violation" when I attempt to download them. Thus I have not been able to take a look on it.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
E30_Driv3r
Experienced MS/Extra'er
Posts: 193
Joined: Sun Dec 14, 2008 5:31 pm

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by E30_Driv3r »

Got the car more road worthy. Still working on the curve..

fixed the permissions, try the link below. MSQ uploaded to the forums.

1)I do have in my opinion a decent AFR table, see msq
2)I had an issue where the high flow fuel pump was giving the stock regulator a hard time maintaing fuel pressure so I got an aeromotive fpr to guarantee consistant fuel flow. deadtime is good.
3)The following log is a result of fudging and a drive around the block. I then went for a longer drive with VEAL. Drivability is improving but going through the logs I'm have a hard time pin pointing what voltages need how much corrections since sometimes a voltage can have varying amounts of correction needed. I get the idea now, Just want to know how to execute it well.
4)This is where I'm stuck. I think I have good data just need to know how/where to make changes. How do I filter out the overrun and transitions like you say?

Thanks In advance!

http://www27.zippyshare.com/v/8464158/file.html
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by subwoofer »

I have tweaked your curve quite a bit, and fixed a few settings (*) I believe to be causing much scatter in the correction plots. I think you could allow yourself to keep EGO active over a larger area too, but I have not touched that setting. As always, don't trust me and just load the new file, review all changes for yourself and take it easy first time out.

The MAF curve should be smooth and monotonous, your's had peaks in it. It was also quite a bit low, so your ignition timing will be high, that will correct itself as the curve gets better. See below for the basic idea of my changes (apart from smoothing)
2014-04-08 06_56_44-Greenshot.png
Always filter out cold, transitions and overrun conditions from the scatter plots, those data points just blur the picture. I believe the lag factors to be blurring the picture more than necessary. Also, you can use the scatter plot method on data collected while VEAL is running!. For the first run, that will get you much closer much faster.


*) I think I have mentioned it before: There should be no need for lag factors on the order of 50 for MAF, MAP and RPM unless there is a severe physical problem.
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
subwoofer
Super MS/Extra'er
Posts: 884
Joined: Sat Apr 30, 2011 12:34 pm
Location: Sandefjord, Norway

Re: Turbocharged Tuning strategy using MAF only (MS3-pro)

Post by subwoofer »

To point 4: Press the funnel symbol in each scatter plot. Cold and Transitions are already defined, for overrun I use [TPS]<5 && [RPM]>1500 as the filter function
Joachim
1974 Jensen-Healey
1990 VW Caravelle Syncro - running MS3+X
2014 Ford Fiesta EcoBoost
Post Reply