I'm working on implementing an Exponentially Weighted Moving Average Filter to clean up data from an accelerometer. It's pretty straightforward and efficient because I don't even need an array to store past values. And the filter's frequency response is nice and straightforward (first order low pass filter). All this matters for my application.
Here's the formula:
xbark = b*xbark-1 + (1-b)*xk
My only question is, can someone help me find out theoretically what the filter coefficient b does for the frequency response? I can see what it does in a general sense, but does anyone know how b (and of course my sample rate T) relate mathematically to the cutoff frequency of this filter? I can't really find it online and I don't remember enough of my signals and systems class to derive it from scratch. I heard that it was something like:
f = ln(b)/T
I need to know so that I can set my frequency response to an exact number by playing with b.
So yeah, this is not really an Arduino specific question, although I am programming it on an Arduino. Hopefully that's good enough. And thanks a lot for your help.