# Recursive Filters: SMA, EMA, Low-Pass, and a Tiny Kalman for Noisy Data

Original title: Recursive Filters: SMA, EMA, Low‑Pass, and a Tiny Kalman

> Hacker News story 49080031 · language: en · submitted 2026-07-28
> Web version: https://zeli.app/story/49080031
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 59 · by [kamilstaszewski](<https://news.ycombinator.com/user?id=kamilstaszewski>) · 💬 11
[original](<https://www.staszewski.xyz/blog/recursive-filters/>) · [HN discussion](<https://news.ycombinator.com/item?id=49080031>)

## Summary

I explore recursive filters like SMA, EMA, low-pass, and a simplified 1D Kalman filter for smoothing noisy data streams. These methods offer O(1) memory and compute efficiency, making them ideal for embedded systems and real-time applications. I explain the intuition behind each approach, how to tune their parameters, and when to choose one over the other for optimal performance.

## Key quote

> Recursive filters that we'll use, all use constant-size state. That's why they're common in embedded systems, robotics control loops, mobile sensor smoothing and telemetry.

## HN discussion (11 comments)

### [deepsun](<https://news.ycombinator.com/item?id=49105030>)

> Too basic, I'm not sure anyone needs that to solve the task as basic would need to read an article, it's obvious.
>
> \> Tune by eyeballing lag vs. noise.
>
> In any serious installations (more than a homelab) you want some numeric metrics, not eyeballing. E.g. management or next engineer may reasonably ask "why alpha is 0.8? what's the rationale, why not 0.85", you want some formula to show it's what we want.

### [adenjoe](<https://news.ycombinator.com/item?id=49106195>)

> Good

---

## Cite

- Page: https://zeli.app/story/49080031
- Date: 2026-07-28
- Source: staszewski.xyz (https://www.staszewski.xyz/blog/recursive-filters/)
- Hacker News: https://news.ycombinator.com/item?id=49080031

## Other languages

- zh: https://zeli.app/zh/story/49080031 · markdown: https://zeli.app/zh/story/49080031.md
