Signal Processing Toolbox Previous page   Next Page
filtfilt

Zero-phase digital filtering

Syntax

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

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.

See Also

fftfilt, filter, filter2

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,


Previous page  filternorm filtic Next page

© 1994-2005 The MathWorks, Inc.