Skip to content
CoreSource checked

IIR Filter

Filters a signal with feedback from previous outputs as well as current and previous inputs.

Quick Facts

Compact metadata for implementation and discovery.

Category
Signal Processing
Difficulty
Intermediate
Family
Digital Filter
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
2
Code example
Ready
Visualization
Ready
Aliases
Infinite Impulse Response Filter

Overview

An IIR filter uses a recursive difference equation, allowing compact filters with long impulse responses but requiring attention to stability and coefficient precision.

Core Concepts

feedbackdifference equationrecursive filterstability

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(k)

Average

O(n k)

Worst

O(n k)

Space

O(k)

When to Use

  • Use when a sharp response is needed with relatively few coefficients.
  • Use when nonlinear phase is acceptable or can be compensated.

When Not to Use

  • Avoid when exact linear phase is required without extra processing.
  • Avoid when coefficient quantization could make the recursive filter unstable.

What It Does

  • Filters a signal using feedback from previous output samples
  • Uses feedback and difference equation to guide the work.
  • Produces filtered signal.

Use Cases

  • Filtering noisy signals
  • Spectral analysis
  • Audio and sensor processing

Inputs

  • Sampled signal
  • Filter or transform parameters

Outputs

  • Filtered signal
  • Spectrum or feature representation

Key Formulas (1)

IIR recurrence

y[n] = sum bk x[n−k] − sum ak y[n−k]
y[n] = sum b_k x[n-k] - sum a_k y[n-k]

Computes output from current inputs and previous outputs.

Pseudocode

  1. 1.Load feedforward and feedback coefficients
  2. 2.Initialize input and output history
  3. 3.For each sample
  4. 4.Compute feedforward contribution from recent inputs
  5. 5.Subtract or add feedback contribution from previous outputs by convention
  6. 6.Store and return the output sample

Canonical Example

Input
y[n] = 0.5*x[n] + 0.5*y[n-1], x = [1,0,0]
Output
y starts [0.5, 0.25, 0.125]
Explanation
The feedback term keeps producing a decaying response after the input stops.

Implementation Notes

  • Use stable design methods and inspect pole locations.
  • Consider biquad sections instead of one high-order direct-form filter.
  • Test impulse, step, and steady-state responses.

Common Pitfalls

  • Feedback coefficients can place poles outside the stable region.
  • Direct-form implementations may suffer from numerical precision issues.
  • Filter state must be initialized and reset deliberately.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show the input signal beside the filtered, transformed, or reconstructed output.

IIR Filter mechanism walkthrough step 1 of 6x₀x₁x₂x*
Step 1 of 6: Load feedforward and feedback coefficients
signal-processing-mechanism

Notes

IIR filters are efficient, but stability and numeric representation are part of the implementation.

Sources (1)

What each reference supports for this entry.

Discrete-Time Signal Processing

Book

Signal-processing reference for digital filters, convolution, spectral analysis, windows, resampling, and transform-based methods.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toFIR Filter

IIR filters use feedback, while FIR filters use finite convolution.

Tags

Signal ProcessingFilter DesignFilteringRecursive Filter