Hello,
I am trying to high-pass filter some data using filtfilt. For my application, I only need to effectively remove data close to DC, so I am using a fairly low frequency cutoff.
However, I have noticed that my implementation (butterworth filter using filtfilt) is causing increased spectral content around my cutoff.
Does anyone know why this is happening?
I am thinking it may be a result of having a small ensemble size (50 samples) or possible a filter ripple effect (?)
For example:
N = 50;data = randn( N,1);prf = 500;cutoff = 2;[B A ] = butter(2, cutoff/ (prf / 2), 'high');data2 = filtfilt( B,A, data);figure(); plot( linspace(-prf/2, prf/2, 5000), fftshift( abs( fft( data, 5000))), 'k')hold on;plot( linspace(-prf/2, prf/2, 5000), fftshift( abs( fft( data2, 5000))), 'b')
Thanks!
Best Answer