filtfilt - Zero-phase digital filtering

Syntax

y = filtfilt(b,a,x)

Description

y = filtfilt(b,a,x) performs zero-phase digital filtering by processing the input data in both the forward and reverse directions (see problem 5.39 in [1]). After filtering in the forward direction, it reverses the filtered sequence and runs it back through the filter. The result has precisely zero-phase distortion, the magnitude is the square of the filter's magnitude response, and the filter order is double the order of the filter specified by b and a. filtfilt minimizes start-up and ending transients by matching initial conditions, and works for both real and complex inputs.

Note that filtfilt should not be used with differentiator and Hilbert FIR filters, since the operation of these filters depends heavily on their phase response.

Algorithm

filtfilt is an M-file that uses the filter function. In addition to the forward-reverse filtering, it attempts to minimize startup transients by adjusting initial conditions to match the DC component of the signal and by prepending several filter lengths of a flipped, reflected copy of the input signal.

References

[1] Oppenheim, A.V., and R.W. Schafer, Discrete-Time Signal Processing, Prentice-Hall, 1989, pp.311-312.

[2] Mitra, S.K., Digital Signal Processing, 2nd ed., McGraw-Hill, 2001, Sections 4.4.2 and 8.2.5.

[3] Gustafsson, F., Determining the initial states in forward-backward filtering, IEEE® Transactions on Signal Processing, April 1996, Volume 44, Issue 4, pp.988–992.

See Also

fftfilt, filter, filter2

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS