Integrating accelerometer data (obtain velocity and distance)

In summary, the speaker is looking for advice on working with an accelerometer to measure distances. They have tried using a moving average filter and a filtering window method, but are unsure of the best values to use for these filters. They are also considering using a Kalman filter, but are not confident in their ability to understand it. They are using a first order approximation - trapezoidal method for integration calculus, but are getting inconsistent results. They are open to trying different track lengths for calibration.
  • #1
SrTp
1
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
  • #2
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.
 

1. What is an accelerometer and how does it work?

An accelerometer is a device that measures acceleration, which is the rate of change of velocity. It typically consists of a mass attached to a spring that is able to measure the forces acting on the mass and convert them into an electrical signal. This signal can then be used to calculate the acceleration of the device.

2. Can an accelerometer be used to obtain velocity and distance?

Yes, an accelerometer can be used to obtain velocity and distance by integrating the acceleration data over time. This process involves summing up small changes in acceleration to determine the velocity, and then summing up the velocity to determine the distance traveled.

3. What are some potential applications of integrating accelerometer data?

Integrating accelerometer data can be used in a variety of applications, such as motion sensing in smartphones and video game controllers, measuring the impact of sports equipment, monitoring vibrations in structures, and tracking movements in fitness devices.

4. What are some challenges associated with integrating accelerometer data?

One of the main challenges with integrating accelerometer data is accounting for errors and noise in the data. This can be caused by factors such as sensor drift, external vibrations, and temperature changes. It is important to properly calibrate the accelerometer and use filtering techniques to reduce these errors.

5. Are there any other methods for obtaining velocity and distance besides integrating accelerometer data?

Yes, there are other methods for obtaining velocity and distance, such as using GPS or optical sensors. However, these methods may not be as accurate or applicable in all situations. Accelerometers are often preferred for their low cost, small size, and ability to measure acceleration in multiple directions.

Similar threads

Replies
4
Views
8K
Replies
4
Views
8K
  • Mechanics
Replies
8
Views
2K
Replies
14
Views
1K
Replies
2
Views
6K
  • Introductory Physics Homework Help
Replies
7
Views
2K
  • Mechanics
Replies
8
Views
4K
Back
Top