Next Article in Journal
Impact of Water pH and Cultivar on Lettuce Growth, Water Use Efficiency, and Nutrient Use Efficiency in Deep Water Culture Systems
Next Article in Special Issue
Digital Twin Applications in the Water Sector: A Review
Previous Article in Journal
Composition of Dinoflagellate Resting Cyst Assemblages and Its Monthly Variability in a Shallow Mediterranean Lagoon (Santa Giusta Lagoon, Sardinia, Italy)
Previous Article in Special Issue
Retrieving Chlorophyll-a Concentrations in Baiyangdian Lake from Sentinel-2 Data Using Kolmogorov–Arnold Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Explainable AI Framework for Predictive Maintenance of Aeration Systems in Wastewater Treatment Plants

1
Department of Computer Science and Information Technology, Faculty of Automation, Computers, Electrical Engineering and Electronics, ‘Dunarea de Jos’ University of Galati, 800008 Galati, Romania
2
Department of Automation, Faculty of Automation, Computers, Electrical Engineering and Electronics, ‘Dunarea de Jos’ University of Galati, 800008 Galati, Romania
*
Author to whom correspondence should be addressed.
Water 2025, 17(17), 2636; https://doi.org/10.3390/w17172636
Submission received: 11 August 2025 / Revised: 30 August 2025 / Accepted: 5 September 2025 / Published: 6 September 2025
(This article belongs to the Special Issue AI, Machine Learning and Digital Twin Applications in Water)

Abstract

Aeration systems are among the most energy-intensive components of wastewater treatment plants (WWTPs), consuming up to 75% of total electricity while being prone to performance degradation caused by diffuser fouling and pressure losses. Traditional maintenance strategies are largely reactive or preventive, leading to inefficient interventions, higher operational costs, and limited fault anticipation. This study addresses the need for an advanced predictive maintenance framework capable of early detection and differentiation of multiple aeration system faults. Using the Benchmark Simulation Model No. 2 (BSM2), two representative degradation scenarios—acute airflow pressure loss and chronic diffuser fouling—were simulated to generate a labeled dataset. A hybrid machine learning approach was developed, combining Random Forest-based feature selection with Long Short-Term Memory (LSTM) neural networks for temporal, multi-label fault classification. To enhance interpretability and operator trust, SHapley Additive exPlanations (SHAP) were applied to quantify feature contributions and provide transparent model predictions. The results show that the proposed framework achieves over 94% detection accuracy and provides early warnings compared to static threshold-based methods. The integration of explainable AI ensures actionable insights for maintenance planning. This approach supports more energy-efficient, reliable, and sustainable operation of WWTP aeration systems and offers a benchmark methodology for future predictive maintenance research.

1. Introduction

Wastewater treatment plants (WWTPs) are important infrastructures that protect both ecosystems and public health of citizens through the processes of removing organic pollutants, nutrients and pathogens from municipal and industrial effluents. Biological treatment, especially through the activated sludge process, remains the basis of modern wastewater management [1]. In this process, aeration becomes vital by providing the necessary oxygen for microbial degradation of organic matter and allowing the biological removal of nitrogen through nitrification and denitrification. Due to its high energy consumption, aeration reaches approximately 40–75% of the total electricity consumption of WWTPs [2,3], making it a main target for ongoing research in the field of operational optimization for cost reduction [4].
Aeration performance can progressively deteriorate due to factors such as mechanical wear, diffuser fouling, or imbalances in airflow distribution. These degradations not only compromise oxygen transfer efficiency (OTE) but also increase energy consumption and destabilize biological treatment processes [5]. In addition to operational costs, inefficient aeration can also lead to environmental consequences such as higher greenhouse gas emissions due to blower energy consumption, and also lower effluent quality (EQ) due to oxygen-limited microbial processes [6,7,8]. Early detection and mitigation of these defects remain challenging, as degradation signals are often nonlinear and dynamic, and direct monitoring of diffuser performance is not always feasible or financially viable in full-scale plants.
Analyzing traditional maintenance strategies in WWTPs reveals that they have been predominantly reactive, involving repairs after the immediate occurrence of failures, rather than preventive, with scheduled checks and interventions at fixed intervals [9]. Although preventive maintenance could reduce downtime in the event of unexpected problems, it can also lead to excessive maintenance, which may encompass premature replacement of components and suboptimal allocation of resources. It has in fact emerged as a promising alternative, using real-time sensor data, process knowledge and machine learning (ML) models to predict failures before critical functional problems occur [10]. However, most predictive maintenance efforts in the water sector have focused on mechanical equipment such as pumps and blowers, with limited attention to aeration diffusers, which are particularly susceptible to various degradation modes, becoming energy-intensive in scenarios such as fouling and pressure loss [9,10].
Therefore, several technical challenges limit the implementation of predictive maintenance for aeration systems. First, treatment plants operate under extremely dynamic influent conditions, introducing a continuous variability that complicates the detection of abnormal conditions [11]. Second, available sensor measurements, such as dissolved oxygen (DO) or airflow rates (Qair), provide only indirect indications of the diffuser condition, making early detection of incipient defects difficult [12]. Third, degradation processes can exhibit both acute behaviors such as sudden pressure drops due to valve blockage, and chronic patterns represented by scenarios such as gradual fouling caused by biofilm accumulation, ultimately requiring predictive models capable of distinguishing the dynamics of multiple failures, not just a few [13,14]. Ultimately, for operational and regulatory acceptance in real treatment plants, data-driven solutions must deliver explainable predictions to plant operators, enabling them to understand and trust the automated maintenance recommendations [15].
The rapid digital transformation of WWTPs, supported by Supervisory Control and Data Acquisition (SCADA) systems, Industrial Internet of Things (IIoT) sensors, and advanced analytics, offers new opportunities for data-driven maintenance [16,17]. ML and deep learning (DL) techniques have shown promise in capturing complex process dynamics, detecting anomalies, and forecasting equipment failures [10]. Ensemble methods, such as Random Forests (RF), provide robust classification capabilities and valuable feature importance scores, enabling the selection of informative process variables and reducing data dimensionality. Meanwhile, Long Short-Term Memory (LSTM) neural networks (NNs), a type of recurrent architecture, excel at modeling temporal dependencies in multivariate time-series data, making them well-suited for detecting both abrupt and progressive degradation events [18].
Despite these advances, existing research in the field of predictive maintenance of aeration has limitations. Many studies develop separate models for individual failures without providing a unified framework for detecting multiple failures [19]. The interpretability of the models remains insufficiently explored, with most high-performance algorithms operating as black boxes, limiting user confidence and ultimately the adoption of these models by regulations in force [20]. Furthermore, few studies validate predictive maintenance models in standardized reference environments, which obstructs reproducibility and comparisons between studies [21].
To address these gaps, this study proposes a hybrid predictive maintenance framework specifically designed for aeration systems in WWTPs. Using Benchmark Simulation Model No. 2 (BSM2), two representative degradation scenarios—acute pressure loss and chronic diffuser fouling—are simulated to generate a comprehensive and labeled dataset. The framework combines RF-based feature selection to identify the most relevant process variables involved in the analysis of aeration systems, LSTM NNs for temporal detection of multiple failures, and Explainable Artificial Intelligence (XAI) techniques, particularly SHapley Additive exPlanations (SHAP), to provide transparent and interpretable predictions beyond the black box. Extensive experimental evaluations demonstrate that the proposed model achieves high detection accuracy, effectively distinguishes between different degradation dynamics, and provides interpretable results that can improve operator decision-making. By developing explainable predictive maintenance strategies based on relevant data, this work contributes to more energy-efficient and reliable WWTPs operations, while promoting sustainable infrastructure management and a potential practical guide for implementing these findings.

2. Theoretical Background and Related Work

2.1. Aeration Systems and Common Faults

Failures in aeration systems rarely manifest as abrupt breakdowns. More commonly, they evolve silently over extended periods, gradually eroding system performance. For example, diffuser fouling develops as biofilms, mineral deposits, or suspended solids slowly accumulate on the diffuser membranes [22]. This buildup progressively reduces OTE, forcing blowers to work harder to maintain DO levels, which in turn drives up energy consumption [23]. Similarly, localized pressure drops often start with minor valve blockages or small leaks in the air distribution network [24]. These seemingly insignificant issues can cause uneven airflow distribution across diffusers, leading to pockets of under-aerated zones in the biological reactors [25]. Left unaddressed, such imbalances impair nitrification and denitrification processes, ultimately compromising EQ.
One of the main challenges is that these degradations are subtle and nonlinear: early signals are often masked by normal fluctuations in influent load, temperature changes, or sensor noise. Operators typically only notice the problem once performance has deteriorated enough to trigger alarms or affect compliance with environmental regulations. At that stage, interventions are reactive and often involve emergency repairs or premature component replacement—both costly and disruptive [9,10].
Understanding how these faults develop and interact with plant operations is necessary for designing predictive maintenance strategies capable of detecting incipient degradation long before it causes significant operational or environmental impacts.
The most frequently observed faults in aeration systems can be grouped into four main categories. Each has distinct root causes and operational consequences, but diffuser fouling and pressure loss stand out as the most prevalent and energy-intensive issues. Table 1 summarizes these fault types, linking them to their common causes and the way they affect process efficiency.
Among these categories, diffuser fouling and pressure loss have the greatest impact on energy usage and operational reliability. Research indicates that timely detection and targeted interventions can reduce aeration energy costs by up to 20% and extend diffuser lifespan by several years [26,27]. However, identifying these faults in their early stages remains challenging due to the dynamic nature of wastewater processes and the lack of direct monitoring tools for diffuser conditions.

2.2. Predictive Maintenance in Wastewater Treatment

Maintenance in WWTPs has traditionally been reactive or preventive—operators either repair equipment after it fails or replace components based on fixed schedules [9]. While these strategies can prevent catastrophic breakdowns, they are inherently inefficient: unexpected faults disrupt operations, and scheduled maintenance often results in unnecessary interventions and inflated costs.
Predictive maintenance offers a different path. Instead of waiting for failures or replacing parts prematurely, it uses real-time sensor data, process simulations, and ML models to detect early signs of degradation and schedule interventions only when they are truly needed. Table 2 compares the key characteristics of these maintenance approaches.
Shifting from reactive or preventive approaches to predictive maintenance represents more than just a technological upgrade—it changes how operators think about reliability. Predictive strategies continuously adapt to actual equipment conditions rather than relying on static schedules. For aeration systems, this means detecting fouling or pressure losses before they significantly affect OTE, allowing maintenance teams to intervene early, reduce downtime, and avoid unnecessary energy waste [28].

Current Applications in WWTPs and Research Gaps

Recent research has shown promising results for predictive maintenance in various components of WWTPs. For example, vibration and electrical current monitoring have been used to detect bearing wear in pumps and motors [29,30], while data-driven diagnostics have identified mechanical imbalances in blowers and compressors [29,31]. Instrumentation and control systems have benefited from predictive sensor calibration and actuator fault detection [32,33].
While efforts to predict aeration system failures are under development, they remain less advanced. Studies have estimated diffuser fouling rates by analyzing DO patterns and Qair distribution [14], laying the foundation for more sophisticated models. However, most current approaches still rely on static thresholds or simple statistical methods that fail to capture the nonlinear and time-dependent degradation observed in real-world operations [12,20].
Although these studies mark significant progress toward predictive maintenance in WWTPs, they also highlight the absence of comprehensive and unified solutions for managing concurrent faults and complex temporal dynamics. Section 2.5 details these research gaps and introduces our proposed framework.

2.3. Machine Learning and Deep Learning Applications

With the increasing availability of high-frequency sensor data and modern SCADA systems, WWTPs are entering a new era of digital process monitoring. These technologies enable continuous tracking of a wide range of process variables and the detection of subtle patterns that were previously invisible to operators.
Traditional fault detection techniques—manual thresholds or basic statistical analyses—struggle to keep pace with the highly nonlinear and dynamic behavior of biological treatment processes [21]. As a result, many early-warning opportunities are missed, and maintenance remains reactive rather than proactive.
ML methods, such as decision trees and ensemble techniques, have begun to fill this gap. They can process multivariate data streams and detect anomalies with much greater sensitivity than conventional approaches. However, most of these models focus on static snapshots of the process. They are less effective when degradation occurs over time, as in the case of gradual fouling of diffusers, or when sudden failures such as pressure drops need to be distinguished from normal fluctuations.
DL approaches address this challenge by modeling temporal dynamics directly. Recurrent Neural Networks (RNNs), and particularly LSTM architectures, are well suited for learning patterns from time-series data, capturing both short-term events and long-term degradation trends. When combined with feature selection methods such as RF, these models create a hybrid solution that balances predictive accuracy, robustness, and computational efficiency [34].
This interconnection is especially relevant for predictive maintenance in aeration systems, where datasets are high-dimensional, process dynamics are time-dependent, and reliable early detection of failures can significantly reduce energy costs and improve operational stability.

2.3.1. Random Forest (RF) for Feature Selection

RF has become a practical choice for handling the complexity of WWTP datasets because instead of relying on a single decision tree, RF builds an ensemble of trees, each trained on a slightly different subset of the data. At every split, it considers only a random selection of features, which reduces overfitting and improves robustness. The final prediction is obtained through majority voting across all trees, making RF particularly effective in noisy, high-dimensional environments like aeration systems [35].
What makes RF especially valuable for predictive maintenance is not just its classification power, but its ability to highlight which variables matter most. As the model trains, it quantifies the contribution of each feature by measuring how much it decreases classification uncertainty across the ensemble. This produces a ranked list of feature importance scores that allows engineers and data scientists to focus on the variables that truly influence system’s health [35].
In our approach, we use RF as a preprocessing step to reduce data dimensionality before training the more computationally demanding LSTM network. By filtering out redundant or weakly informative variables, we make temporal modeling more efficient while preserving predictive accuracy [36].
Figure 1 illustrates this dual role of RF:
  • Figure 1a shows the ensemble working as a classifier, combining multiple decision trees into a final decision (healthy vs. faulty).
  • Figure 1b depicts how RF evaluates and ranks feature importance, providing the foundation for selecting the most relevant inputs for our LSTM-based temporal fault detection.

2.3.2. Long Short-Term Memory (LSTM) Networks

While many ML models can detect faults based on static snapshots of process data, aeration system degradations often develop gradually and require temporal context to be recognized early. This is where LSTM networks have become essential in our study.
LSTMs are a variant of RNNs designed specifically to handle long sequences of data without losing important information. Traditional RNNs tend to forget earlier signals due to vanishing or exploding gradients during training, which limits their ability to model long-term dependencies. LSTMs solve this by introducing memory cells equipped with gating mechanisms that decide (Figure 2):
  • What new information to store (input gate).
  • What to discard as irrelevant noise (forget gate).
  • What to reveal as output for the next layer (output gate) [37].
This architecture allows LSTMs to maintain a running memory of relevant process dynamics, making them particularly effective for WWTP applications where fouling, pressure loss, and other faults can evolve slowly over hours or even days [38].
In our framework, the LSTM network uses sequences of selected process variables (identified by RF) and processes them through a chain of interconnected memory cells. At each timestep, the network updates its internal state, learning to distinguish between normal fluctuations and patterns that signal emerging faults. The final output layer translates this temporal understanding into probabilities for each fault type, enabling early detection and timely maintenance interventions.

2.4. Explainable AI in Environmental Engineering

As predictive maintenance frameworks in WWTPs grow more sophisticated, a recurring challenge has emerged: most high-performing models are difficult to interpret. Deep neural networks (DNNs), in particular, often act as black boxes, providing accurate predictions without clear reasoning. In safety-critical operations such as WWTP, this lack of transparency can be a significant barrier. Operators need to understand why a fault is predicted before making costly maintenance decisions [20,39]. XAI offers a way to bridge this gap by tracing the logic behind model decisions and showing how different process variables contribute to a predicted fault.

2.4.1. SHapley Additive exPlanations (SHAP)

Among the various XAI approaches, SHAP has become a practical tool for interpreting ML models in environmental engineering [40]. Based on cooperative game theory, SHAP calculates how much each input variable pushes a model’s prediction toward a fault or a healthy state. This results in feature-importance values that are not only globally consistent but also specific to each individual prediction [41].
For a given feature i , the SHAP value ϕ i quantifies its contribution to the difference between the model’s prediction for a specific instance and the average prediction over the entire dataset (baseline). The SHAP value is defined as [40] (p. 3):
ϕ i = S F \ { i } S ! F S 1 ! F ! f S i f ( S )
where F is the full set of features, S is a subset of features excluding i , and f ( S ) is the model’s output using only the features in subset S .
This formula fairly distributes the prediction difference among all features by evaluating their contributions across every possible subset of variables.
Importantly, SHAP guarantees the following properties:
  • Additivity: The sum of all SHAP values equals the deviation of the prediction from the baseline [40]:
f x E f X = i = 1 M ϕ i
2.
Consistency: Each feature’s importance is contextualized within all possible feature interactions, ensuring a consistent and unbiased explanation.

2.4.2. Interpreting SHAP Plots

The SHAP framework produces intuitive visualizations that clarify how input features collectively lead to a given model prediction. Figure 3 illustrates a SHAP waterfall plot explaining a single prediction step by step. Starting from the baseline model output E[f(X)] = 0.43, each feature’s contribution is sequentially added (red, increasing fault likelihood) or subtracted (blue, decreasing fault likelihood) until the final output f(x) = 0.76 is reached.
This representation helps to identify which variables, at specific time steps, most strongly influence the model’s output. For sequential models such as LSTM networks, SHAP can also capture temporal dynamics, attributing importance not only to specific variables but also to their historical values [42,43].
This interpretability is particularly valuable in WWTP operations, as it enables operators to trace which variables and historical conditions most strongly drive fault predictions. Such insights support informed maintenance scheduling, process adjustments, and overall system reliability, fostering greater confidence in deploying AI-driven predictive maintenance solutions.

2.5. Summary of Research Gaps and Study Contribution

2.5.1. Identified Research Gaps

Although predictive maintenance has advanced significantly in recent years, several critical research gaps remain unaddressed in the context of aeration systems within WWTPs. A primary limitation is the scarcity of real-world datasets containing labeled fault events. Equipment failures are relatively rare and complex, leading many studies to rely on isolated scenarios or synthetic data that may not fully represent operational conditions [44].
Another significant challenge is the inability of many existing approaches to detect multiple faults simultaneously. Separate models are typically developed for each degradation mode, which complicates deployment and limits their effectiveness when different faults overlap or occur concurrently.
Furthermore, traditional predictive maintenance models often lack temporal modeling capabilities. By relying primarily on instantaneous sensor measurements or manually engineered features, these models struggle to capture long-term degradation dynamics, particularly in the case of chronic diffuser fouling.
Lastly, there is a notable gap in benchmarked, reproducible validation. Few predictive maintenance frameworks have been systematically tested using standardized simulation platforms such as the BSM2, making it difficult to compare results across studies and validate proposed methodologies under controlled, repeatable conditions [45].

2.5.2. Contributions of This Study

This study addresses these research gaps by introducing a hybrid, explainable predictive maintenance framework for aeration systems, with the following novel contributions:
  • Comprehensive fault scenarios: Development of a labeled dataset using BSM2, simulating both acute pressure loss and chronic diffuser fouling—two of the most prevalent and impactful aeration system faults.
  • Hybrid modeling approach: Integration of RF-based feature selection and LSTM NNs to capture both variable importance and temporal degradation patterns.
  • Unified multi-label classification: A single model capable of detecting multiple fault types simultaneously, improving scalability and efficiency compared to independent binary classifiers.
  • XAI integration: Use of SHAP to provide both global and local interpretability, enabling operators to understand and trust model predictions while supporting actionable maintenance decisions.
In summary, this study advances the field by combining data-driven temporal modeling, feature selection, and XAI within a unified predictive maintenance framework, enhancing both fault detection accuracy and operational transparency.

3. Materials and Methods

3.1. Benchmark Simulation Model No. 2 (BSM2)

To develop and test our predictive maintenance framework, we used the BSM2 as a controlled environment for generating representative process data. Developed by the International Water Association (IWA), BSM2 is widely recognized as the reference platform for evaluating process control, optimization strategies, and fault detection methods in biological WWTPs [46].
BSM2 captures the full complexity of a municipal WWTP operating under biological nutrient removal (BNR) processes. It models interconnected biological reactors, secondary clarifiers, recirculation streams, sensors, and actuators, reflecting the dynamics and variability seen in real plants [47]. Detailed biochemical models describe carbon, nitrogen, and phosphorus removal, while disturbance models inject realistic influent fluctuations. This makes BSM2 particularly suitable for studying long-term operational behavior and testing advanced maintenance strategies under reproducible conditions [48].
Within the network of aerated and anoxic reactors, Reactor 5 was selected as the target tank for simulating aeration system degradation. This choice was made because Reactor 5 plays a critical role in maintaining DO levels for nitrification, directly influencing overall nitrogen removal efficiency [2,7].

3.2. Degradation Scenarios

To mimic real operational challenges and capture different degradation dynamics, we introduced two common fault scenarios (Figure 4) by adjusting the local oxygen transfer coefficient (KLa) in Reactor 5:
  • Acute pressure loss, representing sudden restrictions in airflow,
  • Chronic diffuser fouling, capturing progressive loss of aeration efficiency.
