# Thread: Calculating Cd and Crr coefficient experimentally

1. ## Calculating Cd and Crr coefficient experimentally

On this site I found how to calculate Cd and Crr coefficient from experimantal data:
Measure the drag coefficient of your car

I am trying to implement it in a web page and in a smartphone application, so I must "replace" Excel Solver by an algorithm, but I'm very in trouble.
I figured out how to calculate coefficients of fitting polynomial, so I now have the equation which approximates the speed curve, in form of (1) y = ax^2+bx+c

But now how do I correlate this equation to real data to obtain Cd and Crr?

The excel sheet relies on this formula:
v1 = v0 - a*t
where:
a = F/m
and
F = air drag + roll friction
air drag = 0.5 * r *A * Cd * v^2
roll friction = m * g * Crr

so I think it is:

v1 = v0 - 0.5 * r * A * Cd * v0^2 / m - g * Crr

if this is correct, I can "zip" it to:

(2) v1 = v0 + K v0^2 + H

and

K v0^2 + H = v1-v0

My idea is to use the next sample to build an equation couple which I can solve for K and H, and then get Cd and Crr from them... but it looks like it does not work, what am I doing wrong?

K v0^2 + H = v1-v0
K v1^2 + H = v2-v1

==> K, H ==> Cd, Crr

Any idea?

2. ## Re: Calculating Cd and Crr coefficient experimentally

Originally Posted by jumpjack
so I think it is:

v1 = v0 - 0.5 * r * A * Cd * v0^2 / m - g * Crr
You have left time out of the equation - it should be:

$\displaystyle v_1 = v_0 - \frac {\rho AC_dv_o^2t}{2m} - g C_{rr} t$

Note that I changed your "r" to $\displaystyle \rho$.

The rest looks fine. However, be aware that since air drag is a function of velocity, by using v_o^2 in the above you are making just an estimate of the actual drag that occurs as velocity changes from v_0 to v_1. Consequently the values for the constant that you calcuate will change with each set of data. One suggestion: instead of using v_0 in the drag formula use the average of v_0 and v_1. Also use small values of t so that the difference between v_0 and v_1 is minimized.

3. ## Re: Calculating Cd and Crr coefficient experimentally

Originally Posted by ebaines
be aware that since air drag is a function of velocity
Indeed this is what is driving me mad...

Anyway I didn't understand which method you are suggesting.

Does it exist a tool which allows performing symbolic calculation? It would be error-proof, unlike me...

4. ## Re: Calculating Cd and Crr coefficient experimentally

Originally Posted by jumpjack
Anyway I didn't understand which method you are suggesting.

Does it exist a tool which allows performing symbolic calculation? It would be error-proof, unlike me...
I thought you had a method already figured out. I assume you have a set of data: v_0, v_1, v_2, etc for times t_o, t_1, t_2, etc. You can set up two equations - one using v_0 and v_1 for t_0 and t_1, and the other using some other pair of velocities, such as v_7 and v_8 at t_7 and t_8 - and then solve for the two unknowns C_d and C_rr:

$\displaystyle K v_0^2 + H = \frac {v_0 -v_1}{t_0-t_1}$

$\displaystyle K v_7^2 + H = \frac {v_8-v_7}{t_8-t_7}$

To solve for K and H start by subtracting the 2nd equation from the first to get:

$\displaystyle \frac {v_0-v_1}{t_0-t_1 } - \frac {v_8-v_7}{t_8 -t_7} = K (v_0^2-v_7^2)$

From this you can determine the value of K, and hence C_d. To get the value of H substitute the known value of K into either of the two initial equations and solve for H, and from there determine C_rr.

5. ## Re: Calculating Cd and Crr coefficient experimentally

Originally Posted by ebaines
I thought you had a method already figured out. I assume you have a set of data: v_0, v_1, v_2, etc for times t_o, t_1, t_2, etc. You can set up two equations - one using v_0 and v_1 for t_0 and t_1, and the other using some other pair of velocities, such as v_7 and v_8 at t_7 and t_8 - and then solve for the two unknowns C_d and C_rr:

$\displaystyle K v_0^2 + H = \frac {v_0 -v_1}{t_0-t_1}$

$\displaystyle K v_7^2 + H = \frac {v_8-v_7}{t_8-t_7}$
As time intervals are constant and = 10, I included them in K and H, considering them like DeltaT rather than t. Maybe this is my mistake?? I thought the excel sheet considered DeltaT=10 rather than different valuse of t, but maybe I got it wrong.

