|Signal Processing Toolbox|
Zero-phase digital filtering
y performs zero-phase digital filtering by processing the input data in both the forward and reverse directions (see problem 5.39 in ). After filtering in the forward direction, it reverses the filtered sequence and runs it back through the filter. The resulting sequence has precisely zero-phase distortion and double the filter order.
filtfilt minimizes start-up and ending transients by matching initial conditions, and works for both real and complex inputs.
filtfilt should not be used with differentiator and Hilbert FIR filters, since the operation of these filters depends heavily on their phase response.
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.
 Oppenheim, A.V., and R.W. Schafer, Discrete-Time Signal Processing, Prentice-Hall, 1989, pp. 311-312.
 Mitra, S.K., Digital Signal Processing, 2nd ed., McGraw-Hill, 2001, Sections 4.4.2 and 8.2.5.
 Gustafsson, F., "Determining the initial states in forward-backward filtering," IEEE Transactions on Signal Processing, April 1996, Volume 44, Issue 4, pp. 988--992,