I am trying to use my accelerometer on my mobile device fitness band to find the speed of walking and running.

I conducted my experiment of walking and running on treadmill where I asked a person to walk and run on the same speed. ( Speed was 3 km/hour )

I created a model to find the speed using numerical integration method. ( I used trapezoid method of integration). But the model is not correctly predicting the result. Even the walking speed is very different from the running speed.

The data returned from the accelerometer is in m/s2. I am getting acceleration data of X,Y and Z axis.

It would be grateful if some can help me out or can tell me a model to find velocity from acceleration data. My device records the signal at 50 Hz frequency.

  • $\begingroup$ Numerical integration via the trapezoid method should be fine; it's probable that there's some error in your implementation. Please note that Physics SE deals with conceptual questions, and does not help with debugging code. $\endgroup$ – GodotMisogi Jan 29 '19 at 6:41
  • $\begingroup$ @GodotMisogi, by chance it actually is a conceptual question, because there are two conceptual issues with it. $\endgroup$ – Jan Hudec Jan 29 '19 at 7:10
  1. To do proper dead reckoning, you need accelerometer and gyroscope, because besides moving, the device also rotates and you need to be able to map the device coordinates to the world coordinates to integrate the velocity.
    • Besides, on a threadmill it is the threadmill, and not the device, that is moving relative to the initial condition, so you should get 0 average speed anyway.
    • This is commonly done in aircraft, see inertial navigation system. Those have better gyroscopes and accelerometers, but I recall seeing a white-paper about somebody trying with a mobile and getting useful results, so with the higher end devices it should be possible.
    • You should probably cross-correlate with GPS to compensate for the drift. Of course on threadmill that is going to show 0 as well.
  2. Or you could do estimate based on the fact that humans tend to swing their hands in each step by correlating the frequency and amplitude of the acceleration peaks to the velocity. But you have to experimentally match it for each person, because everybody has different length of step and moves their hands with different force. In this case you won't be integrating anything, just finding some frequency in the data (using Fourier transform, probably) and creating a table of frequency and peak amplitude to walking or running speed.
| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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