Calculating effect on average fuel mileage during fuel shutoff overrun - Page 1
Forum section: electronics / projects

author: Circlotron
author_rank: Super Contributor
timestamp: September 28, 2022, 01:08:06 pm
content: Got a fairly decent phone app the other day that displays all sorts of engine parameters via a wifi connection to a dongle that plugs into the OBD2 port on the car. It can display both instantaneous and average fuel consumption in various formats including my favourite, miles per imperial gallon.All modern cars have a feature where on deceleration, if the engine is above a certain rpm the fuel injection is completely shut off until a certain lower rpm is reached, the purpose being fuel is saved and exhaust emissions are reduced while your foot is off the accelerator pedal.During this deceleration time the instantaneous fuel mileage is indicated as infinite because the fuel consumption is zero. That is correct. But what should the effect be on the measured average fuel mileage since the start of the journey? If at any time the fuel mileage is infinite then that should have a huge effect on the averaged-until-now figure, should it not? But it doesn't. The overall averaged figure simply creeps up. Haven't got my head around it yet.

author: wilfred
author_rank: Super Contributor
timestamp: September 28, 2022, 01:23:44 pm
content: Switch the phone app to litres per 100km and relax. Failing that take a longer term view of the number of miles you've travelled.

author: bdunham7
author_rank: Super Contributor
timestamp: September 28, 2022, 01:25:05 pm
content: Instantaneous fuel mileage would be speed divided by instantaneous fuel consumption, if the latter is zero you get a mathematical error and it displays something to indicate that, whether it is an infinity sign or question marks. However, to determine average fuel consumption, you wouldn't average or integrate the result of this instantaneous calculation, you would simply add up all of the fuel consumption and divide the total distance travelled thus far and divide it by your total fuel used. The time at zero would reduce the denominator and increase the result, but no math error would result unless the total fuel consumption was zero, like coasting down a mountain.MPG is a deceptive figure in some ways, the L/100kM that the rest of the world uses is more direct.

author: max_torque
author_rank: Super Contributor
timestamp: September 28, 2022, 07:19:55 pm
content: As mentioned, simply add up the total fuel used, and the total distance driven and divide on by the other! Periods spent at either zero speed or zero consumption then have the correct effect, and there effect is directly proportional to the amount of time spent under those conditions

author: Benta
author_rank: Super Contributor
timestamp: September 28, 2022, 07:33:47 pm
content: It's quite simple: you get a divide-by-zero error, which is undefined.

author: David Hess
author_rank: Super Contributor
timestamp: September 28, 2022, 08:34:05 pm
content: Quote from: Circlotron on September 28, 2022, 01:08:06 pmThe average fuel mileage is calculated by adding the fuel *used* divided by the number of miles traveled. It is not an average or integration of the instantaneous fuel mileage.

author: TimFox
author_rank: Super Contributor
timestamp: September 28, 2022, 10:05:56 pm
content: MPG and L/km are (aside from the obvious conversion factor) reciprocals of each other.The one that integrates better is volume per distance, since it never goes below zero and does not go infinite.Integrating volume per distance over a total distance gives you the total volume.Taking the reciprocal of the computed integral gives you MPG, if that is the more familiar parameter.Integrating distance per volume (MPG) over the total volume of fuel consumed gives you the total distance traveled, but you probably already know that.

author: ejeffrey
author_rank: Super Contributor
timestamp: September 28, 2022, 10:08:47 pm
content: Quote from: Circlotron on September 28, 2022, 01:08:06 pmThe proper way to average speeds is with theharmonic mean.

author: bdunham7
author_rank: Super Contributor
timestamp: September 28, 2022, 11:02:28 pm
content: Quote from: TimFox on September 28, 2022, 10:05:56 pmUnless you stop at a stop sign with the engine idling, at which time your instantaneous volume per distance is in fact infinite...

author: Circlotron
author_rank: Super Contributor
timestamp: September 29, 2022, 12:09:10 am
content: Quote from: bdunham7 on September 28, 2022, 01:25:05 pmOr rather, while the fuel usage it at zero the denominator would freeze while the numerator (distance traveled) would continue to increment, causing the long term MPG figure to creep up. Would that be a more correct way of expressing it?

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: September 30, 2022, 02:03:14 am
content: Quote from: Circlotron on September 28, 2022, 01:08:06 pmWell the average mileage is simple. It's the amount of fuel used divided by the distance travelled. So during overrun one number does not increase and the other does, which means your average creeps down.For infinity to be a problem, you'd need to be calculating instantaneous consumption and then integrating that to find your long term average. What a horrible concept.