Gyroscope and Accelerometer filtering

15 Aug 2012

Hello guys. I'm trying to build two projects that use input from gyro and accelerometer.

The first one is a self balancing robot and the second is a quad-copter.

Both acc and gyro have internal filtering. Low-pass filter, High-pass filter and base-pass filter.

My question is, which one should a choose for each project?

I think that for the self balancing robot I should choose a high-pass filter, since I expect low frequency noise coming from it. And if I'm right, which cut off frequency should I choose?

Acc: - 8 low-pass filters: 10, 20, 40, 75, 150, 300, 600, 1200 Hz (no dig. Filter) - 1 high-pass-filter: 1 Hz - 1 band-pass-filter: 0.2 – 300 Hz

Gyro: Low-Pass filter: 256Hz, 188Hz, 98Hz, 42Hz, 20Hz, 10Hz, 5Hz

And for the quadrotor, which type of filter should I choose? My thinking is that high frequency noise will come from it, so I should choose a low-pass filter.

Is that correct? I'm new to noise filtering so I'm a bit lost.

Can anyone help me? Any suggestion will be appreciated.

Thank you!

15 Aug 2012

For accelerometer you definately dont want a high pass filter. The main (/only) task of the accelerometer is measuring the earth's gravitation, which is a quite low-frequency signal, you don't want to remove that.

Then for both the accelerometer and gyroscope I would add not much filtering. To add a disclaimer, while I am (very slowly) working on an mbed controlled quadrocopter I dont have much experience yet how it will end up working. However your gyroscope already is integrated to get an absolute angle in your code, this suppresses high frequency noise. I guess you can filter the accelerometer with a low pass filter with a cut-off frequency way above what you expect to reach by your project, but still then I would be careful with filtering.

The problem is filters always add a phase shift. When the total phase-shift of your control loop becomes too large, your robots will meet their creator (in case of the quadrocopter you can take that literally when it crashes into you). The control loop (so also the robot) will start oscillating.