Integrating accelerometer data (obtain velocity and distance)

Click For Summary
SUMMARY

This discussion focuses on integrating accelerometer data to measure distance and velocity using a trapezoidal method for numerical integration. The user experiences challenges with noisy acceleration data and seeks advice on filtering techniques, specifically low-pass moving averages and filtering windows. Recommendations include using a Kalman filter for improved accuracy and calibrating sensors based on consistent results, such as the discrepancy between measured and actual distances. The conversation emphasizes the importance of understanding noise management and sensor calibration in achieving reliable measurements.

PREREQUISITES
  • Understanding of accelerometer data and its characteristics
  • Familiarity with numerical integration methods, specifically the trapezoidal method
  • Knowledge of filtering techniques, including low-pass moving averages and Kalman filters
  • Basic principles of sensor calibration and error analysis
NEXT STEPS
  • Research low-pass moving average filtering techniques for noisy data
  • Explore the implementation of Kalman filters for accelerometer data
  • Investigate sensor calibration methods to improve measurement accuracy
  • Learn about alternative numerical integration methods for better distance estimation
USEFUL FOR

Engineers, data scientists, and hobbyists working with accelerometers, as well as anyone interested in improving the accuracy of motion tracking and distance measurement in projects involving sensors.

SrTp
Messages
1
Reaction score
0
Hi everyone!

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 :smile:
 
Physics news on Phys.org
Your Integration is probably doing exactly what a moving average would do so I don't think that will help. If you consistently come put with 5.81 instead of 4.8 I would think that noise is not an issue, and would just use that run as a calibration for your sensors. Can you try different track lengths and see if the "error" is proportional?

A Kalman filter would be useful if you needed accurate instantaneous acceleration values, but since you are "averaging" them all together the individual reading errorss will tend to cancel each other out.
 

Similar threads

  • · Replies 47 ·
2
Replies
47
Views
5K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
11
Views
24K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
9K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 138 ·
5
Replies
138
Views
9K