Background

Tuning vehicles requires a good understanding of sensors, data management, and combustion engines. While tuning a vehicle you are relying on sensor data being captured throughout the vehicle, and interpreting that data is key to providing a powerful and reliable tune. The goal of this project is to develop a tune for a 2010 Mazdaspeed 3, which will allow the car to take full advantage of a 50/50 mixture of e85 and 93 octane pump gas.

The use of e85 fuel is very popular among drivers looking to add considerable power and reliability to their car without the cost of high end race fuel. The characteristics of e85 allow higher boost levels, and lower combustion temperatures, making more power safely. In order to take full advantage of e85, a tune must be developed to maximize its efficiency. In order to maximize the potential of e85, large adjustments to the fuel tables, timing tables, and boost tables may be needed to increase power. These adjustments are mostly effective on cars with boosted applications, as the main enemy of a boosted car is combustion temperatures, and knock retard. With the use of e85 knock retard can be nearly eliminated while also bringing cylinder temperatures down, allowing more boost and more timing.

The Mazda Mazdaspeed 3 being used in this project has a 2.3 liter turbo 4 cylinder. The car has a few basic "bolt-on" power modifications. An upgraded 2.5" intake, 3" bell-mouth down pipe, and larger top mount intercooler have been added. The rest of the car's modifications are suspension related, and will have no application to this project. The car is currently used as a daily driver, but is occasionally used for autox. The normal tune for the car is setup for 93 octane pump gas, with boost levels at 20 psi tapering down to 17 psi at redline. The boost levels for this turbo are already at a maximum, so boost levels will be unaltered. If the vehicle had a larger turbo, more boost could be added with the e85 to increase power even more.

*** IMPORTANT: It is extremely important to do research involving the use of e85 in a vehicle that was not designed for it. Not all vehicles' fuel lines and fuel pumps can work safely with e85 due to corrosion, impurities, and increased fuel demand. Extensive professional testing has been done using e85 on this vehicle, which has been proven reliable with certain mixtures of e85.***

Tuning

To tune for e85 many adjustments must be made to the car's existing tune. It is always best to start with fuel adjustments, boost, then timing. It is important to follow this sequence in order to avoid what the Mazda community calls "zoom zoom boom!". Its rather funny because Mazda's slogan is "zoom zoom", but blowing up my engine is not a choice while on a college budget. So, extreme precautions should be made. This includes a fresh oil change, spark plugs, and a basic tune up. Once all of that is in order it to time to begin.

Hardware and Software

To begin tuning you need hardware and software to examine engine data through sensors, and the ability to upload a modified "map", or tune, to the ecu through the OBD2 port. For Mazdaspeed consumers the go to choice is COBB Tuning's Accessport. The Accessport comes with hardware and software that allows the user monitor, and datalog, engine sensor readings, and upload modified versions of a tune. The Accessport also comes with the software needed to make adjustment to the tune. Below is a screenshot of the Accessport software, and the Accessport device.

AccessTUNER Race software for the Mazdaspeed 3 Accessport

COBB Accessport V2b

Sensor Calibrations

In order to begin tuning, a Mass Air Flow (MAF) sensor calibration should be done. This is the first step in adjusting for fuel. The ecu generally uses two main sensors to read air fuel ratios, the MAF sensor and O2 sensor. Generally speaking the MAF sensor reads the amount of air entering the engine, while the O2 sensor reads the air fuel ratio exiting the engine. In order to have accurate air fuel ratios, the MAF sensor must be calibrated to your specific engine. This calibration is different for every car and should always be done when any air flow changes are made to the engine (i.e. exhaust, intake ... ), or when experiencing drastic elevation or temperature changes. From the factory, Mazda is forced to calibrate the sensor based off the average users' climate and elevation. This often means the factory MAF sensor is not calibrated very well. With a tune, this can be greatly improved providing more accurate and stable air fuel ratios. To adjust the MAF we must first understand what the ecu does with MAF and O2 sensor data.

Closed Loop and Open Loop Fueling

