Next Article in Journal
Indication of Long-Term Changes of Algae Communities in a Hydrologically Transformed Estuary Sasyk, Black Sea, Ukraine
Next Article in Special Issue
Oxygen Uptake Rate as an Indicator of the Substrates Utilized by Candidatus Accumulibacter
Previous Article in Journal
Predicting Flood Frequency with the LH-Moments Method: A Case Study of Prigor River, Romania
Previous Article in Special Issue
Knowledge Mapping of High-Rate Algal Ponds Research
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fault Detection of Wastewater Treatment Plants Based on an Improved Kernel Extreme Learning Machine Method

School of Electrical and Control Engineering, North China University of Technology, Beijing 100144, China
*
Authors to whom correspondence should be addressed.
Water 2023, 15(11), 2079; https://doi.org/10.3390/w15112079
Submission received: 29 March 2023 / Revised: 18 May 2023 / Accepted: 22 May 2023 / Published: 30 May 2023
(This article belongs to the Special Issue Functional Microorganisms in Wastewater Treatment)

Abstract

:
In order to ensure the stable operation, improve efficiency, and enhance sustainability of wastewater treatment systems, this paper investigates the fault detection problem in wastewater treatment process based on an improved kernel extreme learning machine method. Firstly, a kernel extreme learning machine (KELM) model optimized by an improved mutation bald eagle search (IMBES) optimizer is proposed to generate point predictions of effluent quality parameters. Then, based on the point prediction results, the confidence interval of effluent quality parameters is calculated using kernel density estimation (KDE) method. This interval represents the bounds of system uncertainty and unknown disturbance at normal conditions and can be treated as the threshold for fault diagnosis. Finally, the effectiveness of the proposed method is illustrated by two datasets obtained from the BSM1 wastewater simulation platform and an actual water platform. Experimental results show that compared with other methods such as CNN, LSTM, and IBES-LSSVM, this method has a significant improvement in prediction accuracy, and at the same confidence level, it ensures fault detection rate while generating smaller confidence intervals.

1. Introduction

