I am designing a dynamometer app for a phone and am having trouble with the math.(adsbygoogle = window.adsbygoogle || []).push({});

The goal is to measure acceleration with the built-in accelerometer then calculate velocity, position, horsepower, etc. It's mostly working but I think I am messing up the units. I get plausible values for velocity and position. But power does not look right. I am filtering the acceleration to remove noise.

I need instantaneous values so they can be plotted over time.

I'm using...

accelerationG[n] = measured (Gs)

accelerationMss[n] = accelerationG[n]*9.8 ... in m/s^2

dt = sample time in s

I am numerically integrating values for...

velocity[n] = velocity[n-1] + (accelerationMss[n-1] + (accelerationMss[n] - accelerationMss[n-1])/2)*dt;

position[n] = position[n-1] + (velocity[n-1] + (velocity[n] - velocity[n-1])/2)*dt;

weight = 1500 ... kg

mass = weight/9.8 .. kg

force = mass*accelerationMss[n]

power = force*velocity[n] ... should be in KW?

In a simulation, I get plausible values for velocity and position but the power number seems very very large. I suspect I am messing up the units.

Can anyone please point out where?

Thanks

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculating Power from Acceleration

**Physics Forums | Science Articles, Homework Help, Discussion**