Infinite impulse response
An infinite impulse response (IIR) filter is a type of digital filter in signal processing characterized by an impulse response of theoretically infinite duration, arising from its recursive nature where the output at any time depends not only on current and past inputs but also on past outputs.[1] These filters are governed by linear constant-coefficient difference equations that incorporate feedback, distinguishing them from finite impulse response (FIR) filters, which lack such recursion and have finite-duration responses.[2] IIR filters exhibit properties analogous to classical analog filters, enabling efficient approximation of continuous-time systems in discrete domains.[3] IIR filters are implemented via recursive algorithms, typically represented by the general form y = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k], where x is the input, y is the output, b_k are feedforward coefficients, and a_k are feedback coefficients.[4] In the z-domain, their transfer function is a rational function H(z) = \frac{\sum_{k=0}^{M} b_k z^{-k}}{1 + \sum_{k=1}^{N} a_k z^{-k}}, with poles inside the unit circle ensuring stability for causal systems.[5] Design methods for IIR filters often involve bilinear transformation or impulse invariance to convert analog prototypes, such as Butterworth or Chebyshev filters, into digital equivalents.[6] A key advantage of IIR filters over FIR filters is their computational efficiency, as they achieve comparable frequency selectivity with significantly lower filter orders—often requiring fewer multiplications and additions per sample—making them suitable for resource-constrained environments like real-time embedded systems.[7][8] However, this efficiency comes with drawbacks, including the risk of instability if poles lie outside the unit circle and inherent non-linear phase responses that can distort signal waveforms, unlike the linear phase achievable with FIR filters.[9][10] Fixed-point implementations further introduce challenges like coefficient quantization and overflow, necessitating careful scaling and stability analysis.[11] IIR filters find widespread applications in digital signal processing tasks requiring sharp transitions or low-latency processing, including audio equalization, noise suppression in biomedical signals (e.g., ECG filtering), image enhancement, and data transmission in telecommunications.[12][13][14] In audio applications, they enable parametric equalizers for real-time frequency adjustments, while in imaging, they support edge-preserving smoothing.[15] Their origins trace back to the digitization of analog filter designs in the mid-20th century, evolving with advances in DSP hardware to become staples in modern systems like digital television and wireless communications.[16][17]Fundamentals
Definition and Characteristics
An infinite impulse response (IIR) filter is a digital filter whose output depends on both the current and past input samples as well as past output samples, due to its recursive structure incorporating feedback. This feedback mechanism allows IIR filters to achieve sharp frequency responses with fewer coefficients compared to non-recursive filters, making them computationally efficient for applications like audio processing and control systems.[18] IIR filters originated in the 1960s and 1970s as digital signal processing emerged, with early efforts focused on approximating the behavior of continuous-time analog filters to leverage the advantages of digital implementation, such as programmability and stability in certain conditions.[19] Key theoretical foundations and design techniques for IIR filters were established in the seminal 1975 textbook Digital Signal Processing by Alan V. Oppenheim and Ronald W. Schafer, which formalized recursive filter structures and their properties.[20] The defining characteristic of an IIR filter is its impulse response h, which remains non-zero for all n \geq 0 in theory, extending infinitely due to the recursive feedback that propagates the effect of the initial impulse indefinitely. Although practical implementations may exhibit decay in the response over time owing to finite precision or stability constraints, the theoretical infinite duration distinguishes IIR filters from those with finite-duration responses.[21] The general structure of an IIR filter is depicted in a block diagram featuring a feedforward path from the input x with coefficients b_k (for k = 0, 1, \dots, M) that contribute to the zeros of the system, and a feedback path from the output y with coefficients a_k (for k = 1, 2, \dots, N) that introduce the poles. This direct form realization sums the delayed input and output terms scaled by these coefficients to produce the current output, enabling the recursive computation essential to the filter's operation.[22]Relation to Finite Impulse Response Filters
Finite impulse response (FIR) filters are non-recursive structures that compute their output based solely on the current and past input samples, resulting in a finite-duration impulse response that becomes and remains zero after a finite number of samples.[23] In contrast, infinite impulse response (IIR) filters incorporate feedback from previous output samples, making their computation recursive and leading to an impulse response that theoretically extends indefinitely. This recursive nature allows IIR filters to emulate the behavior of analog filters more closely, enabling sharper frequency selectivity with fewer coefficients compared to FIR filters, which often require higher orders to achieve similar roll-off characteristics.[24] One key distinction lies in memory efficiency: IIR filters typically demand fewer parameters for equivalent performance in applications requiring steep transitions, as their pole-based structure provides analog-like efficiency in approximating ideal responses. However, this comes at the cost of potential instability due to the feedback loop, where improper pole placement can cause unbounded outputs, unlike FIR filters, which are inherently stable regardless of coefficients. Regarding phase response, IIR filters generally exhibit nonlinear phase, introducing group delay variations that can distort signal timing in phase-sensitive applications such as audio processing or data transmission. FIR filters, by design, can achieve linear phase—preserving waveform shape and enabling constant group delay—which makes them preferable in scenarios like image processing or high-fidelity audio where distortion must be minimized. Computationally, IIR filters offer advantages in lower-order implementations for achieving steep roll-off, reducing the number of multiplications and additions per sample, though the recursive structure may complicate real-time implementation if stability is not ensured.[24] This trade-off positions IIR filters as suitable for resource-constrained environments, while FIR filters excel in stability-critical or phase-linear applications despite higher computational demands.Mathematical Foundation
Difference Equation
The time-domain behavior of an infinite impulse response (IIR) filter is described by a linear constant-coefficient difference equation that relates the output signal y to the input signal x through both feedforward and feedback terms. The general form of this equation for a causal IIR filter is y = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k], where b_k (for k = 0, 1, \dots, M) are the feedforward coefficients determining the influence of current and past inputs, and a_k (for k = 1, 2, \dots, N) are the feedback coefficients governing the recursive dependence on past outputs.[25][26] The order of the filter is defined as the maximum of M and N, which indicates the highest delay involved in the recursion and thus the complexity of the system. Causality is inherent in this formulation, as the output y depends only on the current input x and previous values of both input and output, assuming initial rest conditions where all signals are zero for n < 0. This assumption simplifies analysis by ensuring the response starts from rest upon input application.[25][26] To generate the impulse response h, the input is set to the unit impulse x = \delta, where \delta{{grok:render&&&type=render_inline_citation&&&citation_id=0&&&citation_type=wikipedia}} = 1 and \delta = 0 otherwise. Substituting into the difference equation yields h{{grok:render&&&type=render_inline_citation&&&citation_id=0&&&citation_type=wikipedia}} = b_0, and for n \geq 1, h = \sum_{k=1}^{\min(M,n)} b_k \delta[n-k] - \sum_{k=1}^{N} a_k h[n-k], resulting in a recursive computation that produces non-zero terms indefinitely due to the feedback, hence the "infinite" duration.[25] In general, the total output response consists of the zero-state response, which is the output due to the input with zero initial conditions (y = 0 for n < 0), and the zero-input response, which arises from non-zero initial conditions with no input (x = 0). Initial conditions affect the transient behavior; under initial rest, the zero-input response is zero, isolating the zero-state component for standard filter analysis.[25][26]Z-Transform and Transfer Function
The z-transform provides a frequency-domain representation for discrete-time signals and systems, analogous to the Laplace transform in continuous-time analysis. For a discrete-time signal x, the bilateral z-transform is defined as X(z) = \sum_{n=-\infty}^{\infty} x z^{-n}, where z is a complex variable.https://www.dsprelated.com/freebooks/filters/Z_Transform.html For causal systems and signals that begin at n=0, the unilateral z-transform is employed, given by X(z) = \sum_{n=0}^{\infty} x z^{-n}. $$$$https://www.dsprelated.com/freebooks/filters/Z_Transform.html$$ This unilateral form is particularly relevant for [infinite impulse response](/page/Infinite_impulse_response) (IIR) filters, which are typically causal linear time-invariant (LTI) systems. To obtain the transfer function of an IIR filter, the z-transform is applied to its underlying difference equation, which describes the recursive relationship between input $x$ and output $y$. Assuming zero initial conditions for causality, the z-transform of the general difference equation y = \sum_{k=0}^{M} b_k x[n-k] - \sum_{k=1}^{N} a_k y[n-k] yields $Y(z) = \sum_{k=0}^{M} b_k z^{-k} X(z) - \sum_{k=1}^{N} a_k z^{-k} Y(z)$.$$https://www.dsprelated.com/freebooks/filters/Transfer_Function_Analysis.html$$ Rearranging terms gives Y(z) \left(1 + \sum_{k=1}^{N} a_k z^{-k}\right) = \left(\sum_{k=0}^{M} b_k z^{-k}\right) X(z), so the transfer function $H(z) = Y(z)/X(z)$ is H(z) = \frac{\sum_{k=0}^{M} b_k z^{-k}}{1 + \sum_{k=1}^{N} a_k z^{-k}}.https://www.dsprelated.com/freebooks/filters/Transfer_Function_Analysis.html This expression represents the system's frequency-domain behavior, with the numerator capturing the feedforward coefficients and the denominator the feedback terms characteristic of IIR filters. The transfer function takes the rational form H(z) = B(z)/A(z), where B(z) = \sum_{k=0}^{M} b_k z^{-k} is the numerator polynomial of degree M and A(z) = 1 + \sum_{k=1}^{N} a_k z^{-k} is the denominator polynomial of degree N, typically with N \geq M for proper filters.https://www.dsprelated.com/freebooks/filters/Transfer_Function_Analysis.html The impulse response h of the system is the inverse z-transform of H(z), which, for IIR filters, extends infinitely due to the feedback, hence the name infinite impulse response.https://www.dsprelated.com/freebooks/filters/Z_Transform.htmlAnalysis and Properties
Poles, Zeros, and Frequency Response
In infinite impulse response (IIR) filters, the transfer function H(z) = \frac{B(z)}{A(z)} is characterized by its poles and zeros, which are the roots of the denominator and numerator polynomials, respectively.[27] Zeros are the values of z where B(z) = 0, resulting in H(z) = 0, and their locations in the z-plane directly influence the nulls in the frequency response.[27] A zero located on the unit circle at z = e^{j\omega_0} produces a complete null (zero gain) at frequency \omega = \omega_0, while zeros inside or outside the unit circle create partial attenuation at nearby frequencies, with the depth of the null increasing as the zero approaches the unit circle.[28] This placement allows designers to target specific frequencies for suppression, such as in notch filters where zeros are positioned to cancel unwanted tones.[27] Poles are the values of z where A(z) = 0, causing |H(z)| to approach infinity, and they govern the resonance peaks and decay rates of the filter's response.[27] The radial distance of a pole from the origin determines the decay rate of the corresponding exponential component in the impulse response, with poles closer to the unit circle yielding slower decay and higher Q-factor resonances.[27] Clustering poles near the unit circle enhances sharp frequency transitions, such as steep roll-offs in bandpass or high-pass filters, by amplifying the response at the pole's angular frequency while maintaining overall filter selectivity.[28] The frequency response of an IIR filter is obtained by evaluating H(z) on the unit circle, setting z = e^{j\omega} for |z| = 1, which yields H(e^{j\omega}).[28] The magnitude |H(e^{j\omega})| describes the gain as a function of normalized frequency \omega (ranging from -\pi to \pi), revealing passband and stopband characteristics shaped by the proximity of poles and zeros to points on the unit circle.[28] The phase response is given by \arg(H(e^{j\omega})), which exhibits nonlinear behavior due to the pole-zero configuration, often leading to phase distortion in IIR designs.[27] For example, a low-pass IIR filter can be realized with a pair of complex-conjugate poles placed inside the unit circle near z = 1 (corresponding to low frequency \omega \approx 0), which boosts low-frequency gain and provides smooth attenuation at higher frequencies.[27] Zeros may be positioned near z = -1 to further sharpen the cutoff, resulting in a magnitude response that closely approximates an ideal low-pass shape with minimal order.[28]Stability Conditions
Stability in infinite impulse response (IIR) filters is typically assessed using the bounded-input bounded-output (BIBO) criterion, which requires that every bounded input sequence produces a bounded output sequence.[29] For linear time-invariant (LTI) discrete-time systems described by linear constant-coefficient difference equations, BIBO stability holds if and only if the impulse response h is absolutely summable, i.e., \sum_{n=-\infty}^{\infty} |h| < \infty.[29] For causal IIR filters with rational transfer functions H(z) = \frac{B(z)}{A(z)}, where A(z) is the denominator polynomial, BIBO stability is equivalent to all poles of H(z) lying strictly inside the unit circle in the z-plane, meaning |p_i| < 1 for every pole p_i.[30] This condition ensures that the region of convergence of H(z) includes the unit circle |z| = 1, allowing the frequency response to be well-defined and the impulse response to decay to zero.[30] If any pole lies on or outside the unit circle (|p_i| \geq 1), the system is unstable, as the impulse response contains terms that do not decay or grow exponentially, leading to unbounded output growth for bounded inputs.[30] To verify that all roots of the denominator polynomial A(z) = a_0 + a_1 z + \cdots + a_N z^N (with a_N > 0) lie inside the unit circle without explicitly solving for the roots, the Jury stability test provides a tabular algebraic criterion. This method, a simplification of the Schur-Cohn algorithm for real coefficients, constructs a table iteratively from the polynomial coefficients and checks specific conditions on the table entries. The Jury table begins with two rows: the first row contains the coefficients [a_0, a_1, \dots, a_N], and the second row is the reverse [a_N, a_{N-1}, \dots, a_0]. Subsequent rows are generated by computing elements b_k = -\frac{1}{a_0} \det \begin{vmatrix} a_0 & a_{N-k} \\ a_N & a_k \end{vmatrix} for the third row, and continuing similarly with decreasing polynomial degrees until a single element remains. Necessary conditions for stability include A(1) > 0, (-1)^N A(-1) > 0, and |a_0| < a_N. The full set requires that the absolute values of the first-column elements strictly decrease: |b_0| < |a_0|, and so on for subsequent rows. For low-order filters, the test simplifies significantly. For a first-order polynomial A(z) = a_0 + a_1 z (with a_1 > 0), stability requires |a_0| < a_1. For a second-order polynomial A(z) = a_0 + a_1 z + a_2 z^2 (with a_2 > 0), stability requires |a_0| < a_2, a_0 + a_1 + a_2 > 0, and a_0 - a_1 + a_2 > 0. The Jury table is:| Row | z^0 | z^1 | z^2 |
|---|---|---|---|
| 1 | a_0 | a_1 | a_2 |
| 2 | a_2 | a_1 | a_0 |
| 3 | b_0 | b_1 |