Intelligent dosing method and device for chemical phosphorus removal of sewage plant

By constructing a dosing model based on historical data and combining feedback regulation and self-supervised learning methods, the precise control of drug dosage in the chemical phosphorus removal process in the sewage plant is achieved, the problem of overuse of drugs is solved, and the goal of maximizing phosphorus removal effect and cost saving is achieved.

CN120143761APending Publication Date: 2025-06-13PANDA SMART WATER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510262916.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

It is difficult for existing sewage plants to accurately control the dosage of drugs during chemical phosphorus removal, resulting in overuse of drugs, wasting resources and increasing treatment costs.

Method used

By using the historical data of all operating indicators of sewage plants in chemical phosphorus removal, the dosage model is constructed, combined with feedback regulation and self-supervised learning, the dosage dosage is predicted in real time, and the operation plan is formulated through the dosage pump control method to achieve precise control.

Benefits of technology

Maximize the phosphorus removal effect, while saving agents, reducing costs, and reducing environmental emissions and pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120143761A_ABST
    Figure CN120143761A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent dosing method and device for chemical phosphorus removal of a sewage plant, and the method comprises the steps: building a dosing model through the historical data of all operation indexes of the sewage plant in the chemical phosphorus removal process; selecting feedback indexes needing feedback adjustment from the operation indexes, and establishing a target feedback rule based on the feedback indexes; according to the time delay coefficient of the modeling index, dividing the data of the modeling index into an advanced class, a real-time class and a lagging class, extracting the data of the modeling index according to a division result, inputting the extracted data into a dosing model, and obtaining a real-time predicted dosing amount in combination with a target feedback rule; and formulating an operation scheme of the dosing pump according to the obtained real-time predicted dosing amount in combination with a dosing pump control mode, and performing real-time control on the dosing pump based on the operation scheme. According to the method, the purposes of saving chemicals and reducing the cost can be achieved while the phosphorus removal effect is ensured to be maximized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewage treatment plants, and particularly to an intelligent chemical phosphorus removal dosing method and device for sewage treatment plants. Background Art

[0002] In the industrial wastewater treated by sewage treatment plants, it has the characteristics of high chemical oxygen demand (COD), low pH value, high content of suspended solids (SS), high sulfur concentration, high ammonia nitrogen concentration, and high phosphorus concentration. Among them, phosphorus mainly exists in the forms of orthophosphate, polyphosphate, and organic phosphorus. Total phosphorus (TP) refers to the result measured after various forms of phosphorus in the water sample are converted into orthophosphate after digestion. In order to achieve the standard of total phosphorus TP in the effluent of high-phosphorus wastewater, most sewage treatment plants will adopt chemical phosphorus removal methods to assist biological phosphorus removal. During the biological treatment process, most organic combined phosphorus can also be converted into orthophosphate. The main method for removing orthophosphate in sewage is chemical phosphorus removal. Therefore, chemical phosphorus removal is the key to achieving the standard of TP in the effluent of wastewater.

[0003] Chemical phosphorus removal refers to a method of adding chemical agents to react with phosphate to form insoluble complexes (precipitates, oligomers, etc.), and removing phosphate by means of the surface adsorption effect (bridging effect, surface electrostatic effect, etc.) of the complexes. In recent years, it has been found that insufficient sewage alkalinity will also lead to non-compliance of the effluent. The dosing amount of chemical phosphorus removal agents is directly affected by the sewage alkalinity, but the influence of phosphate concentration is not significant. Therefore, the regulation of alkalinity is also very important during the chemical phosphorus removal process of sewage. At present, less attention has been paid to the alkalinity during the sewage treatment process, and the influence mechanism of alkalinity on chemical phosphorus removal is not yet clear.

[0004] Most existing sewage treatment plants still adopt the manual dosing method. Since manual dosing mostly relies on manual judgment, it is difficult for manual judgment experience to accurately predict the required dosing amount under different water quality conditions in real time, and it is difficult to accurately control the dosing amount of the agent. However, in order to ensure the compliance of the effluent quality, it is easy to cause excessive use of the agent. Excessive agents not only waste resources but also may increase the subsequent treatment cost. Especially when the precipitate generated after phosphorus removal needs to be treated, excessive agents may also affect the treatment efficiency of the sedimentation tank.

[0005] In addition, some sewage treatment plants adopt the method of automatically calculating the chemical dosage using empirical formulas, and control the operation of the chemical dosing equipment based on the theoretical values calculated by the empirical formulas. The empirical formulas will refer to actual data, such as the instantaneous influent flow rate, influent TP, etc. However, it only considers the current real-time state and cannot take into account the overall situation over a period of time. Additionally, some parameters in the empirical formulas are manually set and need to be manually maintained, or directly participate in the calculation in the form of theoretical constant fixed values, ignoring the changes in some actual water quality parameters. Therefore, it cannot make real-time adjustments to these changes, resulting in excessive or insufficient chemical dosage. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide an intelligent chemical dosing method and device for chemical phosphorus removal in sewage treatment plants, which can ensure the maximization of phosphorus removal effect while achieving the goals of saving chemicals and reducing costs.

[0007] The technical solution adopted by the present invention to solve its technical problems is: to provide an intelligent chemical dosing method for chemical phosphorus removal in sewage treatment plants, including the following steps:

[0008] Construct a dosing model using the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant;

[0009] Select feedback indicators that need to be feedback-regulated from the operating indicators, and establish a target feedback rule based on the feedback indicators;

[0010] According to the time-delay coefficient of the modeling indicators, divide the data of the modeling indicators into leading class, real-time class, and lagging class, extract the data of the modeling indicators according to the division results, input the extracted data into the dosing model, and combine with the target feedback rule to obtain the real-time predicted chemical dosage; where the modeling indicators are the top N operating indicators selected from the operating indicators with high correlation with the chemical dosage for phosphorus removal.

[0011] According to the obtained real-time predicted chemical dosage, formulate an operation plan for the chemical dosing pump in combination with the control mode of the chemical dosing pump, and perform real-time control on the chemical dosing pump based on the operation plan.

[0012] The step of constructing a dosing model using the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant specifically includes:

[0013] Obtain the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant;

[0014] Coarsely screen the historical data through the confidence interval analysis method to obtain coarsely screened data;

[0015] Using the time-delay alignment mechanism, with the dosing amount of the phosphorus remover as the time-sequence reference origin, multiple different time-delay coefficients between each operating index and the dosing amount of the phosphorus remover are set. Each operating index is aligned with the dosing amount of the phosphorus remover according to different time-delay coefficients respectively, and the Pearson correlation coefficient is calculated. The time-delay coefficient corresponding to the maximum Pearson correlation coefficient is selected as the final time-delay coefficient for each index, and the roughly screened data is realigned according to the final time-delay coefficient;

[0016] Analyze the correlation between each operating index and the dosing amount of the phosphorus remover in the roughly screened data after alignment, and according to the results of the correlation analysis, screen out the top N operating indexes with the highest correlation from the operating indexes as the modeling indexes;

[0017] Based on the modeling indexes, perform batch data cleaning to obtain finely screened data;

[0018] Set annotation rules according to the unit chemical consumption and the effluent water quality range, and train a self-supervised model using self-supervised learning. The self-supervised model uses the finely screened data to analyze the correlation between water quality parameters and is used to output annotation information to obtain a labeled training sample set;

[0019] Define a loss function, and use an optimization algorithm to transfer the self-supervised model to the dosing model for fine-tuning, and perform supervised learning using the labeled training sample set to obtain the dosing model.

[0020] The analysis of the correlation between each operating index and the dosing amount of the phosphorus remover in the roughly screened data after alignment, and according to the results of the correlation analysis, screen out the top N operating indexes with the highest correlation from the operating indexes as the modeling indexes, specifically: fitting a multiple regression model based on the combined data of each operating index and the dosing amount of the phosphorus remover, extracting the absolute value of the determination coefficient of the multiple regression model as the correlation factor, and then sorting all the correlation factors from large to small, and selecting the operating indexes corresponding to the top N correlation factors as the modeling indexes.

[0021] The batch data cleaning based on the modeling indexes to obtain finely screened data specifically includes:

[0022] Using the box plot method to find out the abnormal discrete points in the data of the modeling indexes; the abnormal discrete points include boundary enrichment outliers, null values, and measurement outliers;

[0023] Remove the boundary enrichment outliers; for the null values, if the total data volume of the finely screened data exceeds the threshold, directly remove them, if the total data volume of the finely screened data does not exceed the threshold, backfill the null values by interpolation; for the measurement outliers, modify or remove them.

[0024] The extraction of the data of the modeling indicators according to the division result is specifically as follows: when the data of the modeling indicator is of the leading type, extract the data of the modeling indicator with the time delay coefficient corresponding to the modeling indicator shifted forward at the current moment; when the data of the modeling indicator is of the real-time type, extract the data of the modeling indicator at the current moment; when the data of the modeling indicator is of the lagging type, extract the target value of the data of the modeling indicator at the current moment.

[0025] The formulation of the operation plan for the chemical dosing pump in combination with the chemical dosing pump control method specifically includes:

[0026] When the chemical dosing pump control method is the dynamic pump frequency determination method, fit the pump frequency-flow function relationship according to the chemical dosing amount corresponding to the pump frequency in the historical data; preferentially allocate the real-time predicted chemical dosing amount to the chemical dosing pump with the highest priority according to the pump priority. If the real-time predicted chemical dosing amount is greater than the maximum flow rate of the pump, then allocate the remaining chemical dosing amount to the chemical dosing pump with the next lower priority. If there is still remaining chemical dosing amount, continue to allocate until there is no remaining chemical dosing amount. Calculate the corresponding pump frequency output value according to the chemical dosing amount allocated to each pump and the pump frequency-flow function relationship.

[0027] When the chemical dosing pump control method is the flow deviation correction method, fit the pump frequency-flow function relationship according to the chemical dosing amount corresponding to the pump frequency in the historical data; according to the real-time predicted chemical dosing amount, preferentially allocate the real-time predicted chemical dosing amount to the chemical dosing pump with the highest priority according to the pump priority. If the real-time predicted chemical dosing amount is greater than the maximum flow rate of the pump, then allocate the remaining chemical dosing amount to the chemical dosing pump with the next lower priority. If there is still remaining chemical dosing amount, continue to allocate until there is no remaining chemical dosing amount. Calculate the corresponding pump frequency output value according to the chemical dosing amount allocated to each pump and the pump frequency-flow function relationship, and correct the deviation between the set flow rate and the actual flow rate to ensure the minimum error of the operation plan of the chemical dosing pump.

[0028] The intelligent chemical dosing method for chemical phosphorus removal in the sewage treatment plant further includes: judging whether the sewage treatment plant has an abnormal mode. If the sewage treatment plant has an abnormal mode, judge the abnormal mode, and based on the judgment result, adjust the chemical dosing plan to the control strategy corresponding to the abnormal mode to meet the intelligent chemical dosing use requirements in different scenarios.

