New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Sensor spike filtering: keeping one bad reading out of your alarms

One bad sample should not wake anyone up, and a real upset should never be filtered away. A plausibility check and a count of readings in a row handle both.

Sensor spike filtering keeps one bad reading from opening an alarm. Two checks do most of the work: a plausibility check that ignores values the sensor or the process cannot produce, and a persistence rule that waits for several readings in a row before raising. Together they stop a single bad sample without hiding a real, sustained upset.

I think one false page at night does more damage than it looks, because it teaches people to doubt the next one. On the screen, red only works when it is rare, as I argued in why most of an operator screen should be grey, and a value that turns red for a single sample wastes it.

How do you stop false alarms from sensor spikes?

Check each reading against what is physically possible, then against how fast the value can change. Anything outside either limit is a suspect reading that should not open an alarm on its own.

The plausibility limits come from two places: the sensor’s measuring range and the process itself. A 4–20 mA loop that reads near 0 mA usually means a broken wire, not an empty tank. A rate-of-change limit is the second filter. Decide how far the value can move between two readings, given what the process can physically do, and treat a bigger jump as suspect.

Spikes have ordinary causes: electrical noise, a loose connector, a radio packet decoded wrongly, or a register read with the wrong word order (see Modbus register addressing and 32-bit floats).

How do you tell a sensor spike from a real alarm?

A real process change persists and shows up in related signals; a spike usually does neither. These signs help:

SignPoints to a sensor faultPoints to a process change
DurationOne or two samples, then backStays, or keeps moving
ValueOutside the sensor’s range, or a fixed error valueInside the range
ShapeA jump with no slopeA slope, or a step that holds
Related signalsNothing else movesFlow, pump current or a neighbouring sensor moves too

The duration row is what a persistence rule checks, and the value row is the plausibility check. The other two are for the person who looks at the trend afterwards.

Should you filter data before alarming?

Filter the alarm decision and keep the raw data. A moving average delays a real rise and flattens a short peak, and deleted spikes are gone for whoever has to diagnose the sensor later.

A persistence rule has a price you can calculate: requiring N readings in a row delays a real alarm by N − 1 reporting intervals.

Device reports everyN = 2N = 3
10 seconds10 seconds20 seconds
1 minute1 minute2 minutes
15 minutes15 minutes30 minutes

So a fast sensor can afford a count of three, while a slow one should get one or two and lean on the plausibility check instead.

Hermetry connects field devices to live dashboards, rules and alerts, and there the persistence rule is the debounce setting on an alarm rule. Counted in readings, the alarm opens on the Nth reading in a row whose condition is true, and one reading the other way resets the count. Raise and clear each accept 1 to 86,400, and the default of 1 and 1 follows every reading. The page on debounce, hysteresis and dampening suggests a count of 2 to 3 for devices that report every minute.

Filtering cannot catch silence. A sensor that stops sending needs an offline alarm, and one stuck at the same value needs a separate no-change check.

Frequently asked questions

What plausibility limits should I set for a sensor?

Take the sensor’s measuring range from its datasheet as the outer limit, then narrow it to what the process can physically reach, with a margin. Write the reason next to each limit, and review the limits whenever the sensor or the process changes.

Does a persistence rule delay real alarms?

Yes, by N − 1 reporting intervals, so choose N from the reporting rate. For conditions that threaten people or equipment, a monitoring alarm is not the protection: that job belongs to the control or safety system, and the alarm only tells people what happened.

Is hysteresis the same as a persistence rule?

No. A persistence rule decides how many readings in a row it takes to raise or clear an alarm. Hysteresis is a margin on the clear side: an alarm that opened above 80 clears only once the value falls past 80 minus the margin. Use both against noise, for different jobs.

Share

See your field data live this week

Start a trial in your region with your first devices, or book a demo and bring your own use case.