There are two sets of fuel tables the ECU uses, the closed loop and open loop tables. The closed loop fuel tables are what the ECU uses to make fuel calculations during normal driving while the open loop fuel tables control fuel during high throttle conditions. The ECU can differentiate whether its in a closed loop or open loop situations based off engine load. Engine load is calculated using various sensors' data, and is a direct relationship to the load being put on the engine. Generally in the Mazda peak load is below 2.2 and the closed loop and open loop breakpoint is at 1.00 load. Every car will show different load values, as it is a calculated value in the ECU and specific to the vehicle. The table below can be adjusted to match particular applications where load values may be different. 1.0 Load was chosen based off the normal load seen when entering wide open throttle.

Closed loop fueling max engine load before switching to open loop fueling

The ECU treats open and closed loop fueling very differently. During closed loop fueling, the ecu has the ability to learn the error in the system, and make fuel adjustments to keep air fuel ratios as close to the commanded value as possible. This error is shown as the Short Term Fuel Trim (STFT), and the Long Term Fuel Trim (LTFT). These are the two values that can be used to determine how far off the MAF calibration is. The STFTs are adjustments being made in a small time frame, while the LTFTs are the average STFT values. Over time as the ECU learns its climate and conditions the STFTs will settle close to zero, while the LTFTs store the error accumulated to keep air fuel rations in check. The STFT value and LTFT values are a percentage of fuel being added or subtracted from the engine in order to reach its target air fuel ratio. If the engine is receiving less air than expected, the engine will run rich due to the lack of air to mix with fuel during the combustion cycle. This would produce a negative STFT and LTFT because the ECU is trying to remove fuel to compensate.

When high load situations occur and the vehicle enters open loop fueling, the ecu sticks with the error adjustments made during closed loop fueling to specifically target a desired air fuel ratio. This is why it is important to have as little LTFT and STFT as possible. If the closed loop fueling is off target, then open loop fueling will be off target, which could lead to catastrophic engine failure.

MAF Calibration

To calibrate the MAF sensor we take our first datalog while monitoring LTFT and STFT values. This datalog is done in second gear starting at a slow walking speed. Very light throttle application is used to slowly accelerate until the MAF is reading 100 g/s, all while keeping the calculated load under 1.0 to avoid entering open loop conditions. Three data logs are taken to examine mostly LTFTs because they are the best indication of the average fuel adjustment being made by the ECU. To make the required adjustments to the MAF curve we must enter the MAF sensor calibration table, like shown below:

MAF Calibration Table

MAF voltage (V) vs. Mass air flow (g/s)

As you can see, the MAF calibration table is based off MAF voltage, 0-5 volts, and mass air flow in grams per second. The fuel curve is broken into multiple break points, and a specific LTFT is stored in each break point. For example breakpoint one is at 0-5.70 g/s. Anything below 5.70 g/s has a specific LTFT error value which has been stored for that break point. The MAF curve is broken into 5 break points which can be adjusted if desired. We can select each set of breakpoint values and multiply them by a percentage, based off the LTFTs found in the datalogs. If the second breakpoint LTFT is +10%, then the values in the second breakpoint are multiplied by 1.10 to provide 10% more fuel in that region. After this adjustment is made to the MAF calibration curve, the new map can be uploaded to the vehicle. It is recommended to drive for 50 miles to allow the ECU to learn new LTFT and STFT values. Multiple MAF calibrations may been required to get the desired LTFT values of under 7%.

Fuel Adjustments

Arguably the most important tables in any ecu tuning software is the fuel tables. The fuel tables are comprised of various tables as shown in the screen shot below.

The available fuel tables for the Mazdaspeed 3 generation 2 ECU

After extensive research, we have found that some of these tables are not actively used by the ecu, and some are duplicates of others. For the sake of tuning for e85, we left the same commanded air fuel ratios as the normal pump gas tune. There are other ways for account for the different burn characteristics of e85 which will be outline later. The fuel tables used are shown below.