In recent decades, water industry has undergone significant changes due to the rapid development of new-generation information technologies such as the Internet of Things (IoT), cloud computing and big data. Building safe and efficient water systems and developing smart water technologies has become an inevitable trend. The use of IoT technology in smart water systems has gained much attention and provides strong technical support for intelligent operation and management. Moreover, in response to increasingly prominent environmental problems, countries have developed strict discharge standards for wastewater treatment plants (WWTPs). As a result, most WWTPs are equipped with many redundant hardware facilities to ensure plant safety. Thus, timely monitoring and fault diagnosis of effluent water quality have become crucial issues, with significant research outcomes [1,2,3].
In general, current fault diagnosis methods be broadly categorized into three categories: model-based, data-driven and knowledge-based methods [4,5]. One of the most representative mechanism models developed by the International Association for Research and Control of Water Pollution since 1987 is the activated sludge model, which has been beneficial in understanding the mechanism of wastewater treatment processes and has provided good guidance for the design process of wastewater treatment. However, this model has some certain limitations, such as difficult parameter estimation and poor prediction performance. On the other hand, knowledge-based methods heavily rely on the expertise and knowledge of the experts, which somewhat hinders their practical applications [6].
Data-driven fault diagnosis methods for WWTPs have gained significant attention in recent years due to the advancements in data-driven technology [7], which mainly includs statistical analysis, signal analysis and machine learning methods. Among them, statistical analysis methods leverage stochastic processes and statistical reasoning and other mathematical theories to build prediction models, including Wiener processes, Gaussian processes, inverse Gaussian processes, and others. Currently, multivariate statistical process monitoring approaches such as principal component analysis (PCA), partial least squares (PLS), and their extensions, such as adaptive PCA, dynamic PCA, KPCA, KPLS and others, have been applied to fault diagnosis for WWTPs [1]. The fault detection method based on signal analysis mainly uses the theory of wavelet transform and Fourier transform to analyze the characteristics of vibration signals and pressure signals. It is used to diagnose pump station faults, pipeline blockages, fan failures, and other problems in the wastewater treatment process.
Since the concentration of effluent water quality parameters is a crucial factor in measuring water quality in wastewater treatment processes. Note that machine learning is a powerful tool for predicting effluent indicators in wastewater treatment due to its ability for strong nonlinear fitting. By utilizing machine learning to accurately forecast these indicators, it becomes possible to detect and identify potential malfunctions in the treatment process with greater precision and speed. Hence, machine learning based fault detection has been an hot topic and attracted significant attention [8,9]. Generally, machine learning techniques can be categorized into shallow machine learning and deep learning, depending on the amount of data needed for the training process. Deep learning techniques heavily rely on data and tend to perform better when working with large datasets, whereas shallow machine learning is more appropriate for predicting effluent water quality concentrations when only a small amount of data is available.
Among the existing techniques, extreme learning machine is relatively easy to implement, which makes it is a popular choice for a wide range of prediction tasks. To account for the nonlinearity and time variability of WWTPs, a dynamic KELM model is proposed in [10] to predict the key quality indices of effluent chemical oxygen demand (COD). In paper [11], an ELM black box model combined with PCA was developed to predict the effluent BOD, effluent COD and other effluent indicators of WWTP. Ref. [12] reviews the metabolic characteristics, microbial communities, and process applications of different types of ammonia-oxidizing microorganisms in wastewater treatment systems, and discusses the future development of nitrogen removal processes using these microorganisms. Ref. [13] validated that deep learning algorithms, especially LSTM-based models, outperformed the ELM model in terms of accuracy, robustness against overfitting, and capturing extreme hydrologic events such as no-flow events and extreme floods. In [14], an algorithm combining ELM and KPCA is proposed for process monitoring of water treatment plant. Ref. [15] proposes a KPCA-ELM model for forecasting the inlet COD and BOD concentration in wastewater treatment, which can be used to control parameter adjustment in the system for better control of WWTP, and outperforms other contrast approaches in terms of forecasting capacity and accuracy. These studies demonstrate the effectiveness of ELM and its extensions, especially KELM in predicting effluent water quality parameters in WWTPs.
The kernel parameters of KELM have a significant impact on prediction performance, which makes it is critical for selecting appropriate values. Swarm intelligence optimization algorithms have shown great potential in improving the performance of machine learning methods by finding the optimal solution through collaborative search mechanisms. In recent years, many researchers have combined swarm intelligence optimization algorithms with machine learning methods to solve various prediction and optimization problems [16]. Some commonly used methods include: particle swarm optimization (PSO) [17], artificial bee colony optimization (ABC) [18], gray wolf algorithm (GWO) [19], bald eagle search (BES) [20] and many other swarm intelligence optimization algorithms have been applied to wastewater treatment process successfully. These studies demonstrate the effectiveness and versatility of using swarm intelligence optimization algorithms in combination with machine learning methods.
Due to the unavoidable influence of unknown parameters and measurement noise in the WWTPs, interval estimation based on the point estimation result has been an important technique to evaluate the unknown disturbance. In [21], the VBELM model demonstrated superior performance for multi-scale groundwater level forecasting, with lower uncertainty and higher observed values within the confidence interval, compared to the single ELM model and the VELM model. Non-parametric methods such as the kernel density estimation (KDE) method can be used to estimate the distribution of prediction errors, which can be used to generate prediction intervals. The advantage of the KDE method is that it does not require prior knowledge about the data distribution, and it can capture the data distribution characteristics from the sample data itself [22]. Therefore, the use of the KDE method in fault diagnosis can reduce the interference of other factors and improve the reliability of the diagnosis. Ref. [23] proposes a method to track the time-varying statistical error of KPCA based on generalized likelihood ratio statistics (GLR) and approximate the upper control limit by KDE to realize the operation of KPCA-based variational system, and the results show that the applicability of SSGLR system based on KPCA-KDE is superior to kernel locality preserving projection(KLPP) in fault identification. Ref. [24] proposes interpolated IKDE to reduce computational cost and improve processing time. However, to the best knowledge of the authors, little attention has been paid on KDE based interval generation for WWTPs, which motives this work.
In this paper, in order to deal with the problem of fault detection in sewage treatment plant, we need to collect some important variables online, analyze the effluent variables, find out the relationship between easily measured variables, establish a prediction model, and achieve the purpose of indirect measurement.
The point prediction of effluent indices can be obtained based on many existing regression approach. However, it is important to note that the point prediction method by itself may not be sufficient to account for the uncertainties that are inherent in system operations. To obtain a numerical estimation and evaluate its reliability, it is crucial to calculate prediction intervals in practical applications.
Interval prediction methods utilize statistical properties of prediction errors to estimate upper and lower bounds, which can be used as thresholds for fault detection decision-making. In normal conditions, the effluent variable values should fall within the estimation bounds. Deviation from these bounds indicates the occurrence of faults. Hence, the main objectiveness of this work it to generate the interval prediction result and then achieve fault detection based on it.
This paper focuses on real-time monitoring of wastewater quality variables in WWTPs. A method of IMBES-KELM-KDE is proposed to ensure the effective estimation of sensors and realize reliable monitoring and fault diagnosis. Aiming at the on-line prediction and fault detection of wastewater from WWTPs in the framework of intelligent data-driven, the main contributions of this work are as follows:
  • Since BES algorithm is easy to fall into local optimum, mutation strategy is introduced to optimize the traditional BES algorithm. In the initialization, tent chaotic strategy is used to optimize the initial position of prey. Furthermore, the mutation strategy is used in the three stages of BES algorithm to update the positions. Compared with existing swarm intelligence optimization models (such as PSO, WOA, IBES, GWO, SSA), the proposed method achieves higher prediction accuracy. Then, the proposed IMBES optimization algorithm is used to solve the optimal parameters of KELM.
  • In order to estimate the uncertainty of model prediction results and make better decisions, the KDE method is used to generate the interval prediction boundary of effluent quality after the point prediction results are obtained.
  • According to the fault factors in different environments, the proposed model is used for fault diagnosis of wastewater treatment process. Compared with the previous methods, it is proved that the generated interval is more sensitive and can accurately diagnose the occurrence of faults.
The structure of this paper is as follows: Section 2 describes the proposed IMBES-KELM-KDE model to generate the interval prediction. In Section 3, simulation examples are depicted and the feasibility of this method is verified in three different fault environments. Section 4 draws conclusions of this paper.

2. Materials and Methods

In this paper, an IMBES-KELM-KDE method is proposed to fault diagnosis for wastewater treatment plant, the schematic of the proposed method is shown in Figure 1.

2.1. KELM Model

