Improving MPG Calculation Using GPS Data

  • Thread starter thinkcentre12
  • Start date
  • Tags
    Gps
In summary, the conversation was about trying to calculate the miles used in a car by using GPS data and analyzing it on a computer. However, the final number calculated was different from the number at the gas pump, leading to the suspicion that something was not being accounted for. The attempt at a solution involved calculating speed, acceleration, net force, power, and work, and then dividing the work value by 132,000,000 to get the amount of gas used by the car. However, it was pointed out that the efficiency of the car and other factors such as work climbing hills, rolling resistance, drag, and energy lost when braking were not being considered. The conversation also discussed the complexity of the method being used to measure fuel efficiency
  • #1
thinkcentre12
25
0

Homework Statement


What i am trying to do is calcuate the miles used in my car driven a certain distance.


Homework Equations


What i did was take a GPS unit that takes my position and tracks where i drive by the easting, northing, and alt. I then can put that data on a computer and anlyze it. But my final number is a lot better than the number at get at the gas pump. So i think i am forgetting to calcuate something and was hoping you guys could help me. I fill up everytime time after i track my position and i can not seem to get that number in the computer.

The Attempt at a Solution


i have time, x (easting), y (northing), z (alt) for my known data
then i am calucating speed, accleration, net force, power and then i take the absolute value of power to get work. Then i take my work value and divide it by 132000000 which is 1 gallon of gas in joules. Which gives me the amount of gas used by the car. I can then divde that number by .1 since the motor is 10% eff.
i get a valule of 4.71 at the gas stattion
on the computer i get 2.974
Which i know the computer value is high since my car only gets about 18-20 mpg. (99 miles driven)
Looking foward to hear how i can better calacuate the number closer to the gas pump amount.
 
Physics news on Phys.org
  • #2
You have not accounted for the efficiency of the car in converting gas energy into work.
I suspect you have not accounted for the work climbing hills either.
Work is not the absolute value of power... You appear to be working in averages when you need to add up each leg.
 
  • #3
Most people just read the number of gallons off the pump display to find the amount of fuel their car has used.

Unless you have taken a sample of gas and burned it and measured the heat given off, you can't be sure that you'll have the same number of joules in each gallon. Remember, winter run gasoline has a higher mix of more volatile components than summer run gasoline, in order to ensure that cars will start when it gets cold. Now, with ethanol being added to gasoline, there's another complication to figuring the heat content of the fuel.
 
  • #4
SteamKing said:
Most people just read the number of gallons off the pump display to find the amount of fuel their car has used.

Unless you have taken a sample of gas and burned it and measured the heat given off, you can't be sure that you'll have the same number of joules in each gallon. Remember, winter run gasoline has a higher mix of more volatile components than summer run gasoline, in order to ensure that cars will start when it gets cold. Now, with ethanol being added to gasoline, there's another complication to figuring the heat content of the fuel.

i mean i thought that 132,000,000 was a good amount. Unless that number would change dramticly it would not get your percent error very low. But i understand what you are saying though. i do not have that ability anyway for this project.
 
  • #5
Simon Bridge said:
You have not accounted for the efficiency of the car in converting gas energy into work.
I suspect you have not accounted for the work climbing hills either.
Work is not the absolute value of power... You appear to be working in averages when you need to add up each leg.

i found the work by taking the integral of power and time. That is correct that is an average of 3 trips 33 miles each. It helped to lower my percent error to combine them. I would really like to look at them in 3 different trips. I thought by using the alt and vz it would account for that. How would you account for the converting of gas. I just make the assumption of 10% was all that was used of the gas
 
  • #6
Can you explain how you calculate the power? How do you incorporate rolling resistance and drag?
 
  • #7
It's not clear how you are measuring the power generated by the car's engine.

It seems like you are trying to use the most complicated method possible to measure fuel efficiency, when you are not making some dubious assumptions.
 
  • #8
SteamKing said:
It's not clear how you are measuring the power generated by the car's engine.

It seems like you are trying to use the most complicated method possible to measure fuel efficiency, when you are not making some dubious assumptions.

so i recored the gps location of me in t,x,y,z (seconds,easting,northing,alt)

