Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Engine Management, OBD-II, Engine Diagnostics, etc.


Reply
 
Share Thread Tools Display Modes
Old 08-07-2008, 01:54 PM   #16
Variable Bitrate
 
mezz64's Avatar
 
Join Date: Nov 2004
Location: PA
Posts: 327
mezz64 is on a distinguished road
Quote: Originally Posted by dreadknought View Post
MPG = (14.7 * (1 + LTFT/100) * 6.17 * 454 * VSS * 0.621371) / (3600 * MAF / 100)
MPG = 710.7 * VSS / MAF * (1 + LTFT/100)

I like this idea and the logic seems sound. I'm going to adjust my formula's and see how things work out. I'm using a calculated adjustment percentage at the moment because my calculations were coming out too optimistic. (eg. 50mpg when it's really 20mpg)

Since stoich is 0, and it varies +- from 0 I'm pretty sure it is % difference from stoich. I've got a inline-4 so just the bank 1 measurement should be needed.
__________________
98' Honda CR-V
http://www.superbluecrv.com

*OBDMPG, the RR OBD Plugin*

Last edited by mezz64; 08-07-2008 at 01:58 PM.
mezz64 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 08-07-2008, 04:07 PM   #17
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,156
Curiosity will become famous soon enough
Yep, I'd agree. It's more accurate to use LTFT. Just one is fine unless your engine has problems. I use a little different math, but here are some ideas.

x = something like 30 in raw form. You'll notice when you let off on the gas, the MAF rate can drop fast and shows 500 MPG or more. I just skip showing it until it gets back to normal.

And LTFT must be positive for this math to work. So...

if(MAF < x ) return
if(LTFT < 0.0) LTFT = -LTFT

MPG = 710.7 * VSS / MAF * (1 + LTFT/100)
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam
Curiosity is offline   Reply With Quote
Old 08-07-2008, 04:58 PM   #18
Newbie
 
Join Date: Jul 2008
Posts: 10
marcw is an unknown quantity at this point
Modern cars circa '96 do run at stiochiometric as soon as possible...

Quote: Originally Posted by dreadknought View Post
as many have posted already, the formulas given here are for stoichiometric fuel ratios. Unfortunately, modern cars don't run at stoichiometric fuel ratios. They run as lean as possible, just on the cusp of lean missing when cruising. They run rich anywhere from half-throttle to WOT. They automatically compensate for sub-standard fuels and fuel additives that affect octane.

My suggestion is, use the formula for calculating stoichiometric fuel consumption, but use the LTFT (Long Term Fuel Trim) to find what the vehicle is actually using. LTFT is given in +/- % (percentage). An example of the formula to use is

MPG = (14.7 * (1 + LTFT/100) * 6.17 * 454 * VSS * 0.621371) / (3600 * MAF / 100)
MPG = 710.7 * VSS / MAF * (1 + LTFT/100)

This formula uses the car's fuel trim value to compensate for the difference in actual AFR and stoichiometric AFR, however I'm not 100% sure that the LTFT value is % difference from stoichiometric. If anybody has any ideas as to how correct my thoughts are, please respond.


and as much as possible because this represents the ideal mixture of air/fuel that produces the exhaust gases best processed by the 3-way converters.

Under non-open loop operation (cold start, hard acceleration, closed throttle coast down) the controller can go open loop and then can feed teh engine nearly any air/fuel mixture it wants.

All fuel consumption calculations are going to be imprecise unless one knows the weight the gas being consumed to a precise value. Gas weight varies due to differences in blends that arise from octane differences, or gas targeted for a season or a region that has some botique blend requirement and temperature to name a few factors that I can think of. There could be more.

But fuel consumption based on air consumption is probably good enough for all but labs needs.

Sincerely,

