A sewage treatment full-process hierarchical collaborative control system and method based on working condition identification
By using a full-process hierarchical collaborative control system based on operating condition identification, combined with a mechanism model and a data-driven model, the problem of balancing effluent quality fluctuations and operating costs caused by sudden shock loads in wastewater treatment has been solved, achieving effluent stability and energy saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZERO ONE ECOLOGICAL ENVIRONMENT R&D CENTER (SHENZHEN) CO LTD
- Filing Date
- 2026-04-17
- Publication Date
- 2026-07-14
AI Technical Summary
Existing wastewater treatment technologies are unable to cope with sudden shock loads in a timely manner, resulting in fluctuations in effluent quality and difficulty in balancing operating costs.
A full-process hierarchical collaborative control system based on operating condition identification is adopted. Through data acquisition, twin and prediction, operating condition identification and collaborative decision-making modules, combined with mechanism model and data-driven model, the system can achieve precise control of the wastewater treatment process.
It improves the feedforward response capability to changes in influent load, achieves an effective balance between effluent stability and operating costs, and avoids the misjudgment problem in traditional methods.
Smart Images

Figure CN122380468A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial intelligent control technology, and in particular to a hierarchical collaborative control system and method for the entire wastewater treatment process based on operating condition identification. Background Technology
[0002] Wastewater treatment processes often employ the activated sludge method, which exhibits significant nonlinearity, strong coupling, and large time delays, with complex mass transfer and reaction relationships between different treatment units. Against this backdrop, control technology has evolved from single-loop PID control to model-driven control (such as model predictive control) and data-driven control (such as neural network control). In recent years, with the development of the Industrial Internet and artificial intelligence technologies, wastewater treatment systems based on digital twins have gradually emerged. By constructing virtual factories to map actual operating states, they achieve visualization of the operating process and support for decision-making. Simultaneously, time series predictive models (such as LSTM neural networks) are widely used for influent water quality and load prediction, providing data support for feedforward control.
[0003] However, existing technologies mainly rely on feedback regulation, which has a significant lag and is difficult to respond to sudden shock loads in a timely manner. This can easily lead to fluctuations in effluent water quality or even exceed the standards. Furthermore, the use of fixed weights makes it impossible to dynamically adjust the importance of each target according to different operating conditions, making it difficult to achieve an effective balance between effluent stability and operating costs under shock loads or fluctuating conditions. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a hierarchical collaborative control system and method for the entire wastewater treatment process based on operating condition identification, which solves the problems of existing technologies being unable to respond to sudden shock loads in a timely manner, easily causing fluctuations or even exceeding of standards in effluent water quality, and making it difficult to achieve an effective balance between effluent stability and operating costs.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification, comprising,
[0008] The data acquisition module deploys online monitoring instruments and sensors to collect multi-source data, preprocess it, and obtain standardized data.
[0009] The twin and prediction module constructs an ASM2d mechanism model based on standardized data and performs parameter correction. It then outputs biochemical process prediction variables and concatenates them with standardized data to form an input vector. The predicted influent data are obtained through the input vector.
[0010] The operating condition identification module calculates multiple rates of change based on predicted water inflow data and performs weighted fusion using preset weights to obtain a comprehensive index of shock load. Then, it performs a preliminary judgment of the operating condition and generates a label for the current operating condition based on a preset judgment threshold.
[0011] The collaborative decision-making module constructs a decision variable vector and a comprehensive objective function based on the current operating condition label, performs collaborative optimization, and sends the optimal control variable vector to the PLC for execution equipment control.
[0012] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in this invention, the deployment of online monitoring instruments and sensors to collect multi-source data and preprocess it to obtain standardized data involves setting up online monitoring instruments and sensors at the wastewater treatment plant's inlet main pipe, each functional section of the biological treatment tank, the effluent weir of the secondary sedimentation tank, and the effluent channel; and collecting data such as chemical oxygen demand, ammonia nitrogen concentration, total nitrogen, total phosphorus, instantaneous flow rate, water temperature, dissolved oxygen, mixed liquor suspended solids concentration, and nitrate nitrogen concentration through the online monitoring instruments and sensors.
[0013] All online monitoring instruments and sensors are connected to the edge computing gateway, and the gateway sends data packets with timestamps to the upper-level server.
[0014] A sliding window is established on the host server side. After parsing the data packets, the data is divided by the sliding window. Then, outlier removal and standardization are performed on the data in each window to obtain standardized data. The multi-source data includes chemical oxygen demand, ammonia nitrogen concentration, total nitrogen, total phosphorus, instantaneous flow rate, water temperature, dissolved oxygen, mixed liquor suspended solids concentration, and nitrate nitrogen concentration.
[0015] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in this invention, the following steps are taken: After constructing the ASM2d mechanism model and performing parameter correction, the predicted variables are output and concatenated with standardized data to form an input vector. The predicted influent data are then obtained through the input vector, as detailed below:
[0016] A mechanism model of ASM2d was constructed in the MATLAB environment and embedded with heterotrophic bacterial degradation reaction. Standardized data were used as input to perform ASM2d mechanism model correction.
[0017] Training was performed on the ASM2d mechanistic model;
[0018] Predictive variables are obtained through the trained ASM2d mechanism model, including predicted effluent ammonia nitrogen concentration, predicted effluent chemical oxygen demand, predicted effluent total nitrogen concentration, predicted mixed liquor nitrate concentration, predicted mixed liquor ammonia nitrogen concentration, and predicted oxygen demand.
[0019] The input vector is constructed as the input to the LSTM neural network model, and the output is the predicted influent data, including the predicted influent chemical oxygen demand, the predicted influent ammonia nitrogen concentration, and the predicted influent instantaneous flow rate.
[0020] As a preferred embodiment of the wastewater treatment process hierarchical collaborative control system based on working condition identification described in this invention, the calculation of multiple change rates involves using the difference between the predicted influent data and the corresponding current influent data as the numerator, and the current influent data as the denominator to obtain multiple change rates, including the chemical oxygen demand change rate, the ammonia nitrogen concentration change rate, and the instantaneous flow rate change rate.
[0021] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in this invention, wherein: the preliminary operating condition determination is performed by using a preset determination threshold. and and make The comprehensive index of impact load is compared with the judgment threshold. and Compare;
[0022] If the comprehensive index of impact load is less than the judgment threshold If so, it means that the operating conditions within that window are stable;
[0023] If the comprehensive index of impact load is greater than or equal to the judgment threshold Furthermore, the comprehensive index of impact load is less than the judgment threshold. If so, it indicates that the operating conditions within this window are load fluctuations;
[0024] If the comprehensive index of impact load is greater than or equal to the judgment threshold If so, it indicates that the operating condition within that window is an impact load.
[0025] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in this invention, the current operating condition label generation involves: statistically analyzing the comprehensive index of impact load under each operating condition, and taking the average of all comprehensive indices of impact load under each operating condition as the standard center value of the corresponding operating condition; subsequently, the distance between the comprehensive index of impact load and each standard center value is calculated using a one-dimensional Euclidean distance method, sorted, and the operating condition corresponding to the smallest distance is taken as the current operating condition label.
[0026] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in this invention, the following steps are taken: Constructing a decision variable vector based on the current operating condition label involves: if the current operating condition label indicates load fluctuation or impact load, obtaining the flow rates of the internal and external return pipes via electromagnetic flowmeters; calculating the ratios of the flow rates of the internal and external return pipes to the current instantaneous influent flow rate to obtain the internal return ratio and external return ratio; subsequently, reading the current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint from the PLC; and concatenating the read current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint with the internal and external return ratios to form the decision variable vector.
[0027] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on working condition identification as described in this invention, the collaborative optimization is based on the predicted effluent ammonia nitrogen concentration and the predicted effluent total nitrogen concentration to construct an effluent compliance objective function.
[0028] Based on the current dissolved oxygen setpoint and internal reflux ratio, construct an energy consumption objective function;
[0029] Based on the carbon source dosing setpoint and the phosphorus removal agent dosing setpoint, a chemical consumption objective function is constructed.
[0030] The objective functions for achieving water quality standards, energy consumption, and chemical consumption are weighted to generate a comprehensive objective function, which is then used to minimize the decision variable vector.
[0031] As a preferred embodiment of the hierarchical collaborative control system for the entire wastewater treatment process based on working condition identification as described in this invention, the step of obtaining the optimal control variable vector and sending it to the PLC for equipment control involves, after iterating to the maximum number of times, outputting the decision variable vector corresponding to the minimized objective function value as the optimal control variable vector; subsequently, the optimal control variable vector is sent to the PLC via the OPC communication protocol. The PLC, based on each variable in the optimal control variable vector, controls the frequency converter to adjust the blower speed, internal reflux pump frequency, and external reflux pump frequency, thereby adjusting the dissolved oxygen setpoint, internal reflux ratio, and external reflux ratio of the aerobic tank; simultaneously, it controls the carbon source and phosphorus removal agent metering pumps to achieve corresponding flow rate outputs.
[0032] Secondly, this invention provides a hierarchical collaborative control method for the entire wastewater treatment process based on operating condition identification, including:
[0033] Deploy online monitoring instruments and sensors to collect multi-source data, perform preprocessing, and obtain standardized data;
[0034] After constructing an ASM2d mechanism model based on standardized data and correcting its parameters, the model outputs biochemical process prediction variables and concatenates them with standardized data to form an input vector. Predicted influent data are then obtained through the input vector.
[0035] Based on the predicted inflow data, multiple rates of change are calculated and weighted and fused using preset weights to obtain the comprehensive index of shock load. Then, a preliminary judgment of the operating condition and the generation of the current operating condition label are performed through a preset judgment threshold.
[0036] Based on the current operating condition label, a decision variable vector and a comprehensive objective function are constructed for collaborative optimization, and the optimal control variable vector is sent to the PLC for execution equipment control.
[0037] The beneficial effects of this invention are as follows: By combining the mechanistic model with the data-driven model, this invention improves the prediction accuracy of complex biochemical processes, thereby enhancing the system's feedforward response capability to changes in influent load. Furthermore, by constructing a comprehensive index of shock load based on multivariate change rates, it achieves accurate identification of operating conditions, avoiding the misjudgment problems caused by traditional single-variable judgment. Secondly, by combining the optimization objectives between effluent water quality, energy consumption, and chemical consumption, it can achieve energy saving and consumption reduction while ensuring stable effluent compliance. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a structural diagram of the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification in Example 1.
[0040] Figure 2 This is a flowchart of the hierarchical collaborative control method for the entire wastewater treatment process based on operating condition identification in Example 1.
[0041] Figure 3 This is a flowchart of the current operating condition label generation process in Example 1. Detailed Implementation
[0042] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0043] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0044] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0045] Example 1, referring to Figures 1-3 This is the first embodiment of the present invention, which provides a hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification, including the following steps:
[0046] S1, Data Acquisition Module: Deploys online monitoring instruments and sensors to collect multi-source data, perform preprocessing, and obtain standardized data;
[0047] Specifically, online monitoring instruments and sensors are installed at the main inlet pipe of the sewage treatment plant, each functional section of the biological treatment tank, the outlet weir of the secondary sedimentation tank, and the effluent channel; the online monitoring instruments and sensors collect data on chemical oxygen demand, ammonia nitrogen concentration, total nitrogen, total phosphorus, instantaneous flow rate, water temperature, dissolved oxygen, mixed liquor suspended solids concentration, and nitrate nitrogen concentration.
[0048] All online monitoring instruments and sensors are connected to the edge computing gateway, and the gateway sends data packets with timestamps to the upper-level server.
[0049] A sliding window is established on the host server side. After parsing the data packets, the data is divided by the sliding window. Then, outlier removal and standardization are performed on the data in each window to obtain standardized data.
[0050] It should be noted that the online monitoring instruments are specifically set up as follows: COD online analyzer, ammonia nitrogen online analyzer, total nitrogen online analyzer, electromagnetic flow meter, temperature sensor and pH meter are installed in the influent section; dissolved oxygen sensor, mixed liquor suspended solids concentration sensor (MLSS) and nitrate nitrogen online meter are installed in the biochemical section; COD, ammonia nitrogen, total nitrogen and total phosphorus online meters are installed in the effluent section; and chemical oxygen demand, ammonia nitrogen concentration, total nitrogen and total phosphorus must be collected at both the influent and effluent ends.
[0051] S2, Twin and Prediction Module: Based on standardized data, the ASM2d mechanism model is constructed and the parameters are corrected. The output is the predictive variable of the biochemical process, which is then concatenated with the standardized data to form an input vector. The predicted water inflow data is obtained through the input vector.
[0052] S2.1 Construct an ASM2d mechanism model in the MATLAB environment and embed the heterotrophic bacterial degradation reaction. Use standardized data as input and perform ASM2d mechanism model calibration.
[0053] Specifically, the mathematical structure of the ASM2d mechanism model is built in MATLAB to generate the ASM2d mechanism model. Then, after embedding the standard heterotrophic degradation reaction as the calculation rule into the ASM2d mechanism model, the standardized data is used as input. In MATLAB, the ode45 numerical integration method is used to solve the heterotrophic degradation reaction, thereby realizing the correction of the ASM2d mechanism model.
[0054] It should be noted that the specific implementation of the standard heterotrophic bacterial degradation reaction is as follows: the growth rate of the heterotrophic bacteria is set to be the product of the maximum growth rate and multiple limiting factors, including the effects of organic matrix concentration, dissolved oxygen concentration, and ammonia nitrogen concentration on the reaction; each limiting factor is described in the form of "the ratio of the current concentration to the half-saturation constant", thus reflecting the inhibitory effect of a certain substance on the reaction rate when the concentration is low; when the three limiting factors act simultaneously, the final heterotrophic bacterial reaction rate is obtained by multiplying them one by one; secondly, when using the ode45 numerical integration method to solve the equation of state, the integration step size can be set to 60 seconds for example, so as to be consistent with the data acquisition cycle and avoid calculation errors caused by inconsistent time scales.
[0055] S2.2 Training the ASM2d mechanism model;
[0056] Specifically, an objective function is constructed, and the parameters are updated using the recursive least squares method. When the function value of the objective function no longer decreases, the iteration stops, and the trained ASM2d mechanism model is output.
[0057] The objective function is expressed as:
[0058]
[0059] In the formula, Represents the objective function value. Indicates the quantity of standardized data. Indicates the first The true value of a standardized data set. Indicates the first Predicted values of standardized data;
[0060] The recursive least squares method is used for parameter updates, expressed as:
[0061]
[0062] In the formula, Indicates the first The parameter vector at the next iteration Indicates the first The parameter vector at the next iteration Indicates the first The gain matrix at the next iteration;
[0063] The expression for calculating the gain matrix is as follows:
[0064]
[0065] In the formula, Indicates the first The covariance matrix at the next iteration Indicates the first The sensitivity vector at the next iteration Indicates the forgetting factor, Indicates the transpose operation;
[0066] It should be noted that during model iteration, the following parameters are used as the parameter vector: maximum specific growth rate of heterotrophic bacteria, half-saturation constant of organic matrix, half-saturation constant of dissolved oxygen, half-saturation constant of ammonia nitrogen, and heterotrophic bacteria yield coefficient. Whenever a new set of data is obtained, the difference between the current model's predicted output and the actual measured value is first calculated, and then the parameter vector is corrected based on this difference.
[0067] During parameter correction, a gain matrix is introduced to control the parameter update magnitude. The gain matrix is jointly determined by the covariance matrix and the sensitivity vector. The covariance matrix describes the uncertainty of the current parameters, and its initial value is set as a diagonal matrix, with the diagonal elements exemplarily set to 10,000, thus indicating that the parameter uncertainty is relatively high in the initial stage. The sensitivity vector represents the sensitivity of the model output to changes in each parameter. Its specific calculation method is as follows: apply a small perturbation of a fixed proportion to each parameter (e.g., increase the original parameter value by one percent), rerun the model, calculate the change in the model output, and divide the change by the perturbation magnitude to obtain the sensitivity value corresponding to the parameter. After performing this operation on all parameters, a complete sensitivity vector is formed.
[0068] Secondly, the forgetting factor can be set to a constant between 0 and 1, and for example, it is set to 0.98. The value of 0.98 is determined as follows: when the forgetting factor is close to 1, it indicates that the model retains historical data to a high degree, which is suitable for situations where the operating conditions change slowly; when the forgetting factor is low, it indicates that the model relies more on recent data, which is suitable for situations where the operating conditions change rapidly.
[0069] S2.3 Obtain prediction variables through the trained ASM2d mechanism model, including predicted effluent ammonia nitrogen concentration, predicted effluent chemical oxygen demand, predicted effluent total nitrogen concentration, predicted mixed liquor nitrate concentration, predicted mixed liquor ammonia nitrogen concentration, and predicted oxygen demand.
[0070] Specifically, the standardized data in the current window is input into the ASM2d mechanism model, which outputs the predicted effluent ammonia nitrogen concentration, predicted effluent chemical oxygen demand, predicted effluent total nitrogen concentration, predicted mixed liquor nitrate concentration, predicted mixed liquor ammonia nitrogen concentration, and predicted oxygen demand.
[0071] S2.4 Construct an input vector as the input to the LSTM neural network model and output the predicted influent data, including the predicted influent chemical oxygen demand, the predicted influent ammonia nitrogen concentration, and the predicted influent instantaneous flow rate.
[0072] Specifically, the predicted nitrate concentration, ammonia nitrogen concentration, and oxygen demand of the mixed liquor are concatenated with the influent chemical oxygen demand, ammonia nitrogen concentration, instantaneous flow rate, and water temperature in the standardized data within the current window to generate an input vector;
[0073] The input vector is used as the input to the LSTM neural network model, and the output is the predicted influent chemical oxygen demand, influent ammonia nitrogen concentration, and influent instantaneous flow rate.
[0074] It should be noted that the LSTM neural network model is built using the LSTM architecture and uses the mean squared error between the true and predicted values as the loss function. The Adam optimizer is used to iteratively optimize the parameters of the LSTM neural network model. During the iteration process, when the loss value of the loss function no longer decreases, the iteration stops and the trained LSTM neural network model is output.
[0075] S3, the working condition identification module, calculates multiple rates of change based on the predicted water inflow data and performs weighted fusion through preset weights to obtain the comprehensive index of shock load. Then, it performs preliminary working condition judgment and generates the current operating condition label through preset judgment thresholds.
[0076] Specifically, based on the predicted influent chemical oxygen demand (COD), influent ammonia nitrogen concentration, and influent instantaneous flow rate, the corresponding current influent COD, influent ammonia nitrogen concentration, and influent instantaneous flow rate are retrieved retrospectively.
[0077] Based on the predicted and current influent chemical oxygen demand (COD), influent ammonia nitrogen concentration, and influent instantaneous flow rate, calculate the rate of change, including the rate of change of COD, the rate of change of ammonia nitrogen concentration, and the rate of change of instantaneous flow rate.
[0078] By using preset weights (including the weights of the rate of change of chemical oxygen demand, the rate of change of ammonia nitrogen concentration, and the rate of change of instantaneous flow rate), the rate of change of chemical oxygen demand, the rate of change of ammonia nitrogen concentration, and the rate of change of instantaneous flow rate are weighted and integrated to obtain the comprehensive index of shock load (that is, the weights are multiplied by the corresponding rates of change, and the products are added together).
[0079] By setting a preset judgment threshold and and make The comprehensive index of impact load is compared with the judgment threshold. and Compare;
[0080] If the comprehensive index of impact load is less than the judgment threshold If so, it means that the operating conditions within that window are stable;
[0081] If the comprehensive index of impact load is greater than or equal to the judgment threshold Furthermore, the comprehensive index of impact load is less than the judgment threshold. If so, it indicates that the operating conditions within this window are load fluctuations;
[0082] If the comprehensive index of impact load is greater than or equal to the judgment threshold If so, it means that the operating condition in this window is an impact load;
[0083] The comprehensive impact load index under each working condition is statistically analyzed, and the average value of all comprehensive impact load indices under each working condition is taken as the standard center value of the corresponding working condition. Subsequently, the distance between the comprehensive impact load index and each standard center value is calculated using the one-dimensional Euclidean distance method, and the working condition corresponding to the smallest distance is taken as the label of the current operating working condition.
[0084] It should be noted that the backtracking process uses a time matching mechanism, which means that the predicted data is matched against the most recent standardized data window, centered on the starting time point. This ensures the consistency between the predicted and actual values in the time dimension. To avoid data deviations caused by communication delays or sampling asynchrony, the maximum time deviation allowed during the matching process is no more than one sampling period (i.e., no more than 60 seconds). If this range is exceeded, the current matching is abandoned and the data from the previous valid window is used as a replacement.
[0085] Secondly, the weights were determined using historical operational data analysis. Specifically, historical operational data for at least six consecutive months were selected, and the correlation between load changes and effluent quality fluctuations over different time periods was statistically analyzed. The contribution of each variable to effluent fluctuations was calculated using multiple linear regression, and this contribution was normalized and used as the initial weight value. After calculation, the weights for the chemical oxygen demand (COD) change rate were set at 0.4, the ammonia nitrogen concentration change rate at 0.35, and the instantaneous flow rate change rate at 0.25.
[0086] Next, determine the threshold. and The setting method is also based on historical data statistical analysis; specifically, the load changes in historical operating data are divided into stable, fluctuating, and impact periods. By statistically analyzing the comprehensive index distribution range corresponding to various data types, two boundary points that can best distinguish different operating conditions are selected as thresholds; for example, determining the threshold... Set the threshold to 0.15. Set to 0.30.
[0087] It should also be noted that since the impact load composite index is a single value, its distance from each standard center value can be represented by the absolute value of the difference between the two values. Specifically, the difference between the current composite index and the center value of the stable operating condition, the center value of the load fluctuation operating condition, and the center value of the impact load operating condition are calculated separately, and the absolute value of each difference is taken as the distance measure. Then, the three distance values are compared and sorted in ascending order. During the sorting process, the operating condition category with the smallest distance indicates that the current composite index is closest to the typical characteristics of that operating condition, thus determining that the current operating state belongs to that category. For example, when the current composite index is the smallest distance from the center value of the load fluctuation operating condition, the current operating condition is determined to be a load fluctuation operating condition; when the distance from the center value of the impact load operating condition is the smallest, it is determined to be an impact load operating condition.
[0088] S4, the collaborative decision-making module, constructs a decision variable vector and a comprehensive objective function based on the current operating condition label, performs collaborative optimization, obtains the optimal control variable vector, and sends it to the PLC for execution equipment control;
[0089] Specifically, if the current operating condition label is load fluctuation or shock load, the flow rates of the internal and external return pipes are obtained through electromagnetic flowmeters; the flow rates of the internal and external return pipes are then compared with the current instantaneous influent flow rate to obtain the internal return ratio and external return ratio; subsequently, the current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint are read from the PLC; the read current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint are then concatenated with the internal and external return ratios to form a decision variable vector;
[0090] Based on the predicted effluent ammonia nitrogen concentration and predicted effluent total nitrogen concentration, an objective function for achieving effluent standards is constructed.
[0091] Based on the current dissolved oxygen setpoint and internal reflux ratio, construct an energy consumption objective function;
[0092] Based on the carbon source dosing setpoint and the phosphorus removal agent dosing setpoint, a chemical consumption objective function is constructed.
[0093] The objective functions for achieving water quality standards, energy consumption, and chemical consumption are weighted to generate a comprehensive objective function, which is then used to minimize the decision variable vector.
[0094] After the maximum number of iterations is reached, the decision variable vector corresponding to the minimized objective function value is output as the optimal control variable vector. Subsequently, the optimal control variable vector is sent to the PLC via the OPC communication protocol. The PLC controls the frequency converter to adjust the blower speed, internal reflux pump frequency, and external reflux pump frequency according to the variables in the optimal control variable vector, so as to adjust the dissolved oxygen setpoint, internal reflux ratio, and external reflux ratio of the aerobic tank. At the same time, it controls the metering pumps of carbon source and phosphorus removal agent to achieve the corresponding flow output.
[0095] The objective function for achieving the effluent quality standard is expressed as follows:
[0096]
[0097] In the formula, This represents the target function value for achieving the effluent quality standard. This indicates the predicted ammonia nitrogen concentration in the effluent. The standard limit for ammonia nitrogen concentration in effluent is indicated. This indicates the predicted total nitrogen concentration in the effluent. The standard limit for total nitrogen concentration in effluent;
[0098] The energy consumption objective function is expressed as:
[0099]
[0100] In the formula, This represents the value of the energy consumption objective function. The weights representing the dissolved oxygen setpoint in the aerobic tank. This indicates the dissolved oxygen setpoint for the aerobic tank. The weight representing the internal reflux ratio, Indicates the internal reflux ratio;
[0101] The objective function for drug consumption is expressed as:
[0102]
[0103] In the formula, This represents the objective function value of drug consumption. Indicates the weight of carbon source input. Indicates the amount of carbon source added. Indicates the weight of the phosphorus removal agent dosage. Indicates the dosage of phosphorus removal agent;
[0104] The overall objective function is expressed as:
[0105]
[0106] In the formula, This represents the value of the comprehensive objective function. The weights represent the objective function values for achieving the effluent quality standards. The weights represent the values of the energy consumption objective function. The weights represent the values of the objective function for drug consumption;
[0107] It should be noted that when reading the current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint from the PLC, the reading method should use Modbus TCP or OPC UA protocol, and the reading cycle should be consistent with the control cycle. During the reading process, the data needs to be range-checked. For example, the dissolved oxygen setpoint should be between 1.0 and 4.0 mg / L, and the carbon source and phosphorus removal agent dosages should be within the equipment's rated range.
[0108] The weight parameters in the energy consumption objective function are set as follows: Energy consumption data of the wastewater treatment plant during a complete operating cycle (no less than 30 days) under stable operating conditions are statistically analyzed, including the total power consumption of the blower system and the total power consumption of the return pump system. The proportions of the blower system's power consumption to the total energy consumption and the return pump system's power consumption to the total energy consumption are calculated separately, and these proportions are used as initial weights. Then, both are normalized so that the sum of the two weights is 1, thus obtaining the dissolved oxygen setpoint weight and the internal return ratio weight. For example, the blower energy consumption accounts for approximately 0.65, and the return pump energy consumption accounts for approximately 0.35, therefore the dissolved oxygen setpoint weight is 0.65, and the internal return ratio weight is 0.35.
[0109] The weight parameters in the objective function of pesticide consumption are determined using the pesticide cost ratio method. Specifically, the consumption costs of carbon source pesticides and phosphorus removal agents per unit time are statistically analyzed, and the proportions of carbon source cost and phosphorus removal agent cost in the total pesticide cost are calculated. These are then used as initial weight values. Subsequently, normalization is performed so that the sum of the two is 1. For example, if the carbon source cost ratio is approximately 0.7 and the phosphorus removal agent cost ratio is approximately 0.3, then the weight of carbon source dosage is 0.7 and the weight of phosphorus removal agent dosage is 0.3.
[0110] The weight parameters in the comprehensive objective function are determined using a hierarchical assignment method based on operating condition classification. Specifically, based on the operating condition identification results, the operating state is divided into three categories: stable operating condition, load fluctuation operating condition, and shock load operating condition, and weight combinations are set for different operating conditions.
[0111] When the operating conditions are stable, energy saving and reducing chemical consumption are given priority. Therefore, the weight of the effluent compliance target is set at 0.4, the weight of the energy consumption target is 0.35, and the weight of the chemical consumption target is 0.25.
[0112] When the operating condition is under load fluctuation, it is necessary to balance the stability of the effluent and the operating cost. Therefore, the weight of the effluent compliance target is set at 0.5, the weight of the energy consumption target is 0.3, and the weight of the chemical consumption target is 0.2.
[0113] When the operating condition is under shock load, priority is given to ensuring that the effluent meets the standards. Therefore, the weight of the effluent standard target is set at 0.65, the weight of the energy consumption target is 0.25, and the weight of the chemical consumption target is 0.10.
[0114] This embodiment also provides a hierarchical collaborative control method for the entire wastewater treatment process based on operating condition identification, including:
[0115] Deploy online monitoring instruments and sensors to collect multi-source data, perform preprocessing, and obtain standardized data;
[0116] After constructing an ASM2d mechanism model based on standardized data and correcting its parameters, the model outputs biochemical process prediction variables and concatenates them with standardized data to form an input vector. Predicted influent data are then obtained through the input vector.
[0117] Based on the predicted inflow data, multiple rates of change are calculated and weighted and fused using preset weights to obtain the comprehensive index of shock load. Then, a preliminary judgment of the operating condition and the generation of the current operating condition label are performed through a preset judgment threshold.
[0118] Based on the current operating condition label, a decision variable vector and a comprehensive objective function are constructed for collaborative optimization, and the optimal control variable vector is sent to the PLC for execution equipment control.
[0119] In summary, this invention improves the prediction accuracy of complex biochemical processes by combining mechanistic models with data-driven models, thereby enhancing the system's feedforward response capability to changes in influent load. Furthermore, by constructing a comprehensive shock load index based on multivariate change rates, it achieves accurate identification of operating conditions, avoiding the misjudgment problems caused by traditional single-variable judgment. Secondly, by combining the optimization objectives between effluent water quality, energy consumption, and chemical consumption, it can achieve energy saving and consumption reduction while ensuring stable effluent compliance.
[0120] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification, characterized in that: include, The data acquisition module deploys online monitoring instruments and sensors to collect multi-source data, preprocess it, and obtain standardized data. The twin and prediction module constructs an ASM2d mechanism model based on standardized data and performs parameter correction. It then outputs biochemical process prediction variables and concatenates them with standardized data to form an input vector. The predicted influent data are obtained through the input vector. The operating condition identification module calculates multiple rates of change based on predicted water inflow data and performs weighted fusion using preset weights to obtain a comprehensive index of shock load. Then, it performs a preliminary judgment of the operating condition and generates a label for the current operating condition based on a preset judgment threshold. The collaborative decision-making module constructs a decision variable vector and a comprehensive objective function based on the current operating condition label, performs collaborative optimization, and sends the optimal control variable vector to the PLC for execution equipment control.
2. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 1, characterized in that: The deployment of online monitoring instruments and sensors to collect multi-source data and preprocess it to obtain standardized data involves installing online monitoring instruments and sensors at the inlet main pipe of the wastewater treatment plant, each functional section of the biological treatment tank, the outlet weir of the secondary sedimentation tank, and the effluent channel. The online monitoring instruments and sensors collect data on chemical oxygen demand, ammonia nitrogen concentration, total nitrogen, total phosphorus, instantaneous flow rate, water temperature, dissolved oxygen, mixed liquor suspended solids concentration, and nitrate nitrogen concentration. All online monitoring instruments and sensors are connected to the edge computing gateway, and the gateway sends data packets with timestamps to the upper-level server. A sliding window is established on the host server side. After parsing the data packets, the data is divided by the sliding window. Then, outlier removal and standardization are performed on the data in each window to obtain standardized data. The multi-source data includes chemical oxygen demand, ammonia nitrogen concentration, total nitrogen, total phosphorus, instantaneous flow rate, water temperature, dissolved oxygen, mixed liquor suspended solids concentration, and nitrate nitrogen concentration.
3. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 2, characterized in that: After constructing the ASM2d mechanism model and performing parameter correction, the output prediction variables are concatenated with standardized data to form an input vector. The predicted water inflow data are then obtained through the input vector, as detailed below: A mechanism model of ASM2d was constructed in the MATLAB environment and embedded with heterotrophic bacterial degradation reaction. Standardized data were used as input to perform ASM2d mechanism model correction. Training was performed on the ASM2d mechanistic model; Predictive variables are obtained through the trained ASM2d mechanism model, including predicted effluent ammonia nitrogen concentration, predicted effluent chemical oxygen demand, predicted effluent total nitrogen concentration, predicted mixed liquor nitrate concentration, predicted mixed liquor ammonia nitrogen concentration, and predicted oxygen demand. The input vector is constructed as the input to the LSTM neural network model, and the output is the predicted influent data, including the predicted influent chemical oxygen demand, the predicted influent ammonia nitrogen concentration, and the predicted influent instantaneous flow rate.
4. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 3, characterized in that: The calculation of multiple change rates involves using the difference between the predicted influent data and the corresponding current influent data as the numerator, and the current influent data as the denominator to obtain multiple change rates, including the chemical oxygen demand change rate, ammonia nitrogen concentration change rate, and instantaneous flow rate change rate.
5. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 4, characterized in that: The preliminary determination of the operating condition by using a preset determination threshold is based on the preset determination threshold. and and make The comprehensive index of impact load is compared with the judgment threshold. and Compare; If the comprehensive index of impact load is less than the judgment threshold If so, it means that the operating conditions within that window are stable; If the comprehensive index of impact load is greater than or equal to the judgment threshold Furthermore, the comprehensive index of impact load is less than the judgment threshold. If so, it indicates that the operating conditions within this window are load fluctuations; If the comprehensive index of impact load is greater than or equal to the judgment threshold If so, it indicates that the operating condition within that window is an impact load.
6. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 5, characterized in that: The generation of the current operating condition label involves statistically analyzing the comprehensive impact load index under each operating condition and taking the average of all comprehensive impact load indices under each operating condition as the standard center value for the corresponding operating condition. Subsequently, the distance between the comprehensive impact load index and each standard center value is calculated using a one-dimensional Euclidean distance method, sorted, and the operating condition corresponding to the smallest distance is taken as the current operating condition label.
7. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 6, characterized in that: The process of constructing a decision variable vector based on the current operating condition label involves the following steps: If the current operating condition label indicates load fluctuation or impact load, the flow rates of the internal and external return pipes are obtained using an electromagnetic flowmeter. The flow rates of the internal and external return pipes are then compared with the current instantaneous influent flow rate to obtain the internal return ratio and external return ratio, respectively. Subsequently, the current dissolved oxygen setpoint, carbon source dosing setpoint, and phosphorus removal agent dosing setpoint are read from the PLC. These values are then concatenated with the internal and external return ratios to form the decision variable vector.
8. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 7, characterized in that: The collaborative optimization is based on the predicted effluent ammonia nitrogen concentration and the predicted effluent total nitrogen concentration, and constructs an objective function for achieving effluent standards. Based on the current dissolved oxygen setpoint and internal reflux ratio, construct an energy consumption objective function; Based on the carbon source dosing setpoint and the phosphorus removal agent dosing setpoint, a chemical consumption objective function is constructed. The objective functions for achieving water quality standards, energy consumption, and chemical consumption are weighted to generate a comprehensive objective function, which is then used to minimize the decision variable vector.
9. The hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in claim 8, characterized in that: The process of obtaining the optimal control variable vector and sending it to the PLC for equipment control involves iterating to the maximum number of iterations, then outputting the decision variable vector corresponding to the minimized objective function value as the optimal control variable vector. Subsequently, the optimal control variable vector is sent to the PLC via the OPC communication protocol. The PLC, based on the variables in the optimal control variable vector, controls the frequency converter to adjust the blower speed, internal reflux pump frequency, and external reflux pump frequency, thereby adjusting the dissolved oxygen setpoint, internal reflux ratio, and external reflux ratio of the aerobic tank. Simultaneously, it controls the carbon source and phosphorus removal agent metering pumps to achieve corresponding flow rate outputs.
10. A hierarchical collaborative control method for the entire wastewater treatment process based on operating condition identification, based on the hierarchical collaborative control system for the entire wastewater treatment process based on operating condition identification as described in any one of claims 1 to 9, characterized in that: include, Deploy online monitoring instruments and sensors to collect multi-source data, perform preprocessing, and obtain standardized data; After constructing an ASM2d mechanism model based on standardized data and correcting its parameters, the model outputs biochemical process prediction variables and concatenates them with standardized data to form an input vector. Predicted influent data are then obtained through the input vector. Based on the predicted inflow data, multiple rates of change are calculated and weighted and fused using preset weights to obtain the comprehensive index of shock load. Then, a preliminary judgment of the operating condition and the generation of the current operating condition label are performed through a preset judgment threshold. Based on the current operating condition label, a decision variable vector and a comprehensive objective function are constructed for collaborative optimization, and the optimal control variable vector is sent to the PLC for execution equipment control.