# A One-Class-Based Supervision System to Detect Unexpected Events in Wastewater Treatment Plants
## 1 Introduction  
The current reality of water scarcity, influenced by factors like climate change, is widely acknowledged [1]. Simultaneously, the global population is steadily increasing [2], and with an improved standard of living, there is a noticeable rise in water consumption [3]. Predictably, this heightened water usage leads to an upsurge in wastewater production. The increased wastewater production poses a challenge for treatment plants, as they often struggle to keep up with the growing energy and resource demands needed to process these substantial water quantities [4]. In light of these challenges, optimizing the operation of Wastewater Treatment Plants (WWTPs) becomes crucial [5]. Various efforts have been made to enhance the efficiency of these facilities through different approaches. Depending on the sewer network type, WWTPs may receive either domestic and industrial wastewater in separative sewer networks or a combination of rainwater, domestic, and industrial wastewater in combined sewer networks. In the latter case, although the pollution level in wastewater is generally lower during rainfall events, the volume of water significantly increases, occasionally surpassing the treatment capacity of WWTPs [6, 7]. The unique characteristics and location of each WWTP, along with temporal variations in the quantity and quality of the wastewater, necessitate thorough monitoring in various treatment processes to optimize their operation and comply with water purification regulations [8, 9]. Monitoring in WWTPs is crucial for several reasons:  
1. Real-time control of treatment processes by tracking key parameters. Optimization of energy consumption based on treatment demands. * Early detection of anomalies and implementation of predictive maintenance strategies. * Optimization of sludge generation and management. * Adjustment of WWTP operation in response to changes in pollutant load due to climatic factors or temporal patterns in water consumption. * Ensuring the quality of treated water discharged into water bodies. Despite the numerous benefits in efficiently managing WWTPs, the initial economic investment required for extensive monitoring in all treatment processes is often substantial. Therefore, minimizing the number of sensors, identifying crucial variables for measurement, or employing virtual sensors is vital in optimizing management and cost savings associated with WWTP operation [10; 11; 12]. For instance, monitoring parameters like total nitrogen in WWTPs, which quantifies the amount of organic matter, proteins, and amino acids in water, is crucial for understanding contamination levels and serves as an indicator to optimize various treatment processes. Additionally, measuring this variable extends beyond the use of a simple sensor, requiring focus, experience, and specific measurement methods for reliable results [13; 14; 15]. The investigation of approaches to enhance the energy efficiency of WWTPs is a crucial area of study, as evidenced by a study outlined in [16]. This research explores various options for optimizing the energy consumption of Italy's largest WWTP, acknowledging that energy usage constitutes a significant operational cost for these facilities and that efficiency improvements can result in substantial economic advantages. In a complementary modeling approach, as discussed in [17], determining the optimal solid retention time is identified as a key aspect of effectively reducing operating expenses. The optimization of solid retention time contributes to the efficient removal of pollutants from wastewater, streamlining the treatment process and enhancing cost-effectiveness. Additionally, the enhancement of ozonation processes by eliminating standard substances is addressed in [18]. This approach is crucial for improving the overall treatment efficiency of WWTPs by focusing on optimizing a specific treatment step, ultimately leading to more effective pollutant removal and reduction in operational costs.