# Infinite impulse response **Infinite impulse response** (IIR) is the property, shared by many linear, time-invariant systems, of having an impulse response that never becomes exactly zero after any finite time, however small the remaining signal eventually gets. The property follows directly from feedback: a system whose output depends in part on its own past output keeps recirculating a fraction of every input indefinitely, in contrast to a [[Finite_impulse_response|finite impulse response]] system, built with no feedback, whose response is guaranteed to reach exactly zero after a fixed number of samples. Two microsims on this page carry the same second-order feedback loop: the primary one lets the reader tune a resonant biquad filter by cutoff and resonance directly, and a companion sketch isolates a single pole pair on the z-plane and shows its ringing stretch out as the pole is dragged toward, but never quite onto, the unit circle. Ordinary analog circuits built from resistors, capacitors and inductors are IIR systems by this same logic, since a capacitor's discharge decays exponentially forever in principle; most [[Digital_filter|digital filters]] built deliberately for a sharp, efficient response are also IIR, chosen for the same behaviour rather than falling into it by physical necessity. ## Implementation and design An infinite impulse response system is any [[Linear_time-invariant_system|linear, time-invariant]] system whose impulse response never becomes exactly zero for any finite time — the property that separates it from a finite impulse response system, whose response is guaranteed to hit zero after a fixed number of samples. Every ordinary analog circuit built from resistors, capacitors and inductors is an IIR system in this sense: a capacitor's voltage after a pulse decays exponentially and, in principle, forever, never reaching exactly zero in finite time. The digital case is built the same way conceptually, but deliberately: a difference equation that reuses its own past outputs, `y[n] = sum b_k*x[n-k] - sum a_k*y[n-k]`, recirculates a fraction of every impulse indefinitely through the feedback terms `a_k`, in contrast to the [[Finite_impulse_response|finite impulse response]] filter's purely feed-forward sum.[^stib076] Implementing an IIR filter therefore needs storage for past outputs as well as past inputs, but typically needs far fewer coefficients than an FIR filter would need to reach the same sharpness of cutoff, because feedback lets a handful of poles do the work that would otherwise take dozens of zeros. ## Transfer function derivation Taking the [[Z-transform|z-transform]] of the difference equation, using the shift property `x[n-k] -> z^-k X(z)`, turns the recurrence into an algebraic equation that rearranges into a ratio of two polynomials in `z^-1`, `H(z) = (b0 + b1*z^-1 + ... + bM*z^-M) / (1 + a1*z^-1 + ... + aN*z^-N)`, the filter's [[Transfer_function|transfer function]]. The roots of the numerator are its zeros and the roots of the denominator are its poles; a [[Finite_impulse_response|finite impulse response]] filter is the special, denominator-free case `H(z) = b0 + b1*z^-1 + ... + bM*z^-M` (Eq. 3-20 in one Portal Book's own notation),[^stib072] all of whose poles sit at the origin, and an infinite impulse response filter is exactly the general case with at least one pole somewhere else.[^stib076] The frequency response is this same H(z) evaluated on the unit circle, `H(w_hat) = H(e^{j*w_hat})`, with the digital frequency `w_hat` running from −π to π radians per sample,[^stib071] so that a pole close to the circle raises the magnitude of every frequency near it and a zero close to the circle lowers it — the mechanism both microsims on this page use to build a resonance out of nothing but two numbers.[^stib074] ## Stability A system's impulse response is the inverse [[Z-transform|z-transform]] of H(z), and for a pole at radius r and angle theta the corresponding term in that response is a sinusoid of frequency theta inside an envelope `r^n`: shrinking geometrically toward zero if `r < 1`, staying at constant amplitude forever if `r = 1`, and growing without bound if `r > 1`. An infinite impulse response filter is therefore stable exactly when every [[Pole–zero_plot|pole]] of its transfer function lies strictly inside the unit circle, and unstable the moment any pole reaches or crosses it — the single condition that a finite impulse response filter, with every pole pinned at the origin, satisfies automatically, and that an IIR filter must be checked for explicitly after every coefficient change. This is also why the never-quite-zero impulse response that gives the whole family its name is not a defect to be tolerated but the direct consequence of the same feedback that makes a sharp response possible from only a few coefficients: push a pole toward the rim to sharpen a resonance, and the decay of its ringing necessarily stretches out to match. ## Example A single conjugate pole pair at radius r and angle theta, with `a1 = -2*r*cos(theta)` and `a2 = r^2`, gives the second-order recursion `y[n] = b0*x[n] - a1*y[n-1] - a2*y[n-2]` a closed-form [[Impulse_response|impulse response]], `h[n] = b0 * r^n * sin((n+1)*theta) / sin(theta)`, for n ≥ 0 — a decaying sinusoid whose envelope `r^n` shrinks geometrically but, for any r strictly less than 1, is never exactly zero at any finite n, which is precisely the property the filter's name describes. One Portal Book's own worked figures place such a pole pair at r = 0.9 with theta at ±π/2 or ±5π/6 purely for illustration;[^stib078] the primary microsim instead lets the reader place the pole anywhere its sliders reach, raising r toward its maximum to stretch this envelope out nearly to the edge of the displayed window while sharpening the resonant peak at `w_hat = theta` in the magnitude response, and reporting, sample by sample, how far the tail has run. ## Advantages and disadvantages Set against a finite impulse response filter of comparable performance, an infinite impulse response filter typically needs far fewer coefficients, and so far less computation and memory, to reach a given cutoff sharpness, because its poles can sit close to the unit circle and produce a steep transition that would take a very long finite sum of terms to imitate. That efficiency is paid for in two ways. Stability is no longer automatic and must be verified whenever coefficients are quantised or adapted, since a pole nudged outside the unit circle by rounding turns a working filter into one whose output grows without bound; and an IIR filter's phase response is generally nonlinear, so different frequencies are delayed by different amounts and a pulse's shape can be smeared even where its spectrum passes through unattenuated, an effect a [[Finite_impulse_response|finite impulse response]] filter with symmetric coefficients avoids by construction. ## Design Methods Because a century of analog filter theory already provides well-understood prototypes, most IIR design methods work by carrying an existing continuous-time transfer function `H(s)` across into a discrete-time `H(z)` rather than starting from a blank specification. ### Impulse Invariance The impulse-invariance method chooses H(z) so that its impulse response is exactly the analog prototype's impulse response, sampled at the chosen rate. It preserves the time-domain shape of the response faithfully, but it maps the analog frequency axis onto the digital one directly, so any energy in the prototype above half the sampling rate folds back into the passband as aliasing; the method is therefore reserved for prototypes, generally [[Low-pass_filter|low-pass]], whose response is already negligible above that frequency. ### Step Invariance Step invariance matches the discrete and analog systems' response to a unit step rather than to an impulse, which is the more natural target when the prototype represents something like a physical actuator or a control loop that is normally driven by step changes rather than by impulses, at the cost of the same aliasing risk that limits impulse invariance to band-limited prototypes. ### Bilinear Transform The bilinear transform instead substitutes `s = (2/T)*(z-1)/(z+1)` into the analog H(s), a one-to-one map that folds the entire infinite analog frequency axis into the finite range up to the Nyquist frequency without any aliasing at all. The price is frequency warping: an analog cutoff at `f_a` lands at a digital frequency related to `f_a` by a tangent function rather than a straight line, so a designer using the bilinear transform first pre-warps the desired digital cutoff back through that same tangent relationship to find the analog prototype frequency that will land in exactly the right place. Because it avoids aliasing altogether, the bilinear transform is the default method in most modern [[Filter_design|filter-design]] software. ## Microsims The primary microsim, *IIR filter*, builds a single biquad section and lets the reader choose a preset — low-pass, high-pass, band-pass, notch or resonator — or tune the cutoff frequency and the resonance Q (0.5 to 20) directly with sliders. An animated signal-flow diagram shows the canonical direct-form-II-transposed structure computing the difference equation live; a stem plot shows the (necessarily truncated) impulse response; a magnitude-response panel sweeps from 0 to π radians per sample with the cutoff and the test-tone frequency both marked; and a scrolling scope overlays the input against the filtered output. *Try:* Select the Resonator preset and raise Q toward its maximum of 20, and watch the impulse response ring for most of the visible window while the magnitude response collapses to a single sharp spike at the cutoff. A second microsim, *Infinite impulse response*, isolates the single conjugate [[Pole–zero_plot|pole pair]] discussed in Example above. Two sliders set the pole radius r (about 0.5 to just under 1) and the pole angle theta, a button toggles between the IIR case and a finite-tap FIR case built from the same starting coefficients, and the impulse-response panel marks in words where the FIR case's taps end while the IIR case is left, honestly, still ringing at the edge of the window. A three.js companion, built from the same z-plane idea, follows one pole pair as it approaches the unit circle, from resonance to instability, in more depth than is covered here. *Try:* Push the pole-radius slider to its maximum, about r = 0.998, and watch the impulse response's decay stretch across nearly the whole visible window without ever quite finishing; then swing the pole-angle slider and watch the resonant frequency in the magnitude panel slide with it. ## Wikipedia : Wikitube **Strict pair:** [Wikipedia](https://en.wikipedia.org/wiki/Infinite_impulse_response) : [Wikitube](https://en.wikitube.io/wiki/Infinite_impulse_response) Skeleton mirrored at revision 1374323767. Prose, emphasis and the microsims are Wikitube's own. ## See also - [[Low-pass_filter]] - [[Z-transform]] - [[Pole–zero_plot]] - [[Digital_filter]] - [[Finite_impulse_response]] - [[Transfer_function]] - [[Linear_time-invariant_system]] ## References The stability criterion, the z-transform algebra and the three design-method derivations above are standard textbook material and are not separately footnoted beyond the figures below, per the Wikitube style guide §6.1. The sub-manual behind this run explicitly did not extract book 057's own IIR and pole chapters, so this article's citations are limited to the z-plane groundwork it does cover; the general IIR theory follows any standard digital-signal-processing text. [^stib072]: Stiber, M.; Stiber, B.; Larson, E. *Signal Computing: Digital Signals in the Software Domain*. 2020, p. 72 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/signal-computing-digital-signals-in-the-software-domain. CC BY-SA. [^stib076]: Stiber, M.; Stiber, B.; Larson, E. *Signal Computing: Digital Signals in the Software Domain*. 2020, p. 76 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/signal-computing-digital-signals-in-the-software-domain. CC BY-SA. [^stib071]: Stiber, M.; Stiber, B.; Larson, E. *Signal Computing: Digital Signals in the Software Domain*. 2020, p. 71 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/signal-computing-digital-signals-in-the-software-domain. CC BY-SA. [^stib074]: Stiber, M.; Stiber, B.; Larson, E. *Signal Computing: Digital Signals in the Software Domain*. 2020, p. 74 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/signal-computing-digital-signals-in-the-software-domain. CC BY-SA. [^stib078]: Stiber, M.; Stiber, B.; Larson, E. *Signal Computing: Digital Signals in the Software Domain*. 2020, p. 78 (PDF page). Open Textbook Library: https://open.umn.edu/opentextbooks/textbooks/signal-computing-digital-signals-in-the-software-domain. CC BY-SA. ## External links - *IIR filter* — live: https://editor.p5js.org/sciencenibber/full/2Gu0029id · fork: https://editor.p5js.org/sciencenibber/sketches/2Gu0029id - *Infinite impulse response* — live: https://editor.p5js.org/sciencenibber/full/9WZOrovZt · fork: https://editor.p5js.org/sciencenibber/sketches/9WZOrovZt <!-- Hubs: Signal_processing. Portals: PORTAL_Signal_Processing. Signal Processing portal wave 1 · 2026-09-17 · drafted. -->