Inferensys

Glossary

Infinite Impulse Response (IIR) Filter

An Infinite Impulse Response (IIR) filter is a recursive digital filter whose current output depends on both past inputs and past outputs, enabling efficient frequency response with fewer coefficients than FIR filters.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
SIGNAL PROCESSING

What is an Infinite Impulse Response (IIR) Filter?

A core digital filter for real-time sensor data processing on resource-constrained devices.

An Infinite Impulse Response (IIR) filter is a recursive digital filter whose current output depends on both past inputs and past outputs, defined by a difference equation with feedback. This feedback, using recursive coefficients, creates an impulse response that is theoretically infinite in duration, allowing for highly selective frequency responses with far fewer computational operations than a comparable Finite Impulse Response (FIR) filter. This efficiency makes IIR filters a cornerstone of real-time signal processing in TinyML and embedded systems.

The primary trade-off for this computational efficiency is that the feedback loop can introduce potential instability and a non-linear phase response. Stability is guaranteed only if the filter's poles—the roots of its denominator polynomial—lie within the unit circle in the z-plane. Common design forms include the Direct Form I & II, and more numerically stable variants like the biquad (second-order sections), which are prevalent in audio processing and sensor fusion algorithms for microcontrollers.

SENSOR DATA PROCESSING

Key Characteristics of IIR Filters

Infinite Impulse Response (IIR) filters are a core component of real-time signal processing on resource-constrained devices. Their defining traits—efficiency, feedback, and specific design trade-offs—make them essential for TinyML applications where computational power and memory are severely limited.

01

Recursive Feedback Structure

An IIR filter's output depends on both past inputs and past outputs, creating a recursive feedback loop. This is mathematically expressed by its difference equation:

y[n] = Σ (b_k * x[n-k]) - Σ (a_k * y[n-k])

Where a_k and b_k are the filter coefficients. The feedback of previous outputs (y[n-k]) allows for a much sharper frequency response with far fewer coefficients (taps) than an equivalent Finite Impulse Response (FIR) filter. This computational efficiency is critical for microcontrollers.

02

Potential for Instability

Because of its feedback path, an IIR filter's pole locations in the z-plane determine its stability. For a causal system to be Bounded-Input, Bounded-Output (BIBO) stable, all poles must lie inside the unit circle. This is a fundamental design constraint. Unstable filters exhibit unbounded output growth, even with a bounded input. Stability analysis is therefore a mandatory step in IIR filter design, unlike with inherently stable FIR filters.

03

Non-Linear Phase Response

IIR filters generally have a non-linear phase response across frequencies. This means different frequency components of a signal experience different time delays as they pass through the filter, potentially causing phase distortion. This is undesirable in applications where the signal's shape must be preserved, such as in digital communications or precise audio processing. For applications requiring linear phase (constant group delay), an FIR filter is typically chosen despite its higher computational cost.

04

Analog Filter Equivalents

IIR filters are often designed by transforming classic, well-understood analog filter prototypes (e.g., Butterworth, Chebyshev, Elliptic) into the digital domain using methods like the bilinear transform. This provides direct access to established filter characteristics:

  • Butterworth: Maximally flat passband.
  • Chebyshev: Steeper roll-off with passband ripple.
  • Elliptic (Cauer): Sharpest transition band with ripple in both passband and stopband. This heritage allows engineers to leverage analog design intuition for digital implementations.
05

Computational & Memory Efficiency

This is the primary advantage for TinyML. To achieve a given frequency selectivity (e.g., a sharp cutoff), an IIR filter requires significantly fewer coefficients and arithmetic operations per output sample than an FIR filter. This translates directly to:

  • Lower CPU cycles on the microcontroller.
  • Reduced memory for storing coefficients and delay line states.
  • Lower power consumption, a critical metric for battery-operated sensor nodes. This efficiency makes IIR filters the default choice for many real-time filtering tasks on MCUs.
5-10x
Typical Efficiency Gain vs. FIR
06

Sensitivity to Coefficient Quantization

When implemented on fixed-point microcontrollers, IIR filter coefficients must be quantized to a limited bit-width. This quantization can subtly shift the pole and zero locations in the z-plane, potentially leading to:

  • Frequency response deviation from the designed ideal.
  • Limit cycle oscillations (small, persistent output variations with zero input).
  • In severe cases, movement of poles outside the unit circle, causing instability. This necessitates careful fixed-point design and scaling during implementation to maintain performance and stability.
DIGITAL FILTER ARCHITECTURES

IIR vs. FIR Filter: A Technical Comparison

A direct comparison of core technical attributes between Infinite Impulse Response (IIR) and Finite Impulse Response (FIR) filters, focusing on implications for TinyML and embedded sensor processing.

Feature / MetricInfinite Impulse Response (IIR) FilterFinite Impulse Response (FIR) Filter

Impulse Response Duration

Theoretically infinite (decays asymptotically)

Finite and equal to the filter order (N)

Recursion / Feedback

Transfer Function Poles

Has poles (roots of denominator polynomial)

Poles only at the origin (all-zero filter)

Inherent Stability

Conditionally stable (depends on pole locations)

Unconditionally stable

Phase Response

Non-linear phase (phase distortion)

Can be designed for exact linear phase

Typical Computational Efficiency (for similar roll-off)

High (requires fewer coefficients)

Low (requires many more coefficients)

Memory Footprint (coefficient storage)

Small (e.g., 4-10 coefficients)

Large (e.g., 50-200+ coefficients)

Design Methodology

Often via analog filter prototypes (Butterworth, Chebyshev)

Window method, Parks-McClellan (Remez) algorithm

Sensitivity to Coefficient Quantization

High (can affect stability & frequency response)

Low (robust to quantization effects)

Latency (Group Delay)

Variable, typically lower

Fixed and predictable (N/2 samples for linear phase)

Primary TinyML Advantage

Extreme computational & memory efficiency

Deterministic stability & linear phase

SENSOR DATA PROCESSING

Common IIR Filter Applications in TinyML

Infinite Impulse Response (IIR) filters are computationally efficient digital filters ideal for TinyML, where memory and CPU cycles are severely constrained. Their recursive nature allows for sharp frequency responses with few coefficients, making them a cornerstone for real-time sensor data conditioning on microcontrollers.

06

Implementation Considerations & Trade-offs

While powerful, IIR filters require careful design on resource-limited hardware.

  • Fixed-Point Arithmetic: Coefficients and state variables must use Q-format fixed-point math to avoid floating-point overhead, risking overflow and coefficient quantization issues.
  • Stability: Pole locations must remain inside the unit circle. Coefficient quantization can push an otherwise stable filter into instability.
  • Limit Cycles: Low-bit-width implementations can cause small oscillations in the output even with zero input.
  • Tooling: Libraries like ARM CMSIS-DSP provide optimized fixed-point IIR functions (arm_biquad_cascade_df1_f32) that are essential for performant TinyML deployment.
SIGNAL PROCESSING

Frequently Asked Questions About IIR Filters

Infinite Impulse Response (IIR) filters are a cornerstone of efficient digital signal processing on resource-constrained devices. This FAQ addresses common technical questions about their design, implementation, and trade-offs for TinyML and embedded systems.

An Infinite Impulse Response (IIR) filter is a type of digital filter whose current output depends on both past inputs and past outputs, creating a feedback loop. This is mathematically described by a difference equation: y[n] = Σ (b_k * x[n-k]) - Σ (a_j * y[n-j]), where x is the input, y is the output, and b_k and a_j are the feedforward and feedback coefficients, respectively. The feedback of previous outputs gives the filter an impulse response that, in theory, can continue indefinitely—hence 'infinite.' This recursive structure allows IIR filters to achieve sharp frequency roll-offs (like those of analog filters) with far fewer coefficients than an equivalent Finite Impulse Response (FIR) filter, making them highly computationally efficient for real-time processing on microcontrollers.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.