which gave me all my data points
1. time - from GPS
2. x - from GPS
3. y -from GPS
4. z - from GPs
5. vx - derivative of x by time
6. vy - derivative of y by time
7. vz - derivative of z by time
8. speed - sqrt(vx^2 + vy^2 + vz^2)
9. acceleration - derivative of speed by time
10. net force - (mass) times (a) ------ i weighted my car
11. power - (net force) times (speed)
12. abs of power - absoultue value of power
13. work - integral of work by time
14. gallons used by the car for the motion - (work)/ 132,000,000

gives me a value and i times it by .10 since the eff of the car motor.
gives me the gallons used by the car

That was my thinking becasue the assignment was to use GPS to calcuate the mpg of the car compared to what you get at the pump
 
  • #9
thinkcentre12 said:
10. net force - (mass) times (a) ------ i weighted my car
What about the force required to overcome gravity? Of course, if your start and end points are at the same altitude then this will cancel out.
You are also omitting thrust required to overcome drag and rolling resistance.
thinkcentre12 said:
11. power - (net force) times (speed)
Force and velocity are vectors. In terms of those vectors, how do you calculate power?
What about energy lost when braking?
 
  • #10
haruspex said:
What about the force required to overcome gravity? Of course, if your start and end points are at the same altitude then this will cancel out.
You are also omitting thrust required to overcome drag and rolling resistance.

Force and velocity are vectors. In terms of those vectors, how do you calculate power?
What about energy lost when braking?

My start and end poinst are of the same place.

I guess i am i was not really sure how to factor all of those into my calculations. Those 14 bullet points are the equations i used in my data to get the final number. I just calcuated power with the integral like i said above
 
  • #11
thinkcentre12 said:
I guess i am i was not really sure how to factor all of those into my calculations. Those 14 bullet points are the equations i used in my data to get the final number. I just calcuated power with the integral like i said above
You could calibrate drag and rolling resistance losses by some experiments. You'd need to determine consumption on a level road for a few different speeds. Or maybe compare speed up a known incline with speed on the flat at the same accelerator position.
For braking, you could at least discard all negative values of power.

You did not answer this question:
haruspex said:
Force and velocity are vectors. In terms of those vectors, how do you calculate power?
 
  • #12
Most people would just use the GPS to check the mileage reading from the car's odometer.

After you collect all this data and do all these calculations, the final result depends, in part, on a figure of 10% for the efficiency of the engine? It seems like this number is just, ahem, assumed without any other justification.
 
  • #13
SteamKing said:
Most people would just use the GPS to check the mileage reading from the car's odometer.

After you collect all this data and do all these calculations, the final result depends, in part, on a figure of 10% for the efficiency of the engine? It seems like this number is just, ahem, assumed without any other justification.

That is correct. If my efficiency was less than 10, then my numbers would line up a lot better. But i highly doubt that would be the case since most engienes are higher than 10%. I tried googling about the engiene to see if i could find a percent but no luck.
 
  • #14
haruspex said:
What about the force required to overcome gravity? Of course, if your start and end points are at the same altitude then this will cancel out.
Do you mean "work"? Would that be the case for a car driven by an internal combustion engine?
The engine has to consume more fuel going up hills, and still consumes fuel going down hills (unless the engine is switched off). The driver dissipates GPE (mainly) by applying friction breaks so you don't get the energy used to climb a hill back when you go down the hill.
Unless I've forgotten something ;)

Also, a car will consume gas as long as the engine is on - even if it is stationary.

thinkcenter said:
That is correct. If my efficiency was less than 10, then my numbers would line up a lot better. But i highly doubt that would be the case since most engienes are higher than 10%. I tried googling about the engiene to see if i could find a percent but no luck.
Wikipedia may not be an authorative source, but it's better than guessing: http://en.wikipedia.org/wiki/Engine_efficiency#Gasoline_.28petrol.29_engines
... also pay attention to what it says about where the energy goes.

However - your car is not operating at peak efficiency at all times. For instance, at idle (say, waiting at an intersection) the engine is operating at 0% efficiency. If you switch the engine off at the top of a hill and coast down, the (fuel) efficiency is infinite.

You mostly use energy when the car is accelerating (cornering and climbing hills counts as acceleration as well as just speeding up).
Accelerating with a full tank, passengers, and/or cargo costs more than without. Accessories also use energy which gets you a lower mpg.
Did you try taking a flat straight route that had very few intersections and light traffic, no additional weight, as many electrical devices as possible switched off?

I'm with Steamking on this one - what is the purpose of taking this approach to the calculation?
If you just want an idea of real-world fuel efficiencies for your vehicle, then just take the distance traveled divided by fuel consumed - and average over many typical trips. You can compare this figure with the fuel efficiency generated by some theory if you like.
 
  • #15
Simon Bridge said:
Do you mean "work"? Would that be the case for a car driven by an internal combustion engine?
The engine has to consume more fuel going up hills, and still consumes fuel going down hills (unless the engine is switched off). The driver dissipates GPE (mainly) by applying friction breaks so you don't get the energy used to climb a hill back when you go down the hill.
Unless I've forgotten something ;)

Also, a car will consume gas as long as the engine is on - even if it is stationary.Wikipedia may not be an authorative source, but it's better than guessing: http://en.wikipedia.org/wiki/Engine_efficiency#Gasoline_.28petrol.29_engines
... also pay attention to what it says about where the energy goes.

However - your car is not operating at peak efficiency at all times. For instance, at idle (say, waiting at an intersection) the engine is operating at 0% efficiency. If you switch the engine off at the top of a hill and coast down, the (fuel) efficiency is infinite.

You mostly use energy when the car is accelerating (cornering and climbing hills counts as acceleration as well as just speeding up).
Accelerating with a full tank, passengers, and/or cargo costs more than without. Accessories also use energy which gets you a lower mpg.
Did you try taking a flat straight route that had very few intersections and light traffic, no additional weight, as many electrical devices as possible switched off?

I'm with Steamking on this one - what is the purpose of taking this approach to the calculation?
If you just want an idea of real-world fuel efficiencies for your vehicle, then just take the distance traveled divided by fuel consumed - and average over many typical trips. You can compare this figure with the fuel efficiency generated by some theory if you like.

So it is work by the engine calcuated?

The highway i used was complete flat and drove at 70 mph for about 32 of the 33 miles. That is true i see what your saying the GPS does not have the ability to show some of these features. The reason for this approach was for school. We were assigned to calcuate the gallons used in a car with gps and compare that amount to the gas put in the car after the trip.
 
  • #16
So it is work by the engine calculated?
... I don't think you can use external measurements to calculate the work done by the engine - the best you can hope for is the work done on the car to get it from start to finish. The energy from the engine does things other than getting the car from start to finish... to make a completely theoretical prediction with any accuracy you need to know the details about how energy is used throughout the car.

We were assigned to calcuate the gallons used in a car with gps and compare that amount to the gas put in the car after the trip.
Would this be secondary school?


Assuming "yes", then you may be overthinking the assignment.
In your calculation - state the assumptions you made and on what basis you made them: i.e. don't make guesses.
In your conclusion, just state how well (or poorly) the calculated result compares with the actual result.
Discuss how your assumptions may have contributed to this state of affairs.
Project done.

Bonus marks: propose some way to make better assumpions: i.e. measure the energy per gallon instead of using an average figure.
 
  • #17
Simon Bridge said:
... I don't think you can use external measurements to calculate the work done by the engine - the best you can hope for is the work done on the car to get it from start to finish. The energy from the engine does things other than getting the car from start to finish... to make a completely theoretical prediction with any accuracy you need to know the details about how energy is used throughout the car.Would this be secondary school?

Assuming "yes", then you may be overthinking the assignment.
In your calculation - state the assumptions you made and on what basis you made them: i.e. don't make guesses.
In your conclusion, just state how well (or poorly) the calculated result compares with the actual result.
Discuss how your assumptions may have contributed to this state of affairs.
Project done.

Bonus marks: propose some way to make better assumpions: i.e. measure the energy per gallon instead of using an average figure.