OL/Part Throttle Commanded AFR Table

Open Loop Full Throttle Commanded Air Fuel Ratio Table

Open Loop Fuel Table Command Air Fuel Ratio Table - Knocking

The first of the above tables, the OL/Part Throttle fuel table is the general use fuel table for the ECU. Air fuel ratios are commanded based off RPM and engine load. Notice that the high load values through the RPM range are 11.8 AFR. This is the commanded air fuel ratio, or AFR, at full throttle. That leads us to the second table, the OL/WOT commanded AFR table. This table sets the desired AFR for high load open loop conditions. The last table shown above is the OL/WOT Commanded AFR table with knock. This table is used to tell the ECU what AFR to command during engine knock, also known as detonation. This is always set at a richer AFR than normal WOT conditions to reduce cylinder temperatures which are the signature cause of engine knock. Excessive engine knock can lead to serious engine failure and lowering AFR is one of the many ways the ECU can eliminate knock as soon as it appears.

The main fuel related table that needs adjusting for e85 mixtures is located in the injector control tables. These tables allow adjustment required for upgraded injectors, or accounting for the use of different fuels like e85, race gas, or methanol. In our case we are adjusting for e85. The characteristics of e85 are quite different from 93 octane gasoline, most notably the specific fuel gravity. The average specific fuel gravity for e85 is generally 0.80 while gasoline is 0.74. Since the goal of this project is to run a 50/50 mixture of 93 octane pump gas and e85, we average the two to reach 0.77. This can be modified in the table shown below. This adjustment will automatically scale the rest of the fuel tables. If the injector control table is not available, it is possible to make large adjustments to the MAF calibration table to compensate for e85. This was the case during the early developments of this software.

Table used to set specific fuel gravity

I great advantage of having this table is this is only real change made to the fuel curve for e85 when compared to the normal pump gas tune. It is certainly possible to command a different AFR with e85, but it wasn't necessary as leaner AFRs don't generally lead to large power gains in this engine. To gain a little power we could technically tune leaner but that can lead to higher cylinder temperatures which will cause knock. This is particularly dangerous as e85 can sometimes eliminate knock all together, and engine timing ranges can be pushed higher than MBT, or maximum best torque, without knowing. MBT is known as the highest engine timing possible without seeing a drop in power output. This leads to the next part of the tuning project, boost and timing adjustments. However, before you continue with boost and timing adjustments, you have to repeat the above steps two or three times in order to get the MAF calibration as close as realistically possible. Our results were all within +/- 5% LTFT.

Boost Tables

Once the fuel tables have been adjusted and sensors are calibrated for the 50/50 e85 and 93 octane pump gas mix we can move to boost adjustments. The Mazdaspeed 3 used in this project still has the factory turbo so boost is limited. Stock boost pressures were 15.5 psi peak on the factory tune, while the custom 93 octane tune peaks at 20 psi. With boost higher than 20 psi and we start to see higher temperatures, more knock, and no real power gain. The turbo is outside its efficiency range any higher than 20 psi (some tuners have pushed this turbo into the 23 or 24 psi ranges but they typically have a upgraded external waste gate). For the 50/50 e85 mix we left the boost levels the same as the pump gas tune, at 20 psi, as there was no benefit to increasing it. Tuning boost is a time consuming process requiring many data logs. Boost characteristics can be modified by numerous tables, but the main boost table is shown below.

Boost Table - Accelerator Pedal Position vs. Engine RPM

Timing

The last adjustment to be made is engine timing. This is arguably where this 2.3L MZR DISI engine shines. Even small one degree increases in timing increase power quite effectively. It is very important to be extremely careful when adjusting timing as it can lead to serious engine failure when done incorrectly. Since we do not have access to a chassis dyno, all full throttle data logging has to be done on closed or private roads. Ideally it is best to adjust timing while on a dyno because it is the most consistent way of gathering data from the engine. This is an advantage while adjusting timing because you can see the small increases in horsepower as timing is added. On a dyno you can continually add timing until you stop seeing increases in torque output. This is when you know you have reached MBT, or Maximum Best Torque. Adding any timing past this point can harm the engine, sometimes intake or exhaust values can even hit the top of the piston if your not careful! Obviously this would lead to a huge engine failure. Since we are not tuning on a dyno we can only increase timing to a certain point while still being safe. MBT is different in every car so the only way to find it safely is with a chassis dyno. It is known within the Mazda community that general MBT numbers are around 20-25 degrees advanced at redline. For this project we stayed quite a few degrees below MBT to be extra safe.