[0029] The technical solution adopted by the present invention to solve its technical problems is: to provide an intelligent chemical dosing device for chemical phosphorus removal in a sewage treatment plant, including:

[0030] A construction module, configured to construct a chemical dosing model by using the historical data of all operation indicators in the process of chemical phosphorus removal in the sewage treatment plant;

[0031] An establishment module, configured to select feedback indicators that need to be feedback-regulated from the operation indicators, and establish a target feedback rule based on the feedback indicators;

[0032] A prediction module, configured to divide the data classified by the modeling metrics into three categories: leading, real-time, and lagging according to the time-delay coefficients of the modeling metrics, extract the data of the modeling metrics according to the classification results, input the extracted data into the chemical dosing model, and obtain the real-time predicted chemical dosing amount in combination with the target feedback rule; wherein, the modeling metrics are the top N operating metrics selected from the operating metrics and having a high correlation with the chemical dosing amount of the phosphorus removal agent.

[0033] A control module, configured to formulate an operation plan for the chemical dosing pump according to the obtained real-time predicted chemical dosing amount, in combination with the chemical dosing pump control method, and perform real-time control on the chemical dosing pump based on the operation plan.

[0034] The technical solution adopted by the present invention to solve its technical problems is: to provide an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the steps of the intelligent chemical dosing method for chemical phosphorus removal in a sewage treatment plant as described above are implemented.

[0035] The technical solution adopted by the present invention to solve its technical problems is: to provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the intelligent chemical dosing method for chemical phosphorus removal in a sewage treatment plant as described above are implemented.

[0036] Beneficial effects

[0037] Due to the adoption of the above technical solution, compared with the prior art, the present invention has the following advantages and positive effects: The present invention generates a chemical dosing model with water quality characteristics as the input and predicted chemical dosing amount as the output through self-supervised learning, and then improves the prediction effect of the chemical dosing model through feedback regulation and autonomous iteration and other measures, ensures the final effluent water quality effect, reduces environmental emission pollution, and at the same time can continuously reduce the chemical consumption of the original system and save costs. Description of the drawings

[0038] Figure 1 It is a flowchart of the intelligent chemical dosing method for chemical phosphorus removal in a sewage treatment plant according to the first embodiment of the present invention. Specific embodiments

[0039] The following further elaborates the present invention in combination with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of this application.

[0040] The first embodiment of the present invention relates to an intelligent chemical dosing method for chemical phosphorus removal in a sewage treatment plant, as Figure 1 shown, including the following steps:

[0041] Step 1: Construct a chemical dosing model using the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant. This step specifically includes:

[0042] Step 101: Obtain the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant.

[0043] In this step, the methods for obtaining the historical data of all operating indicators during the chemical phosphorus removal process in the sewage treatment plant mainly include: extraction from the Internet of Things database, transcription of manually filled reports from the sewage treatment plant, export of electronic forms from the Supervisory Control And Data Acquisition (SCADA) system of the sewage treatment plant, etc. Among them, the main types of operating indicators are the influent volume, influent water quality, effluent water quality, chemical dosing amount in the phosphorus removal process section, as well as the start-stop status and pump frequency of the chemical dosing pump operation. The obtained historical data is usually stored in a table file in excel or csv format.

[0044] Step 102: Coarsely screen the historical data through the confidence interval analysis method to obtain coarsely screened data.

[0045] In this step, the obtained historical data is cleaned through the confidence interval analysis method. For example, based on a 95% confidence interval, the upper and lower boundaries of each data can be determined, and the discrete point data outside the boundaries can be removed to obtain the initially screened data. Among them, for the confidence interval analysis method, the pandas or numpy library in python is used to extract the historical data. For each column of operating indicator data, the upper 97.5% and lower 97.5% boundaries are calculated separately using the quantile method, which are used as the maximum and minimum values of this column, that is, max = data.quantile(0.975) and min = data.quantile(0.025), respectively representing sorting the data in this column from small to large, located at the 97.5% position and the 2.5% position. The data in this column that is greater than the 97.5% position and less than the 2.5% position is regarded as discrete points with abnormal small probability boundaries, and this part of the data is removed to obtain coarsely screened data.

[0046] Step 103: Using the time delay alignment mechanism, with the chemical dosing amount of the phosphorus remover as the time series reference origin, set multiple different time delay coefficients between each operating indicator and the chemical dosing amount of the phosphorus remover. Align each operating indicator with the chemical dosing amount according to different time delay coefficients respectively, calculate the Pearson correlation coefficient, select the time delay coefficient corresponding to the maximum Pearson correlation coefficient as the final time delay coefficient for each indicator, and realign the coarsely screened data according to the final time delay coefficient.

[0047] The time delay coefficient is the time delay of the correlation between data in different process segments. Since the water in the sewage treatment plant has a certain hydraulic retention time from inlet to outlet, the time dimensions corresponding to different data are different. For example, the water quality data at the outlet section at the same moment should be compared with the inlet water quality data several hours or even more than ten hours ago. Therefore, it is necessary to configure the time delay coefficient and reasonably plan the chemical dosing time to ensure that the analysis of the chemical dosing amount (i.e., the dosing amount) and related parameters is in the same time dimension.

[0048] Specifically, in this step, the time series of each operation index are dynamically windowed according to different time delay coefficients, and the relationship with the chemical dosing amount is analyzed through the Pearson correlation coefficient in Python, and the time delay coefficient corresponding to the maximum Pearson correlation coefficient is found and determined as the time delay coefficient of the operation index. If the calculated time delay coefficient deviates too much from the actual process experience, the correction time delay coefficient can be set manually based on the actual process experience. For example, the hydraulic retention time can be calculated based on the information of the phosphorus removal process structure and the treated water volume, and then the time delay coefficient can be corrected based on the hydraulic retention time.

[0049] Step 104: Analyze the correlation between each operation index and the phosphorus removal chemical dosing amount in the aligned rough screening data, and based on the correlation analysis results, select the top N operation indexes with the highest correlation from the operation indexes as the modeling indexes.

[0050] In this step, a multiple regression model is fitted based on the combined data of each operation index and the phosphorus removal chemical dosing amount, and the absolute value of R2 (coefficient of determination) of the multiple regression model is extracted as the correlation factor. Then, all the correlation factors are sorted from large to small, and the operation indexes corresponding to the top N correlation factors are selected as the modeling indexes.

[0051] Step 105: Perform batch data cleaning based on the modeling indexes to obtain refined screening data.

[0052] In this step, according to the selected modeling indexes, batch data cleaning is performed based on the aligned data to further remove abnormal discrete point data. In addition, sample data can be manually modified, deleted or added, or data can be batch screened according to the set sample index screening conditions.

[0053] Among them, when performing batch data cleaning, the box plot method can be used to find out the abnormal discrete points in the aligned data. The abnormal discrete points include boundary enrichment outliers, null values, and measurement outliers that do not conform to the actual business, etc. Boundary enrichment outliers usually appear during the calibration process of sensor devices and are the half-range or full-range values of the sensors. Since the sensor calibration operation is relatively frequent, there may still be a part of this batch of data after passing the confidence interval analysis method, but it has no relation to the actual phosphorus removal process and needs to be removed. Null values are usually caused by the loss of device communication data or the vacant values generated by removing them through the confidence interval analysis method. When the total data volume is large, the data corresponding to the null value part can be removed; when the total data volume is small or the data in other columns under the same entry is relatively important, the null values can be filled by interpolation methods, and the main interpolation methods include linear interpolation method, Lagrange interpolation method, Newton interpolation method, Hermite interpolation method, etc. Measurement outliers that do not conform to the actual business are usually abnormal jump values that appear during continuous operation or zero values or incorrect measurement values caused by sensor device failures. The sample data can be manually modified, deleted or added, or the data can be screened in batches according to the set sample index screening conditions.

[0054] Step 106: On the basis of data cleaning, first set the annotation rules according to the unit chemical consumption and the range of effluent water quality, and train a self-supervised model. This self-supervised model uses the refined screened data to analyze the correlation between water quality parameters and is used to output annotation information (high / low unit chemical consumption, good / bad effluent water quality, etc.), and finally generates a labeled training sample set.

[0055] Among them, the unit chemical consumption is the ratio of the dosage of phosphorus removal agent to the water treatment volume, usually with the unit of kilograms per thousand tons of water (kg / kt·H 2 O). The range of effluent water quality is mainly divided into an over-standard interval, a qualified interval, an excellent interval, an excessive interval, etc. The over-standard interval is the interval greater than or equal to the effluent water quality over-standard value, and the effluent water quality over-standard value is usually set according to the national effluent water quality standard or the regulations of the sewage treatment plant.

[0056] The self-supervised learning (SSL) in this step is an unsupervised learning method, and its core idea is to generate labels through the data itself, thus avoiding relying on a large amount of labeled data. Compared with supervised learning, a large amount of sample annotation work can be saved; compared with conventional unsupervised learning, unsupervised learning is more suitable for scenarios such as data clustering, pattern discovery, and anomaly detection, and is not suitable for regression tasks with clear goals.

[0057] This step generates a training sample set containing input water quality characteristics and predicted chemical dosage labels through a self-supervised model, and can also combine manual annotation to adjust the labels of the training sample set according to the preliminary prediction results of the model.

[0058] Step 107: Define a loss function and use an optimization algorithm to transfer the self-supervised model to the dosing model for fine-tuning, and perform supervised learning using the labeled training sample set to obtain the dosing model.

[0059] The loss function in this step is used as an evaluation metric in the neural network to measure the difference or error between the neural network output and the true label. The loss function is usually a non-negative real-valued function. The smaller the value of the loss function, the closer the prediction result of the model is to the actual value, and the better the performance of the model. The calculation method of the loss function can be selected as Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), etc.

[0060] The optimization algorithm used in this step is a crucial part of machine learning and deep learning, and is often used to adjust the parameters of the model to minimize the loss function. In addition to gradient descent, there are many other optimization algorithms, each with different advantages and disadvantages, and suitable for different tasks and problems. Common optimization algorithms include Adaptive Moment Estimation (Adam), Stochastic Gradient Descent (SGD), Nesterov Accelerated Gradient (NAG), Adadelta, etc.

[0061] Step 2: Select the feedback metrics that need to be feedback-regulated from the operation metrics, and establish the target feedback rules based on the feedback metrics.

[0062] In this step, first, the metrics that need to be feedback-regulated can be selected from the operation metrics, usually the influent water quality or the effluent water quality. Then, a feedback strategy is configured for the feedback metrics. Multiple-level feedback strategies can be established for a single feedback metric, and multi-objective feedback rules can be established for multiple feedback metrics. After the configuration is completed, it is possible to flexibly select whether to enable a certain feedback strategy.

