Sewage treatment process control method, device, equipment and medium
By adopting a mechanism-mathematical model collaborative control architecture, combined with real-time operation data and historical residual analysis, the control delay problem caused by hysteresis characteristics in the sewage treatment system is solved, and more efficient sewage treatment control is achieved.
Patent Information
- Application Number
- CN202610134768.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-05-01
AI Technical Summary
In existing wastewater treatment systems, control units with lag characteristics cannot respond in a timely manner, resulting in delayed data feedback, poor intelligence, and untimely control response.
A collaborative control architecture combining mechanistic and mathematical models is adopted. By acquiring real-time operating data of the wastewater treatment process chain, a mechanistic model is constructed to provide the first regulation amount, and the mathematical model is used to correct it based on historical residuals. Combined with the analysis of hysteresis error source characteristics, a second regulation amount is calculated, and finally the target regulation amount is obtained by superimposing them for control.
It improves the intelligence and response speed of the wastewater treatment process, reduces the impact of instrument noise and outliers, ensures the accuracy and reliability of data, and enhances the precision and timeliness of control.
Smart Images

Figure CN121956887A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wastewater treatment technology, and in particular to a wastewater treatment process control method, apparatus, equipment and medium. Background Technology
[0002] In wastewater treatment processes at wastewater treatment plants, different control units are typically defined according to the process flow and function. For example, the lifting unit controls the influent flow rate by adjusting the number or frequency of submersible pumps; the aeration unit controls the frequency and output air volume of the air suspension blower; and the sludge dewatering unit controls the sludge flow rate and thus the dewatering rate by adjusting the screw pump frequency meter. Currently, some control units have been automated based on feedback data.
[0003] However, for some control units that cannot provide timely data feedback, such as those using instruments and control algorithms, biological reactions, or mixed microbial communities, the data corresponding to these control units usually cannot be fed back in real time. If adjustments are made only after the feedback data is obtained, there will be a control lag, resulting in untimely response.
[0004] Therefore, designing a wastewater treatment method that addresses the lag effect of conventional control systems failing to respond promptly to the process control delays of control units has become an urgent problem to be solved. Summary of the Invention
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a wastewater treatment process control method, device, equipment and medium, the main purpose of which is to solve the problem that the current automated wastewater treatment strategy has poor intelligence and untimely control response when faced with data with lag characteristics.
[0006] To achieve the above objectives, the main technical solutions adopted in this application include:
[0007] In a first aspect, embodiments of this application provide a wastewater treatment process control method, including:
[0008] Acquire real-time operational data of the target controlled unit in the wastewater treatment process chain after pretreatment;
[0009] The real-time operating data is used as input to a pre-built mechanism model to obtain a first adjustment amount for the target controlled unit; the pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to adjust the first adjustment amount of the control parameters of the target controlled unit according to the real-time operating data.
[0010] The real-time operating data is used as input to a pre-trained mathematical model to obtain the second adjustment amount of the target controlled unit; the pre-trained mathematical model is trained by taking the historical operating data of the target controlled unit as input and using the residual between the first adjustment amount output by the pre-trained mechanistic model on the historical operating data and the historical actual adjustment amount as the training target.
[0011] The first adjustment amount and the second adjustment amount of the target controlled unit are superimposed to obtain the target adjustment amount, and the target controlled unit is controlled based on the target adjustment amount;
[0012] Each type of controlled unit has a corresponding mechanistic model and mathematical model.
[0013] Optionally, the step of using the real-time operating data as input to a pre-trained mathematical model to obtain the second adjustment amount of the target controlled unit includes: performing data feature analysis on the real-time operating data based on the error source feature analysis library built into the mathematical model to identify the hysteresis error source category; the hysteresis error source category includes at least one of rapid dynamic error caused by sudden changes in water load and slow drift error caused by changes in biological population; and activating the compensation factor corresponding to the identified hysteresis error source category to calculate the second adjustment amount of the target controlled unit.
[0014] Optionally, the step of activating the compensation factor corresponding to the identified hysteresis error source category and calculating the second adjustment amount of the target controlled unit includes: when the hysteresis error source category is a rapid dynamic error caused by a sudden change in water load, calculating the second adjustment amount according to the following formula:
[0015] U_data=K_fast*ΔL
[0016] Wherein, U_data is the second adjustment amount, K_fast is the first compensation factor corresponding to the rapid dynamic error caused by the sudden change in water load, ΔL is the instantaneous change of the current influent load L(t) relative to the average load L_avg of the previous preset time period, ΔL=L(t)-L_avg; the influent load L(t) is the product of the influent flow rate Q_in(t) and the concentration of key pollutants in the influent C_in(t);
[0017] When the hysteresis error source is classified as slow drift error caused by changes in biological populations, the second adjustment amount is calculated using the following formula:
[0018] U_data=K_slow*∫(e(t))dt
[0019] Wherein, U_data is the second regulation, K_slow is the second step size factor corresponding to the slow drift error caused by changes in the biological population, and e(t) is the integral trend of the deviation between the first regulation U_mech of the mechanism model in the previous preset time period and the historical average regulation U_hist_avg, e(t) = U_mech(t) - U_hist_avg(t).
[0020] Optionally, the target controlled unit includes the front-end controlled unit and non-front-end controlled unit in the wastewater treatment process chain;
[0021] The acquisition of pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain includes: when the target controlled unit is a front-end controlled unit, the real-time operating data includes the detection data corresponding to the current front-end controlled unit; when the target controlled unit is not a front-end controlled unit, the real-time operating data includes the detection data corresponding to the current non-front-end controlled unit, and the operating status information of at least one front-end controlled unit corresponding to the current non-front-end controlled unit; the operating status information includes the target adjustment amount of the front-end controlled unit and / or key water quality parameters generated after control is executed based on the target adjustment amount.
[0022] Optionally, after obtaining the target adjustment amount and before the target adjustment amount controls the target controlled unit, the method further includes: determining whether the target controlled unit has a preset adjustment threshold and a single adjustment maximum threshold; if the target controlled unit has the adjustment threshold, and the target adjustment amount is less than the adjustment threshold, then the target adjustment amount is determined to be 0; if the target controlled unit has the single adjustment maximum threshold, and the target adjustment amount is greater than the single adjustment maximum threshold, then the set value of the single adjustment maximum threshold is used as the target adjustment amount.
[0023] Optionally, after using the real-time running data as input to a pre-trained mathematical model to obtain the second adjustment amount of the target controlled unit, the method further includes: recording and storing correction data corresponding to the second adjustment amount, the correction data including the controlled unit, running data, and first adjustment amount corresponding to the current second adjustment amount; and updating the model parameters of the mathematical model based on the correction data at a preset period.
[0024] Optionally, the step of obtaining the pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain includes: predicting the operating data of the target controlled unit through a prediction model to obtain a predicted value; and correcting the actual value based on the predicted value when the deviation between the predicted value and the actual value exceeds a preset threshold, so as to obtain the pre-processed real-time operating data.
[0025] The steps for obtaining the prediction model include: acquiring historical operating data of the target controlled unit within a preset historical time period; and training an initial XGBoost model based on the historical operating data to obtain the prediction model.
[0026] Secondly, embodiments of this application provide a wastewater treatment process control device, comprising:
[0027] The acquisition unit is configured to acquire pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain;
[0028] The first calculation unit is configured to use the real-time operating data as input to a pre-built mechanism model to obtain a first adjustment amount of the target controlled unit; the pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to output a first adjustment amount of the control parameters of the target controlled unit according to the real-time operating data.
[0029] The second computing unit is configured to use the real-time operating data as input to a pre-trained mathematical model to obtain a second adjustment amount of the target controlled unit; the pre-trained mathematical model is trained by using the historical operating data of the target controlled unit as input and the residual between the first adjustment amount output by the pre-trained mechanistic model on the historical operating data and the historical actual adjustment amount as the training target.
[0030] The adjustment unit is configured to superimpose the first adjustment amount and the second adjustment amount of the target controlled unit to obtain a target adjustment amount, and to control the target controlled unit based on the target adjustment amount;
[0031] Each type of controlled unit has a corresponding mechanistic model and mathematical model.
[0032] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the wastewater treatment process control method described in the first aspect.
[0033] Fourthly, this application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the wastewater treatment process control method described in the first aspect.
[0034] By employing the above technical solution, this application provides a wastewater treatment process control method. Firstly, by acquiring pre-processed real-time operational data from the wastewater treatment process chain, the accuracy and reliability of the data are ensured, reducing fluctuations caused by instrument noise or outliers. Corely, a mechanistic-mathematical dual-model collaborative control architecture is constructed for each controlled unit. Real-time operational data is used as input: a mechanistic model based on process principles provides a first regulation quantity conforming to fundamental physical laws; a mathematical model, trained on the residual between the historical output of the mechanistic model and the actual regulation quantity, outputs a second regulation quantity to correct the first regulation quantity. The mathematical model does not directly predict the optimal setpoint, but focuses on compensating for inherent errors in the mechanistic model caused by process lag, external interference, and model simplification. Finally, the first and second regulation quantities of the target controlled unit are superimposed to obtain the target regulation quantity, and the target controlled unit is controlled based on this target regulation quantity. This solves the problem of poor intelligence and untimely control response in traditional single-model wastewater treatment processes when dealing with data exhibiting lag characteristics. Attached Figure Description
[0035] Figure 1 A schematic flowchart of a wastewater treatment process control method provided in an embodiment of this application;
[0036] Figure 2 A schematic diagram of a wastewater treatment process chain provided in an embodiment of this application;
[0037] Figure 3 A schematic flowchart of another wastewater treatment process control method provided in an embodiment of this application;
[0038] Figure 4 This is a schematic diagram of a wastewater treatment process control device provided in an embodiment of this application. Detailed Implementation
[0039] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.
[0040] To address the shortcomings of current automated wastewater treatment strategies, such as poor intelligence and untimely control response when faced with data exhibiting lag characteristics, this application proposes a wastewater treatment process control method. This method can be applied to wastewater treatment process control devices in wastewater treatment plants and other similar facilities, and can execute any of the wastewater treatment process control methods mentioned below during operation. For example... Figure 1As shown, the method includes:
[0041] S101, Obtain the pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain.
[0042] like Figure 2 The diagram illustrates a wastewater treatment process chain. For example, a wastewater treatment plant in a northern city has a treatment capacity of 50,000 tons / day and meets the national Class A discharge standard. The main process consists of an influent lift pump station + pretreatment + AAO (anaerobic + anoxic + aerobic) + secondary sedimentation tank + high-efficiency filter + V-type filter + contact disinfection tank for effluent. Sludge dewatering is performed using a belt conveyor before being transported off-site. The main chemicals added are carbon sources and coagulants. Aeration is achieved by supplying air to the O-tank via an air suspension blower.
[0043] If the entire wastewater treatment process chain is divided into functional units, the controlled units can specifically include a pretreatment unit, a flow mixing unit, and a booster unit (used to control liquid level, flow rate, pump operating time, pump current, voltage, power, and output pump frequency). Figure 2 (Not shown), aeration unit, chemical dosing unit, filtration unit, and sludge dewatering unit, etc. Real-time operating data mainly includes sensor data of each controlled unit during operation, equipment operating signals, etc.
[0044] Furthermore, each controlled unit has a corresponding mechanistic model and mathematical model, the specific mechanistic model being as follows:
[0045] The control mechanism model formula for the lifting, filtration, and sludge dewatering units is as follows:
[0046]
[0047] In the formula, The values that the actuator needs to adjust. , These are the deviations between the setpoint and the real-time value of the controlled variable at times t and t-1, respectively. , , These are the PID control parameters.
[0048] Model of carbon source dosing control mechanism in the dosing unit:
[0049]
[0050] In the formula, Adjusting the flow rate of the carbon source reagent , , These are the influent flow rate, internal recirculation flow rate, and external recirculation flow rate, respectively. , , , These are the internal control values for effluent TN (total nitrogen), organic nitrogen, ammonia nitrogen deficiency, and nitrate nitrogen deficiency. denoted as the carbon source addition coefficient, D as the equivalent of the carbon source, P as the effective content of the reagent, and t as the adjustment time.
[0051] Model of coagulant dosing control mechanism in dosing unit:
[0052]
[0053] In the formula, To adjust the dosage of phosphorus removal agents, For high-efficiency pool orthophosphate, This refers to the internal control value of effluent TP (total phosphorus). molar ratio, For density, This refers to the effective content of the drug. This is the addition coefficient.
[0054] Aeration unit air volume control mechanism model:
[0055]
[0056] In the formula, To adjust the aeration flow rate, , , This is the gas volume adjustment coefficient. The set value for the final ammonia nitrogen level is set. 、 Set the DO (dissolved oxygen) levels for the middle and end sections of the aerobic tank. , This refers to the DO values in the middle and end sections of the aerobic tank.
[0057] Furthermore, in S101, preprocessing mainly includes data cleaning, supplementation, and correction of the collected data. In this embodiment, specifically, a machine learning XGBoost model is used to collect historical operating data from the past few months. After removing outliers from the historical operating data, the model is trained to obtain a prediction model. Then, during actual operation, the model's predicted values are compared with the actual operating data to identify, correct, and complete outliers.
[0058] S102, real-time operating data is used as input to a pre-built mechanistic model to obtain the first adjustment amount of the target controlled unit.
[0059] In S102, the pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to adjust the first adjustment amount of the control parameters of the target controlled unit according to the real-time operation data output.
[0060] S103 uses real-time running data as input to a pre-trained mathematical model to obtain the second adjustment amount of the target controlled unit.
[0061] The pre-trained mathematical model is trained by taking the historical operating data of the target controlled unit as input and using the residual between the first adjustment quantity output by the pre-trained mechanistic model on the historical operating data and the historical actual adjustment quantity as the training target.
[0062] In this embodiment, the mathematical model is trained based on the residual between the first adjustment amount output by the mechanistic model from historical operational data and the historical actual adjustment amount, using this residual as the training objective. The historical actual adjustment amount is obtained based on historical experience. For example, in historical data, the mechanistic model might calculate a dosage of 50 L / h for a certain dosing unit, but based on actual experience or actual adjustments, the optimal dosage for that instance would be 55 L / h. The residual can then be confirmed as 5 L / h. This residual is primarily used to characterize the error of the first adjustment amount for data with "hysteresis characteristics." The mathematical model, trained using historical operational data, focuses solely on predicting and compensating for the error inherent in the mechanistic model due to its inherent hysteresis, thereby compensating for the first adjustment amount output by the mechanistic model.
[0063] S104, the first adjustment amount and the second adjustment amount of the target controlled unit are superimposed to obtain the target adjustment amount, and the target controlled unit is controlled based on the target adjustment amount.
[0064] For example, in the aeration unit, the DO concentration is set to 1 mg / L for unit 1 and 2 mg / L for unit 2. Data is collected on water volume, terminal NH3 deficiency, DO concentrations of 1.2 mg / L and 2.2 mg / L for each duct, air volume, pressure, and blower current, voltage, and power. Based on the mechanistic model, the calculated air volume is 2000 m³ / h. According to the mathematical model, the output is reduced by 350 m³ / h, ultimately resulting in a blower speed reduction of 1650 m³ / h.
[0065] For example, in a filtration unit, the filtration rate is set to 12 m / h. Data such as influent and effluent flow rate, turbidity, and liquid level are collected, and the actual filtration rate is calculated to be 11 m / h. Based on the mechanistic model, the backwash fan frequency is increased by 1.5 Hz; based on the mathematical model, the increase is 0.25 Hz, ultimately resulting in a 1.75 Hz increase in the given backwash fan frequency.
[0066] In this embodiment, pre-processed real-time operational data from the wastewater treatment process chain is first acquired to ensure data accuracy and reliability, reducing fluctuations caused by instrument noise or outliers. Corely, a mechanistic-mathematical dual-model collaborative control architecture is constructed. Real-time operational data is used as input: a mechanistic model based on process principles provides a first adjustment quantity conforming to fundamental physical laws; a mathematical model, trained on the residual between the historical output of the mechanistic model and the actual adjustment quantity, outputs a second adjustment quantity to correct the first adjustment quantity. The mathematical model does not directly predict the optimal setpoint but focuses on compensating for inherent errors in the mechanistic model caused by process lag, external interference, and model simplification. Finally, the first and second adjustment quantities of the target controlled unit are superimposed to obtain the target adjustment quantity, and the target controlled unit is controlled based on this target adjustment quantity. This solves the problem of poor intelligence and untimely control response in traditional single-model wastewater treatment processes when dealing with data exhibiting lag characteristics.
[0067] Optionally, real-time operating data is used as input to a pre-trained mathematical model to obtain a second adjustment amount for the target controlled unit. This includes: performing data feature analysis on the real-time operating data based on the error source feature analysis library built into the mathematical model to identify the hysteresis error source category; the hysteresis error source category includes at least one of rapid dynamic error caused by sudden changes in water load and slow drift error caused by changes in biological population; and activating the compensation factor corresponding to the identified hysteresis error source category to calculate the second adjustment amount for the target controlled unit.
[0068] In this embodiment, the mathematical model, while focusing on compensating for errors caused by process lags, is also used to identify the types of lag error sources based on the characteristics of real-time operating data. For example, it identifies rapid dynamic errors caused by sudden changes in water load and slow drift errors caused by changes in biological populations. Then, different compensation methods are adopted according to different categories to calculate the second adjustment amount of the target controlled unit. By proposing targeted compensation measures for errors caused by different data types (such as rapid dynamic errors and slow drift errors), the accuracy of the second adjustment amount in compensating for the first adjustment amount is improved, thereby enhancing the treatment accuracy of the wastewater treatment process.
[0069] Furthermore, based on the identified hysteresis error source category, the compensation factor corresponding to the hysteresis error source category is activated, and the second adjustment amount of the target controlled unit is calculated, including: when the hysteresis error source category is a rapid dynamic error caused by a sudden change in water load, the second adjustment amount is calculated according to the following formula:
[0070] U_data=K_fast*ΔL
[0071] Wherein, U_data is the second adjustment quantity, K_fast is the first compensation factor corresponding to the rapid dynamic error caused by the sudden change in water load, ΔL is the instantaneous change of the current influent load L(t) relative to the average load L_avg of the previous preset time period, ΔL=L(t)-L_avg; the influent load L(t) is the product of the influent flow rate Q_in(t) and the concentration of key pollutants in the influent C_in(t).
[0072] When the hysteresis error source is slow drift error caused by changes in biological populations, the second adjustment amount is calculated using the following formula:
[0073] U_data=K_slow*∫(e(t))dt
[0074] Wherein, U_data is the second regulation, K_slow is the second step size factor corresponding to the slow drift error caused by changes in the biological population, and e(t) is the integral trend of the deviation between the first regulation U_mech of the mechanism model in the previous preset time period and the historical average regulation U_hist_avg, e(t) = U_mech(t) - U_hist_avg(t).
[0075] For example, when the mathematical model detects a sharp increase in the influent load L(t) within a short period, such as 15 minutes, and its rate of change ΔL / Δt exceeds a threshold, it is determined to be a rapid dynamic error caused by a sudden change in water load. At this point, the mathematical model activates the first compensation factor K_fast. K_fast is learned during the mathematical model training phase by optimizing the relationship between load shock events and the optimal compensation amount in historical operating data. The compensation amount U_data is calculated using the formula K_fast*ΔL, achieving immediate and proportional feedforward compensation for sudden loads, increasing aeration or carbon source dosage in advance before the effluent water quality deteriorates.
[0076] Similarly, when the mathematical model detects that the adjustment amount U_mech calculated by the mechanistic model continuously or unidirectionally deviates from the historical average adjustment amount U_hist_avg, for example, when the required aeration rate increases slowly to achieve the same effluent ammonia nitrogen, and this trend is consistent with the trends of slow variables such as water temperature and sludge age, it is determined to be a slow drift error caused by changes in the biological population. At this time, the mathematical model activates the second compensation factor K_slow and integrates the recent deviation e(t). The compensation amount U_data is calculated according to the formula K_slow*∫(e(t))dt, which is essentially an integral correction of the systematic deviation of the mechanistic model, slowly and continuously correcting the model parameters to rematch the current microbial activity. In this embodiment, by using different compensation factors for errors caused by different data types, the accuracy of compensating for the first adjustment amount is ensured.
[0077] Optionally, the target controlled unit includes the front-end controlled unit and non-front-end controlled unit in the wastewater treatment process chain;
[0078] Acquire real-time operational data of the target controlled unit in the wastewater treatment process chain after pretreatment, including: when the target controlled unit is a front-end controlled unit, the real-time operational data includes the detection data corresponding to the current front-end controlled unit; when the target controlled unit is not a front-end controlled unit, the real-time operational data includes the detection data corresponding to the current non-front-end controlled unit, and the operational status information of at least one front-end controlled unit corresponding to the current non-front-end controlled unit; the operational status information includes the target adjustment amount of the front-end controlled unit and / or the key water quality parameters generated after the control is executed based on the target adjustment amount.
[0079] In this embodiment, the controlled unit is divided into front-end controlled units and non-front-end controlled units. Combined with... Figure 2 In one embodiment shown, the pretreatment unit is the front-end controlled unit, while the remaining units are non-front-end controlled units. It is important to emphasize that the definition of a front-end controlled unit is not simply the first controlled unit in the wastewater treatment process chain, but rather refers to units preceding it that are not affected by data due to "hysteresis characteristics." For example... Figure 2 Before the pre-processing unit, the pump flow rate is increased by the booster unit. This is not data with "hysteresis characteristics", so it does not affect the pre-processing unit as the front-end controlled unit.
[0080] The significance of distinguishing between front-end controlled units and non-front-end controlled units lies in the fact that, from a process control perspective, the entire wastewater treatment process can achieve its operational goals by stably controlling the operation and output of each controlled unit. That is, in the initial control logic, it is desirable for the input data of each controlled unit to be independent, requiring processing and analysis only based on the current operating data. However, process control differs from technological operation; data with "lag characteristics" will more or less influence subsequent controlled processes. Therefore, in this embodiment, the input of non-front-end controlled units includes not only the detection data corresponding to the current non-front-end controlled unit but also the operating status information of at least one front-end controlled unit corresponding to the current non-front-end controlled unit, all of which are considered as factors in the mathematical and mechanistic models. The operating status information includes the target adjustment amount of the front-end controlled unit and / or key water quality parameters generated after control is executed based on the target adjustment amount. In a feasible implementation, the operating status information of at least one front-end controlled unit corresponding to the non-front-end controlled unit is typically given a weight of less than 20%, considering the influence of the front-end controlled unit of the current controlled unit without being dominated by it.
[0081] Optionally, after obtaining the target adjustment amount and before controlling the target controlled unit with the target adjustment amount, the method further includes: determining whether the target controlled unit has a preset adjustment threshold value and a single adjustment maximum threshold value; if the target controlled unit has an adjustment threshold value, and the target adjustment amount is less than the adjustment threshold value, then the target adjustment amount is determined to be 0; if the target controlled unit has a single adjustment maximum threshold value, and the target adjustment amount is greater than the single adjustment maximum threshold value, then the set value of the single adjustment maximum threshold value is used as the target adjustment amount.
[0082] In this embodiment, the adjustment threshold is the minimum adjustment value. For example, if the final target adjustment is 0.02Hz, which is less than the adjustment threshold of 0.25Hz, then the target adjustment is 0. The maximum threshold for a single adjustment is the threshold of the maximum adjustment value. For example, in a sludge dewatering unit: the moisture content is set to 78%, sludge concentration, flow rate, and actual sludge moisture content are collected (75%). The dewatering machine belt speed is adjusted to 0.20m / min based on the mechanism model, and the output speed is 0.05m / min based on the mechanism model. The final output speed is 0.25m / min. Since the maximum adjustment limit for a single adjustment is 0.20m / min, the given speed for this operation is 0.20m / min. By setting adjustment limit protection, the safe and stable operation of the equipment is ensured.
[0083] Optionally, after obtaining the second adjustment value of the target controlled unit by using real-time running data as input to a pre-trained mathematical model, the method further includes: recording and storing the correction data corresponding to the second adjustment value, the correction data including the controlled unit, running data and first adjustment value corresponding to the second adjustment value; and updating the model parameters of the mathematical model based on the correction data according to a preset period.
[0084] In this embodiment, as Figure 3 As shown, after processing real-time operational data using a hybrid model architecture combining mechanistic and mathematical models, the system also includes an online dynamic correction and update strategy for the mathematical model. Specifically, based on the controlled unit corresponding to the second adjustment variable, the operational data, and the first adjustment variable, the mathematical model is updated and iterated at a preset cycle to ensure that the mathematical model can stably adapt to the working scenario over a long period.
[0085] Optionally, the real-time operating data of the target controlled unit in the wastewater treatment process chain after preprocessing is obtained, including: predicting the operating data of the target controlled unit through a prediction model to obtain the predicted value; and correcting the actual value according to the predicted value when the deviation between the predicted value and the actual value exceeds a preset threshold, so as to obtain the real-time operating data after preprocessing.
[0086] The steps for obtaining the prediction model include: acquiring historical operating data of the target controlled unit within a preset historical time period; and training the initial XGBoost model based on the historical operating data to obtain the prediction model.
[0087] In this embodiment, the preprocessing process is described. For example, firstly, historical operational data for the past 6 months at this location is acquired, including related parameters such as influent flow rate, COD, DO, and pH. An XGBoost regression model is then trained to obtain a prediction model, which can accurately predict ammonia nitrogen values from other related parameters. During real-time operation, both the actual instrument values and the predicted values from the XGBoost model are read simultaneously. If the deviation between the two continuously exceeds 25% (a preset threshold), the instrument data is considered abnormal. Subsequent analysis can be used to remove, replace, or interpolate abnormal values, thereby ensuring the reliability of the real-time operational data.
[0088] The following section, in conjunction with the above embodiments, provides a more detailed description of the solutions in the above embodiments through a specific implementation method. The details are as follows:
[0089] Scenario: A wastewater treatment plant uses the AAO process, with a target effluent TN ≤ 12.5 mg / L. Carbon source addition is initially controlled by a basic mechanistic model (based on material balance formulas), but faces two typical lags:
[0090] Rapid dynamic error: During peak periods, the COD concentration in the influent suddenly increases, and the demand for denitrification in the biological tank surges, but the feedback from the TN meter in the effluent is severely lagging, resulting in insufficient chemical dosing.
[0091] Slow drift error: Seasonal changes cause water temperature variations, which slowly alter the activity of denitrifying bacteria, leading to systematic deviations in the mechanistic model with fixed parameters.
[0092] Step 1: Model Training and Parameter Determination
[0093] Before the system is put into operation, historical operating data is used to train and determine key parameters.
[0094] Definition and calculation of characteristic quantities:
[0095] Influent load L(t): L(t) = Q_in(t) × COD_in(t), where Q_in is the influent flow rate and COD_in is the influent COD concentration.
[0096] Load impact ΔL: ΔL(t) = L(t) - L_avg, where L_avg is the moving average of L(t) over the past 2 hours.
[0097] Model bias e(t): e(t) = U_mech(t) - U_hist_avg(t). U_mech(t) is the carbon source dosage calculated by the mechanistic model at time t; U_hist_avg(t) is the average actual dosage under the same operating conditions (similar influent and water temperature) in history.
[0098] Historical error source categories:
[0099] When ΔL(t) continuously exceeds the threshold (e.g., 200 kg / h) and the residual (actual dosage - model calculation) is positive during a certain historical period, this period is marked as the period dominated by "rapid dynamic error".
[0100] When ΔL(t) is stable during a certain historical period, but e(t) remains positive or negative for more than several days and is related to the trend of water temperature change, this period is marked as the period dominated by "slow drift error".
[0101] Optimizing the compensation factor: The optimal compensation factor is determined using optimization algorithms (such as gradient descent) with the objective of minimizing the total historical residuals.
[0102] The first compensation factor, K_fast, is obtained by correlating data from the "rapid dynamic error" period and optimizing it to K_fast = 0.05(L / h) / (kg / h). Its physical meaning is that for every unit (kg / h) of positive influent load impact, an additional 0.05 liters / hour of carbon source needs to be immediately compensated.
[0103] The second compensation factor K_slow: associated with the data of the "slow drift error" period, optimized to K_slow=0.8, is a dimensionless gain coefficient.
[0104] Step Two: Online Real-Time Operation and Compensation
[0105] The system is running online and executes the following process once per minute:
[0106] Data acquisition and feature calculation:
[0107] Real-time readings showed Q_in = 1200 m³ / h and COD_in = 350 mg / L.
[0108] Calculate the current influent load L(t) = 1200 × 350 / 1000 = 420 kg / h (divide by 1000 for unit conversion).
[0109] Assuming L_avg is 380 kg / h, the load impact ΔL(t) is calculated as 420 - 380 = 40 kg / h.
[0110] Calculate the recent deviation integral trend: Assume that the integral sum of e(t) over the past 6 hours is +150L (indicating that the mechanism model continuously underestimates the dosage).
[0111] Error source identification:
[0112] Since ΔL(t) = 40 kg / h does not exceed the rapid error judgment threshold (200 kg / h), the "rapid dynamic error" is excluded as the dominant factor.
[0113] Since ∫e(t)dt=+150L has exceeded the slow error judgment threshold (100L), and the water temperature has been decreasing recently, the system determines that the current problem is dominated by "slow drift error caused by changes in biological population".
[0114] Activate the corresponding compensation factor and calculate the second adjustment:
[0115] Based on the identification results, the second compensation factor K_slow=0.8 is activated.
[0116] The second adjustment amount is calculated using the formula: U_data=K_slow*∫(e(t))dt=0.8*150L=120L. This is to correct the recent persistent systematic underestimation of the model, and an additional 120 liters of carbon source is required for compensation.
[0117] Control system execution: Assume the mechanism model calculates the first adjustment amount U_mech = 500 L / h based on the current nitrate nitrogen.
[0118] The final target adjustment amount U_final=U_mech+U_data=500+120=620L / h, and the control system sets the carbon source dosing pump frequency to the corresponding 620L / h level.
[0119] Furthermore, as Figures 1 to 3 The specific implementation of the method shown in this embodiment provides a wastewater treatment process control device, such as... Figure 4 As shown, the device includes:
[0120] The acquisition unit 401 is configured to acquire the pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain;
[0121] The first calculation unit 402 is configured to use the real-time operating data as input to a pre-built mechanism model to obtain a first adjustment amount of the target controlled unit; the pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to output a first adjustment amount of the control parameters of the target controlled unit according to the real-time operating data.
[0122] The second computing unit 403 is configured to use the real-time operating data as input to a pre-trained mathematical model to obtain a second adjustment amount of the target controlled unit; the pre-trained mathematical model is trained by using the historical operating data of the target controlled unit as input and the residual between the first adjustment amount output by the pre-trained mechanism model on the historical operating data and the historical actual adjustment amount as the training target.
[0123] The adjustment unit 404 is configured to superimpose the first adjustment amount and the second adjustment amount of the target controlled unit to obtain a target adjustment amount, and to control the target controlled unit based on the target adjustment amount;
[0124] Each type of controlled unit has a corresponding mechanistic model and mathematical model.
[0125] In specific application scenarios, the second computing unit 403 is further configured to perform data feature analysis on the real-time operating data based on the error source feature analysis library built into the mathematical model, and identify the hysteresis error source category; the hysteresis error source category includes at least one of the following: rapid dynamic error caused by sudden changes in water load and slow drift error caused by changes in biological population; according to the identified hysteresis error source category, the compensation factor corresponding to the hysteresis error source category is activated, and the second adjustment amount of the target controlled unit is calculated.
[0126] In a specific application scenario, the second calculation unit 403 is further configured to calculate the second adjustment amount according to the following formula when the hysteresis error source category is rapid dynamic error caused by sudden change in water load:
[0127] U_data=K_fast*ΔL
[0128] Wherein, U_data is the second adjustment amount, K_fast is the first compensation factor corresponding to the rapid dynamic error caused by the sudden change in water load, ΔL is the instantaneous change of the current influent load L(t) relative to the average load L_avg of the previous preset time period, ΔL=L(t)-L_avg; the influent load L(t) is the product of the influent flow rate Q_in(t) and the concentration of key pollutants in the influent C_in(t);
[0129] When the hysteresis error source is classified as slow drift error caused by changes in biological populations, the second adjustment amount is calculated using the following formula:
[0130] U_data=K_slow*∫(e(t))dt
[0131] Wherein, U_data is the second regulation, K_slow is the second step size factor corresponding to the slow drift error caused by changes in the biological population, and e(t) is the integral trend of the deviation between the first regulation U_mech of the mechanism model in the previous preset time period and the historical average regulation U_hist_avg, e(t) = U_mech(t) - U_hist_avg(t).
[0132] In specific application scenarios, the acquisition unit 401 is further configured such that, when the target controlled unit is a front-end controlled unit, the real-time operating data includes the detection data corresponding to the current front-end controlled unit; when the target controlled unit is a non-front-end controlled unit, the real-time operating data includes the detection data corresponding to the current non-front-end controlled unit and the operating status information of at least one front-end controlled unit corresponding to the current non-front-end controlled unit; the operating status information includes the target adjustment amount of the front-end controlled unit and / or the key water quality parameters generated after control is executed based on the target adjustment amount.
[0133] In specific application scenarios, the adjustment unit 404 is further configured to determine whether the target controlled unit has a preset adjustment threshold and a single adjustment maximum threshold; if the target controlled unit has the adjustment threshold, and the target adjustment amount is less than the adjustment threshold, then the target adjustment amount is determined to be 0; if the target controlled unit has the single adjustment maximum threshold, and the target adjustment amount is greater than the single adjustment maximum threshold, then the set value of the single adjustment maximum threshold is used as the target adjustment amount.
[0134] In a specific application scenario, the adjustment unit 404 is further configured to record and store correction data corresponding to the second adjustment amount, the correction data including the controlled unit, operating data and the first adjustment amount corresponding to the current second adjustment amount; and to update the model parameters of the mathematical model based on the correction data according to a preset period.
[0135] In a specific application scenario, the acquisition unit 401 is further configured to predict the operating data of the target controlled unit through a prediction model to obtain a predicted value; if the deviation between the predicted value and the actual value exceeds a preset threshold, the actual value is corrected according to the predicted value to obtain the preprocessed real-time operating data.
[0136] The steps for obtaining the prediction model include: acquiring historical operating data of the target controlled unit within a preset historical time period; and training an initial XGBoost model based on the historical operating data to obtain the prediction model.
[0137] It should be noted that other corresponding descriptions of the functional units involved in the wastewater treatment process control device provided in this embodiment can be found in [reference]. Figures 1 to 3 The corresponding descriptions in [the document] will not be repeated here.
[0138] Based on the above, Figures 1 to 3 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figures 1 to 3 The method shown.
[0139] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0140] Based on the above, Figures 1 to 3 The method shown, and Figure 4 To achieve the above objectives, this application also provides an electronic device, which can be configured on a computer side, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-described objectives. Figures 1 to 3 The method shown.
[0141] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0142] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0143] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By applying the solution of this embodiment, firstly, by acquiring pre-processed real-time operating data in the wastewater treatment process chain, the accuracy and reliability of the data are ensured, and fluctuations caused by instrument noise or abnormal values are reduced. At its core, a control architecture with a mechanistic-mathematical dual-model collaboration is constructed. Real-time operating data is used as input: a mechanistic model based on process principles provides a first adjustment quantity that conforms to basic physical laws; a mathematical model, with the residual between the historical output of the mechanistic model and the actual adjustment quantity as the training target, is used to output a second adjustment quantity to correct the first adjustment quantity. The mathematical model does not directly predict the optimal setpoint, but focuses on compensating for the inherent errors of the mechanistic model caused by process lag, external interference, and model simplification. Finally, the first and second adjustment quantities of the target controlled unit are superimposed to obtain the target adjustment quantity, and the target controlled unit is controlled based on the target adjustment quantity. This solves the problem of poor intelligence and untimely control response of traditional single models when dealing with data with lag characteristics in wastewater treatment processes.
[0145] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0146] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0147] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for controlling a wastewater treatment process, characterized in that, include: Acquire real-time operational data of the target controlled unit in the wastewater treatment process chain after pretreatment; The real-time operating data is used as input to a pre-built mechanistic model to obtain the first adjustment amount of the target controlled unit; The pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to adjust the first adjustment amount of the control parameters of the target controlled unit according to the real-time operation data output. The real-time operating data is used as input to a pre-trained mathematical model to obtain the second adjustment amount of the target controlled unit; the pre-trained mathematical model is trained by taking the historical operating data of the target controlled unit as input and using the residual between the first adjustment amount output by the pre-trained mechanistic model on the historical operating data and the historical actual adjustment amount as the training target. The first adjustment amount and the second adjustment amount of the target controlled unit are superimposed to obtain the target adjustment amount, and the target controlled unit is controlled based on the target adjustment amount; Each type of controlled unit has a corresponding mechanistic model and mathematical model.
2. The method according to claim 1, characterized in that, The step of using the real-time operational data as input to a pre-trained mathematical model to obtain the second adjustment variable of the target controlled unit includes: Based on the error source feature analysis library built into the mathematical model, data feature analysis is performed on the real-time operating data to identify the hysteresis error source categories; the hysteresis error source categories include at least one of the following: rapid dynamic error caused by sudden changes in water load and slow drift error caused by changes in biological populations; Based on the identified hysteresis error source category, the compensation factor corresponding to the hysteresis error source category is activated, and the second adjustment amount of the target controlled unit is calculated.
3. The method according to claim 2, characterized in that, The step of activating the compensation factor corresponding to the identified hysteresis error source category and calculating the second adjustment amount of the target controlled unit includes: When the hysteresis error source is a rapid dynamic error caused by a sudden change in water load, the second adjustment amount is calculated according to the following formula: U_data=K_fast*ΔL Wherein, U_data is the second adjustment amount, K_fast is the first compensation factor corresponding to the rapid dynamic error caused by the sudden change in water load, ΔL is the instantaneous change of the current influent load L(t) relative to the average load L_avg of the previous preset time period, ΔL=L(t)-L_avg; the influent load L(t) is the product of the influent flow rate Q_in(t) and the concentration of key pollutants in the influent C_in(t); When the hysteresis error source is classified as slow drift error caused by changes in biological populations, the second adjustment amount is calculated using the following formula: U_data=K_slow*∫(e(t))dt Wherein, U_data is the second regulation, K_slow is the second step size factor corresponding to the slow drift error caused by changes in the biological population, and e(t) is the integral trend of the deviation between the first regulation U_mech of the mechanism model in the previous preset time period and the historical average regulation U_hist_avg, e(t) = U_mech(t) - U_hist_avg(t).
4. The method according to claim 1, characterized in that, The target controlled unit includes the front-end controlled unit and non-front-end controlled unit in the wastewater treatment process chain; The acquisition of pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain includes: When the target controlled unit is a front-end controlled unit, the real-time operating data includes the detection data corresponding to the current front-end controlled unit; When the target controlled unit is a non-front-end controlled unit, the real-time operating data includes the detection data corresponding to the current non-front-end controlled unit and the operating status information of at least one front-end controlled unit corresponding to the current non-front-end controlled unit; the operating status information includes the target adjustment amount of the front-end controlled unit and / or the key water quality parameters generated after the control is executed based on the target adjustment amount.
5. The method according to claim 1, characterized in that, After obtaining the target adjustment amount and before the target adjustment amount controls the target controlled unit, the method further includes: Determine whether the target controlled unit has a preset adjustment threshold and a maximum threshold for a single adjustment; If the target controlled unit is determined to have the adjustment threshold, and the target adjustment amount is less than the adjustment threshold, then the target adjustment amount is determined to be 0. If it is determined that the target controlled unit has the maximum single adjustment threshold, and if the target adjustment amount is greater than the maximum single adjustment threshold, then the set value of the maximum single adjustment threshold is used as the target adjustment amount.
6. The method according to claim 1, characterized in that, After obtaining the second adjustment value of the target controlled unit by using the real-time running data as input to a pre-trained mathematical model, the method further includes: Record and store the correction data corresponding to the second adjustment amount, the correction data including the controlled unit, operating data and the first adjustment amount corresponding to the current second adjustment amount; The model parameters of the mathematical model are updated according to the correction data at a preset period.
7. The method according to claim 1, characterized in that, The acquisition of pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain includes: The predicted value is obtained by predicting the operating data of the target controlled unit through a prediction model; If the deviation between the predicted value and the actual value exceeds a preset threshold, the actual value is corrected based on the predicted value to obtain the preprocessed real-time operating data. The steps for obtaining the prediction model include: Acquire historical operational data of the target controlled unit within a preset historical time period; The initial XGBoost model is trained based on the historical operating data to obtain the prediction model.
8. A wastewater treatment process control device, characterized in that, include: The acquisition unit is configured to acquire pre-processed real-time operating data of the target controlled unit in the wastewater treatment process chain; The first computing unit is configured to use the real-time operating data as input to a pre-built mechanistic model to obtain a first adjustment amount for the target controlled unit; The pre-built mechanism model is constructed based on the process principle of the target controlled unit and is used to adjust the first adjustment amount of the control parameters of the target controlled unit according to the real-time operation data output. The second computing unit is configured to use the real-time running data as input to a pre-trained mathematical model to obtain a second adjustment amount for the target controlled unit; The pre-trained mathematical model is obtained by taking the historical operating data of the target controlled unit as input and using the residual between the first adjustment amount output by the pre-trained mechanism model on the historical operating data and the historical actual adjustment amount as the training target. The adjustment unit is configured to superimpose the first adjustment amount and the second adjustment amount of the target controlled unit to obtain a target adjustment amount, and to control the target controlled unit based on the target adjustment amount; Each type of controlled unit has a corresponding mechanistic model and mathematical model.
9. An electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.