MarcW.
marcw is offline   Reply With Quote
Old 08-07-2008, 05:50 PM   #19
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,036
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
So if you happened to have your A/F ratio from say.. a wideband O2 sensor, you could plug that in and get an even more accurate guesstimate right?
malcom2073 is offline   Reply With Quote
Old 08-08-2008, 02:29 AM   #20
Newbie
 
Join Date: Aug 2004
Posts: 3
dreadknought is on a distinguished road
Quote: Originally Posted by Curiosity View Post
Yep, I'd agree. It's more accurate to use LTFT. Just one is fine unless your engine has problems. I use a little different math, but here are some ideas.

x = something like 30 in raw form. You'll notice when you let off on the gas, the MAF rate can drop fast and shows 500 MPG or more. I just skip showing it until it gets back to normal.

And LTFT must be positive for this math to work. So...

if(MAF < x ) return
if(LTFT < 0.0) LTFT = -LTFT

MPG = 710.7 * VSS / MAF * (1 + LTFT/100)

LTFT does not have to be positive to work correctly. I convert the % LTFT value to a decimal value to multiply the result by. This means if the computer is using 5% more fuel than what hard-coded fuel tables tells it to use, then the formula compensates by adding 5% to the result. Similarly, if the computer is using 5% less than what the fuel tables say to use, the formula subtract 5%. Notice that when LTFT if +5%, the formula multiplies by 1.05, and when the LTFT is -5%, it multiplies by 0.95.

There's only two issues I'm having with the formula I came up with. The first is that LTFT is really only the difference in pulse width of the injectors. This means it also compensates for different tolerance levels in the injectors output themselves. For example, a partially clogged injector will be given a positive LTFT to compensate for the smaller amount of fuel it outputs as compared to the other injectors.

Which brings me to the second problem: Modern vehicles are starting to have LTFT's for each individual cylinder, which throws this formula out the window because it only pays attention to one over-all LTFT. I suppose you could take each available LTFT (whether it's 2 banks or 8 banks), and find the average, which should theoretically find the overall LTFT, but then again, LTFT could also be compensating for defective injectors or any other number of factors.

Another method to directly figure the amount of fuel used is to use a home-made injector-tester kit. You could create a microcontroller that outputs 25% PW, 50% PW, 75% PW, and 100% PW to each individual injector for an arbitrary amount of time, say 10 seconds for each level. Use a calibrated test tube to measure the volume of fuel dispensed by each fuel injector, then graph the results. Find a formula that closely fits the curve of the graph, and use that to interpolate fuel amounts of each injector with the PCM's give PW.

One problem I see with this method, however, is that the fuel rail is under different amounts of pressure at various times, and the vacuum in the intake is different at various times. However, the fuel pressure is changed proportionately to the amount of vacuum. This is because as vacuum increases, it has a tendency to "pull" the fuel out of the injectors, and when vacuum is minimal, it takes more pressure to "push" the same amount of fuel out. The idea is to even it out so the computer doesn't have to do so much work and computations to get the right fuel mixture. Hopefully, this idea means that the varying pressures and vacuums shouldn't matter.

Anywho, if anybody has any ideas to further these lines of thoughts, please post a reply
dreadknought is offline   Reply With Quote
Old 08-08-2008, 04:47 AM   #21
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,156
Curiosity will become famous soon enough
Yeah, you must be doing some kind of decimal to floating point conversion before that. Feeding it my ODB2 logs shows around 200 MPG.

Edit: Ok, got it. Just signed decimal of LTFT looks better.
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam

Last edited by Curiosity; 08-08-2008 at 05:32 AM.
Curiosity is offline   Reply With Quote
Old 08-08-2008, 05:34 AM   #22
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,036
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
Curiosity, I had to do this:
MPG = 710.7 * VSS / (MAF / 100) * (1 + LTFT/100)

I THINK that simplifies to this, double check my math.
MPG = 71.07 * VSS / (MAF) * (1 + LTFT/100)

