Matt Dupuis
10-28-2004, 03:56 PM
As a result of the growing number of Megasquirters, I thought I'd relay my method of tuning one with a NB O2 sensor. For tuning with a wideband I have another method that's somewhat less automatic, but it's based on a NB tune. I actually removed my WB sensor in favour of my NB sensor and the following method, with the exception of in-boost tuning, at which point I went back to WB and filtered the resulting datalogs through an excel spreadsheet.
Also note that tuning a 12x12 table is slightly different - you can't actually export your VE table - rather I just set the rows and columns, let MST3K fill in the values, and then I'll manually copy them down on a sheet of paper (printed off a 13x13 grid on a couple dozen sheets for this occasion) and decide which ones to update. This also gives a good indication if things are only changing by 1 or 2 VE points, or more.
Anyway, here goes:
It's important to know how to get good datalogs, and that takes a little practice, but key among the settings are keeping your O2 sensor refresh rate in a decent zone, which is about 3-4 times per second. In the classic B+G code, that involves planning out an RPM range you're going to be datalogging in, calculating how many ignition events happen per second, and dividing by 3-4. I prefer to hack my code so's to get time-based refresh rates, so that it refreshes at the same rate no matter the engine RPM.
It really helps to have a good baseline. If you have a good baseline, you can leave your O2 correction % at a lower value, like 30%, otherwise if you have no idea, you'll set it to 75% or more. The further off your map is, the longer it'll take for your EGO correction to get it to stoich, which is what MST3K is looking for.
Turn off all accleration enrichments, and get used to driving it like it's going to hesitate when you step on the gas. Set your O2 sensor to 1% per step if your map is close, 2% per step if it's wildly out.
Basically over the course of a few days, I'll do maybe 200 miles on the road, datalogging the entire time. While datalogging with a NBO2, 90% of that will be under 100 kPa, with the rest no higher than 110 kPa. That's just to get an idea of the curve as it starts to get under boost. Don't make any changes to the VE table during this time, and don't change any other settings either.
Drive the car with long, slow accelerations. Basically, drive the car as smoothly as possible, with as little shifting as possible, and get as many load/rpm combinations as possible. Get as many samples of each load/rpm combination as you can as well - that'll mean lots of time in 2nd gear on a deserted highway, revving from 800 - 5000 RPM at various throttle openings. Do it again and again - at lunchtime if you're at work, in between classes if you can get to a suitably deserted road, etc.
Once you have 7 or 8 good, long, datalogs, export your VE table and open up your MST3K and check your settings. Make sure you have the O2 voltage to 0.500, set it up for two pass filtering, and leave the "deltas" or "omegas" or whatever they are alone. They matter, but it takes practice to figure out when they matter. Turn on outlier elimination. Set your rev range from 500-6500 RPM.
Open up all of your datalogs at once. If you open one at a time, it'll ask you if you want to append the map or clear it - you're appending it. Let it do it's thing, searching for crossover points and deleting outliers (points in a particular load/rpm area that are way off the average). Eventually it'll plot a colourful map on the main page.
Go to Edit - Modify Map (something like that - it's been a while) and you'll get an 8x8 table with nothing filled in, and another window beneath it. Import your VE table, and it'll fill in the 8x8. Over on the right, is a button labeled Filter Datalog. Press it and go have a smoke, take a pee, or fix a sandwich. What it's doing at this point is comparing all the points it knows, first along a fixed RPM and then along a fixed MAP, and filling in all the points it doesn't know via interpolation. Your "deltas" or "omegas" or whatever they are in Settings is what determines this curve, and if you left it on one pass filtering it would only compare along the RPM and ignore the MAP. It'll take a while, depending on your computer.
When it's done doing it's thing, in the lower window it'll plot a nice, pretty, colourful 3d VE map in the bottom window, and it'll place your table column/row centers in a grid overtop. Here's where MST3K really comes in handy - you can now see trends in the amount of fuel your engine is looking for. Intake/exhaust tuning, camshaft, port tuning, etc... all the efficiencies and inefficiencies will show up as a series of peaks and valleys. Now you must move your RPM column centers to line up with the major peaks and valleys!
Megasquirt interpolates between the centers in your VE table in straight lines. i.e., if your VE value at 70 kPa and 2000 RPM is 50, and at 70 kPa and 2500 RPM is 60, it'll draw a straight line across the two points so that when you're at 2200 RPM, your interpolated VE value is 54.
Since it does this in straight lines, both across RPM and across MAP gaps, it really helps to have your RPM columns lined up with the peaks and valleys. If you had one column on the upslope and the next column on the downslope of a given peak, the VE table would be correct at those points, but it would slice the top off the peak with a straight line between the points, and you'd be lean everywhere between your columns.
So now figure out where you want your MAP rows. There's no science to the MAP rows, but a good rule of thumb is to concentrate on where your engine is running most of the time. For example, with only 8 rows to choose from, I want maximum resolution between 60 and 90 kPa (maybe 3-4 rows), one at idle kPa, one at the peak boost kPa, probably one at 15-20 kPa for coasting, and the last one will probably go somewhere in your boost range, to space out the gap between 100 and 200 kPa (assuming your peak boost is 200 kPa or so). I see SO MANY maps with 4 rows in the boost, and one each for 25-50-75-100. 80% of my time is spent between 50 and 100 kPa, so why have only 25% of the map dedicated to that time? Of course, you can put too much emphasis on that, if your engine fuel requiremens is very smooth and linear between 50 and 100 kPa, one or two rows might be enough. Who am I to say?
Anyway, having beaten THAT to death, press the button labeled "calculate map", and it'll fill in the applicable areas of the VE table. You will only get values up to about 100-110 kPa, so you can use those same numbers in all the boost rows for now. They won't grow much, as Megasquirt uses manifold pressure as one of the multipliers, so it's not required to make 200 kPa rows much richer than 100 kPa.
Save the VE table, open up Megatune, import the VE table, and go for a drive. You should be within 1-2% of stoich everywhere, according to your gammaEGO. On to the next step!
Make sure you have good gas for this - 92 or better octane, and pull out some timing just to be safe.
Go back to your favourite deserted road, and make a run from 1500 to redline at 100 kPa, checking your gammaEGO to be sure you're close to stoich all the way up. Do more runs, slowly opening the throttle a little per run, to start increasing boost. As you get to 120, 130 kPa, you should see if it's going lean or rich. You're going to want to start modifying the VEs in the next row higher than 100, so that it's JUST switched from lean to rich, indicating stoich all the way up. I've been able to get all the way up to 160 kPa doing this, running right at, below, or above stoich, given that I've filled up with good gas and had a little less than maximum spark advance. Only go as high as you feel comfortable.
Because you left your 100 kPa row at stoich all the way across, and it stayed approximately stoich as you started increasing boost, you know that your next higher MAP row is approximately stoich as well, as the engine's requirements aren't going to change all that much under boost. If you didn't just tune your last row, use your judgement and guess at what the last row needs, based on your 100 and your next rows. i.e., if you have a 100, a 150, and a 200 row, and MST3K said that 68 was what you needed to be stoich at 100 kPa, and your on-road manual tuning came up with 73 for 150 kPa, you can safely assume that you'll need a VE of 78 at 200 kPa.
At this point, I call the VE table as good enough, and save it as a "stoich backup".
Now you may start richening and leaning it up. At 100 kPa I typically multiply my numbers by 1.1 - i.e., 80 becomes 88, 75 becomes 83, etc. This gets you to about 13.3:1 AFR. At peak boost I like to run around 12.2:1 - many go richer than this, but I'm not in a race to see how much fuel I can burn. I multiply my peak boost VE by 1.2, and my "intermediate" boost, if appliccable, by 1.15. For cruise areas - 2500-3000 RPM and 60-80 kPa, I'll lean it out to 16:1 by multiplying the values by .90
Now add your acceleration enrichments back in, set your EGO correction limit to 5% (or less), and hit the road to play with your timing. If you've leaned your car for cruise, turn off your EGO correction entirely by setting the % per step to 0.
Using this method, I was unsure of how good the results were, but when I finally got my wideband installed, I found that I was within 0.2 of an AFR point of where I thought I was, at all times. I think that's pretty good for a week's worth of tuning and a tank of gas!
I don't have time to go back and re-read all this crap, so if anyone sees anything they question, bring it up and I'll address it.
*Edit* - keep watching this space for updates - I will be adding to this article in the future. Topics to come are initial MS setup, tuning steps, and using the other tuning programs such as MSLVV and my own datalog filter.
Also note that tuning a 12x12 table is slightly different - you can't actually export your VE table - rather I just set the rows and columns, let MST3K fill in the values, and then I'll manually copy them down on a sheet of paper (printed off a 13x13 grid on a couple dozen sheets for this occasion) and decide which ones to update. This also gives a good indication if things are only changing by 1 or 2 VE points, or more.
Anyway, here goes:
It's important to know how to get good datalogs, and that takes a little practice, but key among the settings are keeping your O2 sensor refresh rate in a decent zone, which is about 3-4 times per second. In the classic B+G code, that involves planning out an RPM range you're going to be datalogging in, calculating how many ignition events happen per second, and dividing by 3-4. I prefer to hack my code so's to get time-based refresh rates, so that it refreshes at the same rate no matter the engine RPM.
It really helps to have a good baseline. If you have a good baseline, you can leave your O2 correction % at a lower value, like 30%, otherwise if you have no idea, you'll set it to 75% or more. The further off your map is, the longer it'll take for your EGO correction to get it to stoich, which is what MST3K is looking for.
Turn off all accleration enrichments, and get used to driving it like it's going to hesitate when you step on the gas. Set your O2 sensor to 1% per step if your map is close, 2% per step if it's wildly out.
Basically over the course of a few days, I'll do maybe 200 miles on the road, datalogging the entire time. While datalogging with a NBO2, 90% of that will be under 100 kPa, with the rest no higher than 110 kPa. That's just to get an idea of the curve as it starts to get under boost. Don't make any changes to the VE table during this time, and don't change any other settings either.
Drive the car with long, slow accelerations. Basically, drive the car as smoothly as possible, with as little shifting as possible, and get as many load/rpm combinations as possible. Get as many samples of each load/rpm combination as you can as well - that'll mean lots of time in 2nd gear on a deserted highway, revving from 800 - 5000 RPM at various throttle openings. Do it again and again - at lunchtime if you're at work, in between classes if you can get to a suitably deserted road, etc.
Once you have 7 or 8 good, long, datalogs, export your VE table and open up your MST3K and check your settings. Make sure you have the O2 voltage to 0.500, set it up for two pass filtering, and leave the "deltas" or "omegas" or whatever they are alone. They matter, but it takes practice to figure out when they matter. Turn on outlier elimination. Set your rev range from 500-6500 RPM.
Open up all of your datalogs at once. If you open one at a time, it'll ask you if you want to append the map or clear it - you're appending it. Let it do it's thing, searching for crossover points and deleting outliers (points in a particular load/rpm area that are way off the average). Eventually it'll plot a colourful map on the main page.
Go to Edit - Modify Map (something like that - it's been a while) and you'll get an 8x8 table with nothing filled in, and another window beneath it. Import your VE table, and it'll fill in the 8x8. Over on the right, is a button labeled Filter Datalog. Press it and go have a smoke, take a pee, or fix a sandwich. What it's doing at this point is comparing all the points it knows, first along a fixed RPM and then along a fixed MAP, and filling in all the points it doesn't know via interpolation. Your "deltas" or "omegas" or whatever they are in Settings is what determines this curve, and if you left it on one pass filtering it would only compare along the RPM and ignore the MAP. It'll take a while, depending on your computer.
When it's done doing it's thing, in the lower window it'll plot a nice, pretty, colourful 3d VE map in the bottom window, and it'll place your table column/row centers in a grid overtop. Here's where MST3K really comes in handy - you can now see trends in the amount of fuel your engine is looking for. Intake/exhaust tuning, camshaft, port tuning, etc... all the efficiencies and inefficiencies will show up as a series of peaks and valleys. Now you must move your RPM column centers to line up with the major peaks and valleys!
Megasquirt interpolates between the centers in your VE table in straight lines. i.e., if your VE value at 70 kPa and 2000 RPM is 50, and at 70 kPa and 2500 RPM is 60, it'll draw a straight line across the two points so that when you're at 2200 RPM, your interpolated VE value is 54.
Since it does this in straight lines, both across RPM and across MAP gaps, it really helps to have your RPM columns lined up with the peaks and valleys. If you had one column on the upslope and the next column on the downslope of a given peak, the VE table would be correct at those points, but it would slice the top off the peak with a straight line between the points, and you'd be lean everywhere between your columns.
So now figure out where you want your MAP rows. There's no science to the MAP rows, but a good rule of thumb is to concentrate on where your engine is running most of the time. For example, with only 8 rows to choose from, I want maximum resolution between 60 and 90 kPa (maybe 3-4 rows), one at idle kPa, one at the peak boost kPa, probably one at 15-20 kPa for coasting, and the last one will probably go somewhere in your boost range, to space out the gap between 100 and 200 kPa (assuming your peak boost is 200 kPa or so). I see SO MANY maps with 4 rows in the boost, and one each for 25-50-75-100. 80% of my time is spent between 50 and 100 kPa, so why have only 25% of the map dedicated to that time? Of course, you can put too much emphasis on that, if your engine fuel requiremens is very smooth and linear between 50 and 100 kPa, one or two rows might be enough. Who am I to say?
Anyway, having beaten THAT to death, press the button labeled "calculate map", and it'll fill in the applicable areas of the VE table. You will only get values up to about 100-110 kPa, so you can use those same numbers in all the boost rows for now. They won't grow much, as Megasquirt uses manifold pressure as one of the multipliers, so it's not required to make 200 kPa rows much richer than 100 kPa.
Save the VE table, open up Megatune, import the VE table, and go for a drive. You should be within 1-2% of stoich everywhere, according to your gammaEGO. On to the next step!
Make sure you have good gas for this - 92 or better octane, and pull out some timing just to be safe.
Go back to your favourite deserted road, and make a run from 1500 to redline at 100 kPa, checking your gammaEGO to be sure you're close to stoich all the way up. Do more runs, slowly opening the throttle a little per run, to start increasing boost. As you get to 120, 130 kPa, you should see if it's going lean or rich. You're going to want to start modifying the VEs in the next row higher than 100, so that it's JUST switched from lean to rich, indicating stoich all the way up. I've been able to get all the way up to 160 kPa doing this, running right at, below, or above stoich, given that I've filled up with good gas and had a little less than maximum spark advance. Only go as high as you feel comfortable.
Because you left your 100 kPa row at stoich all the way across, and it stayed approximately stoich as you started increasing boost, you know that your next higher MAP row is approximately stoich as well, as the engine's requirements aren't going to change all that much under boost. If you didn't just tune your last row, use your judgement and guess at what the last row needs, based on your 100 and your next rows. i.e., if you have a 100, a 150, and a 200 row, and MST3K said that 68 was what you needed to be stoich at 100 kPa, and your on-road manual tuning came up with 73 for 150 kPa, you can safely assume that you'll need a VE of 78 at 200 kPa.
At this point, I call the VE table as good enough, and save it as a "stoich backup".
Now you may start richening and leaning it up. At 100 kPa I typically multiply my numbers by 1.1 - i.e., 80 becomes 88, 75 becomes 83, etc. This gets you to about 13.3:1 AFR. At peak boost I like to run around 12.2:1 - many go richer than this, but I'm not in a race to see how much fuel I can burn. I multiply my peak boost VE by 1.2, and my "intermediate" boost, if appliccable, by 1.15. For cruise areas - 2500-3000 RPM and 60-80 kPa, I'll lean it out to 16:1 by multiplying the values by .90
Now add your acceleration enrichments back in, set your EGO correction limit to 5% (or less), and hit the road to play with your timing. If you've leaned your car for cruise, turn off your EGO correction entirely by setting the % per step to 0.
Using this method, I was unsure of how good the results were, but when I finally got my wideband installed, I found that I was within 0.2 of an AFR point of where I thought I was, at all times. I think that's pretty good for a week's worth of tuning and a tank of gas!
I don't have time to go back and re-read all this crap, so if anyone sees anything they question, bring it up and I'll address it.
*Edit* - keep watching this space for updates - I will be adding to this article in the future. Topics to come are initial MS setup, tuning steps, and using the other tuning programs such as MSLVV and my own datalog filter.