ยท Hankyu Kim ยท Filter  ยท 3 min read

Low Pass Filter (LPF)

A low pass filter reduces noise while emphasizing recent measurements, overcoming the limitations of uniform averaging in moving average filters.

A low pass filter reduces noise while emphasizing recent measurements, overcoming the limitations of uniform averaging in moving average filters.

Introduction

This post introduces the Low Pass Filter (LPF) from a control systems perspective.

In electrical engineering, LPFs are commonly studied in signal processing or image processing courses.
They are typically used to attenuate high-frequency noise while preserving low-frequency components.

Rather than focusing on hardware implementations using R, L, and C components, this post explains LPF as a software-based recursive filter, building directly on moving average filters.


Review: Limitation of the Moving Average Filter

The moving average filter improves upon the simple average by considering only a recent window of data.

However, it has a critical limitation:

All samples within the window are treated equally.

Consider the sequence:

[1,2,3,4,5,6,7][1,2,3,4,5,6,7]

Assume a window size of n=5n=5.

At time kk, the window becomes:

[2,3,4,5,6][2,3,4,5,6]

The moving average assigns each value a weight of 1/51/5.

But observe:

  • 2 is 5 seconds old
  • 3 is 4 seconds old
  • 6 is the most recent measurement

Despite this, all samples contribute equally.


Motivation for Low Pass Filtering

In real systems, recent measurements are usually more informative than older ones.

A natural question arises:

What if we assign more weight to newer data?

For example, instead of computing

2+3+4+5+65=4\frac{2+3+4+5+6}{5} = 4

Super wide

we could emphasize the most recent value:

2+3+4+5+1.5ร—65.5โ‰ˆ4.18\frac{2+3+4+5+1.5 \times 6}{5.5} \approx 4.18

Super wide

This produces an estimate that reacts faster to changes while still suppressing noise.


Core Idea of the Low Pass Filter

A low pass filter can be interpreted as a weighted moving average, where newer samples receive higher importance.

In recursive form:

xk=(1โˆ’a)โ€‰xห‰kโˆ’1+aโ€‰xkx_k = (1-a)\,\bar{x}_{k-1} + a\,x_k

where:

  • xห‰kโˆ’1\bar{x}_{k-1} is the previous filtered value
  • xkx_k is the current measurement
  • aa is a weighting factor with 0<a<10 < a < 1

The parameter aa controls how strongly the filter reacts to new data.


Comparison with Moving Average

  • Moving Average
    Equal weights for all samples in the window

  • Low Pass Filter
    Larger weight on recent samples
    Smaller weight on older information

This difference becomes increasingly important when:

  • The signal changes rapidly
  • The window size is large
  • Tracking accuracy matters

Visual Comparison Insight

When tracking a signal such as:

y=x+1+noisey = x + 1 + \text{noise}
  • Moving average exhibits noticeable lag
  • Low pass filter follows the trend more closely

Even with a small number of samples, the improvement is visually apparent.


Practical Recursive Update

In implementation, LPF often appears as:

xห‰k=xห‰kโˆ’1+a(xkโˆ’xห‰kโˆ’1)\bar{x}_k = \bar{x}_{k-1} + a \left( x_k - \bar{x}_{k-1} \right)

This form highlights that:

  • The filter corrects the previous estimate
  • The correction magnitude depends on aa

This structure is fundamental in control and estimation theory.


Why This Matters

  • LPF balances noise suppression and responsiveness
  • It generalizes moving average filters
  • It directly leads to Kalman filtering concepts

Choosing aa appropriately is critical:

  • Small aa โ†’ smoother but slower response
  • Large aa โ†’ faster response but more noise

Summary

  • Moving average filters treat all samples equally
  • Low pass filters emphasize recent measurements
  • LPF reduces lag while maintaining noise suppression
  • LPF forms the conceptual bridge to Kalman filters

Weighting recent information is the key to practical filtering.

Back to Blog
Kalman Filter (Part 1)

Kalman Filter (Part 1)

The Kalman filter is an optimal recursive estimator for linear systems, combining system models and noisy measurements through simple matrix operations.

Moving Average Filter

Moving Average Filter

The moving average filter reduces noise while preserving the dynamic behavior of time-varying signals by averaging only a recent window of measurements.

Average Filter

Average Filter

The average filter is the simplest form of recursive estimation. Despite its simplicity, it provides strong noise reduction and forms the foundation of more advanced filters such as the Kalman filter.

Extended Kalman Filter (EKF)

Extended Kalman Filter (EKF)

The Extended Kalman Filter applies the Kalman filter to nonlinear systems by locally linearizing system and measurement models using Jacobians.