Low-Pass Filter
The exponential moving average — the most-deployed filter on any robot. Smooth almost any noisy sensor in one dt-aware line of code.
Explore Control Lab lessons about smoothing, with robotics examples, equations, and interactive experiments.
View all tagsThe exponential moving average — the most-deployed filter on any robot. Smooth almost any noisy sensor in one dt-aware line of code.
Averaging the last N readings equally. What it's good at, its two weaknesses (lag and outliers), and why it flattens peaks.
Fit a small polynomial to the window instead of a flat line. The same least-squares machinery that found your feedforward gains gives a filter that smooths noise without flattening the peaks a moving average destroys.