RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Tue Dec 23, 2025 3:57 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: MAF - kg/h or mg/tdc?
PostPosted: Fri Nov 07, 2014 1:17 pm 
Offline
Senior Member

Joined: Fri Feb 10, 2006 7:04 pm
Posts: 2661
Location: RIP
I'm reading through the Siemens docs again after thinking about comments by busterhax and 328ijunkie and I want to revisit how we have MAF defined in the ECU.

It says,
Quote:
The raw values are converted by a table ID_MAF_TAB__V_MAF_1__V_MAF_2 into values with the unit [kg/h] and sum up in one of the two buffers, MAF_ACC and MAF_ACC1. The number of values is counted in MAF_ACC_SUM and MAF_ACC1_SUM.

I guess, a buffer is used so the ECU can read a moving average of MAF values to normalize/filter the signal.

The MAF volt (0 to 5v) translation table (ID_MAF_TAB__V_MAF_1__V_MAF_2) can have values from 0 to 65535 with a resolution of 0.015625 and units of kg/hr. This means the MAF can be as high as 1024 kg/hr at 5v.

Then it sums up all the values and divides by the number of values to get an average.
Quote:
MAF_KGH_MES = 1/16 * MAF_ACC / MAF_ACC_SUM
or MAF_KGH_MES = 1/16 * MAF_ACC1 / MAF_ACC1_SUM

What I don't understand is why is it dividing by 16 in addition to that? So it is basically taking in MAF volts, converting to kg/hr, summing up in a buffer, then dividing by number of values in the buffer to get a smoothed average, and then dividing again by 16 and still calling it kg/hr except this time the limits are as high as 16384 kg/hr.

Then later it does
Quote:
MAF_MES = NC_FAC_MAF_CYL * MAF_KGH / N

where NC_FAC_MAF_CYL = 8000H = 1 dec.

Let's say stock MAF at 5V reads about 740 kg/hr at 7000RPM. That translates to 740 divided by 16 and again divided by 7000 which equals 0.006607 mg/tdc. This can't be right.
The other option is take the raw value at 5V which is 47360 decimal then divide that by 16 and again by 7000 which equals 0.4228 mg/tdc. This also seems wrong.
Another option is to take the raw value at 5V and divide by RPM which results in 6.76 mg/tdc. This also seems wrong.

Let's compare that to a datalog shared by Enabled a few weeks ago using Testo.
Code:
'11.10.2014 18:36:42 <jobstart>'STATUS_MOTORDREHZAHL','
11.10.2014 18:36:42 'STAT_MOTORDREHZAHL_WERT','1.979000E+003','real'
11.10.2014 18:36:42 'STATUS_MOTORDREHZAHL_EINH','rpm','text'
11.10.2014 18:36:42 'STATUS_MOTORDREHZAHL_WERT','1.979000E+003','real'
11.10.2014 18:36:42 <jobend>

11.10.2014 18:36:47 <jobstart>'STATUS_LMM','
11.10.2014 18:36:47 'STATUS_LMM_EINH','kg/h','text'
11.10.2014 18:36:47 'STATUS_LMM_WERT','3.875000E+001','real'
11.10.2014 18:36:47 <jobend>

'11.10.2014 18:36:47 <jobstart>'STATUS_LAST','
11.10.2014 18:36:47 'STAT_LAST_WERT','1.058610E+002','real'
11.10.2014 18:36:47 'STATUS_LAST_EINH','mg/Stroke','text'
11.10.2014 18:36:47 'STATUS_LAST_WERT','1.058610E+002','real'
11.10.2014 18:36:47 <jobend>

11.10.2014 18:36:44 <jobstart>'STATUS_LMM_VOLT','
11.10.2014 18:36:45 'STATUS_LMM_VOLT_EINH','V','text'
11.10.2014 18:36:45 'STATUS_LMM_VOLT_WERT','1.462500E+000','real'
11.10.2014 18:36:45 <jobend>

We can see that the ECU logged 1979 RPM, 38.75 MAF kg/h, 1.4625 MAF volt, and 105.861 mg/stroke all within a few seconds. So this should help us narrow down a relationship.

Can we get another set of eyes on this to help figure out how the ECU is converting from MAF kg/h to Load mg/stroke?
Either way, I'm going to change all the table formulae from kg/hr to mg/stroke except for the MAF translation table as that is verified correct via datalogs. This results in the axis ranging from 25 mg/stroke to 700 mg/stroke and can be programmed to be as high as 1389 mg/stroke.

_________________
MS41 Project Leader & Co-Developer (2012 - 2023)
MS41.3 https://sites.google.com/site/openms41/custom-code---ms41-3
MS41 ECU Portal https://sites.google.com/site/openms41/ms41-ecu-portal


Top
 Profile  
 
 Post subject: Re: MS41 ECU Definitions
PostPosted: Tue Nov 11, 2014 4:39 am 
Offline
Newbie

Joined: Tue May 06, 2014 2:34 pm
Posts: 63
Hello, I am quite new to ecu tuning, but as I own a MS41.1 with 0960 software version, I am getting to know it and I have found a strange mismatch in MAF axis and data.
The main fuel map, spark maps and others have MAF axis with axis scaling data. This data uses a factor of x*.0212, therefore naming the highest value 30196*0.0212=640 rpm`s.
In the MAF sensor scaling the MAF data factor is x*.015625, so where I have the same value 30196*0.015625=472 rpm`s.
My question is which one of these factors is right? I would think 0.015625, as I have seen it in other sources, but I'm not sure.

Should the 960 software of a M52B25 engine contain most of the data you have collected for the M3 912 software, like Injector dead time, Knock maps?


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Nov 11, 2014 4:52 am 
Offline
Senior Member

Joined: Fri Feb 10, 2006 7:04 pm
Posts: 2661
Location: RIP
The MAF scaling map converts volts to kg/h (x*.015625). Then the ECU uses that and RPM to calculate MAF load that is used pretty much everywhere else which is (x*.0212) with units mg/stroke.

_________________
MS41 Project Leader & Co-Developer (2012 - 2023)
MS41.3 https://sites.google.com/site/openms41/custom-code---ms41-3
MS41 ECU Portal https://sites.google.com/site/openms41/ms41-ecu-portal


Top
 Profile  
 
 Post subject: Re: MS41 ECU Definitions
PostPosted: Tue Nov 11, 2014 10:50 am 
Offline
Experienced

Joined: Thu Sep 25, 2014 12:53 pm
Posts: 627
Location: Houston, TX
zladzejus wrote:

Should the 960 software of a M52B25 engine contain most of the data you have collected for the M3 912 software, like Injector dead time, Knock maps?


I'm working on it. I don't have all the maps identified for MS41.1 960, but I do have the relevant ones translated, so far. It takes a bit of searching around, and comparing to make sure I identify them. The addresses differ, and there are some very slight differences in logic on some maps.

Are you looking for a particular map in MS41.1?

Sometime soon, when I have a little more free time, I'm going to create a thread where we can discuss and add to the XML definitions.


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Nov 11, 2014 11:06 am 
Offline
Senior Member

Joined: Wed Jan 22, 2014 6:54 pm
Posts: 1773
The only thing I haven't been able to find/doesn't exist in 960 is a 3d vanos table.


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Nov 11, 2014 11:15 pm 
Offline
Newbie

Joined: Mon Dec 30, 2013 8:27 pm
Posts: 11
Kg/Hr to g/stroke is easy math.

kg/hr * 1000/60 = g/min

g/min / RPM = g/rev

Three cylinders fill per rev, so

g/rev / 3 = gram per cylinder-stroke

Not sure how this relates to the code or the mystery /16. I'll look at it when I'm more awake.


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Wed Nov 12, 2014 12:00 pm 
Offline
Senior Member