From these simulations, we collected high-frequency measurements of KLa, Qair, DO, nitrate/nitrite concentrations (SNO), and other relevant variables. By modeling both types, the dataset ensured a comprehensive evaluation of the predictive maintenance framework under diverse operational conditions.

3.2.1. Pressure Loss

Pressure loss faults are typically caused by partial valve blockages, leaks, or uneven airflow distribution. This fault was simulated as a stepwise decrease in KLa, introduced at 30% of the simulation timeline.
The scenario was characterized by the following:
  • A sudden reduction of 30–50% from the nominal KLa value, persisting until the end of the simulation;
  • An immediate drop in DO concentrations inside the reactor and at the outlet (SOout);
  • A noticeable decrease in estimated Qair;
  • Temporary disturbances in nitrification efficiency, increasing SNOout.
This setup models acute degradation, as observed in Figure 4a, where operational conditions deteriorate rapidly and can compromise treatment performance if not detected promptly.

3.2.2. Fouling

Diffuser fouling occurs gradually due to biofilm accumulation, mineral scaling, or particulate clogging, reducing oxygen transfer efficiency over time. The fault was simulated as a progressive decrease in KLa, beginning at 10% of the simulation period.
Key characteristics included:
  • A linear or sigmoidal degradation profile with a 5–10% reduction per 24 h, reaching up to a 40% decrease from nominal;
  • A slow but steady decline in DO concentration;
  • Increased Qair demand to compensate for oxygen transfer losses;
  • Altered effluent SNOout levels, reflecting reduced biological treatment performance.
Figure 4b represents chronic degradation, which is more difficult to detect early with conventional maintenance strategies.
The magnitudes and temporal profiles used to manipulate KLa were calibrated to align with full-scale observations. The 30–50% step decrease for acute pressure loss replicates partial valve blockages reported to immediately reduce blower airflow by 25–45% [23]. For fouling, a gradual 5–10% daily decline in KLa (cumulative 35–40% loss over 7–10 days) reflects the biofilm and mineral scaling processes documented in long-term diffuser audits [13]. In both cases, the simulated impacts on effluent DO and SNO closely matched field measurements, confirming that the chosen parameterizations realistically reproduce degradation trajectories observed in WWTP operations.

3.3. Soft Sensor and Label Generation

The accurate generation of fault labels is also an important step for supervised learning in predictive maintenance applications. Manual labeling is impractical in large-scale WWTPs due to the continuous nature of operations and the difficulty of visually identifying early-stage degradation. To overcome this limitation, we designed a soft sensor as a virtual estimator of Qair, that automatically infers the health state of the aeration system based on measurable process variables. This approach enables scalable and reproducible labeling of simulated data without human intervention.
The soft sensor primarily uses the local KLa, a fundamental parameter describing the efficiency of gas transfer between the aeration diffusers and the liquid phase. As diffusers degrade through fouling or when pressure loss occurs, the effective KLa decreases significantly, making it a strong indicator of diffuser health. The normalized OTE is computed as:
K L a , n o r m ( t ) = K L a t K L a , m i n K L a , n o m i n a l K L a , m i n ,   0 K L a , n o r m ( t ) 1
This normalized value is then used to estimate the expected Qair:
Q ^ a i r ( t ) = Q a i r , n o m i n a l · K L a , n o r m ( t )
To account for operational variability, a baseline Qair is calculated from the first 96 timesteps of each simulation, representing healthy operating conditions:
Q ¯ a i r = 1 96 t = 1 96 Q ^ a i r ( t )
The health indicator rair(t) is then derived as:
r a i r t = Q ^ a i r t Q ¯ a i r
Binary fault labels are assigned according to scenario-specific thresholds:
  • Pressure loss fault:
l a b e l P L ( t ) = 1 ,   i f   r a i r ( t ) < 0.95 0 ,   o t h e r w i s e                        
  • Fouling fault:
l a b e l F ( t ) = 1 ,   i f   r a i r ( t ) < 0.91 0 ,   o t h e r w i s e                        
Earlier conceptual designs explored a weighted combination of KLa and dissolved oxygen SOout with scenario-specific weights ( α ,   β ):
Q ^ a i r ( t ) = α K L a ( t ) K L a , n o m + β S O o u t ( t ) S O o u t ,   n o m ,   α + β = 1
However, empirical analyses demonstrated that relying solely on the KLa-based estimation was sufficient for accurate detection of both fault scenarios while simplifying implementation. Consequently, the final labeling approach omits SOout, maintaining high sensitivity and computational efficiency.
The thresholds of 0.95 for pressure loss and 0.91 for fouling were selected based on empirical observations from preliminary simulations. Pressure loss faults cause more abrupt and immediate drops in airflow delivery; thus, a higher threshold ensures early detection of sudden malfunctions. In contrast, diffuser fouling progresses gradually, allowing for a lower detection threshold to avoid premature fault labeling during minor, short-term fluctuations in aeration efficiency. These values were validated to balance sensitivity and robustness, minimizing false positives while reliably identifying true degradation events.
This automated soft sensor labeling method provides thousands of accurately labeled samples without manual intervention, thus forming a solid base for the proposed predictive maintenance framework.

3.4. Data Preparation and Feature Selection

To ensure the robustness and accuracy of the predictive models, several preprocessing steps were applied to the dataset generated by the BSM2 simulations. The raw dataset contained multivariate time-series data with 11 process variables recorded every 15 min, yielding 96 samples per day. Over the full simulation period of 609 days, this resulted in approximately 58,464 measurements per variable. To allow the system to reach steady-state conditions, the first two weeks (1344 samples) were discarded, resulting in a final dataset of approximately 57,120 time points per variable [49].

3.4.1. Data Filtering and Balancing

Invalid sensor readings, missing values, or inconsistent measurements were removed to guarantee data quality. Given the natural imbalance between healthy and faulty states during operation, a stratified balancing strategy was applied. This ensured that the dataset contained a proportional number of samples from both classes (healthy and faulty), preventing classifiers from becoming biased toward the majority (healthy) state.

3.4.2. Sliding Window Segmentation

Due to the temporal evolution of diffuser degradation, the dataset was segmented into overlapping sequences to capture time dependencies. Each sample Xt, consisted of consecutive timesteps:
Χ t = x t 19 , , x t ,     y t = l a b e l ( t + h )
where yt represents the predicted fault state h steps ahead. Two different prediction horizons were tested:
  • Short-term horizon: h = 5 timesteps (~75 min), aimed at capturing rapid and acute faults such as sudden pressure losses.
  • Long-term horizon: h = 12–16 timesteps (~3–4 h), intended to improve early detection of chronic degradation patterns like diffuser fouling;
A 75% overlap between consecutive windows was applied to increase the number of samples and preserve temporal continuity. After evaluating both horizons, the short-term horizon was selected as the primary configuration for the presented results, as it provided a good trade-off between early fault detection and model reliability. Future studies could further optimize longer horizons for chronic fouling scenarios [50].
We evaluated window lengths of 10 and 20 timesteps and overlaps of 50%, 75%, and 90%. Results showed that 20-step windows with 75% overlap achieved the best trade-off, with overall accuracy 0.94, macro F1 = 0.92, and mean lead-time of ~32 min. Shorter windows (10 steps) increased false positives, reducing precision by ~3 percentage points (macro F1 = 0.88). Longer horizons (>20 steps) delayed fouling detection and reduced recall to 0.86. Regarding overlap, 50% overlap decreased recall by ~4 percentage points, while 90% overlap slightly improved accuracy (+0.5%) but increased inference time by 60%. Thus, 20 steps with 75% overlap was retained as the optimal configuration.

3.4.3. Feature Selection Using RF

To reduce dimensionality and improve interpretability, RF classifiers were employed to rank the importance of the 11 available process variables (Table 3). These variables were preselected based on a thorough literature review and domain expertise from wastewater process engineers, ensuring that only parameters with a known influence on aeration system performance and diffuser degradation mechanisms were included.
Separate RF models were trained for each degradation scenario (pressure loss and fouling), using 70% of the data for training and 30% for validation. The models achieved high accuracy (>90%), and the feature importance was quantified based on the mean decrease in impurity across all trees.
As described in Section 4.1, the most influential variables were:
  • Pressure loss: Q a i r , K L a , S N O o u t , T E M P i n , and S O o u t .
  • Fouling: Q a i r , S O o u t , S N O o u t , K L a , T E M P i n , and S N H i n .
Variables with an importance score above 0.07 were retained, resulting in a final subset of six features: Q a i r , K L a , S O o u t , S N O o u t , T E M P i n , S N H i n .
This step effectively reduced redundancy while preserving predictive power and enhancing model explainability.

3.4.4. Normalization

To ensure consistent scaling across different sensors and process variables, all selected features were standardized using z-score normalization:
x = x μ t r a i n σ t r a i n
where μ t r a i n and σ t r a i n were computed exclusively from the training dataset to avoid data leakage. This transformation improved numerical stability and convergence during model training [18,51].
The final preprocessed dataset thus consisted of normalized, multivariate time-series segments with corresponding fault labels. These processed sequences were subsequently used as inputs for developing and validating the LSTM-based binary and multi-label classifiers.

3.5. Machine Learning Models

Two modeling strategies were developed to evaluate predictive fault detection capabilities in aeration systems: (1) independent binary classifiers dedicated to each fault type, and (2) a unified multi-label classifier capable of detecting both faults simultaneously. In both strategies, LSTM networks were employed due to their ability to capture temporal dependencies and nonlinear degradation patterns inherent in WWTPs.

3.5.1. Binary Classification Models

For the first strategy, two LSTM-based models were trained independently to detect each fault type: one for pressure loss and another for fouling. This approach allows each model to specialize in recognizing the unique temporal signatures of its respective fault, potentially improving detection accuracy for individual fault modes.
Each binary classifier was designed with the following architecture:
  • A single LSTM layer with 20 hidden units to capture temporal dependencies.
  • A fully connected dense layer with ReLU activation and L2 regularization to reduce overfitting and improve generalization.
  • A SoftMax output layer for binary classification, providing probability of healthy vs. faulty states.
Models were trained using the Adam optimizer with a learning rate of 1   ×   10 3 , a batch size of 128, and a maximum of 200 epochs. Early stopping with a patience of 20 epochs was implemented to prevent overfitting.

3.5.2. Multi-Label Classification Model

In addition to the independent binary classifiers, a single LSTM-based model was developed to detect both pressure loss and fouling simultaneously. The output layer contained two Sigmoid neurons, each representing the probability of a specific fault type. This design enabled the model to predict concurrent faults without requiring separate models.
Binary cross-entropy loss was used to accommodate independent fault probabilities, and optimal detection thresholds for each fault were determined using precision-recall curves to maximize the macro F1-score. The core architecture mirrored that of the binary models, utilizing a shared LSTM layer to equally learn temporal patterns relevant to both faults.

