![]() |
coasting and average MPG - confused
I've been logging some data from Vag-com and i'm a bit confused how to work out average mpg...
I'm logging KMH and L/H, then in a spreadsheet dividing kmh by l/h to get KM/L, multiply by 2.82 to get IMP MPG. all good so far :) now when i get to a spot where I am in Neutral costing, my L/H drops to 0.39 (idle) and my Km/h stays high (say 100kmh for arguements sake) now my average is 100kml and my mpg is 282 (mmm tasty). this alone throws the average out quite a lot!!! BUT!!! when i in gear coast, i get 100kmh at 0.00l/h (fuel cut off), which throws my MPG up in the infinity region (ok i get a div/0 error) even if i substitute a low value for L/H (0.0001) it's still a huge number. and my average goes incredibly high. so for now i've been ignoring these 2 states, but how does everyone else (and more to the point cars with an average mpg display) work these out? do you get a max increment function, or is it clever stuff involving distance travelled vs fuel used over previous so many miles? (typing it out makes sense) any ideas? |
...when you're "coasting" the car is accummulating MILES but only consuming "idle" amounts of fuel, so the instantaneous-MPG becomes a large number being divided by a very small number.
|
Quote:
I'm wondering if i should sum miles and fuel over time and then divide one by the other. so if i do 50 miles, and use one gallon, then coast for a mile, my average is 51mpg. I guess i need to work out that way instead of dividing speed by fuel/h... |
average it all at the end of the tank instead of trip to trip, it's a lot easier
|
You're always stuck with this regardless of wether you use L/100km or MPG.
The one way around it, is using L/h, which is what you're logging, and additionally log the duration . |
well i also log mg/stroke rpm and various other things.
I've started rolling sum of litres per sample rate, and km per sample rate, then dividing one by the other. this gets over the issue of the 0 and low fuel usage, but assumes speed and l/h are constant over about 1.25s. this gives me about 62mpg (slightly better than when i ignore the funny numbers) as you say, i should just average it out per tank, but my inner geek is crying out for attention :) what i was hoping for was a way to write a bit of VBA to display my instant and average on my netbook screen and using it as a economy gauge as i drive along. i guess the next stage is working out the language of my vag-com cable to pull the numbers out directly into excel. |
Quote:
what i was hoping for was a way to write a bit of VBA to display my instant and average on my netbook screen and using it as a economy gauge as i drive along.[/QUOTE] you probably can, just be sure both take into account your fuel consumption. if you have it only averaging the instant MPG #'s it won't total correctly because of the fluctuating rate of fuel consumption. |
I don't know exactly how the Scangauge II calculates it, but I like the options it presents... a 'trip' Average (If I've stopped more than 7 minutes, the Scangauge automatically resets the trip), a 'daily' average, and a 'tank' average.
Since I live at the top of a hill, I can easily coast out of my driveway all the way to the bottom of the hill (about .7 miles), using 0 fuel while still covering a distance... infinite MPG. During that time, the Scangauge shows nothing on the 'trip' display. Only when I start to actually use fuel does the Scangauge start to show some kind of FE numbers for the trip. Of course, during the early part of a 'trip' or 'tank', small changes in my FE will affect the average. For instance, if I do start my car at the top of my hill and coast down in neutral, the FE avg will be HUGE! But once I get out on the road driving normally, it quickly drops down to a more realistic value. Seems like you could take a similar approach using VBA... check first if there is any fuel consumed for the interval you're calculating, and only try calculating if some has been consumed. Otherwise show 0.00L/km. Once fuel has been consumed, then show the actual values... the more fuel consumed (and km traveled), the more accurate the FE calculation. |
The problem is more than just a technical data problem. Asking how many MPGs you are getting when you aren't using any fuel is the same as asking how many miles per grapefruit you are getting. It makes no sense. You aren't getting infinite MPG any more than you are getting infinite miles per grapefruit.
In research projects this problem comes up all the time when taking measurements. Engineers and scientists deal with it in several ways: 1) Just delete all the DIV!0 data and pretend it didn't happen. It is outside the parameters of the experiment. 2) Calculate your MPGs from a running average, not from instantaneous readings. Say over the previous 60 seconds. You still get data points every second because it is a running average, but the values are smoothed out considerably and can accommodate periods when no fuel is being used. Unless you coast in drive for longer than 60 seconds your MPG during the previous 60 seconds will still be accurate for that time period even though you are using no fuel at times. For example, if during 60 seconds you drive for 1 mile and use .1 gallons of fuel you are getting 10 miles per gallon. If during that time you also coasted for 0.1 mile using zero fuel, you would be getting 1.1miles/.1gal = 11 mpg. The longer your running average period the smoother the data. The shorter your averaging period the more quickly your data responds to changes. The previous advice by joenavy85 to only calculate MPG per tank is just a VERRRY long running average. Besides, it isn't really useful to plot MPG for each and every second without some smoothing function involved. The noise is just too high. You can go from 500 mpg to 5 mpg in a second. I suggest you use a running average - it solves all your problems. Another thing you can do is not to try and average your MPG data points directly. As you realize, the DIV!0 errors make that impossible. Instead, average the miles and then average the gallons, THEN calculate MPG. Voila, no DIV!0 errors. |
All times are GMT -4. The time now is 05:34 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com