Q6Digital Signal Processing
Question
Q.3. (a) What are IIR and FIR filters? Draw basic structures for them and explain. [8]
(b) List out the advantages and disadvantages of digital filters over analog filters. [8]
Answer
IIR filters use feedback (recursive) structures giving theoretically infinite impulse response duration, achieving sharp frequency responses with fewer coefficients but risking instability and nonlinear phase; FIR filters use only feedforward structures giving finite impulse response duration, always stable and capable of exactly linear phase, but generally requiring higher order for comparable selectivity; digital filters offer advantages including precision, stability, and reconfigurability over analog filters, at the cost of bandwidth limitations and quantization effects.
(a) IIR and FIR Filters
IIR (Infinite Impulse Response) filters contain feedback (recursive) paths in their structure, meaning the current output depends not only on current and past inputs but also on past output values - as a consequence, the impulse response of an IIR filter theoretically extends infinitely in duration (never exactly reaching zero, though it typically decays toward zero for a stable filter). IIR filters can achieve a given frequency-response selectivity (sharp transition bands, high stopband attenuation) using a relatively low filter order (few coefficients) compared to an equivalent FIR filter, making them computationally efficient, but this efficiency comes at the cost of potential instability (if poles are placed outside the unit circle, whether by design error or by finite-word-length coefficient quantization effects) and generally non-linear phase response (introducing frequency-dependent group delay, which can distort signal waveshapes, particularly problematic in applications sensitive to phase distortion such as data communications or audio processing where phase linearity matters).
FIR (Finite Impulse Response) filters have no feedback path - the output depends only on a finite window of current and past input values, giving an impulse response of finite, exactly-known duration (equal to the filter length/number of taps). FIR filters are unconditionally stable (having no poles other than at the origin, always inside the unit circle), and can be readily designed with exactly linear phase response (by imposing a symmetry or antisymmetry constraint on the filter coefficients), an important advantage for applications requiring undistorted waveshapes, but FIR filters generally require a substantially higher filter order (more coefficients, and correspondingly more computation per output sample) than an IIR filter to achieve a comparably sharp frequency-response transition.
(b) Advantages and Disadvantages of Digital Filters over Analog Filters
- High precision and accuracy: digital filter behavior depends only on numerical coefficient values and arithmetic precision, not on physical component tolerances, unlike analog filters whose performance depends on resistor/capacitor/inductor component values that inherently vary with manufacturing tolerance.
- No drift over time/temperature: digital filter coefficients remain exactly fixed regardless of ambient temperature, aging, or humidity, whereas analog filter component values (particularly capacitors and inductors) can drift with temperature and age, gradually altering the filter's actual frequency response over time.
- Easy reconfigurability: a digital filter's characteristics can be modified simply by changing its coefficient values in software, without any physical hardware redesign, whereas modifying an analog filter's response requires physically replacing or adjusting its component values.
- Exact linear phase achievable: FIR digital filters can be designed with exactly linear phase response, a property not achievable with simple passive analog filter realizations.
- Perfect reproducibility: every unit of a given digital filter design behaves identically (limited only by numerical precision), whereas analog filters built from the same nominal component values will exhibit small unit-to-unit variations due to component tolerances.
- Bandwidth/speed limitation: digital filter processing is limited by the sampling rate and the processing speed of the digital hardware (DSP processor or FPGA), restricting practical application to signals within an achievable frequency range, whereas suitably-designed analog filters can operate at very high frequencies (RF/microwave) without this sampling-rate constraint.
- Quantization effects: digital filters suffer from finite-word-length effects, including coefficient quantization error (altering the intended filter response slightly), arithmetic round-off/truncation noise accumulating through the filter's computation, and, in poorly-designed recursive (IIR) implementations, the possibility of limit cycles (small-amplitude self-sustained oscillations) or overflow oscillations - effects with no direct analog-filter counterpart.
- Need for ADC/DAC conversion: since real-world signals are typically analog, using a digital filter requires additional analog-to-digital and digital-to-analog conversion stages (adding cost, complexity, latency, and additional potential sources of noise/distortion), whereas an analog filter can process the analog signal directly without any conversion overhead.
A further important practical distinction between IIR and FIR filters concerns design methodology and achievable selectivity for a given filter order: IIR filters are conventionally designed by transforming a well-established analog prototype filter (Butterworth, Chebyshev, elliptic) into the digital domain via the impulse-invariance or bilinear-transformation methods, directly inheriting the excellent magnitude-response selectivity (sharp transition band for a given order) that these classical analog filter families provide - this is precisely why an IIR filter of a given order can generally achieve a substantially sharper transition band, or equivalently meet a demanding set of pass-band and stop-band specifications, than an FIR filter of the same order, at the cost of the phase nonlinearity and stability considerations already noted.
FIR filters, by contrast, are most commonly designed using the window method (multiplying an ideal, infinite-duration impulse response by a finite-length window function such as Hamming, Hanning, Blackman, or Kaiser to produce a realizable, finite-length filter) or optimal equiripple methods such as the Parks-McClellan (Remez exchange) algorithm, which distributes the approximation error evenly across the pass-band and stop-band ripple regions to achieve the best possible selectivity for a specified filter length - because FIR design methods work directly in terms of a desired frequency response rather than transforming a fixed analog prototype, FIR filters offer considerably more design flexibility in shaping arbitrary, even non-standard, magnitude responses (such as differentiators, Hilbert transformers, or multiband filters) that would be difficult or impossible to realize as a low-order IIR structure.
The choice between IIR and FIR in a real DSP application is therefore governed by which of these competing considerations dominates: applications demanding strictly linear phase (to avoid waveform distortion), guaranteed stability regardless of coefficient quantization, and straightforward multirate or adaptive-filtering implementation (such as audio equalization, image processing, or channel equalization in communication receivers) generally favor FIR filters despite their higher computational cost for a given selectivity, whereas applications where computational efficiency and memory are at a premium, and moderate phase distortion is acceptable or can be separately compensated, generally favor IIR filters, explaining why both filter classes remain in widespread simultaneous use across different application domains within modern digital signal processing systems.
A final practical point concerns filter implementation cost: FIR filters of order N require N multiplications and N-1 additions per output sample in a direct-form realization (with no feedback path), whereas an IIR filter achieving comparable selectivity may require only a handful of multiplications given its typically much lower order for the same specification, making IIR filters generally more attractive whenever computational resources (processing power, memory, or power consumption in battery-operated devices) are severely constrained, provided the associated phase nonlinearity and finite-word-length stability sensitivity can be tolerated or otherwise managed in the target application.