3.5.3. Hybrid Approach: RF and LSTM

While LSTM networks serve as the primary predictive models, the RF algorithm was integrated into the framework for two purposes:
  • Feature ranking: Identifying and selecting the most relevant process variables, reducing input dimensionality while preserving predictive information.
  • Baseline classification: Serving as a non-temporal reference model to benchmark LSTM performance and assessing the added value of temporal modeling.
This hybrid RF + LSTM framework leverages the interpretability of RF and the sequence learning capabilities of LSTMs, ensuring both robust predictions and model explainability.

3.5.4. Training and Validation

To ensure rigorous model evaluation and generalizability, the following procedure was used:
  • The dataset was partitioned into 70% training, 15% validation, and 15% test sets.
  • A 5-fold cross-validation strategy was applied on the training set to tune hyperparameters and assess robustness [10].
  • Multiple performance metrics were computed, including Accuracy, Precision, Recall, F1-score, Jaccard Index, and Hamming Loss, providing a comprehensive evaluation of fault detection performance [20,52].
Table 4 summarizes the key configurations and differences between the developed models.

3.6. Explainable AI with SHAP

To enhance model transparency and support practical deployment in WWT operations, model interpretability was achieved using the SHAP framework. SHAP assigns contribution scores to each input feature, quantifying its influence on model predictions based on cooperative game theory. The analysis focused on the trained multi-label LSTM model, with SHAP applied as follows:
  • Implementation: The DeepExplainer module [53] from the SHAP library was employed to compute feature attributions for the LSTM model. A representative subset of consecutive time steps was sampled for each fault scenario—pressure loss and fouling—to ensure coverage of both acute and chronic degradation dynamics. SHAP values were then calculated for all input features and their temporal lags, allowing the framework to capture both variable importance and temporal influence.
  • Visualization and interpretation: For visualization, summary plots were used to provide a global perspective, ranking features based on their average contribution to model outputs across multiple predictions. In addition, waterfall plots offered local interpretability, illustrating how individual feature contributions cumulatively shifted the baseline prediction E [ f ( X ) ]   toward the final prediction f ( x ) for a specific input sequence.
This interpretability analysis yielded:
  • Global insights, highlighting the most influential features for each fault type.
  • Local reasoning, explaining why particular sequences were classified as faulty.
By combining these perspectives, the SHAP framework increased trust and operational usability of the predictive maintenance approach, supporting informed decision-making for aeration system maintenance.

3.7. Experimental Setup and Evaluation Metrics

All simulations, data processing, and model training were executed on a high-performance workstation equipped with:
  • Hardware: Intel i9 CPU, 64 GB RAM, NVIDIA GTX GPU
  • Software: MATLAB R2024 for process simulation and Python 3.12 with TensorFlow 2.18 for model implementation
To comprehensively evaluate predictive fault detection models, multiple performance metrics were employed (summarized in Table 5). These metrics assess not only overall accuracy but also model robustness in multi-label classification scenarios and its ability to correctly detect rare fault events.
Binary and multi-label LSTM models were compared based on these metrics to evaluate trade-offs between specialized fault detection and unified predictive maintenance approaches. This multi-metric evaluation ensured that model performance was rigorously assessed in terms of accuracy, sensitivity, interpretability, and computational efficiency [52].

4. Results

4.1. Feature Importance Analysis

As detailed in Section 3.4.3, RF classifiers were used to rank the importance of the 11 process variables (Table 3) for detecting diffuser degradation. Figure 5 summarizes the feature importance scores for both degradation scenarios.
For pressure loss, the estimated Qair and KLa emerged as the most dominant predictors. This is expected because a sudden drop in pressure directly reduces delivered Qair, which in turn lowers KLa. SNOout and TEMPin also notably contributed, because decreased aeration efficiency impacts SNO rates and TEMPin modulates oxygen solubility and transfer dynamics.
For fouling, the top contributors were Qair, SOout, and SNOout. Fouling gradually reduces diffuser permeability, leading to lower oxygen transfer and consequently lower SO in the effluent. The importance of KLa, TEMPin, and SNHin suggests that fouling alters oxygen demand and nitrification efficiency, making SNHin and TEMPin relevant indicators of long-term diffuser health.
Overall, these findings confirm that aeration-related variables (Qair and KLa) are primary indicators of both fault types, while SNO concentrations and SNH capture the downstream biological effects of impaired aeration. By selecting these top six features (importance score > 0.07)—Qair, KLa, SOout, SNOout, TEMPin, and SNHin—dimensionality was reduced without compromising the model’s ability to capture key physical and biochemical degradation mechanisms [35].

4.2. Binary Classification Results

Two independent binary LSTM classifiers were trained on the top six features identified via RF analysis for pressure loss and fouling, and validated on a separate test dataset representing unseen operational conditions. Performance results were:
  • Pressure loss classifier: accuracy = 0.95, precision = 0.93, recall = 0.92, F1-score = 0.93.
  • Fouling classifier: accuracy = 0.94, precision = 0.91, recall = 0.90, F1-score = 0.91.
These scores confirm reliable detection with a low false-alarm rate. Confusion matrices (Figure 6) show a well-balanced distribution of true positives and true negatives in both scenarios.

4.2.1. Temporal Detection Capability

Beyond aggregated metrics, temporal predictions reveal the models’ ability to issue positive fault predictions well before full degradation occurs. In the pressure loss scenario, the classifier’s predicted fault probability exceeded the decision threshold (0.5) 5–6 timesteps (~30–40 min) before the maximum drop in Qair, while maintaining high confidence levels (>90%). In a real plant deployment, such early predictions would trigger an alarm in the SCADA monitoring interface, enabling operators to adjust valve settings or initiate maintenance before process stability is compromised [54].
In the fouling scenario, which develops more gradually, the classifier identified abnormal patterns in SOout and SNOout concentrations hours before a conventional threshold-based system would trigger an alert. These early positive predictions allow for preventive diffuser cleaning or replacement, avoiding long-term energy penalties and EQ deterioration.

4.2.2. Robustness and Operational Significance

The binary LSTM models maintained detection accuracy above 90% across multiple disturbance scenarios—including variations in influent flow, SNH loads, and seasonal temperature swings from BSM2—demonstrating robustness to normal process variability. This resilience, combined with the observed predictive lead times, positions these models as practical tools for WWTP operators:
  • Acute faults (pressure loss) can be intercepted before triggering sudden aeration system failures.
  • Chronic faults (fouling) can be detected early enough to optimize cleaning schedules and avoid efficiency losses.
Such integration of predictive maintenance could substantially reduce energy waste, extend diffuser lifespan, and improve EQ.

4.3. Multi-Label Classification Performance

In addition to the independent binary models, a unified multi-label LSTM classifier was developed to detect both pressure loss and fouling faults within a single predictive framework. This design offers a complete monitoring solution, reducing computational overhead and enabling the concurrent identification of degradation events, which can often occur simultaneously in real WWTP operations.
The multi-label model achieved robust performance on the test dataset, with a macro F1-score of 0.92, a Jaccard Index of 0.62, and a Hamming loss of 0.046 (Figure 7). These results indicate that the classifier effectively balanced the detection of both fault types while minimizing missed detections and false alarms.
The confusion matrices in Figure 8 show strong discriminative capability for both scenarios.
Unlike binary classifiers that output a single decision boundary, the multi-label approach predicts independent probabilities for each fault type. Decision thresholds were optimized using precision–recall analysis in Figure 9a to maximize the macro F1-score and maintain sensitivity to rare or overlapping events. The training process showed stable convergence without overfitting, with MSE for both training and validation sets steadily decreasing and stabilizing at low values, as observed in Figure 9b.
From an operational perspective, the key advantage of the multi-label design lies in its ability to detect overlapping faults, such as partial diffuser fouling combined with localized pressure drops. Temporal analysis confirmed that the classifier could reliably identify such concurrent events. Deploying a single multi-label model, therefore, could simplify SCADA integration, reduce resource usage, and improve the scalability of predictive maintenance solutions for real-time aeration system monitoring.

4.4. Model Explainability and SHAP Analysis

4.4.1. Global Interpretability

The SHAP summary plots for the multi-label model in Figure 10a,b showed clear patterns:
  • Pressure loss: Qair and KLa consistently had the largest positive SHAP values, confirming that abrupt drops in Qair and Kla are the strongest predictors of acute faults.
  • Fouling: SOout, SNOout, and Qair contributed most, indicating that gradual declines in SOout and increases in SNO levels are reliable precursors to diffuser clogging.
Moderate contributions from TEMPin and SNHin in both scenarios suggest these features capture indirect biological effects of aeration degradation, in line with expected process behavior.

4.4.2. Local Explanations

Analysis of individual sequences confirmed that the model bases early fault predictions on physically meaningful signals. In a pressure loss case in Figure 11a, a sharp drop in Qair combined with a smaller decrease in KLa accounted for over 80% of the fault probability (>0.95), several timesteps before SNOout exceeded limits. For fouling, in Figure 11b, persistent decreases in SOout shifted the prediction from healthy to fouled, reflecting the model’s ability to track slow degradation trends over long time horizons.
The prominence of Qair and KLa in pressure loss detection highlights the value of reliable Qair and KLa monitoring for rapid intervention. For fouling, the strong role of SOout and SNOout suggests that EQ sensors can provide an effective, lower-cost early warning of diffuser clogging. These insights bridge data-driven predictions with process understanding, supporting actionable, targeted maintenance in WWTP operations.

4.5. Comparative Analysis

To provide a comprehensive understanding of model behavior, a comparative analysis was conducted between the independent binary classifiers, the unified multi-label classifier, and a baseline RF model trained directly for fault classification. This evaluation highlights trade-offs in accuracy, interpretability, and operational efficiency, guiding future implementation decisions.

4.5.1. Performance Metrics

Table 6 summarizes the performance metrics of all models evaluated in this study. The independent binary classifiers demonstrated the highest detection accuracy, particularly in distinguishing individual fault types. Specifically, the pressure loss classifier achieved an F1-score of 0.93 and a Jaccard Index of 0.90, while the fouling classifier reached an F1-score of 0.91 and a Jaccard Index of 0.88.
The unified multi-label LSTM model delivered competitive performance with a macro-average F1-score of 0.92, offering the advantage of detecting both fault types simultaneously within a single inference pass. The baseline RF model performed noticeably lower, with an average F1-score of 0.84, highlighting the importance of temporal modeling for capturing degradation dynamics effectively.
All results reported in Table 6 refer to the held-out test set. To ensure reproducibility and enable fair comparison across models, extended performance metrics with 95% confidence intervals are provided in Table A2 (Appendix A). In addition, confusion matrices (Table A3, Table A4 and Table A5) for the test set are included in Appendix A to illustrate classification trade-offs and error distributions.

