PH value adjusting method in sewage treatment process

By real-time monitoring of the pH value and flow rate in the sewage treatment system, combined with the Q-learning algorithm, dynamically adjusting the working status of acid and alkali pumps, the problems of hysteresis, inefficiency and waste of reagents in traditional sewage treatment systems are solved, and efficient and accurate pH value adjustment is achieved.

CN119930014AInactive Publication Date: 2025-05-06SHAOXING XUESEN ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510264507.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In traditional sewage treatment systems, there are problems of reaction lag, inefficiency and waste of reagents. Especially when the sewage water quality fluctuates greatly, it is difficult to respond to environmental changes in real time, making it difficult to maintain the pH value within the target range.

Method used

By monitoring the pH value in real time and combining the flow rate and acid-alkali liquid concentration in wastewater, the required acid-alkali liquid flow rate is accurately calculated using the feedforward control strategy, and a pH value adjustment model based on the Q-learning algorithm is constructed to dynamically adjust the working status of the acid pump and the alkali pump to achieve dynamic and accurate pH value adjustment.

Benefits of technology

It effectively overcomes the problems of reaction lag, inefficiency and waste of reagents in traditional sewage treatment systems, and can quickly respond to environmental changes, ensure that the pH value is maintained within the target range, thereby improving the operating efficiency of the entire sewage treatment system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119930014A_ABST
    Figure CN119930014A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sewage treatment, and discloses a pH value adjusting method in a sewage treatment process. According to the method for adjusting the PH value in the sewage treatment process, the PH value is monitored in real time, the flow of the flowing-in sewage and the concentration of the acid liquor and the alkali liquor are combined, the flow of the needed acid liquor or the needed alkali liquor is accurately calculated through a feedforward control strategy, and therefore dynamic and accurate PH value adjustment is achieved; according to the method, the problems of reaction lag, low efficiency and reagent waste of a fixed reagent adding mode in a traditional sewage treatment system are effectively solved, and particularly under the condition of relatively large fluctuation of sewage quality, the method can quickly respond to environmental change and ensure that the pH value is maintained in a target range, so that the operation efficiency of the whole sewage treatment system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of sewage treatment, and in particular to a method for adjusting pH value in a sewage treatment process. Background Art

[0002] In recent years, reinforcement learning technology based on artificial intelligence has made remarkable progress in the field of automatic control. Q-learning, as a classic reinforcement learning algorithm, continuously adjusts strategies through interaction with the environment to obtain optimal control effects. It has been applied to many fields. Its application in sewage treatment, especially in pH regulation, has great potential. Using the Q-learning algorithm, the regulation strategy can be dynamically adjusted through real-time monitoring data, reducing the shortcomings of traditional control methods and achieving more efficient and intelligent control.

[0003] In traditional sewage treatment systems, pH value regulation usually relies on fixed chemical agent addition methods or manual adjustments. These methods often have problems such as delayed reaction, low efficiency and reagent waste. Especially when the sewage quality fluctuates greatly, traditional methods are difficult to respond to environmental changes in real time, resulting in pH value being difficult to maintain within the target range, causing low system efficiency and may even affect the subsequent sewage treatment process. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the deficiencies in the prior art, the present invention provides a method for regulating the pH value in a sewage treatment process. By real-time monitoring of the pH value and combining the flow rate of the incoming sewage and the concentration of the acid and alkali solution, a feedforward control strategy is adopted to accurately calculate the required flow rate of the acid or alkali solution, thereby realizing dynamic and precise pH value regulation. This method effectively overcomes the problems of reaction lag, low efficiency and reagent waste of the fixed agent addition method in the traditional sewage treatment system, especially when the sewage quality fluctuates greatly, it can quickly respond to environmental changes and ensure that the pH value is maintained within the target range, thereby improving the operating efficiency of the entire sewage treatment system and solving the above-mentioned problems.

[0006] (II) Technical solution

[0007] To achieve the above object, the present invention provides the following technical solution: a method for adjusting pH value in a sewage treatment process, comprising the following steps:

[0008] S1. Obtaining the real-time pH value in the sewage treatment system;

