How to Tune for Port Injection and Apply Accurate Fueling corrections

andale927

Silver Member
Greenie N00B Member
Greenie Member
Figured I'd write-up a guide on how to properly tune a mazdaspeed with port injection, the excel sheet I made to assist with this is attached below. This guide assumes you have prior tuning knowledge and glosses over basic knowledge like how to use the R4 software.

Part 1 - Base map

1.) Start by determining the amount of fuel you wish to be covered by your port injection system. One strategy is to keep your MAF curve the same and then cap it off at a certain value where your DI duty cycle isn't too high and then bring in Aux fueling to cover the rest. Your final MAF curve will end up looking like this:
upload_2020-9-7_8-41-29.png


I don't really like this method and prefer to have a more linear blend of AUX fuel where aux fuel begins to cover more and more of the required fueling as airflow increases. For my setup this is required as my HPFP cannot keep up at low RPM due to the quick spooling turbo and high torque. This also reduces the skew to calculated load due to MAF scaling. The end result looks like this:
upload_2020-9-7_8-47-12.png

Anyways, the choice is yours and both work.

2.) To begin, go to the Excel Tab labeled MAF_PI Blend Calculator
-Copy and paste your MAF calibration that has not yet been scaled for port injection into the row called 'Old MAF Table'
-Enter percentages into the row called 'Percent from Aux' depending on how aggressively you want PI to come on and what you want the MAF curve to look like. (The example is very aggressive so that the screenshot is not huge.) If you have a 4" intake and quick spooling turbo you will want to begin at 3v, otherwise beginning at 3.5v is fine.
Note: If you already have a PI map which you are trying to modify, you can enter the values into the 2nd table on the 1st tab of the spreadsheet. This will reverse calculate the percentages for you when you enter the non-PI and PI scaled MAF Cals.

upload_2020-9-7_8-50-53.png
-The output is a new MAF table which you can plug directly into Accesstuner.
-The 'Airflow Covered by Aux' row can be plugged into the Stratified R4 calculator as the MAF (g/s). Make sure that you enter 100% in the "Percentage of fueling by Aux Injectors" box.
upload_2020-9-7_8-57-19.png
-This gives you a map you can plug in directly into your R4 software.
Stratified Calculator Link: http://www.stratifiedauto.com/R4 Fuel Calculator/Index.html

3.) You can now start doing pulls and gathering data. Your AFRs should be in the ballpark but some corrections will be required. For coarse tuning of AFRs I prefer to modify the R4 map to get close to the desired AFR. Here is what my first log looked like with the above method:
upload_2020-9-7_9-5-34.png
Pretty smooth, but could use a little work. Rather than skewing your MAF curve further, it is better to correct this in your R4 map.

If further fine tuning is required after that you can modify the MAF curve.

Part 2 - How to make corrections to the R4 Map

Based on the log above, it might seem logical to just remove 10% from the PI IPW at the MAF voltages where the rich dip occurs. This does not work too great because it doesn't account for 2 factors, 1) Injector Dead Time and 2) The aux fuel is a percentage of total fueling, pulling 10% won't lean out your AFRs by 10%. The rest of the attached Excel file is to help with this.

1.) Go to the 'Inputs' tab of the excel file. Enter your Injector Dead Time and copy/paste your R4 map into the Table.
upload_2020-9-7_9-10-3.png

2.) Enter the % From Aux Fuel values which you used from part 1 of this guide. Notice that the header row voltage corresponds to the R4 Map. The 1st tab in the excel file outputs a linearly interpolated percentage which you can plug in directly.
Copy
upload_2020-9-7_9-13-28.png
Paste
upload_2020-9-7_9-13-47.png

3.) Now you can enter the percent fueling correction you want applied at various MAF voltages. You will need to analyze your logs to determine this. I am working on a way to calculate this from a log automatically but it is not complete yet. Based on the above example we want to remove about 10% from our AFRs from 3.6 to 3.9V.
upload_2020-9-7_10-23-34.png
Note: You will need some logic here. If you are 10% too rich and only 2% of fueling is coming from Aux at that point in time you will need to correct the MAF curve and not the R4 map. This also means the original MAF table you provided was inaccurate.


The spread sheet then performs the following calculations:
-Removes the Injector dead time from the R4 Table.
-Calculates the correction factor to make up for the portion of fueling covered by the DI system in order to make the desired change to AFR.
-Applies the corrections to the R4 table.
-Adds the Injector dead time back into the R4 table and spits out the new table on the Outputs Tab.
upload_2020-9-7_10-46-42.png
(You will need to use your noggin and not copy cells that you did not enter complete data for.)