Joined: Fri Feb 10, 2006 7:04 pm
Posts: 2661
Location: RIP
rf900rkw wrote:
Kg/Hr to g/stroke is easy math.

kg/hr * 1000/60 = g/min

g/min / RPM = g/rev

Three cylinders fill per rev, so

g/rev / 3 = gram per cylinder-stroke

Not sure how this relates to the code or the mystery /16. I'll look at it when I'm more awake.

Quote:
We can see that the ECU logged 1979 RPM, 38.75 MAF kg/h, 1.4625 MAF volt, and 105.861 mg/stroke all within a few seconds.

That seems to work out to 108 mg/stroke which is close enough to the datalogged value. The divide by 16 might be some thing in the code to convert between word to byte or somethign.

_________________
MS41 Project Leader & Co-Developer (2012 - 2023)
MS41.3 https://sites.google.com/site/openms41/custom-code---ms41-3
MS41 ECU Portal https://sites.google.com/site/openms41/ms41-ecu-portal


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue May 19, 2015 10:17 pm 
Offline
Experienced

Joined: Thu Dec 04, 2014 6:37 pm
Posts: 139
so the load table at the top is not kg/hr? well s***. so the max limit on the axis goes to 1389mg/tdc witch would equate to 1750kg/hr at 7k? but the maf limit is 1024kg/hr? now im totally confused. can someone please elaborate on this more?


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue May 19, 2015 10:32 pm 
Offline
Senior Member

Joined: Wed Jan 22, 2014 6:54 pm
Posts: 1773
It has to be that way to account for the torque in the midrange. Load roughly translates to torque as it is airflow per stroke. Engines make more torque in midrange

So basically an engine that would use 1300mg/stroke at 4@ will only use about 800mg/stroke at redline


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Wed May 20, 2015 5:18 pm 
Offline
Experienced

Joined: Thu Dec 04, 2014 6:37 pm
Posts: 139
I was doing all the math last night and it totally makes sense now. ;)


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Thu May 21, 2015 12:44 pm 
Offline
Experienced

Joined: Sat Mar 15, 2014 6:46 pm
Posts: 276
Location: Belarus
Can anyone post rr logs with load and kgh values?


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Jun 16, 2015 4:56 pm 
Offline
Newbie

Joined: Tue May 06, 2014 2:34 pm
Posts: 63
Well this is quite long overdue, but for a more complete thread, here is a log with rpm, maf and load. The values confirm the rf900rkw given math.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Oct 06, 2015 10:19 pm 
Offline
Senior Member

Joined: Fri Feb 10, 2006 7:04 pm
Posts: 2661
Location: RIP
rf900rkw wrote:
Kg/Hr to g/stroke is easy math.

kg/hr * 1000/60 = g/min

g/min / RPM = g/rev

Three cylinders fill per rev, so

g/rev / 3 = gram per cylinder-stroke

Not sure how this relates to the code or the mystery /16. I'll look at it when I'm more awake.

Thanks. This was a good post to refer back to.

I added some of this info to the wiki page on Engine Load
https://sites.google.com/site/openms41/ ... ngine-load

_________________
MS41 Project Leader & Co-Developer (2012 - 2023)
MS41.3 https://sites.google.com/site/openms41/custom-code---ms41-3
MS41 ECU Portal https://sites.google.com/site/openms41/ms41-ecu-portal


Top
 Profile  
 
 Post subject: Re: MAF - kg/h or mg/tdc?
PostPosted: Tue Mar 14, 2023 10:11 pm 
Offline
Newbie

Joined: Sun May 22, 2022 9:59 am
Posts: 51
Can somebody point me where ECU convert voltage to kg/h? Please for MS41.2
I found most of this buffer and 32 to 16 bit stufs about mass air flow. But I can't find where ECU look in MAF table, and what variable is output from voltage to values that are in MAF table

EDIT: Searching more tru this forum section helped me to find it, for me it was confusing that they first put 2AD6 to variable, I was expecting that they will use 2AD6 address directly


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl