Hi everyone!(adsbygoogle = window.adsbygoogle || []).push({});

I'm trying to work with an accelerometer to measure distances (straight line) but I'm not being very successful..

I've made this experiment: attached the accelerometer to a electric slot car and accelerate it to the maximum until it reached the end of a straight line track with 4.8 meters long.

The sampling was made every 10 milliseconds.

In the end, it crashes into a pillow (:D) but I'm not considering those crash accelerations to the calculus.

The acceleration values are incredibly noisy...and my questions are:

- which initial filter should be applied to the noisy samples? a low pass moving average?

. how do I know which is the best number of samples to consider in the average? 2, 3, 4,..?

- after that I've read that we could apply something like a filtering window to discriminate between "valid" and "invalid/noisy" accelerations. If the acceleration values are in that window they should be changed to 0.0, indicating that there is no movement therefore no velocity and then the distance will not be incremented.

. so...once again, how can I determine the best values for that window? How can I be sure that I'm not excluding important values or including noise?

- I've also read about kalman filters but they might be too difficult for me to understand..I think.

For the integration calculus I'm using a first order approximation - trapezoidal method (hope I'm doing it well...). Btw, is this the best method or there are many others I should try?

With my trapezoidal method applied to raw data and without any filter I'm getting 5.81 meters. I've tried to apply the moving average filter but it doesn't seems to help.

For the filtering window method I'm not sure which values to apply so I'm not getting good results.

If needed I can post the accelerometer raw data...

Hope someone can help me!

Best regards

**Physics Forums - The Fusion of Science and Community**

# Integrating accelerometer data (obtain velocity and distance)

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Integrating accelerometer data (obtain velocity and distance)

Loading...

**Physics Forums - The Fusion of Science and Community**