There are no linear-phase recursive filters because a recursive filter cannot generate a symmetric impulse response. However, it is possible to implement a zero-phase filter offline using a recursive filter twice. That is, if the entire input signal is stored in a computer memory or hard disk, for example, then we can apply a recursive filter both forward and backward in time. Doing this squares the amplitude response of the filter and zeros the phase response.
To show this analytically, let denote the output of the first filtering operation (which we'll take to be ``forward'' in time in the normal way), and let be the impulse response of the recursive filter. Then we have
where is the input signal at sample . For the second pass, we ``flip'' to obtain and apply the filter again:
The final output is then this result flipped:
where the last simplification tells us that flipping the input and output signals is equivalent to flipping the impulse response instead. Putting all these operations together, we have
By the flip theorem for z transforms, we have that the z transform of FLIP is :
Using this result and applying the convolution theorem (§6.3) twice gives the z transform
On the unit circle, this reduces to, for real filters ,
If the filter were complex, then we would need to conjugate its coefficients when running it backwards.
In summary, we have thus shown that forward-backward filtering squares the amplitude response and zeros the phase response. Note also that the phase response is truly zero, never alternating between zero and . No matter what nonlinear phase response a filter may have, this phase is completely canceled out by forward and backward filtering. The amplitude response, on the other hand, is squared. For simple bandpass filters (including lowpass, highpass, etc.), for which the desired gain is 1 in the passband and 0 in the stopband, squaring the amplitude response usually improves the response, because the ``stopband ripple'' (deviation from 0) is squared, thereby doubling the stopband attenuation in dB. On the other hand, passband ripple (deviation from 1) is only doubled by the squaring (because ).
A Matlab example of forward-backward filtering is presented in §11.6 (in Fig.11.1).