3.1 Anomaly detection and alarm intensity
In industrial production, anomaly detection is not the ultimate goal. Instead, the goal is to trigger alarms based on the degree of anomaly, thereby prompting operators to take appropriate actions to improve production efficiency or safety. The “anomaly score” previously presented only quantifies the anomaly degree at a specific time point and cannot trigger alarms.
Let Rg1 and Rg2 represent two anomaly score sequences, and let W(…) represent the function for calculating the anomaly intensity. From a fundamental viewpoint, W(…) should exhibit the following characteristics:
(1) The larger the anomaly score, the more intense the alarm:
For example:
Rg1=[0,0,0,0.2],Rg2=[0,0,0,0.5]
W(Rg1)<W(Rg2)
Because the anomaly score in Rg2 is larger than that in Rg1 at the same time point, the alarm for Rg2 should be more intense.
(2) The longer the duration of continuous anomalies, the more intense the alarm:
For example:
Rg1=[0,0.2,0,0.2],Rg2=[0,0,0.2,0.2]
W(Rg1)<W(Rg2)
Since Rg2 exhibits continuous anomalies, while Rg1 does not, the alarm for Rg2 should be more intense.
(3) The farther an anomaly point is from the current time point, the weaker its influence on the current alarm intensity:
For example:
Rg1=[0.2,0,0,0.2],Rg2=[0,0.2,0,0.2]
W(Rg1)<W(Rg2)
Since the anomaly score in Rg2 is more recent than in Rg1, the alarm for Rg2 should be more intense.
These characteristics necessitate a measure with a temporal accumulation effect to quantify the alarm’s intensity, which we call ‘alarm intensity’. Essentially, alarm intensity is a derived sequence of anomaly scores.
wni=W(Rg[-(k’+1)]i+1)
Where W(…) is the function used for calculating alarm intensity, and Rg[-(k’+1)]i+1 is a time series composed of the anomaly score sequence within the k’ interval preceding and including rgi. The alarm intensity sequence Wn, like Rg, is also a time series.
Similar to anomaly detection functions, there are theoretically infinite functions that satisfy the accumulation effect requirement for alarm intensity, making it impossible to list them all here. Therefore, we will present several simple and common decay accumulation functions. These functions will be used to calculate the weights of the anomaly scores at each time point within the sequence Rg[-(k’+1)]i+1; these weights are then used to calculate the alarm intensity using a weighted average.
Decay functions are functions for calculating the weights of anomaly score; the farther an anomaly score is from the current time point, the smaller its weight. For example:
Rg[-(k’+1)]i+1=[rgi-k’, rgi-k’,…,rgi]
The weight sequence obtained by the decay function Fd(…) is Wt.
Wt=[wti-k’, wti-k’,…,wti]
Since rgi-k’ is farthest from rgi, its corresponding weight wti~-*k’ *~should be the smallest. That is:
wti-k’<wti-k’<…<wti
The alarm intensity wni is the weighted sum of Rg[-(k’+1)]i+1, with the weights being Wt:
wni=sum(Wt**Rg[-(k’+1)]i+1)
SPL Official Website 👉 https://www.esproc.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.esproc.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/sxd59A8F2W
Youtube 👉 https://www.youtube.com/@esProc_SPL