# Research on Wastewater Treatment Monitoring Algorithms Based on Deep Convolutional Neural Networks

Authors: Xun Zhang; Yanhui Gu
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Around the problems of data loss, noise, and different temporal and spatial scale features of urban wastewater treatment process data, a method of monitoring and predicting wastewater treatment process data based on deep convolutional neural networks is proposed in the paper. Firstly, to address the problem that urban wastewater treatment process data has multiple spatial and temporal scale characteristics, which makes it difficult for the data to be used effectively, a spatial and temporal data fusion model based on fuzzy neural network (FNN) is proposed. Fuzzy neural networks have strong generalization ability and robustness. Secondly, to enable accurate and real-time monitoring of the content of the monitored components in the effluent of the urban wastewater treatment process, an intelligent prediction model based on SDF-FNN is established for the effluent. Finally, in order to verify the effectiveness of this intelligent prediction model, the model is tested using data collected from actual municipal wastewater treatment plants. The experimental results show that the wastewater treatment intelligent monitoring model is effective and can predict the content of the effluent monitoring index with high accuracy.


---

## Body

## 1. Introduction

Urban water pollution is a widespread problem, directly endangering the health of the people and the ecological balance, and has become an urgent problem that people are concerned about [1]. The recycling of wastewater, the maximum protection of the water environment, the sustainable use of freshwater resources, and the virtuous cycle, has become a strategic initiative of governments around the world for the comprehensive use of water resources [2]. In recent years, with the construction of municipal wastewater treatment processes (MWTPs) plants and the application of related technology development, the rate of wastewater treatment has been effectively increased. However, the operation of urban wastewater treatment plants is not optimistic, and abnormal conditions have become a major bottleneck in the operation and development of urban wastewater treatment plants [3]. Abnormal conditions are not found and disposed of in a timely manner, and process safety control is not effective, will directly affect the effluent quality, and endanger the operation of the entire wastewater treatment system, and can seriously lead to the collapse of the entire wastewater treatment process. Therefore, there is an urgent need to study effective methods for detecting abnormal working conditions in wastewater treatment, to solve the problem of identifying and suppressing abnormal working conditions and to ensure that the wastewater treatment process operates up to standard. In fact, due to the complexity and lag of the wastewater treatment process, the collected wastewater data is not only delayed but also due to the complex data detection environment of each operation unit such as anaerobic tank, anoxic tank, and aeration tank, which causes unclear data abnormal factors, resulting in abnormal working conditions that are difficult to accurately identify, reject, and compensate, thus preventing effective abnormal working condition location. Therefore, how to design an effective data detection method that can guarantee both the quality of the data detected and the accuracy of the wastewater treatment monitoring is still a challenge for the wastewater treatment process.In order to make full use of the wastewater treatment process variable data to identify abnormal working conditions online, the researchers analyzed the process data, explored the characteristic variables associated with the abnormal working conditions, established a data-driven process characteristic model to express the abnormal working condition characteristics, and combined with the threshold and parameter settings to determine the occurrence of abnormal working conditions, as shown in Figure1.Figure 1
Data-driven identification method for abnormal wastewater treatment conditions.With the increasing demand for recognition of abnormal conditions in terms of level, type and priority, accuracy, stability, and speed have become important indicators for testing abnormal condition recognition methods. In order to meet the recognition requirements and achieve the desired recognition effect, intelligent methods such as neural networks, fuzzy logic, and expert systems have been applied in China and abroad to achieve high quality recognition of wastewater treatment abnormal conditions [(12)].To further improve the recognition accuracy, Brault et al. applied neural networks to the prediction of filamentous sludge expansion in wastewater treatment, using the key parameters affecting the process as input to the neural network [4]. Lou et al. used a three-layer feedforward neural network to predict the sludge swelling characteristics, using pH, suspended solid concentration, dissolved oxygen dissolution, and other influencing factors as auxiliary variables to predict the occurrence of sludge swelling, thus achieving early warning of sludge swelling [5]. Barnett has developed a rule-based expert system for the identification of abnormal conditions in anaerobic sludge digestion processes. With the help of the process data analysis, sludge concentration, suspended solid concentration, dissolved oxygen concentration, and pH value, which characterize the state in the secondary sedimentation tank, were selected as auxiliary variables, and abnormal conditions were identified as the output [6]. In order to maintain the stability of the abnormal condition identification, Traore et al. used fuzzy rules to identify the sludge height of the secondary sedimentation tank with variables such as sludge concentration, sludge volume, and suspended matter concentration and used the identification results to evaluate the settling performance of the sludge-water mixture in the secondary sedimentation tank to determine whether the abnormal condition occurred [7]. To improve the computability of the model, Han et al. proposed a self-organizing radial basis function (SORBF) method to predict SVI. This method can reduce the computational complexity and ensure the rapidity of SVI prediction while maintaining the computational accuracy [8].Based on the above analysis, it can be seen that due to the diverse sources of municipal wastewater, the many and mostly unknown water quality components, and the diversity of abnormal conditions, it is difficult for conventional instrumentation to meet a wide range of needs, and the specificity of abnormal conditions requires a high level of real-time accuracy in the identification method. In order to better identify abnormal conditions in the wastewater treatment process, taking into account the operating methods and costs of the wastewater treatment industry, neural network-based intelligent identification technology is currently one of the better options for urban wastewater treatment plants compared to other identification technologies. The main contributions of this paper are as follows: for the problems of data loss, noise, and different spatiotemporal scale features of urban wastewater treatment process data, this paper proposes a method for monitoring and predicting wastewater treatment process data based on deep convolutional neural networks. Firstly, a spatiotemporal data fusion model based on fuzzy neural network (FNN) is proposed to solve the problem that urban wastewater treatment process data has multiple spatiotemporal scale features, which makes it difficult to use the data effectively. Secondly, an intelligent prediction model based on SDF-FNN is established in order to monitor the content of monitored components in the effluent of urban wastewater treatment process accurately and in real time. Finally, in order to verify the effectiveness of this intelligent prediction model, the model was tested using data collected from an actual municipal wastewater treatment plant. The experimental results show that this wastewater treatment intelligent monitoring model is effective and can predict the content of wastewater monitoring indicators with high accuracy.


## 2. Related Work

In recent years, various tests conducted by the United Nations on water resources have found that one tenth of the world’s rivers are polluted to varying degrees, and the pollution of water resources in many countries is alarming. China’s total water consumption is 554.8 billion cubic meters, of which a total of 69.3 billion tons of waste water is discharged, most of which is untreated, resulting in a large amount of sewage discharge and low treatment rate, which also makes groundwater and rivers, lakes, and seas seriously polluted. Water pollution not only makes the shortage of freshwater resources more obvious but also puts human health at risk; at the same time, industrial and agricultural production and urban life are inseparable from a stable and reliable water supply, so, under the dual pressure of the quality of the water environment and the energy situation, effective control and optimal operation of the wastewater treatment process to reduce the energy consumed become an urgent need. The characteristics of wastewater treatment process are as follows: multivariable, nonlinear, large lag, and with strong external interference. The main manifestations are as follows: (1) the system is relatively complex, and the reason is that complex biochemical reactions occur in the wastewater treatment process, while complex interactions between substrates and microorganisms; (2) the correlation between elements is low, and although the mathematical model can describe the correlation between substrates and microorganisms, it cannot accurately describe their causal relationships; and (3) the volatile external environment in the system, the treatment process has been in the complex external environment changes, for example, organic matter concentration, flow rate, temperature, and other parameters are always in the change.Some progress has been made in the existing methods on wastewater testing. In order to predict and identify the occurrence of abnormal conditions, Makinia et al. analyzed the formation mechanism of abnormal conditions, analyzed the activated sludge model 3 (ASM3) of wastewater treatment process, established the relationship between sludge substrate concentration removal rate and microbial growth, and identified the microbial growth status by calculating the sludge substrate concentration removal rate online to predict and identify abnormal condition [(4)]. However, this method is usually carried out in a laboratory environment, but the actual wastewater treatment conditions are highly time-varying, it is difficult to adapt the mechanistic model with fixed parameters to the dynamic changes of the process, and the success rate of abnormal conditions identification is low. In order to improve the performance of the model and increase the success rate of anomalous conditions identification, Bansal et al. used the predictive power of Hidden Markov Models for events to find the probability of occurrence of filamentous swelling from historical data and directly implement the prediction of filamentous swelling [9]. However, this approach, which is driven by probabilistic statistics, selects too many variables and ignores the influence of other variables and factors on abnormal conditions.In addition, the model was poor in identifying and predicting severe disturbance conditions. In order to improve the reliability of the prediction of abnormal conditions, Xavier et al. described four different types of abnormal conditions caused by dissolved oxygen, pH, and sludge loading by empirically summarizing the relationship between abnormal condition characteristics and process variables and also developed a risk assessment model on abnormal conditions to achieve the prediction of abnormal conditions and their types [10]. Mesquita et al. used partial least squares to analyses the process variables and sludge settling performance, extracted six causal factors for sludge expansion, such as dissolved oxygen, pH, and ammonia nitrogen and established a regression model between the causal factors and the sludge expansion index SVI [11]. Smets et al. developed an autoregressive with extra inputs (ARX) model for the identification of abnormal conditions by combining the relationship between the factors causing abnormal conditions and the characteristics of filamentous bacteria and used the measured data to calibrate the parameters of the ARX model to identify scum, foam failure, toxic effluent, and sludge swelling [12]. The method of identifying abnormal working conditions using causal correlation analysis between the characteristics of the abnormal working conditions and their characteristic variables allows information patterns to be extracted directly from the data. It can be used to identify the signs of abnormal conditions, reducing the reliance on equipment, avoiding the tedious process of observation, measurement, and analysis, and increasing the frequency of identification and prediction, making it easier to apply to the actual wastewater treatment process. However, the method requires a reliable model that can characterize causal associations. Due to the complexity, uncertainty, and high nonlinearity of biochemical reactions in wastewater treatment, models designed using grey model methods [13], parametric evaluation methods [14], and statistical analysis methods [15] are difficult to characterize.


## 3. Methods

### 3.1. Selection of Key Water Quality Parameters

Urban wastewater treatment plants are monitored for key water quality parameters to ensure stable operation and compliance with effluent quality standards [16]. The effluent total phosphorus (TP) is a key indicator to ensure that the effluent quality standards are met [17]. Therefore, it is important to monitor it in real time. The process of phosphorus removal relies heavily on microorganisms and therefore, their activity and numbers have a significant impact on the overall effectiveness of phosphorus removal from wastewater. Microbial activity and growth are influenced by various components of the effluent (oxidation reduction potential (ORP), dissolved oxygen (DO) concentration, temperature (T), pH value, etc.). In addition, according to historical data, ammonia (NH4-N), nitrate (NO3-N), and TSS also have an influence on the phosphorus removal process. In summary, seven variables, namely, pH, ORP, DO, T, NH4-N, NO3-N, and TSS, were initially selected as relevant variables for the effluent TP intelligent prediction model.


### 3.2. Data Preprocessing

In the actual municipal wastewater treatment process, there are inevitably some random errors in the collected data samples due to various factors (e.g., anomalies in the detection instrumentation [18], manual errors, and interference from environmental factors). Therefore, in order to accurately obtain the relevant variables of TP in the water, the collected data samples need to be excluded from the abnormal data. In this paper, the 3σ criterion is used to remove the anomalies, and the algorithm is based on the following steps:
(1)
Suppose the collected sample data set isx1,x2,x3,⋯,xn and its mean x¯. Calculate the deviation vi as shown in equation (1)(1)vi=xi−x¯i=1,2,⋯,n.(2)
Calculate the standard deviationσ for the collected sample data set with the formula shown in equation (2)(2)σ=∑vi2/n−1.(3)
If the deviationvi1≤i≤n of the sample data xi satisfies equation (3), xi is considered to be anomalous data containing gross errors and should be excluded(3)vi2>3σ.The collected data was preprocessed. After removing the abnormal data, 800 sets of sample data were taken. The contribution of each component after dimensionality reduction of the relevant variables using principal component analysis (PCA) is shown in Table1.Table 1
Contribution of each component.
IngredientspHTORP1ORP2TSSDO1DO2NH4-NNO3-NContribution rate0.06020.10160.21030.01650.22030.31460.04210.04640.0301As can be seen from Table1, the cumulative contribution of DO1, ORP1, TSS, pH, and T was 0.907 (greater than 0.85), starting with the component with the highest contribution, at a fraction of 5. The cumulative contribution of ORP1, TSS, pH, and T is 0.907 (greater than 0.85). Therefore, according to the dimensionality reduction concept of PCA, the variables related to the effluent TP can be reduced from 9 dimensions to 5 dimensions, and the auxiliary variables of the effluent TP intelligent prediction model are determined as follows: aerobic front-end DO concentration, anaerobic end ORP, aerobic end TSS, effluent pH, and T.


### 3.3. Spatiotemporal Data Fusion Based on Fuzzy Neural Network

The neural network approach is fast; however, its dependence on the quality of the data is strong, it is only possible to build a good prediction model if the training data set is sufficient, and the test data set is from the same feature space [19]. When there is data loss, noise, and different temporal and spatial scale features, the prediction results of the neural network method are affected. To this end, we design a Spatiotemporal Data Fusion Based on Fuzzy Neural Network (SDF-FNN) model to fuse multiple spatiotemporal data and improve the accuracy of the model.


#### 3.3.1. Structure of the Model

The fuzzy neural network (FNN) [20] structure used in this paper is shown in Figure 2.Figure 2
The structure of fuzzy neural network.The objective function of the FNN is(4)Et=12yt−ydt2.ydt is the expected output of the nonlinear dynamical system, and yt is the output of the FNN.
(5)yt=∑l=1Pwltvlt,where wt=w1t,w2t,w3t,⋯,wPt is the weight vector between the FNN normalization layer and the output layer, wlt is the weight between the output layer and thel-th normalized neuron, P is the number of normalized neurons, and vlt is the output of the l-th normalized neuron.
(6)vlt=φlt∑j=1Pφjt=e−∑i=1mxit−cijt2/2σij2t∑j=1Pe−∑i=1mxit−cijt2/2σij2t,(7)φjt=∏i=1me−xit−cijt2/2σij2t=e−∑i=1mxit−cijt22σij2t,where cijt denotes the center of the j-th RBF neuron at time t for the i-th variable input, and σijt denotes the width of the j-th RBF neuron at time t for the i-th variable input. xt=x1t,x2t,⋯,xmt is the input to the FNN, and φjt is the output of the j-th RBF neuron at time t.We use gradient descent to learn and optimize each parameter of the FNN. The centering rule for the Gaussian function of the RBF layer [21] is shown in equation (8), and the width adjustment rule is shown in equation (9).
(8)cijt+1=cijt+β∂Et∂cijt,(9)σijt+1=σijt+β∂Et∂σijt.The rules for adjusting the weights between the normalization layer and the output layer are shown in equation (10).
(10)wlt+1=wlt+β∂Et∂wlt,where β is the learning rate, and wlt denotes the weight between the l-th normalized layer neuron and the output neuron of the FNN [22].


#### 3.3.2. SDF-FNN Model Design

The data from the actual application of wastewater treatment and inspection are different in time and space scales, making it difficult for data-driven approaches to utilize them effectively [23]. Therefore, the SDF-FNN model is designed by combining migration learning and FNN with the advantages of FNN [24]. The structure is shown in Figure 3.Figure 3
Combining migration learning and FNN to design SDF-FNN model structures.The source data is defined as shown in equation (11).
(11)D1S=X1Sρ,P1Sρ,ρ=1,2,⋯,N1S,D2S=X2Sς,p2Sς,ς=3,5,⋯,2ρ+1,⋯,N2S,where X1Sρ=x1S,1ρ,x1S,2ρ,⋯,x1S,mρX2Sζ=x2S,1ζ,x2S,2ζ,⋯,x2S,mζ, ρ, and ζ represent the time, the natural numbers of N1S≥0 and N2S≥0. There are m inputs for each set of data. The target domain data is defined as shown in equation (12).
(12)DT=XTt,PTt,t=3,5,⋯,2ρ+1,⋯,NT,where XTt=xTlt,xT2t,⋯,xTmt, and t represents time, a natural number with NT≥0. Each set of data has m inputs. From the formula, DT is different from D1S in terms of time scale; DT is different from D2S in terms of PX2S≠PXT in terms of domain distribution, but DT and D1S are similar in terms of spatial distribution.
(13)XTt=xTlt,xT2t,⋯,xTmt.In order to improve the prediction accuracy of the model, a source model part and a target model part were designed. The network parameters of the source model are shown in equations (14)–(17).
(14)c1st,σ1st=c1s,1t,⋯,c1s,jt,⋯,c1s,Pt,σ1s,1t,⋯,σ1s,jt,⋯,σ1s,Pt,(15)c2St,s2St=c2S,1t,⋯,c2S,jt,⋯,c2S,Pt,s2S,1t,⋯,s2S,jt,⋯,s2S,Pt,(16)w1St=w1S,1t,w1S,2t,⋯,w1S,Pt,(17)w2St=w2S,1t,w2S,2t,⋯,w2S,Pt,where c1S,jt=c1S,1jt,c1S,2jt,⋯,c1S,mjtc2S,jt=c2S,1jt,c2S,2jt,⋯,c2S,mjt are the centers of the j-th neuron of the RBF layer of the two FNNs of the source model, respectively. σ1S,jt=σ1S,1jt,σ1S,2jt,⋯,σ1S,mjtσ2S,jt=σIS,1jt,σ2S,2jt,⋯,σ2S,mjt are the widths of the j-th neuron of the RBF layers of the two FNNs of the source model, respectively [25]. w1St and w2St are the weights between the normalized and output layers of the two FNNs of the source model, respectively.Target model network parameters are as shown in equations (18) and (19).
(18)cTt,σTt=cT,1t,⋯,cTjt,⋯,cTPt,σT1t,⋯,σTjt,⋯,σTPt(19)wTt=wT,1t,wT,2t,⋯,wT,Ptwhere cT,jt is the center of the j-th neuron of the target model FNN. σT,jt is the width of the j-th neuron of the target model FNN. wTt is the weight between the normalization layer and the output layer of the target model FNN.Inputting the target domain data into the SDF-FNN, the output of the source model part and the target model part of the FNN network are shown in equations (20)–(22), respectively.
(20)y1St=∑l=1Pw1S,ltv1S,lt=∑l=1Pw1S,lte−∑i=1mxit−c1S,jt2/2σ1,j,j2t∑j=1Pe−∑i=1mxit−ci,j,jt2/2σ1S,j2t,(21)y2St=∑l=1Pw2S,ltv2S,lt=∑l=1Pw2S,lte−∑i=1mxit−c2S,ijt2/2σ2S,ij2t∑j=1Pe−∑i=1mxit−c2S,ijt2/2σ2S,ij2t,(22)yTt=∑l=1PwT,ltvT,lt=∑l=1PwT,lte−∑i=1mxit−cT,jt2/2σT,j2t∑j=1Pe−∑i=1mxit−cT,jt2/2σT,j2t,where v1S,lt is the output of the l-th normalized layer neuron in source domain 1, and v2S,lt is the output of the l-th normalized layer neuron in source domain 2. vT,lt denotes the output of the l-th normalized layer neuron in the target domain. y1St and y2St are the outputs of the source model, and yTt is the output of the target objective model.The final output of the network is shown in equation (23).
(23)Ft=α1t×y1St+α2t×y2St+α3t×yTt.


#### 3.3.3. Spatiotemporal Data Fusion Migration Learning Algorithms

In order to transfer knowledge from the source domain to the target domain, a bridge should exist to connect the source and target domains and to determine how much knowledge needs to be transferred. Therefore, the adaptive correlation parametersδ1t and δ2t are introduced to establish the correlation between the source and target domains as shown in equation (24).
(24)cT,ijt=cT,ijt−1+δ1tc1S,ijt+δ2tc2S,ijt,σT,ijt=σT,ijt−1+δ1tσ1S,ijt+δ2tσ2S,ijt,wT,lt=wT,ilt−1+δ1tw1S,ilt+δ2tw2S,lt.Among them,cT,ijt is the center of the j-th RBF neuron of the target model FNN at time t in the target domain with the input of the i-th variable. σT,ijt denotes the width of the j-th RBF neuron of the target model FNN at time t in the target domain, when the i-th variable is input. wT,lt denotes the weight between the l-th normalized layer neuron and the output neuron of the target model FNN at time t in the target domain. c1S,ijt and c2S,ijt are the centers of the RBF layer neurons of the two FNNs of the source model at time t, respectively. σ1S,ijt and σ2S,ijt are the widths of the RBF layer neurons of the two FNNs of the source model at time t. w1S,ilt and w2S,lt are the weights between the l-th normalized layer neuron and the output neuron of the two different FNNs at time t, respectively.


## 3.1. Selection of Key Water Quality Parameters

Urban wastewater treatment plants are monitored for key water quality parameters to ensure stable operation and compliance with effluent quality standards [16]. The effluent total phosphorus (TP) is a key indicator to ensure that the effluent quality standards are met [17]. Therefore, it is important to monitor it in real time. The process of phosphorus removal relies heavily on microorganisms and therefore, their activity and numbers have a significant impact on the overall effectiveness of phosphorus removal from wastewater. Microbial activity and growth are influenced by various components of the effluent (oxidation reduction potential (ORP), dissolved oxygen (DO) concentration, temperature (T), pH value, etc.). In addition, according to historical data, ammonia (NH4-N), nitrate (NO3-N), and TSS also have an influence on the phosphorus removal process. In summary, seven variables, namely, pH, ORP, DO, T, NH4-N, NO3-N, and TSS, were initially selected as relevant variables for the effluent TP intelligent prediction model.


## 3.2. Data Preprocessing

In the actual municipal wastewater treatment process, there are inevitably some random errors in the collected data samples due to various factors (e.g., anomalies in the detection instrumentation [18], manual errors, and interference from environmental factors). Therefore, in order to accurately obtain the relevant variables of TP in the water, the collected data samples need to be excluded from the abnormal data. In this paper, the 3σ criterion is used to remove the anomalies, and the algorithm is based on the following steps:
(1)
Suppose the collected sample data set isx1,x2,x3,⋯,xn and its mean x¯. Calculate the deviation vi as shown in equation (1)(1)vi=xi−x¯i=1,2,⋯,n.(2)
Calculate the standard deviationσ for the collected sample data set with the formula shown in equation (2)(2)σ=∑vi2/n−1.(3)
If the deviationvi1≤i≤n of the sample data xi satisfies equation (3), xi is considered to be anomalous data containing gross errors and should be excluded(3)vi2>3σ.The collected data was preprocessed. After removing the abnormal data, 800 sets of sample data were taken. The contribution of each component after dimensionality reduction of the relevant variables using principal component analysis (PCA) is shown in Table1.Table 1
Contribution of each component.
IngredientspHTORP1ORP2TSSDO1DO2NH4-NNO3-NContribution rate0.06020.10160.21030.01650.22030.31460.04210.04640.0301As can be seen from Table1, the cumulative contribution of DO1, ORP1, TSS, pH, and T was 0.907 (greater than 0.85), starting with the component with the highest contribution, at a fraction of 5. The cumulative contribution of ORP1, TSS, pH, and T is 0.907 (greater than 0.85). Therefore, according to the dimensionality reduction concept of PCA, the variables related to the effluent TP can be reduced from 9 dimensions to 5 dimensions, and the auxiliary variables of the effluent TP intelligent prediction model are determined as follows: aerobic front-end DO concentration, anaerobic end ORP, aerobic end TSS, effluent pH, and T.


## 3.3. Spatiotemporal Data Fusion Based on Fuzzy Neural Network

The neural network approach is fast; however, its dependence on the quality of the data is strong, it is only possible to build a good prediction model if the training data set is sufficient, and the test data set is from the same feature space [19]. When there is data loss, noise, and different temporal and spatial scale features, the prediction results of the neural network method are affected. To this end, we design a Spatiotemporal Data Fusion Based on Fuzzy Neural Network (SDF-FNN) model to fuse multiple spatiotemporal data and improve the accuracy of the model.


### 3.3.1. Structure of the Model

The fuzzy neural network (FNN) [20] structure used in this paper is shown in Figure 2.Figure 2
The structure of fuzzy neural network.The objective function of the FNN is(4)Et=12yt−ydt2.ydt is the expected output of the nonlinear dynamical system, and yt is the output of the FNN.
(5)yt=∑l=1Pwltvlt,where wt=w1t,w2t,w3t,⋯,wPt is the weight vector between the FNN normalization layer and the output layer, wlt is the weight between the output layer and thel-th normalized neuron, P is the number of normalized neurons, and vlt is the output of the l-th normalized neuron.
(6)vlt=φlt∑j=1Pφjt=e−∑i=1mxit−cijt2/2σij2t∑j=1Pe−∑i=1mxit−cijt2/2σij2t,(7)φjt=∏i=1me−xit−cijt2/2σij2t=e−∑i=1mxit−cijt22σij2t,where cijt denotes the center of the j-th RBF neuron at time t for the i-th variable input, and σijt denotes the width of the j-th RBF neuron at time t for the i-th variable input. xt=x1t,x2t,⋯,xmt is the input to the FNN, and φjt is the output of the j-th RBF neuron at time t.We use gradient descent to learn and optimize each parameter of the FNN. The centering rule for the Gaussian function of the RBF layer [21] is shown in equation (8), and the width adjustment rule is shown in equation (9).
(8)cijt+1=cijt+β∂Et∂cijt,(9)σijt+1=σijt+β∂Et∂σijt.The rules for adjusting the weights between the normalization layer and the output layer are shown in equation (10).
(10)wlt+1=wlt+β∂Et∂wlt,where β is the learning rate, and wlt denotes the weight between the l-th normalized layer neuron and the output neuron of the FNN [22].


### 3.3.2. SDF-FNN Model Design

The data from the actual application of wastewater treatment and inspection are different in time and space scales, making it difficult for data-driven approaches to utilize them effectively [23]. Therefore, the SDF-FNN model is designed by combining migration learning and FNN with the advantages of FNN [24]. The structure is shown in Figure 3.Figure 3
Combining migration learning and FNN to design SDF-FNN model structures.The source data is defined as shown in equation (11).
(11)D1S=X1Sρ,P1Sρ,ρ=1,2,⋯,N1S,D2S=X2Sς,p2Sς,ς=3,5,⋯,2ρ+1,⋯,N2S,where X1Sρ=x1S,1ρ,x1S,2ρ,⋯,x1S,mρX2Sζ=x2S,1ζ,x2S,2ζ,⋯,x2S,mζ, ρ, and ζ represent the time, the natural numbers of N1S≥0 and N2S≥0. There are m inputs for each set of data. The target domain data is defined as shown in equation (12).
(12)DT=XTt,PTt,t=3,5,⋯,2ρ+1,⋯,NT,where XTt=xTlt,xT2t,⋯,xTmt, and t represents time, a natural number with NT≥0. Each set of data has m inputs. From the formula, DT is different from D1S in terms of time scale; DT is different from D2S in terms of PX2S≠PXT in terms of domain distribution, but DT and D1S are similar in terms of spatial distribution.
(13)XTt=xTlt,xT2t,⋯,xTmt.In order to improve the prediction accuracy of the model, a source model part and a target model part were designed. The network parameters of the source model are shown in equations (14)–(17).
(14)c1st,σ1st=c1s,1t,⋯,c1s,jt,⋯,c1s,Pt,σ1s,1t,⋯,σ1s,jt,⋯,σ1s,Pt,(15)c2St,s2St=c2S,1t,⋯,c2S,jt,⋯,c2S,Pt,s2S,1t,⋯,s2S,jt,⋯,s2S,Pt,(16)w1St=w1S,1t,w1S,2t,⋯,w1S,Pt,(17)w2St=w2S,1t,w2S,2t,⋯,w2S,Pt,where c1S,jt=c1S,1jt,c1S,2jt,⋯,c1S,mjtc2S,jt=c2S,1jt,c2S,2jt,⋯,c2S,mjt are the centers of the j-th neuron of the RBF layer of the two FNNs of the source model, respectively. σ1S,jt=σ1S,1jt,σ1S,2jt,⋯,σ1S,mjtσ2S,jt=σIS,1jt,σ2S,2jt,⋯,σ2S,mjt are the widths of the j-th neuron of the RBF layers of the two FNNs of the source model, respectively [25]. w1St and w2St are the weights between the normalized and output layers of the two FNNs of the source model, respectively.Target model network parameters are as shown in equations (18) and (19).
(18)cTt,σTt=cT,1t,⋯,cTjt,⋯,cTPt,σT1t,⋯,σTjt,⋯,σTPt(19)wTt=wT,1t,wT,2t,⋯,wT,Ptwhere cT,jt is the center of the j-th neuron of the target model FNN. σT,jt is the width of the j-th neuron of the target model FNN. wTt is the weight between the normalization layer and the output layer of the target model FNN.Inputting the target domain data into the SDF-FNN, the output of the source model part and the target model part of the FNN network are shown in equations (20)–(22), respectively.
(20)y1St=∑l=1Pw1S,ltv1S,lt=∑l=1Pw1S,lte−∑i=1mxit−c1S,jt2/2σ1,j,j2t∑j=1Pe−∑i=1mxit−ci,j,jt2/2σ1S,j2t,(21)y2St=∑l=1Pw2S,ltv2S,lt=∑l=1Pw2S,lte−∑i=1mxit−c2S,ijt2/2σ2S,ij2t∑j=1Pe−∑i=1mxit−c2S,ijt2/2σ2S,ij2t,(22)yTt=∑l=1PwT,ltvT,lt=∑l=1PwT,lte−∑i=1mxit−cT,jt2/2σT,j2t∑j=1Pe−∑i=1mxit−cT,jt2/2σT,j2t,where v1S,lt is the output of the l-th normalized layer neuron in source domain 1, and v2S,lt is the output of the l-th normalized layer neuron in source domain 2. vT,lt denotes the output of the l-th normalized layer neuron in the target domain. y1St and y2St are the outputs of the source model, and yTt is the output of the target objective model.The final output of the network is shown in equation (23).
(23)Ft=α1t×y1St+α2t×y2St+α3t×yTt.


### 3.3.3. Spatiotemporal Data Fusion Migration Learning Algorithms

In order to transfer knowledge from the source domain to the target domain, a bridge should exist to connect the source and target domains and to determine how much knowledge needs to be transferred. Therefore, the adaptive correlation parametersδ1t and δ2t are introduced to establish the correlation between the source and target domains as shown in equation (24).
(24)cT,ijt=cT,ijt−1+δ1tc1S,ijt+δ2tc2S,ijt,σT,ijt=σT,ijt−1+δ1tσ1S,ijt+δ2tσ2S,ijt,wT,lt=wT,ilt−1+δ1tw1S,ilt+δ2tw2S,lt.Among them,cT,ijt is the center of the j-th RBF neuron of the target model FNN at time t in the target domain with the input of the i-th variable. σT,ijt denotes the width of the j-th RBF neuron of the target model FNN at time t in the target domain, when the i-th variable is input. wT,lt denotes the weight between the l-th normalized layer neuron and the output neuron of the target model FNN at time t in the target domain. c1S,ijt and c2S,ijt are the centers of the RBF layer neurons of the two FNNs of the source model at time t, respectively. σ1S,ijt and σ2S,ijt are the widths of the RBF layer neurons of the two FNNs of the source model at time t. w1S,ilt and w2S,lt are the weights between the l-th normalized layer neuron and the output neuron of the two different FNNs at time t, respectively.


## 3.3.1. Structure of the Model

The fuzzy neural network (FNN) [20] structure used in this paper is shown in Figure 2.Figure 2
The structure of fuzzy neural network.The objective function of the FNN is(4)Et=12yt−ydt2.ydt is the expected output of the nonlinear dynamical system, and yt is the output of the FNN.
(5)yt=∑l=1Pwltvlt,where wt=w1t,w2t,w3t,⋯,wPt is the weight vector between the FNN normalization layer and the output layer, wlt is the weight between the output layer and thel-th normalized neuron, P is the number of normalized neurons, and vlt is the output of the l-th normalized neuron.
(6)vlt=φlt∑j=1Pφjt=e−∑i=1mxit−cijt2/2σij2t∑j=1Pe−∑i=1mxit−cijt2/2σij2t,(7)φjt=∏i=1me−xit−cijt2/2σij2t=e−∑i=1mxit−cijt22σij2t,where cijt denotes the center of the j-th RBF neuron at time t for the i-th variable input, and σijt denotes the width of the j-th RBF neuron at time t for the i-th variable input. xt=x1t,x2t,⋯,xmt is the input to the FNN, and φjt is the output of the j-th RBF neuron at time t.We use gradient descent to learn and optimize each parameter of the FNN. The centering rule for the Gaussian function of the RBF layer [21] is shown in equation (8), and the width adjustment rule is shown in equation (9).
(8)cijt+1=cijt+β∂Et∂cijt,(9)σijt+1=σijt+β∂Et∂σijt.The rules for adjusting the weights between the normalization layer and the output layer are shown in equation (10).
(10)wlt+1=wlt+β∂Et∂wlt,where β is the learning rate, and wlt denotes the weight between the l-th normalized layer neuron and the output neuron of the FNN [22].


## 3.3.2. SDF-FNN Model Design

The data from the actual application of wastewater treatment and inspection are different in time and space scales, making it difficult for data-driven approaches to utilize them effectively [23]. Therefore, the SDF-FNN model is designed by combining migration learning and FNN with the advantages of FNN [24]. The structure is shown in Figure 3.Figure 3
Combining migration learning and FNN to design SDF-FNN model structures.The source data is defined as shown in equation (11).
(11)D1S=X1Sρ,P1Sρ,ρ=1,2,⋯,N1S,D2S=X2Sς,p2Sς,ς=3,5,⋯,2ρ+1,⋯,N2S,where X1Sρ=x1S,1ρ,x1S,2ρ,⋯,x1S,mρX2Sζ=x2S,1ζ,x2S,2ζ,⋯,x2S,mζ, ρ, and ζ represent the time, the natural numbers of N1S≥0 and N2S≥0. There are m inputs for each set of data. The target domain data is defined as shown in equation (12).
(12)DT=XTt,PTt,t=3,5,⋯,2ρ+1,⋯,NT,where XTt=xTlt,xT2t,⋯,xTmt, and t represents time, a natural number with NT≥0. Each set of data has m inputs. From the formula, DT is different from D1S in terms of time scale; DT is different from D2S in terms of PX2S≠PXT in terms of domain distribution, but DT and D1S are similar in terms of spatial distribution.
(13)XTt=xTlt,xT2t,⋯,xTmt.In order to improve the prediction accuracy of the model, a source model part and a target model part were designed. The network parameters of the source model are shown in equations (14)–(17).
(14)c1st,σ1st=c1s,1t,⋯,c1s,jt,⋯,c1s,Pt,σ1s,1t,⋯,σ1s,jt,⋯,σ1s,Pt,(15)c2St,s2St=c2S,1t,⋯,c2S,jt,⋯,c2S,Pt,s2S,1t,⋯,s2S,jt,⋯,s2S,Pt,(16)w1St=w1S,1t,w1S,2t,⋯,w1S,Pt,(17)w2St=w2S,1t,w2S,2t,⋯,w2S,Pt,where c1S,jt=c1S,1jt,c1S,2jt,⋯,c1S,mjtc2S,jt=c2S,1jt,c2S,2jt,⋯,c2S,mjt are the centers of the j-th neuron of the RBF layer of the two FNNs of the source model, respectively. σ1S,jt=σ1S,1jt,σ1S,2jt,⋯,σ1S,mjtσ2S,jt=σIS,1jt,σ2S,2jt,⋯,σ2S,mjt are the widths of the j-th neuron of the RBF layers of the two FNNs of the source model, respectively [25]. w1St and w2St are the weights between the normalized and output layers of the two FNNs of the source model, respectively.Target model network parameters are as shown in equations (18) and (19).
(18)cTt,σTt=cT,1t,⋯,cTjt,⋯,cTPt,σT1t,⋯,σTjt,⋯,σTPt(19)wTt=wT,1t,wT,2t,⋯,wT,Ptwhere cT,jt is the center of the j-th neuron of the target model FNN. σT,jt is the width of the j-th neuron of the target model FNN. wTt is the weight between the normalization layer and the output layer of the target model FNN.Inputting the target domain data into the SDF-FNN, the output of the source model part and the target model part of the FNN network are shown in equations (20)–(22), respectively.
(20)y1St=∑l=1Pw1S,ltv1S,lt=∑l=1Pw1S,lte−∑i=1mxit−c1S,jt2/2σ1,j,j2t∑j=1Pe−∑i=1mxit−ci,j,jt2/2σ1S,j2t,(21)y2St=∑l=1Pw2S,ltv2S,lt=∑l=1Pw2S,lte−∑i=1mxit−c2S,ijt2/2σ2S,ij2t∑j=1Pe−∑i=1mxit−c2S,ijt2/2σ2S,ij2t,(22)yTt=∑l=1PwT,ltvT,lt=∑l=1PwT,lte−∑i=1mxit−cT,jt2/2σT,j2t∑j=1Pe−∑i=1mxit−cT,jt2/2σT,j2t,where v1S,lt is the output of the l-th normalized layer neuron in source domain 1, and v2S,lt is the output of the l-th normalized layer neuron in source domain 2. vT,lt denotes the output of the l-th normalized layer neuron in the target domain. y1St and y2St are the outputs of the source model, and yTt is the output of the target objective model.The final output of the network is shown in equation (23).
(23)Ft=α1t×y1St+α2t×y2St+α3t×yTt.


## 3.3.3. Spatiotemporal Data Fusion Migration Learning Algorithms

In order to transfer knowledge from the source domain to the target domain, a bridge should exist to connect the source and target domains and to determine how much knowledge needs to be transferred. Therefore, the adaptive correlation parametersδ1t and δ2t are introduced to establish the correlation between the source and target domains as shown in equation (24).
(24)cT,ijt=cT,ijt−1+δ1tc1S,ijt+δ2tc2S,ijt,σT,ijt=σT,ijt−1+δ1tσ1S,ijt+δ2tσ2S,ijt,wT,lt=wT,ilt−1+δ1tw1S,ilt+δ2tw2S,lt.Among them,cT,ijt is the center of the j-th RBF neuron of the target model FNN at time t in the target domain with the input of the i-th variable. σT,ijt denotes the width of the j-th RBF neuron of the target model FNN at time t in the target domain, when the i-th variable is input. wT,lt denotes the weight between the l-th normalized layer neuron and the output neuron of the target model FNN at time t in the target domain. c1S,ijt and c2S,ijt are the centers of the RBF layer neurons of the two FNNs of the source model at time t, respectively. σ1S,ijt and σ2S,ijt are the widths of the RBF layer neurons of the two FNNs of the source model at time t. w1S,ilt and w2S,lt are the weights between the l-th normalized layer neuron and the output neuron of the two different FNNs at time t, respectively.


## 4. Experiments and Results

The intelligent prediction of effluent TP after treatment is an attempt to use all the relevant variables that can be easily measured in relation to the effluent TP and intelligent algorithms to measure the effluent TP that is difficult to measure and not easily measured accurately online. The flow chart of the intelligent prediction after treatment is shown in Figure4.Figure 4
Flow chart of the intelligent prediction model for wastewater treatment effluent TP.


### 4.1. Intelligent Monitoring Model

The inputs to the intelligent monitoring model for wastewater treatment are as follows: T, ORP, DO, TSS, and pH. The training of the model is carried out in two parts. (1) Input the source domain data as training samples into the source model and use the FNN algorithm to train and adjust the FNN in the source model to obtain the corresponding parameters; (2) input the target domain data as training samples into both the source and target models and use the gradient descent algorithm to adjust the weight parameters and adaptive parameters of the whole model; finally, use the spatiotemporal data migration learning algorithm to adjust the parameters of the target. Finally, the spatiotemporal data migration learning algorithm is used to adjust the parameters of the target model to ensure the accuracy of the network and complete the training of the intelligent prediction model.The test samples of the wastewater treatment intelligent monitoring model were used as input to the SDF-FNN model, and when the sample data was entered, the trained SDF-FNNN model was used to predict the effluent TP online for the test sample data.


### 4.2. Model Parameter Calibration

In the actual urban wastewater treatment process, the reaction process of effluent TP is complex and variable, with nonlinear, time-varying, and strongly coupled characteristics. Before the established effluent TP intelligent monitoring model is put into operation in the actual wastewater treatment plant, it may be disturbed by external factors, which may cause large calculation errors in the model if it is put into use directly. Therefore, in order to ensure the feasibility and validity of the effluent TP intelligent prediction model, the calibration of the intelligent prediction model is an indispensable part of the overall design process. The calibration scheme for the intelligent prediction model for effluent TP is shown in Figure5.Figure 5
Outflow TP Intelligent predictive model calibration.


### 4.3. Evaluation Indicators

The ability of wastewater treatment monitoring models to predict effluent TP well requires evaluation of the models by means of evaluation metrics. In this paper, two indicators, RMSE and accuracy, are used to evaluate the performance of the SDF-FNN prediction model. The expression for the RMSE is shown in Equation (25).
(25)RMSE=12P∑p=1Py∧pt−ydt2,whereP is the total number of sample data. y^pt is the actual SDF-FNN output. ydt is the expected SDF-FNN output.The expression for the evaluation indicator accuracy is shown in Equation (26).
(26)accuracy=1NT∑t=1NT1−y^pt−ydty^pt×100%,whereNT is the total number of experimental samples. The larger the evaluation index accuracy, the better the prediction performance of the SDF-FNN intelligent prediction model for effluent TP.


### 4.4. Experimental Design and Analysis of Results

This paper collects actual data from two different actual municipal wastewater treatment plants,A and B. The data sources and data volumes for the experiments are shown in Table 2.Table 2
Experimental data set sources and data volume.
Data sourcesSource area 1 (wastewater treatment plantA)Source area 2 (wastewater treatment plantB)Target area (wastewater treatment plantA)Training setTest setVolume of data600600100100The learning rateη of the intelligent monitoring model for the SDF-FNN effluent TP is 0.015. The weights of the central and width values of the FNN Gaussian function in the source and target models and the weights w between the FNN normalization and output layers are random numbers with [0, 1] distribution. The weights α1t, α2t, and α3t and the adaptive correlation parameters δ1t and δ2t between the source model, the target model, and the final output of the network are also random numbers with [0,1] distribution. Each neural network has 5 input neurons, 1 output neuron, 15 rule layer neurons, and λ1=λ2=1. The experimental environment of this article is as follows: the hardware environment is Linux system, NVIDIA GTX 1080Ti; the software environment is Python3.6, sklearn0.20.1, and other toolkits.To verify the feasibility of the method, three experiments were designed. The data in the target domain and the data in source domain one is from the same municipal wastewater treatment plant at different time scales. The spatial distribution of the data in the target domain is different from that in the source domain two. The training and test sets for each experiment are shown in Table3.Table 3
Training set and test set for experimental design.
Experiment titleTraining setTest setExperiment 1 (FNN)Training set for municipal wastewater treatment plantBMeasurement set of urban wastewater treatment plantAExperiment 2 (FNN1)Data from urban wastewater treatment plantA and training set for municipal wastewater treatment plant BTest set of urban wastewater treatment plantAExperiment 3 (SDF-FNN)Data from urban wastewater treatment plantA and training set for municipal wastewater treatment plant BTest set of urban wastewater treatment plantAThe experimental simulation results are shown in Figures6–8. As can be seen in Figure 6, the proposed SDF-FNN intelligent prediction model for effluent TP is closer to the true value of effluent TP than the FNN. Figure 7 clearly shows that the fluctuation range of the prediction error of the SDF-FNN model for effluent TP is significantly smaller than the results of the other two FNNs. In addition, Figure 8 shows that the prediction accuracy of the SDF-FNN is significantly higher than the prediction accuracy of the other two FNNs. By combining the above predicted, actual, and predicted TP values with the accuracy, we can conclude that the proposed intelligent monitoring model for wastewater treatment can predict the TP content of the effluent better.Figure 6
Predicted output of effluent TP test samples.Figure 7
Prediction error for effluent TP test samples.Figure 8
Accuracy values for effluent TP test samples.The purpose is to evaluate the performance of SDF-FNN, and the results were compared with existing methods such as FNN, KL-FNN, SOFNN-AGA, GDFNN, GPFNN, and ANFIS. All methods have the same training and test samples. The details are shown in Table4 and relate to the following metrics: test RMSE and accuracy. The network models proposed in this paper all achieve optimal results in comparison.Table 4
Effluent TP prediction results.
AlgorithmsTesting RMSEPrediction accuracy (%)FNN0.379187.86KL-FNN0.239491.34SOFNN-AGA0.255792.52GDFNN0.214692.95ANFIS0.281090.13GPFNN0.345689.26SDF-FNN0.194393.82


## 4.1. Intelligent Monitoring Model

The inputs to the intelligent monitoring model for wastewater treatment are as follows: T, ORP, DO, TSS, and pH. The training of the model is carried out in two parts. (1) Input the source domain data as training samples into the source model and use the FNN algorithm to train and adjust the FNN in the source model to obtain the corresponding parameters; (2) input the target domain data as training samples into both the source and target models and use the gradient descent algorithm to adjust the weight parameters and adaptive parameters of the whole model; finally, use the spatiotemporal data migration learning algorithm to adjust the parameters of the target. Finally, the spatiotemporal data migration learning algorithm is used to adjust the parameters of the target model to ensure the accuracy of the network and complete the training of the intelligent prediction model.The test samples of the wastewater treatment intelligent monitoring model were used as input to the SDF-FNN model, and when the sample data was entered, the trained SDF-FNNN model was used to predict the effluent TP online for the test sample data.


## 4.2. Model Parameter Calibration

In the actual urban wastewater treatment process, the reaction process of effluent TP is complex and variable, with nonlinear, time-varying, and strongly coupled characteristics. Before the established effluent TP intelligent monitoring model is put into operation in the actual wastewater treatment plant, it may be disturbed by external factors, which may cause large calculation errors in the model if it is put into use directly. Therefore, in order to ensure the feasibility and validity of the effluent TP intelligent prediction model, the calibration of the intelligent prediction model is an indispensable part of the overall design process. The calibration scheme for the intelligent prediction model for effluent TP is shown in Figure5.Figure 5
Outflow TP Intelligent predictive model calibration.


## 4.3. Evaluation Indicators

The ability of wastewater treatment monitoring models to predict effluent TP well requires evaluation of the models by means of evaluation metrics. In this paper, two indicators, RMSE and accuracy, are used to evaluate the performance of the SDF-FNN prediction model. The expression for the RMSE is shown in Equation (25).
(25)RMSE=12P∑p=1Py∧pt−ydt2,whereP is the total number of sample data. y^pt is the actual SDF-FNN output. ydt is the expected SDF-FNN output.The expression for the evaluation indicator accuracy is shown in Equation (26).
(26)accuracy=1NT∑t=1NT1−y^pt−ydty^pt×100%,whereNT is the total number of experimental samples. The larger the evaluation index accuracy, the better the prediction performance of the SDF-FNN intelligent prediction model for effluent TP.


## 4.4. Experimental Design and Analysis of Results

This paper collects actual data from two different actual municipal wastewater treatment plants,A and B. The data sources and data volumes for the experiments are shown in Table 2.Table 2
Experimental data set sources and data volume.
Data sourcesSource area 1 (wastewater treatment plantA)Source area 2 (wastewater treatment plantB)Target area (wastewater treatment plantA)Training setTest setVolume of data600600100100The learning rateη of the intelligent monitoring model for the SDF-FNN effluent TP is 0.015. The weights of the central and width values of the FNN Gaussian function in the source and target models and the weights w between the FNN normalization and output layers are random numbers with [0, 1] distribution. The weights α1t, α2t, and α3t and the adaptive correlation parameters δ1t and δ2t between the source model, the target model, and the final output of the network are also random numbers with [0,1] distribution. Each neural network has 5 input neurons, 1 output neuron, 15 rule layer neurons, and λ1=λ2=1. The experimental environment of this article is as follows: the hardware environment is Linux system, NVIDIA GTX 1080Ti; the software environment is Python3.6, sklearn0.20.1, and other toolkits.To verify the feasibility of the method, three experiments were designed. The data in the target domain and the data in source domain one is from the same municipal wastewater treatment plant at different time scales. The spatial distribution of the data in the target domain is different from that in the source domain two. The training and test sets for each experiment are shown in Table3.Table 3
Training set and test set for experimental design.
Experiment titleTraining setTest setExperiment 1 (FNN)Training set for municipal wastewater treatment plantBMeasurement set of urban wastewater treatment plantAExperiment 2 (FNN1)Data from urban wastewater treatment plantA and training set for municipal wastewater treatment plant BTest set of urban wastewater treatment plantAExperiment 3 (SDF-FNN)Data from urban wastewater treatment plantA and training set for municipal wastewater treatment plant BTest set of urban wastewater treatment plantAThe experimental simulation results are shown in Figures6–8. As can be seen in Figure 6, the proposed SDF-FNN intelligent prediction model for effluent TP is closer to the true value of effluent TP than the FNN. Figure 7 clearly shows that the fluctuation range of the prediction error of the SDF-FNN model for effluent TP is significantly smaller than the results of the other two FNNs. In addition, Figure 8 shows that the prediction accuracy of the SDF-FNN is significantly higher than the prediction accuracy of the other two FNNs. By combining the above predicted, actual, and predicted TP values with the accuracy, we can conclude that the proposed intelligent monitoring model for wastewater treatment can predict the TP content of the effluent better.Figure 6
Predicted output of effluent TP test samples.Figure 7
Prediction error for effluent TP test samples.Figure 8
Accuracy values for effluent TP test samples.The purpose is to evaluate the performance of SDF-FNN, and the results were compared with existing methods such as FNN, KL-FNN, SOFNN-AGA, GDFNN, GPFNN, and ANFIS. All methods have the same training and test samples. The details are shown in Table4 and relate to the following metrics: test RMSE and accuracy. The network models proposed in this paper all achieve optimal results in comparison.Table 4
Effluent TP prediction results.
AlgorithmsTesting RMSEPrediction accuracy (%)FNN0.379187.86KL-FNN0.239491.34SOFNN-AGA0.255792.52GDFNN0.214692.95ANFIS0.281090.13GPFNN0.345689.26SDF-FNN0.194393.82


## 5. Conclusion

Due to the cumbersome operation, low measurement accuracy, and high instrument maintenance costs of existing monitoring methods in actual municipal wastewater treatment plants, it is difficult to achieve real-time online monitoring of effluent indicators. Data-driven methods have been widely used to predict effluent quality parameters. However, the data-driven approach can be affected when there is loss of measurement data, noise, and different temporal and spatial scale characteristics of the urban wastewater treatment process. To enable accurately and real time predict and monitor the TP content in the effluent of urban wastewater treatment processes using different temporal and spatial scale data, an SDF-FNN-based intelligent predictive monitoring model for wastewater treatment effluent TP is proposed in this paper.The proposed SDF-FNN model is used to develop an intelligent predictive monitoring model based on the FNN effluent TP. The proposed FNN effluent TP model was applied to a real urban wastewater treatment plant, and data from different spatial scales and time scales were selected as the source domain data for the experiments. It is proved that this method is significantly better than other types of neural networks and algorithms in predicting the effluent TP, and the intelligent monitoring model can achieve high accuracy in predicting the effluent TP. In future work, we plan to conduct research on long- and short-term memory networks and attention mechanisms for wastewater testing.



---

*Source: 1767295-2022-04-13.xml*