Zero-phase filter

Dear all,

I am dealing with some trouble using butterworth filter that I can not figure out. I am filtering LFPs sampled at 24KHz with a butterworth filter of 5th order. I am applying a bandpass filter with low and high cutoff of 0.5 and 500 hz respectively. The resulting filtered signal is a vector of NaNs. Reducing the order to 2 gives me a vector of values from which I am able to performs time frequency decomposition. I have tried different function in Matlab using both function butter and designefilt. Furthermore by downsampling the data by a factor of 24(i.e. Fs =1000) the signal becomes very low(very close to 0). If instead I apply a low pass filter on the original data(and remove the DC by demeaning) I am able to use a 5th filter order. According to what I read the higher the order of butterworth the stronger is the attenuation of the component around the pass band. Is it possible that a strong noise in lower frequency is influencing the signal I am interest in? By visually inspecting the periodogramm of the signal I can not see any kind of noise, I simply experience the normal decreasing of power as a function of frequency. I would really appreciate any suggestions on how to investigate this issue, unfortunately no one in my lab is familiar with this type of signal.



Hi Marta. I recommend using an FIR filter. IIR filters like Butterworth are more sensitive to parameters and can become unstable, which I guess is what’s happening in your data. They’re also less accurate. It’s hard to know exactly why this is happening – it could be some noise.

Anyway, FIR filters are better, more accurate, and more stable. They are more computationally intensive, which is why they were out of reach in the 1980’s when computer-based filtering was the hot new thing. But modern computers can handle it.

I show how to design these in my books, and almost certainly in some of the YT videos.

1 Like