Hacker News new | past | comments | ask | show | jobs | submit login
Noise Filtering Using €1 Filter (2020) (jaantollander.com)
92 points by dsego 34 days ago | hide | past | favorite | 38 comments



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)


But an N-point moving average isn't adaptive, no? It has lag, this filter can adjust the smoothing effect to reduce lag. The exponential moving average is just one part of the presented filter, that's not the innovation here.



This is a nonlinear filter because of the way alpha is determined. Since this is in SIGCHI, I assume the actual novelty here is "this filter has behavior that feels right to interactive users, (and is also computationally cheap)".


Your criticism is the reason for the name though


Yeah, what the hell? This is the most basic IIR filter in existence.


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...


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


Me too, playing with Microsoft Excel as a child, creating series where the next cell depends on the previous one.


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.


How is EWMA a special case of Kalman? I typically frame it in terms of laplace/Z transform, in which case it's just a 1-pole LPF


It’s actually shown in the Wikipedia article: https://en.wikipedia.org/wiki/Kalman_filter#Details


I don't see the EWMA mentioned anywhere there?


"A more intuitive way to express the updated state estimate..."


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/


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


The original algorithm[1] comes from people working at a French university. In France we put the currency directly after the amount, without space : 1€.

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


Euro sign can be used before the amount, depending on the language and local norms, although I’ve seen it mostly after, separated by a space (150 €).


In English the currency symbol is typically before the number, whereas especially in Europe (with exceptions e.g. Switzerland) it is typically after the number. The title here is kind of correct in English I'd say, but the author is Dutch who happens to write in English.


At least with American currency it varies, e.g. one dollar is $1 while one penny is 1¢.


This actually is useful, because it allows the symbols to visual indicators when reading currency figures and can be used in a programmatic way. $ becomes a start marker for the beginning of a currency figure where the most significant digit is immediately after the marker and anything remaining after flows from that, and the same is true for cents where the symbol acts as an end marker and infers a lower bound. They can almost be thought of as start and end markers in regex, although they are not used together so not exactly that way.

It makes a sort of rational sense, at least to me.


The rationale I've always heard for having the $ at the beginning of the number was so that a handwritten value on, say, a check couldn't be modified by sticking a number at the beginning. 1.00$ could be forged into 91.00$, but not so with $1.00.


That rationale makes sense, and pretty much aligns with what I mean by a visual marker.


In the before-times (before the euro), we dutch used to write fl123,45 So putting the euro symbol in front comes naturally.


I wonder if it's because of the proximity to the UK, and that it influenced the choice of where to put it.


Interesting, I knew that it was written $1 for dollar but thought it depends on the currency, not the language.


My best answer is it depends on the language and country. E.g. Germans will write it after the number, whereas Swiss, who also officially speak German, will write it before the number. And yes, I needed to display some prices on a page recently, that had versions for Germany and Switzerland :-).


In Dutch the currency symbol always comes before the number as well, so this is intentional of the author.


Except he wrote in English, not Dutch :-)


Yes exactly, my point was that it works the same in English and Dutch. But other comments mentioned how its based on a French paper, where they do place the currency after the amount.


Ah, I'm sorry, I totally misread that.


Dan was my masters advisor and he’s Canadian, they used the French “spelling” because it’s a French paper.


It was moderated I think, the year 2020 was added as well.


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...



But if they wanted to do the homage to $1 recognizer, shouldn't they call it €0.95 filter?

Edit: nvm, just realized they included the VAT


But now I gotta know why it's called the $1 recognizer! One question solved, another opened.

Edit: > It's because the algorithm is easy to implement and efficient in terms of compute usage to match a gesture. It's a "cheap and easy" recognizer, a $1 recognizer.


Ok. And where's the Bode plot?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: