A method for adding water purification agents based on an improved competitive depth Q-network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2026-08-14
AI Technical Summary
然而,传统深度Q网络在处理净水剂投加问题时存在明显不足
1. 水质达标率显著提高:通过智能优化加药量,确保出水浊度稳定在目标范围内(如小于5 NTU)。
Smart Images

Figure CN120887473B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water purification agent dosing technology, and specifically relates to a water purification agent dosing method based on an improved competitive depth Q network. Background Technology
[0002] Traditional methods struggle to accurately adapt to dynamic changes in water quality and quantity. For instance, when source water turbidity fluctuates, manual adjustments to dosage often lag, leading to unstable effluent quality and difficulty in ensuring effluent turbidity remains within the target range (e.g., less than 5 NTU). Furthermore, this reliance on manual experience lacks scientific quantitative basis for dosage adjustments, hindering precise control. Because traditional dosing methods cannot optimize dosage in real-time based on actual operating conditions, overdosing of water treatment agents is common. This not only increases reagent costs but may also burden subsequent treatment processes, such as increasing sludge treatment volume, further raising the operating costs of the water treatment plant.
[0003] With the development of artificial intelligence technology, reinforcement learning algorithms such as Deep Q-Networks (DQN) have begun to be applied in the field of water treatment. However, traditional Deep Q-Networks have significant shortcomings when dealing with the problem of water purification agent dosing. They use a fully connected network to directly output the Q-value of each action, resulting in complete coupling between state and action. In scenarios where actions are independent and state is dominant, such as when the turbidity of the source water in a water treatment plant is low, changes in the dosage of water purification agent have almost no impact on water quality. In this case, DQN's efficiency is low, it cannot accurately capture key state features, and it is difficult to achieve optimal dosing decisions.
[0004] Furthermore, water treatment plants operate in complex environments, and numerous factors influence the effectiveness of chemical dosing, such as water temperature, water volume, and influent and effluent turbidity. Traditional methods often fail to comprehensively consider the combined effects of these multi-dimensional factors, lacking a holistic approach to water treatment quality, treatment difficulty, and economic costs. For example, when the source water is at a low temperature, the hydrolysis rate of PAC decreases significantly, affecting the water purification effect, but traditional methods struggle to dynamically adjust the dosage based on factors like water temperature. Similarly, when the source water has low turbidity, the coagulation effect of PAC decreases, and changes in dosage have a smaller impact on water quality; traditional methods also fail to prioritize economic cost control in a timely manner, leading to resource waste.
[0005] Meanwhile, the water purification process suffers from feedback lag, a problem that traditional methods struggle to address effectively, impacting the model's real-time performance and accuracy. Furthermore, traditional methods lack a robust closed-loop feedback mechanism, making it impossible to adjust and optimize dosing strategies promptly based on actual operational results, thus hindering the system's stability and adaptability under varying operating conditions.
[0006] In summary, existing methods for adding water purification agents have significant shortcomings in terms of water quality assurance, economic cost, system stability, and adaptability. There is an urgent need for a new addition method that can adapt to complex working conditions and achieve intelligent optimization control. Summary of the Invention
[0007] The technical problem to be solved by the present invention is to provide a water purification agent dosing method based on an improved competitive depth Q network. By optimizing the network structure, introducing multi-dimensional data and improving the feedback mechanism, a more efficient, economical and stable water purification agent dosing control can be achieved.
[0008] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for adding water purification agents based on an improved competitive depth Q-network, comprising the following steps: Multi-dimensional data collection and preprocessing are carried out. Sensors are installed at key locations in the water purification plant to collect data on water volume, chemical dosage, influent and effluent turbidity, and water temperature. After cleaning and removing outliers and noise, the data vector length is unified by interpolation. An improved competitive deep Q-network was constructed, and a dual-stream network structure was designed to learn the relative advantage of actions and the overall value of the state, respectively. A state reward function incorporating multiple factors and an economic cost advantage function considering multiple factors were constructed. The weights were dynamically adjusted and merged according to the turbidity of the source water to generate a comprehensive evaluation value. Implement real-time intelligent decision-making and feedback control, use current state data to calculate the optimal dosage in real time through the model, use the decision buffer to store data to solve time lag and use it for model updates, and use the closed-loop feedback system to compare Q value deviations to trigger model adjustments. Complete system integration and effect verification, integrate the model into the automated control system to realize automatic control of the dosing equipment, test in a simulated environment first and then conduct actual application tests to evaluate various indicators. Preferably, the multi-dimensional data acquisition and preprocessing involves installing sensors at key locations in the water purification plant to collect data on water volume, chemical dosage, influent and effluent turbidity, and water temperature. After cleaning and removing outliers and noise, the data vector length is unified using interpolation. The specific steps are as follows: S1.1 Deploy sensors and collect data: High-precision flow meters, turbidity meters, temperature sensors, and dosing devices are installed at key locations such as the water inlet pipes, water outlet pipes, and dosing equipment in the water purification plant. The system collects real-time operating data such as influent flow rate (Q), effluent flow rate, actual dosage of water purification agent (D), influent turbidity (Cin), effluent turbidity (Cout), and water temperature (T) through sensors. The sampling frequency is set to once per minute to once per hour according to process requirements. S1.2 Perform data cleaning: Statistical analysis methods (such as the 3σ principle) are used to identify and remove outliers in each dimension of the data. For example, when the influent turbidity shows a sudden change value that exceeds three times the standard deviation of the historical data range, it is judged as outlier data and deleted. The collected data was denoised using a moving average filtering algorithm. For water temperature data, a 5-minute moving window was used to calculate the mean, eliminating instantaneous fluctuation noise. S1.3 Unify the length of the data vector: For data with different sampling frequencies (e.g., chemical dosage is sampled at the minute level, and water temperature is sampled at the 10-minute level), cubic spline interpolation is used to align the time series. Using a uniform time interval of 10 minutes, the data for each dimension is resampled into sequences with equal time intervals, generating data vectors with consistent dimensions (e.g., [Q, D, C)). in C out (, T) to ensure that the data length matches the neural network input requirements.
[0009] Preferably, the construction of the improved competitive deep Q-network involves designing a dual-stream network structure to learn the relative advantage of actions and the overall value of the state, constructing a state reward function incorporating multiple factors and an economic cost advantage function considering multiple factors, and dynamically adjusting the weights based on the source water turbidity to generate a comprehensive evaluation value; the specific steps are as follows: S2.1 Design a two-stream network structure: the action advantage stream learns the relative advantage of actions, and the state value stream learns the overall value of states. The two streams are then combined into a Q value using a formula. S2.2 Construct a state reward function: Incorporate water treatment quality evaluation factors (effluent turbidity < 5 NTU is positive), treatment difficulty evaluation (turbidity difference is correlated with effluent turbidity reward) and temperature influence factors (reward multiplier increases at low temperatures); S2.3 Constructing the economic cost advantage function: Introducing the turbidity influence factor and combining it with the temperature factor in the low turbidity state, while also considering the impact of the instantaneous influent flow rate on the economic cost of chemical dosing; S2.4 Dynamically adjust weights based on source water turbidity: when C in When the value is less than 5 NTU, the focus is on economic cost advantage; otherwise, the focus is on state reward function, and the comprehensive evaluation value F is generated by combining the results.
[0010] Preferably, the implementation of real-time intelligent decision-making and feedback control utilizes current state data to calculate the optimal dosage in real time using a model, employs a decision buffer to store data to address time lags and for model updates, and triggers model adjustments by comparing Q-value deviations through a closed-loop feedback system; the specific steps are as follows: S3.1 Utilize current water volume, influent and effluent turbidity, water temperature and other status data to calculate the optimal dosage in real time through an improved DQN model; S3.2 The design decision buffer stores recent dosing decisions and water quality feedback data to solve the feedback time lag problem of the process pool and is used for online model updates; S3.3 Establish a closed-loop feedback system to compare the actual Q value with the predicted Q value. If the deviation exceeds the threshold, trigger model retraining or parameter adjustment.
[0011] Preferably, the process of completing system integration and effect verification involves integrating the model into the automated control system to achieve automatic control of the dosing equipment. The model is first tested in a simulated environment and then subjected to actual application trials to evaluate various indicators. The specific steps are as follows: S4.1: The improved competitive depth Q network model is embedded into the water purification plant's automation control system. The model output is connected to the control signals of the dosing equipment through a communication protocol, so that the optimal dosing amount calculated by the model can directly control the dosing pump and other execution equipment. Develop an intelligent dosing module in the monitoring system, integrate the model algorithm into the system control logic to achieve automated control of the dosing process, and set a safe threshold for the dosing amount to ensure the safe operation of the system; S4.2: Construct simulated operating conditions covering different source water turbidity, water temperature, and water volume, use the simulation platform to generate corresponding state data input into the model, and test the accuracy of the model in calculating the dosage under various operating conditions; The model's output dosage control effect on effluent turbidity and its real-time inference capability were verified. At the same time, the model's stability under abnormal operating conditions was tested by applying disturbances. S4.3: Select some treatment units of the water purification plant as pilot projects, and conduct parallel comparative tests between the improved model-controlled dosing system and the traditional dosing control method. The test period covers typical operating conditions. Data such as dosage, turbidity of influent and effluent, cost of chemicals, and energy consumption of equipment in the pilot units were collected to evaluate the actual application effect of the model from the dimensions of water quality compliance rate, chemical consumption reduction rate, economic cost, and system adaptability.
[0012] Preferably, the state reward function is constructed as follows: The state reward function incorporates a water treatment quality evaluation factor ε, where effluent turbidity < 5 NTU is considered a positive evaluation, and vice versa. ; Where C out C represents the turbidity value of the effluent. lim Here, represents the effluent turbidity limit, and e represents the base of the natural logarithm. The state reward function incorporates an evaluation of water treatment difficulty; the lower the effluent turbidity and the greater the difference between it and the influent turbidity, the higher the treatment difficulty and the higher the reward value. ; When the source water is at a low temperature (T < 5℃), the PAC hydrolysis rate will decrease significantly, affecting the water purification effect; by adding a temperature influence factor to the state reward function, the reward multiplier will be increased under low temperature conditions. ; Where C out C represents the turbidity value of the effluent. in Here, represents the turbidity value of the influent, and e represents the base of the natural logarithm. In low-temperature conditions (T < 5℃), the PAC hydrolysis rate decreases significantly, affecting the water purification effect. A temperature-related factor is added to the state reward function to increase the reward multiplier in low-temperature conditions. State reward function: .
[0013] Where the max function represents taking the maximum value, T r This represents the water temperature threshold, where T represents the water temperature.
[0014] Preferably, the process of constructing the economic cost advantage function is as follows: When the source water has low turbidity (Cin < 5 NTU), the coagulation effect of PAC will be significantly reduced, and changes in dosage have no impact on water quality. Therefore, a turbidity factor η is added to the economic cost advantage function. Similarly, considering the low hydrolysis rate of the water purifier at low temperatures, a temperature factor is added to η. .
[0015] Where C in The values represent the influent turbidity, D represents the dosage (g / t), and T represents the dosage. r This represents the water temperature threshold, where T represents the water temperature, and C represents the water temperature threshold. r denoted by , where e represents the influent turbidity threshold and e represents the base of the natural logarithm.
[0016] Incorporating the influence of the instantaneous inflow rate Q, the economic advantage function is finally obtained: .
[0017] Preferably, the comprehensive evaluation combines the state reward function and the economic cost advantage, and sets different weight coefficients according to the turbidity of the source water: in the case of low turbidity of the source water (Cin < 5 NTU), the economic cost advantage is emphasized; otherwise, the state reward function is emphasized. .
[0018] Where ω1 represents the weight value of the state reward function, ω2 represents the weight value of the economic cost advantage, and C in C represents the turbidity value of the influent. r denoted by , where e represents the influent turbidity threshold and e represents the base of the natural logarithm.
[0019] A system for water purification agent dosing based on an improved competitive depth Q-network includes: Data acquisition module: Used for multi-dimensional data acquisition and preprocessing. Sensors are installed at key locations in the water purification plant to collect data on water volume, chemical dosage, influent and effluent turbidity and water temperature. After cleaning and removing outliers and noise, the data vector length is unified by interpolation. Improved Competition Depth Q-Network Construction Module: Used to construct an improved competition depth Q-network, design a dual-stream network structure to learn the relative advantage of actions and the overall value of the state respectively, construct a state reward function that incorporates multiple factors and an economic cost advantage function that considers multiple factors, and dynamically adjust the weights based on the turbidity of the source water to generate a comprehensive evaluation value. Decision module: Used to implement real-time intelligent decision-making and feedback control. It uses current state data to calculate the optimal dosage in real time through the model, uses the decision buffer to store data to solve time lag and use it for model updates, and triggers model adjustment by comparing Q value deviation through a closed-loop feedback system. Validation module: Used to complete system integration and effect verification, integrate the model into the automated control system to realize automatic control of the dosing equipment, test in a simulated environment first and then conduct actual application tests to evaluate various indicators.
[0020] A computer device, characterized in that it comprises: One or more controllers; said controllers store one or more executable programs; When the one or more execution programs are executed by one or more controllers, a water purification agent dosing method based on an improved competitive depth Q network as described in any one of claims 1-8 is implemented.
[0021] The present invention can achieve the following beneficial effects: By implementing the above technical solution, the following technical effects can be achieved: 1. Significantly improved water quality compliance rate: Through intelligent optimization of chemical dosage, the turbidity of the effluent is ensured to remain stable within the target range (e.g., less than 5 NTU).
[0022] 2. Reduced economic costs: While ensuring water quality, the amount of water purification agent added is reduced, thus lowering operating costs.
[0023] 3. Improved system stability: Through a closed-loop feedback mechanism, the system's adaptability and stability are improved, reducing water quality fluctuations caused by changes in operating conditions.
[0024] 4. Improved operational efficiency: Enables automated dosing control, reduces manual intervention, and improves operational efficiency. Attached Figure Description
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1: Overall architecture diagram of the data collection and dosing system; Figure 2: System architecture diagram of the improved competitive depth Q network algorithm; Figure 3: Relationship between effluent turbidity and water treatment quality evaluation factors; Figure 4: Relationship between treatment difficulty evaluation and effluent turbidity under different influent turbidity; Figure 5: Relationship between water temperature and temperature influencing factors; Figure 6: State bonus value curves for different influent turbidity under low temperature conditions; Figure 7: State bonus value curves for different influent turbidity under normal temperature conditions; Figure 8: Relationship between chemical dosage and economic advantage when source water has low turbidity under normal temperature conditions; Figure 9: Relationship between dosage and economic advantage for different influent turbidity under normal temperature conditions; Figure 10: T=15℃, C in The economic advantage function relationship between influent flow rate and chemical dosage at 3 NTU; Figure 11: T=15℃, C in The economic advantage function relationship between influent flow rate and chemical dosage at 5 NTU; Figure 12: T=15℃, C in The economic advantage function relationship between influent flow rate and chemical dosage when the concentration is 100 NTU; Figure 13: Relationship between source water turbidity and the weighting coefficients of state incentive / economic cost advantage; Figure 14: Comparison of the dosage and actual turbidity effect of improved Dueling DQN under low turbidity conditions of source water; Figure 15: Comparison of the dosage and actual turbidity effect of traditional DQN under low turbidity conditions of source water; Figure 16: Comparison of the dosage of the improved Dueling DQN with the actual effect on turbidity under normal turbidity conditions of the source water; Figure 17: Comparison of the dosage of traditional DQN and the actual effect on turbidity under normal turbidity conditions of source water. Detailed Implementation
[0026] Preferred solutions include Figures 1 to 17As shown, a water purification agent dosing method based on an improved competitive depth Q-network (DQN) is presented. This technical solution aims to achieve intelligent optimization control of the water purification agent dosage by improving the structure and algorithm of the DQN and combining it with actual operating data from the water purification plant. By introducing multi-dimensional data acquisition, network structure optimization, real-time intelligent decision-making, and a closed-loop feedback mechanism, it ensures that the water purification plant can achieve better technical results under different operating conditions, including water quality compliance, reduced economic costs, and improved operational stability.
[0027] Traditional Deep Q-Networks (DQNs) use a fully connected network to directly output the Q-value of each action. State and action are completely coupled, and the Q-value directly reflects the joint value of the state and action. In action-independent, state-dominated scenarios, such as when the turbidity of the source water in a water treatment plant is low, changes in the dosage of the water treatment agent have almost no impact on water quality. In such cases, the efficiency of DQNs is low.
[0028] The Dueling Deep Q-Network (DQN) decomposes the Q-value into a state value function V(s) and an action advantage function A(s,a). Employing a two-stream network structure, it achieves more efficient and stable Q-value estimation. The two branches respectively learn the overall value of the state and the relative advantage of the action, ultimately merging them into the Q-value using a formula: ; An improved competition depth Q-network was developed: The state reward function was improved by considering the low turbidity state of the source water, the low water temperature state, and the effluent turbidity. Correspondingly, an economic cost advantage function was added to the action advantage function A(s,a) in the Q-value. The two functions were combined to obtain the comprehensive evaluation value F. The weight coefficients of the state reward function and the economic cost advantage function can be adjusted according to changes in turbidity in the comprehensive evaluation.
[0029] The specific steps of this invention are as follows: I. Data Acquisition and Preprocessing: 1. Multi-dimensional data collection: High-precision sensors were installed at key locations in the water purification plant to collect the following data: Water volume (Q): The flow rate of inlet and outlet water is monitored in real time by a flow meter.
[0030] Dosage (D): Record the actual amount of water purification agent added.
[0031] Influent turbidity (C) in ) and effluent turbidity (C out Turbidity meter: Use a turbidity meter to monitor the turbidity of the influent and effluent in real time.
[0032] Water temperature (T): Water temperature is monitored by a temperature sensor.
[0033] 2. Data preprocessing: Data cleaning: removing outliers and noisy data.
[0034] Unified data vector length: Data with different sampling frequencies are interpolated to unify the data vector length, which facilitates the training of neural networks.
[0035] II. Improved Competition-Depth Q-Network Structure: Overall structure diagram of the method: as follows Figure 1 As shown: Improved Dueling DQN structure diagram Figure 2 As shown: Constructing a comprehensive evaluation process: 1. State reward function: like Figure 3 As shown, the state reward function incorporates a water treatment quality evaluation factor ε. A turbidity of <5 NTU in the effluent is considered a positive evaluation, while a turbidity of >5 NTU is considered a negative evaluation. ; like Figure 4 As shown, the state reward function incorporates an evaluation of water treatment difficulty. The lower the effluent turbidity and the greater the difference between it and the influent turbidity, the higher the treatment difficulty and the higher the reward value. ; like Figure 5 As shown, at low temperatures (T < 5℃), the PAC hydrolysis rate decreases significantly, affecting the water purification effect. Adding a temperature factor to the state reward function increases the reward multiplier at low temperatures: ; In summary, the state reward function is: ; like Figure 6 and Figure 7 As shown, the reward value curves are for source water under low temperature conditions (T=3℃) and normal conditions (T=15℃): 2. Economic cost advantage function: Low turbidity state of source water (C in <5 NTU), the coagulation effect of PAC will be significantly reduced, and changes in dosage have no impact on water quality. The turbidity factor η is added to the economic cost advantage function. Similarly, considering the low hydrolysis rate of the water purifier at low temperatures, a temperature factor is added to η. ; like Figure 8 and Figure 9 As shown, the dosage-economic advantage curves are presented under low turbidity and normal conditions of the source water: Incorporating the influence of the instantaneous influent flow rate Q, the final economic advantage function is as follows: Figure 10 , Figure 11 , Figure 12 As shown: ; 3. Overall Evaluation: like Figure 13 As shown, the comprehensive evaluation combines the state reward function with economic cost advantages, setting different weighting coefficients according to the turbidity of the source water: low turbidity state of source water (C in <5NTU), focusing on economic cost advantages; conversely, focusing on state reward functions.
[0036] ; III. Intelligent Decision-Making and Feedback Mechanism 1. Real-time intelligent decision-making: Real-time model calculation: Based on the improved Dueling DQN model, the optimal dosage (D) is calculated in real time. The model takes into account the current water flow rate (Q) and influent turbidity (C). in ), effluent turbidity (C out The system takes water temperature (T) status information and outputs the optimal dosage.
[0037] Decision buffer: A decision buffer is designed to store the dosing decisions and corresponding water quality feedback data in the most recent period, so as to solve the problem of time lag in feedback data from the water purification process tank. The data can also be used for online learning and updating of the model.
[0038] 2. Feedback Mechanism: Closed-loop feedback system: The actual Q-value is compared with the model's predicted Q-value. If the deviation is large, it triggers model retraining or parameter tuning.
[0039] IV. System Integration and Testing 1. System Integration: Integration with Automated Control Systems: The improved Dueling DQN model is integrated into the automated control system of the water treatment plant to achieve automatic dosing. This ensures that the model's output can directly control the dosing equipment.
[0040] 2. Testing and Evaluation: Simulated environment testing: The system is thoroughly tested in a simulated environment to verify the performance and stability of the model under different operating conditions.
[0041] Practical application test: Conduct small-scale tests in actual water purification plants, collect test data, and evaluate the system's energy-saving effect, water quality improvement degree, and economic cost.
[0042] Low turbidity state of source water, such as Figure 14As shown, the actual effects of the improved Dueling DQN are: low chemical consumption (average 0.02 g / t) and low effluent turbidity.
[0043] like Figure 15 As shown, the actual effects of traditional DQN are: high chemical consumption (average 0.5g / t) and high effluent turbidity.
[0044] 2. Typical turbidity of source water like Figure 16 As shown, the actual effect of the improved Dueling DQN is: low chemical consumption (average 4.6g / t) and normal effluent turbidity.
[0045] like Figure 17 As shown, the actual effects of traditional DQN are: high chemical consumption (average 5.4g / t) and high effluent turbidity.
[0046] This technical solution improves the structure and algorithm of competitive deep Q-networks and combines multi-dimensional data acquisition, real-time intelligent decision-making, and a closed-loop feedback mechanism to provide a highly efficient, energy-saving, and stable method for adding water purification agents to water treatment plants. Practical application tests and evaluations further validated the effectiveness and feasibility of this technical solution, providing strong support for the intelligent operation of water treatment plants.
[0047] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for adding water purification agents based on an improved competitive depth Q-network, characterized in that... Includes the following steps: Multi-dimensional data collection and preprocessing are carried out. Sensors are installed at key locations in the water purification plant to collect data on water volume, chemical dosage, influent and effluent turbidity, and water temperature. After cleaning and removing outliers and noise, the data vector length is unified by interpolation. An improved competitive deep Q-network was constructed, and a dual-stream network structure was designed to learn the relative advantage of actions and the overall value of the state, respectively. A state reward function incorporating multiple factors and an economic cost advantage function considering multiple factors were constructed. The weights were dynamically adjusted and merged according to the turbidity of the source water to generate a comprehensive evaluation value. Implement real-time intelligent decision-making and feedback control, use current state data to calculate the optimal dosage in real time through the model, use the decision buffer to store data to solve time lag and use it for model updates, and use the closed-loop feedback system to compare Q value deviations to trigger model adjustments. Complete system integration and effect verification, integrate the model into the automated control system to realize automatic control of the dosing equipment, test it in a simulated environment first and then conduct actual application tests to evaluate various indicators; The aforementioned construction of an improved competitive deep Q-network involves designing a dual-stream network structure to learn relative action advantages and overall state value, constructing a state reward function incorporating multiple factors and an economic cost advantage function considering multiple factors, and dynamically adjusting weights based on source water turbidity to generate a comprehensive evaluation value. The specific steps are as follows: S2.1 Design a two-stream network structure: the action advantage stream learns the relative advantage of actions, and the state value stream learns the overall value of states, which are then combined into a Q value using a formula. S2.2 Constructing a state reward function: incorporating water treatment quality evaluation factors, treatment difficulty evaluation factors, and temperature influence factors; S2.3 Constructing the economic cost advantage function: Introducing the turbidity influence factor and combining it with the temperature factor in the low turbidity state, while also considering the impact of the instantaneous influent flow rate on the economic cost of chemical dosing; S2.4 The weight is dynamically adjusted based on the turbidity of the source water: when C in When the value is less than 5 NTU, the economic cost advantage function is emphasized; otherwise, the state reward function is emphasized, and the comprehensive evaluation value F is generated by combining the two functions. State reward function The construction process is as follows: State reward function The water treatment quality evaluation factor ε is added to the evaluation. A turbidity of less than 5 NTU in the effluent is considered a positive evaluation, while a turbidity of more than 5 NTU is considered a negative evaluation. ; Where C out C represents the turbidity value of the effluent. lim This indicates the turbidity limit for effluent, where e represents the base of the natural logarithm. State reward function The evaluation of water treatment difficulty was added. The lower the turbidity of the effluent and the greater the difference between it and the turbidity of the influent, the higher the treatment difficulty and the higher the reward value. ; Where C out C represents the turbidity value of the effluent. in This represents the turbidity value of the influent, where e represents the base of the natural logarithm. When the source water is at a low temperature, i.e., the water temperature T < 5℃, the hydrolysis rate of PAC will be significantly reduced, affecting the water purification effect. State reward function Add temperature influence factor Increase reward multiplier in low temperature conditions: ; Where the max function represents taking the maximum value, T r This represents the water temperature threshold, where T represents the water temperature. State reward function : ; Constructing the economic cost advantage function The process is as follows: Low turbidity state of source water C in <5 NTU, the coagulation effect of PAC will be significantly reduced; changes in dosage have no impact on water quality; economic cost advantage function. A turbidity influencing factor η is added; similarly, considering the low hydrolysis rate of the water purification agent at low temperatures, a temperature influencing factor is added to η. ; Where C in The values represent the influent turbidity, D represents the dosage, and T represents the chemical concentration. r This represents the water temperature threshold, where T represents the water temperature, and C represents the water temperature threshold. r This represents the influent turbidity threshold, and e represents the base of the natural logarithm. By incorporating the influence of the instantaneous influent flow rate Q, the economic advantage function is finally obtained. : ; The comprehensive evaluation incorporates the state reward function. With the economic cost advantage function Different weighting coefficients are set according to the turbidity of the source water: C for low turbidity state of source water in <5 NTU, focusing on the economic cost advantage function ; Conversely, focusing on the state reward function ; ; Where ω1 represents the weight value of the state reward function, ω2 represents the weight value of the economic cost advantage function, and C in C represents the turbidity value of the influent. r denoted by , where e represents the influent turbidity threshold and e represents the base of the natural logarithm.
2. The method for adding water purification agent based on an improved competitive depth Q-network according to claim 1, characterized in that: The process involves multi-dimensional data acquisition and preprocessing. Sensors are installed at key locations in the water treatment plant to collect data on water volume, chemical dosage, influent and effluent turbidity, and water temperature. After removing outliers and noise, the data vector length is standardized using interpolation. The specific steps are as follows: S1.1 Sensor deployment and data acquisition: Install high-precision flow meters, turbidity meters, temperature sensors, and dosing devices on the inlet and outlet pipes and dosing equipment of the water purification plant. The system collects real-time operational data, including influent flow rate, effluent flow rate, actual dosage of water purification agent, influent turbidity, effluent turbidity, and water temperature, through sensors. S1.2 performs data cleaning: Statistical analysis methods were used to identify and remove outliers in the data across all dimensions; a moving average filtering algorithm was used to denoise the collected data. S1.3 Unify data vector length: Use cubic spline interpolation to align time series data with different sampling frequencies; By using a uniform time interval of 10 minutes, the data of each dimension is resampled into sequences with equal time intervals to generate data vectors with consistent dimensions, ensuring that the data length matches the input requirements of the neural network.
3. The method for adding water purification agent based on an improved competitive depth Q-network according to claim 1, characterized in that: The implementation of real-time intelligent decision-making and feedback control utilizes current state data to calculate the optimal dosage in real time using a model. A decision buffer stores data to mitigate time lags and is used for model updates. A closed-loop feedback system compares Q-value deviations to trigger model adjustments. The specific steps are as follows: S3.1 Calculates the optimal dosage in real time using the current water volume, influent and effluent turbidity, and water temperature through an improved Dueling DQN model; S3.2 The design decision buffer stores recent dosing decisions and water quality feedback data, solves the problem of feedback lag in the process pool, and is used for online model updates; S3.3 Establish a closed-loop feedback system to compare the actual Q value with the predicted Q value. If the deviation exceeds the threshold, trigger model retraining or parameter adjustment.
4. The method for adding water purification agent based on an improved competitive depth Q-network according to claim 1, characterized in that: The process of completing system integration and effectiveness verification involves integrating the model into the automated control system to achieve automatic control of the dosing equipment. The system is first tested in a simulated environment, followed by practical application trials to evaluate various indicators. The specific steps are as follows: S4.1: The improved competitive depth Q network model is embedded into the automatic control system of the water purification plant. The model output is connected with the control signal of the dosing equipment through the communication protocol, so that the optimal dosing amount calculated by the model can directly control the dosing pump. Develop an intelligent dosing module in the monitoring system, integrate the model algorithm into the system control logic to achieve automated control of the dosing process, and set a safe threshold for the dosing amount to ensure the safe operation of the system; S4.2: Construct simulated operating conditions covering different source water turbidity, water temperature, and water volume, use the simulation platform to generate corresponding state data input into the model, and test the accuracy of the model in calculating the dosage under various operating conditions; The model's output dosage control effect on effluent turbidity and its real-time inference capability were verified. At the same time, the model's stability under abnormal operating conditions was tested by applying disturbances. S4.3: Select some treatment units of the water purification plant as pilot projects, and conduct parallel comparative tests between the improved model-controlled dosing system and the traditional dosing control method. The test period covers typical operating conditions. The data collection included the dosage of chemicals, turbidity of influent and effluent, chemical costs, and equipment energy consumption of the pilot units. The actual application effect of the model was evaluated from the dimensions of water quality compliance rate, chemical consumption reduction rate, economic cost, and system adaptability.
5. A system for a water purification agent dosing method based on an improved competitive depth Q-network according to any one of claims 1-4, characterized in that: include: Data acquisition module: Used for multi-dimensional data acquisition and preprocessing. Sensors are installed at key locations in the water purification plant to collect data on water volume, chemical dosage, influent and effluent turbidity and water temperature. After cleaning and removing outliers and noise, the data vector length is unified by interpolation. Improved Competition Depth Q-Network Construction Module: Used to construct an improved competition depth Q-network, design a dual-stream network structure to learn the relative advantage of actions and the overall value of the state respectively, construct a state reward function that incorporates multiple factors and an economic cost advantage function that considers multiple factors, and dynamically adjust the weights based on the turbidity of the source water to generate a comprehensive evaluation value. Decision module: Used to implement real-time intelligent decision-making and feedback control. It uses current state data to calculate the optimal dosage in real time through the model, uses the decision buffer to store data to solve time lag and use it for model updates, and triggers model adjustment by comparing Q value deviation through a closed-loop feedback system. Validation module: Used to complete system integration and effect verification, integrate the model into the automated control system to realize automatic control of the dosing equipment, test in a simulated environment first and then conduct actual application tests to evaluate various indicators.
6. A computer device, characterized in that: include: One or more controllers; said controllers store one or more executable programs; When the one or more execution programs are executed by one or more controllers, a water purification agent dosing method based on an improved competitive depth Q network as described in any one of claims 1-4 is implemented.
Citation Information
Patent Citations
Method for controlling input amount of tap water flocculating agent
CN105301960A
Intelligent doorbell visitor identification method and system based on deep learning
CN118761034A