Zero phase filter design using 'sptool'

1 view (last 30 days)
Hi, I want to build a zero phase high pass filter (offline) using Butterworth approximation. Even though 'filtfilt' function allows designing zero phase filters, I wish to do this using 'sptool', for it is more user-friendly. Anyway, I couldn't find a way to design a zero phase filter using 'sptool' and am wondering whether 'sptool' doesn't support this particular function. Please kindly let me know if you know how to do this. Thank you!

Answers (1)

Star Strider
Star Strider on 9 Jan 2017
You have to use filtfilt (or write your own version of it) to do maximally-flat-phase-response filtering with a discrete filter.
I don’t know what you intend by ‘offline’, but the only hardware filter realisation that has a maximally-flat phase response is the Bessel design. All other filter designs — including the Butterworth design — will introduce phase distortion.
It is not possible to realise a Bessel filter as a discrete filter. The resulting design will not have the desired flat phase response, and the Signal Processing Toolbox will not design a discrete version of the Bessel filter for reasons discussed in the documentation for the besself function.
  2 Comments
Dilini Darmawardana
Dilini Darmawardana on 9 Jan 2017
Thank you! What I meant by offline is that all data is collected prior to filtering. So that one can design a non causal filter with zero phase shift.(https://au.mathworks.com/help/signal/ug/iir-filter-design.html) I have no intention of hardware implementation of this filter.So, Bessel filters cannot be used anyway. Thanks again for your kind support!
Star Strider
Star Strider on 9 Jan 2017
My pleasure!
Since you collect your data prior to filtering it, just design your filter and use filtfilt to filter it in MATLAB. That is what I would do.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!