Concept name: change thresholding?

Say I’m measuring some value, which fluctuates with respect to time.

And I want to sound an alarm if the value goes below or above certain limits.

Naive approaches like measuring the value every 100ms and either sounding the alarm or not, based on a discrete threshold at each instance, will be too “jittery”, because the value is constantly changing.

I know some of the techniques to get around this, but I can’t look up the topic because I don’t know what the collective name is for such techniques. Any suggestions?

Can’t you just take a moving average, and base your alarm on that? It’s not the most sophisticated sort of method, but it’s easy and probably good enough.

That would work well for some situations, but with noisy data it might be vulnerable to spikes.

The approach I’ve used before is to say that there’s a minimum time that the value must be over / under the threshold. This technique also has drawbacks though.

btw I used the example of sounding alarms just for clarity. In the general sense this is a problem that I’m sure comes up a lot, which is why it’s odd I can’t seem to find a good reference for it, or that googling things like “threshold” and “trigger” doesn’t immediately point me to a concept that joins those things.

What you want is hysteresis. The wikipedia article starts out inordinately complicated, but the section on control systems is what you want.

Thanks!
As well as finding the information I needed I now also have hysteresis and memristor in my vocabulary. :cool: