Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

My project:

I'm developing a slot car with 3-axis accelerometer and gyroscope, trying to estimate the car pose (x, y, z, yaw, pitch) but I have a big problem with my vibration noise (while the car is running, the gears induce vibration and the track also gets it worse) because the noise takes values between ±4[g] (where g = 9.81 [m/s^2]) for the accelerometers, for example.

I know (because I observe it), the noise is correlated for all of my sensors

In my first attempt, I tried to work it out with a Kalman filter, but it didn't work because values of my state vectors had a really big noise.

EDIT2: In my second attempt I tried a low pass filter before the Kalman filter, but it only slowed down my system and didn't filter the low components of the noise. At this point I realized this noise might be composed of low and high frecuency components.

I was learning about adaptive filters (LMS and RLS) but I realized I don't have a noise signal and if I use one accelerometer signal to filter other axis' accelerometer, I don't get absolute values, so It doesn't work.

EDIT: I'm having problems trying to find some example code for adaptive filters. If anyone knows about something similar, I will be very thankful.

Here is my question:

Does anyone know about a filter or have any idea about how I could fix it and filter my signals correctly?

Thank you so much in advance,

XNor

PD: I apologize for any mistake I could have, english is not my mother tongue

like image 232
XNor Avatar asked Nov 04 '22 01:11

XNor


2 Answers

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).

like image 200
Sigurd V Avatar answered Nov 20 '22 15:11

Sigurd V


I had similar problems with noise with low and high frequencies and I managed to decently remove it without removing good signal too by using an universal microphone shock mount. It does a good job with gyroscope too especially if you find one which fits it (or you can put it in a small case then mount it) It basically uses elastic strings to remove shocks and vibration.Universal shock mount

like image 24
Botirla Sorin Avatar answered Nov 20 '22 14:11

Botirla Sorin