Method for monitoring total suspended solid concentration in real-time sewage treatment process based on artificial intelligence technology
By extracting the non-Gaussian and nonlinear characteristics of the wastewater treatment process using the OSBLS model, the problems of high time cost and low accuracy in TSS index monitoring in existing technologies are solved, and efficient and accurate real-time monitoring of TSS index is achieved.
Patent Information
- Application Number
- CN202511311092.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-11-28
AI Technical Summary
Existing methods for monitoring TSS indicators in wastewater treatment processes suffer from high time costs and low monitoring accuracy, and they also struggle to handle non-Gaussian characteristics, affecting the monitoring results.
We adopted the Stack Width Learning System (OSBLS) model based on the overcomplete independent component analysis algorithm, combined with residual connection technology and pseudo-inverse technology, to extract non-Gaussian features and construct an OSBLS model for TSS index monitoring.
It achieves efficient and accurate real-time monitoring of TSS indicators, reduces the time cost of network adjustment and updates, adapts to the nonlinear and non-Gaussian characteristics of the sewage treatment process, and improves monitoring accuracy.
Smart Images

Figure CN121027449A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present study takes the total suspended solids (TSS) index monitoring of the sewage treatment process as the target, and realizes a TSS concentration index monitoring method for the urban sewage treatment process by using artificial intelligence technology. Since the current monitoring method for the TSS index has the problems of high time cost, low monitoring accuracy, and great hindrance to the monitoring of the TSS index. In the present study, the Overcomplete Stacked Broad Learning System (OSBLS) model based on the Overcomplete Independent Component Analysis (OICA) algorithm is adopted. The model uses the OICA method to preprocess the data, extracts the non-Gaussian features in the data, and retains the advantages of the Stacked Broad Learning System (SBLS) model such as high accuracy, low computational complexity, and easy network updating, which can solve the problems of high time cost and low monitoring accuracy in the sewage treatment process. BACKGROUND
[0002] The effect of removing solid suspended matter directly determines the water quality and the stability of the sewage treatment system, therefore, the TSS index monitoring can ensure the safe and efficient operation of the sewage treatment process, and can ensure that the effluent water quality meets the discharge standard. Since the hardware sensor for monitoring the TSS index is expensive, and it will be damaged during monitoring and needs to be regularly maintained and cleaned, it adds additional cost and labor needs for the TSS index monitoring, and the offline laboratory analysis cannot meet the real-time needs in the sewage treatment process. Some important parameter indexes in the sewage treatment process are still difficult to measure directly, which makes it difficult for some sewage treatment plants in the past to accurately monitor the water quality index. At the same time, due to the complexity of biochemical reactions and the unpredictability of external interference, it is difficult to construct a model that meets the requirements according to the mechanism knowledge in the sewage treatment process. In view of this problem, the current research tends to use data-driven methods to indirectly obtain the difficult-to-measure water quality parameters. Specifically, some easily measured water quality parameters are used as auxiliary variables to estimate some difficult-to-measure water quality parameters, so as to realize the real-time monitoring and optimization control of the sewage treatment process.
[0003] Artificial neural networks are a research hotspot in the field of artificial intelligence. Due to its excellent fitting ability and model nonlinear process ability, various artificial neural network methods have been used for monitoring TSS indicators in wastewater treatment processes. The models currently applied to TSS indicator monitoring in wastewater treatment processes include deep belief networks, stacked autoencoders, convolutional neural networks, and recurrent neural networks. Although these deep learning networks have excellent nonlinear feature extraction capabilities, their complex structure results in excessive time cost when adjusting and updating them, which makes them unsuitable for wastewater treatment processes that require fast dynamic response.
[0004] Meanwhile, the characteristics of the raw data collected from the wastewater treatment process are usually nonlinear, dynamic, and non-Gaussian. Previous models cannot effectively deal with data that does not conform to Gaussian distribution, which severely affects the performance of these models in monitoring wastewater treatment process indicators. Therefore, appropriate methods must be used to extract valuable feature information from the wastewater treatment process to improve the accuracy of wastewater treatment process monitoring results. SUMMARY
[0005] This study mainly aims to meet the demand for low time cost and high accuracy in monitoring TSS indicators in wastewater treatment processes. A stacked broad learning system model based on the over-complete independent component analysis algorithm is proposed to achieve accurate and efficient real-time monitoring of TSS indicators in wastewater treatment processes.
[0006] Broad Learning System (BLS) is a new network structure proposed in recent years. Unlike previous deep learning networks, the BLS model has a simpler structure and fewer network parameters. By combining feature nodes and enhancement nodes, the BLS model allows the network to expand in width rather than depth, ensuring the simplicity of its structure. In addition, the BLS model can update itself to adapt to new input samples, eliminating the need for complete retraining of the network when adjusting and updating it, which greatly advantages the BLS model in terms of time cost. The stacked broad learning system used in this study combines the idea of stacking with the BLS model, using residual connection technology to stack multiple BLS models and using pseudo-inverse technology to quickly calculate network weights, achieving higher accuracy while ensuring lower computational complexity. However, these previous methods are difficult to handle the negative effects of non-Gaussian characteristics on the model, resulting in reduced monitoring accuracy. Therefore, this study introduces the over-complete independent component analysis method as a non-Gaussian processing module to extract features from the original data. The high-order statistics constructed by this method contain non-Gaussian information, which can alleviate the negative impact of non-Gaussianity on model accuracy.
[0007] The OSBLS model inherits the low time cost advantage of the BLS model, realizes higher precision nonlinear data processing through a stacked network, and extracts non-Gaussian features in the data using the over-complete independent component analysis method, solving the defect that previous monitoring models cannot be applied to non-Gaussian data, so that the model can fully learn the nonlinear, dynamic and non-Gaussian characteristics of each process variable in the sewage treatment process.
[0008] The following scheme is adopted to complete the monitoring of the TSS index of the sewage treatment process:
[0009] The present study takes the TSS index of the sewage treatment process as the research object, and carries out in-depth research and analysis around the two main goals of accuracy and efficiency of the TSS index monitoring of the sewage treatment process. The TSS index monitoring method of the sewage treatment process proposed in the present study mainly includes three parts: pretreatment stage, model training stage and online application stage.
[0010] Pretreatment stage:
[0011] Step 1: Obtain the data set. First, the input variables and output process variables of the monitoring model need to be determined. The input variables include: influent suspended solid mass concentration, easily biodegradable organic matter mass concentration, particulate inert organic carbon mass concentration, active heterotrophic bacteria mass concentration, active autotrophic bacteria mass concentration, particle mass concentration produced by biological decay, dissolved oxygen mass concentration, nitrate nitrogen mass concentration, ammonia nitrogen mass concentration, soluble biodegradable organic nitrogen mass concentration, alkalinity molar concentration, particulate biodegradable organic nitrogen mass concentration, slow biodegradable organic matter mass concentration, input variables are represented by X, and the total number of variables P = 13; the output variable is the concentration of the TSS index of the sewage treatment process, represented by Y label,1 .
[0012] Each sampling time series data is divided into a test data set according to a ratio of 7:1.
[0013] Step 2: To process data that does not conform to the Gaussian distribution, the OSBLS model uses the over-complete independent component analysis method as a non-Gaussian processing module. The independent component analysis method can decompose a training data matrix X with P variables into K independent components s K , K = 90 in the present study:
[0014] X = DS
[0015] Where, the independent component matrix S = (s1,…,s K ) T , the independent component vector s n , n = 1,…,K. The mixing matrix D ∈ R P×K , where the number of independent components K > P to fully extract the non-Gaussian characteristics.
[0016] Step 3: Obtain the generalized covariance matrix of the independent components by differentiating the Hessian matrix of the cumulative generating function at the non-zero vector t. Then, by combining the generalized covariance matrix of the independent components with the generalized covariance matrix of the original data X, a spanning operation is performed to obtain the subspace W.
[0017] The covariance matrix is obtained through a second-order cumulative generating function. For the training data matrix X, any t∈R P Cumulative generation function φ X (t) is defined as follows:
[0018]
[0019] Where t is a vector that follows a Gaussian distribution, E(·) represents the expectation, and e represents the natural constant.
[0020] Step 4: Substitute The Hessian evaluation of the cumulant generation function is then performed, yielding the covariance matrix cov(X) of X as follows:
[0021]
[0022] in The cumulative generation function φ X The Hessian matrix of (0) is the second-order partial derivative matrix.
[0023] Step 5: Extend t from Step 4 to a non-zero vector, perform Hessian evaluation on the cumulant generating function, and obtain the generalized covariance matrix C. X (t), its formula is as follows:
[0024]
[0025] in
[0026] Step 6: Substitute the formula from Step 5 into the formula from Step 2, and calculate the generalized covariance matrix ε in the independent component analysis environment. X (t):
[0027]
[0028] C X (t)=DC S (Y)D T
[0029] Where Y = D T t, the generalized covariance matrix C of independent elements S (Y) is defined as follows:
[0030]
[0031] in This represents the gradient, i.e., the vector of first-order partial derivatives.
[0032] Step 7: Due to its independence, the independent element generalized covariance matrix C obtained in Step 6... S (Y) is a diagonal matrix. Therefore, the generalized covariance matrix C under independent component analysis is... X (t) is written as:
[0033]
[0034] Where ω n (t)=[C S (D T t)] nn It is the nth independent element s n The generalized variance, d n This represents the nth column of the mixture matrix D.
[0035] Step 8: In an independent component analysis environment, the generalized covariance matrix belongs to a subspace W. Therefore, the space spanned by any number of covariance matrices is a subset of W or equivalent to W. Given L vectors t1, t2, ..., t L Where L>K, that is, greater than the number of independent elements, we get an equal matrix H. l =C X (t l ), l∈[L],H l This is an approximation of the subspace W.
[0036] Step 9: After approximating the subspace W in step 8, given matrices H1, H2, ..., H L Atoms were treated using a shrinkage method. Approximate solution. Solving the following positive semi-definite problem yields an atom:
[0037]
[0038] in This represents the optimal matrix found through a semidefinite programming (SDP) optimization problem, where the objective function is...<G,B> The maximum solution,<G,B> Let G represent the inner product of matrices G and B, where G ∈ R. P×P This is a weight matrix used to select a particular component of the mixture. It is usually generated based on an iterative method. The matrix G determines the direction of contraction, and B∈S. P Indicates that matrix B belongs to the set of P×P symmetric matrices, and the specific constraints on matrix B are:
[0039] B∈Span{H1,H2,…,H L}
[0040] Tr(B)=1
[0041] B≥0
[0042] Where Span{H1,H2,…,H L} represents the subspace spanned by atoms, Tr(·) represents the trace, and B≥0 indicates that matrix B must be a positive semi-definite matrix with all its eigenvalues being non-negative.
[0043] Step 10: Since the subspace is composed of H1, H2, ..., H L Zhang Cheng's formula in step 9 has the following constraints:
[0044]
[0045] Step 11: Because of constraints Any orthogonal complement of B orthogonal to W is equivalent. Let the basis of the null space N(W) be the matrix {F1F2,…,F}. M-K}, where M = P(P+1) / 2. Then the constraints of matrix B are further rewritten as:
[0046] <B,F m >=0, m∈[MK]
[0047] Tr(B)=1
[0048] B≥0
[0049] Step 12: With a limited sample size, only an approximate estimate of the subspace W can be made. To alleviate the rigid constraints in solving the mixture matrix, a relaxation factor is introduced into the formula in Step 11, which is then rewritten as:
[0050]
[0051] The regularization parameter μ > 0 helps adjust the expected level of noise. The value of μ is set based on cross-validation or empirical selection. For high-noise data, the value of μ should be larger to more effectively suppress noise, while for low-noise data, the value of μ should be smaller to allow the model to fit the data more flexibly. Here, μ = 0.1 is chosen.
[0052] Step 13: To obtain multiple atoms instead of a single atom, a shrinkage process is needed in the formula of Step 12. This study uses a novel semi-adaptive shrinkage process, which first uses a clustering method to resample matrix G K times. In this study, K = 90 is used to generate a set of K candidate atoms. in This is the submatrix obtained from the k-th sampling. Then, the obtained atoms are clustered into K clusters, resulting in {C1,...,C...}. kThe center vector of each cluster is denoted as μ. k The cluster center with the smallest intra-class variance is selected as the current optimal atom n. * :
[0053]
[0054] in The selected atom is denoted as n represents the current resampling count. The selected atoms are removed from the subspace, and then the process is repeated using the relaxation constraints from step 12. Add the found atoms to the basis of the null space of W, for the constraint set. To perform an update and achieve adaptive shrinkage:
[0055]
[0056] Step 14: Calculate the K vectors d obtained in Step 13. n The n = 1, 2, ..., K are combined according to their numbering order to obtain the final mixed matrix D:
[0057] D = [d1, d2, ..., d K ]
[0058] Step 15: Based on the mixture matrix D obtained in Step 14, solve for the independent element matrix S of the training data X:
[0059] S = D -1 X = [s1, s2, ..., s K ]
[0060] Network training phase
[0061] Step 16: Using the independent element matrix S obtained in Step 15 as the input X1 of the first layer of the width learning system, construct the i-th feature node of the first layer network of the system. The number of feature nodes in the network is set to I=10, and each feature node extracts different distribution features of the data:
[0062]
[0063] in It is a randomly generated weight matrix. These are randomly generated bias vectors, all of which are random values uniformly distributed between 0 and 1. The superscript 1 represents the first layer of the network, and the subscript z represents the feature window.
[0064] Step 17: Repeat step 16 to generate all feature nodes of the first layer network, and connect the generated feature nodes to obtain the set of all feature nodes of the first layer network. use Construct the j-th augmentation node of the first layer network The number of enhanced nodes in the first layer is set to J = 20:
[0065]
[0066] in It is a randomly generated weight matrix. It is a randomly generated bias vector, where the superscript 1 represents the first layer of the network and the subscript h represents the enhancement window. It is a non-linear mapping function.
[0067] Step 18: Repeat step 17 to generate all the augmentation nodes of the first layer network, connect each augmentation node, and obtain the set of augmentation nodes of the first layer network. A width learning system constructed from feature nodes and augmentation nodes is represented as:
[0068]
[0069] in, This represents the input matrix of the first layer network, with the symbol... Represents a matrix sum matrix Perform horizontal splicing; Y1 is the output of the first layer network, and the connection weights of the first layer network are... pass Calculations show that Y label,1 The original training labels are represented by the symbol (·). + The formula for finding the pseudo-inverse of a matrix is as follows:
[0070]
[0071] Where λ represents a further constraint on the sum of squares of the weights, and E represents the identity matrix.
[0072] Step 19: By combining overcomplete independent component analysis (OCA) with the stacking concept, this paper cascades multi-layer models using residual connections to construct an OSBLS model. In the OSBLS model, the networks outside the first layer have a similar structure, and their training labels and input data change as the network depth increases. Taking the k-th layer as an example, the training label Y of the k-th layer... label,k for:
[0073] Y label,k =Y label,1 -∑Y k-1 k = 2, ..., N
[0074] Where Y k-1 This represents the output of the (k-1)th layer of the network, where N represents the number of network layers, which is set to 2 in this study.
[0075] The input data matrix of the k-th layer network is updated as follows:
[0076] X k =[X k-1 |Y k-1 k = 2, ..., N
[0077] Where X k-1 Let be the input matrix of the (k-1)th layer of the network. By adjusting the training labels, the model continuously optimizes its performance through the residual connection mechanism to approximate the true values of the training labels. Adjusting the input data allows the model to remember the outputs of previous layers and use them as a reference for modeling the new layer.
[0078] Step 20: The i-th feature node of the k-th layer network is represented as:
[0079]
[0080] Where I represents the number of feature nodes assigned to each layer of the network. It is a randomly generated weight matrix. It is a randomly generated bias vector, which consists of random values uniformly distributed between 0 and 1. The superscript k represents the k-th layer of the network, and the subscript z represents the feature window.
[0081] Step 21: Connect the generated feature nodes of layer k to obtain the set of feature nodes of layer k. Map the features extracted from the feature nodes to the enhancement nodes:
[0082]
[0083] Where J represents the number of enhancement nodes set for each layer of the network. It is a randomly generated weight matrix. It is a randomly generated bias vector, where the superscript k represents the k-th layer of the network and the subscript h represents the enhancement window. It is a non-linear mapping function.
[0084] Step 22: Combine feature nodes and booster nodes to obtain the input layer A of the stacked k-th layer network. k :
[0085]
[0086] Step 23: Calculate the input layer A k With label Y label,k Connection weights between
[0087]
[0088] Step 24: Output Y of the stacked k-th layer network k for:
[0089]
[0090] Step 25: In the OSBLS model, residual connections are used to introduce skip connections between the stacked width learning systems. The outputs of each layer of the network collectively form the total output O of the k-layer model. k With Y i Y represents the output of the i-th layer of the network, where i ≤ k. Based on the residual connection technique, the output Y of each layer of the stacked network is... i Summing yields the total output O of the current model. k The calculation formula is as follows:
[0091] O k =Y1+Y2+…+Y k
[0092] Step 26: Calculate the total output O of the current model using the root mean square error as the evaluation index. k and the original label Y label,1 The error, the root mean square error (RMSE) between the output of the k-th layer and the original label. k It is expressed as follows:
[0093]
[0094] Step 27: Record RMSE k And according to the total output O of the network before stacking k-1 The root mean square error (RMSE) obtained k-1 In comparison, as monitoring accuracy increases, i.e., the root mean square error (RMSE) after stacking... k Less than the root mean square error (RMSE) before stacking k-1 Repeat steps 19 to 26 until the monitoring accuracy decreases after stacking. Then select the current stacking layer number k-1 as the final determined network layer number N.
[0095] Step 28: The OSBLS model updates the network by increasing the number of augmenting nodes in the k-th layer and updating the weight matrix of the k-th layer. During the update process, the OSBLS model randomly generates a new weight matrix. bias matrix And the (j+1)th enhancement node of the k-th layer network is obtained through calculation.
[0096]
[0097] Step 29: The OSBLS model updates the input matrix A of the (k+1)th subsystem. k+1This is done to increase the number of augmentation nodes in the k-th layer subsystem.
[0098]
[0099] In the formula, A k+1 Let A' represent the input matrix of the (k+1)th layer of the network before the update. k+1 Let A' represent the updated input matrix of the (k+1)th layer of the network. After obtaining the updated input matrix, calculate (A') k+1 ) + That is, A' k+1 The pseudo-inverse of is calculated as follows:
[0100]
[0101] in,
[0102] Step 30: Calculate B based on C obtained in Step 29. T ,symbol(·) T This represents the transpose of the matrix within the parentheses.
[0103]
[0104] Based on C and the matrix B obtained from the above formula T Update the weight matrix of the k-th layer network:
[0105]
[0106] in This represents the updated weight matrix.
[0107] Step 31: Repeat the OSBLS model update process, i.e., steps 28 to 30, to update the OSBLS model until the training accuracy of the OSBLS model reaches the expected level. Save the model parameters. The training and update process of the OSBLS model is now complete.
[0108] Online application stage:
[0109] During the online application phase, the OSBLS model uses the real-time acquired online test dataset X. new Based on the network parameters saved during the network training phase, the OSBLS model was used to calculate the changes in TSS (Total Sludge Solids) during wastewater treatment caused by two types of faults: sludge bulking and toxic shock, under rainy and heavy rain conditions. The OSBLS model obtained during the network training phase was used to design and construct a TSS monitoring model for wastewater treatment. The specific implementation details are as follows.
[0110] Step 32: Obtain new online sampling data Xnew The test set data uses the same input variables as the training set as the model input.
[0111] Step 33: Use the OSBLS model obtained in steps 16 to 26 of the network training phase to perform online monitoring and obtain monitoring results for new online sampling data. new If the monitoring accuracy obtained at this time cannot meet the requirements of the wastewater treatment plant, then the update process from step 28 to step 31 is used to horizontally expand the OSBLS monitoring model to enhance nodes, repeatedly adding enhancement nodes and updating network weights until the obtained monitoring accuracy meets the actual requirements of the wastewater treatment plant for monitoring accuracy.
[0112] Step 34: Return to Step 32 to continue acquiring new batch test data and obtain monitoring results based on the data. Continue until monitoring results for all batches are obtained, then output all monitoring results in the online application phase.
[0113] Step 35: The online application phase of the OSBLS model is now complete.
[0114] The OSBLS model effectively addresses the problem that some networks cannot extract the non-Gaussian and non-linear characteristics arising from the complex reactions and sedimentation processes in wastewater treatment. This model fully considers the dynamic, non-linear, and non-Gaussian nature of the input variables in the wastewater treatment process. Unlike some deep neural networks that train or update weights through backpropagation, the OSBLS model updates its network weights by finding a pseudo-inverse, and it does not require a complete retraining of the model during updates. This significantly reduces the time cost associated with online network adjustments. Therefore, the OSBLS model can well meet the accuracy and efficiency requirements of actual wastewater treatment plants for monitoring models. Attached Figure Description
[0115] Figure 1 This is a structural diagram of the OSBLS network used in this study;
[0116] Figure 2 This is a schematic diagram of the OSBLS network training mechanism in this study;
[0117] Figure 3 This is a flowchart of the network training phase of the OSBLS network in this study. Detailed Implementation
[0118] Wastewater treatment plants involve multiple treatment units employing physical, biological, and chemical methods. The International Water Association has developed a benchmark simulation platform, BSM1, based on the activated sludge process to simulate actual wastewater treatment processes. This benchmark simulation model uses A... 2Based on the O process flow, and constructed using the No. 1 activated sludge model, this study describes the sedimentation and biochemical reactions in the wastewater treatment process. It includes five activated sludge reactors and one secondary sedimentation tank. Two of the five activated sludge reactors are anoxic, while the rest are aeration. Furthermore, BSM1 simulates the actual operation of the wastewater treatment plant under rainy and heavy rain conditions, based on actual operational data. Data was collected every 15 minutes for 14 days, resulting in 1344 samples for each fault type. The types, parameters, and occurrence times of each fault are shown in Table 1. As shown in Table 1, this study involves 20 sets of fault data, including two fault types: sludge bulking and toxic shock. Sludge bulking is a common and serious failure type. When sludge bulking occurs, the settling and compressibility characteristics of sludge deteriorate, suspended solids increase, sludge loss is severe, and the biological system may malfunction, directly threatening the normal operation of the wastewater treatment system. Toxicity shock failure is caused by the discharge of large amounts of toxic wastewater, leading to a reduction in the microbial activity of activated sludge and even the failure of the wastewater biological reaction system, which seriously affects wastewater treatment. Table 2 provides the names of the process variables in the wastewater treatment process and their corresponding symbols and units, i.e., the 13 variables used as model inputs in the OSBLS model.
[0119] The specific application of the OSBLS model proposed in this study to actual wastewater treatment processes is described below:
[0120] A. OSBLS network training phase in wastewater treatment process:
[0121] Step 1: First, feature extraction is performed on the sampling data collected from the wastewater treatment plant. Overcomplete independent component analysis (ICA) is used to extract non-Gaussian features from the 13 input process variables. During the actual network training phase, a total of 13 features are extracted from the original data at each time step, and these extracted features contain non-Gaussian information.
[0122] Step 2: The features obtained using overcomplete independent component analysis are fed into 10 feature windows of the OSBLS network. Further feature extraction is performed in each feature window, and then the features are fed into the network's augmentation nodes for nonlinear mapping via nonlinear activation functions. In this study, the optimal stacking number of OSBLS models is 2 layers, with the number of feature nodes in each layer, the number of feature nodes in each window, and the number of augmentation nodes set to (10, 10, 100), respectively.
[0123] Step 4: If the monitoring accuracy of the completed OSBLS network is lower than the standard requirements of the wastewater treatment plant, then use incremental learning to expand the OSBLS network laterally and dynamically according to steps 28 to 31 of the network training phase, until the network monitoring accuracy meets the actual needs of the wastewater treatment plant.
[0124] Step 5: Through repeated experiments, determine the network parameters required for the application of the OSBLS model in the online wastewater treatment process TSS index monitoring stage.
[0125] B. Online application stage of wastewater treatment process based on OSBLS network:
[0126] Step 6: Input the online data acquired during the wastewater treatment process into the OSBLS model. During the online monitoring phase, the OSBLS model extracts features from the input data and maps the monitoring results using the network weights saved during network training. After outputting the monitoring results, the model's monitoring accuracy is evaluated using the evaluation metrics MAE and RMSE selected in this study.
[0127] Table 1
[0128]
[0129] The training and online application phases of the OSBLS model represent its practical application on a wastewater treatment platform. To evaluate the performance of the wastewater treatment process monitoring model, mean absolute error (MAE) and root mean square error (RMSE) are used as evaluation metrics, calculated as follows:
[0130]
[0131] Table 2
[0132]
[0133] Tables 3 and 4 present the MAE and RMSE error results of the BLS, OBLS, and OSBLS methods in wastewater treatment under rainy and heavy rain conditions for TSS index monitoring experiments. As shown in the tables, in the 20 sets of fault data, the average MAE and average RMSE errors of all algorithms reached low levels. The experimental results show that the OSBLS method has the lowest MAE and RMSE, at 0.08802 and 0.11873, respectively. The results indicate that compared to the BLS network, the OBLS network, which incorporates overcomplete independent component analysis, can achieve higher monitoring accuracy under complex rainy conditions. This suggests that overcomplete independent component analysis can effectively mitigate the adverse effects of non-Gaussian characteristics on the system during wastewater treatment, thus benefiting the wastewater treatment process index monitoring model. Furthermore, by introducing the stacking concept, the constructed OSBLS network achieves considerable monitoring accuracy, demonstrating that network stacking significantly improves network accuracy. In addition to high monitoring accuracy, the OSBLS model also has the advantage of low time overhead, which can fully meet the real-time requirements of wastewater treatment plants in practical applications. Furthermore, the OSBLS model can utilize incremental learning to add augmentation nodes and expand the network to improve model accuracy. This incremental learning approach eliminates the need for complex parameter settings and avoids the necessity of retraining the entire system. This method reduces the time overhead associated with network adjustment and updates, allowing the model to easily adjust its structure to adapt to new data or improve its accuracy, thereby achieving the performance level required for wastewater treatment. Table 3
[0134]
[0135] Table 4
[0136]
Claims
1. A method for monitoring the total suspended solids concentration in a real-time wastewater treatment process based on artificial intelligence technology, characterized in that: It is divided into three parts: preprocessing stage, model training stage, and online application stage; Preprocessing stage: Step 1: Obtain the dataset; First, it is necessary to determine the input variables and output process variables of the monitoring model; Input variables include: influent suspended solids concentration, readily biodegradable organic matter concentration, granular inert organic carbon concentration, active heterotrophic bacteria concentration, active autotrophic bacteria concentration, particulate matter concentration from biological decay, dissolved oxygen concentration, nitrate nitrogen concentration, ammonia nitrogen concentration, soluble biodegradable organic nitrogen concentration, alkalinity molar concentration, particulate biodegradable organic nitrogen concentration, and chronically biodegradable organic matter concentration. Input variables are represented by X, and the total number of variables is P = 13. The output variable is the concentration of TSS (Total Suspended Solids) index in the wastewater treatment process, denoted by Y. label,1 express; Step 2: To handle data that does not follow a Gaussian distribution, the OSBLS model employs overcomplete independent component analysis as a non-Gaussianity processing module; the independent component analysis method decomposes the training data matrix X with P variables into K independent elements s. K Let K = 90: X = DS Where, the independent element matrix S = (s1,…,s) K ) T Independent element vectors s n n = 1, ..., K; the mixture matrix D ∈ R P×K Where the number of independent elements K > P; Step 3: Obtain the generalized covariance matrix of the independent components by taking the derivative of the Hessian matrix of the cumulative generating function at the non-zero vector t; and obtain the subspace W by combining the generalized covariance matrix of the independent components and the generalized covariance matrix of the original data X and using the stretching operation. The covariance matrix is obtained through a second-order cumulative generating function. For the training data matrix X, any t∈R P Cumulative generation function φ X (t) is defined as follows: Where t is a vector that follows a Gaussian distribution, E(·) represents the expectation, and e represents the natural constant; Step 4: Substitute The Hessian evaluation of the cumulant generation function is then performed, yielding the covariance matrix cov(X) of X as follows: in The cumulative generation function φ X The Hessian matrix of (0), i.e., the second-order partial derivative matrix; Step 5: Extend t from Step 4 to a non-zero vector, perform Hessian evaluation on the cumulant generating function, and obtain the generalized covariance matrix C. X (t), its formula is as follows: in Step 6: Substitute the formula from Step 5 into the formula from Step 2, and calculate the generalized covariance matrix ε in the independent component analysis environment. X (t): C X (t)=DC S (Y)D T Where Y = D T t, the generalized covariance matrix C of independent elements S (Y) is defined as follows: in This represents the gradient, i.e., the vector of first-order partial derivatives. Step 7: The independent element generalized covariance matrix C obtained in Step 6 S (Y) is a diagonal matrix; therefore, the generalized covariance matrix C under independent component analysis is... X (t) is written as: Where ω n (t)=[C S (D T t)] nn It is the nth independent element s n The generalized variance, d n Represents the nth column of the mixing matrix D; Step 8: In an independent component analysis environment, the generalized covariance matrix belongs to a subspace W. Therefore, the space spanned by any number of covariance matrices is a subset of W or equivalent to W. Given L vectors t1, t2, ..., t L Where L>K, that is, greater than the number of independent elements, we get an equal matrix H. l =C X (t l ), l∈[L],H l That is, it is an approximation of the subspace W; Step 9: After approximating the subspace W in step 8, given matrices H1, H2, ..., H L ; Atoms through shrinkage method Approximate solution; solve the following positive semi-definite problem to obtain an atom: in This represents the optimal matrix found through a semidefinite programming (SDP) optimization problem, where the objective function is...<G,B> The maximum solution,<G,B> Let G represent the inner product of matrices G and B, where G ∈ R. P×P This is a weight matrix used to select a particular component of the mixture. It is usually generated based on an iterative method. The matrix G determines the direction of contraction, and B∈S. P Indicates that matrix B belongs to the set of P×P symmetric matrices, and the specific constraints on matrix B are: B∈Span{H1,H2,…,H L } Tr(B)=1 B≥0 Where Span{H1,H2,…,H L } represents the subspace spanned by atoms, Tr(·) represents the trace, and B≥0 indicates that matrix B must be a positive semi-definite matrix with all its eigenvalues being non-negative; Step 10: Since the subspace is composed of H1, H2, ..., H L Zhang Cheng's formula in step 9 has the following constraints: Step 11: Because of constraints Any orthogonal complement of B orthogonal to W is equivalent; let the basis of the null space N(W) be the matrix {F1F2,…,F}. M-K }, where M = P(P+1) / 2; then the constraints of matrix B are further rewritten as: <B,F m >=0,m∈[M-K] Tr(B)=1 B≥0 Step 12: Introduce a relaxation factor into the formula in Step 11 and rewrite it as: Wherein, the regularization parameter μ = 0.1; Step 13: Using a clustering method, resample matrix G K times, taking K=90, to generate a set of K candidate atoms. in Let {C1, ..., C2} be the submatrix of the k-th sampling; then, the obtained atoms are clustered into K clusters, resulting in {C1, ..., C2}. k The center vector of each cluster is denoted as μ. k The cluster center with the smallest intra-class variance is selected as the current optimal atom n. * : in The selected atom is denoted as n is the current resampling count; the selected atoms are removed from the subspace, and then the relaxation constraints in step 12 are used to... Add the found atoms to the basis of the null space of W, for the constraint set. To update and achieve adaptive shrinkage: N(W)←Span{N(W),d n }, Step 14: Calculate the K vectors d obtained in Step 13. n The n = 1, 2, ..., K are combined according to their numbering order to obtain the final mixed matrix D: D=[d1,d2,…,d K ] Step 15: Based on the mixture matrix D obtained in Step 14, solve for the independent element matrix S of the training data X: S=D -1 X=[s1,s2,…,s K ] Network training phase Step 16: Using the independent element matrix S obtained in Step 15 as the input X1 of the first layer of the width learning system, construct the i-th feature node of the first layer network of the system. The number of feature nodes in the network is set to I=10, and each feature node extracts different distribution features of the data: in It is a randomly generated weight matrix. These are randomly generated bias vectors, all of which are random values uniformly distributed between 0 and 1. The superscript 1 represents the first layer of the network, and the subscript z represents the feature window. Step 17: Repeat step 16 to generate all feature nodes of the first layer network, and connect the generated feature nodes to obtain the set of all feature nodes of the first layer network. use Construct the j-th augmentation node of the first layer network The number of enhanced nodes in the first layer is set to J = 20: in It is a randomly generated weight matrix. It is a randomly generated bias vector, where the superscript 1 represents the first layer of the network and the subscript h represents the enhancement window. It is a nonlinear mapping function; Step 18: Repeat step 17 to generate all the augmentation nodes of the first layer network, connect each augmentation node, and obtain the set of augmentation nodes of the first layer network. A width learning system constructed from feature nodes and augmentation nodes is represented as: in, This represents the input matrix of the first layer network, with the symbol... Represents a matrix sum matrix Perform horizontal splicing; Y1 is the output of the first layer network, and the connection weights of the first layer network are... pass Calculations show that Y label,1 The original training labels are represented by the symbol (·). + The formula for finding the pseudo-inverse of a matrix is as follows: Where λ represents a further constraint on the sum of squares of the weights, and E represents the identity matrix; Step 19: In the OSBLS model, the networks outside the first layer have a similar structure, and their training labels and input data change as the network depth increases; taking the training label Y of the k-th layer in the k-th layer network as an example... label,k for: AND label,k =Y label,1 -∑Y k-1 k=2,...,N Where Y k-1 This represents the output of the (k-1)th layer of the network, where N represents the number of network layers, which is set to 2. The input data matrix of the k-th layer network is updated as follows: X k =[X k-1 |Y k-1 ]k=2,...,N Where X k-1 is the input matrix of the (k-1)th layer network; by adjusting the training labels, the model continuously optimizes its performance through the residual connection mechanism to approximate the true value of the training labels, while adjusting the input data enables the model to remember the output of previous layers of the network and use it as a modeling reference for the new layer. Step 20: The i-th feature node of the k-th layer network is represented as: Where I represents the number of feature nodes assigned to each layer of the network. It is a randomly generated weight matrix. These are randomly generated bias vectors, all of which are random values uniformly distributed between 0 and 1. The superscript k represents the k-th layer of the network, and the subscript z represents the feature window. Step 21: Connect the generated feature nodes of layer k to obtain the set of feature nodes of layer k. Map the features extracted from the feature nodes to the enhancement nodes: Where J represents the number of enhancement nodes set for each layer of the network. It is a randomly generated weight matrix. It is a randomly generated bias vector, where the superscript k represents the k-th layer of the network and the subscript h represents the enhancement window. It is a nonlinear mapping function; Step 22: Combine feature nodes and booster nodes to obtain the input layer A of the stacked k-th layer network. k : Step 23: Calculate the input layer A k With label Y label,k Connection weights between Step 24: Output Y of the stacked k-th layer network k for: Step 25: In the OSBLS model, residual connections are used to introduce skip connections between the stacked width learning systems. The outputs of each layer of the network collectively form the total output O of the k-layer model. k ; with Y i Y represents the output of the i-th layer of the network, where i ≤ k; based on the residual connection technique, the output Y of each stacked layer of the network is... i Summing yields the total output O of the current model. k The calculation formula is as follows: Oh k =Y1+Y2+…+Y k Step 26: Calculate the total output O of the current model using the root mean square error as the evaluation index. k and the original label Y label,1 The error, the root mean square error (RMSE) between the output of the k-th layer and the original label. k It is expressed as follows: Step 27: Record RMSE k And according to the total output O of the network before stacking k-1 The root mean square error (RMSE) obtained k-1 In comparison, as monitoring accuracy increases, i.e., the root mean square error (RMSE) after stacking... k Less than the root mean square error (RMSE) before stacking k-1 Repeat steps 19 to 26 until the monitoring accuracy decreases after stacking. Then select the current stacking layer number k-1 as the final determined network layer number N. Step 28: During the update process, the OSBLS model randomly generates a new weight matrix. bias matrix And the (j+1)th enhancement node of the k-th layer network is obtained through calculation. Step 29: The OSBLS model updates the input matrix A of the (k+1)th subsystem. k+1 This is done to increase the number of augmentation nodes in the k-th layer subsystem. In the formula, A k+1 Let A represent the input matrix of the (k+1)th layer of the network before the update. ' k+1 This represents the updated input matrix of the (k+1)th layer of the network; after obtaining the updated input matrix, calculate (A' k+1 ) + That is, A' k+1 The pseudo-inverse of is calculated as follows: in, Step 30: Calculate B based on C obtained in Step 29. T ,symbol(·) T This represents transposing the matrix within the parentheses; Based on C and the matrix B obtained from the above formula T Update the weight matrix of the k-th layer network: in This represents the updated weight matrix; Step 31: Repeat the OSBLS model update process, i.e., steps 28 to 30, to update the OSBLS model until the training accuracy of the OSBLS model reaches the expected level. Save the model parameters. The training and update process of the OSBLS model is now complete. Online application stage: Step 32: Obtain new online sampling data X new As test set data, it uses the same input variables as the training set as the model input; Step 33: Use the OSBLS model obtained in steps 16 to 26 of the network training phase to perform online monitoring and obtain monitoring results for new online sampling data. new If the monitoring accuracy obtained at this time cannot meet the requirements of the wastewater treatment plant, then the update process from step 28 to step 31 is used to horizontally expand the OSBLS monitoring model to enhance nodes, repeatedly adding enhancement nodes and updating network weights until the monitoring accuracy obtained meets the actual requirements of the wastewater treatment plant for monitoring accuracy. Step 34: Return to step 32, continue to acquire new batch test data, and obtain monitoring results based on the data; until all batch monitoring results are obtained, output all monitoring results in the online application stage.