Method for predicting COD (Chemical Oxygen Demand) of leachate of garbage transfer station

By constructing an RF-XGBoost model based on nonlinear fitting, combining real-time and historical data for preprocessing and feature analysis, efficient prediction of leachate COD in garbage transfer stations is achieved, and the problem of low prediction accuracy in the existing technology is solved. , reducing the energy consumption and operating costs of sewage treatment systems.

CN119397251AActive Publication Date: 2025-02-07HANGZHOU DIANZI UNIV
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202411673767.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-07
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively predict the chemical oxygen demand (COD) of the leachate in the garbage transfer station, which makes it difficult for the sewage treatment system to make scientific and economic decisions when facing changes in the inlet water quality and water volume, which increases energy consumption and operation. cost.

Method used

The COD prediction model RF-XGBoost is constructed by a nonlinear fitting method, and the real-time and historical data are collected through sensors for preprocessing, feature analysis and screening, real-time prediction is performed in combination with real-time data, and model parameters are continuously adjusted through an adaptive feedback optimization mechanism.

Benefits of technology

It improves the prediction accuracy of leachate COD in garbage transfer stations, can adapt to changes in complex environments, reduces the energy consumption and operating costs of the sewage treatment system, and improves the sewage treatment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397251A_ABST
    Figure CN119397251A_ABST
Patent Text Reader

Abstract

The invention discloses a garbage transfer station leachate COD (chemical oxygen demand) prediction method, which is characterized in that related water quality parameters of leachate are acquired in real time, and historical COD value data are combined to construct a nonlinear prediction model based on multi-factor analysis, so that a COD value in the leachate is accurately predicted. The system adopts a machine learning algorithm, has a self-adaptive feedback mechanism, automatically adjusts model parameters according to the difference between a predicted value and an actual value, and realizes high-precision and stable COD value prediction. According to the method, through innovative technologies such as multi-factor comprehensive analysis and real-time feedback optimization, the precision of predicting the COD of the leachate of the garbage transfer station is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of leachate treatment, and in particular to a method for predicting COD of leachate from a garbage transfer station. Background Art

[0002] Leachate from garbage transfer stations is a highly polluted and highly concentrated sewage, which usually contains a large amount of organic pollutants, heavy metals, ammonia nitrogen and other pollutants. It has the characteristics of complex water quality, high concentration of pollutants and great difficulty in treatment. Its composition is complex, including organic matter, inorganic matter and various toxic substances, which poses a great threat to the water environment and human health. Among them, chemical oxygen demand (COD) is a measurement of the concentration of organic matter and inorganic oxides in water, reflecting the degree of water pollution by reducing substances. It is an important indicator for water quality evaluation. The phenomenon of water pollution by organic matter is very common, so it is often used as one of the indicators reflecting the degree of organic pollution. However, the various operating parameters of the sewage treatment system and the effluent water quality indicators often have nonlinear and lagging correlation characteristics. Therefore, when the sewage treatment system is impacted by the influent water quality and water volume, it is usually adopted to increase the aeration intensity and add chemical agents to ensure the effluent water quality. However, high-intensity aeration and the use of chemicals will greatly increase the energy consumption and operating costs of sewage treatment plants, thereby causing secondary pollution and waste.

[0003] In order to solve this problem, it is particularly important to develop a method for predicting the effluent quality that can be applied to the sewage treatment system. Such a prediction method can help operators understand the trend of water quality changes in advance, so as to make more scientific and economical decisions to reduce energy consumption and operating costs while ensuring the effluent quality. Through the prediction model, the sewage treatment process can be adjusted in real time, so that the sewage treatment process can take into account the needs of water resource management and energy conservation and emission reduction while ensuring the sewage treatment effect. For example, the neural network model based on the encoder-decoder framework can predict the effluent quality of the sewage treatment plant. By learning historical data, this model can reproduce the dynamic process of water quality changes and provide prerequisite support for process optimization and model predictive control. In addition, the use of multi-indicator input to predict multi-indicator output strategy and the introduction of environmental factors that affect the sewage treatment process can allow the model to be applied in complex environments, which is of practical significance.

