Fuelly Forums

Fuelly Forums (https://www.fuelly.com/forums/)
-   Experiments, Modifications and DIY (https://www.fuelly.com/forums/f9/)
-   -   Coast Down Derivation (https://www.fuelly.com/forums/f9/coast-down-derivation-11114.html)

GasSavers_maximilian 04-15-2009 12:29 PM

Coast Down Derivation
 
Having looked at a few coast down calculators I am generally unsatisfied with them so I am going to create my own. I will make two versions: one that assumes a level surface, and the other that assumes a constant grade. Please feel free to sanity check me.

First, I'll derive the one for a level surface.

I'm going to start with the road load power formula, which I snagged a description of:

A*v + B*v^2 + C*v^3

The A component comes mostly from the rolling resistance of the tires, and friction in the car's components, like drag from the brake pads, or friction in the wheel bearings.

The B component also comes from friction in components, and from the rolling resistance in the tires. But it also comes from the power used by the various pumps in the car.

The C component comes mostly from things that affect aerodynamic drag like the frontal area, drag coefficient and density of the air.


Instantaneous power equals force times the velocity, or:

P(t) = F(t)*v(t)

-(A*v + B*v^2 + C*v^3) = F*v

-(A + B*v + C*v^2) = F

Since F=m*a, we get:

-(A + B*v + C*v^2) = m*a

a = -(A + B*v + C*v^2)/m

since a = dv/dt we get a differential equation, but the integrals involved are very messy so a numeric solution is easier (I'll spare you the differential equation formulas).

Now I'll account for a constant grade.

Potential energy = m*g*h, where h is the height

Defining a constant s such that s*(distance traveled along the hill) = (vertical distance change), we can show the rate of PE change as:

m*g*s*v

Note that s is unitless, being distance / distance.

Now adding this to the road load power and reusing our previous reasoning:

-(A*v + B*v^2 + C*v^3) + m*g*s*v = F*v

-(A + B*v + C*v^2) + m*g*s = F

F = m*a

-(A + B*v + C*v^2) + m*g*s = m*a

a = -(A + B*v + C*v^2)/m + g*s

Since the hill's effect would be lumped in with the A parameter, we need to perform coast down runs both uphill and downhill on the same stretch. The difference can tell us what value s has.

Uphill:

a = -(A + B*v + C*v^2)/m - g*s

Downhill:

a = -(A + B*v + C*v^2)/m + g*s

Assuming nobody finds any errors in this derivation, I'll produce the formulas needed to numerically solve for A, B, C, and s. Once those are calculated, they can be used to estimate other desired parameters.

theholycow 04-15-2009 03:43 PM

That's beyond me, or at least beyond my current level of energy and attention span. However, I would recommend "Fundamentals of Vehicle Dynamics" by Thomas Gillespie, as recently recommended to me by another user here. ISBN 1560911999. It's got exactly that kind of discussion in it.

GasSavers_maximilian 04-15-2009 04:41 PM

Great! I'll see if my library can get it via interlibrary loan. Thanks.

GasSavers_maximilian 04-16-2009 12:54 AM

So much for requiring two versions: if the hill's effects are mixed in with the A parameter, then analyzing up and downhill runs separately will lead to the following:

Auh = A + g*s*m
Adh = A - g*s*m

Not very hard to obtain s or A.

A = .5*(Auh + Adh)
s = .5*(Auh - Adh)/(g*m)

Notice that if all you care about is eliminating the hill's effects then averaging the A values for uphill and downhill does the trick. Well, for a constant slope anyway. I think it may be possible to account for variable slopes, but much more accurate position and speed data would be required, with switch cables or light beams capturing the information. I don't think I'm willing to go to quite that length. Maybe stopwatches I crush? Sure would suck if another car came along!

More seriously, I should check to see if that level stretch is a passing zone. If so, I can use the dashed passing line for timing just by having a downward facing camera. Have to measure it, but that's a one time cost no matter how many times I want to rerun the coast down test. Then just a special mark for starting in both directions would be needed. It would also allow me to precisely calibrate my speedometer.

GasSavers_maximilian 04-18-2009 09:19 AM

Quote:

Originally Posted by theholycow (Post 132695)
I would recommend "Fundamentals of Vehicle Dynamics" by Thomas Gillespie, as recently recommended to me by another user here. ISBN 1560911999.

Ordered that text via inter-library loan today. Since my local library's not computerized at all who knows how long it'll take to show (assuming they even have it someplace).

I also wrote a simulator to generate highly accurate test data. Since I didn't know what time step was sufficient, I just kept decreasing it until the data didn't change any longer. Common trick. Now I can develop my analysis routines by testing on that sample data. I'm sure the constants I chose have no relationship to the real parameter values (I literally made them up), but all that matters mathematically is that I can separate out the first, second, and third order effects accurately. Once that's working, I'll add noise to the data to test robustness. I'm not going to use Excel, since a custom program is so much more powerful and quicker to develop.

B.E.E.F. made the great suggestion I use GPS for my speed/time data, but some research revealed that GPS accuracy can vary quite a bit (especially on the cheap GPS I'd use). Such errors will often cancel out over a long time, but I'm concerned about it over relatively short coast downs. Some testing versus my speedometer should settle that question accurately enough.

Lug_Nut 04-18-2009 11:03 AM

Max, What are you trying to do, mathematics, or simply determining a difference in rolling resistance?
I have a simple (hopefully you won't think it 'simplistic') means of comparing two or more changes to produce a Crr percentage change.
If you want to guess at how many grams or rolling resistance drag your formulas provide, be my guest. GI,GO.
But If you want to know if you're improving, or losing, Crr with a specific change, and by what percentage, I agree: Simplify.

Complicating the simple requires an idiot savant, emphasis not on savant.

GasSavers_maximilian 04-18-2009 11:18 AM

My car coasts worse than my previous ones so I want to compute all the losses at the different powers of velocity. I looked at some of the available tools people use and wasn't satisfied with some of the methodological assumptions. It is possible that the errors are swamped by measurement imprecision and that's why they don't sweat them. Pulling out specific constants like Crr or Cd can come later.

I also love math, so this is fun. :)

GasSavers_maximilian 04-18-2009 03:18 PM

Just did some testing with some real data, and it's what I feared: there isn't enough information to distinguish between effects acting at v^3 and v^2. You can get a lot of acceptable data fits with wide ranges of values. The tool I took the data from had a worse fit than several I found with quite different parameters. Doh! It ignores losses proportional to v^2, but the docs don't go into any detail why, which is a big reason I wanted to explore it myself in the first place. In general using things blindly bothers me.

Should be easy to account for, but it'll take actual knowledge of typical values since I'll need to restrict the program to considering probable cases. Or I could try and get more and better data (a good idea in general). Good news is there was a copy of that book in VT (a single copy) so I should have it next week sometime.

Update:

I tried some very coarse limits on parameter ranges and was able to detect v^2 effect magnitudes in the real data. It is indeed quite small. Be instructive to see the theoretical reasons proportional losses beat squared losses so much. Since I don't have a definite culprit for my Accent's worse coasting and it's not an overwhelmingly large difference I really want to preserve any subtleties in the data.

GasSavers_maximilian 04-25-2009 06:29 AM

Theoretical Error Analysis
 
Because I wrote a program to analyze the data, it's very easy to tweak things a bit to try out lots of scenarios. I've therefore been able to see what impact errors in the input data would have on the estimates for Cd and Crr. All the data was from a single coast down test I found online, but as I'm only looking for trends that should suffice.

Linear Approximation of Crr:

The good news is that while Crr does have some v^2 component, this only starts to matter at high speed. Since coast down tests generally don't spend very much time going quickly, neglecting it is a reasonable approximation, especially if relative measures are what you're interested in. For the test data I found online excluding v^2 raises Crr and Cd each by less than half a percent, which should be less than measurement errors. For my own test I want to preserve v^2 effects as I'm looking for insight into the coasting performance and some mechanical losses also appear there.

Effect of Errors in Mass Estimate:

Errors in the value of vehicle mass correspond pretty linearly to final estimates of Crr and Cd in the range of likely error.

https://www.fuelly.com/attachments/fo...a4cf023b51.jpg


Effect of Errors in Speedometer:

Speedometer errors within the likely range lead to roughly linear increases in Crr and to inverse linear declines in Cd.

https://www.fuelly.com/attachments/fo...004e26c2a8.jpg


Simulation Time Step Effect:


One coast down analysis spreadsheet I examined used a simulation time step of five seconds, which seemed extraordinarily long so I explored its impact on the simulation results. Here is a plot of velocity over time with differing size time steps. All of the curves have been normalized against the profile generated by a time step of one millisecond (the value I use). Time steps smaller than that lead to no effective changes in output and even the change from .01 to .001 resulted in no real difference, but processing power is cheap! You can see that larger time steps lead to speed falling off too quickly.

https://www.fuelly.com/attachments/fo...aa1a5a3f56.jpg

This chart of the simulation deceleration versus time shows what's going on here. The smaller the time step, the more responsive the simulation is to the reduction in resistance with speed.

https://www.fuelly.com/attachments/fo...a94d7ad3dc.jpg

I then determined the net effect of these simulation output changes on parameter estimates. Since Crr is assumed to be linear with speed it is reasonably insensitive to the choice of time step. Cd can be effected significantly, however, as the level of deceleration at high speed is maintained longer during the simulation. The time step should not really be more than .1 second, with .01 being preferable. In theory one could have a variable time step, with larger values at lower velocities, but this seems an unnecessary complication given the power of modern processors.

https://www.fuelly.com/attachments/fo...2b32966d68.jpg


Effect of Errors in Grade Measurement:

Unfortunately there wasn't much I could do about this. If the grade is constant, errors will average out if coast down tests are performed in both directions. If it's variable, then deciding on a meaningful scenario isn't straightforward. Once I get incline data on my test run I can determine how neglecting it would've effected the results.

GasSavers_maximilian 04-27-2009 01:39 AM

My next step (while waiting for the Kiwi MPG) is to extend my routines to compute the range of parameter values that fit the data to within a given acceptable error limit. The best fit is all well and good, but having some idea of the likely bounds will really help keep things grounded. This could finally start to push the performance angle. So far a brute force hill climb with little optimization has done the trick. Of course I don't want to spend too much time on it, since it wouldn't really matter if the program took even an hour or two to run.

Once, in college, I needed a program to analyze the results from a lab test we performed, and since it was a one time run, I tried not to put much effort into writing it. After half an hour I started to get impatient and did a back of the envelope estimate on how long it would take: 20 years! I stopped it and spent a few more minutes speeding it up and it reran in twenty minutes.


All times are GMT -8. The time now is 07:26 AM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.