#
# iirdes (infinite impulse response filter design)
#

liquid implements infinite impulse respone (IIR) filter design for the four major classes of filters (Butterworth, Chebyshev, elliptic, and Bessel) as follows:

1. Use butterf(), cheby1f(), cheby2f(), ellipf(), besself() to design a low-pass analog prototype in terms of complex zeros, poles, and gain.

    butter_azpkf()  :   Butterworth (maximally flat in the pass-band)
    cheby1_azpkf()  :   Chebyshev Type-I (equiripple in the pass-band)
    cheby2_azpkf()  :   Chebyshev Type-II (equiripple in the stop-band)
    ellip_azpkf()   :   elliptic filter (equiripple in the pass- and stop-bands)
    bessel_azpkf()  :   Bessel (maximally flat group delay)

2. Compute frequency pre-warping factor, m, to set cutoff frequency (and center frequency if designing a band-pass or band-stop filter).

    iirdes_freqprewarp()

3. Convert the low-pass analog prototype to its digital equivalent (also in terms of zeros, poles, and gain) using the bilinear z-transform
    
    bilinear_zpkf()

4. Transform the low-pass digital prototype to high-pass, band-pass, or band-stop.  For the band-pass and band-stop cases, the number of poles and zeros will need to be doubled.
    - [LP]  : low-pass filter   : s = m * (1+z^-1) / (1-z^-1)
    - [HP]  : high-pass filter  : s = m * (1-z^-1) / (1+z^-1)
    - [BP]  : band-pass filter  : s = m * (1-c0z^-1+z^-2) / (1-z^-2)
    - [BS]  : band-stop filter  : s = m * (1-z^-2) / (1-c0z^-1+z^-2)

    iirdes_dzpk_lp2bp()

5. Transform the digital z/p/k form of the filter to one of the two forms:
    - [tf]  : typical transfer function for digital iir filters of the form B(z)/A(z)
    - [sos] : second-order sections form : prod( Bk(z)/Ak(z) ), preferred method

    iirdes_dzpk2tff()
    iirdes_dzpk2sosf()

6. Create the filter object (e.g. iirfilt, iirqmfb) from the resulting structure

    iirfilt_crcf_create()
    iirfilt_crcf_create_sosf()


An extensive example is given in sandbox/iirdes_example.c while examples/iirdes_example.c gives the simplified interface.