[0004] However, the current prediction methods still have some defects. For example, the composition of landfill leachate is complex and the concentration of pollutants fluctuates greatly. A single traditional prediction model is difficult to fully capture this complex relationship, resulting in less than ideal prediction accuracy. Traditional prediction methods rely on a large amount of historical data, but due to the diverse changes in leachate composition, the composition and treatment difficulty in different regions and seasons vary greatly, resulting in insufficient representation of historical data. This reliance on data will reduce the applicability and accuracy of the model in new environments. During the leachate treatment process, the external environment (such as temperature, pH value, type of pollutants, etc.) has a great impact on the treatment effect. Existing prediction methods are usually difficult to effectively combine these external factors and cannot achieve comprehensive prediction of multiple variables, resulting in reduced prediction accuracy under extreme conditions. Some prediction methods (such as deep learning models based on big data) have high requirements for computing resources, long data processing and model training time, and it is difficult to achieve real-time prediction. This will appear to be lagging when leachate treatment requires rapid response and adjustment, affecting the actual sewage treatment effect. Many prediction methods perform well on specific data sets, but lack adaptability to different data sets or environments. Especially when the composition of landfill leachate varies greatly and the samples are limited, the existing models are prone to overfitting and lack of generalization ability, resulting in a significant decrease in prediction performance under new data or different conditions. Existing methods focus more on the prediction of sewage treatment effects, while ignoring the impact of specific process parameters on the prediction results. Different treatment processes (such as membrane method, biological method, etc.) have different removal effects on various pollutants in leachate. There is a lack of comprehensive prediction methods that combine prediction models with actual process parameters, making it difficult to provide effective references in process selection and parameter optimization. There are many types of pollutants in leachate, and some traditional linear regression or simple time series models are difficult to capture the relationship between pollutants, resulting in limited prediction accuracy.

[0005] In summary, a new and efficient method for predicting COD of leachate from garbage transfer stations is urgently needed to improve the efficiency and effectiveness of sewage treatment and reduce environmental pollution and waste of resources. Summary of the invention

[0006] The purpose of the present invention is to solve the problems existing in the background technology and propose a method for predicting COD of leachate from a garbage transfer station. The steps are as follows: S1. Collect real-time and historical data of leachate from garbage transfer stations through sensors; S2. Preprocess the collected real-time data and historical data; S3. Based on the composition characteristics of the leachate, feature analysis is performed, and features are further screened and optimized through feature engineering. Feature variables that are strongly correlated with effluent COD are selected to construct a COD data set to improve the prediction accuracy of the model. S4. Use nonlinear fitting method to build COD prediction model RF-XGBoost, and use preprocessed historical data to train and optimize the prediction model; S5. Input the preprocessed real-time data into the trained prediction model RF-XGBoost, and output the COD prediction value in real time; according to the difference between the prediction result and the actual measurement data, automatically adjust the model parameters to achieve adaptive feedback optimization of the model.

[0007] Preferably, the preprocessing in step S2 includes standardization, removal of abnormal data, filling of missing values, and data smoothing, and the specific steps are as follows: S21, constructing a data set for the real-time data and historical data collected in step S1, and then performing standardization processing, and scaling the data features to the range of [0,1] using formula (1); (1) In formula (1), x is the original data, is the normalized data, and are the minimum and maximum values ​​of the data set, respectively. max and min are the limits of the scaling range, which are 0 and 1 here; S22. Detect outliers based on the interquartile range (IQR), calculate the first quartile (Q1) and third quartile (Q3) of the data, and calculate the IQR ( ). For less than or greater than The value of can be considered as an outlier and removed;

[0008] S23, fill the missing value with the previous or next known value, and smooth the data using the moving average method formula (2); (2) In formula (2) is the smoothed data point, representing the average value in the window, is the window size, that is, the number of consecutive data points to be averaged, is the data point in the original data, representing each value within the window; Preferably, the specific steps of step S3 are as follows: S31, using the Pearson correlation coefficient as a reference to evaluate the correlation between each input characteristic variable and the effluent COD concentration, calculating the corresponding values ​​according to formula (3) and sorting and screening the characteristic variables; (3) In formula (3) is the number of data samples, For the Samples in The value on the variable, For the Samples in The value on the variable, and are the corresponding average values; S32. Construct a COD data set using the screened characteristic variables.

[0009] Preferably, the screened characteristic variables include influent pH value, influent COD concentration, influent C / N (carbon / nitrogen) ratio, influent C / P (carbon / phosphorus) ratio, and DO (dissolved oxygen); Preferably, the specific steps of step S4 are as follows: S41. Use nonlinear fitting method to build random forest (RF) model and XGBoost machine learning model; S42, cross-validate the data set obtained in S32, divide it into k subsets, use one of the subsets as the validation set each time, and use the remaining k-1 subsets as the training set, repeat k times, and select a different subset as the validation set each time; set hyperparameters, train each group of randomly selected hyperparameter combinations, evaluate their performance using cross-validation, select the best performing hyperparameter combination based on the results of cross-validation, use the predictions of the RF model and the XGBoost model as features, construct a new meta-data set, select linear regression as the meta-learner, use the meta-data set for training, and then continuously perform optimization processing to obtain the RF-XGBoost model; S43. Calculate the corresponding determination coefficients of different models according to formula (4) ; (4) In formula (4) is the number of data samples, is the true value of COD, is the true average value of COD, is the predicted value of COD.

[0010] S44. Obtain the root mean square error (RMSE) according to formula (5) to evaluate the prediction accuracy of different machine learning models; (5) In formula (5) is the number of data samples, is the true value of COD, is the predicted value of COD.

[0011] Preferably, the specific steps of S5 are as follows: input the collected real-time data into the RF-XGBoost machine learning model, output the COD prediction value in real time, use SGDRegressor as an incremental learning model to automatically adjust the model parameters according to the difference between the prediction result and the actual measurement data, when the model has a large prediction error during continuous operation, use the random search method to tune the hyperparameters, update the hyperparameter configuration of the model according to the search results, and restart monitoring the error after each model update to form a circular feedback mechanism.

[0012] Compared with the prior art, the present invention has the following beneficial technical effects: The present invention adopts a nonlinear fitting method to construct a COD prediction model to adapt to complex pollutant relationships. In addition, the present invention proposes to input the collected sensor data into the trained prediction model in real time and automatically adjust the model parameters based on the prediction error. Through the adaptive optimization feedback mechanism, the model constructed by the method of the present invention can continuously learn, adjust and feedback optimization during operation, improve long-term prediction accuracy, and achieve accurate prediction of COD of leachate from garbage transfer stations, overcoming the problem of poor prediction results due to the large number of pollutant types. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flow chart of a method for predicting COD of leachate from a garbage transfer station in the present invention; Figure 2 Schematic diagram of the RF model for predicting COD of leachate from a garbage transfer station in the present invention, wherein A is the training set result and B is the test set result; Figure 3 Schematic diagram of the XGBoost model for predicting COD of leachate from a garbage transfer station in the present invention, where A is the training set result and B is the test set result; Figure 4 It is a schematic diagram of the RF-XGBoost model for predicting COD of leachate from a garbage transfer station in the present invention, wherein A is the training set result and B is the test set result. DETAILED DESCRIPTION

[0014] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0015] like Figure 1 As shown, the present invention proposes a method for predicting COD of leachate from a garbage transfer station, and the steps are as follows: 1. Data Collection and Preprocessing 1.1. Collect real-time data and historical data of leachate through sensors, wherein the real-time data and historical data include relevant water quality parameters of the leachate.

[0016] 1.2. Introduce the feature normalization function Min-Max Scaling to normalize the sample data to prevent the large number of dimension attributes from dominating due to the large difference in the order of magnitude of the data, and at the same time improve the convergence speed of the model. The calculation formula is as follows:

[0017] Where x is the original data, is the normalized data, and They are the minimum and maximum values ​​of the data set, respectively. Min and max are the limits of the scaling range, which are 0 and 1 here.

[0018] 1.3. Detect outliers by using the interquartile range (IQR), calculate the first quartile (Q1) and the third quartile (Q3) of the data, and calculate the IQR ( ). For less than or greater than The value of can be considered as an outlier. The outlier is removed, and the missing value is filled with the previous or next known value. The moving average method is used to smooth the data. The calculation formula is as follows:

[0019] in is the smoothed data point, representing the average value in the window, is the window size, that is, the number of consecutive data points to be averaged, is a data point in the original data, representing each value within the window.

[0020] 2. Feature Selection 2.1. Collect water quality parameters during the leachate treatment process of the garbage transfer station, including inlet pH value, inlet COD concentration, inlet NH3-N concentration, inlet TP concentration, inlet C / N ratio, inlet C / P ratio, HRT (Hydraulic Retention Time), DO and the corresponding effluent COD concentration.

[0021] 2.2. The Pearson correlation coefficient (PCC) was used as a reference to evaluate the correlation between each input characteristic variable and the COD of the leachate from the garbage transfer station. The calculation formula is as follows: in is the number of data samples, For the Input features, For the COD of leachate from garbage transfer stations, and are the corresponding average values.

[0022] 2.3. By calculating the influent pH value, influent COD concentration, influent C / N ratio, influent C / P ratio, and DO, we found that they are strongly correlated features of effluent COD, and constructed a COD data set.

[0023] 3. Building a Machine Learning Model 3.1. A nonlinear fitting method was used to adapt to the complex pollutant relationship, and a COD prediction model was constructed using random forest RF and XGBoost to improve the accuracy of the prediction.

[0024] 3.2. Perform cross-validation on the data set obtained in 2.3 and divide it into k subsets. Use one of the subsets as the validation set each time and the remaining k-1 subsets as the training set. Repeat this process k times, selecting a different subset as the validation set each time. The results of the k validations are averaged to obtain the final evaluation index of the model.

[0025] 3.3. Define a range or distribution for each hyperparameter such as learning rate, number of trees (n_estimators), maximum depth (max_depth), set the number of searches, train each randomly selected hyperparameter combination, evaluate its performance using cross-validation, select the best performing hyperparameter combination based on the cross-validation results, use RF and XGBoost predictions as features, construct a new meta-data set, select linear regression as the meta-learner, train using the meta-data set, and then continuously optimize to obtain the RF-XGBoost machine learning model.

[0026] IV. Model Performance Evaluation Select the coefficient of determination As the evaluation criteria, the calculation formula is as follows: in is the number of data samples, is the true value of COD, is the true average value of COD, is the predicted value of COD.

[0027] RMSE is used as the performance indicator for evaluation. The smaller the RMSE value, the smaller the error between the model prediction and the experimental value, indicating that the model has a stronger prediction ability. The calculation formula is as follows:

[0028] in is the number of data samples, is the true value of COD, is the predicted value of COD.

[0029] To further verify the accuracy of the model, RF, XGBoost, and RF-XGBoost were used to perform predictions. The results are shown in the figure below. Figure 2-4 The performance evaluation results of the three models are shown in Table 1: Table 1 Evaluation results of different models By comparing the RF model, XGBoost model and RF-XGBoost model and , among which RF-XGBoost model has the best prediction effect.

[0030] 5. Model Adaptive Feedback Optimization 5.1. Each time the model makes a prediction, it is necessary to calculate the difference between the predicted value and the actual measured value. The RMSE error metric is used to evaluate the prediction quality of the model and determine whether the model needs to be adjusted.

[0031] 5.2. Define an error threshold. When RMSE exceeds the preset threshold, start SGDRegressor as an incremental learning model to automatically adjust the model parameters.

[0032] 5.2. After each model update, restart the error monitoring to form a circular feedback mechanism.

[0033] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto, and various changes can be made within the knowledge scope of technicians in the relevant technical field without departing from the purpose of the present invention.

Claims

1. A method for predicting COD of leachate from a garbage transfer station, characterized in that: The method comprises the following steps: S1. Collect real-time and historical data of leachate from garbage transfer stations through sensors; S2. Preprocess the collected real-time data and historical data; S3. Based on the composition characteristics of the leachate, feature analysis is performed, and features are further screened and optimized through feature engineering. Feature variables that are strongly correlated with effluent COD in historical data are selected to construct a COD data set. S4. Use nonlinear fitting method to build COD prediction model RF-XGBoost, and use preprocessed historical data to train and optimize the prediction model; S5. Input the preprocessed real-time data into the trained prediction model RF-XGBoost and output the COD prediction value; automatically adjust the model parameters according to the difference between the prediction result and the actual measurement data.

2. The method for predicting COD of leachate from a garbage transfer station according to claim 1, characterized in that: The pre-processing in step S2 comprises the following steps: S21, using formula (1) to scale the data features to the range of [0,1]; (1) In formula (1), x is the original data, is the normalized data, and are the minimum and maximum values ​​of the data set, respectively. 3.S22, detect outliers based on the interquartile range (IQR), calculate the first quartile Q1 and the third quartile Q3 of the data, subtract Q3 from Q1 to get the IQR; or greater than The data are judged as outliers and removed; S23, fill the missing value with the previous or next known value, and smooth the data using the moving average method formula (2); (2) In formula (2) is the smoothed data point, representing the average value in the window, is the window size, that is, the number of consecutive data points to be averaged, is a data point in the original data, representing each value within the window.

4. The method for predicting COD of leachate from a garbage transfer station according to claim 1, characterized in that: Step S3 is specifically as follows: S31, using the Pearson correlation coefficient as a reference to evaluate the correlation between each input characteristic variable and COD, calculating the corresponding value according to formula (3) and sorting and screening the characteristic variables; (3) In formula (3) is the number of data samples, For the input features, For the COD of leachate from garbage transfer stations, and are the corresponding average values; S32. Construct a COD data set using the screened characteristic variables.

5. The method for predicting COD of leachate from a garbage transfer station according to claim 3, characterized in that: The screened characteristic variables include influent pH value, influent COD concentration, influent C / N ratio, influent C / P ratio, and DO.

6. The method for predicting COD of leachate from a garbage transfer station according to claim 1, characterized in that: Step S4 is specifically as follows: S41. Use nonlinear fitting method to build RF model and XGBoost model; S42. Cross-validate the data set obtained in S32 and divide it into k subsets. Use one of the subsets as the validation set each time and the remaining k-1 subsets as the training set. Repeat k times, selecting a different subset as the validation set each time. Train each set of randomly selected hyperparameter combinations and evaluate their performance using cross-validation. Based on the results of cross-validation, select the best performing hyperparameter combination. Use the predictions of the RF model and the XGBoost model as features to construct a new meta-data set. Select linear regression as the meta-learner. Use the meta-data set for training and optimization to obtain the RF-XGBoost model.

7. The method for predicting COD of leachate from a garbage transfer station according to claim 1, characterized in that: Step S5 is specifically as follows: input the preprocessed real-time data into the RF-XGBoost model, output the COD prediction value in real time, and use SGDRegressor as an incremental learning model to automatically adjust the model parameters according to the difference between the prediction results and the actual measurement data. When the model has a large prediction error during continuous operation, the random search method is used to tune the hyperparameters, and the hyperparameter configuration of the model is updated according to the search results. After each model update, the error is monitored again to form a circular feedback mechanism.

8. A system for predicting COD of leachate from a garbage transfer station for implementing the method according to any one of claims 1 to 6, characterized in that: include: Data acquisition module, used to obtain relevant water quality parameters of leachate from garbage transfer stations; The data preprocessing module is used to preprocess the data of the water quality parameters related to the leachate of the garbage transfer station, including abnormal data removal, missing value filling, standardization processing, etc. Feature selection module, used to perform feature analysis on water quality parameters related to leachate from garbage transfer stations and select feature variables that are strongly correlated with COD values; The COD prediction module uses the trained, verified and tested RF-XGBoost model to predict COD; The feedback optimization module automatically adjusts the model parameters according to the difference between the predicted value and the actual value.

9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method according to any one of claims 1 to 6.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Credit default prediction method and system based on optimized Boruta and XGBoost

    CN113744042A

  • Intelligent coagulation algorithm based on edge-cloud collaboration and double increments

    CN113778028A

  • Sewage COD (Chemical Oxygen Demand) effluent concentration prediction method based on self-adaptive fuzzy neural inference system

    CN115358145A

  • Method for deducing optimal characteristic scheme of water quality model

    CN116401962A

  • Method, system, equipment and medium for predicting aeration rate of sewage treatment biochemical pool

    CN116681174A