|
Re: Accelerometer Filtering
Really, most filters designs don't require calculus. If you want to do something like a Kalman, it does require a bit of differential equations, but I wouldn't recommend using something like that anyway. All you need to know is a few basic pieces of information - passband frequency and stopband frequency. An accelerometer will have most of its interesting information at around DC, so you'll be wanting a lowpass filter. The easiest filter you can implement is called a finite-impulse response filter (FIR), which, in discrete terms, means all you do is a multi-tap filter like Ether recommended (his is a two-tap filter, but you can realistically have as many taps as you want - the more taps you have the more it will reject higher frequencies [sharper rolloff]). There are ways to set the coefficients of each tap to favor older values over newer (that is the function of Ether's f parameter) or vice-versa, but from experience you can make it work with a a simple boxcar averaging algorithm - every tap has the same coefficient, and they all add to 1.
Looking at the beginning post, though, I do worry slightly - what you propose is to record the robot's location based on gyro and accelerometer readings. I cannot stress enough that this is incredibly difficult, especially for any extended period of time. The best you can do is robot attitude. For anything along those lines, you will actually probably want to use a Kalman, but that's a huge amount of work.
I hope this is helpful.
Sparks
|