EmbeddedRelated.com
The 2026 Embedded Online Conference
Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter

Ten Little Algorithms, Part 2: The Single-Pole Low-Pass Filter

Jason Sachs
TimelessIntermediate

Other articles in this series: Part 1: Russian Peasant Multiplication I’m writing this article in a room with a bunch of other people talking, and while sometimes I wish they would just SHUT UP, it would be better if I could just...


Summary

This article explains the single-pole (first-order) low-pass filter used widely in embedded systems for smoothing sensor data and reducing high-frequency noise. The reader will learn the filter's discrete-time derivation, how to compute and tune the filter coefficient from cutoff frequency and sample rate, and practical embedded-C implementation tips including fixed-point concerns and performance trade-offs.

Key Takeaways

  • Derive the discrete-time single-pole low-pass equation (exponential moving average) and understand its relation to the continuous RC filter.
  • Compute the filter coefficient (alpha) from cutoff frequency and sample rate and adapt it for varying sampling intervals.
  • Implement the filter efficiently in embedded C for microcontrollers and convert it to fixed-point/Q-format when needed.
  • Analyze filter behavior: latency, steady-state error, stability, and how cutoff choice trades off responsiveness vs noise rejection.

Who Should Read This

Embedded firmware engineers and developers working on microcontroller-based sensor smoothing, control loops, or IoT data conditioning who need a practical, implementation-focused guide to first-order low-pass filters.

TimelessIntermediate

Topics

Firmware DesignSensor InterfacingARM Cortex-MBare-Metal Programming

Related Documents


The 2026 Embedded Online Conference