MATLAB: Why after bandpass, phase information lost

filter design

I used bandpass filter to filter a time-series data. But after the filtering, the new data appears completely different from the original one. Some places same, some even anti-phase. I just wanted to make the signal smoothing and kept all the peak locations. Does anyone know why?

Best Answer

Hi Haoran, that is expected. You can use filtfilt() instead of filter() if keeping peak locations in the time domain is important in your application.
Realizable filters cannot be zero phase, which is why you see these effects in the filtered signal. It is possible to implement zero-phase filtering in a noncausal way, which is what filtfilt() does.
See the reference page for filtfilt for examples.