PDA

View Full Version : How Does GM Calculates Mass Air Flow?



brandongarnold02
11-20-2022, 10:04 AM
I’m wondering if anyone knows how GM gets it calculated mass air flow. I found this calculation MAF (lb/min) = [(Displacement *RPM/2)/1728] * 2.7 (MAP/IAT) and a few like it online but that’s for mass air flow at 100% volumetric efficiency. I am wondering if it takes this then multiplies by the VE table cell as a percentage and then compares it to the actual MAF reading. The reason I’d like to know is I was trying to come up with a way to data log and help determine and error that would cause a P0101 fault. I do know that map and iat are used to determine calculated mass air flow just trying to figure out how.

Tom H
11-20-2022, 02:01 PM
I have some of the information you seek, however it is specific to the '97 code I have been working with. I cant be sure the info can be applied to your situation.

The MAF sensor produces a digital output with a frequency porportional to the air flow. The TPU (that is the third processor in my design, internal to the CPU in later designs) monitors the signal and produces a number that is the period of the input signal. After linearizing the value (table) it has a number for air flow. There is then a temperature compensation. Finally the air pressure is used to come up with the final air quantity in grams/second.

Before testing for P0101 fault, the code tests a good number of factors to be sure the test result will be valid.
- Engine speed (rpm)
- Engine run time
- Minimum system voltage
- Stability (length of time these conditions are met for)
- Throttle position
( I probably missed a few...)
Once all this is done, software compares the expected speed/density calculated air flow with the MAF measured flow. Software takes the absolute value of the difference between S/D and MAF air flow and tests it against a threshold. A count is kept of the number of times there is a difference in excess of the threshold. Exceeding the threshold 50 times in a row sets the P0101 DTC.

All the above is my understanding of the code but not tested in any way. Hope it is useful.

-Tom

steveo
11-20-2022, 07:00 PM
I’m wondering if anyone knows how GM gets it calculated mass air flow. I found this calculation MAF (lb/min) = [(Displacement *RPM/2)/1728] * 2.7 (MAP/IAT) and a few like it online but that’s for mass air flow at 100% volumetric efficiency. I am wondering if it takes this then multiplies by the VE table cell as a percentage and then compares it to the actual MAF reading. The reason I’d like to know is I was trying to come up with a way to data log and help determine and error that would cause a P0101 fault. I do know that map and iat are used to determine calculated mass air flow just trying to figure out how.

logically it would have to multiply it by a VE table or similar. if the above calculation gave you airflow at 100% VE then multiplying it against the ve lookup result should give you what you want.

i guess an interesting thing that comes to mind is this equation is reversible. if your VE table is only being used for checking MAF sanity you could very easily calculate a 'correct' ve table from some logs.

brandongarnold02
11-20-2022, 07:16 PM
I have some of the information you seek, however it is specific to the '97 code I have been working with. I cant be sure the info can be applied to your situation.

The MAF sensor produces a digital output with a frequency porportional to the air flow. The TPU (that is the third processor in my design, internal to the CPU in later designs) monitors the signal and produces a number that is the period of the input signal. After linearizing the value (table) it has a number for air flow. There is then a temperature compensation. Finally the air pressure is used to come up with the final air quantity in grams/second.

Before testing for P0101 fault, the code tests a good number of factors to be sure the test result will be valid.
- Engine speed (rpm)
- Engine run time
- Minimum system voltage
- Stability (length of time these conditions are met for)
- Throttle position
( I probably missed a few...)
Once all this is done, software compares the expected speed/density calculated air flow with the MAF measured flow. Software takes the absolute value of the difference between S/D and MAF air flow and tests it against a threshold. A count is kept of the number of times there is a difference in excess of the threshold. Exceeding the threshold 50 times in a row sets the P0101 DTC.

All the above is my understanding of the code but not tested in any way. Hope it is useful.

-Tom


I am curious if one can do some data logging with the available PIDs and open with a log viewing program then create a math equation to create the calculated air flow to compare it to the actual mass air flow.

brandongarnold02
11-20-2022, 07:23 PM
logically it would have to multiply it by a VE table or similar. if the above calculation gave you airflow at 100% VE then multiplying it against the ve lookup result should give you what you want.

i guess an interesting thing that comes to mind is this equation is reversible. if your VE table is only being used for checking MAF sanity you could very easily calculate a 'correct' ve table from some logs.