Thats it! A lot of this is possible to do manually, but this should reduce the number of revisions you have to do and prevent a lot of headache. I just swapped to ID1000 injectors and was able to dial in my PI map in under an hour and a half using this method.

If anyone has any suggestions for the spreadsheet, let me know.

The excel is macro enabled with vba linear interpolation and it isn't an allowed extension on the forum, so you can download it at the following google drive link:
Template public:_media_site_embed_googledrive not found. Try rebuilding or reinstalling the s9e/MediaSites add-on.
(The forum automatically embeds it but clicking it should give you a download button.
 

Attachments

  • upload_2020-9-7_8-44-58.png
    upload_2020-9-7_8-44-58.png
    67.4 KB · Views: 18
  • upload_2020-9-7_8-48-47.png
    upload_2020-9-7_8-48-47.png
    31.4 KB · Views: 15
  • upload_2020-9-7_9-16-17.png
    upload_2020-9-7_9-16-17.png
    7.8 KB · Views: 16
  • upload_2020-9-7_10-20-51.png
    upload_2020-9-7_10-20-51.png
    8.5 KB · Views: 12
  • upload_2020-9-7_10-21-28.png
    upload_2020-9-7_10-21-28.png
    95.6 KB · Views: 17
Last edited:
Forgot to mention, this will work great with a return style fuel setup, but if you are returnless you will find that you will need to make some large adjustments. One way of calculating a more accurate R4 basemap is to calculate in small steps on the stratified calculator; Basically enter the estimated differential fuel pressure based on MAF voltage and generate the map in 0.1 V increments until you reach the MAF voltage where you are at full boost.
 
Last edited:
Amazing, thanks for this, Sho just pointed me here and it's giving me more food for thought.
 
if I have more knowledge or progress with the topic, personally I will post it here. PMing would take away from the communal knowledge, let's keep that stuff going.
 
So since the R4 pulse width calculator was taken down by Stratified, I tried to recreate another version of it in Excel. It came out pretty simple and easy to follow. Cells which do not require input are locked.

It seems to check out, but it is still untested, once I validate everything I'll update the first post.

Link:
https://drive.google.com/drive/folders/1y0SK0afGxoxjrpeFxO7HWyLMK9suuVbH?usp=sharing

The inputs are basically as follows:
1.) The MAF cal for your intake which has been calibrated and not yet scaled for Aux fuel.
2.) Your new desired MAF cal in ATR (If you want 50% of fuel from the aux system make this 50% of the above MAF cal, starting at whatever voltage you desire)
3.) Desired Lambda (This is automatically corrected for your fuel stoich based on the Ethanol content you enter).
4.) Fuel Injector Size (per injector)
5.) Ethanol Content (Credit to @Enki - used his scalar/specific gravity cheatsheet)
6.) Injector Deadtime

Some assumptions are made which you can take a look at in the 'Calculations' tab.
 
Last edited:
so the spread sheet calc you made works out pretty well. i had a three day spaz attack due to not realizing that you dont have to input values under 3500rpm i just copied and pasted. once someone let me in on that everything else fell into place. after a little bit of fine tuning my afrs were on point and my idc stayed at 70%. also i talked to mark from split second, and he said that the ssc only accepts values up to 25ms other wise you'll error out. i tried out both methods capping the maf table and blending, by far in my opinion the blending method seemed to have a stronger smoother pull. if this calc is still being worked on i'd recommend allowing a 0% e blend input. 93 in my area is less then 5% E if any at all. add a note to remind removal of lower rpm ipw along with rescaling load tables. andale927 if you would like to message me about my experience with your calc id be more then happy to have a discussion about it. if anyone else would like to message me about setting up aux fuel and using this calc or tuning questions id be more then happy to help. i can only share my wisdom and experience so far. i am by no means a pro but so far ive been able to get by on my own with access tuner. ive ownded my speed 3 for 3 years and have bolted on, built my own engine and tuned my speed on my own. i am constantly learning and growing. i know getting info outta tuners are like pulling teeth in this community. thanks andale927 for the awesome spread sheet calc it has gotten me to a safer and higher power level with my speed!!!
 