[0063] In this embodiment, the total phosphorus TP in the effluent is set as the index for feedback regulation. According to the first-class A discharge standard of the sewage treatment plant, the content of total phosphorus TP in the effluent should be less than 0.5 mg / L. Multi-level feedback rules for the total phosphorus TP in the effluent can be set. For example, when the total phosphorus TP in the effluent is between 0.4 and 0.5 mg / L, the chemical dosage needs to be increased by 10%. When the total phosphorus TP in the effluent is greater than 0.5 mg / L, the chemical dosage needs to be increased by 20%. Similarly, combined multi-objective feedback rules can also be set. For example, when the total phosphorus TP in the effluent is greater than 0.5 mg / L and the ammonia nitrogen NH 4 in the effluent is greater than 5 mg / L, the chemical dosage needs to be increased by 30%.

[0064] Step 3: According to the time-delay coefficient of the modeling index, divide the data of the modeling index into lead class, real-time class, and lag class, extract the data of the modeling index according to the division result, input the extracted data into the chemical dosing model, and combine the target feedback rule to obtain the real-time predicted chemical dosage.

[0065] In this step, the data of the modeling index is divided into lead class, real-time class, and lag class according to the time-delay coefficient of the modeling index. When the data of the modeling index is of the lead class, extract the data of the modeling index at the current time shifted forward by the corresponding time-delay coefficient of the modeling index. When the data of the modeling index is of the real-time class, extract the data of the modeling index at the current time. When the data of the modeling index is of the lag class, extract the target value of the data of the modeling index at the current time.

[0066] In this embodiment, the data of the modeling index is divided into lead class, real-time class, and lag class. The lead index generally refers to the data acquisition index corresponding to one or more process segments before the phosphorus removal sedimentation tank, usually including the total nitrogen TN in the total influent, the ammonia nitrogen NH 4 in the total influent, etc. The real-time index is generally the data index within the current process segment of the phosphorus removal sedimentation tank, such as the influent flow rate of the sedimentation tank, the influent temperature of the sedimentation tank, the influent pH of the sedimentation tank, etc. The lag index usually refers to the index included in the entire process from after the sedimentation tank to the effluent, such as the total phosphorus TP in the effluent, the ammonia nitrogen NH 4 in the effluent, etc.

[0067] It is not difficult to find that in this embodiment, the data of the modeling index is classified according to the time-delay coefficient. When inputting the characteristic data into the chemical dosing model, the time-delay alignment of all data can be ensured, thereby ensuring the accuracy of the prediction result.

[0068] Step 4: According to the obtained real-time predicted chemical dosage, formulate an operation plan for the chemical dosing pump in combination with the control mode of the chemical dosing pump, and perform real-time control on the chemical dosing pump based on the operation plan.

[0069] In this embodiment, formulating an operation plan for the chemical dosing pump requires obtaining information such as the control mode of the chemical dosing pump, rated upper and lower limits, priority, operation duration, etc. The control types of chemical dosing pumps are generally divided into flow or pump frequency control. In addition, there are also those with stroke adjustment control. However, pumps with stroke adjustment are usually in manual local control mode and cannot achieve remote control, so they are not within the scope of consideration in this application. Since the flow or pump frequency control of chemical dosing pumps is generally implemented based on an analog control module, the lower limit of flow or pump frequency is usually 0. The upper limit of flow is usually the rated flow of the pump, and the upper limit of pump frequency is usually 50 Hz. The pump priority is set manually according to on-site usage habits or factors such as the performance and energy consumption of the pump. The pump operation duration is the continuous operation duration of the pump after it is started. It can be specified according to the maximum operation duration of the pump. When a certain pump reaches the maximum operation duration, another pump is switched for use to prevent excessive wear caused by long-term operation of a single pump, reduce the probability of equipment failure, and ensure the service life of the pump.

[0070] When the control mode of the chemical dosing pump is the dynamic pump frequency method, first, according to the amount of chemical added corresponding to the pump frequency in historical data, fit the pump frequency-flow function relationship; according to the pump priority, preferentially allocate the real-time predicted amount of chemical added to the chemical dosing pump with the highest priority. If the real-time predicted amount of chemical added is greater than the maximum flow of this pump, then allocate the remaining amount of chemical added to the chemical dosing pump with the next lower priority. If there is still remaining amount of chemical added, continue to allocate in this way until there is no remaining amount of chemical added. Finally, calculate the corresponding pump frequency output value according to the amount of chemical added allocated to each pump and the pump frequency-flow function relationship.

[0071] When the control mode of the chemical dosing pump is the flow deviation correction method, first, according to the amount of chemical added corresponding to the pump frequency in historical data, fit the pump frequency-flow function relationship; according to the real-time predicted amount of chemical added, preferentially allocate the real-time predicted amount of chemical added to the chemical dosing pump with the highest priority according to the pump priority. If the real-time predicted amount of chemical added is greater than the maximum flow of this pump, then allocate the remaining amount of chemical added to the chemical dosing pump with the next lower priority. If there is still remaining amount of chemical added, continue to allocate in this way until there is no remaining amount of chemical added. Finally, calculate the corresponding pump frequency output value according to the amount of chemical added allocated to each pump and the pump frequency-flow function relationship, and correct the deviation between the set flow and the actual flow to ensure the minimum error of the operation plan of the chemical dosing pump.