The Ignition tables, or timing tables, consist of quite a few different tables. Like the fuel tables, some are not used, and some are duplicated. The ignition tables are broken into open loop and closed loop, also with their respective knock and no knock tables. Just like the fuel tables, we have the option of having a separate timing table that can reduce timing when knock occurs. However, for this tune we use the same timing numbers for the OL/CL and knock/no-knock tables. This is mostly because the car provides more consistent timing numbers when all tables match. It is also recommended by most professional Mazdaspeed platform tuners. The tables shown below are the commanded ignition timing based on RPM and engine load. The first table is the timing set for the original 93 octane pump gas tune, while the second table is showing the timing for the 50/50 e85 93 octane mix.

Timing table for 93 octane pump gas tune

Timing table for 50/50 e85/93 mix

Notice the timing table only reaches 2.0 load, this means anything over 2.0 load will have the same commanded timing as 2.0 load. This can be a issue with cars utilizing larger turbos as engine load values can reach even farther. For our tuning purposes we set everything past 1.75 load, which is reached at full throttle, to our desired timing value. These timing values were reached by making small 0.5 or 1.0 degree changes with multiple data logs to confirm that the increases in timing are not causing any issues. The timing numbers are generally the inverse of the torque curve. The Mazda in this project makes most of its torque in the 3000-4500 RPM range. This is where the timing is lower, as cylinder pressures are high, with max boost generally being in the same RPM range. As boost falls off due to the small turbo, the torque falls and timing can be increased as the RPMs rise. These turbo characteristics are common on factory boosted vehicles because normal vehicles live most their life in the middle RPM range. Larger turbos would increase power in the upper rpm ranges and timing curves would look different, but would still have the same upward trend as RPMs rise. Timing is like most tuning parameters in the fact that they are specific to the individual car, as it depends on numerous variables. Some of these variables include fuel quality, climate, and vehicle modifications. The reason timing is left as the last tuning parameter is because timing increases will have no benefit if the fuel and boost levels are not consistent. More importantly, it can be dangerous to change timing values before getting boost and fuel dialed in because changes to boost and fuel can effect the load ranges seen at wide open throttle.

Results

We were pleased to see a rather large increase in horsepower and torque throughout the RPM range. A dyno graph comparison is shown below. The software used to produce the dyno graphs is Brad Barnhill's Virtual Dyno. This is the most accurate virtual dyno software readily available, but will never be as accurate as a real chassis dyno.

Dyno graph comparison between 93 Octane and 50/50 e85/93 octane

The blue line represents the 93 octane tune we started with, while the red line is with the 50/50 e85/93 octane mixture. The dyno graphs shown above are calculated based off the data within a datalog. When comparing horsepower and toque numbers it is important to datalog in the most consistent conditions possible. This means data logging on the same road, same spot, and if possible, same weather. Another thing to consider is how flat the road is, and how smooth its surface is. Any kind of wheel spin or bumps in the road will heavily influence the virtual dyno results. We have even seen numbers approach 1000 horse power due to a inconsistency in the roads surface, or with large amounts of wheel spin! Obviously this is way more power than this car is making, and its easy to see how a real chassis dyno would provide a huge benefit to the overall tuning process. However, chassis dyno time can be expensive ranging anywhere from $50 - $150+ per hour. Remember, college budget.

Overall the project was a large success, and a great example of how instrumentation is used in real applications.

*** We have attached a sample of a datalog that we took while tuning in the attachments section. ***