Is this is. It is for a PHYS class. Yeah that is true maybe you are right. Thats the way i was leaning towards since i cannot get the correct data. Just explain in my project why i think my percent error was so high and things i can do to lowwer the percent error. I just figured my answers would atleast be in the 15-20% range atleast i was hoping i could get an anwer close.

Thanks for the help everyonce
 
  • #18
why i think my percent error was so high
... you mean you did a lot of runs over the same course, worked out the fuel efficeincy ver each run, and discovered the fuel efficiency results had a large variance? Or that the theoretical mpg was farther from the actual one than you expected?

I just figured my answers would atleast be in the 15-20% range at least i was hoping i could get an anwer close.
... which answer? and close to what?
Part of learning science is learning to communicate clearly.
 
  • #19
Simon Bridge said:
... you mean you did a lot of runs over the same course, worked out the fuel efficeincy ver each run, and discovered the fuel efficiency results had a large variance? Or that the theoretical mpg was farther from the actual one than you expected?

... which answer? and close to what?
Part of learning science is learning to communicate clearly.
That is true that sounds very good.
My gallons calculated compared to the gas i put into the car at the pump. i wanted the percent error between them to be smaller but i ended up with like 55% error instead.
 
  • #20
OK - what you are calling the error is the percentage difference or discrepancy between theory and reality.
The word "error" has a special meaning in science.

If C is calculated fuel use, and A is actual fuel use; and guessing that A > C...

... the percentage difference is: PD=100x(A-C)/A = 55%
... which suggests that you actually used abut twice the fuel expected from the calculation.


There would also be a statistical uncertainty on this figure ... but you probably have not got that far yet.
It may be that your calculation method multiplies the statistic errors in the measurements that much, I cannot tell from here.
 
  • #21
Simon Bridge said:
Do you mean "work"? Would that be the case for a car driven by an internal combustion engine?
I was merely saying that the work done against gravity calculated by the obvious formula would cancel out. I mentioned braking etc. elsewhere.
 
  • #22
I was merely saying that the work done against gravity calculated by the obvious formula would cancel out. I mentioned braking etc. elsewhere.
Fair enough ... looks like the course was not all that hilly anyway.
 
  • #23
Simon Bridge said:
OK - what you are calling the error is the percentage difference or discrepancy between theory and reality.
The word "error" has a special meaning in science.

If C is calculated fuel use, and A is actual fuel use; and guessing that A > C...

... the percentage difference is: PD=100x(A-C)/A = 55%
... which suggests that you actually used abut twice the fuel expected from the calculation.


There would also be a statistical uncertainty on this figure ... but you probably have not got that far yet.
It may be that your calculation method multiplies the statistic errors in the measurements that much, I cannot tell from here.
Yes that is correct. 'A' would be the total amount of fuel used by the car and 'C' would be the amount of fuel used by the car for actual work. But if you figure your car's motor is 10% efficient then you can divide the fuel used by the car by .1 to get the total amount of fuel put into the car. Which you are comparing that to the amount of gas a person puts into there car.

For example my trip 1 was
- 0.125 was the amount of gas used by the car
-1.125 was the toal amount of gas that should have been used
-1.566 was the amount that i put into my car after the trip

If you take the calcuate amount as experimental and the amount you put into your car you get 28.16% and if you switch the vales you get 39.2% depending on which way you want to calcuate the error.

The 55% came from the average of 3 trips
 
  • #24