That makes sense to me. I found a table with the allowed differences in calculated airflow vs actual airflow. Just trying to see if some math can be done using known PIDs to view what the calculated airflow is to compare it to actual on a graph.

steveo
11-20-2022, 07:32 PM
depending what ECM you have and how much disassembly has been done on it, the best way would be to hack it and then you could query the output of calculated airflow.

but if you can't do that, you have map, IAT, and RPM, so you're most of the way there. i guess the issue is the VE lookup value doesn't have a PID, right?

two options to get VE lookup really

- hack it (see above)
- copy your ve table to somewhere on your computer and do a lookup yourself

starting to sound like either way will require writing some code

this all sounds kind of annoying, most people just disable p0101 don't they

brandongarnold02
11-20-2022, 08:23 PM
depending what ECM you have and how much disassembly has been done on it, the best way would be to hack it and then you could query the output of calculated airflow.

but if you can't do that, you have map, IAT, and RPM, so you're most of the way there. i guess the issue is the VE lookup value doesn't have a PID, right?

two options to get VE lookup really

- hack it (see above)
- copy your ve table to somewhere on your computer and do a lookup yourself

starting to sound like either way will require writing some code

this all sounds kind of annoying, most people just disable p0101 don't they

This really isn’t a concern on my truck because I have access to the VE table but let’s say I’m looking at a vehicle I don’t have access to view the tables. This was more of an idea I had to use as a tool for troubleshooting. An example could be a bad map sensor caused a skewed reading you would be able to catch it by comparing the airflows. This was all just a thought though.

Fast355
11-20-2022, 11:22 PM
I build my base VE tables from filtered MAF data.

Dynamic air calibration from MAF
Dynamic Air Calculated =
(MAF gms/sec X 120) / (#Cylinders X RPM)

VE Calculation from MAF
VE=(DynamicAir X IAT in Kelvin X 0.28705) / (Cylinder Volume X MAP in Bar)

Now put both parts together.
VE=((MAF gms/sec X 120) / (#Cylinders X RPM)X IAT in Kelvin X 0.28705) / (Cylinder Volume X MAP in Bar))

Cylinder volume is 1 cylinder in liters.

bobcratchet555
11-21-2022, 07:50 PM
I build my base VE tables from filtered MAF data.

Dynamic air calibration from MAF
Dynamic Air Calculated =
(MAF gms/sec X 120) / (#Cylinders X RPM)

VE Calculation from MAF
VE=(DynamicAir X IAT in Kelvin X 0.28705) / (Cylinder Volume X MAP in Bar)

Now put both parts together.
VE=((MAF gms/sec X 120) / (#Cylinders X RPM)X IAT in Kelvin X 0.28705) / (Cylinder Volume X MAP in Bar))

Cylinder volume is 1 cylinder in liters.

i've been wondering for awhile if the MAF can be used as a tuning tool similar to how widebands get used. I kind of assumed that if the MAF calibration is reasonably good maybe it would work to some extent?

Fast355
11-21-2022, 11:23 PM
i've been wondering for awhile if the MAF can be used as a tuning tool similar to how widebands get used. I kind of assumed that if the MAF calibration is reasonably good maybe it would work to some extent?

It works and it works very well, IMO. I filter out the transients though. Any TPS change greater than 1% or MAP change greater then 1 KPA results in values not being saved for 500msec after the change. I also make the minimum count; 20 hits so that bogus 1 hit data is eliminated. Once the transient spikes are cleaned up the data is very clean and repeatable. I find the calculated VE table a much better starting point then trying to datalog from a factory VE table. I get the engine running on MAF because it is exponentially easier to get the thing running and datalog the VE data I can. A little hand editing to fill in the blanks and it is up and running well enough to get it to run well for VE tuning.

bobcratchet555
11-22-2022, 06:42 PM
It works and it works very well, IMO. I filter out the transients though. Any TPS change greater than 1% or MAP change greater then 1 KPA results in values not being saved for 500msec after the change. I also make the minimum count; 20 hits so that bogus 1 hit data is eliminated. Once the transient spikes are cleaned up the data is very clean and repeatable. I find the calculated VE table a much better starting point then trying to datalog from a factory VE table. I get the engine running on MAF because it is exponentially easier to get the thing running and datalog the VE data I can. A little hand editing to fill in the blanks and it is up and running well enough to get it to run well for VE tuning.

thanks for the tip. greatly appreciated. i'm in the process of building up a 383 LS1 and it'll be the first engine i've done any serious tuning on so, will take all the pointers i can.