A method for predicting and optimizing carbon emission of water quality in a drinking water treatment plant
Patent Information
- Application Number
- CN202611339293.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]为了解决现有技术中难以同时预测饮用水处理厂关键产水水质指标与吨水碳排放强度,并据此协同优化运行参数的问题,本发明提出了以下方案:
通过以单个有效运行日为核算周期,采用排放因子法核算外购电力、药剂、燃料以及脱水污泥运输和终端处置产生的碳排放量,并结合实际处理水量计算吨水碳排放强度,使碳排放数据能够与饮用水处理厂的日常运行数据对应,从而为吨水碳排放强度预测及水质碳排协同优化提供数据基础。
Smart Images

Figure CN123014334A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of drinking water treatment technology, specifically relating to a method for synergistic prediction and optimization of carbon emissions from drinking water treatment plants. Background Technology
[0002] Drinking water treatment plants typically remove turbidity, natural organic matter, ammonia nitrogen, and pathogenic microorganisms from raw water through processes such as mixing, flocculation, sedimentation, filtration, and disinfection. These processes require continuous consumption of resources such as electricity, coagulants, oxidants, and disinfectants. The setting of operating parameters not only affects the quality of the produced water but also influences reagent consumption, energy consumption, and corresponding carbon emissions. Therefore, rationally adjusting operating parameters while ensuring the quality of the produced water is a crucial aspect of drinking water treatment plant operation and management.
[0003] Currently, most drinking water treatment plants adjust chemical dosage, filter rate, backwashing intensity, and pump operating frequency based on human experience, historical operating patterns, or conventional feedback control methods. With the accumulation of operational data, technical solutions have emerged that utilize machine learning models to predict permeate turbidity, chemical dosage, or operating energy consumption. Some solutions also identify key influencing factors through feature contribution analysis or perform time-series matching of raw water data, operating parameters, and permeate water quality data based on hydraulic retention time to improve prediction results.
[0004] However, there are complex nonlinear relationships between raw water characteristics, operating parameters, and multiple product water quality indicators, and changes in raw water and operating parameters only reflect in product water quality after passing through multiple process units. Existing methods mostly focus on the independent prediction of single water quality indicators, single type of reagent dosage, or operating energy consumption, making it difficult to simultaneously obtain prediction results for multiple key product water quality indicators and carbon emission intensity per ton of water. They also lack technical means to screen variables to be optimized based on the contribution of operating parameters in different prediction models and to synergistically optimize multiple operating parameters under current raw water conditions.
[0005] Therefore, it is necessary to establish a predictive relationship between raw water characteristics and operating parameters and key product water quality indicators and carbon emission intensity per ton of water. By combining the contribution of operating parameters to different prediction targets, the variables to be optimized can be determined, and the prediction results can be used to evaluate and iteratively optimize candidate combinations of operating parameters, thereby providing a basis for adjusting the operating parameters of drinking water treatment plants. Summary of the Invention
[0006] To address the challenge of simultaneously predicting key water quality indicators and carbon emission intensity per ton of water from drinking water treatment plants in existing technologies, and to synergistically optimize operating parameters accordingly, this invention proposes the following solution: A method for synergistic prediction of carbon emissions from drinking water treatment plants includes: S1. Using a single effective operating day as the accounting cycle, the emission factor method is adopted to calculate the carbon emission intensity per ton of water based on the carbon emissions generated from purchased electricity, chemicals, fuel, and the transportation and terminal disposal of dewatered sludge, as well as the actual treated water volume. S2. Obtain the raw water characteristics, operating parameters, key product water quality indicators and carbon emission intensity per ton of water under long-term operation of the drinking water treatment plant, perform data preprocessing, and construct a training dataset. S3. Determine the corresponding time lag for each key product water quality indicator, and perform time-series matching between raw water characteristics and operating parameters and key product water quality indicators based on the time lag to construct water quality prediction training data after time lag correction. S4. Using the raw water characteristics and operating parameters as inputs, and the key product water quality indicators and carbon emission intensity per ton of water as outputs, train multiple candidate prediction models corresponding to the key product water quality indicators using the time-delay corrected water quality prediction training data, and train multiple candidate prediction models corresponding to the carbon emission intensity per ton of water using the uncorrected training data, and determine the prediction models for the key product water quality indicators and the carbon emission intensity per ton of water based on the prediction performance. S5. Input the raw water characteristics and operating parameters of the day to be predicted into the key product water quality index prediction model and the carbon emission intensity per ton of water prediction model, respectively, to obtain the predicted values of the key product water quality index and the predicted values of the carbon emission intensity per ton of water.
[0007] Furthermore, in S1, the carbon emissions of purchased electricity, chemicals, fuel, and the transportation and final disposal of dewatered sludge are determined based on the corresponding activity data and emission factors. The sum of the various carbon emissions is divided by the actual amount of water treated on the day to obtain the carbon emission intensity per ton of water. The electricity used for sludge thickening and dewatering equipment in the plant is included in the carbon emissions of purchased electricity.
[0008] Furthermore, in S2, the raw water characteristics include daily treated water volume, water temperature, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254; the operating parameters include coagulant dosage, oxidant dosage, disinfectant dosage, filter filtration rate, backwashing intensity, and pump operating frequency; the key product water quality indicators include product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption.
[0009] Furthermore, in S3, the candidate prediction models include LASSO, DT, RF, SVM, LGBM, and XGBoost models; they are trained using five-fold cross-validation and Bayesian hyperparameter optimization, and the prediction model is determined based on the coefficient of determination, mean absolute error, and root mean square error.
[0010] Furthermore, S3 describes determining the corresponding time lag for each key product water quality indicator, which includes: calculating and accumulating the hydraulic retention time based on the effective volume and average daily influent flow of each process unit to obtain the theoretical response time; for each key product water quality indicator, using the theoretical response time as the initial value of the candidate time lag, adjusting the candidate time lag according to the minimum time interval of the monitoring data within a 24-hour window, performing time-series matching, model training, and prediction error calculation on the data corresponding to each candidate time lag, and determining the candidate time lag with the smallest prediction error as the optimal time lag.
[0011] Furthermore, the construction of time-lag corrected water quality prediction training data as described in S3 includes: matching the raw water characteristics and operating parameters at the corresponding time with the key produced water quality indicators at the current time according to the optimal time lag of each key produced water quality indicator, and constructing time-lag corrected water quality prediction training data; the training data of the carbon emission intensity prediction model per ton of water is not subject to the aforementioned time-lag correction.
[0012] A method for synergistic optimization of water quality and carbon emissions in drinking water treatment plants includes: S1. Obtain the current raw water characteristics, actual operating parameters of the day, historical operating data, prediction models for key product water quality indicators and prediction models for carbon emission intensity per ton of water. Both prediction models take the raw water characteristics and operating parameters as inputs and output the key product water quality indicators and carbon emission intensity per ton of water, respectively. S2. Perform Shapley additive interpretation (SHAP) analysis on the adjustable operating parameters that serve as inputs to the two types of prediction models. Determine the variables to be optimized based on the contribution of each operating parameter to the output of each prediction model. Use the current raw water characteristics as fixed variables and determine the search range of each variable to be optimized based on historical operating data. S3. Construct a Bayesian optimization objective function based on key water quality indicators and carbon emission intensity per ton of water. S4. Using the actual operating parameters of the day as initial values, generate candidate combinations of operating parameters within the search range; S5. Input the current raw water characteristics and candidate operating parameters into two types of prediction models to obtain the corresponding predicted values of key water quality indicators and carbon emission intensity per ton of water, and calculate the objective function value. S6. Update the Bayesian optimization model based on the objective function value, repeatedly generate and evaluate candidate combinations of operating parameters until the termination condition is met, and output the daily optimal operating parameters corresponding to the minimum objective function value.
[0013] Furthermore, in S3, the water quality control limits of each key water quality indicator and the historical maximum carbon emission intensity per ton of water after removing outliers are normalized, and the objective function is obtained by weighted summation of the normalization results; each weight coefficient is non-negative and the sum is 1, and is determined through sensitivity analysis.
[0014] Furthermore, in S2, all adjustable operating parameters corresponding to each prediction model are sorted according to the mean absolute SHAP value. The top six adjustable operating parameters are selected from the sorting results corresponding to each prediction model. The number of times each operating parameter is selected is counted, and the six with the most selections are selected as variables to be optimized. All six variables to be optimized participate in each Bayesian optimization. The six variables to be optimized are coagulant dosage, oxidant dosage, disinfectant dosage, filter rate, backwash intensity, and pump operating frequency. Their search range is the extreme value range in the historical operating data.
[0015] Furthermore, based on the first and third quartiles of the daily optimal values of each operating parameter within the operating cycle, the optimal operating parameter range for the corresponding operating parameter is determined.
[0016] Compared with the prior art, the present invention has the following beneficial effects: By using a single effective operating day as the accounting cycle, the carbon emissions generated by purchased electricity, chemicals, fuel, and the transportation and final disposal of dewatered sludge are calculated using the emission factor method. Combined with the actual treated water volume, the carbon emission intensity per ton of water is calculated, so that the carbon emission data can correspond with the daily operating data of the drinking water treatment plant, thereby providing a data foundation for predicting the carbon emission intensity per ton of water and optimizing the synergistic effect of water quality and carbon emissions.
[0017] By using raw water characteristics and operating parameters as inputs, and key product water quality indicators and carbon emission intensity per ton of water as outputs, corresponding prediction models are trained and selected. This allows the nonlinear relationship between raw water characteristics, operating parameters, product water quality, and carbon emissions to be characterized, thereby obtaining predicted values for key product water quality indicators and carbon emission intensity per ton of water for the predicted date. By determining the optimal time lag for different key product water quality indicators based on hydraulic retention time and model prediction errors, and performing time-series matching on the water quality prediction training data, the impact of input-output data misalignment caused by process transmission delays on water quality prediction can be reduced.
[0018] By performing SHAP analysis on the adjustable operating parameters in the prediction models for key permeable water quality indicators and carbon emission intensity per ton of water, variables to be optimized were selected based on the contribution of each operating parameter in different prediction models. Current raw water characteristics were used as fixed variables, allowing the optimization of operating parameters to consider the combined effects of current raw water conditions and different prediction objectives. Candidate combinations of operating parameters were generated using a Bayesian optimization algorithm. The corresponding key permeable water quality indicators, carbon emission intensity per ton of water, and objective function values were calculated using the two prediction models. Iterative updates based on the objective function values yielded daily optimal operating parameters and further established optimal operating parameter ranges, thus providing a basis for adjusting the operating parameters of drinking water treatment plants.
[0019] This invention features synergistic prediction of water quality and carbon emission intensity per ton of water, contribution analysis of operating parameters, and iterative optimization of candidate operating parameters. It can determine the optimal operating parameters and optimal operating parameter range for each day under the current raw water conditions, and is applicable to water quality prediction, carbon emission intensity prediction, and operating parameter optimization in municipal drinking water treatment plants. Attached Figure Description
[0020] Figure 1 This is a flowchart of the water quality carbon emission co-prediction method for drinking water treatment plants as described in the implementation method; Figure 2 This is a process flow diagram of a drinking water treatment plant as described in the implementation method; Figure 3 This is a dynamic prediction result diagram of the key water quality indicators and carbon emission intensity per ton of water described in the implementation method; Figure 4 This is a flowchart of the method for synergistic optimization of water quality and carbon emissions in drinking water treatment plants as described in the implementation method; Figure 5 This is a comparison chart of the operating parameters before and after optimization as described in the implementation method; Figure 6 This is a comparison chart of the key water quality indicators and carbon emission intensity per ton of water before and after optimization as described in the implementation method. Figure 7 This is a flowchart of the water quality prediction data time lag correction as described in the implementation method. Detailed Implementation
[0021] The technical solutions in the embodiments of the present invention will now be clearly and completely described in conjunction with the accompanying drawings.
[0022] Implementation Method 1 like Figure 1 As shown, a method for synergistic prediction of carbon emissions from drinking water treatment plants includes: S1. Using a single effective operating day as the accounting cycle, the emission factor method is adopted to calculate the carbon emission intensity per ton of water based on the carbon emissions generated from purchased electricity, chemicals, fuel, and the transportation and terminal disposal of dewatered sludge, as well as the actual treated water volume. S2. Obtain the raw water characteristics, operating parameters, key product water quality indicators and carbon emission intensity per ton of water under long-term operation of the drinking water treatment plant, perform data preprocessing, and construct a training dataset. Preferably, the data preprocessing includes identifying and removing outliers using Tukey's rule based on interquartile range, imputing missing values according to variable category and normality test results, and performing data standardization; wherein, categorical variables are imputed using the mode, normally distributed continuous variables are imputed using the mean, and non-normally distributed continuous variables are imputed using the median, and data standardization uses the Z-score method.
[0023] S3. Determine the corresponding time lag for each key product water quality indicator, and perform time-series matching between raw water characteristics and operating parameters and key product water quality indicators based on the time lag to construct water quality prediction training data after time lag correction. S4. Using the raw water characteristics and operating parameters as inputs, and the key product water quality indicators and carbon emission intensity per ton of water as outputs, train multiple candidate prediction models corresponding to the key product water quality indicators using the time-delay corrected water quality prediction training data, and train multiple candidate prediction models corresponding to the carbon emission intensity per ton of water using the uncorrected training data, and determine the prediction models for the key product water quality indicators and the carbon emission intensity per ton of water based on the prediction performance. S5. Input the raw water characteristics and operating parameters of the day to be predicted into the key product water quality index prediction model and the carbon emission intensity per ton of water prediction model, respectively, to obtain the predicted values of the key product water quality index and the predicted values of the carbon emission intensity per ton of water.
[0024] By using raw water characteristics and operating parameters as common inputs, prediction models for key product water quality indicators and carbon emission intensity per ton of water are established respectively. This allows the two types of prediction targets to be calculated separately under the same operating conditions, thereby obtaining water quality prediction results and carbon emission intensity prediction results corresponding to the operating status of the day to be predicted.
[0025] Furthermore, in S1, the carbon emissions of purchased electricity, chemicals, fuel, and the transportation and final disposal of dewatered sludge are determined based on the corresponding activity data and emission factors. The sum of the various carbon emissions is divided by the actual amount of water treated on the day to obtain the carbon emission intensity per ton of water. The electricity used for sludge thickening and dewatering equipment in the plant is included in the carbon emissions of purchased electricity.
[0026] By separately determining the activity data and emission factors corresponding to various carbon emission activities, and uniformly including the electricity consumption of the plant's sludge thickening and dewatering equipment in the carbon emissions of purchased electricity, the various carbon emissions can be summarized according to a unified accounting cycle, thereby avoiding the duplication of the plant's equipment electricity consumption in different accounting stages.
[0027] Furthermore, in S2, the raw water characteristics include daily treated water volume, water temperature, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254; the operating parameters include coagulant dosage, oxidant dosage, disinfectant dosage, filter filtration rate, backwashing intensity, and pump operating frequency; the key product water quality indicators include product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption.
[0028] By separately determining the specific data composition of raw water characteristics, adjustable operating parameters, and key product water quality indicators, the training data can cover raw water conditions, treatment processes, and product water results, thereby providing a data foundation for establishing the correspondence between each input variable and different prediction targets.
[0029] Furthermore, in S3, the candidate prediction models include LASSO, DT, RF, SVM, LGBM, and XGBoost models; they are trained using five-fold cross-validation and Bayesian hyperparameter optimization, and the prediction model is determined based on the coefficient of determination, mean absolute error, and root mean square error.
[0030] By performing five-fold cross-validation and Bayesian hyperparameter optimization on multiple candidate prediction models, and by evaluating prediction performance using the coefficient of determination, mean absolute error, and root mean square error, the prediction models that are appropriate to the data relationship can be selected for key water quality indicators and carbon emission intensity per ton of water, thereby reducing the limitation of using a single model for prediction results.
[0031] Furthermore, S3 describes determining the corresponding time lag for each key product water quality indicator, which includes: calculating and accumulating the hydraulic retention time based on the effective volume and average daily influent flow of each process unit to obtain the theoretical response time; for each key product water quality indicator, using the theoretical response time as the initial value of the candidate time lag, adjusting the candidate time lag according to the minimum time interval of the monitoring data within a 24-hour window, performing time-series matching, model training, and prediction error calculation on the data corresponding to each candidate time lag, and determining the candidate time lag with the smallest prediction error as the optimal time lag.
[0032] By determining the initial value of the candidate time lag based on the cumulative hydraulic residence time of each process unit, and then gradually searching within a preset time window based on the model prediction error, different key product water quality indicators can obtain the optimal time lag corresponding to their response processes, thereby improving the correspondence between the time lag determination and the actual treatment process.
[0033] Furthermore, the construction of time-lag corrected water quality prediction training data as described in S3 includes: matching the raw water characteristics and operating parameters at the corresponding time with the key produced water quality indicators at the current time according to the optimal time lag of each key produced water quality indicator, and constructing time-lag corrected water quality prediction training data; the training data of the carbon emission intensity prediction model per ton of water is not subject to the aforementioned time-lag correction.
[0034] By rematching raw water characteristics, operating parameters, and water quality indicators according to the optimal time lag of each key water quality indicator, the water quality prediction training data can reflect the delayed response of raw water and operating parameters after the treatment process; at the same time, no time lag correction is applied to the carbon emission intensity prediction data per ton of water, so that the two types of prediction data are constructed according to their respective data correspondence.
[0035] A method for synergistic optimization of water quality and carbon emissions in drinking water treatment plants includes: S1. Obtain the current raw water characteristics, actual operating parameters of the day, historical operating data, prediction models for key product water quality indicators and prediction models for carbon emission intensity per ton of water. Both prediction models take the raw water characteristics and operating parameters as inputs and output the key product water quality indicators and carbon emission intensity per ton of water, respectively. S2. Perform Shapley additive interpretation (SHAP) analysis on the adjustable operating parameters that serve as inputs to the two types of prediction models. Determine the variables to be optimized based on the contribution of each operating parameter to the output of each prediction model. Use the current raw water characteristics as fixed variables and determine the search range of each variable to be optimized based on historical operating data. Preferably, the SHAP analysis includes global contribution analysis based on average absolute SHAP value, classification mapping contribution analysis, and marginal effect analysis based on SHAP dependency graph.
[0036] S3. Construct a Bayesian optimization objective function based on key water quality indicators and carbon emission intensity per ton of water. S4. Using the actual operating parameters of the day as initial values, generate candidate combinations of operating parameters within the search range; S5. Input the current raw water characteristics and candidate operating parameters into two types of prediction models to obtain the corresponding predicted values of key water quality indicators and carbon emission intensity per ton of water, and calculate the objective function value. S6. Update the Bayesian optimization model based on the objective function value, repeatedly generate and evaluate candidate combinations of operating parameters until the termination condition is met, and output the daily optimal operating parameters corresponding to the minimum objective function value.
[0037] By determining the variables to be optimized based on the contribution of operating parameters in multiple prediction models, and generating and evaluating candidate combinations of operating parameters under the condition of fixed current raw water characteristics, the candidate operating parameters can be simultaneously evaluated by the prediction of key product water quality indicators and carbon emission intensity per ton of water, thereby obtaining the daily optimal operating parameters corresponding to the current raw water conditions.
[0038] Furthermore, in S3, the water quality control limits of each key water quality indicator and the historical maximum carbon emission intensity per ton of water after removing outliers are normalized, and the objective function is obtained by weighted summation of the normalization results; each weight coefficient is non-negative and the sum is 1, and is determined through sensitivity analysis.
[0039] By normalizing the prediction results of different dimensions using water quality control limits and the historical maximum carbon emission intensity per ton of water after removing outliers, and then using weighted summation with weighting coefficients, key water quality indicators and carbon emission intensity per ton of water can participate in the evaluation of candidate operating parameters in the same objective function.
[0040] Furthermore, in S2, all adjustable operating parameters corresponding to each prediction model are sorted according to the mean absolute SHAP value. The top six adjustable operating parameters are selected from the sorting results corresponding to each prediction model. The number of times each operating parameter is selected is counted, and the six with the most selections are selected as variables to be optimized. All six variables to be optimized participate in each Bayesian optimization. The six variables to be optimized are coagulant dosage, oxidant dosage, disinfectant dosage, filter rate, backwash intensity, and pump operating frequency. Their search range is the extreme value range in the historical operating data.
[0041] By selecting the top six operating parameters with the highest average absolute SHAP values in each prediction model, and determining six variables to be optimized based on the number of times each operating parameter is selected in different prediction models, the selected operating parameters can reflect their comprehensive contribution to multiple water quality prediction targets and carbon emission intensity per ton of water, thereby reducing the one-sidedness caused by selecting optimization variables based solely on a single prediction indicator.
[0042] Furthermore, based on the first and third quartiles of the daily optimal values of each operating parameter within the operating cycle, the optimal operating parameter range for the corresponding operating parameter is determined.
[0043] By performing quartile statistics on the daily optimal values of each operating parameter within the operating cycle, the daily optimization results can be further transformed into interval results for the corresponding operating parameters, thereby providing a continuous range for setting operating parameters on different dates.
[0044] Implementation Method 2 This implementation method uses the process of co-prediction of water quality and carbon emissions and optimization of operating parameters of a conventional drinking water treatment plant as a specific example to illustrate the process of calculating carbon emission intensity per ton of water, data preprocessing, time delay correction, prediction model training, contribution analysis of operating parameters, Bayesian optimization, and determination of the optimal operating parameter range.
[0045] like Figure 2 As shown, the conventional drinking water treatment plant is designed with a capacity of 100,000 m³ / d. The main process units include water intake and lifting, mixing, flocculation, sedimentation, filtration, disinfection, clear water tank, and sludge treatment unit. The quality of the produced water is controlled in accordance with the "Standards for Drinking Water Quality" (GB5749-2022).
[0046] The accounting period is based on a single effective operating day. Activity data related to purchased electricity, chemicals, fuel, dewatered sludge transportation, and terminal disposal are acquired, and the carbon intensity per ton of water is calculated based on the actual water volume treated that day. The accounting boundary includes purchased electricity, chemicals, and fuel consumed during water intake and lifting, mixing, flocculation, sedimentation, filtration, disinfection, clear water tank operation, and sludge discharge treatment, as well as the transportation and terminal disposal of dewatered sludge after it leaves the plant boundary. Electricity consumed by the plant's sludge thickening and dewatering equipment is included in the carbon emissions from purchased electricity and is not counted repeatedly during the dewatered sludge transportation and terminal disposal stages.
[0047] No. The carbon emissions from Japan's purchased electricity are calculated using the following formula:
[0048] in, For the first Carbon emissions from purchased electricity in Japan, expressed in kgCO2-eq; For the first Daily production electricity consumption, in kWh / d, is obtained from the plant-level main electricity meter or the sub-meters of each process unit; The carbon emission factor for purchased electricity is expressed in kgCO2-eq / kWh. The carbon emission factor for purchased electricity is based on the provincial-level electricity emission factor for the region where the drinking water treatment plant is located in the corresponding year.
[0049] No. The carbon emissions generated from daily pharmaceutical use are calculated using the following formula:
[0050] in, For the first Carbon emissions from daily pharmaceutical use, expressed in kgCO2-eq; The number of drug types included in the accounting; For the first day The actual consumption mass of this type of commercial pharmaceutical agent, expressed in kg / d; For the first The carbon emission factor for this type of pharmaceutical product is expressed in kgCO2-eq / kg. The actual mass of the product consumed is obtained based on changes in the storage tank level, the cumulative flow of the dosing pump, and usage records or purchase inventory records. The carbon emission factor for the product is determined based on data provided by the product supplier or relevant life cycle assessment data.
[0051] No. Carbon emissions from daily fuel use are calculated using the following formula:
[0052] in, For the first Carbon emissions from daily fuel use, expressed in kgCO2-eq; For the type and quantity of fuel; For the first day Consumption of this type of fuel, expressed in L / d or kg / d; For the first The carbon emission factor corresponding to each fuel type is expressed in kgCO2-eq / L or kgCO2-eq / kg. Fuel consumption is obtained from fuel requisition or metering records of standby generators, on-site vehicles, and emergency equipment. The carbon emission factor is determined based on the carbon emission factor data for the corresponding fuel type.
[0053] No. The carbon emissions generated from daily dewatered sludge transportation and terminal disposal are calculated using the following formula:
[0054] in, For the first Carbon emissions from daily dewatered sludge transportation and terminal disposal, expressed in kgCO2-eq; For the first Daily outbound wet sludge mass, in kg / d; The calculated transportation distance from the drinking water treatment plant to the disposal site is expressed in km. The emission factor is for transportation, expressed in kgCO2-eq / (t·km); The final disposal emission factor is expressed in kgCO2-eq / kg. When different disposal pathways exist, the emission factors are calculated separately based on the actual disposal mass of each pathway and then summed. The transportation emission factor and the final disposal emission factor are determined based on the carbon emission factor data corresponding to the respective transportation mode and the final disposal mode.
[0055] No. Daily carbon emission intensity per ton of water is calculated using the following formula:
[0056] in, For the first Daily carbon emission intensity per ton of water, expressed in kgCO2-eq / m³; For the first The actual volume of water entering the drinking water treatment plant and included in production statistics per day is expressed in m³ / d.
[0057] The raw water characteristics, operating parameters, key product water quality indicators, and carbon emission intensity per ton of water of the drinking water treatment plant were obtained for 365 effective operating days. A correspondence between input and output variables was established according to the operating dates. The original operating data included multiple adjustable operating parameters; subsequently, the variables to be optimized were selected based on the comprehensive contribution of these operating parameters in different prediction models.
[0058] The initial raw water characteristics obtained included daily treatment volume, water temperature, color, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254. Correlation analysis was performed on each raw water characteristic. To reduce the impact of multicollinearity among input variables, daily treatment volume, water temperature, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254 were selected as the raw water characteristic input variables for the prediction model.
[0059] Among the 365 samples, the raw water characteristics used as model inputs included daily treatment volume, water temperature, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254. The daily treatment volume was 86122±5797 m³ / d, the water temperature was 15.9±8.2℃, the raw water turbidity was 7.5±7.4 NTU, the pH was 7.8±0.2, the oxygen consumption was 2.47±0.24 mg / L, the ammonia nitrogen concentration was 0.15±0.04 mg / L, and the UV254 was 0.047±0.006 cm⁻¹. - ¹.
[0060] The operating parameters include coagulant dosage, oxidant dosage, disinfectant dosage, filter filtration rate, backwash intensity, pump operating frequency, and other adjustable operating parameters from historical records. Specifically, the coagulant dosage is 17±3.5 mg / L, the oxidant dosage is 1.5±0.3 mg / L, the disinfectant dosage is 2.1±0.36 mg / L, the filter filtration rate is 9.3±0.38 m / h, the backwash intensity is 7.3±0.38 L / (s·m²), and the pump operating frequency is 35±3 Hz.
[0061] Key permeable water quality indicators output by the model include permeable turbidity, total hardness, ammonia nitrogen, and oxygen consumption. The permeable turbidity is 0.30±0.12 NTU, total hardness is 210±27 mg / L, ammonia nitrogen is 0.09±0.02 mg / L, oxygen consumption is 1.90±0.20 mg / L, and carbon emission intensity per ton of water is 0.225±0.018 kgCO2-eq / m³. All input and output variables are presented statistically as mean ± standard deviation.
[0062] Data preprocessing was performed on the raw water characteristics, operating parameters, key product water quality indicators, and carbon emission intensity per ton of water. Outliers were identified and removed using Tukey's rule based on interquartile range. Missing values were imputed based on variable category and normality test results: categorical variables were imputed using the mode, continuous variables conforming to a normal distribution were imputed using the mean, and continuous variables not conforming to a normal distribution were imputed using the median. After outlier and missing value processing, continuous variables were standardized using the Z-score method. When the training data included categorical variables, one-hot encoding was performed on these variables to convert them into numerical features that the prediction model could process.
[0063] Combination Figure 7 Before training the prediction model for key product water quality indicators, time-lag identification is performed on the raw water characteristics, operating parameters, and each key product water quality indicator. The effective volume and average daily influent flow rate of each process unit from the entry of raw water into the treatment system to the product water location are obtained. The hydraulic residence time of each process unit is calculated according to the following formula:
[0064] in, For the first Hydraulic residence time of each process unit; For the first The effective volume of each process unit; The average daily influent flow rate is used for calculations of the drinking water treatment plant, and all process units use the same average daily influent flow rate.
[0065] Based on the process units sequentially traversed from the location of raw water characteristics or operating parameters to the product water location, the hydraulic residence time of the corresponding process units is accumulated to obtain the theoretical response time:
[0066] in, The theoretical response time for the influence of raw water characteristics or operating parameters on key product water quality indicators; This refers to the number of process units involved between the location of the raw water characteristics or operating parameters and the product water location. The theoretical response time of the raw water characteristics is accumulated from the inlet location to the product water location, and the theoretical response time of the operating parameters is accumulated from the corresponding equipment operating location to the product water location.
[0067] For input variables and key water quality indicators Establish the following time lag correspondence:
[0068] in, Indicates time The characteristics of the raw water or its operating parameters at any given time. Indicates time Key water quality indicators at any time This indicates a candidate time lag. The initial theoretical response times for product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption are the same. Then, the optimal time lag corresponding to each key water quality indicator is searched.
[0069] Time-lag searches were performed for permeate turbidity, total hardness, ammonia nitrogen, and oxygen consumption. The theoretical response time was used as the initial value for candidate time lags, and the candidate time lags were changed according to the minimum time interval of the monitoring data within a 24-hour time window. For each candidate time lag, the raw water characteristics and operating parameters at the corresponding time were time-series matched with the corresponding key permeate water quality indicators at the current time to form a candidate time lag dataset. This candidate time lag dataset was then used for model training and prediction error calculation.
[0070] The optimal time lag for each key permeable water quality indicator is determined by the following formula:
[0071] in, For optimal time lag, For candidate time lag The root mean square error of the corresponding prediction model is then determined. The above process is performed separately for product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption, and the corresponding optimal time lag is determined for each.
[0072] Based on the optimal time lags corresponding to turbidity, total hardness, ammonia nitrogen, and oxygen consumption of the permeate water, the raw water characteristics and operating parameters at the corresponding time points are matched with the key permeate water quality indicators at the current time to form time-lag corrected water quality prediction training data. The carbon emission intensity per ton of water is determined by data on daily purchased electricity, chemicals, fuel, dewatered sludge transportation, and terminal disposal activities, as well as the actual treated water volume. The training data for the carbon emission intensity per ton of water prediction model is not subject to the aforementioned time-lag correction.
[0073] The predictive performance of the key product water quality indicator prediction models before and after time-lag correction was evaluated using the coefficient of determination, mean absolute error, and root mean square error, respectively. The key product water quality indicator prediction model trained on time-lag corrected data was then used in conjunction with the carbon emission intensity per ton of water prediction model trained on the corresponding data of the day for subsequent operational parameter optimization.
[0074] Time-lag corrected water quality prediction training data was used to train prediction models for product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption, while uncorrected data was used to train a prediction model for carbon emission intensity per ton of water. Each prediction model used raw water characteristics and operating parameters as inputs and output the corresponding key product water quality indicators or carbon emission intensity per ton of water, respectively.
[0075] The dataset was divided into training and test sets in an 8:2 ratio, and LASSO, DT, RF, SVM, LGBM, and XGBoost models were trained on these sets respectively. Each candidate prediction model was trained using five-fold cross-validation and Bayesian hyperparameter optimization, and the predictive performance was evaluated based on the coefficient of determination, mean absolute error, and root mean square error.
[0076] like Figure 3 As shown, in the dataset of the drinking water treatment plant, the XGBoost model demonstrated superior overall predictive performance for product water turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity per ton of water compared to other candidate models. Therefore, the trained XGBoost model was selected as the corresponding predictive model. The coefficients of determination for the predictive models for product water turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity per ton of water on the test set were 0.78, 0.82, 0.77, 0.80, and 0.76, respectively.
[0077] Combination Figure 3 During the operating cycle, the predicted results of turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity per ton of water showed a consistent trend with the corresponding actual results.
[0078] Based on the five identified XGBoost models, SHAP analysis was performed on the model input variables. For each prediction model, the mean of the absolute SHAP values of each input variable was calculated, and the contribution of each input variable to the corresponding model output was determined according to the mean absolute SHAP value from largest to smallest. The mean absolute SHAP values corresponding to the raw water characteristics and operating parameters were summed separately according to the category to which the input variables belonged, yielding the classification contribution of the two categories of input variables to each prediction target.
[0079] The SHAP values of raw water characteristics and operating parameters are calculated using the same method and contribution scale, which allows for direct comparison of the contribution of each raw water characteristic and operating parameter to the output of the corresponding prediction model.
[0080] The raw water characteristics and operating parameters contributed 85.4% and 14.6% to the predicted turbidity of the product water, respectively; 79.7% and 20.3% to the predicted total hardness, respectively; 89.1% and 10.9% to the predicted ammonia nitrogen, respectively; 85.3% and 14.7% to the predicted oxygen consumption, respectively; and 61.4% and 38.6% to the predicted carbon emission intensity per ton of water, respectively.
[0081] In the process of selecting variables to be optimized, only the controllable operating parameters were ranked. For five prediction models of product water turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity per ton of water, the top six operating parameters with the highest average absolute SHAP value were selected from all controllable operating parameters. Then, the number of times each operating parameter was selected in the five prediction models was counted, and six operating parameters were selected as variables to be optimized according to the number of times they were selected from high to low.
[0082] After screening, the six variables with the highest overall contribution were identified as coagulant dosage, oxidant dosage, disinfectant dosage, filter filtration rate, backwashing intensity, and pump operating frequency. In each subsequent Bayesian optimization, all six variables were included in the optimization process, while the current raw water characteristics remained unchanged.
[0083] like Figure 4 As shown, based on the prediction models for key permeable water quality indicators and carbon emission intensity per ton of water, Bayesian optimization is performed on the six variables to be optimized. The Bayesian optimization objective function is constructed based on the key permeable water quality indicators and carbon emission intensity per ton of water:
[0084] in, Optimize the objective function using Bayesian methods; For the first Predicted values of key water quality indicators for permeable water; For the first Water quality control limits corresponding to key water quality indicators in the production water; The predicted value of carbon emission intensity per ton of water; This represents the historical maximum carbon emission intensity per ton of water after removing outliers. For the first Weighting coefficients for key water quality indicators in the production water; The weighting coefficient for carbon emission intensity per ton of water.
[0085] In this implementation, sensitivity analysis was used to determine the weighting coefficients for per-ton water turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity, which were 0.1, 0.1, 0.2, 0.2, and 0.4, respectively. A Bayesian optimization objective function adapted to the drinking water treatment plant was then constructed.
[0086] in, , , and These are the predicted values for product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption, respectively. , , and These are respectively the provisions of the "Standards for Drinking Water Quality" (GB5749-2022) Water quality control limits corresponding to key water quality indicators in the production water; The predicted value of carbon emission intensity per ton of water; This represents the historical maximum carbon emission intensity per ton of water after removing outliers.
[0087] All weighting coefficients are non-negative, and the sum of the weighting coefficients of the four key permeable water quality indicators and the weighting coefficient of carbon emission intensity per ton of water is 1. The same set of weighting coefficients is used for each operating date. By optimizing 10% of historical monitoring data under different weighting combinations and comparing the key permeable water quality indicators and carbon emission intensity per ton of water corresponding to different weighting combinations, the weighting coefficients in the objective function are determined.
[0088] The search ranges for six variables to be optimized were determined based on the extreme value ranges of historical operating data. Specifically, the search ranges for coagulant dosage were 5–50 mg / L, oxidant dosage were 0–2.5 mg / L, disinfectant dosage were 0.5–4.0 mg / L, filter filtration rate were 6–10 m / h, backwash intensity was 4–8 L / (s·m²), and pump operating frequency were 25–50 Hz.
[0089] Using the actual operating parameters of the day as the initial combination of operating parameters for Bayesian optimization, candidate combinations of operating parameters are generated within the aforementioned search range. Each candidate combination of operating parameters includes the dosage of coagulant, oxidant, and disinfectant, as well as the filter rate, backwash intensity, and pump operating frequency.
[0090] For each candidate combination of operating parameters, the characteristics of the raw water on that day are used as fixed variables and input together with the candidate combination of operating parameters into the prediction model of turbidity, total hardness, ammonia nitrogen, oxygen consumption and carbon emission intensity per ton of water. The predicted values of the four key water quality indicators and the predicted value of carbon emission intensity per ton of water are obtained. Then, each predicted value is substituted into the objective function to calculate the objective function value corresponding to the candidate combination of operating parameters.
[0091] The Bayesian optimization model is updated based on the evaluated candidate combinations of operating parameters and their objective function values. New candidate combinations of operating parameters are then generated using the updated Bayesian optimization model. This process of generating candidate combinations of operating parameters, calculating the prediction model, calculating the objective function value, and updating the Bayesian optimization model is repeated until 200 iterations are completed.
[0092] After the iteration terminates, the objective function values corresponding to all candidate combinations of operating parameters are compared. The combination of operating parameters corresponding to the minimum objective function value is determined as the daily optimal operating parameters for that day, and the corresponding predicted values of per-ton water turbidity, total hardness, ammonia nitrogen, oxygen consumption, and carbon emission intensity are output.
[0093] like Figure 5 As shown, the coagulant dosage before and after optimization during the operating cycle was 17±3.5 mg / L and 24±4.0 mg / L, respectively; the oxidant dosage was 1.5±0.3 mg / L and 0.8±0.18 mg / L, respectively; the disinfectant dosage was 2.1±0.36 mg / L and 1.4±0.24 mg / L, respectively; the filter filtration rate was 9.3±0.38 m / h and 7.5±0.42 m / h, respectively; the backwash intensity was 7.3±0.38 L / (s·m²) and 5.2±0.35 L / (s·m²), respectively; and the pump operating frequency was 35±3 Hz and 37±2.5 Hz, respectively. All operating parameters are statistically expressed as mean ± standard deviation.
[0094] like Figure 6 As shown, after Bayesian optimization, the turbidity of the product water changed from 0.30±0.12 NTU to 0.15±0.06 NTU, the total hardness changed from 210±27 mg / L to 217±31 mg / L, the ammonia nitrogen changed from 0.09±0.02 mg / L to 0.12±0.03 mg / L, the oxygen consumption changed from 1.90±0.20 mg / L to 1.62±0.16 mg / L, and the carbon emission intensity per ton of water changed from 0.225±0.018 kgCO2-eq / m³ to 0.179±0.014 kgCO2-eq / m³. All the optimized key product water quality indicators meet the corresponding water quality control requirements, and the objective function value reaches the minimum value in the optimization process.
[0095] Following the optimization process described above, the daily optimal operating parameters for each date within the operating cycle were obtained. For the coagulant dosage, oxidant dosage, disinfectant dosage, filter rate, backwash intensity, and pump operating frequency, the daily optimal values of each operating parameter were arranged in ascending order, and the first and third quartiles were determined. The interval between the first and third quartiles was then defined as the optimal operating parameter interval for the corresponding operating parameter.
[0096] The embodiments of the present invention have been described above. These embodiments are used to help understand the technical solutions of the present invention and should not be construed as limiting the scope of the technical solutions of the present invention. Equivalent substitutions or conventional modifications made by those skilled in the art to the embodiments without departing from the technical concept of the present invention should all fall within the scope of the technical solutions of the present invention.
Claims
1. A method for synergistic prediction of carbon emissions from drinking water treatment plants, characterized in that, include: S1. Using a single effective operating day as the accounting cycle, the emission factor method is adopted to calculate the carbon emission intensity per ton of water based on the carbon emissions generated from purchased electricity, chemicals, fuel, and the transportation and terminal disposal of dewatered sludge, as well as the actual treated water volume. S2. Obtain the raw water characteristics, operating parameters, key product water quality indicators and carbon emission intensity per ton of water under long-term operation of the drinking water treatment plant, perform data preprocessing, and construct a training dataset. S3. Determine the corresponding time lag for each key product water quality indicator, and perform time-series matching between raw water characteristics and operating parameters and key product water quality indicators based on the time lag to construct water quality prediction training data after time lag correction. S4. Using the raw water characteristics and operating parameters as inputs, and the key product water quality indicators and carbon emission intensity per ton of water as outputs, train multiple candidate prediction models corresponding to the key product water quality indicators using the time-delay corrected water quality prediction training data, and train multiple candidate prediction models corresponding to the carbon emission intensity per ton of water using the uncorrected training data, and determine the prediction models for the key product water quality indicators and the carbon emission intensity per ton of water based on the prediction performance. S5. Input the raw water characteristics and operating parameters of the day to be predicted into the key product water quality index prediction model and the carbon emission intensity per ton of water prediction model, respectively, to obtain the predicted values of the key product water quality index and the predicted values of the carbon emission intensity per ton of water.
2. The method according to claim 1, characterized in that, In S1, the carbon emissions of purchased electricity, chemicals, fuel, and the transportation and final disposal of dewatered sludge are determined based on the corresponding activity data and emission factors. The sum of the various carbon emissions is divided by the actual amount of water treated on the day to obtain the carbon emission intensity per ton of water. The electricity used for sludge thickening and dewatering equipment in the plant is included in the carbon emissions of purchased electricity.
3. The method according to claim 1, characterized in that, In S2, the raw water characteristics include daily treatment volume, water temperature, raw water turbidity, pH, oxygen consumption, ammonia nitrogen concentration, and UV254; the operating parameters include coagulant dosage, oxidant dosage, disinfectant dosage, filter filtration rate, backwashing intensity, and pump operating frequency; the key product water quality indicators include product water turbidity, total hardness, ammonia nitrogen, and oxygen consumption.
4. The method according to claim 3, characterized in that, In S3, the candidate prediction models include LASSO, DT, RF, SVM, LGBM, and XGBoost models; they are trained using five-fold cross-validation and Bayesian hyperparameter optimization, and the prediction model is determined based on the coefficient of determination, mean absolute error, and root mean square error.
5. The method according to claim 1, characterized in that, S3 describes determining the corresponding time lag for each key product water quality indicator, including: calculating and accumulating the hydraulic retention time based on the effective volume and average daily influent flow of each process unit to obtain the theoretical response time; for each key product water quality indicator, using the theoretical response time as the initial value of the candidate time lag, adjusting the candidate time lag according to the minimum time interval of the monitoring data within a 24-hour window, performing time-series matching, model training, and prediction error calculation on the data corresponding to each candidate time lag, and determining the candidate time lag with the smallest prediction error as the optimal time lag.
6. The method according to claim 5, characterized in that, The construction of time-lag corrected water quality prediction training data as described in S3 includes: matching the raw water characteristics and operating parameters at the corresponding time with the key produced water quality indicators at the current time according to the optimal time lag of each key produced water quality indicator, and constructing time-lag corrected water quality prediction training data; the training data of the carbon emission intensity prediction model per ton of water is not subject to the time-lag correction.
7. A method for synergistic optimization of water quality and carbon emissions in drinking water treatment plants, characterized in that, include: S1. Obtain the current raw water characteristics, actual operating parameters of the day, historical operating data, prediction models for key product water quality indicators and prediction models for carbon emission intensity per ton of water. Both prediction models take the raw water characteristics and operating parameters as inputs and output the key product water quality indicators and carbon emission intensity per ton of water, respectively. S2. Perform Shapley additive interpretation (SHAP) analysis on the adjustable operating parameters that serve as inputs to the two types of prediction models. Determine the variables to be optimized based on the contribution of each operating parameter to the output of each prediction model. Use the current raw water characteristics as fixed variables and determine the search range of each variable to be optimized based on historical operating data. S3. Construct a Bayesian optimization objective function based on key water quality indicators and carbon emission intensity per ton of water. S4. Using the actual operating parameters of the day as initial values, generate candidate combinations of operating parameters within the search range; S5. Input the current raw water characteristics and candidate operating parameters into two types of prediction models to obtain the corresponding predicted values of key water quality indicators and carbon emission intensity per ton of water, and calculate the objective function value. S6. Update the Bayesian optimization model based on the objective function value, repeatedly generate and evaluate candidate combinations of operating parameters until the termination condition is met, and output the daily optimal operating parameters corresponding to the minimum objective function value.
8. The method according to claim 7, characterized in that, In S3, the water quality control limits of each key water quality indicator and the historical maximum carbon emission intensity per ton of water after removing outliers are normalized, and the objective function is obtained by weighted summation of the normalization results; each weight coefficient is non-negative and the sum is 1, and is determined through sensitivity analysis.
9. The method according to claim 7, characterized in that, In S2, all adjustable operating parameters corresponding to each prediction model are sorted according to the mean absolute SHAP value. The top six adjustable operating parameters are selected from the sorting results corresponding to each prediction model. The number of times each operating parameter is selected is counted, and the six items with the most selections are selected as variables to be optimized. All six variables to be optimized participate in each Bayesian optimization. The six variables to be optimized are coagulant dosage, oxidant dosage, disinfectant dosage, filter rate, backwash intensity, and pump operating frequency. The search range is the extreme value range in the historical operating data.
10. The method according to claim 9, characterized in that, The optimal operating parameter range for each operating parameter is determined based on the first and third quartiles of the daily optimal values of each operating parameter within the operating cycle.