[QUOTE="thinkcentre12, post: 4921564, member: 515205"I just calcuated power with the integral like i said above[/QUOTE]
When the car rounds a bend at steady speed, which way is the acceleration? Will your force calculation come up with a corresponding force for that? How does that direction relate to the direction of travel? What power is needed to round the bend at constant speed?
 
  • #25
haruspex said:
[QUOTE="thinkcentre12, post: 4921564, member: 515205"I just calcuated power with the integral like i said above
When the car rounds a bend at steady speed, which way is the acceleration? Will your force calculation come up with a corresponding force for that? How does that direction relate to the direction of travel? What power is needed to round the bend at constant speed?[/QUOTE]Im not sure if it does not. I just have a GPS and every second it takes my position according to my utm zone
 
  • #26
thinkcentre12 said:
Im not sure if it does not. I just have a GPS and every second it takes my position according to my utm zone
Sorry, I should have checked exactly what you posted:
8. speed - sqrt(vx^2 + vy^2 + vz^2)
9. acceleration - derivative of speed by time​
If that's how you're calculating acceleration then your power calculation is OK. Normally acceleration is a vector, defined as the second derivative of the position vector. With that definition you would need to take the dot product with the velocity vector to get the power.
 
  • #27
haruspex said:
Sorry, I should have checked exactly what you posted:
8. speed - sqrt(vx^2 + vy^2 + vz^2)
9. acceleration - derivative of speed by time​
If that's how you're calculating acceleration then your power calculation is OK. Normally acceleration is a vector, defined as the second derivative of the position vector. With that definition you would need to take the dot product with the velocity vector to get the power.

Its ok.
Oh ok that's great atleast i got that part right. I see what you are saying
 
  • #28
It doesn't seem to me that anyone has succinctly said the correct answer here: What you are trying to do isn't just difficult, it is impossible. Most of your engine's energy is used overcoming friction and the method you are using can't detect that energy. That's why even using an absurdly low efficiency you are still getting an answer that is way low.
 
  • #29
russ_watters said:
It doesn't seem to me that anyone has succinctly said the correct answer here: What you are trying to do isn't just difficult, it is impossible. Most of your engine's energy is used overcoming friction and the method you are using can't detect that energy. That's why even using an absurdly low efficiency you are still getting an answer that is way low.

Atleast i got an answer hah. Thanks you.
i guess i should re think my project. Makes sense
 
  • #30
If I was running at a constant speed would any of those 14 equations change? (The equations previous listed). I ran three more trips in traffic and that seemed to really help my percent error.
 
  • #31
Any thoughts?
 
  • #32
thinkcentre12 said:
If I was running at a constant speed would any of those 14 equations change? (The equations previous listed). I ran three more trips in traffic and that seemed to really help my percent error.
It won't change the equations, except that some simplifications may be possible. Mainly it may remove some of the effects which your equations are not allowing for (like braking, varying drag).
 

1. How does using GPS data improve MPG calculation?

Using GPS data allows for more accurate tracking of a vehicle's location and speed, which is crucial for calculating MPG. Traditional methods of MPG calculation rely on estimations and assumptions, whereas GPS data provides real-time and precise information.

2. Can any GPS device be used for this purpose?

No, not all GPS devices are suitable for improving MPG calculation. The device must be able to accurately track the vehicle's speed and location, and have the capability to store and transfer data. It is recommended to use a GPS device specifically designed for this purpose.

3. Is there a specific formula to calculate MPG using GPS data?

Yes, there is a specific formula that takes into account the distance traveled and the amount of fuel consumed. The formula is: MPG = Distance Traveled / Fuel Consumed. However, this formula can be modified based on the type of vehicle and other factors.

4. Are there any limitations to using GPS data for MPG calculation?

Yes, there are some limitations to consider. GPS data may not be accurate if there are signal disruptions or if the device is not properly calibrated. Additionally, factors such as traffic, weather, and road conditions can also affect the accuracy of MPG calculation.

5. How can using GPS data for MPG calculation benefit drivers?

Using GPS data can benefit drivers in several ways. It allows for more accurate tracking of fuel consumption, which can help drivers save money on gas. It also provides insights on driving habits and can help identify areas for improvement in order to increase fuel efficiency. Additionally, using GPS data can also help with vehicle maintenance by tracking mileage and identifying potential issues early on.

Similar threads

Replies
4
Views
4K
  • Electrical Engineering
Replies
1
Views
1K
  • Mechanical Engineering
Replies
9
Views
2K
Replies
1
Views
930
Replies
19
Views
1K
  • Programming and Computer Science
Replies
3
Views
2K
Replies
2
Views
884
  • Programming and Computer Science
Replies
5
Views
3K
  • Introductory Physics Homework Help
Replies
4
Views
2K
  • Introductory Physics Homework Help
Replies
6
Views
2K
Back
Top