# Calculating fuel flow rate through obd || sensor not supporting 015E and 0110 commands

I have been working on a project where i want to calulate fuel flow rate using data from the obd2 sensor. The car on which i was testing didn't support the pid 015E which is for fuel flow rate. Then i planned to use pid 0110 which is for mass air flow (MAF).I was unlucky with that too (not supported). Then i came across two sources on the internet where it was stated that we can use Mnifold absolute pressure (MAP) to somehow derive mass air flow (MAF). Here are the links

I also came across a research paper that showed various possibilities for the calculation of MAF, here:

I tried and implemented the formulas from the above resources to indirectly calculate MAF and then ultimately get fuel flow rate but the final result is too unrealistic, for instance i was getting 2.6 gallons/sec of fuel flow rate. Now i know it is possible to somehow calculate fuel flow rate indirectly because another app namely "Torque" could calculate fuel flow rate on the same car under the very same conditions and gave something like 0.000066 gallons/sec, which seems believable. I tried to contact the torque application developer but was unlucky. There was a variable called volumetric efficiency used in the formulas above which i just assumed for my car to have 70%. Please i need help i need to know what am i doing wrong or is there some other formula that can be used.

Below are the calculations i used as per this paragraph in the research paper: This is what i did:

``````    IMAP = (engineRPM * absolutePress) / ((airTemp + 273) / 2f);
MAF  = (IMAP / 60) * (volumetricEff / 100f) * (engineDisp / 1000f) * (28.97f / 8.314f);
fuelFlow = (MAF * 3600) / (14.7f * 820) ;   // l/h
``````

The engine displacement was in CC so i divided it by 1000 to convert to litres and the temperature was in deg celsius so i added 273 to convert it to deg kelvin.These were the formula requirements.Where i am guessing the volumetric efficiency to be 80%.

I think it's probably the volumetric efficiency that is the source of error, but i don't have any idea how to calculate volumetric efficiency using obd || parameters. The research paper stated another formula that didn't use volumetric efficiency but i can't really understand and use it, it's poorly formatted i guess.Here it is: Now i don't need to be accurate here, i just need the fuel flow calculation to be atleast believable. No accuracy required at all.

• You need to show your actual calculations so we can see where you may be going wrong. Jan 24, 2019 at 16:50
• I can't show them at this moment., But i do assure you that i have checked them a 100 times. i have copied the same formula as in the research paper and used it, i just did a little units conversion in the end by dividing the result by 13627.48 to convert litres/hr to gallons/sec Jan 24, 2019 at 17:26
• imperial gallons or US gallons? they are different... Luckily hours, minutes and seconds are fine... Show the calcs... Jan 24, 2019 at 17:30
• Us galls. I followed this link for conversion :. traditionaloven.com/tutorials/flow-rate/… Jan 24, 2019 at 17:31
• I think the problem here lies with volumetric efficiency, which i don't know how Torque (the other app) estimates if it does estimate at all. Jan 24, 2019 at 17:33

I figured out that the formula stated in the paper for fuel flow below:

fuelFlow = (MAF * 3600) / (14.7f * 820) ; // l/h

is off by a single 0(needs an extra 0 added to the right of decimal).So we need to divide by 10, so the actual formula for fuelFlow now becomes:

fuelFlow = ((MAF * 3600) / (14.7f * 820)) / 10 ; // l/h

Apart from this the MAF calculated using the formula 1 below:

IMAP = RPM x MAP / IAT / 2 MAF = (IMAP/60) x (VolEff/100) x EngDisp x (MMAir/R)

probably results in a close estimation of MAF that is highly dependent on the accuracy of VE(Volumetric efficiency).I assumed it to be 80%.If there is some kind of way to calculate VE based of obd parameters not using mass air flow itself, then it would be great. Otherwise you just have to assume on VE percentage.

• And do notice that you are assuming a stoichiometric air/fuel ratio 100% of the time, which is rare... Jan 31, 2019 at 8:50
• Well you're right but I just needed an estimate on fuel flow rate and not an accurate value Feb 1, 2019 at 10:49
• I did not have to divide by 10 to get reasonable numbers. Sep 21, 2019 at 14:27

I used above formulas to create below gnuplot helper functions

``````vol_eff = 0.8322
f_time(x) = x/1000
f_rpm_to_rps(x) = x/60
f_mbar_to_kpa(x) = x / 1000 * 100
f_celcius_to_kelvin(x) = x + 273.15
f_imap(rpm, press_mbar, temp_c) = f_rpm_to_rps(rpm) * (f_mbar_to_kpa(press_mbar) / f_celcius_to_kelvin(temp_c) / 2)
f_maf(rpm, press_mbar, temp_c) = f_imap(rpm, press_mbar, temp_c) * vol_eff * 1.984 * 28.97 / 8.314
f_fuel(rpm, press_mbar, temp_c) = (f_maf(rpm, press_mbar, temp_c)*3600) / (14.7*820)
f_mileage(rpm, press_mbar, temp_c, speed_kmh) = 100 * (f_fuel(rpm, press_mbar, temp_c)  / speed_kmh)
``````