Intelligent control method and system for sewage treatment
By constructing the correlation matrix between sewage treatment data and control variables, and using water quality prediction models and reinforcement learning algorithms, all-round regulation of sewage treatment is achieved, the problem of inability to achieve all-round regulation in the existing technology is solved, and the water quality stability and treatment efficiency are improved.
Patent Information
- Application Number
- CN202510158427.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing sewage treatment control methods cannot achieve all-round regulation of sewage treatment from beginning to end, and ignore the correlation between each link, resulting in large fluctuations in water quality and high energy consumption.
By collecting sewage treatment data, pretreatment, and introducing control variables to build an association matrix, using water quality prediction models and reinforcement learning algorithms to determine real-time control variables, achieving all-round regulation of the sewage treatment process.
All-round regulation of sewage treatment has been achieved, the stability and treatment efficiency of water quality have been improved, the emission of harmful substances have been reduced, and the management of sewage treatment systems has been more refined and intelligent.
Smart Images

Figure CN119620623A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of control systems, and in particular to an intelligent control method and system for sewage treatment. Background Art
[0002] With the acceleration of urbanization and the increase of industrial activities, sewage discharge has increased rapidly, bringing huge challenges to environmental protection and water resources management. Traditional sewage treatment methods have problems such as lagging adjustment of operating parameters, high energy consumption, and large fluctuations in effluent water quality, which are difficult to meet the high efficiency, stability and green requirements of modern sewage treatment. The introduction of intelligent control technology provides a new solution for sewage treatment. By integrating technologies such as the Internet of Things, big data, and artificial intelligence, real-time monitoring, precise regulation, and adaptive optimization of the entire sewage treatment process can be achieved.
[0003] Regarding the regulation of sewage treatment, the currently disclosed methods all regulate a certain link of the treatment, such as CN117964124A and CN116969582B, which respectively disclose intelligent methods for biological activity regulation and aeration regulation in sewage treatment.
[0004] However, although the existing control methods have improved the quality and efficiency of sewage treatment to a certain extent, they have ignored the correlation between various links of sewage treatment and cannot achieve all-round regulation of sewage treatment from beginning to end. Summary of the invention
[0005] In order to solve the above-mentioned problems in the prior art, the present invention provides a sewage treatment intelligent control method and system: A first aspect of the present invention provides a sewage treatment intelligent control method, comprising: S1: Collect sewage treatment data; S2: pre-processing the sewage treatment data; S3: introducing control variables and constructing a correlation matrix between the control variables and the sewage treatment data; S4: using the control variable and the sewage treatment data as input, predicting the water quality through a water quality prediction model; S5: Determine the real-time control variables in the sewage treatment process through a reinforcement learning algorithm according to the association matrix and the water quality prediction result; S6: According to the real-time control variables, the sewage treatment equipment is controlled to perform sewage treatment.
[0006] A second aspect of the present invention provides a sewage treatment intelligent control system, comprising: Collection module, used to collect sewage treatment data; A preprocessing module, used for preprocessing the sewage treatment data; A construction module, used for introducing control variables and constructing a correlation matrix between the control variables and the sewage treatment data; A prediction module, used to predict water quality by using the control variables and the sewage treatment data as inputs through a water quality prediction model; A determination module, for determining real-time control variables in the sewage treatment process through a reinforcement learning algorithm according to the association matrix and the water quality prediction result; The control module is used to control the sewage treatment equipment to perform sewage treatment according to the real-time control variables.
[0007] The beneficial effects of the present invention are embodied in that control variables are introduced, a correlation matrix between the control variables and the sewage treatment data is constructed, the correlation matrix is used to characterize the correlation between various links of sewage treatment, the system state and system action are constructed using the correlation matrix, and optimization is performed through a reinforcement learning method to provide control parameters that meet water quality requirements, thereby achieving all-round control of sewage treatment from beginning to end. By more accurately controlling water quality, sewage treatment standards can be better met, thereby reducing the discharge of harmful substances and making the management of sewage treatment systems more refined and intelligent. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A schematic diagram of a flow chart of an intelligent control method for sewage treatment provided by the present invention; Figure 2 A schematic flow chart of a water quality prediction method provided by the present invention; Figure 3 A schematic diagram of a sewage treatment control method based on reinforcement learning provided by the present invention; Figure 4 This is a structural schematic diagram of a sewage treatment intelligent control system provided by the present invention. DETAILED DESCRIPTION
[0009] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0010] Example 1 Reference Manual Attached Figure 1 , showing a schematic flow chart of an intelligent control method for sewage treatment provided by the present invention.
[0011] An intelligent control method for sewage treatment provided by an embodiment of the present invention includes: S1: Collect sewage treatment data.
[0012] Optionally, the sewage treatment data specifically includes: water quality data, process operation data, environmental data and key equipment data.
[0013] S2: Preprocess the sewage treatment data.
[0014] In a possible implementation, S2 specifically includes: converting the sewage treatment data into a vector form: in, W represents the water quality vector, pH Indicates pH value (reflects the acidity and alkalinity of sewage, affecting the efficiency of chemical and biological treatment), DO Indicates the amount of dissolved oxygen (used to monitor oxygen supply to aerobic organisms), COD Represents chemical oxygen demand (indicates the total amount of organic matter in sewage and is the core indicator for assessing pollutant load), TN Indicates the nitrogen content, TP Indicates phosphorus content (TN and TP are used to judge the treatment effect of denitrification and phosphorus removal process). HMI Indicates the heavy metal ion content, TS Indicates the content of toxic substances. P represents the running vector, QI Indicates the inflow (sewage inflow), QO Indicates the outflow rate (sewage outflow), WL Indicates the water level, RR Indicates the return ratio (the ratio of sludge from the secondary sedimentation tank to the aeration tank, which affects the concentration of activated sludge). MLSS Indicates the sludge concentration (the core parameter of microbial concentration in the activated sludge process), SRT Indicates sludge age (controls the renewal rate of activated sludge), T represents the reaction time (residence time of each process unit), E represents the environment vector, Tem Indicates temperature, Pre Indicates air pressure, D represents the device vector, I represents the current, U Voltage, R Indicates the motor speed, WE Indicates energy consumption.
[0015] In the present invention, the sewage treatment data is converted into the form of water quality vectors, operation vectors, environmental vectors and equipment vectors, which helps to structure and standardize complex multidimensional data, and provides a clear basis for subsequent intelligent analysis, prediction and control. This vectorization process can effectively capture the correlation between various types of data, improve the efficiency and accuracy of data processing, lay the foundation for the full process optimization and precise control of sewage treatment, and simplify the implementation of the algorithm and the computational burden.
[0016] S3: Introduce control variables and construct the correlation matrix between control variables and sewage treatment data.
[0017] Optionally, the control variable is specifically: in, C represents the control variable, C 1 represents the amount of coagulant added, C 2 indicates the amount of flocculant added, C 3 represents the dosage of acid-base regulator, C 4 indicates the dosage of disinfectant. C 5 represents the aeration amount, C 6 represents the inflow adjustment amount, C 7 indicates the flow rate adjustment. C 8 represents the sludge return adjustment amount of the secondary sedimentation tank.
[0018] Optionally, the correlation matrix is specifically: in, represents the incidence matrix, f represents the dependency function, W represents the water quality vector, P represents the running vector, D represents the device vector, C represents the control variable.
[0019] In the present invention, the correlation matrix can intuitively capture the dynamic correlation between different links in the sewage treatment process, quantify the interaction of various factors, provide accurate relationship input for water quality prediction models and optimization algorithms, and help identify the impact of key control variables on water quality and system operation, thereby achieving more scientific and efficient sewage treatment process optimization, improving the accuracy and stability of treatment effects, and reducing resource and energy waste.
[0020] S4: Using control variables and sewage treatment data as input, the water quality is predicted through the water quality prediction model.
[0021] It should be noted that since sewage treatment involves a variety of chemical reactions, and most chemical reactions are not instantaneous, when adding chemicals, they should not be added continuously until the indicators reach the expected values. This practice is very likely to cause excessive addition. The ideal situation should be to stop adding after adding a certain amount of chemicals, and after a certain period of reaction, the indicators reach the expected values. However, it is difficult to control when to stop adding. The prediction module proposed in the present invention uses the attention mechanism and combines the time series characteristics to give the prediction results of water quality. When the amount of the control chemical in the control variable is in a certain state and certain quantities in the water quality vector reach the expected indicators, it is added according to the amount described in the control variable.
[0022] Reference Manual Attached Figure 2 , showing a schematic flow chart of a water quality prediction method provided by the present invention.
[0023] In a possible implementation, S4 specifically includes sub-steps S401 to S406: S401: The water quality vectors, environment vectors and control variables collected at different time points are respectively combined into a water quality tensor, an environment tensor and a control tensor.
[0024] S402: Channel-joining the water quality tensor and the environment tensor.
[0025] It should be noted that by channel splicing, water quality and environmental information are integrated into one input, which makes it easier for the model to comprehensively consider the interaction between water quality and the environment. This fusion method can enhance the correlation between data, help extract complex multidimensional features, and improve prediction accuracy.
[0026] S403: Using the channel-concatenated tensor as input, extract spatial dimension features through the SE-ResNet model.
[0027] Among them, the SE-ResNet (Squeeze-and-Excitation Residual Network) model is an improved version of the ResNet model that introduces the Squeeze-and-Excitation (SE) module. It further improves the feature representation capability by adding a global feature weight redistribution mechanism.
[0028] It should be noted that the SE-ResNet model can capture the spatial features of tensors through residual connections and use the attention mechanism to enhance the expression of key features while avoiding the gradient vanishing problem. This allows the model to more efficiently extract the spatial correlation between water quality and the environment, improving the model's computational performance and stability.
[0029] S404: Using the spatial dimension features as input, extract the temporal dimension features through the Bi-LSTM model.
[0030] Among them, the Bi-LSTM (Bidirectional Long Short-Term Memory Network) model is a deep learning model that can simultaneously capture forward and backward time dependencies in sequence data. Compared with traditional LSTM, Bi-LSTM uses two independent LSTM layers, forward and backward, to process sequence information from the past to the future and from the future to the past, respectively, thereby comprehensively considering the integrity of the context in the time series. This bidirectional structure is particularly suitable for processing tasks that require global time dependencies, and can significantly improve the model's ability to capture complex time series patterns and its prediction accuracy.
[0031] It should be noted that Bi-LSTM can capture the time series characteristics of data and consider the dynamic relationship between the previous and next moments. This bidirectional extraction method can more comprehensively mine the time series dependency of water quality data and accurately describe the changing trend of water quality over time.
[0032] S405: Take the control tensor as input and output the weight of the attention mechanism through a 1×1 convolution operation.
[0033] It should be noted that the 1×1 convolution operation simplifies the computational complexity of the model and effectively extracts features from the control tensor and converts them into attention weights. This approach can highlight the impact of key control variables on water quality and optimize the weight distribution of control variables.
[0034] S406: Taking the weight of the attention mechanism and the time dimension features as input, the self-attention weights at different time points are determined through the self-attention mechanism: Among them, Attention represents the self-attention weight, Q Indicates the Query value. K Indicates the Key value, V represents the Value value, Softmax represents the Softmax activation function, T represents the matrix transpose operation, d k Indicates the length of the time dimension feature, C v Represents the weight of the output attention mechanism after the 1×1 convolution.
[0035] It should be noted that the self-attention mechanism enables the model to focus on the most critical moments of water quality changes in the time series through dynamic weight allocation. Combined with the weight of the control tensor, it makes the decision more precise and flexible, and improves the interpretability and accuracy of the water quality prediction model.
[0036] S407: Predict water quality through the fully connected layer.
[0037] It should be noted that the fully connected layer integrates the multi-dimensional features extracted previously and transforms the complex spatial, temporal and control variable relationships into the final water quality prediction results. This step ensures that the output of the model has high accuracy and robustness, providing a reliable basis for subsequent control optimization.
[0038] In the present invention, water quality is predicted through a water quality prediction model, which helps the sewage treatment system to more accurately judge water quality changes in advance, provides a reliable basis for subsequent control strategy optimization, effectively improves sewage treatment efficiency, and reduces resource waste and operational risks.
[0039] S5: Based on the association matrix and water quality prediction results, the real-time control variables in the sewage treatment process are determined through the reinforcement learning algorithm.
[0040] Among them, the reinforcement learning algorithm is an artificial intelligence method that uses trial and error mechanism as its core to learn the optimal strategy through interaction with the environment. Its goal is to maximize the cumulative reward value (return) through repeated exploration. At each step, the agent takes actions based on the current state, receives rewards and next state feedback from the environment, and improves its decision-making ability by continuously optimizing the strategy function.
[0041] It should be noted that the prediction results of water quality parameters related to chemical reactions can be obtained through the prediction module, and when the prediction results meet the expected standards, the parameters described in the control variables can be used as the basis for regulation. However, since the three stages of sewage treatment are interrelated, it is necessary to consider the influence of current process operation data and key equipment operation parameters. The control module proposed in the present invention determines the real-time control variables in the sewage treatment process based on the reinforcement learning algorithm.
[0042] Reference Manual Attached Figure 3 , showing a flow chart of a sewage treatment control method based on reinforcement learning provided by the present invention.
[0043] In a possible implementation, S5 specifically includes sub-steps S501 to S506: S501: Construct a first state component and a first action component according to the first row of the association matrix: in, s 1 represents the first state component, W represents the water quality vector, a 1 represents the first action component, P represents the running vector, D represents the device vector, C represents the control variable.
[0044] S502: Construct a second state component and a second action component according to the second row of the association matrix: in, s 2 represents the second state component, a 2 represents the second action component.
[0045] S503: Construct a third state component and a third action component according to the third row of the association matrix: in, s 3 represents the third state component, a 3 represents the third action component.
[0046] S504: The first state component, the second state component and the third state component form a state space, and the first action component, the second action component and the third action component form an action space: in, s represents the state space, a Represents the action space.
[0047] In the present invention, by parsing different rows of the association matrix into independent state components and action components, and combining them into state space and action space respectively, this design can comprehensively cover the dynamic relationship between water quality, operation, equipment and control variables in the sewage treatment process. It can not only finely model the state and control action of each link, but also effectively capture the dependency and synergy between different links, and provide a clear input structure for the reinforcement learning algorithm. The controllability of the sewage treatment system is improved, and the optimization strategy can dynamically adjust the control parameters of each link based on a global perspective, thereby achieving more efficient and more accurate regulation.
[0048] S505: Based on the state space and action space, construct the state-action function of the reinforcement learning algorithm: in, q express Q value, π Indicates strategy, q π Indicates the adoption strategy π of Q value, E represents the mathematical expectation function, represents the reward function, s t express t The state of the moment, a t express t The action of the moment, γ represents the discount factor, s t+1 express t +1 moment status, a t+1 express t +1 moment of action.
[0049] Among them, the introduction of discount factors ensures that the algorithm focuses on both short-term effects and long-term benefits, thereby achieving a balance between treatment efficiency, cost and water quality compliance rate, and improving the intelligence, adaptability and operational efficiency of the system.
[0050] Optionally, the reward function is specifically: When the state space a Water quality vector in W When it is within the safe range, the reward function value is 1.
[0051] When the state space a Water quality vector in W When it is not within the safety range, the reward function value is 0.
[0052] In the present invention, the reward is directly linked to whether the water quality vector is in the safe range, which can effectively guide the reinforcement learning algorithm to focus on optimizing the water quality compliance rate. By using a binary method with a reward value of 1 or 0, the burden of complex reward calculation can be significantly reduced, while ensuring that the strategy optimization in the learning process always revolves around the core goal of water quality safety.
[0053] Among them, those skilled in the art can set the safety interval range according to actual conditions, and the present invention does not limit it.
[0054] S506: Q The goal is to maximize the value, determine the optimal strategy at each moment, and determine the real-time control variables in the sewage treatment process based on the optimal strategy.
[0055] Optionally, S506 specifically includes: using the DDPG optimization algorithm or the TD3 optimization algorithm to make Q The optimal strategy at each moment is determined, and the real-time control variables in the sewage treatment process are determined based on the optimal strategy.
[0056] Among them, DDPG (Deep Deterministic Policy Gradient) is a reinforcement learning algorithm designed for continuous action space, combining the Actor-Critic framework and deep neural network. It generates deterministic actions through the Actor network, evaluates the Q value of the action through the Critic network, and uses the gradient to update the strategy to maximize the Q value. At the same time, DDPG introduces the target network and experience replay mechanism to improve the stability and efficiency of training. In addition, by adding noise (such as Ornstein-Uhlenbeck noise) to the action, DDPG enhances the exploration ability and can adapt to high-dimensional continuous control tasks. The algorithm is suitable for robot control, automation systems, and real-time optimization scenarios.
[0057] Among them, TD3 (Twin Delayed Deep Deterministic Policy Gradient) is an improvement on the DDPG algorithm, specifically designed to solve the over-estimation bias and training instability problems in DDPG. TD3 reduces the over-estimation bias of the Q value by introducing Twin Q Networks, using two Critic networks to calculate the Q value separately, and updates the policy based on the smaller value. In addition, TD3 uses Target Policy Smoothing technology to add noise to the target action to smooth the value function and reduce the instability of the policy network caused by over-precise fitting. Finally, TD3 delays the update of the Actor network and only updates the Actor network after the Critic network has been updated multiple times, thereby further improving the stability of the algorithm.
[0058] In this invention, by constructing the state-action function of reinforcement learning, combining the reward function and Q The goal of maximizing the value can effectively evaluate the long-term impact of each state and action combination on the sewage treatment effect. Using the reinforcement learning algorithm dynamic optimization strategy, the control variables can be adjusted according to the real-time changing state of the sewage treatment process to ensure that the system achieves the global optimal regulation effect under complex conditions.
[0059] S6: Control the sewage treatment equipment to treat sewage according to the real-time control variables.
[0060] The beneficial effects of the present invention are embodied in that control variables are introduced, a correlation matrix between the control variables and the sewage treatment data is constructed, the correlation between each link of sewage treatment is characterized by the correlation matrix, the system state and system action are constructed by using the correlation matrix, and optimization is performed by reinforcement learning method to provide control parameters that meet water quality requirements, thereby achieving all-round control of sewage treatment from beginning to end. By more accurately controlling water quality, sewage treatment standards can be better met, thereby reducing the discharge of harmful substances and making the management of sewage treatment systems more refined and intelligent.
[0061] Example 2 Reference Manual Attached Figure 4 , showing a structural schematic diagram of a sewage treatment intelligent control system provided by the present invention.
[0062] An intelligent sewage treatment control system 20 provided in an embodiment of the present invention includes: A collection module 201 is used to collect sewage treatment data; A preprocessing module 202, used for preprocessing the sewage treatment data; A construction module 203 is used to introduce control variables and construct a correlation matrix between the control variables and the sewage treatment data; A prediction module 204, for predicting water quality by using the control variables and the sewage treatment data as inputs through a water quality prediction model; A determination module 205 is used to determine the real-time control variables in the sewage treatment process through a reinforcement learning algorithm according to the association matrix and the water quality prediction result; The control module 206 is used to control the sewage treatment equipment to perform sewage treatment according to the real-time control variables.
[0063] In a possible implementation manner, the sewage treatment data specifically includes: water quality data, process operation data, environmental data and key equipment data.
[0064] In a possible implementation manner, the preprocessing module 202 is specifically configured to: Convert the sewage treatment data into vector form: in, W represents the water quality vector, pH Indicates pH value, DO Indicates the amount of dissolved oxygen, COD represents chemical oxygen demand, TNIndicates the nitrogen content, TP Indicates phosphorus content, HMI Indicates the heavy metal ion content, TS Indicates the content of toxic substances. P represents the running vector, QI Indicates the inflow rate, QO Indicates the flow rate, WL Indicates the water level, RR represents the reflux ratio, MLSS Indicates the sludge concentration, SRT Indicates the sludge age, T Represents the reaction time, E represents the environment vector, Tem Indicates temperature, Pre Indicates air pressure, D represents the device vector, I represents the current, U Voltage, R Indicates the motor speed, WE Indicates energy consumption.
[0065] In a possible implementation manner, the control variable is specifically: in, C represents the control variable, C 1 represents the amount of coagulant added, C 2 indicates the amount of flocculant added, C 3 represents the dosage of acid-base regulator, C 4 indicates the dosage of disinfectant. C 5 represents the aeration amount, C 6 represents the inflow adjustment amount, C 7 indicates the flow rate adjustment. C 8 represents the sludge return adjustment amount of the secondary sedimentation tank.
[0066] In a possible implementation, the association matrix is specifically: in, represents the incidence matrix, f represents the dependency function, W represents the water quality vector, P represents the running vector, D represents the device vector, C represents the control variable.
[0067] In a possible implementation, the prediction module 204 is specifically configured to: The water quality vector, the environment vector and the control variable collected at different time points are respectively combined into a water quality tensor, an environment tensor and a control tensor; Perform channel splicing on the water quality tensor and the environment tensor; The channel concatenated tensor is used as input and the spatial dimension features are extracted through the SE-ResNet model. Taking the spatial dimension features as input, extracting the time dimension features through the Bi-LSTM model; Taking the control tensor as input, output the weight of the attention mechanism through a 1×1 convolution operation; The weight of the attention mechanism and the time dimension feature are used as input, and the self-attention weights at different time points are determined through the self-attention mechanism: Among them, Attention represents the self-attention weight, Q Indicates the Query value. K Indicates the Key value, V represents the Value value, Softmax represents the Softmax activation function, T represents the matrix transpose operation, d k Indicates the length of the time dimension feature, C v Represents the weight of the output attention mechanism after 1×1 convolution; Through the fully connected layer, water quality is predicted.
[0068] In a possible implementation manner, the determining module 205 is specifically configured to: According to the first row of the association matrix, the first state component and the first action component are constructed: in, s 1 represents the first state component, W represents the water quality vector, a 1 represents the first action component, P represents the running vector, D represents the device vector, C represents the control variable; According to the second row of the association matrix, a second state component and a second action component are constructed: in, s 2 represents the second state component, a 2 represents the second action component; According to the third row of the association matrix, the third state component and the third action component are constructed: in, s 3 represents the third state component, a 3 represents the third action component; The first state component, the second state component and the third state component form a state space, and the first action component, the second action component and the third action component form an action space: in, s represents the state space, a represents the action space; Based on the state space and the action space, a state-action function of a reinforcement learning algorithm is constructed: in, q express Q value, π Indicates strategy, q π Indicates the adoption strategy π of Q value, E represents the mathematical expectation function, represents the reward function, s t express t The state of the moment, a t express t The action of the moment, γ represents the discount factor, s t+1 express t +1 moment status, a t+1 express t +1 moment of action; by Q The optimal strategy at each moment is determined with the goal of maximizing the value, and the real-time control variables in the sewage treatment process are determined according to the optimal strategy.
[0069] In a possible implementation, the reward function is specifically: When the state space a Water quality vector in W When it is within the safe range, the reward function value is 1; When the state spacea Water quality vector in W When it is not within the safety range, the reward function value is 0.
[0070] In a possible implementation manner, the determining module 205 is specifically configured to: Use DDPG optimization algorithm or TD3 optimization algorithm to make Q The optimal strategy at each moment is determined, and the real-time control variables in the sewage treatment process are determined according to the optimal strategy.
[0071] An intelligent sewage treatment control system 20 provided in an embodiment of the present invention can implement the steps and effects of the intelligent sewage treatment control method in Example 1. To avoid repetition, the present invention will not go into details.
[0072] The beneficial effects of the present invention are embodied in that control variables are introduced, a correlation matrix between the control variables and the sewage treatment data is constructed, the correlation between each link of sewage treatment is characterized by the correlation matrix, the system state and system action are constructed by using the correlation matrix, and optimization is performed by reinforcement learning method to provide control parameters that meet water quality requirements, thereby achieving all-round control of sewage treatment from beginning to end. By more accurately controlling water quality, sewage treatment standards can be better met, thereby reducing the discharge of harmful substances and making the management of sewage treatment systems more refined and intelligent.
[0073] In the description of the embodiments of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "center", "top", "bottom", "top", "bottom", "inside", "outside", "inner side", "outer side" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Among them, "inside" refers to an internal or enclosed area or space. "Periphery" refers to the area surrounding a specific component or a specific area.
[0074] In the description of the embodiments of the present invention, the terms "first", "second", "third", and "fourth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", and "fourth" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0075] In the description of the embodiments of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", and "assemble" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0076] In the description of the embodiments of the present invention, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.
[0077] In the description of the embodiments of the present invention, it should be understood that "-" and "~" represent the range between two values, and the range includes the endpoints. For example: "AB" represents a range greater than or equal to A and less than or equal to B. "A~B" represents a range greater than or equal to A and less than or equal to B.
[0078] In the description of the embodiments of the present invention, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein generally indicates that the associated objects before and after are in an "or" relationship.
[0079] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A sewage treatment intelligent control method, characterized in that: include: S1: Collect sewage treatment data; S2: pre-processing the sewage treatment data; S3: introducing control variables and constructing a correlation matrix between the control variables and the sewage treatment data; S4: using the control variable and the sewage treatment data as input, predicting the water quality through a water quality prediction model; S5: Determine the real-time control variables in the sewage treatment process through a reinforcement learning algorithm according to the association matrix and the water quality prediction result; S6: According to the real-time control variables, the sewage treatment equipment is controlled to perform sewage treatment.
2. The intelligent control method for sewage treatment according to claim 1 is characterized in that: The sewage treatment data specifically includes: water quality data, process operation data, environmental data and key equipment data.
3. The intelligent control method for sewage treatment according to claim 2 is characterized in that: The S2 specifically includes: Convert the sewage treatment data into vector form: in, W represents the water quality vector, pH Indicates pH value, DO Indicates the amount of dissolved oxygen, COD represents chemical oxygen demand, TN Indicates the nitrogen content, TP Indicates phosphorus content, HMI Indicates the heavy metal ion content, TS Indicates the content of toxic substances. P represents the running vector, QI Indicates the inflow rate, QO Indicates the flow rate, WL Indicates the water level, RR represents the reflux ratio, MLSS Indicates the sludge concentration, SRT Indicates the sludge age, T Represents the reaction time, E represents the environment vector, Tem Indicates temperature, Pre Indicates air pressure, D represents the device vector, I represents the current, U Voltage, R Indicates the motor speed, WE Indicates energy consumption.
4. The intelligent control method for sewage treatment according to claim 3 is characterized in that: The control variables are specifically: in, C represents the control variable, C 1 represents the amount of coagulant added, C 2 indicates the amount of flocculant added, C 3 represents the dosage of acid-base regulator, C 4 indicates the dosage of disinfectant. C 5 represents the aeration amount, C 6 represents the inflow adjustment amount, C 7 indicates the flow rate adjustment. C 8 represents the sludge return adjustment amount of the secondary sedimentation tank.
5. The intelligent control method for sewage treatment according to claim 4 is characterized in that: The association matrix is specifically: in, represents the incidence matrix, f represents the dependency function, W represents the water quality vector, P represents the running vector, D represents the device vector, C represents the control variable.
6. The intelligent control method for sewage treatment according to claim 5 is characterized in that: The S4 specifically includes: S401: respectively combining the water quality vector, the environment vector and the control variable collected at different time points into a water quality tensor, an environment tensor and a control tensor; S402: performing channel splicing on the water quality tensor and the environment tensor; S403: Using the channel concatenated tensor as input, extract spatial dimension features through the SE-ResNet model; S404: Using the spatial dimension feature as input, extracting the time dimension feature through the Bi-LSTM model; S405: Taking the control tensor as input, outputting the weight of the attention mechanism through a 1×1 convolution operation; S406: Taking the weight of the attention mechanism and the time dimension feature as input, the self-attention weights at different time points are determined through the self-attention mechanism: Among them, Attention represents the self-attention weight, Q Indicates the Query value. K Indicates the Key value, V represents the Value value, Softmax represents the Softmax activation function, T represents the matrix transpose operation, d k Indicates the length of the time dimension feature, C v Represents the weight of the output attention mechanism after 1×1 convolution; S407: Predict water quality through the fully connected layer.
7. The intelligent control method for sewage treatment according to claim 6, characterized in that: The S5 specifically includes: S501: Construct a first state component and a first action component according to the first row of the association matrix: in, s 1 represents the first state component, W represents the water quality vector, a 1 represents the first action component, P represents the running vector, D represents the device vector, C represents the control variable; S502: Construct a second state component and a second action component according to the second row of the association matrix: in, s 2 represents the second state component, a 2 represents the second action component; S503: Construct a third state component and a third action component according to the third row of the association matrix: in, s 3 represents the third state component, a 3 represents the third action component; S504: The first state component, the second state component and the third state component form a state space, and the first action component, the second action component and the third action component form an action space: in, s represents the state space, a represents the action space; S505: Based on the state space and the action space, construct a state-action function of a reinforcement learning algorithm: in, q express Q value, π Indicates strategy, q π Indicates the adoption strategy π of Q value, E represents the mathematical expectation function, represents the reward function, s t express t The state of the moment, a t express t The action of the moment, γ represents the discount factor, s t+1 express t +1 moment status, a t+1 express t +1 moment of action; S506: Q The optimal strategy at each moment is determined with the goal of maximizing the value, and the real-time control variables in the sewage treatment process are determined according to the optimal strategy.
8. The intelligent control method for sewage treatment according to claim 7 is characterized in that: The reward function is specifically: When the state space a Water quality vector in W When it is within the safe range, the reward function value is 1; When the state space a Water quality vector in W When it is not within the safety range, the reward function value is 0.
9. The intelligent control method for sewage treatment according to claim 7, characterized in that: The S506 is specifically as follows: Use DDPG optimization algorithm or TD3 optimization algorithm to make Q The optimal strategy at each moment is determined, and the real-time control variables in the sewage treatment process are determined according to the optimal strategy.
10. A sewage treatment intelligent control system, characterized in that: include: Collection module, used to collect sewage treatment data; A preprocessing module, used for preprocessing the sewage treatment data; A construction module, used for introducing control variables and constructing a correlation matrix between the control variables and the sewage treatment data; A prediction module, used to predict water quality by using the control variables and the sewage treatment data as inputs through a water quality prediction model; A determination module, for determining real-time control variables in the sewage treatment process through a reinforcement learning algorithm according to the association matrix and the water quality prediction result; The control module is used to control the sewage treatment equipment to perform sewage treatment according to the real-time control variables.
Citation Information
Patent Citations
A smart control method and system for wastewater treatment
CN116969582B
Intelligent regulation and control method and system for sewage treatment based on microbial activity
CN117964124A
Intelligent wastewater treatment method and system
CN117150241A
Mixed deep learning water quality prediction method based on time-frequency feature extraction
CN117194954A
Papermaking sewage treatment optimization control method based on reinforcement learning
CN117434844A
Cited By
Intelligent regulation and control method for three-stage constructed wetland recirculating aquaculture system
CN120406176A
An intelligent control method for a three-stage artificial wetland recirculating aquaculture system
CN120406176B
Sewage treatment regulation and control method and equipment based on reinforcement learning and storage medium
CN120523049A
System and method for generating intelligent putting strategy of water body antibacterial agent
CN120746345A
An intelligent water body antibacterial agent dispensing strategy generation system and method
CN120746345B