[0072] This embodiment can also set a compensation mechanism. This compensation mechanism calculates the difference between the amount of chemical added in the prediction period and the actual amount of chemical added in the chemical dosing control process as the compensation amount of chemical added, and supplements or compensates the predicted amount of chemical added according to the compensation amount of chemical added in the next prediction period.

[0073] To achieve the continuous optimization and intelligent operation of the chemical dosing model, the method of this embodiment can also collect data on the modeling indicators during continuous operation, and label samples through self-supervised learning. High-quality samples with better labeling results can be selected, and data with large errors can be eliminated to ensure the high quality of the training set and the representativeness of the data. The high-quality training sample set is continuously updated. At the same time, through the set periodic training plan, for example, the chemical dosing model iterative training can be started at 0:00 on the first day of each month. In addition, during the operation of the chemical dosing model, the actual operation effect within 24 hours will be calculated in real time, including two aspects: water quality control fluctuation and chemical consumption fluctuation. When the actual operation effect of the chemical dosing model is lower than the set threshold, the system can automatically trigger retraining to optimize the performance of the chemical dosing model. By dynamically adjusting the parameters and labeling rules of the chemical dosing model, the chemical dosing model can gradually learn and summarize more accurate chemical dosing rules.

[0074] The intelligent chemical dosing method for chemical phosphorus removal in sewage treatment plants described in this embodiment is for the conventional mode. In addition, this embodiment also supports the identification and switching mechanism of abnormal modes. Usually, the abnormal modes other than the conventional mode in sewage treatment plants include instrument abnormal mode, sedimentation tank cleaning mode, rainy day emergency mode, etc. Each abnormal operation mode corresponds to specific control strategies and parameter settings to meet the intelligent chemical dosing use requirements in different scenarios. This embodiment can switch different scenario modes through pattern recognition determination or manual selection to achieve more intelligent control. Specifically: determine whether the sewage treatment plant has an abnormal mode. If the sewage treatment plant has an abnormal mode, determine the abnormal mode, and adjust the chemical dosing plan to the control strategy corresponding to the abnormal mode based on the determination result. For example, when the determination result is the instrument abnormal mode, it can be temporarily switched to the operation of a single "water volume - chemical consumption" model, and the chemical phosphorus removal dosing is guided only according to the relationship model between the influent water volume and the chemical consumption of the phosphorus remover.

[0075] It is not difficult to find that this embodiment can stabilize the phosphorus removal effect during the chemical phosphorus removal process in sewage treatment plants, reduce water quality fluctuations, promote energy conservation and consumption reduction, achieve precise control, improve operation efficiency, and at the same time can also improve the modeling efficiency and facilitate integrated promotion and use.

[0076] The second embodiment of the present invention relates to an intelligent chemical dosing device for chemical phosphorus removal in sewage treatment plants, including:

[0077] A construction module for constructing a chemical dosing model using the historical data of all operation indicators during the chemical phosphorus removal process in the sewage treatment plant;

[0078] An establishment module for selecting feedback indicators that need to be feedback-regulated from the operation indicators and establishing a target feedback rule based on the feedback indicators;

[0079] A prediction module, which is used to divide the data classified by the modeling metrics into three categories: leading, real-time, and lagging based on the time-delay coefficients of the modeling metrics, extract the data of the modeling metrics according to the classification results, input the extracted data into the chemical dosing model, and combine the target feedback rule to obtain the real-time predicted chemical dosing amount; wherein, the modeling metrics are the top N operating metrics selected from the operating metrics that have a relatively high correlation with the chemical dosing amount of the phosphorus removal agent.

[0080] A control module, which is used to formulate an operation plan for the chemical dosing pump according to the obtained real-time predicted chemical dosing amount, in combination with the chemical dosing pump control method, and perform real-time control on the chemical dosing pump based on the operation plan.

[0081] The construction module includes:

[0082] An acquisition unit, which is used to acquire the historical data of all operating metrics during the chemical phosphorus removal process in the sewage treatment plant.

[0083] A rough screening unit, which is used to roughly screen the historical data through the confidence interval analysis method to obtain the roughly screened data.

[0084] An alignment unit, which is used to utilize the time-delay alignment mechanism, taking the chemical dosing amount of the phosphorus removal agent as the time-series reference origin, set multiple different time-delay coefficients between each operating metric and the chemical dosing amount of the phosphorus removal agent, align each operating metric with the chemical dosing amount of the phosphorus removal agent according to different time-delay coefficients respectively, calculate the Pearson correlation coefficient, select the time-delay coefficient corresponding to the maximum Pearson correlation coefficient as the final time-delay coefficient of each metric, and realign the roughly screened data according to the final time-delay coefficient.

[0085] An analysis unit, which is used to analyze the correlation between each operating metric and the chemical dosing amount of the phosphorus removal agent in the roughly screened data after alignment, and screen out the top N operating metrics with relatively high correlation from the operating metrics as the modeling metrics according to the correlation analysis results.

[0086] A cleaning unit, which is used to perform batch data cleaning based on the modeling metrics to obtain the finely screened data.

[0087] A training unit, which is used to set annotation rules according to the unit chemical consumption and the effluent water quality range, and train a self-supervised model using self-supervised learning. The self-supervised model utilizes the finely screened data to analyze the correlation between water quality parameters, and is used to output annotation information to obtain a labeled training sample set.

[0088] A fine-tuning unit, which is used to define a loss function, and use an optimization algorithm to transfer the self-supervised model to the chemical dosing model for fine-tuning, and perform supervised learning using the labeled training sample set to obtain the chemical dosing model.

[0089] The analysis unit fits a multiple regression model based on the combined data of each operating index and the dosing amount of the phosphorus removal agent, extracts the absolute value of the coefficient of determination of the multiple regression model as the correlation factor, then sorts all the correlation factors from largest to smallest, and selects the operating indexes corresponding to the top N correlation factors as the modeling indexes.

[0090] The cleaning unit includes:

[0091] An abnormal discrete point search sub-unit, which is used to find abnormal discrete points in the modeling index data by using the box plot method; the abnormal discrete points include boundary enrichment outliers, null values, and measurement outliers;

[0092] An abnormal discrete point processing sub-unit, which removes the boundary enrichment outliers; for the null values, if the total data volume of the refined screening data exceeds the threshold, it is directly removed, if the total data volume of the refined screening data does not exceed the threshold, the null values are backfilled by the interpolation method; for the measurement outliers, they are modified or removed.

[0093] When the prediction module extracts the data of the modeling index according to the division result, when the data of the modeling index is of the leading type, it extracts the data of the modeling index corresponding to the time delay coefficient of the current time shifted forward by the modeling index; when the data of the modeling index is of the real-time type, it extracts the data of the modeling index at the current time; when the data of the modeling index is of the lagging type, it extracts the target value of the data of the modeling index at the current time.

[0094] When the control module formulates the operation plan of the dosing pump in combination with the dosing pump control method, when the dosing pump control method is the dynamic pump frequency setting method, it fits the pump frequency-flow function relationship according to the dosing amount corresponding to the pump frequency in the historical data; according to the pump priority, it preferentially allocates the real-time predicted dosing amount to the dosing pump with the highest priority. If the real-time predicted dosing amount is greater than the maximum flow rate of the pump, the remaining dosing amount is allocated to the dosing pump with the next lower priority. If there is still remaining dosing amount, it continues to be allocated until there is no remaining dosing amount. According to the dosing amount allocated to each pump and the pump frequency-flow function relationship, it calculates the corresponding pump frequency output value; when the dosing pump control method is the flow deviation correction method, it fits the pump frequency-flow function relationship according to the dosing amount corresponding to the pump frequency in the historical data; according to the real-time predicted dosing amount, it preferentially allocates the real-time predicted dosing amount to the dosing pump with the highest priority. If the real-time predicted dosing amount is greater than the maximum flow rate of the pump, the remaining dosing amount is allocated to the dosing pump with the next lower priority. If there is still remaining dosing amount, it continues to be allocated until there is no remaining dosing amount. According to the dosing amount allocated to each pump and the pump frequency-flow function relationship, it calculates the corresponding pump frequency output value, and corrects the deviation between the set flow rate and the actual flow rate to ensure the minimum error of the operation plan of the dosing pump.

[0095] The intelligent chemical phosphorus removal dosing device for the sewage treatment plant further includes:

[0096] A judgment module, configured to judge whether the sewage treatment plant is in an abnormal mode;

[0097] A switching module, configured to, when the sewage treatment plant is in an abnormal mode, determine the abnormal mode, and adjust the dosing plan to the control strategy corresponding to the abnormal mode based on the determination result to meet the intelligent chemical phosphorus removal dosing use requirements in different scenarios.

[0098] The third embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the intelligent chemical phosphorus removal method for the sewage treatment plant in the first embodiment are implemented.

[0099] The fourth embodiment of the present invention relates to a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the intelligent chemical phosphorus removal method for the sewage treatment plant in the first embodiment are implemented.

[0100] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program codes.

[0101] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0102] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction method, and the instruction method implements the process Figure 1One or more processes and / or blocks Figure 1 The functions specified in one or more blocks.

[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 One or more processes and / or blocks Figure 1 The steps of the functions specified in one or more blocks.

[0104] As described above, this is only a specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims described.

Claims

1. An intelligent dosing method for chemical phosphorus removal in a sewage treatment plant, characterized in that: The following steps are involved: The dosing model was constructed using the historical data of all operating indicators of the sewage plant during the chemical phosphorus removal process; Selecting feedback indicators that need to be feedback-adjusted from the operating indicators, and establishing target feedback rules based on the feedback indicators; According to the delay coefficient of the modeling indicator, the data of the modeling indicator is divided into an advanced class, a real-time class and a lagging class, and the data of the modeling indicator is extracted according to the division result, and the extracted data is input into the dosing model, and the real-time predicted dosage is obtained in combination with the target feedback rule; wherein the modeling indicator is the N operating indicators with the top correlation ranking with the dosage of the dephosphorization agent selected from the operating indicators; According to the obtained real-time predicted dosage, an operation plan of the dosing pump is formulated in combination with the control mode of the dosing pump, and the dosing pump is controlled in real time based on the operation plan.

2. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 1 is characterized in that: The use of historical data of all operating indicators of the sewage plant during the chemical phosphorus removal process to build a dosing model specifically includes: Obtain historical data of all operating indicators of the sewage plant during the chemical phosphorus removal process; Performing rough screening on the historical data by using a confidence interval analysis method to obtain rough screening data; By using the time delay alignment mechanism, taking the dephosphorization agent dosage as the timing reference origin, a number of different time delay coefficients are set for each operating indicator and the dephosphorization agent dosage, and each operating indicator is aligned with the dephosphorization agent dosage according to different time delay coefficients, and the Pearson correlation coefficient is calculated. The time delay coefficient corresponding to the maximum Pearson correlation coefficient is selected as the final time delay coefficient of each indicator, and the coarse screening data is realigned according to the final time delay coefficient. Analyze the correlation between each operating index and the dosage of the phosphorus removal agent in the aligned rough screening data, and select N operating indexes with the highest correlation ranking from the operating indexes as modeling indexes according to the correlation analysis results; Perform batch data cleaning based on the modeling indicators to obtain fine screening data; The labeling rules are set according to the unit drug consumption and the effluent water quality range, and a self-supervised model is trained by self-supervised learning. The self-supervised model uses the fine screening data to analyze the correlation between water quality parameters to output labeling information. Get a labeled training sample set; A loss function is defined, and an optimization algorithm is used to migrate the self-supervised model to the medication dosing model for fine-tuning, and the labeled training sample set is used for supervised learning to obtain the medication dosing model.

3. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 2 is characterized in that: The analysis is performed to determine the correlation between each operating indicator and the dosage of the phosphorus removal agent in the aligned coarse screening data, and based on the correlation analysis results, the top N operating indicators with the highest correlation ranking are selected from the operating indicators as modeling indicators, specifically: a multivariate regression model is fitted based on the combined data of each operating indicator and the dosage of the phosphorus removal agent, the absolute value of the determination coefficient of the multivariate regression model is extracted as the correlation factor, and then all the correlation factors are sorted from large to small, and the operating indicators corresponding to the top N correlation factors are selected as modeling indicators.

4. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 2, characterized in that: The batch data cleaning based on the modeling index to obtain fine screening data specifically includes: Using the box plot method to find out the abnormal discrete points in the modeling indicator data; the abnormal discrete points include boundary enrichment outliers, null values, and measurement outliers; Boundary enrichment outliers are removed; for null values, if the total data volume of the fine-screened data exceeds the threshold, they are directly removed; if the total data volume of the fine-screened data does not exceed the threshold, the null values ​​are backfilled by interpolation; the measurement outliers are modified or removed.

5. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 1, characterized in that: The data of the modeling indicator is extracted according to the division result, specifically: when the data of the modeling indicator is of the advanced type, the data of the modeling indicator corresponding to the delay coefficient of the modeling indicator at the current moment is extracted; when the data of the modeling indicator is of the real-time type, the data of the modeling indicator at the current moment is extracted; when the data of the modeling indicator is of the lagging type, the target value of the data of the modeling indicator at the current moment is extracted.

6. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 1, characterized in that: The operation plan of the dosing pump is formulated in combination with the dosing pump control mode, specifically including: When the dosing pump control mode is a dynamic pump frequency setting method, the pump frequency flow function relationship is fitted according to the dosing amount corresponding to the pump frequency in the historical data; the real-time predicted dosing amount is preferentially allocated to the dosing pump with the highest priority according to the pump priority; if the real-time predicted dosing amount is greater than the maximum flow of the pump, the remaining dosing amount is allocated to the dosing pump with a lower priority level; if there is any remaining dosing amount, the allocation continues until there is no remaining dosing amount; the corresponding pump frequency output value is calculated according to the dosing amount allocated to each pump and the pump frequency flow function relationship; When the dosing pump control mode is the flow deviation correction method, the pump frequency-flow function relationship is fitted according to the dosing amount corresponding to the pump frequency in the historical data; according to the real-time predicted dosing amount, the real-time predicted dosing amount is preferentially allocated to the dosing pump with the highest priority according to the pump priority; if the real-time predicted dosing amount is greater than the maximum flow of the pump, the remaining dosing amount is allocated to the dosing pump with a lower priority level; if there is any remaining dosing amount, the allocation continues until there is no remaining dosing amount; the corresponding pump frequency output value is calculated according to the dosing amount allocated to each pump and the pump frequency-flow function relationship, and the deviation between the set flow and the actual flow is corrected to ensure that the error of the operation plan of the dosing pump is minimized.

7. The intelligent dosing method for chemical phosphorus removal in a sewage treatment plant according to claim 1, characterized in that: Also includes: Determine whether an abnormal mode occurs in the sewage treatment plant. If an abnormal mode occurs in the sewage treatment plant, determine the abnormal mode, and adjust the dosing plan to the control strategy corresponding to the abnormal mode based on the determination result to meet the needs of intelligent dosing for chemical phosphorus removal in different scenarios.

8. An intelligent dosing device for chemical phosphorus removal in a sewage treatment plant, characterized in that: include: A construction module is used to construct a dosing model using historical data of all operating indicators of the sewage plant during the chemical phosphorus removal process; An establishment module is used to select feedback indicators that need to be feedback-adjusted from the operation indicators, and establish target feedback rules based on the feedback indicators; The prediction module is used to divide the data of the modeling indicators into advanced, real-time and lagging categories according to the delay coefficient of the modeling indicators, and extract the data of the modeling indicators according to the division results, and input the extracted data into the dosing model, and obtain the real-time predicted dosage in combination with the target feedback rule; wherein the modeling indicators are the N operating indicators selected from the operating indicators that are ranked top in correlation with the dosage of the dephosphorization agent; The control module is used to formulate an operation plan of the dosing pump according to the obtained real-time predicted dosing amount and in combination with the dosing pump control mode, and to control the dosing pump in real time based on the operation plan.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the intelligent dosing method for chemical phosphorus removal in a sewage treatment plant as described in any one of claims 1-7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent dosing method for chemical phosphorus removal in a sewage treatment plant as described in any one of claims 1-7 are implemented.