Abstract
EventDetectR is an efficient Event Detection System (EDS) capable of detecting unexpected water quality conditions. This approach uses multiple algorithms to model the relationship between various multivariate water quality signals. The residuals of these models are then utilized in constructing an event detection algorithm, which provides a continuous measure of the probability of an event at every time step. The proposed framework was tested for water contamination events using industrial data from automated water quality sensors. Results demonstrate that the framework is reliable, exhibits strong performance, and is highly suitable for real-world event detection.
The Challenge of Event Detection
Ensuring the safety of drinking water requires constant monitoring, yet the sheer volume of data from modern online sensors often overwhelms human operators. Most existing Event Detection Systems (EDS) are either expensive commercial products or built on proprietary platforms like MATLAB.
A critical issue in this field is "alarm fatigue." Simple threshold-based alarms are frequently triggered by "outliers"—single-point measurement errors caused by factors like air bubbles in a pipe. In contrast, a true "event" is a sustained deviation from the norm, while a "baseline change" represents a "new normal" resulting from operational shifts. Distinguishing between these states is essential for practical utility in a control room.
Methodology: The EventDetectR Pipeline
The authors propose a three-phase pipeline implemented in the EventDetectR R package to address these challenges:
- Data Pre-Processing: The system handles missing values using the
imputeTSpackage (supporting techniques like Kalman smoothing) and normalizes data (Z-score or Min-Max) to ensure stable model convergence. - Model Building: The framework supports both univariate and multivariate approaches. It includes nine forecasting models (e.g., ARIMA, ETS, Holt-Winters) and a multivariate neural network that models the relationships between different water quality signals, such as the correlation between pH and chlorine levels.
- Post-Processing (The Binomial Event Discriminator): Instead of flagging every high residual as an alarm, the system uses a Binomial Event Discriminator (BED). It analyzes a sliding window of residuals and calculates the probability ($\rho$) of an event based on the count of outliers within that window. This statistical smoothing filters out random noise and provides a continuous probability measure, allowing operators to set their own risk tolerance levels.
Additionally, the package includes an Event Simulator that allows researchers to superimpose artificial signals (sinusoidal, ramp, or square waves) onto real data to test algorithm performance when ground truth is unknown.
Industrial Validation
The researchers validated the system using real-world industrial data, specifically from the GECCO 2017 & 2018 Industrial Challenges. These datasets contain minutely sensor data including parameters like pH, chlorine dioxide levels, redox potential, conductivity, and turbidity.
In a case study using the GECCO 2018 data and a ForecastArima model, the system achieved:
- Sensitivity: 79.9% (correctly identifying true contamination events).
- Specificity: 79.4% (correctly identifying normal conditions).
- Detection Performance: The model identified 115 out of 144 actual events.
- AUC: The Area Under the ROC Curve was 0.796, indicating reliable performance for industrial monitoring.
Discussion and Future Work
While the system is effective, the case study noted a high number of false positives. The authors suggest this can be mitigated through finer parameter tuning of outlier thresholds ($\tau$) and BED window sizes. Furthermore, while the system detects that an event is happening, future work will focus on identifying the root cause (e.g., sensor drift vs. actual chemical contamination).
By building this tool in R and providing a companion GUI (EventDetectGUI), the authors aim to democratize advanced event detection, making it accessible to practitioners without deep programming backgrounds.
Summary updated