Water purifying agent adding method based on improved competition depth Q network
By improving the use of Dueling DQN for water purification agent dosing, the problems of unstable water quality and high cost in traditional methods have been solved. This has enabled efficient, economical, and stable dosing control of water purification agents, thereby improving the operating efficiency of water purification plants and the water quality compliance rate.
Patent Information
- Application Number
- CN202510989735.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-07-17
AI Technical Summary
Traditional water purification agent dosing methods are difficult to adapt to dynamic changes in water quality, water quantity and other operating conditions, resulting in unstable effluent water quality, increased agent costs and operating burden, and lack of real-time and adaptability, making it impossible to achieve precise control.
An improved competing deep Q-network (Dueling DQN) is used for water purification agent dosing. Through multi-dimensional data collection, network structure optimization, real-time intelligent decision-making, and closed-loop feedback mechanism, a state reward function and an economic cost advantage function are constructed to achieve optimized control of the dosage.
Improve water quality compliance rate, reduce economic costs, enhance system stability and operational efficiency, ensure that effluent turbidity remains stable within the target range, and reduce human intervention.
Smart Images

Figure CN120887473A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of water purifying agent dosing, and particularly relates to a water purifying agent dosing method based on an improved competitive deep Q network. BACKGROUND
[0002] Traditional methods are difficult to accurately adapt to the dynamic changes of water quality, water quantity and other working conditions. For example, when the turbidity of source water fluctuates, manual adjustment of the dosing amount often has a lag, resulting in unstable water quality, and it is difficult to ensure that the effluent turbidity is stable within the target range (such as less than 5 NTU). Moreover, this operation method relying on human experience lacks scientific quantitative basis, and it is difficult to achieve fine control. Due to the inability to optimize the dosing amount in real time according to the actual working conditions, the traditional dosing method is prone to over-dosing of water purifying agents. This not only increases the cost of reagents, but also may bring burden to subsequent processing links, such as increasing sludge treatment capacity, further increasing the operating cost of water purification plants.
[0003] With the development of artificial intelligence technology, deep Q network (DQN) and other reinforcement learning algorithms have begun to be applied in the field of water treatment. However, the traditional deep Q network has obvious shortcomings in dealing with water purifying agent dosing problems. It uses a fully connected network to directly output the Q value of each action, resulting in complete coupling of state and action. In the scene where action-independent state dominates, such as when the turbidity of source water in a water purification plant is low, the change of water purifying agent dosing amount has little effect on water quality. At this time, the working efficiency of DQN is low, it is difficult to accurately capture the key state features, and it is difficult to make optimal decisions on dosing amount.
[0004] In addition, the running environment of water purification plants is complex, and there are many factors affecting the dosing effect, such as water temperature, water quantity, inflow and outflow turbidity, etc. Traditional methods often cannot comprehensively consider the combined effects of these multi-dimensional factors, and lack overall consideration of water treatment quality, treatment difficulty, economic cost and other aspects. For example, under the condition of low temperature of source water, the hydrolysis rate of PAC will be significantly reduced, affecting the water purification effect, but the traditional method is difficult to dynamically adjust the dosing amount according to the water temperature and other factors; when the turbidity of source water is low, the PAC coagulation effect is reduced, and the change of dosing amount has little effect on water quality, the traditional method also cannot timely focus on the economic cost control, resulting in resource waste.
[0005] At the same time, there is a feedback time lag problem in the water purification process, and the traditional method is difficult to effectively solve this problem, which affects the real-time and accuracy of the model. Moreover, the traditional method lacks a perfect closed-loop feedback mechanism, and cannot timely adjust and optimize the dosing strategy according to the actual running effect, making it difficult to ensure the stability and adaptability of the system under different working conditions.
[0006] In summary, the existing water purifying agent dosing method has obvious deficiencies in water quality guarantee, economic cost, system stability and adaptability, and an urgently needed new type of dosing method that can adapt to complex working conditions and realize intelligent optimization control. SUMMARY
[0007] The technical problem to be solved by the present application is to provide a water purifying agent dosing method based on an improved competitive deep Q network, which realizes more efficient, more economical and more stable water purifying agent dosing control by optimizing the network structure, introducing multi-dimensional data and perfecting the feedback mechanism.
[0008] To solve the above technical problems, the technical solution adopted by the present application is: A water purifying agent dosing method based on an improved competitive deep Q network, comprising the following steps: Multi-dimensional data acquisition and preprocessing are performed, sensors are installed at key positions of the water purification plant to collect water quantity, dosing quantity, inflow and outflow turbidity and water temperature data, and after removing abnormal values and noise, the data vector length is unified by interpolation method; An improved competitive deep Q network is constructed, a double-flow network structure is designed to learn the relative advantages of actions and the overall value of states, a state reward function integrating multiple factors and an economic cost advantage function considering multiple factors are constructed, and a comprehensive evaluation value is generated by dynamically adjusting the weight according to the source water turbidity; Real-time intelligent decision-making and feedback control are implemented, the optimal dosing quantity is calculated in real time by using the current state data through the model, the data are stored in the decision-making buffer to solve the time lag and are used for model updating, and the model is adjusted by comparing the Q value deviation through the closed-loop feedback system; System integration and effect verification are completed, the model is integrated into the automatic control system to realize automatic control of the dosing equipment, and each index is evaluated through simulation environment testing and actual application test. Preferably, the multi-dimensional data acquisition and preprocessing are performed, sensors are installed at key positions of the water purification plant to collect water quantity, dosing quantity, inflow and outflow turbidity and water temperature data, and after removing abnormal values and noise, the data vector length is unified by interpolation method; the specific steps are as follows: S1.1 Sensor deployment and data acquisition: High-precision flow meters, turbidity meters, temperature sensors and dosing quantity measuring devices are installed at key positions such as the water inlet pipeline, water outlet pipeline and dosing equipment of the water purification plant; The running data such as water inlet flow (Q), water outlet flow, actual dosing quantity of water purifying agent (D), water inlet turbidity (Cin), water outlet turbidity (Cout) and water temperature (T) are collected in real time by the sensors, and the sampling frequency is set to 1 time per minute to 1 time per hour according to the process requirements; S1.2 Data cleaning: Anomalies in each dimension data are identified and removed using statistical analysis methods (such as the 3σ principle), for example, when a sudden value of influent turbidity appears more than 3 times the standard deviation of historical data range, it is determined as abnormal data and deleted; The collected data is denoised using a moving average filtering algorithm, and for water temperature data, a 5-minute sliding window is used to calculate the mean value to eliminate transient fluctuation noise. S1.3 Perform data vector length unification: For data with different sampling frequencies (such as dosing amount sampled at minute level and water temperature sampled at 10-minute level), cubic spline interpolation is used for time series alignment. Resample each dimension data to equal time interval sequence with 10-minute as the unified time interval, generate dimension-consistent data vector (such as [Q, D, C in , C out , T]), ensure data length matches the input requirements of neural network.
[0009] Preferably, the improved competitive deep Q network is constructed, a double-flow network structure is designed to learn the relative advantage of action and the overall value of state, a state reward function is constructed by integrating multiple factors and an economic cost advantage function is considered, and a comprehensive evaluation value is generated by dynamically adjusting the weight according to the source water turbidity; the specific steps are as follows: S2.1 Design a double-flow network structure, learn the relative advantage of action in the action advantage flow, and learn the overall value of state in the state value flow, and combine them into Q value through formula; S2.2 Construct a state reward function: integrate water treatment quality evaluation factors (outlet turbidity <5 NTU is positive), treatment difficulty evaluation (turbidity difference and outlet turbidity associated reward), and temperature influence factor (increase reward multiple at low temperature); S2.3 Construct an economic cost advantage function: introduce a turbidity influence factor in low turbidity state and combine it with a temperature factor, and consider the influence of influent instantaneous flow on economic cost of dosing; S2.4 Dynamically adjust the weight according to the source water turbidity: when C in <5 NTU, focus on economic cost advantage, otherwise focus on state reward function, and combine to generate comprehensive evaluation value F.
[0010] Preferably, the real-time intelligent decision and feedback control are implemented, the optimal dosing amount is calculated in real time by the model using current state data, the data is stored in the decision buffer to solve the time lag and used for model updating, and the model is adjusted through the closed-loop feedback system by comparing the Q value deviation; the specific steps are as follows: S3.1 Calculate the optimal dosing amount in real time by the improved DQN model using current water quantity, influent and effluent turbidity, water temperature and other state data; S3.2 Design decision buffer stores recent dosing decisions and water quality feedback data, solves the process tank feedback time lag problem, and is used for online model updating; S3.3 Establish a closed-loop feedback system, 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 completion system integration and effect verification, the model is integrated into the automatic control system to realize the automatic control of the dosing equipment, and the indicators are evaluated through actual application test after simulation environment test; The specific steps are as follows: S4.1: Embed the improved competitive deep Q network model into the automatic control system of the water purification plant, realize the docking of the model output and 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 execution equipment such as dosing pump; Develop an intelligent dosing module in the monitoring system, integrate the model algorithm into the system control logic, realize the automation control of the dosing process, and set the safety threshold of the dosing amount to ensure the safety of the system operation; S4.2: Build simulation conditions covering different source water turbidity, water temperature and water quantity, use the simulation platform to generate corresponding state data input model, test the accuracy of the model in calculating the dosing amount under various conditions; Verify the control effect of the model output dosing amount on the effluent turbidity, and the real-time reasoning ability of the model, and test the stability of the model under abnormal conditions by applying disturbance; S4.3: Select part of the treatment units of the water purification plant as a pilot, compare the dosing system controlled by the improved model with the traditional dosing control method in parallel, and the test period covers typical conditions; Collect the dosing amount, influent and effluent turbidity, reagent cost, equipment energy consumption and other data of the pilot unit, evaluate the practical application effect of the model from the dimensions of water quality compliance rate, reagent consumption reduction rate, economic cost and system adaptability.
[0012] Preferably, the state reward function is constructed as follows: Add water treatment quality evaluation factor ε to the state reward function, positive evaluation for effluent turbidity <5NTU, otherwise negative evaluation: ; Where C out represents the effluent turbidity value, C lim represents the effluent turbidity limit value, and e represents the base of natural logarithm. Add water treatment difficulty evaluation to the state reward function, the smaller the effluent turbidity and the greater the difference from the influent turbidity, the higher the processing difficulty, and the higher the reward value: ; The PAC hydrolysis rate will be significantly reduced in the low temperature state (T < 5℃) of source water, affecting the water purification effect; the temperature influence factor is added to the state reward function, and the reward multiple is increased in the low temperature state: ; wherein C out represents the outflow turbidity value, C in represents the inflow turbidity value, and e represents the base number of natural logarithm. The PAC hydrolysis rate will be significantly reduced in the low temperature state (T < 5℃) of source water, affecting the water purification effect; the temperature influence factor is added to the state reward function, and the reward multiple is increased in the low temperature state: State reward function: .
[0013] wherein the max function represents the maximum value, T r represents the water temperature threshold value, and T represents the water temperature.
[0014] Preferably, the process of constructing the economic cost advantage function is as follows: The PAC coagulation effect will be significantly reduced in the low turbidity state (Cin < 5 NTU) of source water, and the dosage change has no effect on water quality, so the turbidity influence factor η is added to the economic cost advantage function; similarly, in the case of low hydrolysis rate of the water purification agent in the low temperature state, the temperature influence factor is added to η: .
[0015] wherein C in represents the inflow turbidity value, D represents the dosage (g / t), T r represents the water temperature threshold value, T represents the water temperature, C r represents the inflow turbidity threshold value, and e represents the base number of natural logarithm.
[0016] The influence of the inflow instantaneous flow rate Q is added, and finally the economic advantage function is obtained: .
[0017] Preferably, the comprehensive evaluation combines the state reward function and the economic cost advantage, and different weight coefficients are set according to the source water turbidity: in the low turbidity state (Cin < 5 NTU) of source water, the economic cost advantage is emphasized; otherwise, the state reward function is emphasized. .
[0018] wherein ω1 represents the weight value of the state reward function, ω2 represents the weight value of the economic cost advantage, C in represents the inflow turbidity value, C r represents the inflow turbidity threshold value, and e represents the base number of natural logarithm.
[0019] A water purifying agent dosing method system based on an improved competitive deep Q network, comprising: A data acquisition module: for multi-dimensional data acquisition and preprocessing, sensors are installed at key positions in the water purification plant to collect water quantity, dosing quantity, inflow and outflow turbidity, and water temperature data, and after cleaning to remove outliers and noise, the data vector length is unified through interpolation method; An improved competitive deep Q network construction module: for constructing an improved competitive deep Q network, designing a double-flow network structure to learn the relative advantages of actions and the overall value of states, constructing a state reward function integrating multiple factors and an economic cost advantage function considering multiple factors, and dynamically adjusting the weight according to the source water turbidity to generate a comprehensive evaluation value; A decision module: for implementing real-time intelligent decision and feedback control, using the current state data to calculate the optimal dosing quantity in real time through the model, storing data in the decision buffer to solve the time lag and for model updating, and triggering model adjustment through a closed-loop feedback system by comparing the Q value deviation; A verification module: for completing system integration and effect verification, integrating the model into the automatic control system to realize automatic control of the dosing equipment, testing in a simulated environment first and then performing actual application test to evaluate various indicators.
[0020] A computer device, characterized in that it comprises: One or more controllers; the controller stores one or more execution programs; When the one or more execution programs are executed by the one or more controllers, the method based on the improved competitive deep Q network for water purifying agent dosing according to any one of claims 1-8 is realized.
[0021] The present application can achieve the following beneficial effects: Through the implementation of the above technical solution, the following technical effects can be achieved: 1. The water quality compliance rate is significantly improved: by intelligently optimizing the dosing quantity, the outflow turbidity is ensured to be stable within the target range (such as less than 5 NTU).
[0022] 2. Economic cost is reduced: under the premise of ensuring water quality, the dosing quantity of water purifying agent is reduced, and the operating cost is reduced.
[0023] 3. System stability is improved: through the closed-loop feedback mechanism, the adaptability and stability of the system are improved, and the water quality fluctuations caused by changes in working conditions are reduced.
[0024] 4. The running efficiency is improved: the automatic dosing control is realized, the manual intervention is reduced, and the running efficiency is improved. BRIEF DESCRIPTION OF DRAWINGS
[0025] The present application will be further described below in conjunction with the drawings and examples: Figure 1: Overall architecture diagram of data collection and dosing system; Figure 2: System structure diagram of improved competitive depth Q network algorithm; Figure 3: Relationship diagram of effluent turbidity and water treatment quality evaluation factors; Figure 4: Relationship diagram of treatment difficulty evaluation and effluent turbidity under different influent turbidity; Figure 5: Relationship diagram of water temperature and temperature influence factors; Figure 6: State reward value curve of different influent turbidity under low temperature state; Figure 7: State reward value curve of different influent turbidity under normal temperature state; Figure 8: Relationship diagram of dosing amount and economic advantage under low turbidity of source water in normal temperature state; Figure 9: Relationship diagram of dosing amount and economic advantage of different influent turbidity in normal temperature state; Figure 10: Economic advantage function relationship diagram of influent flow and dosing amount when T=15℃, C in =3NTU; Figure 11: Economic advantage function relationship diagram of influent flow and dosing amount when T=15℃, C in =5NTU; Figure 12: Economic advantage function relationship diagram of influent flow and dosing amount when T=15℃, C in =100NTU; Figure 13: Relationship diagram of source water turbidity and state reward / economic cost advantage weight coefficient; Figure 14: Comparison diagram of dosing amount and turbidity actual effect of improved Dueling DQN under low turbidity of source water state; Figure 15: Comparison diagram of dosing amount and turbidity actual effect of traditional DQN under low turbidity of source water state; Figure 16: Comparison diagram of dosing amount and turbidity actual effect of improved Dueling DQN under general turbidity of source water state; Figure 17: Comparison diagram of dosing amount and turbidity actual effect of traditional DQN under general turbidity of source water state. DETAILED DESCRIPTION
[0026] The preferred scheme is as follows Figures 1 to 17As shown, a water purifying agent dosing method based on improved competitive deep Q network, the technical scheme aims to realize intelligent optimization control of water purifying agent dosing amount by improving the structure and algorithm of competitive deep Q network (Dueling DQN) and combining the actual operation data of the water purification plant. Through the introduction of multi-dimensional data acquisition, network structure optimization, real-time intelligent decision and closed-loop feedback mechanism, it is ensured that the water purification plant can achieve better technical effect under different working conditions, including water quality standard, economic cost reduction and operation stability improvement.
[0027] The traditional deep Q network (Deep Q-Network, DQN) directly outputs the Q value of each action using a fully connected network, the state and action are completely coupled, and the Q value directly reflects the joint value of the state and action. In the action-independent state dominant scene, for example, when the source water turbidity of the water purification plant is low, the change of the water purifying agent dosing amount has little effect on the water quality, and the working efficiency of DQN is low.
[0028] The competitive deep Q network (Dueling Deep Q-Network, Dueling DQN) decomposes the Q value into a state value function V(s) and an action advantage function A(s,a), adopts a double-flow network structure, and realizes more efficient and stable Q value estimation. Two branches learn the overall value of the state and the relative advantage of the action respectively, and finally combine into Q value through formula: ; Improved competitive deep Q network: combined with the low turbidity state of source water, low water temperature state and water turbidity, the state reward function is improved, and the action advantage function A(s,a) in the Q value is added. The economic cost advantage function is increased, and the two functions are combined to obtain the comprehensive evaluation value F. The comprehensive evaluation adjusts the weight coefficients of the state reward function and the economic cost advantage function according to the turbidity change.
[0029] The specific steps of the application are as follows: I. Data acquisition and preprocessing: 1. Multi-dimensional data acquisition: Install high-precision sensors at key positions in the water purification plant to collect the following data: Water quantity (Q): Real-time monitoring of the flow of inlet water and outlet water through the flow meter.
[0030] Dosing amount (D): Record the actual dosing amount of the water purifying agent.
[0031] Inlet water turbidity (C in ) and outlet water turbidity (C out ): Use turbidity meter to monitor the turbidity of inlet water and outlet water in real time.
[0032] Water temperature (T): Monitor the water temperature through the temperature sensor.
[0033] 2. Data preprocessing: Data cleaning: remove outliers and noise data.
[0034] Data vector length uniformity: data with different sampling frequencies are unified in length by interpolation method, which is convenient for neural network training.
[0035] II. Improved competitive deep Q network structure: The overall structure of the method is shown in Figure 1 The improved Dueling DQN structure is shown in Figure 2 Constructing comprehensive evaluation link: 1. State reward function: As shown in Figure 3 The water treatment quality evaluation factor ε is added to the state reward function. If the effluent turbidity is less than 5 NTU, it is a positive evaluation, otherwise it is a negative evaluation: ; As shown in Figure 4 The water treatment difficulty evaluation is added to the state reward function. The smaller the effluent turbidity and the greater the difference from the influent turbidity, the higher the treatment difficulty, and the higher the reward value: ; As shown in Figure 5 The PAC hydrolysis rate will be significantly reduced in low temperature conditions (T < 5℃), which will affect the water purification effect. The temperature influence factor is added to the state reward function, and the reward multiple is increased in low temperature conditions: ; As shown above, the state reward function is: ; As shown in Figure 6 and Figure 7 , the reward value curves in low temperature conditions (T = 3℃) and normal conditions (T = 15℃): 2. Economic cost advantage function: In low turbidity conditions (C in < 5 NTU), the PAC coagulation effect will be significantly reduced, and the dosage change has no effect on water quality. The turbidity influence factor η is added to the economic cost advantage function. Similarly, considering the low temperature condition, the PAC hydrolysis rate is low, and the temperature influence factor is added to η: ; As shown in Figure 8 and Figure 9 , the dosage-economic advantage curve in low turbidity conditions and general conditions: 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 effect of improved Dueling DQN: low consumption (average 0.02g / t), low turbidity of effluent.
[0043] As shown in Figure 15 The actual effect of traditional DQN: higher consumption (average 0.5g / t), higher turbidity of effluent.
[0044] 2, the general turbidity of source water As shown in Figure 16 The actual effect of improved Dueling DQN: low consumption (average 4.6g / t), normal turbidity of effluent.
[0045] As shown in Figure 17 The actual effect of traditional DQN: higher consumption (average 5.4g / t), higher turbidity of effluent.
[0046] The technical solution improves the structure and algorithm of the competitive deep Q network, and combines multi-dimensional data collection, real-time intelligent decision-making and closed-loop feedback mechanism, to provide a high-efficiency, energy-saving and stable water purification agent adding method for water purification plants. Through actual application test and evaluation, the effectiveness and feasibility of the technical solution are further verified, which provides strong support for the intelligent operation of water purification plants.
[0047] The above embodiments are only preferred technical solutions of the present application, and should not be regarded as limitations of the present application. The protection scope of the present application should be based on the technical solutions recited in the claims, including equivalent replacement solutions of the technical features recited in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present application.
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 in a simulated environment first and then conduct actual application tests to evaluate various indicators.
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 Deploy sensors and collect data: 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 Perform 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: For data with different sampling frequencies, use cubic spline interpolation to align the time series; 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 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. The two streams are then combined into a Q value using a formula. S2.2 Constructing the 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 Adjust the weights dynamically based on the turbidity of the source water: when Cin < 5 NTU, focus on the economic cost advantage; otherwise, focus on the state reward function, and combine to generate a comprehensive evaluation value F.
4. 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 Calculate 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 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.
5. 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 water treatment plant's automated 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. 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.
6. 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 constructing the state reward function is 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 The effluent turbidity limit is represented by , and e represents the base of the natural logarithm. The state reward function incorporates an evaluation of the 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. ; 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. ; 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: 。 7. 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 constructing the economic cost advantage function is as follows: When the source water has a low turbidity (Cin < 5 NTU), the coagulation effect of PAC will be significantly reduced. Changes in dosage have no impact on water quality, so 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 η. ; 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. Incorporating the influence of the instantaneous inflow rate Q, the economic advantage function is finally obtained: 。 8. The method for adding water purification agent based on an improved competitive depth Q-network according to claim 1, characterized in that: The comprehensive evaluation combines the state reward function with economic cost advantage, and sets different weight coefficients according to the turbidity of the source water: when the source water has low turbidity (Cin < 5 NTU), the focus is on economic cost advantage. Conversely, the focus is 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, 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.
9. A system for a water purification agent dosing method based on an improved competitive depth Q-network according to any one of claims 1-8, 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.
10. 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-8 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
Self-adaptive intelligent dosing purification control system and method for polluted underground water
CN118811908A
Method and system for optimizing traditional Chinese medicine gynecological treatment scheme based on reinforcement learning
CN118942637A
Method for automatically regulating explicit congestion notification of data center network based on multi-agent reinforcement learning
US20240080270A1