so the spread sheet calc you made works out pretty well. i had a three day spaz attack due to not realizing that you dont have to input values under 3500rpm i just copied and pasted. once someone let me in on that everything else fell into place. after a little bit of fine tuning my afrs were on point and my idc stayed at 70%. also i talked to mark from split second, and he said that the ssc only accepts values up to 25ms other wise you'll error out. i tried out both methods capping the maf table and blending, by far in my opinion the blending method seemed to have a stronger smoother pull. if this calc is still being worked on i'd recommend allowing a 0% e blend input. 93 in my area is less then 5% E if any at all. add a note to remind removal of lower rpm ipw along with rescaling load tables. andale927 if you would like to message me about my experience with your calc id be more then happy to have a discussion about it. if anyone else would like to message me about setting up aux fuel and using this calc or tuning questions id be more then happy to help. i can only share my wisdom and experience so far. i am by no means a pro but so far ive been able to get by on my own with access tuner. ive ownded my speed 3 for 3 years and have bolted on, built my own engine and tuned my speed on my own. i am constantly learning and growing. i know getting info outta tuners are like pulling teeth in this community. thanks andale927 for the awesome spread sheet calc it has gotten me to a safer and higher power level with my speed!!!
Glad it's working for you, why do you want to have conversation about how to use it via PM? Then others looking to use it may not easily find the information. If you have more on the experience on using it and tweeks you made for you, you're welcome to share here so that all can see.
 
Glad it's working for you, why do you want to have conversation about how to use it via PM? Then others looking to use it may not easily find the information. If you have more on the experience on using it and tweeks you made for you, you're welcome to share here so that all can see.
Idk..I was just saying. Idk which way would be easier. I'm open to any questions either way from anyone. I haven't messed with making changes to the actual spread sheet equations and considering it's his development I wouldn't repost his Calc with out his permissions. Besides what I have mentioned I haven't had any issues with it. I'll be making some e30-50 tunes with it as soon as I revamp my fueling system to a regulated return style. I'm capped at 25psi of boost any higher and I start seeing my hpfp pressures start dropping. That's on 93 with mild timing. Once I goto an e blend I'll turn the boost and timing up. So far I've had zero issues with the tune I put together using this Calc.

@andale927 Don't we have an updated version of this that is fancier?
I would like to be enlightened if we did outta curiosity. Stratified(removed) and Andale are the only calcs I have found.. I did have a chat with Mark from split sec about just populating each cell manually based on known values(flow rate per ms at a given rail pressure) but that is rather time consuming along with having to be extremely safe. The Calc got me extremely close to where I need to be. I'd say with in 5% of total adjustment with the ssc.
 
Last edited by a moderator:
Here are the latest tuning tools we worked on in 2021. They seemed to work great for me but use at your own risk. The first one lets you import your logs and creates a mafcal. Second one lets you input your injector sizes etc for PI and calculates MAF plus R4 Table.
 

Attachments

Here are the latest tuning tools we worked on in 2021. They seemed to work great for me but use at your own risk. The first one lets you import your logs and creates a mafcal. Second one lets you input your injector sizes etc for PI and calculates MAF plus R4 Table.


Hello, is it only possible to calculate the PI in the Excel tool using E10-E85 fuel? What do I do if I only use regular gasoline (102 octane, i.e., 14.7 AFR) for DI and PI?

Greetings from Germany
 
Hello, is it only possible to calculate the PI in the Excel tool using E10-E85 fuel? What do I do if I only use regular gasoline (102 octane, i.e., 14.7 AFR) for DI and PI?

Greetings from Germany

When the spreadsheet was made I didn't anticipate the use of pure gasoline as it is rare to find in the US at the pump.

If you want to, you can unlock the sheet (Password: FYHN) and update the fuel values in the Calculations and Ethanol Mix tab manually. This might be a pain, as you will need to check all the cells with formulas and update them to use the values you've added.

That said, the R4 controller is pretty imprecise. The controller has poor resolution, no compensations for battery voltage, no compensation for intake manifold pressure (assuming you are running returnless), which means that you will need to fine tune your MAF curve to hit targets regardless of what calculator you use. So I would just enter a value of 10% Ethanol and not worry about it.

If you need help using the sheet feel free to PM me.
 
Last edited:
Hello andale927, thanks for your reply. I actually might have chosen the 10% ethanol option first. However, I don't actually need all the corrections since I'm no longer using the R4 controller. I use a MaxxECU Mini. This corrects everything automatically (dead times, voltage, pressure), and it's a fully sequential injection system. The PI rail is supplied by a completely separate system with a separate tank and return line.

How can I send you a PM? I can't seem to find this function anywhere here and sorry for my bad english...
 
Hello andale927, thanks for your reply. I actually might have chosen the 10% ethanol option first. However, I don't actually need all the corrections since I'm no longer using the R4 controller. I use a MaxxECU Mini. This corrects everything automatically (dead times, voltage, pressure), and it's a fully sequential injection system. The PI rail is supplied by a completely separate system with a separate tank and return line.

How can I send you a PM? I can't seem to find this function anywhere here and sorry for my bad english...
you can't pm until around the 25 post mark as spam prevention (others who meet the requirement can still initiate it with you). If you have questions we've typically preferred not using pm so that information becomes available to everyone.
 
Back
Top