(1) $\displaystyle v_1 = v_0 - at =$
(2) $\displaystyle v_0 - \frac{F}{m} t =$
(3) $\displaystyle v_0 - \frac{\frac{1}{2} \rho AC_dv_0^2 + m g C_r_r}{m} t$
(4) $\displaystyle v_0 - (\frac{1}{2} \frac{\rho AC_dv_0^2 }{m})t - gC_r_rt$

Different grouping:

(5) $\displaystyle v_1 = v_0 + (- \frac{1}{2}\frac{\rho AC_dt}{m})v_0^2 + ( - gC_r_rt)$

(6) $\displaystyle K = - \frac{1}{2} \frac{\rho AC_dt}{m}$

(7) $\displaystyle H = -gC_r_r t$

(8) $\displaystyle v_1 = v_0 + Kv_0^2 + H$

6. ## Re: Calculating Cd and Crr coefficient experimentally

Looks good. Let us know how it works out.

7. ## Re: Calculating Cd and Crr coefficient experimentally

It works out very bad, that's why I am here! :-(

But maybe Mathics can help me being sure about calculation steps...

8. ## Re: Calculating Cd and Crr coefficient experimentally

What you've done is correct. Tell you what - share some of your data - various v's at various t's - and your calculations of resulting C_d and C_rr and we'll see if we get the same values.

9. ## Re: Calculating Cd and Crr coefficient experimentally

Samples fot time 0, 10, 20,... 70 secs:
19,44
16,76
14,31
12,08
10,35
8,92
7,55
6,18

Excel Solver results:
Cd = 0,538210351
Crr = 0,01055849

My results:
0,373384937
0,016317342

My "alternative" results:
0,38092961
0,015870614

(sorry for commas but I use Italian version of Excel...)

10. ## Re: Calculating Cd and Crr coefficient experimentally

Couple of points:

1. First, what vaues are you using for rho, A and m?
2. Next, because of the built in uncertainty in your data, I find that calculations for both K and H vary wildly. This is because the data is not perfect - some variability is expected as the points don't all fit on a single curve thatfits your mathemtaical model. I find that depending on which points you pick the calculated value for K can vary from 0.00024 to 0.00085, and H can vary from -0.049 to -0.178, or by almost a factor of 4! So you now need to decide how to handle the variability in results - for example you can decide to average the results, which yields K = -0.00039 and H = 0.118, whihc gives a Crr of 0.012.
3. The consistency of your results will be improved greatly by taking data for many runs and averaging the results. I suggest using data from at least ten runs and see what happens.

11. ## Re: Calculating Cd and Crr coefficient experimentally

As I said in first post, I'm using data in excel sheets linked in this page:
Measure the drag coefficient of your car

http://www.iwilltry.org/b/wp-content...oefficient.xls

Data:
time V1 V2 V3 V4 V5 V6
sec kph kph kph kph kph kph
0 70 70 70 70 70 70
10 61 60 60 60 61 60
20 52 52 51 51 52 51
30 44 44 43 43 43 44
40 37 37 38 37 37 37,5
50 32 32 32,5 32
60 27 27,5 27
70 22 22,5

Constants:
rho 1,22 kg/m^3
g 9,81 m/s^2

I used several values for A and m; last run:

A 2,2 m^2
M 1500 kg

Results:

Cd: 0,53788
Crr: 0,01056

I also tried manual tuning of Cd and Crr, by visually looking at resulting chart for $y_1=y_0+Ky_0^2+H$ ; when I have the best fitting curve, I have:
Cd = 0,63
Crr = 0,00967

Results:
x y
0 19,3896 0%
10 16,7446 +1%
20 14,3596 +1%
30 12,2346 0%
40 10,3696 -1%
50 8,7646 -2%
60 7,4196 -1%
70 6,3346 +3%

12. ## Re: Calculating Cd and Crr coefficient experimentally

Sorry, results in last post are wrong, here are right results:
0 19,44 0%
10 16,36130078 -1%
20 13,90385368 -2%
30 11,86561391 -3%
40 10,12342241 -3%
50 8,597156386 -3%
60 7,231936874 -3%
70 5,988521019 -3%

The others were results for y=ax^2+bx+c with a=0,0013 , b=-0,2775 and c = 19,386 , repeated here:

0 19,3896 0%
10 16,7446 1%
20 14,3596 1%
30 12,2346 0%
40 10,3696 -1%
50 8,7646 -2%
60 7,4196 -1%
70 6,3346 3%