[0009] S2, calculate the feedforward input, and calculate the required acid or alkali flow rate according to the pH reference value, the flow rate and pH value of the inflowing sewage, and the concentration of the added alkali or acid;

[0010] S3. Construct a PH value adjustment model based on the Q-learning algorithm. The PH value adjustment model includes a state space, an action space, and a reward function, where the state is the current PH value.

[0011] S4, iteratively train the pH value adjustment strategy through the Q-learning algorithm to generate the optimal action strategy;

[0012] S5. Use the optimal action strategy to dynamically adjust the working status of the acid pump and the alkali pump. The pH value adjustment strategy adjusts the pH value based on real-time monitoring data.

[0013] Preferably, the current pH value represents the current acidity and alkalinity of the sewage, ranging from [0,14].

[0014] Preferably, the calculation feedforward input includes the following:

[0015] According to the sewage flow Q into the primary sedimentation tank sew And pH value PH0, get the flow into the primary sedimentation tank H + The amount of material flow;

[0016] The required flow rate of acid or alkali is calculated based on the set pH value, acid concentration c (HC1) or alkali concentration c (NaOH).

[0017] Preferably, the action space includes the start time of the acid pump, the flow rate adjustment value of the acid pump, the start time of the alkali pump, the flow rate adjustment value of the alkali pump and the closed state;

[0018] The on time of the acid pump indicates the working time of the acid pump in each control cycle, in seconds;

[0019] The flow adjustment value of the acid pump indicates the flow rate of the chemical reagent adjusted by the acid pump, in L / min;

[0020] The opening time of the alkali solution pump indicates the working time of the alkali solution pump in each control cycle, in seconds;

[0021] The flow adjustment value of the alkali liquid pump indicates the alkali liquid flow rate adjusted by the alkali liquid pump, in L / min;

[0022] The closed state indicates that the acid pump and the alkali pump are closed.

[0023] Preferably, the reward function is expressed as follows:

[0024] R total =R deviation +R smooth +R c

[0025] Among them, Rtotal Represents the output of the reward function, R deviation represents the PH value deviation penalty term, R smooth represents the action smoothness reward, R c Represents the chemical reagent cost penalty term.

[0026] Preferably, the pH value deviation penalty term is expressed as follows:

[0027] R deviation =-K1|PH current -PH target |

[0028] Among them, -K1 represents the coefficient for adjusting the penalty intensity, PH current Indicates the current pH value, PH target Indicates the target pH.

[0029] Preferably, the action smoothness reward item is expressed as follows:

[0030] R smooth =-K2|a current -a previous |

[0031] Among them, -K2 represents the strength coefficient used to adjust the smoothness penalty, a current Indicates the current action, a previous Indicates the previous action.

[0032] Preferably, the chemical reagent cost penalty item is expressed as follows:

[0033] R c =-K3|q PAC -q Alk |

[0034] In the formula, -K3 represents the intensity coefficient used to adjust the chemical reagent cost penalty, q PAC Indicates the amount of acid used, q Alk Indicates the amount of alkali solution used.

[0035] Preferably, the Q-learning algorithm adopts an ε-greedy strategy to dynamically balance exploration and utilization during the training process.

[0036] Preferably, the sewage treatment system further includes a sensor module, a data acquisition module and a control module, and the sensor module is used to monitor the pH value of the sewage in real time.

[0037] Compared with the prior art, the present invention provides a method for adjusting pH value in a sewage treatment process, which has the following beneficial effects:

[0038] The present invention realizes dynamic and precise pH value regulation by real-time monitoring of pH value and combining the flow rate of inflowing sewage and the concentration of acid and alkali solution, and adopts a feedforward control strategy to accurately calculate the required flow rate of acid or alkali solution. This method effectively overcomes the problems of reaction lag, low efficiency and reagent waste of fixed agent addition method in traditional sewage treatment system, especially when the sewage quality fluctuates greatly, and can quickly respond to environmental changes to ensure that the pH value is maintained within the target range, thereby improving the operating efficiency of the entire sewage treatment system. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is a schematic diagram of the steps of the method of the present invention;

