# Homework Help: Calculate MPG with GPS

Tags:
1. Nov 22, 2014

### thinkcentre12

1. The problem statement, all variables and given/known data
What i am trying to do is calcuate the miles used in my car driven a certain distance.

2. Relevant 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 alot 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.

3. 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.

2. Nov 22, 2014

### Simon Bridge

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. Nov 22, 2014

### SteamKing

Staff Emeritus
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. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### haruspex

Can you explain how you calculate the power? How do you incorporate rolling resistance and drag?

7. Nov 22, 2014

### SteamKing

Staff Emeritus
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. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### haruspex

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?

10. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### haruspex

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:

12. Nov 22, 2014

### SteamKing

Staff Emeritus
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. Nov 22, 2014

### thinkcentre12

That is correct. If my efficiency was less than 10, then my numbers would line up alot 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. Nov 22, 2014

### Simon Bridge

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.

15. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### Simon Bridge

... 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.

17. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### Simon Bridge

... 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.

19. Nov 22, 2014

### thinkcentre12

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. Nov 22, 2014

### Simon Bridge

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.