0
$\begingroup$

I'm writing a smart phone app and one of it's functions is to calculate power of the vehicle that the phone is travelling in. The user enters the total weight of the vehicle and the app uses the accelerometer to get the acceleration rate and the GPS to get the velocity. My working out is below but I'm getting some odd results but I think its a code problem not a power calculation problem. Can some one tell me if the my formula is correct?

a = accelerometerReading; // In m/s/s

F = (m * a)/1000; // F (kN) = m (kg) * a (m/s/s)

P = F * v; // P (kW) = F (kN) * v (m/s)

I tested the app in a Hyundai Accent which should weight approx. 1220kg's and have about 55kw of power at the wheels. I have a known maximum acceleration of 6.7m/s/s, correct me if I'm wrong but i assume maximum acceleration wouldn't necessarily coincide with maximum power however I have made that assumption in the working out below? If I input some of the knowns and guess the velocity at time of maximum power it seems to calculate correctly but my app is spitting out 171kW which is clearly wrong.

m 1220 kg

a 6.762 m/s/s

F = (1220 * 6.762) / 1000 = 8.24964kN

v 6.7 m/s

P = 8.24964 * 6.7 = 55.272588kW

$\endgroup$
1
  • $\begingroup$ Your acceleration 6.7 m/s/s means you accelerate from 0 to 60 mph in 4 seconds. The 171 kW seems about right. Someone swapped your cars engine without you noticing :-) $\endgroup$
    – gnasher729
    Commented Jun 14, 2016 at 21:21

1 Answer 1

0
$\begingroup$

The acceleration seems quite high - but assuming it is correct, you need to take into account that your velocity keeps increasing.

The force might be constant at 8.2 kN (please, drop the extra digits. You are estimating the mass of the car: do you know how much the passengers weigh?) but as the velocity changes (from acceleration) so will the power.

In reality the acceleration will drop as the power increases, and also the air drag will become significant as the car picks up speed. This means you need to calculate the instantaneous velocity (integrate acceleration, or get it from the GPS chip; in fact on most devices there is a function to calculate velocity that will combine inputs from accelerometer and GPS automatically: if you have that, use it).

The total force at a given time is

$$F = m\cdot a + \frac12 \rho v^2 A C_D$$

where $m$ = mass of car plus passengers / cargo, $a$ = acceleration, $\rho$ is density of the air (about 1.2 kg/m$^3$), $A$ is the projected area of the car, and $C_D$ is the drag factor. According to this site, the product $A\;C_D$ for the Hyundai Accent is 6.35 feet$^2$ or 0.59 m$^2$.

Power is force times velocity, so finally if you have acceleration and velocity, you get power from

$$P = v\left(1220 a + 0.25 v^2\right)$$

As you can see, the drag term becomes much more important as velocity goes up. You can also see from this formula how a car (with finite power engine) cannot accelerate so fast when it has higher speed - not only does drag create a force, but the power needed scales with velocity and force.

Incidentally, the Hyundai Accent has a rated power of 138 HP, or 103 kW. Looking at this movie it gets from 0 - 60 mph in about 7 seconds for an average acceleration of 3.8 m/s$^2$ - much more at the beginning when speed is slower, and less at the end. You can probably look at that clip frame-by-frame to get the speed/time curve and do the math more carefully.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.