MATLAB: Ringing effect in time domain reconstructed signal after filtering

filterfourier filteringsignal processingSignal Processing Toolbox

Hi all,
I'm trying to band pass filter (9Hz to 70Hz) an ECG signal which is sampled at 256 Hz using MATLAB's 'butter' followed by 'filter'. I'm using an order of 10, just being greedy about making the pass band near perfect. Filtering happens alright but the time domain filtered signal has sort of ringing effect.
I then reduce the order to 2 and perform the filtering and now the ringing is not there. What's this theoretically? Is this a manifestation of Gibb's phenomenon?
Any help would be greatly appreciated.
King regards, Pooja Narayan

Best Answer

Not sure exactly what you did, but in general, in Linear Systems Theory (Fourier Filtering), multiplication in one domain is equivalent to convolution in the other domain. A band pass filter is a rect function and the Fourier Transform of a rect function is a sinc function. So when you multiply by a rect function in the Fourier domain to do band pass filtering, it's like you convolve with a sinc function in the time domain. Since the sinc function has ripples, so will your output signal. Yes this is the Gibbs phenomenon. And since wider in one domain means narrower in the other domain, a wider rect will give a narrow sinc (faster ripples) while a narrow rect will give a wider sinc and slower ripples.
Related Question