Filtering Accelerometer Data Noise

Filtering accelerometer data noise

The samples from Apple's SDK actually implement the filtering in an even simpler way which is by using ramping:


//ramp-speed - play with this value until satisfied
const float kFilteringFactor = 0.1f;

//last result storage - keep definition outside of this function, eg. in wrapping object
float accel[3];

//acceleration.x,.y,.z is the input from the sensor

//result.x,.y,.z is the filtered result

//high-pass filter to eliminate gravity
accel[0] = acceleration.x * kFilteringFactor + accel[0] * (1.0f - kFilteringFactor);
accel[1] = acceleration.y * kFilteringFactor + accel[1] * (1.0f - kFilteringFactor);
accel[2] = acceleration.z * kFilteringFactor + accel[2] * (1.0f - kFilteringFactor);
result.x = acceleration.x - accel[0];
result.y = acceleration.y - accel[1];
result.z = acceleration.z - accel[2];

How to filter accelerometer data from noise

Here is how I've done it
http://levonp.blogspot.com/2010/10/how-to-filter-accelerometer-data-from.html

Trying to filter (tons of) noise from accelerometers and gyroscopes

The first thing i would do, would be to run a DFT on the sensor signal and see if there is actually a high and low frequency component of your accelerometer signals.

With a DFT you should be able to determine an optimum cutoff frequency of your lowpass/bandpass filter.

If you have a constant component on the Z axis, there is a chance that you haven't filtered out gravity. Note that if there is a significant pitch or roll this constant can be seen on your X and Y axes as well

Generally pose estimation with an accelerometer is not a good idea as you need to integrate the acceleration signals twice to get a pose. If the signal is noisy you are going to be in trouble already after a couple of seconds if the noise is not 100% evenly distributed between + and -.

If we assume that there is no noise coming from your gears, even the conversion accuracy of the Accelerometer might start to mess up your pose after a couple of minutes.

I would definately use a second sensor, eg a compass/encoder in combination with your mathematical model and combine all your sensor data in a kalmann filter(Sensor fusion).

You might also be able to derive a black box model of your noise by assuming that it is correlated with your motors RPM. (Box-jenkins/Arma/Arima).

Accelerometer Noise

They're talking about the frequency of the input signal. Since this is an accelerometer the input signal is movement.

Fast, high frequency vibrations suffer from Gaussian noise. Slow, low frequency motion suffer from drift. This limits the range of motion you can accurately measure with accelerometers.


Additional answer:

What does frequency refer to when it comes to motion? It simply refers to the change in direction of motion, or more specifically the change in direction of the vector of motion.

It may be difficult to imagine that linear forward motion has a frequency but linear forward motion only has a frequency of zero if the object either travels at constant speed or constantly accelerates for eternity. For a car or a train or a plane or a boat or a spaceship this is not the case. All vehicles in motion has to stop eventually. When it stops, it has completed a motion with frequency of 1/(2*time_of_journey).

For accelerometers, the frequency is more since accelerometers measure acceleration, not distance. So if the vehicle travels like a spaceship which accelerates only once and decelerates only once then the frequency of the input will be 1/time_of_journey (since the value of acceleration starts at and returns to 0). But for cars and boats and bicycles and most other vehicles the frequency is significantly higher since most vehicles constantly accelerates and decelerates. So the frequency of acceleration is generally 1/(time_of_journey/number_of_times_you_hit_the_brakes).

Seriously, the numbers for this is generally very low. Take the simple example of a spaceship going to the moon and ignore the launch and landing. The frequency of acceleration for Neil Armstrong's trip to the moon was 1/4 days or 0.000003 Hz. That doesn't look like much of a frequency.

So why state the parameter in terms of frequency? Well, in signal processing motion is generally assumed to be sine waves. It's not realistic and doesn't reflect the real world but is good enough and simplify things enough to the point where we can write down equations to model things. Which is why you see things like "accelerometer noise" being quoted in terms of frequency.

Vehicles also do experience acceleration at higher frequencies though. Vibrations caused by the engine and bumps in the road and friction with the air has frequencies in ranges that we recognize as being periodic. Indeed, often our ears detect such things as rattling or humming or swooshing sounds. Sensitive accelerometers detect them too.



Related Topics



Leave a reply



Submit