4.5.2. Temporal Split Validation

To mitigate the risk of performance inflation due to random window-level splits, an additional evaluation was conducted using a rolling-origin protocol, where earlier simulation periods were used exclusively for training and later periods for validation and testing. This stricter temporal separation resulted in a more noticeable decrease in performance compared to the random split strategy reported in Table 6, reflecting reduced training diversity and temporal concept drift.
Specifically, the pressure loss classifier achieved an accuracy of 0.85 (F1 = 0.70), affected mainly by reduced precision and a higher false alarm rate. The fouling classifier remained more robust, with accuracy of 0.88 (F1 = 0.79), indicating that fouling dynamics are more consistent over time. The multi-label model achieved accuracy of 0.82 (macro-F1 = 0.72), confirming its ability to capture overlapping fault dynamics but also revealing sensitivity to temporal generalization.
Early-warning capability was also reduced, with mean lead time for acute pressure loss dropping from ~32 min (random splits) to 20–25 min, and for gradual fouling from ~3 h to approximately 2 h. Despite this reduction, both scenarios still provide actionable horizons for proactive aeration maintenance and supervisory control. Extended metrics for this experiment are reported in Table 7.

4.5.3. Feature Exclusion Analysis

Since fault labels were derived from normalized KLa and its impact on expected Qair, there is a risk that models may overfit to the labeling rule rather than learn generalizable degradation signatures. To address this, we repeated the experiments excluding KLa and all variables functionally dependent on it. Performance decreased moderately but remained robust: the pressure-loss classifier dropped from an accuracy of 0.95 to 0.90 (F1 = 0.89), and the fouling classifier from 0.94 to 0.89 (F1 = 0.88). The multi-label model achieved a macro-average F1 of 0.87 compared to 0.92 with the full feature set. Importantly, early-warning capability was preserved (lead times of approximately 25 min for acute faults and 2.5 h for fouling), supported mainly by routinely measured variables such as SOout, SNOout, SNHin, and TEMPin. The results in Table 8 indicate that, while KLa-based features enhance performance, the framework retains predictive value without them, which is an important consideration since online KLa measurements are rarely available in full-scale WWTPs.

4.5.4. Stress Test Under Stormwater and Industrial Shock Loads

While BSM2 includes realistic diurnal and seasonal disturbances, it does not explicitly represent extreme stormwater inflows or accidental industrial discharges. To assess robustness, additional simulations were performed by increasing influent flow by 40% for 6 h episodes and superimposing COD and ammonium peaks of +30%. Under these perturbed conditions, the pressure-loss classifier maintained an accuracy of 0.91 (F1 = 0.90) and the fouling classifier 0.89 (F1 = 0.88). The multi-label model achieved a macro F1 of 0.87 with a Hamming loss of 0.065. Early-warning behavior was preserved, with lead times of ~20–30 min for acute faults and ~2–2.5 h for gradual fouling. These results indicate that the RF–LSTM framework generalizes well beyond default BSM2 variability, providing resilience under shock scenarios that approximate wet-weather and industrial disturbances.

4.5.5. Computational Efficiency and Practical Deployment

While binary models provided marginally better detection performance, they required maintaining two separate NNs, effectively doubling:
  • Training time (~2 h each);
  • Memory footprint during inference;
  • Integration complexity for real-time deployment.
In contrast, the multi-label model reduced computational cost by approximately 40%, making it more suitable for online supervisory control systems, especially in large-scale WWTPs where hardware resources are constrained.
The multi-label model offered a unique advantage: the ability to detect concurrent fault events. In operational environments, it is plausible that diffuser fouling develops gradually while intermittent pressure loss events occur simultaneously due to localized valve blockages or leaks. Binary classifiers, operating independently, cannot account for such overlapping degradation dynamics.
In practical applications, a hybrid deployment strategy may be optimal:
  • Multi-label model for real-time monitoring and early-warning dashboards;
  • Binary classifiers as secondary diagnostics, confirming and isolating specific fault types for maintenance planning.
While the reported reduction of approximately 40% in compute time was demonstrated in the benchmark experiments described in Section 3.7, a limitation of this study is that the evaluation has not yet been extended to embedded or edge hardware. Given that real WWTP monitoring infrastructures often operate on resource-constrained devices, future work will focus on testing the framework under such conditions to determine its suitability for near real-time deployment in practice.

5. Discussion

5.1. Overall Findings

The comparative analysis highlights several important findings. First, temporal modeling with LSTM networks significantly outperforms static RF classification for both acute pressure loss and chronic fouling detection. By capturing sequential dependencies and progressive degradation patterns, LSTM-based models achieved higher F1-scores and earlier fault identification than non-temporal classifiers. Importantly, the early-warning capability observed (≈30–40 min for acute pressure loss and several hours for fouling) translates into tangible operational benefits. The literature indicates that a 20% decline in OTE typically increases blower energy demand by 15–25% [55,56]. For a medium-sized WWTP (≈20,000 PE, blower load ~100 kW), avoiding just 4 h of operation under such conditions could save on the order of 60–100 kWh of electricity, equivalent to 10–15 EUR at current industrial rates [57]. Likewise, anticipating acute pressure-loss events reduces the risk of several hours of insufficient aeration, mitigating effluent non-compliance and unplanned maintenance. While these estimates are illustrative, they demonstrate how predictive detection can provide not only diagnostic value but also measurable energy and reliability gains in practice.
Second, the use of RF for feature selection successfully reduced input dimensionality while maintaining or improving classification accuracy. This hybrid approach enhanced model interpretability and computational efficiency. Third, the multi-label classifier demonstrated a balanced trade-off between detection accuracy, computational efficiency, and the ability to handle overlapping fault conditions, making it a practical option for large-scale deployment. Finally, binary classifiers maintained slightly higher precision for isolated faults, indicating that a hybrid monitoring strategy combining both binary and multi-label models could offer optimal predictive maintenance coverage. Collectively, these results support the integration of predictive XAI into WWTP aeration systems, enabling scalable and reliable intelligent maintenance frameworks.

5.2. Methodological Contributions and Advantages in the Context of Previous Studies

This study introduces several methodological advances that extend beyond existing research in WWTP monitoring. Prior studies have primarily focused on threshold-based detection or static ML models that lack temporal reasoning, leading to delayed fault recognition and higher false alarm rates. By leveraging LSTM networks, the proposed framework captures long-term temporal dependencies and nonlinear process dynamics, improving both accuracy and early warning capability.
The hybrid RF–LSTM approach represents another novel contribution. While ensemble models like RF have previously been used for feature selection in environmental applications, this study integrates RF directly into a predictive maintenance pipeline, serving both as a feature selector and a baseline classifier. This dual functionality reduces redundancy, enhances interpretability, and provides a benchmark for temporal models.
Furthermore, unlike many existing works that develop separate models for each fault type, this research introduces a unified multi-label classifier capable of detecting multiple degradation modes simultaneously. This approach reduces inference time by approximately 40% compared to independent models and enables concurrent detection of overlapping faults, a scenario often observed in full-scale aeration systems. Combined with SHAP-based explainability, the framework advances state-of-the-art predictive maintenance by linking data-driven insights to physically meaningful degradation signatures, thus bridging a common gap in operational interpretability.

5.3. Limitations of the Study

Despite these contributions, certain limitations must be acknowledged. The training and evaluation were performed on synthetic data generated via BSM2, which, although standardized and widely accepted, cannot fully capture all operational disturbances and unmodeled dynamics present in real plants. Consequently, some degradation behaviors or sensor noise characteristics may not have been fully represented.
Another limitation concerns the computational complexity of LSTM models, which require substantial training data and careful hyperparameter tuning. While this was feasible in the simulation environment, real-world deployment may require continuous retraining and adaptation to site-specific operating conditions. Additionally, the current framework focused on two common faults—pressure loss and diffuser fouling—while other fault types, such as blower malfunctions or sensor drift, were not included. Finally, uncertainty quantification was not explicitly addressed, which may limit confidence estimation in fault predictions during real-time operations.

6. Conclusions

This study proposed a hybrid predictive maintenance framework for aeration systems in WWTPs, combining RF-based feature selection, LSTM temporal modeling, and SHAP for interpretability. Using the BSM2, we generated synthetic data representing two prevalent degradation modes—acute pressure loss and chronic diffuser fouling—and demonstrated the ability of the proposed approach to detect and explain faults effectively.
The main findings of this research are:
  • Enhanced fault detection: Temporal modeling with LSTM networks significantly outperformed static RF classifiers, enabling earlier and more accurate detection of both acute and chronic faults.
  • Efficient feature selection: RF-based dimensionality reduction successfully simplified the model without sacrificing performance, enhancing interpretability and computational efficiency.
  • Unified multi-label classification: The developed multi-label model efficiently handled overlapping faults and reduced inference time compared to independent binary classifiers.
  • XAI integration: SHAP analysis provided actionable insights into fault drivers, strengthening trust and supporting proactive maintenance strategies.
These results demonstrate that predictive, explainable AI can significantly improve operational reliability and energy efficiency in aeration systems, paving the way for intelligent maintenance frameworks in modern WWTPs.
Future research should aim to validate the proposed framework using data from full-scale WWTPs to ensure robustness under operational conditions. Extending the approach to cover additional fault types and multi-stage degradation processes would enable more comprehensive monitoring. Incorporating adaptive learning methods—such as online or transfer learning—could improve model generalizability across different plants, especially where labeled fault data are limited. Probabilistic DL techniques may further enhance reliability by providing uncertainty quantification for risk-informed maintenance decisions. Furthermore, coupling predictive maintenance with advanced control strategies, including reinforcement learning (RL) or model predictive control (MPC), has the potential to support real-time, automated optimization of aeration systems.
By addressing these directions, future predictive maintenance solutions can evolve into fully integrated, intelligent decision-support systems that promote sustainable and energy-efficient wastewater treatment operations.

Author Contributions

Conceptualization, D.V. and A.E.V.; methodology, D.V.; software, D.V.; validation, D.V. and A.E.V.; formal analysis, D.V.; investigation, D.V.; resources, D.V. and M.B.; data curation, D.V.; writing—original draft preparation, A.E.V. and D.V.; writing—review and editing, A.E.V. and D.V.; visualization, A.E.V.; supervision, M.B.; project administration, M.B.; funding acquisition, D.V. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by contract no. 7972/31.03.2025, “Îmbunătățirea performanțelor sistemelor de management a apelor urbane uzate printr-o abordare integrată și tehnici de machine learning” (Improving the performance of urban wastewater management systems through an integrated approach and machine learning techniques), at the “Dunărea de Jos” University of Galați. The APC was funded by the same project.

Data Availability Statement