KELM is an improved model of ELM and has good non-linear fitting ability and fast learning speed [25]. The number of KELM’s hidden layer nodes does not need to be given, and the unknown nonlinear feature mapping of hidden layer is represented by kernel function, which can enhance the generalization ability and stability of ELM.
To predict the effluent water quality index, the wastewater treatment sample data should be mapped to higher dimensions through non-linear changes, and linear functions are used for fitting in this high-dimensional feature space. Suppose the structure of the ELM model is with n input variables, q hidden layer neurons and m output variables, then we have:
h i ( x ) = h ( w i x + b i ) , i = 1 , , n y l = j = 1 q β j h i w i x + b i , l = 1 , 2 , , n
where x mean the input, y l means the l-th output variables. h ( · ) represents activation function. w i denotes the weight matrices from input nodes to hidden nodes and it is set randomly and b i is the bias variable. β j is the matrix between the hidden nodes and the output nodes.
Denote the hidden layer output matrix as
H = h 1 w 11 x 1 + b 1 h q w 1 q x 1 + b q h 1 w 21 x 2 + b 1 h q w 2 q x 2 + b q h 1 w n 1 x n + b 1 h q w n q x n + b q n × q
and the output weight matrix as β R q × 1
β = H T H H T 1 y
where y = [ y 1 , , y j , , y n ] T represents the data affected by water outlet failure.
Since the input weight w and hidden neuron threshold b are randomly generated in ELM, the effect of the method is unstable. In order to improve the accuracy and stability of the method, the kernel parameter is introduced in the algorithm to replace the random feature mapping of ELM, and the KELM method is formed. The parameter 1 / C is added to the unit diagonal matrix H H T so that its characteristic root is not zero, which further makes KELM more stable and has better generalization. The model of KELM is as follows:
y ^ = H β = H H T 1 C + H H T 1 y
H H T = [ K x , x 1 , , K x , x n ]
K x , x j = exp x x j 2 σ 2
where K represents kernel function which is usually set to RBF kernel function, C represents regularization coefficient, σ represents kernel parameter.
It is difficult to select the optimal C and σ , which has a great impact on the prediction performance of KELM. In this paper, a hybrid IMBES-KELM model is proposed, in which the parameters of C and σ can be optimized by IMBES method.

2.2. IMBES Optimizer

The bald eagle search (BES) optimisation algorithm was proposed by Alsattar et al. in 2020 [26]. It mainly simulated the hunting strategy and intelligent social behavior of condor when looking for prey. The algorithm can be divided into three parts, namely select stage, search stage and swoop stage (Figure 2).

2.2.1. Tent Chaos Strategy

In this paper, to improve the quality of the initial solution, a tent chaos strategy is utilized to optimize the initial position of prey, and a linear decline method is employed to improve the control parameters of vulture iterative update position. This approach helps to identify optimal model parameters and improve the fitting quality. The tent chaos mapping function is described as follows:
P i + 1 = P i / λ , P i [ 0 , λ ) 1 P i / ( 1 λ ) , P i [ λ , 1 ]
where P i is the location of the i-th vulture and λ belongs to [ 0 , 1 ] .

2.2.2. Select Stage

Bald eagles select search areas randomly and assess the number of prey to determine the best locations. During this stage, the bald eagle’s position P i , n e w is updated through a random search of prior information multiplied by α . The behavior of the bald eagle can be described mathematically as follows:
P i , n e w = P b e s t + C 1 · r a n d · ( P m e a n P i )
where C 1 is a parameter controlling the position change, and r a n d is a random number between ( 0 , 1 ) . P b e s t is the current optimal location. P m e a n is the average distribution location of vultures after the previous search.

2.2.3. Search Stage

Bald eagles use a spiral search pattern to efficiently locate prey within their selected search space. The mathematical model used to describe this spiral flight behavior involves updating the position using the polarity equation. Specifically, the new position P i , n e w of the bald eagle is determined by adding the current position P i to the product of the spiral factor r ( i ) and the sine and cosine functions of the polar angle θ ( i ) . The polar angle is calculated based on the iteration step and the maximum number of iterations, which ensures that the spiral search pattern covers the entire search space. The resulting equation is as follows:
θ ( i ) = π · ω · r a n d
r ( i ) = θ ( i ) + C 2 · r a n d
ω = ( 1 i i m a x ) 2 · ( ω m a x ω m i n ) + ω m i n
x r ( i ) = r ( i ) · s i n [ θ ( i ) ]
y r ( i ) = r ( i ) · c o s [ θ ( i ) ]
x ( i ) = x r ( i ) max ( | x r | )
y ( i ) = y r ( i ) max ( | y r | )
where θ ( i ) and r ( i ) are the polar angles and diameters of the spiral equation, respectively. ω and C 2 are the parameters controlling the spiral trajectory. x ( i ) and y ( i ) are the bald eagle positions in polar coordinates, and the values are ( 1 , 1 ) . Bald eagle position updates are as follows:
P i , n e w = P i + y ( i ) · P i P i + 1 + x ( i ) · P i P m e a n
where P i + 1 is the next update position of the i-th bald eagle.

2.2.4. Swoop Stage

The bald eagle’s final stage of hunting involves quickly swooping down on the target prey from the best spot in the search space, while the rest of the population simultaneously moves to the best spot and attacks the prey. The motion state is still described by the polar equation, given as follows:
θ ( i ) = π · ω · r a n d
r ( i ) = θ ( i )
x r ( i ) = r ( i ) · s i n h [ θ ( i ) ]
y r ( i ) = r ( i ) · c o s h [ θ ( i ) ]
x 1 ( i ) = x r ( i ) max ( | x r | )
y 1 ( i ) = y r ( i ) max ( | y r | )
the position update formula of bald eagle in dive is:
P i , n e w = r a n d · P b e s t + x 1 ( i ) · P i C 3 · P m e a n + y 1 ( i ) · P i C 4 · P b e s t
where C 3 and C 4 are the intensity of the bald eagle moving towards the optimal central position, and their values are (1, 2).

2.2.5. Mutation Strategy

To address the potential issue of the BES algorithm getting trapped in local optima, a mutation operation [27] was introduced into the algorithm. When vultures were close to the historical optimal position for targeting prey, prey positions meeting certain mutation conditions were mutated to increase population diversity and improve the algorithm’s global optimization capability. The mutation operation is described as follows:
P i , mutation = P i , n e w + p c · r a n d p c = p m · P i , m a x P i , m i n
where P i , mutation is the bald eagle position after the mutation, p c represents the variation factor, and the value range is the smallest definition domain among all prey positions. p m represents the variation rate. P i , m a x represents the maximum set search range, P i , m i n represents the minimum set search range, and P i , m a x P i , m i n represents the domain of prey location.
The position of prey is subject to variation rate p m . In the early iteration period, the BES algorithm mainly plays its own characteristics and adopts a small variation rate. With the increase of iteration times, the diversity of the algorithm becomes worse. The formula for calculating the variation rate is:
p m = 1 ( i 1 ) ( N 1 ) 1 / σ
where σ represents the initial variation rate set, i represents the number of current iterations and N represents the maximum number of iterations.

2.3. Interval Generated by KED Method

In this section, the kernel density estimation (KDE) method is used to estimate the prediction error probability density curve of effluent data [28]. KDE is a non-parametric estimation method that directly estimates the density of a random variable without distribution assumptions. This universal approach produces a fitted probability density function that is closer to the real information.
For a group of wastewater treatment effluent prediction error data E = { e 1 , e 2 , , e n } , where n is the number of effluent prediction error samples. Based on the principle of KDE, the probability density function of effluent prediction error is obtained as:
f ( e , γ ) = 1 n γ j = 1 n K ( e e j γ )
where e j is the j-th prediction error sample, f ( e , γ ) represents the KDE of prediction errors, γ means the bandwidth that determines the interval division of the error data distribution, K ( · ) denotes the kernel function. In this work, the effluent prediction error e and the bandwidth γ are assumed to be independent.
The choice of kernel function can have a significant impact on the resulting KDE estimate. In this paper, the Gaussian kernel function is selected which can be expressed as
K ( e ) = 1 2 π e x p ( e 2 2 )
Hence, the non-parametric KDE is thus obtained as
f ( e , γ ) = 1 2 π n γ j = 1 n e x p ( 1 2 ( e e j γ ) 2 )
The probability interval estimation of effluent prediction error can be divided into three steps:
(1)
calculating the prediction error of WWTPs based on IMBES-KELM model;
(2)
obtaining the quantile at the confidence of ( 1 μ ) % based on KED method;
(3)
generating the effluent quality parameter interval prediction values.
Given the confidence level of ( 1 μ ) % , the upper and lower quantile spot F μ / 2 and F 1 μ / 2 can be obtained. Then, the effluent data interval τ = [ L μ , U μ ] at the confidence level of ( 1 μ ) % is obtained as
L μ = y ^ F 1 μ / 2 U μ = y ^ + F μ / 2
where y ^ represents the point prediction value of effluent data, L μ and U μ are the lower and upper boundaries of the predicted interval at the confidence level of ( 1 μ ) % , respectively.
Next, to evaluate the performance of the generated interval, the following evaluation criteria are analysed [29].
Prediction Interval Coverage Probability (PICP): the ratio of the real value to the upper and lower bounds of the prediction interval.
PICP = 1 N k = 1 N π k
where N is the number of prediction points. If the true value is within the [ Y ̲ , Y ¯ ] range, π k is 1. Otherwise, π k is 0. If all true values are included in the prediction interval, PICP = 100 % . Hence, a larger PICP value indicates better monitoring performance.
Prediction Interval normalized averaged width (PINAW): measures the width of the generated interval. When PICP is consistent, a smaller PINAW corresponds to a narrower generated interval.
PINAW = 1 N R k = 1 N ( U μ L μ )
where R is the range of true values.
All interval score (AIS): is a practical tool to provide comprehensive consideration of coverage and interval width. Interval score S k of the k-th forecast interval is defined as follows:
S k = 2 U k μ L k μ 4 L k μ y ^ k , i f y ^ k < L k μ 2 U k μ L k μ , i f y ^ k [ L k μ , U k μ ] 2 U k μ L k μ 4 y ^ k U k μ , i f y ^ k > U k μ
when the target is not within the coverage range, certain penalties will be given. The overall AIS assessment is as follows:
AIS = 1 N k = 1 N S k
In addition, a higher AIS value indicates a better quality of the prediction interval.
In practical applications, it is often desirable to obtain a narrow prediction interval width while maintaining a high prediction probability. However, the probability of the prediction interval range and the interval width may conflict with each other.
Coverage Width-based Criterion (CWC): a comprehensive index of the prediction interval range and the interval width.
C W C = PINAW 1 + ϱ ( P I C P ) · e τ · ( P I C P ( 1 μ ) )
where τ and μ are constants, and
ϱ = 0 P I C P P I N C 1 P I C P < P I N C
where PINC is the set confidence level. When a fault occurs, the true value exists outside the predicted interval.
In this paper, CWC is selected as the fitness function of the whole algorithm. In addition, the overall pseudocode of the proposed algorithm is as in Algorithm 1.
Algorithm 1 Interval prediction based on IMBES-KELM-KDE model
  • Begin
  •    Initializes point P i by tent chaos strategy according to Equation (8);
  •    Set the KELM parameters C and σ , point prediction by Equations (4)–(6);
  •    Kernel density estimation interval by Equations (28) and (29);
  •    Calculate the fitness of the search agent by Equations (30)–(35), obtain the optimal solution P b e s t ;
  •     t = 1 ;
  • while ( t t m a x do
  •    for i = 1 to N
  •       Update the search areas position P i by Equation (8).
  •       Mutation strategy change the position P i by Equations (24) and (25).
  •    End for
  •    Evaluate the current population.
  •    Update the optimal solution P b e s t .
  •    for i = 1 to N
  •       Update the bald eagle position P i by Equations (9)–(16).
  •       Mutation strategy change the position P i by Equations (24) and (25).
  •    End for
  •    Compare the fitness function.
  •    Update the optimal solution P b e s t .
  •    for i = 1 to N
  •       Update the bald eagle dive position P i by Equations (17)–(23).
  •       Mutation strategy change the position P i by Equations (24) and (25).
  •    End for
  •    Compare the fitness function.
  •    Update the optimal solution P b e s t .
  •     t = t + 1
  • end while
  •    Acquire optimal parameters form the optimal solution P b e s t .
  •    Return the KELM optimal parameters C and σ .
  •    Return the Kernel density estimation optimal interval.

3. Simulation Results

In this section, to validate the effectiveness of the proposed IMBES algorithm, it is compared with commonly used swarm intelligence optimization algorithms (such as PSO, WOA, GWO, SSA, and IBES) on several commonly used functions listed in Table 1. In this study, MATLAB (version 2020a) is used for data preprocessing and machine learning model building. The software used in this study is widely used in data analysis and machine learning applications, showing excellent performance and versatility in various research fields.
The final statistical results are shown in Table 2. Moreover, the iterative process is depicted in Figure 3, Figure 4, Figure 5, Figure 6 and Figure 7. From the results, it can be seen that the IMBES algorithm proposed in our work exhibits a superior convergence rate and also provides competitive results on benchmark functions compared with other existing algorithms.
In the sequel, to verify the feasibility and superiority of the proposed method in fault detection of WWTPs, it is tested on two sets of data that are collected from the BSM1 wastewater treatment simulation platform and an actual wastewater treatment simulation platform, separately.
Sludge bulking and toxic shock are two common process faults in WWTPs. The value of the BSM1 model may indicate different levels of sludge expansion failure depending on the adjustment of μ H . In addition, sensor fault is a very common equipment failure. In this paper, sludge swelling fault, toxic shock fault, and sensor fault were established separately. Detailed descriptions of these faults are presented in Table 3.
First, 1344 sets of data are collected on BSM1 from day 1 to day 14. They are divided into two main parts. The first part comprises 672 groups and is responsible for constructing the model. The second part also consists of 672 groups and is used for prediction based on the constructed model. The effluent auxiliary variables of BSM1 simulation platform used in this work are presented in Table 4.
Similarity, 365 sets of data are collected on the actual simulation platform, which are divided into two parts. The first part included 305 groups and the second part included 60 groups. In addition, the variables are presented in Table 5.
In the experiment, we aimed to demonstrate the superiority of the proposed IMBES-KELM method. To this end, it is compared with some existing methods, including CNN, LSTM, SSA-KELM, IBES-LSSVM, IBES-KELM, and IMBES-KELM, under two fault environments, Fault 1 and Fault 2. The initialization conditions were set as follows: i t e r = 672 , n = 30 , w m a x = 10 , w m i n = 0 , C 1 = 1.8 , C 2 = 1 , C 3 = 1.5 , C 4 = 1.5 , σ = 0.1 , γ = 2 .
Table 6 and Table 7 depict the interval prediction index of sludge expansion fault and toxic impact fault, respectively. The results illustrate that the proposed IMBES-LSSVM-KED model is more effective in terms of prediction accuracy than existing models, such as CNN, LSTM, SSA-KELM, IBES-KELM, and IMBES-KELM. Under the same confidence level, all models are close to the set confidence level value according to the PICP index, which indicates that the experiment is correct in terms of method. By comparing the PINAW index, it can be seen that the IMBES-KELM model generates a smaller confidence interval. Compared with the comprehensive evaluation index CWC, it can be seen that the proposed model in this paper has good competitiveness.
The interval prediction results are shown in Figure 8 and Figure 9, wherein the solid and dashed lines represent the true and predicted values, respectively, besides, the dotted lines represent the boundaries generated by KDE. From Figure 8 and Figure 9 we can see that the curve for the true values falls outside of the interval after the seventh day, indicating that a fault occurs after this time, which is consistent with the fault environment that was designed for the study.
In addition, to evaluate its effectiveness in addressing sensor faults, similar process are considered in a real simulation environment. In this situation, the initialization conditions are set as: i t e r = 672 , n = 30 , w m a x = 10 , w m i n = 0 , C 1 = 1.8 , C 2 = 1 , C 3 = 1.5 , C 4 = 1.5 , σ = 0.1 , γ = 2 . In addition, fault diagnosis rate (FDR) and false positive rate (FAR) are selected to evaluate the effectiveness of the proposed method for sensor faults in a real simulation environment.
F D R = ( F D T D ) × 100 %
where F D is the number of times the system indicates a fault when there is none, and T D is the sum of true alarms and false alarms.
F A R = ( F A T A ) × 100 %
where F A is the number of times the system correctly identifies a fault, and T A is the sum of correct diagnoses and missed diagnoses.
From the results presented in Table 8, it is evident that the proposed method outperforms existing models such as CNN, LSTM, SSA-KELM, IBES-LSSVM, and IBES-KELM in terms of prediction accuracy. From Figure 10 we can also find that the true value curve lies outside the interval between 305 and 365, which means the fault is detected in these time period. Furthermore, Table 9 shows the comparison between the FAR and FDR, which reveals that the IMBES-KELM-KDE model can detect the occurrence of faults more accurately and its hysteresis is improved compared to the CNN-KDE, LSTM-KDE, SSA-KELM-KDE, IBES-LSSVM-KDE, and IBES-KELM-KDE models. PICP index test shows that all models reach the set confidence level. PINAW and CWC indexes show that the IMBES-KELM method generates more sensitive intervals, and the value increases by more than 50 % . AIS indicator indicates that IBES-KELM and IMBES-KELM generate better interval quality. In general, IMBES-KELM generate more sensitive interval, which can more accurately diagnose the occurrence of faults.
It is worth highlighting that the proposed method holds significant practical significance for the efficient operation of WWTPs. Through its accurate prediction and diagnosis of faults, the proposed method can provide early warning signals to operators, enabling them to take appropriate measures to prevent accidents and ensure smooth and efficient operation of the WWTP.

4. Conclusions

This paper proposes an improved IMBES-KELM algorithm for predicting water quality indicators in wastewater treatment plant effluent. In addition, to address data uncertainty, a prediction interval is generated based on the KDE method at a specified confidence level, providing upper and lower bounds for the predicted results. Then, fault diagnosis is performed based on different fault scenarios. Simulation results show that the proposed method has a high prediction accuracy for effluent quality and can generate smaller prediction intervals at the same confidence level, enabling accurate detection of faults.
Note that the proposed method only predicts water quality indicators and it is not the final work of wastewater treatment process. With the surge of data in wastewater treatment plants, it is necessary to consider building a big data ecosystem to support real-time monitoring and management of data streams for online decision-making and real-time fault diagnosis. Applying this work to reliable decision-making and generating appropriate control strategies will also be our future work.

Author Contributions

Conceptualization M.Z. and Y.Z.; methodology M.Z., J.W. and Y.Z.; resources T.X.; writing—review and editing M.Z. and Y.Z.; supervision Z.D. and W.Z.; investigation J.W.; formal analysis M.Z.; software and data curation Y.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This paper is funded by National Natural Science Foundation of China (62273007, 61973023), the Project of Cultivation for young top-motch Talents of Beijing Municipal Institutions (BPHR202203032).

Data Availability Statement

Data are available upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Newhart, K.B.; Holloway, R.W.; Hering, A.S.; Cath, T.Y. Data-driven performance analyses of wastewater treatment plants: A review. Water Res. 2019, 157, 498–513. [Google Scholar] [CrossRef] [PubMed]
  2. Han, H.G.; Dong, L.X.; Qiao, J.F. Data-knowledge-driven diagnosis method for sludge bulking of wastewater treatment process. J. Process Control 2021, 98, 106–115. [Google Scholar] [CrossRef]
  3. Alavi, J.; Ewees, A.A.; Ansari, S.; Shahid, S.; Yaseen, Z.M. A new insight for real-time wastewater quality prediction using hybridized kernel-based extreme learning machines with advanced optimization algorithms. Environ. Sci. Pollut. Res. 2022, 29, 20496–20516. [Google Scholar] [CrossRef] [PubMed]
  4. Venkatasubramanian, V.; Rengaswamy, R.; Kavuri, S.N.; Yin, K. A review of process fault detection and diagnosis: Part III: Process history based methods. Comput. Chem. Eng. 2003, 27, 327–346. [Google Scholar] [CrossRef]
  5. Wang, Z.H.; Shi, P.; Lim, C.C. H-/H fault detection observer in finite frequency domain for linear parameter-varying descriptor systems. Automatica 2017, 86, 38–45. [Google Scholar] [CrossRef]
  6. Mannina, G.; Rebouças, T.F.; Cosenza, A.; Sànchez-Marrè, M.; Gibert, K. Decision support systems (DSS) for wastewater treatment plants—A review of the state of the art. Bioresour. Technol. 2019, 290, 121814. [Google Scholar] [CrossRef] [PubMed]
  7. Wang, G.; Jia, Q.S.; Zhou, M.C.; Bi, J.; Qiao, J.; Abusorrah, A. Artificial neural networks for water quality soft-sensing in wastewater treatment: A review. Artif. Intell. Rev. 2022, 55, 565–587. [Google Scholar] [CrossRef]
  8. Yang, Y.; Kim, K.R.; Kou, R.; Li, Y.; Fu, J.; Zhao, L.; Liu, H. Prediction of effluent quality in a wastewater treatment plant by dynamic neural network modeling. Process Saf. Environ. Prot. 2022, 158, 515–524. [Google Scholar] [CrossRef]
  9. Chang, P.; Meng, F.C. Fault detection of urban wastewater treatment process based on combination of deep information and transformer network. IEEE Trans. Neural Netw. Learn. Syst. 2022, 1–10. [Google Scholar] [CrossRef]
  10. Liu, H.B.; Zhang, Y.C.; Zhang, H. Prediction of effluent quality in papermaking wastewater treatment processes using dynamic kernel-based extreme learning machine. Process Biochem. 2020, 97, 72–79. [Google Scholar] [CrossRef]
  11. Abbaa, S.; Elkiranb, G.; Nouranic, V. Improving novel extreme learning machine using PCA algorithms for multi-parametric modeling of the municipal wastewater treatment plant. Desalination Water Treat. 2021, 215, 414–426. [Google Scholar] [CrossRef]
  12. Zhao, W.H.; Bi, X.J.; Bai, M.; Wang, Y.Y. Research advances of ammonia oxidation microorganisms in wastewater: Metabolic characteristics, microbial community, influencing factors and process applications. Bioprocess Biosyst. Eng. 2023, 46, 621–633. [Google Scholar] [CrossRef] [PubMed]
  13. Forghanparast, F.; Mohammadi, G. Using Deep Learning Algorithms for Intermittent Streamflow Prediction in the Headwaters of the Colorado River, Texas. Water 2022, 14, 2972. [Google Scholar] [CrossRef]
  14. Abba, S.I.; Pham, Q.B.; Usman, A.G.; Linh, N.T.T.; Aliyu, D.S.; Nguyen, Q.; Bach, Q.V. Emerging evolutionary algorithm integrated with kernel principal component analysis for modeling the performance of a water treatment plant. J. Water Process 2020, 33, 101081. [Google Scholar] [CrossRef]
  15. Yu, T.; Yang, S.; Bai, Y.; Gao, X.; Li, C. Inlet Water Quality Forecasting of Wastewater Treatment Based on Kernel Principal Component Analysis and an Extreme Learning Machine. Water 2018, 10, 873. [Google Scholar] [CrossRef]
  16. García Nieto, P.J.; García-Gonzalo, E.; Arbat, G.; Duran-Ros, M.; Ramírez de Cartagena, F.; Puig-Bargués, J. A new predictive model for the filtered volume and outlet parameters in micro-irrigation sand filters fed with effluents using the hybrid PSO–SVM-based approach. Comput. Electron. Agric. 2016, 125, 74–80. [Google Scholar] [CrossRef]
  17. Han, H.G.; Lu, W.; Hou, Y.; Qiao, J.F. An adaptive-PSO-based self-organizing RBF neural network. IEEE Trans. Neural Netw. Learn. Syst. 2016, 29, 104–117. [Google Scholar] [CrossRef]
  18. Chen, S.; Fang, G.; Huang, X.; Zhang, Y. Water quality prediction model of a water diversion project based on the improved artificial bee colony–backpropagation neural network. Water 2018, 10, 806. [Google Scholar] [CrossRef]
  19. Shariati, M.; Mafipour, M.S.; Ghahremani, B.; Azarhomayun, F.; Ahmadi, M.; Trung, N.T.; Shariati, A. A novel hybrid extreme learning machine–grey wolf optimizer (ELM-GWO) model to predict compressive strength of concrete with partial replacements for cement. Eng. Comput. 2022, 38, 757–779. [Google Scholar] [CrossRef]
  20. Zhou, M.; Zhang, Y.; Wang, J.; Shi, Y.; Puig, V. Water quality indicator interval prediction in wastewater treatment process based on the improved BES-LSSVM algorithm. Sensors 2022, 22, 422. [Google Scholar] [CrossRef]
  21. Wu, M.; Feng, Q.; Wen, X.; Yin, Z.; Yang, L.; Sheng, D. Deterministic Analysis and Uncertainty Analysis of Ensemble Forecasting Model Based on Variational Mode Decomposition for Estimation of Monthly Groundwater Level. Water 2021, 13, 139. [Google Scholar] [CrossRef]
  22. Pan, C.; Tan, J.; Feng, D.D. Prediction intervals estimation of solar generation based on gated recurrent unit and kernel density estimation. Neurocomputing 2021, 453, 552–562. [Google Scholar] [CrossRef]
  23. Xu, C.; Huang, D.; Cai, B.; Chen, H.; Liu, Y.Q. A complex-valued slow independent component analysis based incipient fault detection and diagnosis method with applications to wastewater treatment processes. ISA Trans. 2022, 135, 213–232. [Google Scholar] [CrossRef] [PubMed]
  24. Shahzad, F.; Huang, Z.; Memon, W.H. Process monitoring using kernel PCA and kernel density estimation-based SSGLR method for nonlinear fault detection. Appl. Sci. 2022, 12, 2981. [Google Scholar] [CrossRef]
  25. Alexandros, I.; Anastastios, T.; Ioannis, P. On the kernel Extreme Learning Machine classifier. Pattern Recognit. Lett. 2015, 54, 11–17. [Google Scholar] [CrossRef]
  26. Alsattar, H.A.; Zaidan, A.A.; Zaidan, B.B. Novel meta-heuristic bald eagle search optimisation algorithm. Artif. Intell. Rev. 2020, 53, 2237–2264. [Google Scholar] [CrossRef]
  27. Gao, H.; Xu, W. Particle swarm algorithm with hybrid mutation strategy. Appl. Soft Comput. 2011, 11, 5129–5142. [Google Scholar] [CrossRef]
  28. Fiorio, C.V. Confidence intervals for kernel density estimation. Stata J. 2004, 4, 168–179. [Google Scholar] [CrossRef]
  29. Chen, X.Y.; Chau, K.W. Uncertainty analysis on hybrid double feedforward neural network model for sediment load estimation with LUBE method. Water Resour. 2019, 33, 3563–3577. [Google Scholar] [CrossRef]
Figure 1. Schematic of the proposed approach.
Figure 1. Schematic of the proposed approach.
Water 15 02079 g001
Figure 2. Three stages of the bald eagle hunting algorithm.
Figure 2. Three stages of the bald eagle hunting algorithm.
Water 15 02079 g002
Figure 3. Simulation result based on F1.
Figure 3. Simulation result based on F1.
Water 15 02079 g003
Figure 4. Simulation result based on F2.
Figure 4. Simulation result based on F2.
Water 15 02079 g004
Figure 5. Simulation result based on F3.
Figure 5. Simulation result based on F3.
Water 15 02079 g005
Figure 6. Simulation result based on F4.
Figure 6. Simulation result based on F4.
Water 15 02079 g006
Figure 7. Simulation result based on F5.
Figure 7. Simulation result based on F5.
Water 15 02079 g007
Figure 8. Fault detection results of sludge expansion fault.
Figure 8. Fault detection results of sludge expansion fault.
Water 15 02079 g008
Figure 9. Fault detection results of toxic impact fault.
Figure 9. Fault detection results of toxic impact fault.
Water 15 02079 g009
Figure 10. Fault diagnosis of sensors fault.
Figure 10. Fault diagnosis of sensors fault.
Water 15 02079 g010
Table 1. Benchmark functions.
Table 1. Benchmark functions.
FunctionRangeParameters
F1 i = 1 N x i 2 [ 100 , 100 ] dim = 4, popsize = 100, iteration = 300
F2 i = 1 N x i 2 + i 1 N x i [ 10 , 10 ] dim = 4, popsize = 100, iteration = 300
F3 max i x i , 1 i n [ 100 , 100 ] dim = 4, popsize = 100, iteration = 300
F4 i = 1 10 ( X a i ) ( X a i ) T + c i 1 [ 0 , 10 ] dim = 4, popsize = 100, iteration = 300
F5 i = 1 4 c i exp j = 1 3 a i j ( x j p i j ) 2 [ 1 , 3 ] dim = 3, popsize = 100, iteration = 120
Table 2. Benchmark functions.
Table 2. Benchmark functions.
GWOPSOWOASSAIBESIMBESTheoretical Value
F15.4269 × 10−221.41262.6723 × 10−432.1494 × 10−383.1367 × 10−811.6346 × 10−1010
F21.105 × 10−125.62491.1426 × 10−261.093 × 10−284.2468 × 10−511.3245 × 10−1070
F37.1326 × 10−61.67518.40861.549 × 10−111.6032 × 10−357.9769 × 10−460
F4−10.5278−10.5364−5.1285−5.1285−10.5364−10.5364−10
F5−3.8628−3.8628−3.8602−3.8628−3.8628−3.8628−3
Table 3. Faults in WWTP.
Table 3. Faults in WWTP.
Fault . No Fault Type Fault Time
Fault 1Sludge expansion fault (SEF)
( μ H = 8 , v = 100 )
8–14
Fault 2Toxic impact fault (TIF)
( μ H = 8 , B H = 10 )
8–14
Fault 3Sensors fault (SF)306–365
Table 4. Effluent auxiliary variable of BSM1.
Table 4. Effluent auxiliary variable of BSM1.
Auxiliary Variable Unit
Influent biochemical oxygen demandg/m 3
Influent readily biodegradable substrateg/m 3
Influent chemical oxygen demandg/m 3
Effluent biochemical oxygen demandg/m 3
Effluent readily biodegradable substrateg/m 3
Effluent chemical oxygen demandg/m 3
Effluent total soluble solidg/m 3
Table 5. Effluent auxiliary variable of actual simulation platform.
Table 5. Effluent auxiliary variable of actual simulation platform.
Auxiliary Variable Unit
Influent pH
Effluent pH
Effluent suspended solidsg/m 3
Influent biochemical oxygen demandg/m 3
Influent chemical oxygen demandg/m 3
Effluent chemical oxygen demandg/m 3
Mixed liquor suspended solids in biochemical tankg/m 3
Influent oilg/m 3
Effluent oilg/m 3
Influent ammonia nitrogeng/m 3
Influent chromad
Effluent chromad
Influent total nitrogeng/m 3
Influent phosphate concentrationg/m 3
Effluent biochemical oxygen demandg/m 3
Table 6. The interval prediction index of sludge expansion fault.
Table 6. The interval prediction index of sludge expansion fault.
Model MAE RMSE MSE R 2 PINC PICP PINAW CWC AIS
CNN 0.13430.17000.02890.993795%94.79%0.08270.4183−0.0001
LSTM 0.13380.18630.03470.988495%95.09%0.09030.0903−0.0002
SSA KELM 0.08880.12370.01530.994995%95.09%0.06440.0644−0.0002
IBES KELM 0.05810.08130.00660.997895%95.68%0.04630.0463−0.0001
IBES LSSVM 0.12470.16810.02750.993895%95.24%0.08430.0843−0.0002
IMBES KELM 0 . 0462 0 . 0665 0 . 0044 0 . 9986 95 % 95 . 24 % 0 . 0390 0 . 0390 0 . 0001
Table 7. The interval prediction index of toxic impact fault.
Table 7. The interval prediction index of toxic impact fault.
Model MAE RMSE MSE R 2 PINC PICP PINAW CWC AIS
CNN 0.02330.02920.00080.993795%95.39%0.07330.0733−0.0001
LSTM 0.01630.02060.00040.996995%95.09%0.04960.0496−0.0001
SSA KELM 0.01620.01980.00030.997195%94.35%0.05054.1671−0.0001
IBES KELM 0.01050.01330.00010.998795%95.09%0.03870.0387−0.0001
IBES LSSVM 0.01610.01970.00030.997195%96.58%0.04880.0488−0.0001
IMBES KELM 0 . 0086 0 . 0112 0 . 0001 0 . 9991 95 % 96 . 28 % 0 . 0351 0 . 0351 0 . 0001
Table 8. The interval prediction index of sensors fault.
Table 8. The interval prediction index of sensors fault.
Model MAE RMSE MSE R 2 PINC PICP PINAW CWC AIS
CNN 0.26670.16210.02630.950095%95%0.21300.2130−0.0043
LSTM 0.27200.35550.12640.695495%95%0.36300.3630−0.0047
SSA KELM 0.21030.14730.02170.956095%95%0.21760.2176−0.0002
IBES KELM 0.03810.05170.00270.995095%95%0.08530.0853−0.0001
IBES LSSVM 0.02110.04210.00180.996595%95%0.08100.0810−0.0007
IMBES KELM 0 . 0201 0 . 0278 0 . 0008 0 . 9986 95 % 95 % 0 . 0449 0 . 0449 0 . 0001
Table 9. Fault detection index.
Table 9. Fault detection index.
CNN LSTM SSA KELM IBES KELM IBES LSSVM IMBES KELM
FDR86.67%83.33%83.33%96.67%96.67%100.00%
FAR6.67%6.67%3.33%3.33%3.33%0.00%
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

Zhou, M.; Zhang, Y.; Wang, J.; Xue, T.; Dong, Z.; Zhai, W. Fault Detection of Wastewater Treatment Plants Based on an Improved Kernel Extreme Learning Machine Method. Water 2023, 15, 2079. https://doi.org/10.3390/w15112079

AMA Style

Zhou M, Zhang Y, Wang J, Xue T, Dong Z, Zhai W. Fault Detection of Wastewater Treatment Plants Based on an Improved Kernel Extreme Learning Machine Method. Water. 2023; 15(11):2079. https://doi.org/10.3390/w15112079

Chicago/Turabian Style

Zhou, Meng, Yinyue Zhang, Jing Wang, Tonglai Xue, Zhe Dong, and Weifeng Zhai. 2023. "Fault Detection of Wastewater Treatment Plants Based on an Improved Kernel Extreme Learning Machine Method" Water 15, no. 11: 2079. https://doi.org/10.3390/w15112079

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