MS45 - Tuning the Intake Manifold Model and Torque Tables

Get detailed info on tuning your DME
User avatar
josh@severntuning
Posts: 13
Joined: Thu Jul 11, 2019 8:12 pm

MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby josh@severntuning » Fri Jul 12, 2019 12:12 am

I’ll start off with a disclaimer – what I know today about MS45 is not what I knew yesterday, and it may be different than what I know tomorrow. Knowledge of the MS45.0 and MS45.1 ECU is constantly evolving; new discoveries are being made several times a year. I don’t take credit for finding the tables I’m about to show you. Because my experience is primarily with MS45.0, I’ll be focusing on it. Most of the information will apply directly to MS45.1 as well.

It is critical to understand these tables if one wants to tune MS45 much beyond stock power levels. Optimizing them for your personal setup is also key, as what works for a twin screw supercharger setup will differ from an ideal centrifugal tune. There’s a reason the aftermarket won’t tune past 8.5 psi of boost. Once airflow exceeds a certain amount, the car will become undriveable due to the background compensation tables causing hesitation, misfires, and sporadic timing reduction. However, if you appropriately tune these tables, you can end up with a car that drives like it came with a supercharger from the factory, regardless of your boost level.

There are four required steps and one optional step. Required steps are as follows:
1. Tune the three intake manifold model tables.
2. Adjust the axes on two “torque tables”.
3. Tune the airflow setpoint table.
4. Disable a checksum.

Optional steps are as follows:
1. Disable a MAF-related DTC.

Step 1 – Tuning the three intake manifold model tables.
The three tables you need are ip_eff_vol_slop_max, ip_eff_vol_slop_cam_vo, and ip_eff_vol_slop_cam_vo_vim. They must be tuned to reflect large increases in airflow, like when forced induction is added. If more air is entering the engine than these tables can support, the car will hesitate and bog down at full load. If the tables are increased too far, the ECU will think the engine is generating too much torque and begin to close the throttle body at full load or possibly revert to limp mode.

ip_eff_vol_slop_max (18x1) – the axis on this curve is rpm, and the values are mass airflow divided by pressure. The cells in this table should follow your boost curve; multiply the values by your pressure ratio at that point. For example, if you have a twin screw supercharger, the cells should be multiplied by approximately 1.5 (depending on your boost level), from the rpm where you reach max boost all the way up to max rpm. If you have a centrifugal supercharger, you should multiply the values by a progressively larger number as rpm increases. I estimate that my centrifugal supercharger generates 1 psi of boost at 2500 rpm, and 8.5 psi of boost at 6600 rpm. Therefore, I multiplied the cell at 2500 rpm by 1.07, and the value at 6600 rpm by 1.58. The multiplier for the cells between these two points increases linearly. Use the following formula for a centrifugal setup as a general guideline to get you started:

boost_pressure @ site_rpm = (site_rpm - 2500) * (max_boost – 1) / (6600 – 2500)
*and*
pressure_ratio = (boost_pressure + 14.7) / 14.7

Example: with a max boost pressure of 8.5 psi @ 6600 rpm, the boost pressure at 3500 rpm could be estimated to be:
boost_pressure @ 3500 rpm = (3500 – 2500) * (8.5 – 1) / (6600 – 2500)
boost_pressure @ 3500 rpm = (1000) * (7.5) / (4100)
boost_pressure @ 3500 rpm = 1.8 psi

pressure_ratio = (1.8 + 14.7) / 14.7
pressure_ratio = 1.12

In this case, the cell at 3500 rpm would be multiplied by 1.12. If you have a centrifugal supercharger, use this formula to find the remaining cells in the table. In most cases, you do NOT need to tune cells 1000 rpm and below. I increased the cells from 1300-2000 rpm by 5-10% to accommodate my free flow exhaust and intake. Now move on to the second table:

ip_eff_vol_slop_cam_vo (18x12) – You don’t need to worry about what the rows on this map mean. The important thing is the columns are rpm, and the cells are mass airflow / pressure (just like in ip_eff_vol_slop_max). Using the pressure ratio (PR) at each rpm site you found above, multiply each column of cells by the corresponding pressure ratio you found when tuning ip_eff_vol_slop_max.
In the previous centrifugal supercharger example, we found the 3500 rpm site has a PR of 1.12. In this case we would multiply the entire 3500 rpm column of cells by 1.12. Do not modify the table axes; only the cells.

ip_eff_vol_slop_cam_vo_vim (18x12) – Apply the PR multiplier down each column (rpm) like you did with ip_eff_vol_slop_cam_vo. Keeping with the example, the 2500 rpm column would be multiplied by 1.07; the 3500 rpm column would be multiplied by 1.12; and so on.

Step 2 – Adjust the axes on two “torque tables”.
It is important to understand the difference between MAF readings of kg/hr and load calculations of mg/stk, and how the torque tables play into tuning the vehicle. The mass airflow sensor (MAF) outputs a voltage between 0-5 V, which the ECU converts to a mass flow number in kg/hr. MAF (kg/hr) and rpm are used to calculate load (mg/stk).

Load (mg/stroke) = MAF (kg/hr) * 1000 / 60 / Engine Speed (RPM) / 3 * 1000

Load (mg/stk) and the torque lookup tables are used to calculate engine torque (Nm). When the driver puts his foot down, he “requests” a certain amount of torque (Nm). The ECU will modulate the electronic throttle body to fulfill the driver’s request, using the lookup table to determine what load (mg/stk) equals the requested torque (Nm). The idea is that the car will behave the same way, no matter the temperature or altitude, resulting in predictable feel. Flat spots in the powerband can theoretically be tuned out with an ECU that is torque-request-based, like MS45. x% throttle will always equal y% torque, regardless of conditions.

Another way to look at it is:

Accelerator pedal position -> voltage -> torque request (Nm)

*and*

Air entering engine -> MAF voltage -> kg/hr -> mg/stk -> torque (Nm)

The driver’s right foot controls the torque (Nm) request, the MAF tells the ECU how much air is actually entering the engine, and the ECU controls the throttle body to make sure they match, based on its mapping. Our job is to adjust that mapping by altering some of the calculations the ECU makes along the way.

Tuning torque tables is tricky, because if too much torque is requested the accelerator pedal takes on an on/off binary feel, and the car’s driveability suffers. Think of the unforgiving nature of an aggressive, high capacity race clutch and apply it to the accelerator pedal. Conversely, if too little torque is requested, the ECU will shut the throttle body, artificially limiting torque production (and power).

When forced induction is added to the M54, torque increases dramatically, which necessitates adjustment of the torque lookup tables. Unfortunately, there are several controls in place on the MS45 that limit torque production, resulting in multiple DTC’s and limp mode if too much torque is produced, and a checksum guards the torque tables so they cannot be edited. DO NOT try to adjust the cell values, or your car will not start. If the unit of measure is Nm, don't change the value. Only adjust values that have a mg/stk unit of measure.

The two torque tables you need are ip_tqi_ref__n__maf and ip_tqi_ref_mon. Instead of modifying the cell values, we will adjust the scaling of the load axis… essentially lying to the ECU about how load and torque correlate, thus it will think the car is producing less torque than it is.

ip_tqi_ref__n__maf
– This is a torque lookup table, referenced at part throttle. Rows are load (mg/stk). Columns are rpm. Cells are torque (Nm). Again, DO NOT adjust the cells themselves, or a checksum will cause the car to not start.

The idea is to make the car perform like stock at idle, low load, and cruise, but increase the maximum value of the load axis, so that more load can be achieved without the ECU intervening. First you will need to determine how much additional load you need. With my centrifugal setup, I decided I will be generating 40% more torque than stock. Remember that with a centrifugal setup, peak power may increase by 60% or more, but peak torque will only increase 20-40% depending on boost level.

I kept the first four sites stock (32.51, 75.01, 100.00, 125.01), as that’s where I determined the car spent most of its time cruising and at idle. I then gradually increased the remaining sites until reaching a maximum of 1050 mg/stk (40% more than the original value of 750 mg/stk). It’s important to choose your sites wisely to avoid driveability problems. I recommend data logging to determine what load (mg/stk) your car sees at cruise to determine where to start increasing load.

ip_tqi_ref_mon – This is a torque lookup table, referenced at full load. Apply similar adjustments to the table axis as you did with ip_tqi_ref__n__maf. DO NOT adjust the cells in the table. Because ip_tqi_ref_mon has a different number of sites on its axis than ip_tqi_ref__n__maf, you’ll need to do some calculations to ensure the numbers match up. For example, if you increased the 450.01 mg/stk site on ip_tqi_ref__n__maf by 25%, make sure you also increase the 452 mg/stk site on ip_tqi_ref_mon by 25%.

Step 3 – Tune the airflow setpoint table.
This is the most difficult step to explain, and the most time-consuming to work through. If you’re not good with math, you can guess at the table and get a tune that’s 80% correct. If you understand math, you can spend an hour on the table and get it perfect.

The table you need is ip_maf_sp, plus the load axis values from ip_tqi_ref__n__maf (from the previous step). It’s imperative to use Excel for the calculations, and it makes for an easy copy/paste into ByteTuner when you’re done.

The goal is to match the cells in ip_maf_sp to the new axis sites in ip_tqi_ref__n__maf using linear interpolation. Get it right and the car will drive like stock, except with a lot more power. Get it wrong and driveability will suffer, codes will be thrown, blood pressure will rise, and despair will set in.

You can think of ip_maf_sp as the “requested engine load” table. The row axis sites on this table are in Nm; the cells in ip_tqi_ref__n__maf are also in Nm. The row axis sites in ip_tqi_ref__n__maf are in mg/stk; the cells in ip_maf_sp are also in mg/stk. The tables are dependent on each other. One table’s axis unit of measure is the other table’s cell unit of measure. Because a checksum prevents adjustment of the cells in ip_tqi_ref__n__maf, we previously modified the axis sites instead. We will now modify the cells in ip_maf_sp to match the new axis sites.

Let’s start with an example. Using the stock ip_maf_sp table, look up the 1216 rpm and 65 Nm. The value in the cell is 122.06 mg/stk.

- First, reference the torque axis site of 65 Nm.
- Second, Look at the other table (ip_tqi_ref__n__maf) under the 1216 rpm column. Find where 65 Nm would fall. In this case it would fall between 64.97 Nm and 91.25 Nm, or the 4th and 5th cells down in the 1216 rpm column. Write these numbers down – 64.97 and 91.25.
- Third, you need the load (mg/stk) axis site where the above cells were found. 64.97 Nm corresponds to a load axis of 125.01 mg/stk, and 91.25 Nm has a load axis of 183.76 mg/stk in my case because I had increased that site by 5% (yours may be different). Write down 125.01 and 183.76.

You now have everything you need to calculate the new value in the ip_maf_sp cell (1216 rpm column, 65 Nm row). Use the linear interpolation formula:

y=y1+(x-x1)(y2-y1)/(x2-x1)

Where:
y is the new value that should go into the cell in ip_maf_sp. The cells are what you’re calculating and changing.
y1 is the lower load value (125.01 in this example)
y2 is the upper load value (183.76 in this example)
x1 is the lower torque value (64.97 in this example)
x2 is the upper torque value (91.25 in this example)
x is the axis site of the cell you’re calculating (65 in this example)

y = 125.01 + (65 – 64.97) * (183.76 – 125.01) / (91.25 – 64.97)
y = 125.01 + (0.03 * 58.75 / 26.28)
y = 125.01 + 0.067
y = 125.08

The original value in the cell was 122.06, and the new value is 125.08, which is a 2.5% increase. This may not sound like much, but as you progress through the table, some values will be increased by 40% or more.

Every cell must be calculated individually. Unfortunately, you can’t copy and paste the linear interpolation formula into Excel with some $$ signs and have it spit out the right values based on relative location. Sometimes the ip_maf_sp cell’s axis site will fall between different rows above or below the relative position on ip_tqi_ref__n__maf. You will need to figure out where the cell’s axis site falls, and manually enter those values into the formula.

The good news is this step only needs to be completed once, unless you change the load axis sites. If you set up your Excel file properly with the correct formula for each cell, it will auto-calculate new cell values for ip_maf_sp when the axis sites on ip_tqi_ref__n__maf are changed. It’s a lot of math, but when you’re done the car will drive like stock.

Step 4 – Disable a checksum.
The checksum that should be disabled is at val_mo3_swi_cal_cks. Change the value to 165. I’ll caveat this in that I’m not certain this step must be completed. I don’t have access to it on certain software versions, so the checksum was left in place, and I have run into issues when ip_tqi_ref_mon axis sites are modified. I recommend disabling it to avoid issues.

Step 5 (Optional) – Disable a MAF-related DTC.
If your axes changes and new maps don’t jive, you’ll get a P0103 code. You can disable this code by changing the values in fmy_id_maf.dtc to all 0’s.

When testing your tuned file, data log to see if the accelerator pedal angle (max 99.6%) matches the throttle setpoint (max 81%) at full throttle. If throttle setpoint reads less than 81% at steady WOT, the ECU is attempting to limit torque.

It took me many months of trial, error, and frustration before I ran into someone by random chance that showed me these tables. Had I not been so lucky, I would likely be driving around with an MS43 conversion. I’d also like to thank Jeff and his support for the development of MS45.
- Josh
Last edited by Renovelo on Sun Feb 23, 2020 9:38 am, edited 1 time in total.
Reason: tags

Tags:

wst01
Posts: 1
Joined: Wed Jul 24, 2019 7:00 am

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby wst01 » Wed Jul 24, 2019 7:11 am

Hi Josh,

wow, thank you very much for that post, i'm currently starting to play around with my E85 Z4 3.0i and the information here is very helpful.
I'm currently building the new airflow setpoint table with the information you provided.

By accident i figured out a strange thing:

I've raised all cells of ip_tqi_ref__n__maf and ip_tqi_ref_mon by 10% (which shouldn't be done because of the checksum), wrote that program to my ECU and now comes the strange part. Car did start normally, no DTC error was shown.

Because it was only for trying out i stopped the car and started with the calculation and then i figured out that i'd make that mistake.
But for me it's very interesting that the cars was running.

Of course i'm not raising the values much because my car is not supercharged.
Only the oil pump screw is done, different exhaust, air filter and Schrick cams 264°/248° are installed.

- Wolfgang

Renovelo
Site Admin
Posts: 162
Joined: Thu Aug 08, 2013 7:02 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby Renovelo » Wed Jul 24, 2019 8:37 pm

Wow...probably the best "first post" ever! There is so much information here! I'm glad you guys are pushing the boundaries of tuning the torque tables. This is how the community will learn what's possible with these DMEs!

In other news, we figured out the additive checksum algorithm (for MS43 and MS45.x) and will be implementing this into the next release of ByteTuner! This is an additional checksum that covers the monitoring sections of the calibration area. This should keep you guys from having to "disable" anything regarding the torque tables.

dbeau
Posts: 10
Joined: Fri Jun 14, 2019 7:39 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby dbeau » Thu Jul 25, 2019 5:07 pm

awesome write up!

User avatar
josh@severntuning
Posts: 13
Joined: Thu Jul 11, 2019 8:12 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby josh@severntuning » Tue Jul 30, 2019 9:55 am

Hi Josh,

wow, thank you very much for that post, i'm currently starting to play around with my E85 Z4 3.0i and the information here is very helpful.
I'm currently building the new airflow setpoint table with the information you provided.

By accident i figured out a strange thing:

I've raised all cells of ip_tqi_ref__n__maf and ip_tqi_ref_mon by 10% (which shouldn't be done because of the checksum), wrote that program to my ECU and now comes the strange part. Car did start normally, no DTC error was shown.

Because it was only for trying out i stopped the car and started with the calculation and then i figured out that i'd make that mistake.
But for me it's very interesting that the cars was running.

Of course i'm not raising the values much because my car is not supercharged.
Only the oil pump screw is done, different exhaust, air filter and Schrick cams 264°/248° are installed.

- Wolfgang
Very interesting! I think you’re correct in adjusting these tables to get the most out of your cams. With my custom OTR (over the radiator) intake and full exhaust, I was only generating 1-2 psi of boost at 2k-3k rpm but still experiencing hesitation and bog due to the increased airflow. Before I knew about these tables, I tried everything to get rid of the driveability problems. I was motivated to build the intake to replace all the intake piping and eliminate the possibility air was entering the engine post-MAF (my setup is draw-through). I also replaced O2 sensors, fuel pump, fpr, fuel filter, plugs, coils, DISA, MAF sensor, cleaned and tested the VF injectors, replaced the VF injectors with Porsche injectors, tested O2 sensor locations, and a lot of other troubleshooting through tuning.
Last edited by josh@severntuning on Tue Jul 30, 2019 10:02 am, edited 1 time in total.

User avatar
josh@severntuning
Posts: 13
Joined: Thu Jul 11, 2019 8:12 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby josh@severntuning » Tue Jul 30, 2019 10:01 am

Wow...probably the best "first post" ever! There is so much information here! I'm glad you guys are pushing the boundaries of tuning the torque tables. This is how the community will learn what's possible with these DMEs!

In other news, we figured out the additive checksum algorithm (for MS43 and MS45.x) and will be implementing this into the next release of ByteTuner! This is an additional checksum that covers the monitoring sections of the calibration area. This should keep you guys from having to "disable" anything regarding the torque tables.
Solving the checksum issue is huge! That thing has been the bane of my existence for the past year. I’m looking forward to trying it out!

Renovelo
Site Admin
Posts: 162
Joined: Thu Aug 08, 2013 7:02 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby Renovelo » Tue Jul 30, 2019 2:05 pm

You guys can now try the new checksums. Just open ByteTuner and it should prompt you to update to v0.4.7.

rkneeshaw
Posts: 8
Joined: Thu Sep 03, 2015 6:55 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby rkneeshaw » Sat Aug 24, 2019 8:51 am

Awesome post Josh, thank you for taking the time to write all that up and in such detail!!
Ryan
2003 BMW 330i ZHP
ESS TS2 Supercharger and other goodies

rkneeshaw
Posts: 8
Joined: Thu Sep 03, 2015 6:55 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby rkneeshaw » Sun Aug 25, 2019 9:59 pm

Regarding MAF DTC's, you can try changing the following:

c_maf_max_diag - bump this to 1050 so you don't get a DTC for flowing too much air
ip_maf_1_diag__n__tps_av - this table is used to validate that the airflow through the MAF in relation to TPS is correct, and if not it will throw a DTC. I really only had issues with this on long freeway drives where I was holding 3k RPM for a few hours at a time. Try bumping these values up to be somewhat close to reality. it doesnt have to be perfect, just close enough so its not WAY off.
Ryan
2003 BMW 330i ZHP
ESS TS2 Supercharger and other goodies

ThatSoftwareGuy
Posts: 2
Joined: Thu Oct 15, 2020 7:20 am

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby ThatSoftwareGuy » Thu Oct 15, 2020 7:27 am

Cathcing up on this older thread.

First of all thanks you very much for the amount of usefull information and understanding of the MS45.0 software. Every step sounds totally logical for me and so I did followed everything step by step.

The hardest one was finding the checksum since the damos I am having doesn't match that good the software version (5WK93004 - 7527730 - 456G2B) I am having. It needs to be disabled, since after adjusting the axis of ip_tqi_ref_mon the car didn't start anymore.

However, with the base file on it the car is running way too lean overall like AFR 15 - 16. Also it bogs down going full throttle and during part load I can notice it does opens the throttle valve too early.

Car: BMW E46 Compact
Engine: M54B30
ECU: Siemens MS45.0 (5WK93004 - 7527730 - 456G2B)
Compressor: G-Power kit with ASA T3-313 compressor

Hope anyone can assist me. Thanks in advance!

Renovelo
Site Admin
Posts: 162
Joined: Thu Aug 08, 2013 7:02 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby Renovelo » Thu Oct 15, 2020 9:50 pm

There is no need to disable any checksums with ByteTuner. It automatically corrects all of them including the one you're trying to disable. If you still want to try, you don't need to worry about damos files either. Just search for "val_mo3_swi_cal_cks" in ByteTuner and you'll find this parameter buried in the "Uncategorized" section of the parameters. You're free to modify it, but it probably won't affect anything. Let us know if it does.

Josh mentioned that he noticed the same issue even after we confirmed that the checksum is being corrected. He was able to tune around this using other methods in a F/I setup.

ThatSoftwareGuy
Posts: 2
Joined: Thu Oct 15, 2020 7:20 am

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby ThatSoftwareGuy » Thu Oct 22, 2020 3:19 am

There is no need to disable any checksums with ByteTuner. It automatically corrects all of them including the one you're trying to disable. If you still want to try, you don't need to worry about damos files either. Just search for "val_mo3_swi_cal_cks" in ByteTuner and you'll find this parameter buried in the "Uncategorized" section of the parameters. You're free to modify it, but it probably won't affect anything. Let us know if it does.

Josh mentioned that he noticed the same issue even after we confirmed that the checksum is being corrected. He was able to tune around this using other methods in a F/I setup.
The checksum issue I already solved since I unfortunately am not having Bytetuner. Bytelogger I did downloaded, but is giving me no data at all after connecting (probably because the M54B30 is swapped into a E46 and there is no 20pin BMW connector anymore).

However, to catch up on my real question. After performing all steps @josh@severntuning described, the car is running too lean overall (AFR 15 - 16) and looks like it doesn't enter the full load enrichment map at all. Also it still bogs down going full throttle and during part load I can notice it does opens the throttle valve sometimes too early.

Car: BMW E46 Compact
Engine: M54B30
ECU: Siemens MS45.0 (5WK93004 - 7527730 - 456G2B)
Compressor: G-Power kit with ASA T3-313 compressor

Hope anyone can tell me which maps probably need further adjustments. I already increased the intake manifold model tables more often which improves the bogging. Unfortunately it is still running too lean. Even after increasing the airflow tables and inverse torque axis.

User avatar
josh@severntuning
Posts: 13
Joined: Thu Jul 11, 2019 8:12 pm

Re: MS45 - Tuning the Intake Manifold Model and Torque Tables

Postby josh@severntuning » Sat Oct 24, 2020 3:03 pm

You're most likely correct that your car is not entering full load enrichment and still targeting a stoichiometric part-load AFR. I do adjust part load tables to target a richer mixture and smooth the transition to full load, so that even if the car doesn't go into full load enrichment the AFR is still correct. You can email me and I would be happy to work out a tune for you with all parameters adjusted in ByteTuner. Unfortunately we do have to maintain a competitive advantage and keep some information proprietary, as we have quite a bit invested in this platform.

I've tuned the G-Power kit before, and it can make very good power when the supercharger is over-spun... it just generates a lot of heat so E85 and/or WMI become necessary. We have one customer in Switzerland running both E85 and WMI on the G-Power kit with an ASA T3-313 and 85mm pulley, so it is definitely possible to raise the power quite a bit from the basic kit.

Additionally, I recommend you perform a boost leak test. One of our G-Power customers found a major crack in the cast charge pipe, which could have led to engine failure if metal fragments were ingested. Besides being good practice, the boost leak test will help identify whether unmetered air is entering the engine and causing your part throttle issues. I can walk you through the test if need be.


Return to “DME Tuning Tech”

Who is online

Users browsing this forum: No registered users and 1 guest