[0040] Figure 2 This is a flow chart of the pH value adjustment algorithm for sewage treatment process based on reinforcement learning;

[0041] Figure 3 This is the flow chart of the Q-learning algorithm. DETAILED DESCRIPTION

[0042] 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.

[0043] In traditional sewage treatment systems, pH value adjustment usually relies on fixed chemical agent addition methods or manual adjustments. These methods often have problems such as delayed reaction, low efficiency and reagent waste. Therefore, a method for adjusting pH value in sewage treatment process is proposed. Figure 1 , the method comprises the following steps:

[0044] S1. Obtaining the real-time pH value in the sewage treatment system;

[0045] First, the current pH value in the sewage treatment system is monitored in real time through sensors;

[0046] The sensor transmits real-time data to the control system, which further processes the data. This data will be used as input to the Q-learning algorithm and used for subsequent state space definition and action space optimization.

[0047] S2, calculate the feedforward input, and calculate the required acid or alkali flow rate according to the pH reference value, the flow rate and pH value of the inflowing sewage, and the concentration of the added alkali or acid;

[0048] According to the sewage flow Q into the primary sedimentation tanksew And pH value PH0, get the flow into the primary sedimentation tank H + The amount of material flow;

[0049] According to the set pH value, acid concentration c (HC1) or alkali concentration c (NaOH), the required flow rate of acid or alkali is calculated;

[0050] S3. Construct a PH value adjustment model based on the Q-learning algorithm. The PH value adjustment model includes a state space, an action space, and a reward function, where the state is the current PH value.

[0051] The state space contains all possible state variables in the system, which are defined as follows:

[0052] Current pH value (PH current ), used to describe the acidity and alkalinity of water;

[0053] The combination of these variables determines the current state of the system (s t );

[0054] The action space defines all the control actions that the system can take, including:

[0055] Acid pump adjustment amount (q PAC ): The flow rate of the acid pump can be controlled to adjust the dosage of the reagent.

[0056] Alkali solution pump adjustment amount (q Alk ): The flow rate of the alkali solution pump can be controlled to adjust the amount of alkali solution added.

[0057] The opening time of the relevant pump (t PAC ,t Alk ), control the working time of the pump and affect the dosage cycle of the agent;

[0058] The definition of the action space can be discretized according to specific control requirements to obtain a series of possible action combinations;

[0059] The reward function is an important part of the Q-learning algorithm. It is used to evaluate the feedback effect after the system performs a certain action. The design of the reward function should be based on the control goal (that is, keeping the pH value within the target range). The specific design is as follows:

[0060] PH value deviation penalty:

[0061] This item is used to penalize the deviation between the current pH value and the target pH value. The specific calculation method is:

[0062] R deviation =-K1|PH current -PH target|

[0063] Among them, K1 is the deviation penalty coefficient, PH target The target pH value. This part of the reward ensures that the system keeps the pH value as close to the target value as possible.

[0064] Action Smoothness Bonus:

[0065] In order to avoid drastic fluctuations in control actions, an action smoothness reward function is designed to calculate the difference between the current action and the previous action:

[0066] R smooth =-K2|a current -a previous |

[0067] Among them, K2 is the smoothness coefficient, a current and a previous are the control actions at the current and previous moments respectively;

[0068] Penalty for using chemical reagents:

[0069] In order to reduce the waste of chemical reagents, a chemical reagent usage penalty is designed to calculate the dosage of the acid pump and alkali pump:

[0070] R c =-K3|q PAC -q Alk |

[0071] Among them, K3 is the penalty coefficient for the use of chemical reagents, q PAC and q Alk is the dosage of acid and alkali solution;

[0072] Taking all the above factors into consideration, the total reward function is designed as follows:

[0073] R total =R deviation +R smooth +R c

[0074] Among them, R total Represents the output of the reward function, R deviation represents the PH value deviation penalty term, R smooth represents the action smoothness reward, R c represents the chemical reagent cost penalty item;

[0075] S4, iteratively train the pH value adjustment strategy through the Q-learning algorithm to generate the optimal action strategy;

[0076] After obtaining the reward function, the Q-learning algorithm is used to train the system. The core update formula of the Q-learning algorithm is:

