Search

CN-121999906-A - Effluent quality prediction system suitable for wastewater treatment process

CN121999906ACN 121999906 ACN121999906 ACN 121999906ACN-121999906-A

Abstract

The invention relates to a water quality prediction system suitable for a wastewater treatment process, and belongs to the technical field of wastewater treatment. Aiming at the problems of low prediction precision, poor real-time performance, difficulty in capturing nonlinear time-varying characteristics and unstable water output and medicament waste caused by depending on experience in dosing control in the prior art, the invention provides a prediction system integrating multiple machine learning and deep learning models, which comprises a data loading preprocessing unit, a model defining unit, a training evaluation optimizing unit and a visualization unit, through time feature extraction, outlier processing, sliding window sequence construction, multi-model training and early stop optimization of a long-period memory network, a two-way long-period memory network, a random forest and an extreme gradient lifting model, the accurate prediction of total phosphorus, turbidity and chemical oxygen demand of the effluent is realized. The method and the device remarkably improve the prediction accuracy and stability, support real-time process optimization and accurate dosing, effectively ensure that the effluent reaches the standard and reduce the running cost.

Inventors

  • Guo sai
  • FENG XIN
  • ZHANG JUNWEI

Assignees

  • 重庆赛迪热工环保工程技术有限公司

Dates

Publication Date
20260508
Application Date
20260114

Claims (10)

  1. 1. The effluent quality prediction system suitable for the wastewater treatment process is characterized by comprising a program support unit, a data loading and preprocessing unit, a model definition unit, a model training evaluation and optimization unit and a visualization unit; The program support unit is used for setting global random seeds, creating a result storage catalog and defining a water quality data set class; The data loading and preprocessing unit is connected with the program supporting unit and is used for loading historical water quality data, processing time series, filling missing values by using time interpolation, processing abnormal values by using a quarter bit distance method, extracting time characteristics, carrying out data normalization and creating time series samples; The model definition unit is connected with the data loading and preprocessing unit and is used for constructing a long-term memory network model LSTM, a two-way long-term memory network model BiLSTM, a random forest model and an extreme gradient lifting model XGBoost; The model training evaluation and optimization unit is connected with the model definition unit and is used for training the LSTM model and the BiLSTM model by adopting an early shutdown system, respectively carrying out cross validation and super-parameter optimization on all models, and evaluating the models by adopting a mean square error MSE, a root mean square error RMSE, a mean absolute error MAE and a decision coefficient R 2 ; The visualization unit is connected with the model training evaluation and optimization unit and is used for generating a training loss curve, a predicted value and true value comparison graph, a characteristic importance graph and different model evaluation index comparison graphs.
  2. 2. The effluent quality prediction system for wastewater treatment process according to claim 1, wherein the data loading and preprocessing unit processes abnormal values by using a quartile range method, wherein the abnormal values are defined as data points smaller than the first quartile Q1 minus 1.5 times the quartile range IQR or larger than the third quartile Q3 plus 1.5 times the quartile range IQR, and the quartile range IQR=Q3-Q1.
  3. 3. The effluent quality prediction system suitable for wastewater treatment process of claim 1, wherein the data loading and preprocessing unit creates a time sequence sample by adopting a sliding window method, the input sequence length is seq_len, the input sequence is [ t-n, t-n+1 ], the characteristic corresponding to t-1] and the target value is an effluent quality index at the time t.
  4. 4. The effluent quality prediction system suitable for a wastewater treatment process according to claim 1, wherein the LSTM model comprises an input layer, a plurality of LSTM layers, a Dropout layer and a fully connected output layer which are sequentially connected, the BiLSTM model sets the LSTM layer to be bidirectional on the basis of the LSTM model, and the hidden state dimension is hidden_size multiplied by 2.
  5. 5. The effluent quality prediction system suitable for a wastewater treatment process according to claim 1, wherein the random forest model adopts Bootstrap sampling and feature random subset selection, and the XGBoost model adopts a second-order Taylor expansion approximate loss function and comprises L1 regularization and L2 regularization terms.
  6. 6. The effluent quality prediction system for wastewater treatment process according to claim 1, wherein the model training evaluation and optimization unit sets early stop endurance value patience when training LSTM model and BiLSTM model, stops training when continuous patience rounds of verification loss does not decrease, and saves model parameters with lowest verification loss.
  7. 7. The effluent quality prediction system for wastewater treatment process according to claim 1, further comprising a prediction application unit connected with the model training evaluation and optimization unit for receiving real-time water quality data, selecting an optimal model for training to predict total phosphorus TP, turbidity SS and COD of effluent and outputting the prediction result.
  8. 8. The effluent quality prediction system for wastewater treatment process according to any one of claims 1 to 7, wherein the key indicators of the effluent quality predicted by the system are total phosphorus TP, turbidity SS and COD.
  9. 9. A method for predicting the quality of effluent water suitable for a wastewater treatment process is characterized by comprising the following steps of: (1) Setting a global random seed through a program supporting unit and creating a result catalog; (2) The method comprises the steps of loading historical water quality data through a data loading and preprocessing unit, and sequentially executing time series processing, missing value time interpolation filling, four-bit distance method outlier processing, time feature extraction, min-Max normalization and sliding window time sequence sample creation; (3) Dividing a training set and a testing set; (4) Constructing an LSTM model, a BiLSTM model, a random forest model and a XGBoost model through a model definition unit; (5) Respectively training four models through a model training evaluation and optimization unit, wherein an early-stopping mechanism is adopted for an LSTM model and a BiLSTM model; (6) Respectively calculating MSE, RMSE, MAE and R2 for the four models, and selecting the model with the best performance; (7) Receiving real-time water quality data, and predicting total phosphorus TP, turbidity SS and COD of the effluent by using the optimal model selected in the step (6); (8) And generating a training loss curve, a prediction and real value comparison graph and a model evaluation index comparison graph through a visualization unit.
  10. 10. The method of claim 9, wherein the outlier treatment in step (2) is performed by a quarter-bit method, and the outlier is defined as a data point smaller than Q1-1.5 xIQR or larger than Q3+1.5 xIQR, wherein IQR=Q3-Q1.

Description

Effluent quality prediction system suitable for wastewater treatment process Technical Field The invention belongs to the technical field of sewage treatment, and relates to a water quality prediction system suitable for a wastewater treatment process. Background At present, most sewage treatment plants adopt the traditional processes such as a circulating activated sludge method, the process parameters are complicated to adjust, the adjustment lag is obvious, the chemical agent is mainly added by depending on the experience judgment of field operators, and the accurate metering and the real-time optimization are difficult to realize. The existing water quality monitoring means mainly depend on off-line tests or simple on-line meters, the direct measurement of chemical oxygen demand needs complex equipment and has long measurement delay, and the five-day biochemical oxygen demand measurement has long time consumption, is complex to operate, is easily influenced by environment and microorganism activities, and cannot meet the requirement of rapid and accurate evaluation. The prior art has the following main defects in the aspect of effluent quality prediction: Firstly, the traditional mechanism model is difficult to accurately describe complex nonlinear, time-varying and time-lag characteristics in the sewage treatment process, the prediction accuracy is low, and the influence of dynamic fluctuation of the inflow water quality on the water outlet key index cannot be effectively captured. Secondly, conventional statistical prediction methods and simple machine learning methods have difficulty in fully mining long-term dependency relationships and multi-factor coupling correlations between water quality indexes and process parameters, so that the stability of prediction results is poor. And moreover, the existing system generally has the problem of lag monitoring data, only can provide historical water quality information, and cannot predict the variation trend of key indexes such as total phosphorus, turbidity, chemical oxygen demand and the like of the effluent in a period of time in the future in advance, so that advanced regulation and control of the process and quick response of sudden water quality events are difficult to support. Finally, most of the sewage treatment plants still take the artificial experience as the main part in the aspect of dosing control at present, lack of accurate dosing strategies based on effluent quality prediction, easily cause medicament waste or insufficient dosing, have high running cost and poor effluent standard stability. Therefore, an intelligent system capable of integrating the advantages of deep learning and machine learning and realizing high-precision effluent water quality prediction is needed, so that the defects of the prior art in terms of instantaneity, accuracy and practicability are overcome, and reliable technical support for process optimization, accurate dosing and stable standard-reaching emission is provided for a sewage treatment plant. Disclosure of Invention In view of the above, the present invention aims to provide a water quality prediction system suitable for wastewater treatment process. In order to achieve the above purpose, the present invention provides the following technical solutions: ...... the invention has the beneficial effects that: According to the invention, through integrating a long-short-period memory network, a two-way long-short-period memory network, a random forest, an extreme gradient lifting and other multiple machine learning and deep learning models, the accuracy and stability of the prediction of the key indexes of the water quality of the effluent are obviously improved, and the defect that the traditional mechanism model and a single prediction method are difficult to capture the nonlinear, time-varying and long-term dependency relationship in the sewage treatment process is effectively overcome. The invention realizes the integrated flow of complete data preprocessing, characteristic engineering, time sequence construction and multi-model training evaluation, can automatically process the missing value and the abnormal value, fully excavates the coupling association of time period characteristics and multiple factors, and enables the prediction result to be more close to the actual operation condition. According to the invention, an early-stop mechanism, a cross-validation and multi-dimensional evaluation index system is introduced, so that the generalization capability and robustness of the model are obviously improved, the risk of overfitting is reduced, and the high-precision prediction performance of the system under different water quality fluctuation conditions is ensured. The invention provides rich visual functions, including training process monitoring, prediction result comparison, feature importance analysis and multi-model performance comparison, which is convenient for operation and maintenance personnel