Hi, all --
I've got code to calculate IIR filter coefficients, but they seem to lead to a really strange output. This is what the data looks like: sampled at 1 KHz with a 7 Hz excitation oscillation on top of it. I'd like to make the filter so that it filters with a cutoff frequency of 1 Hz.
Based on what I have read on the web, to calculate the cutoff frequency in fractions of PI, the equation is 2 * fc / fs, leading to a cutoff frequency of 0.002. First off, is that correct? That value gives me coefficients that lead to values that are about three orders of magnitude smaller than I would have expected. Second, when I plot the output of the filter on an array of 250 points, I expect a (mostly) flat line, but I get something that actually looks like an exponential into the negative. That can't be right...can it?
I apologize for not knowing that much about filters here. It would be nice if somebody had an answer.
Thanks -- Robert