17.11.2012 Views

Numerical recipes

Numerical recipes

Numerical recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IIR (Recursive) Filters<br />

13.5 Digital Filtering in the Time Domain 561<br />

Recursive filters, whose output at a given time depends both on the current and previous<br />

inputs and on previous outputs, can generally have performance that is superior to nonrecursive<br />

filters with the same total number of coefficients (or same number of floating operations per<br />

input point). The reason is fairly clear by inspection of (13.5.2): A nonrecursive filter has a<br />

frequency response that is a polynomial in the variable 1/z, where<br />

z ≡ e 2πi(f∆)<br />

(13.5.4)<br />

By contrast, a recursive filter’s frequency response is a rational function in 1/z. The class of<br />

rational functions is especially good at fitting functions with sharp edges or narrow features,<br />

and most desired filter functions are in this category.<br />

Nonrecursive filters are always stable. If you turn off the sequence of incoming xi’s,<br />

then after no more than M steps the sequence of yj’s produced by (13.5.1) will also turn off.<br />

Recursive filters, feeding as they do on their own output, are not necessarily stable. If the<br />

coefficients dj are badly chosen, a recursive filter can have exponentially growing, so-called<br />

homogeneous, modes, which become huge even after the input sequence has been turned off.<br />

This is not good. The problem of designing recursive filters, therefore, is not just an inverse<br />

problem; it is an inverse problem with an additional stability constraint.<br />

How do you tell if the filter (13.5.1) is stable for a given set of ck and dj coefficients?<br />

Stability depends only on the dj’s. The filter is stable if and only if all N complex roots<br />

of the characteristic polynomial equation<br />

z N N�<br />

− djz N−j =0 (13.5.5)<br />

j=1<br />

are inside the unit circle, i.e., satisfy<br />

|z| ≤1 (13.5.6)<br />

The various methods for constructing stable recursive filters again form a subject area<br />

for which you will need more specialized books. One very useful technique, however, is the<br />

bilinear transformation method. For this topic we define a new variable w that reparametrizes<br />

the frequency f,<br />

� 2πi(f∆)<br />

1 − e<br />

w ≡ tan[π(f∆)] = i<br />

1+e2πi(f∆) � � �<br />

1 − z<br />

= i<br />

(13.5.7)<br />

1+z<br />

Don’t be fooled by the i’s in (13.5.7). This equation maps real frequencies f into real values of<br />

w. In fact, it maps the Nyquist interval − 1<br />

1<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!