The data used in this study were generated using the Benchmark Simulation Model No. 2 (BSM2) framework. The datasets, as well as the developed software programs and code, can be made available upon reasonable request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
APAverage Precision
BNRBiological Nutrient Removal
BSM2Benchmark Simulation Model No. 2
CODChemical Oxygen Demand
DLDeep Learning
DNNsDeep Neural Networks
DODissolved Oxygen
EQEffluent Quality
IIoTIndustrial Internet of Things
IWAInternational Water Association
KLaOxygen Transfer Coefficient
LSTMLong Short-Term Memory
MLMachine Learning
MPCModel Predictive Control
NNsNeural Networks
OTEOxygen Transfer Efficiency
QairAirflow rate
QPInfluent Phosphorus Flow Rate
RFRandom Forest
RLReinforcement Learning
RNNsRecurrent Neural Networks
SCADASupervisory Control and Data Acquisition
SHAPShapley Additive exPlanations
SNHAmmonium Concentration
SNONitrate/Nitrite Concentrations
SOoutEffluent Dissolved Oxygen
TEMPTemperature
TSSTotal Suspended Solids
WWTPsWastewater Treatment Plants
XAIExplainable Artificial Intelligence

Appendix A

Table A1. Sensitivity analysis of window size and overlap for LSTM models (test set performance).
Table A1. Sensitivity analysis of window size and overlap for LSTM models (test set performance).
WindowOverlapAccuracyPrecisionRecallF1JaccardHammingInference Time (ms)
1050%0.900.890.870.880.580.09140
1075%0.910.900.880.890.600.08190
1090%0.920.910.880.890.610.08260
2050%0.920.910.880.890.610.07150
2075%0.940.930.910.920.620.05220
2090%0.9450.930.910.920.630.05350
Table A2. Extended performance metrics with 95% confidence intervals (bootstrap, n =1000) for all models.
Table A2. Extended performance metrics with 95% confidence intervals (bootstrap, n =1000) for all models.
ModelAccuracy
[95% CI]
Precision [95% CI]Recall
[(95% CI]
F1-Score [95% CI]Jaccard Index
[95% CI]
Hamming
[95% CI]
Binary Classifier—Pressure Loss0.95
[0.94–0.96]
0.94
[0.92–0.95]
0.92
[0.91–0.94]
0.93
[0.92–0.94]
0.90
[0.88–0.91]
0.05
[0.04–0.06]
Binary Classifier—Fouling0.94
[0.93–0.95]
0.92
[0.91–0.94]
0.90
[0.89–0.92]
0.91
[0.90–0.92]
0.88
[0.86–0.89]
0.06
[0.05–0.07]
Multi-label Classifier (LSTM)0.94
[0.93–0.95]
0.92
[0.91–0.94]
0.91
[0.90–0.92]
0.92
[0.91–0.93]
0.86
[0.84–0.87]
0.04
[0.03–0.05]
Table A3. Confusion matrices for Pressure Loss binary LSTM classifiers (test set).
Table A3. Confusion matrices for Pressure Loss binary LSTM classifiers (test set).
Pressure LossPredicted FaultPredicted Normal
True Fault45638
True Normal32474
Note: Accuracy = 0.95; Precision = 0.93; Recall = 0.92.
Table A4. Confusion matrices for Fouling binary LSTM classifiers (test set).
Table A4. Confusion matrices for Fouling binary LSTM classifiers (test set).
FoulingPredicted FaultPredicted Normal
True Fault43248
True Normal35485
Note: Accuracy = 0.94; Precision = 0.92; Recall = 0.90.
Table A5. Confusion matrices for multi-label LSTM classifiers (test set).
Table A5. Confusion matrices for multi-label LSTM classifiers (test set).
True\PredictedNo FaultPressure LossFoulingBoth
No Fault450283012
Pressure Loss34210188
Fouling402022012
Both Faults1081490
Note: Macro-F1 ≈ 0.88; Hamming loss ≈ 0.06.

References

  1. Fernandes, J.; Ramísio, P.J.; Puga, H. A Comprehensive Review on Various Phases of Wastewater Technologies: Trends and Future Perspectives. Eng 2024, 5, 2633–2661. [Google Scholar] [CrossRef]
  2. Mamais, D.; Noutsopoulos, C.; Dimopoulou, A.; Stasinakis, A.; Lekkas, T.D. Wastewater treatment process impact on energy savings and greenhouse gas emissions. Water Sci. Technol. 2015, 71, 303–308. [Google Scholar] [CrossRef]
  3. Hvala, N.; Vrečko, D.; Cerar, P.; Žefran, G.; Levstek, M.; Vrančić, D. Energy Cost Optimisation in a Wastewater Treatment Plant by Balancing On-Site Electricity Generation with Plant Demand. Water 2025, 17, 1170. [Google Scholar] [CrossRef]
  4. Li, Z.; Lu, J.; Lu, J. Energy efficiency evaluation and optimization for wastewater treatment plant. Desalination Water Treat. 2024, 319, 100487. [Google Scholar] [CrossRef]
  5. Lozano Avilés, A.B.; Del Cerro Velázquez, F.; Llorens Pascual Del Riquelme, M. Methodology for Energy Optimization in Wastewater Treatment Plants. Phase II: Reduction of Air Requirements and Redesign of the Biological Aeration Installation. Water 2020, 12, 1143. [Google Scholar] [CrossRef]
  6. Ranieri, E.; D’Onghia, G.; Ranieri, F.; Lopopolo, L.; Gregorio, S.; Ranieri, A.C. Performance of wastewater treatment plants in emission of greenhouse gases. Bioresour. Technol. 2024, 404, 130897. [Google Scholar] [CrossRef]
  7. Wan, X.; Laureni, M.; Jia, M.; Volcke, E.I.P. Impact of organics, aeration and flocs on N2O emissions during granular-based partial nitritation-anammox. Sci. Total Environ. 2021, 797, 149092. [Google Scholar] [CrossRef] [PubMed]
  8. Yang, H.; Wang, Z.; Zhang, X.; Lu, H. Assessing Greenhouse Gas Emission Factors in Wastewater Treatment. Sustainability 2025, 17, 1488. [Google Scholar] [CrossRef]
  9. Makula Blog. Comparing Reactive vs. Preventive vs. Predictive Maintenance Strategies. Available online: https://www.makula.io/blog/reactive-maintenance-vs-predictive-analytics-vs-preventive-maintenance-comparing-strategies (accessed on 5 August 2025).
  10. Zamfir, F.-S.; Carbureanu, M.; Mihalache, S.F. Application of Machine Learning Models in Optimizing Wastewater Treatment Processes: A Review. Appl. Sci. 2025, 15, 8360. [Google Scholar] [CrossRef]
  11. Chen, K.; Wang, H.; Valverde-Perezc, B.; Zhai, S.; Vezzaro, L.; Wang, A. Optimal control towards sustainable wastewater treatment plants based on multi-agent reinforcement learning. Chemosphere 2021, 279, 130498. [Google Scholar] [CrossRef] [PubMed]
  12. Russo, S.; Disch, A.; Blumensaat, F.; Villez, K. Anomaly Detection using Deep Autoencoders for in-situ Wastewater Systems Monitoring Data. arXiv 2020, arXiv:2002.03843. [Google Scholar] [CrossRef]
  13. Jiang, L.-M.; Chen, L.; Zhou, Z.; Sun, D.; Li, Y.; Zhang, M.; Liu, Y.; Du, S.; Chen, G.; Yao, J. Fouling characterization and aeration performance recovery of fine-pore diffusers operated for 10 years in a full-scale wastewater treatment plant. Bioresour. Technol. 2020, 307, 123197. [Google Scholar] [CrossRef]
  14. Samuelsson, O.; Björk, A.; Carlsson, B. Model-based monitoring of diffuser fouling using standard sensors. Water Res. X 2021, 13, 100118. [Google Scholar] [CrossRef] [PubMed]
  15. Monday, C.; Zaghloul, M.S.; Krishnamurthy, D.; Achari, G. A Review of AI-Driven Control Strategies in the Activated Sludge Process with Emphasis on Aeration Control. Water 2024, 16, 305. [Google Scholar] [CrossRef]
  16. Cairone, S.; Hasan, S.W.; Choo, K.-H.; Lekkas, D.F.; Fortunato, L.; Zorpas, A.A.; Korshin, G.; Zarra, T.; Belgiorno, V.; Naddeo, V. Revolutionizing wastewater treatment toward circular economy and carbon neutrality goals: Pioneering sustainable and efficient solutions for automation and advanced process control with smart and cutting-edge technologies. J. Water Process Eng. 2024, 63, 105486. [Google Scholar] [CrossRef]
  17. Gulshin, I.; Kuzina, O. Optimization of Wastewater Treatment Through Machine Learning-Enhanced Supervisory Control and Data Acquisition: A Case Study of Granular Sludge Process Stability and Predictive Control. Automation 2025, 6, 2. [Google Scholar] [CrossRef]
  18. Pyo, J.; Pachepsky, Y.; Kim, S.; Abbas, A.; Kim, M.; Kwon, Y.S.; Ligaray, M.; Cho, K.H. Long short-term memory models of water quality in inland water environments. Water Res. X 2023, 21, 100207. [Google Scholar] [CrossRef] [PubMed]
  19. Miller, K.; Dubrawski, A. System-Level Predictive Maintenance: Review of Research Literature and Gap Analysis. arXiv 2020, arXiv:2005.05239. [Google Scholar] [CrossRef]
  20. Cummins, L.; Sommers, A.; Ramezani, S.B.; Mittal, S.; Jabour, J.; Seale, M.; Rahimi, S. Explainable Predictive Maintenance: A Survey of Current Methods, Challenges and Opportunities. IEEE Access 2024, 12, 57574–57602. [Google Scholar] [CrossRef]
  21. Duarte, M.S.; Martins, G.; Oliveira, P.; Fernandes, B.; Ferreira, E.C.; Alves, M.M.; Lopes, F.; Pereira, M.A.; Novais, P. A Review of Computational Modeling in Wastewater Treatment Processes. ACS EST Water 2024, 4, 784–804. [Google Scholar] [CrossRef]
  22. Garrido-Baserba, M.; Asvapathanagul, P.; McCarthy, G.W.; Gocke, T.E.; Olson, B.H.; Park, H.-D.; Al-Omari, A.; Murthy, S.; Bott, C.B.; Wett, B.; et al. Linking biofilm growth to fouling and aeration performance of fine-pore diffuser in activated sludge. Water Res. 2016, 90, 317–328. [Google Scholar] [CrossRef]
  23. Wang, M.; Mo, H.; Liu, G.; Qi, L.; Yu, Y.; Fan, H.; Xu, X.; Luo, T.; Shao, Y.; Wang, H. Impact of scaling on aeration performance of fine-pore membrane diffusers based on a pilot-scale study. Sci. Rep. 2020, 10, 4902. [Google Scholar] [CrossRef]
  24. Garrido-Baserba, M.; Sobhani, R.; Asvapathanagul, P.; McCarthy, G.W.; Olson, B.H.; Odize, V.; Al-Omari, A.; Murthy, S.; Nifong, A.; Godwin, J.; et al. Modelling the link amongst fine-pore diffuser fouling, oxygen transfer efficiency, and aeration energy intensity. Water Res. 2017, 111, 127–139. [Google Scholar] [CrossRef] [PubMed]
  25. Ghasemi, M.; Chang, S.; Sivaloganathan, S. Exploring Aeration Strategies for Enhanced Simultaneous Nitrification and Denitrification in Membrane Aerated Bioreactors: A Computational Approach. Bull. Math. Biol. 2024, 86, 117. [Google Scholar] [CrossRef]
  26. Bengtsson, S.; Arnell, M. Optimization of Aeration Diffuser System Design: A Simulation Study. J. Environ. Eng. 2023, 149, 04023003. [Google Scholar] [CrossRef]
  27. Xylem. Utility Reduces Aeration Energy Use by 32% with Liquid Diffuser Cleaning. Available online: https://www.xylem.com/en-gp/making-waves/water-utilities-news/utility-reduces-aeration-energy-use-by-32-with-liquid-diffuser-cleaning/ (accessed on 5 August 2025).
  28. Samuelsson, O.; Bengtsson, S. Differentiating fouling from ageing for a condition-based diffuser maintenance. Water Res. 2025, 268, 122534. [Google Scholar] [CrossRef] [PubMed]
  29. Achouch, M.; Dimitrova, M.; Dhouib, R.; Ibrahim, H.; Adda, M.; Sattarpanah Karganroudi, S.; Ziane, K.; Aminzadeh, A. Predictive Maintenance and Fault Monitoring Enabled by Machine Learning: Experimental Analysis of a TA-48 Multistage Centrifugal Plant Compressor. Appl. Sci. 2023, 13, 1790. [Google Scholar] [CrossRef]
  30. Chevtchenko, S.F.; Santos, M.C.M.d.; Vieira, D.M.; Mota, R.L.; Rocha, E.; Cruz, B.v.; Araújo, D.; Andrade, E. Predictive Maintenance Model Based on Anomaly Detection in Induction Motors: A Machine Learning Approach Using Real-Time IoT Data. arXiv 2023, arXiv:2310.14949. [Google Scholar] [CrossRef]
  31. Costa, A.; Mastriani, E.; Incardona, F.; Munari, K.; Spinello, S. Predictive Maintenance Study for High-Pressure Industrial Compressors: Hybrid Clustering Models. arXiv 2024, arXiv:2411.13919. [Google Scholar] [CrossRef]
  32. Hosamo, H.H.; Svennevig, P.R.; Svidt, K.; Han, D.; Nielsen, H.K. A Digital Twin predictive maintenance framework of air handling units based on automatic fault detection and diagnostics. Energy Build. 2022, 261, 111988. [Google Scholar] [CrossRef]
  33. Ahmed Murtaza, A.; Saher, A.; Hamza Zafar, M.; Kumayl Raza Moosavi, S.; Faisal Aftab, M.; Sanfilippo, F. Paradigm shift for predictive maintenance and condition monitoring from Industry 4.0 to Industry 5.0: A systematic review, challenges and case study. Results Eng. 2024, 24, 102935. [Google Scholar] [CrossRef]
  34. Elharnaf, I.; Achtaich, K.; Tetouani, S. Improving Predictive Maintenance Performance Using Machine Learning and Vibration Analysis Algorithms. Eng. Proc. 2025, 97, 45. [Google Scholar] [CrossRef]
  35. Dikmen, F.; Demir, A.; Özkaya, B.; Raza, M.O.; Rasheed, J.; Asuroglu, T.; Alsubai, S. AI-driven wastewater management through comparative analysis of feature selection techniques and predictive models. Sci. Rep. 2025, 15, 25347. [Google Scholar] [CrossRef] [PubMed]
  36. Tun, W.; Wong, J.K.-W.; Ling, S.-H. Hybrid Random Forest and Support Vector Machine Modeling for HVAC Fault Detection and Diagnosis. Sensors 2021, 21, 8163. [Google Scholar] [CrossRef] [PubMed]
  37. Kong, Y.; Wang, Z.; Nie, Y.; Zhou, T.; Zohren, S.; Liang, Y.; Sun, P.; Wen, Q. Unlocking the Power of LSTM for Long Term Time Series Forecasting. Proc. AAAI Conf. Artif. Intell. 2025, 39, 11968–11976. [Google Scholar] [CrossRef]
  38. An, T.; Feng, K.; Cheng, P.; Li, R.; Zhao, Z.; Xu, X.; Zhu, L. Adaptive prediction for effluent quality of wastewater treatment plant: Improvement with a dual-stage attention-based LSTM network. J. Environ. Manag. 2024, 359, 120887. [Google Scholar] [CrossRef]
  39. Mohammad, A.A.S.; Mohammad, S.I.S.; Al Oraini, B.; Vasudevan, A.; Hindieh, A.; Altarawneh, A.; Alshurideh, M.T.; Ali, I. Strategies for applying interpretable and explainable AI in real world IoT applications. Discov. Internet Things 2025, 5, 71. [Google Scholar] [CrossRef]
  40. Lundberg, S.; Lee, S.-I. A Unified Approach to Interpreting Model Predictions. Adv. Neural Inf. Process. Syst. 2017, 30, 4765–4774. [Google Scholar]
  41. Park, J.; Lee, W.H.; Kim, K.T.; Park, C.Y.; Lee, S.; Heo, T.-Y. Interpretation of ensemble learning to predict water quality using explainable artificial intelligence. Sci. Total Environ. 2022, 832, 155070. [Google Scholar] [CrossRef]
  42. Lamane, H.; Mouhir, L.; Moussadek, R.; Baghdad, B.; Kisi, O.; El Bilali, A. Interpreting machine learning models based on SHAP values in predicting suspended sediment concentration. Int. J. Sediment Res. 2025, 40, 91–107. [Google Scholar] [CrossRef]
  43. Hasan, M.N.; Jan, S.U.; Koo, I. Sensor Fault Detection and Classification Using Multi-Step-Ahead Prediction with an Long Short-Term Memoery (LSTM) Autoencoder. Appl. Sci. 2024, 14, 7717. [Google Scholar] [CrossRef]
  44. Lekidis, A.; Georgakis, A.; Dalamagkas, C.; Papageorgiou, E.I. Predictive Maintenance Framework for Fault Detection in Remote Terminal Units. Forecasting 2024, 6, 239–265. [Google Scholar] [CrossRef]
  45. Mohammadi, E.; Rani, A.; Stokholm-Bjerregaard, M.; Ortiz-Arroyo, D.; Durdevic, P. Wastewater Treatment Plant Data for Nutrient Removal System. arXiv 2024, arXiv:2407.05346. [Google Scholar] [CrossRef]
  46. Jeppsson, U.; Pons, M.-N.; Nopens, I.; Alex, J.; Copp, J.B.; Gernaey, K.V.; Rosen, C.; Steyer, J.-P.; Vanrolleghem, P.A. Benchmark simulation model no 2: General protocol and exploratory case studies. Water Sci. Technol. 2007, 56, 67–78. [Google Scholar] [CrossRef]
  47. Nopens, I.; Benedetti, L.; Jeppsson, U.; Pons, M.-N.; Alex, J.; Copp, J.B.; Gernaey, K.V.; Rosen, C.; Steyer, J.-P.; Vanrolleghem, P.A. Benchmark Simulation Model No 2: Finalisation of plant layout and default control strategy. Water Sci. Technol. 2010, 62, 1967–1974. [Google Scholar] [CrossRef]
  48. Miederer, J.; Meier, L.; Elhaus, N.; Markthaler, S.; Karl, J. Energy Management Model for Wastewater Treatment Plants. Energy Rep. 2025, 13, 6349–6361. [Google Scholar] [CrossRef]
  49. Gernaey, K.V.; Jeppsson, U.; Vanrolleghem, P.A.; Copp, J.B. (Eds.) Benchmarking of Control Strategies for Wastewater Treatment Plants; IWA Publishing: London, UK, 2024. [Google Scholar] [CrossRef]
  50. Kulanuwat, L.; Chantrapornchai, C.; Maleewong, M.; Wongchaisuwat, P.; Wimala, S.; Sarinnapakorn, K.; Boonya-aroonnet, S. Anomaly Detection Using a Sliding Window Technique and Data Imputation with Machine Learning for Hydrological Time Serie. Water 2021, 13, 1862. [Google Scholar] [CrossRef]
  51. Jiang, D.; Xu, R.; Xu, X.; Xie, Y. Multi-view feature transfer for click-through rate prediction. Inf. Sci. 2021, 546, 961–976. [Google Scholar] [CrossRef]
  52. Zhang, M.-L.; Zhou, Z.-H. A Review on Multi-Label Learning Algorithms. IEEE Trans. Knowl. Data Eng. 2014, 26, 1819–1837. [Google Scholar] [CrossRef]
  53. SHAP Documentation. Shap.DeepExplainer. Available online: https://shap.readthedocs.io/en/latest/generated/shap.DeepExplainer.html (accessed on 5 August 2025).
  54. Logical Systems. From Nuisance to Insight: Best Practices for Alarm Management. Available online: https://www.logicalsysinc.com/connecting-point/from-nuisance-to-insight-best-practices-for-alarm-management/ (accessed on 10 August 2025).
  55. Odize. Victory Oghenerabome. In Diffuser Fouling Mitigation, Wastewater Characteristics And Treatment Technology impact on Aeration Efficiency; Virginia Tech: Blacksburg, VA, USA, 2018. [Google Scholar]
  56. Leu, S.; Rosso, D.; Larson, L.E.; Stenstrom, M.K. Real-Time Aeration Efficiency Monitoring in the Activated Sludge Process and Methods to Reduce Energy Consumption and Operating Costs. Water Environ. Res. 2009, 81, 2471–2481. [Google Scholar] [CrossRef] [PubMed]
  57. CUBE CONCEPTS. Europe’s Industrial Electricity Prices 2024. Available online: https://cubeconcepts.de/en/europes-industrial-electricity-prices-2024/ (accessed on 28 August 2025).
Figure 1. Conceptual architecture of the RF model used in this study: (a) ensemble-based classification of system states; (b) feature importance analysis guiding variable selection for subsequent LSTM modeling.
Figure 1. Conceptual architecture of the RF model used in this study: (a) ensemble-based classification of system states; (b) feature importance analysis guiding variable selection for subsequent LSTM modeling.
Water 17 02636 g001
Figure 2. Structure of the LSTM network used for time-series fault detection: sequential memory cells with gating mechanisms feed into a dense output layer for binary or multi-label classification of pressure loss and diffuser fouling faults.
Figure 2. Structure of the LSTM network used for time-series fault detection: sequential memory cells with gating mechanisms feed into a dense output layer for binary or multi-label classification of pressure loss and diffuser fouling faults.
Water 17 02636 g002
Figure 3. SHAP waterfall plot for a WWTP fault prediction. Positive contributions (red) increase the likelihood of predicting a fault, while negative contributions (blue) shift the output toward a healthy system state. Starting from the baseline value E[f(X)], the contributions are applied sequentially to reach the final model prediction f(x).
Figure 3. SHAP waterfall plot for a WWTP fault prediction. Positive contributions (red) increase the likelihood of predicting a fault, while negative contributions (blue) shift the output toward a healthy system state. Starting from the baseline value E[f(X)], the contributions are applied sequentially to reach the final model prediction f(x).
Water 17 02636 g003
Figure 4. Simulated aeration system degradation scenarios: (a) Pressure loss fault with sudden stepwise decrease in KLa; (b) Diffuser fouling fault with gradual KLa degradation due to biofilm and clogging.
Figure 4. Simulated aeration system degradation scenarios: (a) Pressure loss fault with sudden stepwise decrease in KLa; (b) Diffuser fouling fault with gradual KLa degradation due to biofilm and clogging.
Water 17 02636 g004
Figure 5. Feature importance rankings from RF classification for aeration system faults: (a) pressure loss scenario; (b) fouling scenario.
Figure 5. Feature importance rankings from RF classification for aeration system faults: (a) pressure loss scenario; (b) fouling scenario.
Water 17 02636 g005
Figure 6. Confusion matrices for the binary LSTM classifiers: (a) Pressure loss detection; (b) Fouling detection.
Figure 6. Confusion matrices for the binary LSTM classifiers: (a) Pressure loss detection; (b) Fouling detection.
Water 17 02636 g006
Figure 7. Performance metrics of the multi-label classifier: (a) Macro Jaccard score and (b) Hamming loss, demonstrating the balance between accuracy and classification errors.
Figure 7. Performance metrics of the multi-label classifier: (a) Macro Jaccard score and (b) Hamming loss, demonstrating the balance between accuracy and classification errors.
Water 17 02636 g007
Figure 8. Confusion matrices for the multi-label classifier: (a) Detection of pressure loss fault; (b) Detection of diffuser fouling fault.
Figure 8. Confusion matrices for the multi-label classifier: (a) Detection of pressure loss fault; (b) Detection of diffuser fouling fault.
Water 17 02636 g008
Figure 9. Performance evaluation of the multi-label LSTM classifier: (a) Precision–recall curves for pressure loss and fouling detection, with average precision (AP) scores; (b) Training and validation MSE evolution over 30 epochs, showing stable convergence without overfitting.
Figure 9. Performance evaluation of the multi-label LSTM classifier: (a) Precision–recall curves for pressure loss and fouling detection, with average precision (AP) scores; (b) Training and validation MSE evolution over 30 epochs, showing stable convergence without overfitting.
Water 17 02636 g009
Figure 10. Global feature importance for the multi-label LSTM model based on SHAP values: (a) Fouling prediction showing the top-ranked variables and time steps contributing to diffuser clogging detection; (b) Pressure loss prediction highlighting key aeration flow and oxygen transfer variables driving fault classification.
Figure 10. Global feature importance for the multi-label LSTM model based on SHAP values: (a) Fouling prediction showing the top-ranked variables and time steps contributing to diffuser clogging detection; (b) Pressure loss prediction highlighting key aeration flow and oxygen transfer variables driving fault classification.
Water 17 02636 g010
Figure 11. Local SHAP explanations for individual predictions: (a) Pressure loss case showing the dominant influence of recent Qair drops and KLa decrease on fault probability; (b) Fouling case illustrating how sustained SOout declines and SNOout increases shift the prediction from healthy to fouled over time.
Figure 11. Local SHAP explanations for individual predictions: (a) Pressure loss case showing the dominant influence of recent Qair drops and KLa decrease on fault probability; (b) Fouling case illustrating how sustained SOout declines and SNOout increases shift the prediction from healthy to fouled over time.
Water 17 02636 g011
Table 1. Common aeration system faults, causes, and operational impacts.
Table 1. Common aeration system faults, causes, and operational impacts.
Fault TypeCommon CausesOperational Impact
Pressure loss
[13,14,24]
Partial valve blockages;
pipeline leaks;
uneven airflow
Reduced airflow delivery; low DO levels; impaired
nitrification
Diffuser fouling
[13,22,23,24]
Biofilm accumulation; mineral scaling; suspended solids
deposits
Gradual loss of OTE;
increased blower energy
demand
Mechanical water
[11,15,25]
Aging or physical damage of blowers, valves, and diffusersAirflow imbalances;
increased noise; overall
aeration inefficiency
Sensor/control failures
[12,15,17]
Malfunctioning DO sensors
or actuators
Suboptimal aeration control; indirect deterioration of
effluent quality
Table 2. Comparison of traditional and predictive maintenance strategies in WWTPs.
Table 2. Comparison of traditional and predictive maintenance strategies in WWTPs.
StrategyDescriptionAdvantagesLimitations
Reactive
[9,19]
Repairs only after equipment failureSimple implementation; no upfront monitoring costsHigh unplanned
downtime; environmental compliance risks
Preventive
[9,21]
Scheduled inspections and replacementsReduced catastrophic failures; predictable maintenanceOver-maintenance;
higher operational costs
Predictive
[10,17,20]
Uses sensors and models to forecast degradationOptimized scheduling; early fault detection; energy savings [26]Requires monitoring infrastructure and advanced data-driven models
Table 3. List of process variables used in the RF analysis.
Table 3. List of process variables used in the RF analysis.
AbbreviationFull DescriptionUnit
T S S i n Total Suspended Solids—Influentmg/L
T E M P i n Influent Temperature°C
S O o u t Dissolved Oxygen—Effluentmg/L
S O i n Dissolved Oxygen—Influentmg/L
S N O o u t Nitrate/Nitrite—EffluentmgN/L
S N O i n Nitrate/Nitrite—InfluentmgN/L
S N H i n Ammonium—InfluentmgN/L
Q P i n Influent Phosphorus Flow Ratem3/d
Q a i r Estimated Airflow Ratem3/h
K L a Local Oxygen Transfer Coefficient1/h
C O D Chemical Oxygen Demandmg/L
Table 4. Model configurations and training strategies for pressure loss and fouling detection.
Table 4. Model configurations and training strategies for pressure loss and fouling detection.
ModelOutput LayerLoss FunctionTime StepsFaults DetectedTraining Strategy
Binary—pressure lossSoftMax 1 (2 neurons)Cross-entropy20Pressure loss onlyIndependent training
Binary—foulingSoftMax (2 neurons)Cross-entropy20Fouling onlyIndependent training
Multi-labelSoftMax (2 neurons)Binary cross-entropy20Pressure loss + foulingShared architecture, multi-label
Random Forest baselineN/AGini impurity 2100 treesPressure loss + foulingFeature selection + classification
Notes: 1 refers to a function that transforms raw model outputs into probability distributions over the predicted classes. In binary classification, this is equivalent to applying the function to two output neurons representing the “healthy” and “faulty” states; 2 is a criterion used in decision trees to measure how often a randomly chosen element would be incorrectly classified if it were randomly labeled according to the distribution of labels in a node. Lower Gini values indicate better splits, contributing to more accurate and efficient classification.
Table 5. Evaluation metrics used for assessing binary and multi-label classification performance.
Table 5. Evaluation metrics used for assessing binary and multi-label classification performance.
MetricInterpretationFormula
AccuracyFraction of correctly predicted labels out of all predictions. T P + T N T P + T M + F P + F N
PrecisionProportion of positive predictions that are correct. T P T P + F P
RecallAbility to detect actual faults (sensitivity). T P T P + F N
Macro F1-scoreBalanced measure of detection performance across multiple labels. 2 × P r e c i s i o n + R e c a l l P r e c i s i o n + R e c a l l
(averaged across classes)
Jaccard IndexSimilarity measure between predicted and true labels. T P T P + F P + F N
Hamming LossFraction of incorrectly predicted labels (false positives/negatives). 1 n L i = 1 n j = 1 L 1 y i j y ^ i j
Table 6. Performance results for predictive models.
Table 6. Performance results for predictive models.
ModelAccuracyPrecisionRecallF1-ScoreJaccard IndexHamming Loss
Binary Classifier—Pressure Loss0.950.940.920.930.900.05
Binary Classifier—Fouling0.940.920.900.910.880.06
Multi-label Classifier (LSTM)0.940.930.910.920.620.04
Table 7. Performance results for predictive models (time-ordered validation).
Table 7. Performance results for predictive models (time-ordered validation).
ModelAccuracyPrecisionRecallF1-ScoreJaccard IndexHamming Loss
Binary Classifier—Pressure Loss0.850.720.740.700.550.15
Binary Classifier—Fouling0.880.800.790.790.650.12
Multi-label Classifier (LSTM)0.820.750.700.720.580.14
Table 8. Performance results without KLa-derived features (test set results).
Table 8. Performance results without KLa-derived features (test set results).
ModelAccuracyPrecisionRecallF1-ScoreJaccard IndexHamming Loss
Binary Classifier—Pressure Loss0.900.890.880.890.820.09
Binary Classifier—Fouling0.890.880.870.880.800.10
Multi-label Classifier (LSTM)0.890.880.860.870.580.08
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Voipan, D.; Voipan, A.E.; Barbu, M. Hybrid Explainable AI Framework for Predictive Maintenance of Aeration Systems in Wastewater Treatment Plants. Water 2025, 17, 2636. https://doi.org/10.3390/w17172636

AMA Style

Voipan D, Voipan AE, Barbu M. Hybrid Explainable AI Framework for Predictive Maintenance of Aeration Systems in Wastewater Treatment Plants. Water. 2025; 17(17):2636. https://doi.org/10.3390/w17172636

Chicago/Turabian Style

Voipan, Daniel, Andreea Elena Voipan, and Marian Barbu. 2025. "Hybrid Explainable AI Framework for Predictive Maintenance of Aeration Systems in Wastewater Treatment Plants" Water 17, no. 17: 2636. https://doi.org/10.3390/w17172636

APA Style

Voipan, D., Voipan, A. E., & Barbu, M. (2025). Hybrid Explainable AI Framework for Predictive Maintenance of Aeration Systems in Wastewater Treatment Plants. Water, 17(17), 2636. https://doi.org/10.3390/w17172636

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop