why after bandpass, phase information lost?

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?

 Accepted 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.

2 Comments

Thanks! do you know how to make numerator shorter? When I use filtfilt, there always comes an error saying signal must be 3times larger than the filter numerator.
Are you using an FIR filter? Try an IIR design.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!