If you read up, there is a mistake in an earlier post which lightner points out, but he forgets to fix the simplified function. The first function I just posted seems to work for me, and returns an average about equal to what I figure when doing the old miles per tank fillup method.
malcom2073 is offline   Reply With Quote
Old 08-08-2008, 06:40 AM   #23
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,156
Curiosity will become famous soon enough
Ah, maybe that's it. Thanks. It's a little goofy

710.7 * 76 / 5 * (1 + 11 / 100) = 10802 MPG
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam
Curiosity is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 08-08-2008, 08:04 AM   #24
Newbie
 
Join Date: Aug 2004
Posts: 3
dreadknought is on a distinguished road
Quote: Originally Posted by malcom2073 View Post
Curiosity, I had to do this:
MPG = 710.7 * VSS / (MAF / 100) * (1 + LTFT/100)

I THINK that simplifies to this, double check my math.
MPG = 71.07 * VSS / (MAF) * (1 + LTFT/100)

If you read up, there is a mistake in an earlier post which lightner points out, but he forgets to fix the simplified function. The first function I just posted seems to work for me, and returns an average about equal to what I figure when doing the old miles per tank fillup method.

I'm gonna have to say that's not correct. The way I wrote it may be confusing, but if you follow the order of operations, it works out. Making the order of operations explicit, it would be:

MPG = (710.7*VSS/MAF)(1 + LTFT/100)

If you wanted to distribute that out, it would become:

MPG = 710.7*VSS/MAF + (710.7*VSS*LTFT)/100*MAF
MPG = 710.7*VSS/MAF + (7.107*VSS*LTFT)/MAF

or writing it without explicit order of operations (a computer should calculate this correctly)

MPG = 710.7*VSS/MAF + 7.107*VSS*LTFT/MAF

Personally, I think the original formula is easier, because it doesn't have VSS and MAF in it twice; each variable only appears once in the formula, but it's your cat, you skin it how you like
dreadknought is offline   Reply With Quote
Old 08-08-2008, 03:12 PM   #25
North of the land of Hey Huns
 
Join Date: Jun 2004
Location: Westminster, MD
Posts: 1,036
malcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to allmalcom2073 is a name known to all
Oh, I think I might know why. I'm using grams/s in my calulations (my obdlibrary automatically converts), and the origional function assumed it was 100g/s. Sorry ignore my previous post, mine is a special case.
malcom2073 is offline   Reply With Quote
Old 08-08-2008, 07:59 PM   #26
Newbie
 
Join Date: Jul 2008
Posts: 10
marcw is an unknown quantity at this point
Fuel rail pressure is constant, has to be because the ECU....

Quote: Originally Posted by dreadknought View Post
One problem I see with this method, however, is that the fuel rail is under different amounts of pressure at various times, and the vacuum in the intake is different at various times. However, the fuel pressure is changed proportionately to the amount of vacuum. This is because as vacuum increases, it has a tendency to "pull" the fuel out of the injectors, and when vacuum is minimal, it takes more pressure to "push" the same amount of fuel out. The idea is to even it out so the computer doesn't have to do so much work and computations to get the right fuel mixture. Hopefully, this idea means that the varying pressures and vacuums shouldn't matter.

Anywho, if anybody has any ideas to further these lines of thoughts, please post a reply

varies the pulse width to enrichen or lean the mixture. If fuel rail pressure variable the ECU would get conflicting readings from the O2 sensor as the amount of fuel assumed to be injected based on fuel pressure would be different.

Any 'suction' of the fuel from the injector would be compensated for by the ECU as this would work to change the mixture but the effect (if even present) would be constant enough (though perhaps variable over the engine's RPM operating range) to be dealt with by the ECU.

As for long term fuel trims they reflect the ECU's efforts to maintain that 14.7:1 air/fuel ratio.

I think in taking into account the long term fuel trims you are taking into account a factor that has already been taken into account.

Thus the air flow rate at least under closed loop conditions reflects the amount of fuel used. The trouble is back then to what number to use for the weight of the gasoline and this is temperature dependent as well as dependent upon fuel blend.

Sincerely,

MarcW.
marcw is offline   Reply With Quote
Old 08-08-2008, 08:35 PM   #27
What can I say? I like serial.
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Posts: 2,156
Curiosity will become famous soon enough
Maybe you should have added "estimated" in there. It's also instantaneous squirts per feet which is useless to me, so that's why I have to remove the real time errors before they throw off the averaging code. But bottom line is it's better than good enough to figure out where your $$ are going.
__________________
XPort 1.41 -GPS port splitter, logger, and USB device resume fix
GPS DirectShow Filter / XOBD / MiniCam
Curiosity is offline   Reply With Quote
Old 08-16-2008, 05:31 PM   #28
Newbie
 
lightner's Avatar
 
Join Date: Sep 2007
Posts: 4
lightner is an unknown quantity at this point
"Over-Correcting" MPG Using Long-Term Fuel Trim

Quote: Originally Posted by marcw View Post
...

As for long term fuel trims they reflect the ECU's efforts to maintain that 14.7:1 air/fuel ratio.

I think in taking into account the long term fuel trims you are taking into account a factor that has already been taken into account.

Thus the air flow rate at least under closed loop conditions reflects the amount of fuel used. The trouble is back then to what number to use for the weight of the gasoline and this is temperature dependent as well as dependent upon fuel blend.

Sincerely,

MarcW.

Marc is right. A modern vehicle's engine computer (ECU) constantly works to maintain a "stochimetric ideal" air-fuel ratio of about 14.7:1. The reason for this is emissions regulations, and not power, although the ECU can go "open-loop" for short periods to get bursts of power. But, in the long run, stochimetric "rules", and that's why MPG calculations can be done using this kind of data in the first place.

It's my understanding that the OBD-II "fuel trim" numbers are really just a measure of how well the fuel system is doing when using its stored predictions of which set of fuel system parameters (e.g., fuel injection duration, ignition timing, etc.) gives an "ideal" air-fuel ratio. The feedback from the O2 sensors (the ones before the catalytic converter(s)) is what tells the ECU how well it is doing. And, the "fuel trim" number show how well it did with what it had to work with, including perturbations like dirty injectors, uneven fuel-rail pressure, low-grade gasoline, etc.

As for Marc's comment: "The trouble is back then to what number to use for the weight of the gasoline and this is temperature dependent as well as dependent upon fuel blend", it has been my experience that at least when it comes to "plain old" gasoline, what you choose for these "constants" is not critical, given the inaccuracy and variation in the diameter of your tires, the OBD-II sensor readings, etc.

But, if you start mixing in a whole bunch of "corn squeezin's" with your gasoline, then that's a different thang'! :-)

Best regards,

Bruce D. Lightner
lightner@lightner.net
lightner is offline   Reply With Quote
Old 08-19-2008, 08:24 AM   #29
Newbie
 
Chronogps's Avatar
 
Join Date: Aug 2008
Posts: 4
Chronogps is an unknown quantity at this point
I used this method for my software : http://www.winobd.com

I compared the result with the onboard computer of my Car (Seat Leon 2LTFSI) : the result calculated with winobd is very closed. Try it and give me feedback !
Chronogps is offline   Reply With Quote
Old 08-28-2008, 04:26 PM   #30
pwb
Newbie
 
Join Date: Aug 2008
Posts: 22
pwb is an unknown quantity at this point
what about diesel engine?

What is the calculation for diesel engine? When using this calculations the readings is 60-70% higher thAn actual mpg. I have a Peugeot Expert Tepee 2008 and also a Citroen Jumpy 2006, both diesel and no mpg software that i have tried with the scantool.net elmscan is doing any correct calculations of mpg. Is it impossible to use MAF in calculation on a diesel engine since it dont regulate the air in same way as a "gasoline" engine?

/pwb
pwb is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 05:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics