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.
Glossary
Infinite Impulse Response (IIR) Filter

What is an Infinite Impulse Response (IIR) Filter?
A core digital filter for real-time sensor data processing on resource-constrained devices.
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.
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.
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.
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.
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.
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.
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.
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.
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 / Metric | Infinite Impulse Response (IIR) Filter | Finite 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 |
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.
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.
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms in Sensor Data Processing
Infinite Impulse Response (IIR) filters are a cornerstone of real-time signal conditioning on resource-constrained devices. Understanding their relationship to these core DSP concepts is essential for designing efficient sensor pipelines.
Finite Impulse Response (FIR) Filter
A Finite Impulse Response (FIR) filter is a digital filter whose output depends only on a finite number of past and present input samples. Unlike IIR filters, FIR filters have no feedback loop, making them inherently stable and providing a linear phase response, which preserves the shape of a signal. This comes at the cost of computational efficiency, often requiring many more coefficients than an IIR filter to achieve a comparable frequency selectivity.
- Key Contrast with IIR: FIR filters are always stable and have a linear phase, while IIR filters are more computationally efficient but can be unstable and have a non-linear phase.
- Use Case: FIR filters are preferred in applications where signal shape integrity is critical, such as in communications or audio crossover networks, despite their higher computational load.
Digital Signal Processing (DSP)
Digital Signal Processing (DSP) is the overarching discipline of manipulating discrete-time signals using mathematical algorithms. IIR filters are a fundamental tool within the DSP toolkit, used for operations like filtering, noise reduction, and feature extraction on digitized sensor data. The core challenge in TinyML is executing these DSP algorithms—including IIR filters—within the severe memory and compute constraints of microcontrollers.
- Core Operations: Includes filtering (IIR/FIR), transforms (FFT, DCT), convolution, and correlation.
- TinyML Context: Efficient DSP is the preprocessing backbone for on-device machine learning, turning raw sensor streams into clean, informative features for model inference.
Sensor Fusion
Sensor fusion is the process of combining data from multiple, often heterogeneous, sensors to produce a more accurate, complete, and reliable estimate of the environment or system state than is possible with a single sensor. IIR filters are frequently employed at the front end of fusion pipelines to condition individual sensor streams (e.g., smoothing accelerometer data) before they are fused using algorithms like the Kalman filter.
- Role of IIR: Acts as a pre-filter to reduce high-frequency noise and artifacts from individual sensors like IMUs or microphones.
- Example: In a drone, an IIR low-pass filter might smooth raw gyroscope data before it is fused with accelerometer and magnetometer data in a complementary filter to estimate orientation.
Kalman Filter
A Kalman filter is a recursive, optimal estimation algorithm that uses a series of measurements observed over time, containing statistical noise, to produce estimates of unknown variables. While both are recursive, the Kalman filter is a state-space model that optimally fuses predictions with measurements, whereas an IIR filter is a simpler, fixed-coefficient filter for shaping frequency response. They are often used in sequence: IIR for initial signal conditioning, Kalman for dynamic state estimation.
- Contrast: Kalman filters dynamically adjust their internal model based on uncertainty; IIR filters apply a static transfer function.
- Complementary Use: A lightweight, fixed-gain Kalman filter (e.g., for tilt estimation) may follow an IIR pre-filter stage on a microcontroller.
Moving Average Filter
A moving average filter is a specific, simple type of Finite Impulse Response (FIR) filter where each output point is the average of a window of previous input points. It is a common baseline for smoothing. Compared to an IIR filter like a single-pole low-pass, a moving average requires more memory (to store the window) and computation per sample for similar smoothing effects but guarantees stability and a linear phase.
- Efficiency Trade-off: An exponential moving average (EMA), which is an IIR formulation, can approximate a moving average with constant memory and computation, making it preferable for TinyML.
- Typical Use: Quick, simple smoothing of sensor readings (e.g., temperature) where computational simplicity is valued over precise frequency control.
Analog-to-Digital Converter (ADC) Sampling & Aliasing
ADC Sampling is the process of converting a continuous analog sensor signal into discrete digital values. Aliasing is a critical distortion that occurs when a signal contains frequencies higher than half the sampling rate (the Nyquist frequency). IIR filters are crucial as anti-aliasing filters applied in the digital domain after oversampling, or their analog equivalents are used before the ADC to bandlimit the signal.
- Nyquist Rate: The minimum sampling frequency (twice the highest signal frequency) to avoid aliasing.
- IIR's Role: A sharp digital IIR low-pass filter can be used in a decimation filter chain to reduce the sample rate of an oversampled signal while aggressively removing high-frequency content to prevent aliasing.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us