logoalt Hacker News

Noise Filtering Using €1 Filter (2020)

86 pointsby dsego12/09/202434 commentsview on HN

Comments

duped12/09/2024

Why are we reinventing wheels and giving them bad names

This is an exponential moving average aka first order average and has been used for decades. It's introductory material in any DSP class.

There are multiple varying derivations of the coefficients that have different meanings, the best one for this example would be as an approximation of an N-point moving average (derivation of that is an exercise to the reader, but it's like five minutes of whiteboarding)

show 3 replies
tobinfricke12/09/2024

This has the same vibes as "Tan's method", wherein someone managed to rediscover and publish the well-known trapezoidal rule for integration from Calculus in a medical journal

https://academia.stackexchange.com/questions/9602/rediscover...

show 1 reply
Tade012/09/2024

I "invented" this filter in middle school when I was deep into audio processing but didn't have the theoretical foundations yet.

Adding a βX_{i-2} term allows for a filter with sharper cutoff, but makes determining the parameters more difficult.

The Z-transform is helpful here:

https://en.wikipedia.org/wiki/Z-transform

show 1 reply
roger_12/09/2024

A normal EWMA filter is a special case of a Kalman filter and I bet this could be re-cast as one too. Might need an extra state or adaptive process noise though.

show 1 reply
CasperH2O12/09/2024

We've been happily using this algorithm for motion sensor (IMU, gyroscope and accelerometer) filtering to game control input for some time in the open source application Handheld Companion [1].

There's also another nice page with explanation on how to tune the parameters [2] and there's a great visual with your mouse [3].

[1] https://github.com/Valkirie/HandheldCompanion

[2] https://gery.casiez.net/1euro/

[3] https://gery.casiez.net/1euro/InteractiveDemo/

echoangle12/09/2024

The title on HN includes „€1“, the original uses the „1€“ (which makes more sense I think, even when considering the reference to $1).

show 5 replies
rzzzt12/09/2024

Patient following of links resolves the mystery I'm sure everyone is asking:

    The ‘1€’ name is an homage to the $1 recognizer [10]: we believe
    that the 1€ filter can make filtering input signals simpler and
    better, much like the $1 recognizer did for gestures
https://dl.acm.org/doi/10.1145%2F2207676.2208639?cid=8110016...
show 4 replies
meindnoch12/09/2024

Ok. And where's the Bode plot?

show 1 reply
anothertroll12312/09/2024

[dead]