[0077]

[0078] Among them, α is the learning rate, γ is the discount factor, Q(s t ,a t ) is the current state s t Take action a t Q value, R total is the current total reward, is the maximum Q value in the next state. Through repeated training, the Q-learning algorithm will gradually learn the optimal control strategy;

[0079] S5. Use the optimal action strategy to dynamically adjust the working status of the acid pump and the alkali pump. The pH value adjustment strategy adjusts the pH value according to the real-time monitoring data;

[0080] After the Q-learning algorithm training is completed, the control module adjusts the flow rate and opening time of the acid pump and alkali pump according to the optimal action output by the algorithm. The control module dynamically adjusts the control strategy according to the real-time feedback data of the system (pH value, flow rate, temperature, etc.) to ensure that the pH value always remains within the target range. Through real-time feedback and adjustment, the system can adaptively respond to fluctuations in sewage quality and achieve precise regulation of pH value.

[0081] The present invention realizes dynamic adjustment of pH value in sewage treatment system by reinforcement learning technology. The present invention is described in detail below in conjunction with specific implementation methods;

[0082] In the specific implementation process, the sewage treatment system is equipped with a real-time monitoring module, a data processing module and a control module. The real-time monitoring module includes a pH sensor for obtaining the current pH value of the sewage. current ,These data are transmitted to the control module through the data processing module to provide a basis for subsequent control decisions;

[0083] Definition of state and action space

[0084] The state space (S) consists of the following dimensions:

[0085] Current pH value, indicating the current pH value of sewage, ranging from [0,14];

[0086] The action space (A) defines the operations that the control module can perform, including:

[0087] The opening time of the acid pump indicates the working time of the acid pump in each control cycle, in seconds;

[0088] The flow adjustment value of the acid pump indicates the flow rate of the chemical reagent adjusted by the acid pump, in L / min;

[0089] The opening time of the alkali solution pump indicates the working time of the alkali solution pump in each control cycle, in seconds;

[0090] The flow adjustment value of the alkali liquid pump indicates the alkali liquid flow rate adjusted by the alkali liquid pump, in L / min;

[0091] Design of reward function:

[0092] Reward function (R total ) is used to guide the optimization adjustment strategy of the reinforcement learning model, and its specific form is as follows:

[0093] PH value deviation penalty term: based on the current PH value (denoted as PH current ) and the target pH value (denoted as pH target ), the greater the deviation, the heavier the penalty, the specific form is:

[0094] R deviation =-K1|PH current -PH target |

[0095] Action smoothness bonus R smooth :Encourage smooth transition of continuous actions and avoid drastic fluctuations. Specifically, it compares the current action (denoted as a current ) and the previous action (denoted as a previous ), the specific form is:

[0096] R smooth =-K2|a current -a previous |

[0097] Chemical reagent cost penalty: calculated based on the amount of acid and alkali solution used, taking into account the cost of reagent use, the amount of acid used (denoted as q PAC ) and the amount of alkali solution used (denoted as q Alk ) is calculated, the specific form is:

[0098] R c =-K3|q PAC -q Alk |

[0099] The total reward function is:

[0100] R total =R deviation +R smooth +R c

[0101] Training of reinforcement learning models:

[0102] The adjustment strategy is trained through the Q-learning algorithm. The specific process is as follows:

[0103] Initialize the Q table, where both the state and action spaces are discretized;

[0104] Determine the current state s based on the real-time monitored environmental parameters t ;

[0105] Select action a based on the ε-greedy strategy t , and execute the action;

[0106] Collect system feedback, including new status s t+1 and instant reward R t ;

[0107] Update Q value:

[0108]

[0109] Among them, α is the learning rate, γ is the discount factor, Q(s t ,a t ) is the current state s t Take action a t Q value, R total is the current total reward, is the maximum Q value in the next state;

[0110] Repeat the above steps until the Q table converges;

[0111] The control module dynamically adjusts the opening time and flow rate of the acid pump and alkali pump according to the optimal strategy determined by the Q table. The specific operations are as follows:

[0112] When the sewage flow rate or pH value fluctuates, adjust the working status of the pump in real time;

[0113] Ensure that the pH value of sewage is stable within the target range;

[0114] Maximize control efficiency while saving reagent usage;

[0115] Through this implementation, the present invention can significantly improve the automation level and control accuracy of the sewage treatment system.

[0116] 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 method for adjusting pH value in a sewage treatment process, characterized in that: The following steps are involved: S1. Obtaining the real-time pH value in the sewage treatment system; S2, calculate the feedforward input, and calculate the required acid or alkali flow rate according to the pH reference value, the flow rate and pH value of the inflowing sewage, and the concentration of the added alkali or acid; S3. Construct a PH value adjustment model based on the Q-learning algorithm. The PH value adjustment model includes a state space, an action space, and a reward function, where the state is the current PH value. S4, iteratively train the pH value adjustment strategy through the Q-learning algorithm to generate the optimal action strategy; S5. Use the optimal action strategy to dynamically adjust the working status of the acid pump and the alkali pump. The pH value adjustment strategy adjusts the pH value based on real-time monitoring data.

2. A method for adjusting pH value in a sewage treatment process according to claim 1, characterized in that: The current pH value indicates the current acidity and alkalinity of the sewage, and the range is [0,14].

3. A method for adjusting pH value in a sewage treatment process according to claim 2, characterized in that: The calculation feedforward input includes the following: According to the sewage flow Q into the primary sedimentation tank sew And pH value PH0, get the flow into the primary sedimentation tank H + The amount of material flow; The required flow rate of acid or alkali is calculated based on the set pH value, acid concentration c (HC1) or alkali concentration c (NaOH).

4. A method for adjusting pH value in a sewage treatment process according to claim 3, characterized in that: The action space includes the opening time of the acid pump, the flow rate adjustment value of the acid pump, the opening time of the alkali pump, the flow rate adjustment value of the alkali pump and the closing state; The on time of the acid pump indicates the working time of the acid pump in each control cycle, in seconds; The flow adjustment value of the acid pump indicates the flow rate of the chemical reagent adjusted by the acid pump, in L / min; The opening time of the alkali solution pump indicates the working time of the alkali solution pump in each control cycle, in seconds; The flow adjustment value of the alkali liquid pump indicates the alkali liquid flow rate adjusted by the alkali liquid pump, in L / min; The closed state indicates that the acid pump and the alkali pump are closed.

5. A method for adjusting pH value in sewage treatment process according to claim 4, characterized in that: The reward function is expressed as follows: R total =R deviation +R smooth +R c Among them, R total Represents the output of the reward function, R deviation represents the PH value deviation penalty term, R smooth represents the action smoothness reward, R c Represents the chemical reagent cost penalty term.

6. A method for adjusting pH value in sewage treatment process according to claim 5, characterized in that: The PH value deviation penalty term is expressed as follows: R deviation =-K1|PH current -PH target | Among them, -K1 represents the coefficient for adjusting the penalty intensity, PH current Indicates the current pH value, PH target Indicates the target pH value.

7. A method for adjusting pH value in sewage treatment process according to claim 6, characterized in that: The action smoothness reward item is expressed as follows: R smooth =-K2|a current -a previous | Among them, -K2 represents the strength coefficient used to adjust the smoothness penalty, a current Indicates the current action, a previous Indicates the previous action.

8. A method for adjusting pH value in a sewage treatment process according to claim 7, characterized in that: The chemical reagent cost penalty item is expressed as follows: R c =-K3|q PAC -q Alk | In the formula, -K3 represents the intensity coefficient used to adjust the chemical reagent cost penalty, q PAC Indicates the amount of acid used, q Alk Indicates the amount of alkali solution used.

9. A method for adjusting pH value in sewage treatment process according to claim 8, characterized in that: The Q-learning algorithm adopts an ε-greedy strategy to dynamically balance exploration and exploitation during the training process.

10. A method for adjusting pH value in a sewage treatment process according to claim 9, characterized in that: The sewage treatment system also includes a sensor module, a data acquisition module and a control module. The sensor module is used to monitor the pH value of the sewage in real time.