Method and system for controlling pH value based on mathematical AI modeling
By using mathematical AI modeling and data processing, a reagent dosing model was established, which solved the problem of pH control in wastewater treatment and achieved rapid and accurate pH adjustment and reagent saving.
Patent Information
- Application Number
- CN202411085513.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-05
AI Technical Summary
pH control is challenging in wastewater treatment, and conventional control technologies struggle to achieve precise control while consuming large amounts of chemicals.
Based on mathematical AI modeling, a reagent dosing model is established by collecting and processing historical operating data. Combined with PID and feedforward compensation control, the pH value can be quickly and accurately adjusted.
It enables rapid and precise pH adjustment, reduces reagent consumption, and improves wastewater treatment efficiency.
Smart Images

Figure CN118897585A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water treatment, and in particular to a method and system for controlling pH value based on mathematical AI modeling. Background Art
[0002] The pH value in sewage treatment is an important indicator, which reflects the acidity and alkalinity of the water body. The pH value control in sewage treatment is of great significance to ensure the treatment effect, protect the environment and ensure the safety of workers. However, the pH value of sewage treatment is difficult to control, mainly due to the following reasons:
[0003] (1) pH value is the definition of the acidity and alkalinity of the solution in the acid-base neutralization reaction. The neutralization reaction has serious nonlinear characteristics, which is mainly manifested near the neutralization point. The gain of the titration curve here is very large. A slight change in the neutralizer added here may cause a large change in the pH value. However, the neutralizer cannot be continuously added because the pH value cannot be detected. This will cause the pH value to overshoot. If the detected pH value is far away from the neutralization point, the gain of the titration curve is small and the pH value change range is relatively small. At this time, a large amount of neutralizer needs to be added to make the pH value rise or fall rapidly;
[0004] (2) The neutralization reaction process is a reaction that occurs during the flow of a pressureless water pool, and the process is easily affected by factors such as its own chemical composition, whether it contains other substances, and the external environment;
[0005] (3) When using an immersion pH tester, if the liquid level is at the lowest level, the electrode may be suspended in the air, making it impossible to accurately detect the pH value;
[0006] (4) When the amount of sewage changes nonlinearly, the amount of neutralizer also needs to change nonlinearly accordingly.
[0007] Affected by the above factors, it is difficult to achieve precise control of pH value using conventional control technologies such as PID control in the sewage treatment process. Summary of the invention
[0008] The purpose of the present invention is to provide a method and system for controlling pH value based on mathematical AI modeling. The method based on mathematical AI modeling can effectively compensate for interference items or uncertainties existing in the water treatment system, achieve the purpose of rapid and precise adjustment of pH value, and also save the consumption of chemicals and improve the efficiency of the sewage treatment process.
[0009] In order to achieve the above object, the present invention provides a method for controlling pH value based on mathematical AI modeling, which comprises:
[0010] The first historical pH value, historical reagent dosage and historical water inflow of the liquid in the reaction tank are used as input, and the second historical pH value of the liquid in the reaction tank is used as output to train and establish a reagent dosage model;
[0011] Measuring a first real-time pH value of the reaction tank;
[0012] Inputting the real-time water inflow, the first real-time pH value and the expected pH value into the agent dosing model to calculate the real-time agent dosage;
[0013] Adding reagents to the reaction pool according to the real-time reagent delivery amount;
[0014] The first historical pH and the first real-time pH both represent the pH value of the liquid before the reagent is added to the reaction tank, and the second historical pH value represents the pH value of the liquid after the reagent is added to the reaction tank.
[0015] Optionally, historical operation data is collected, and the historical operation data includes the historical liquid level of the reaction tank, the first historical pH value, the second historical pH value, the historical influent type, the historical influent volume and the corresponding historical reagent dosage.
[0016] Optionally, before training and establishing the drug dosing model, data preprocessing is performed, and the data preprocessing method includes: deleting the historical operation data when the historical liquid level is lower than a preset value.
[0017] Optionally, after adding the real-time agent dosage to the reaction tank, wait for a preset time and measure the second real-time pH value of the reaction tank. When the error between the second real-time pH value and the expected pH value exceeds a preset range, the agent dosage model is optimized according to the first historical pH value, the second historical pH value, the historical agent dosage, the historical water inflow and the first real-time pH value, the second real-time pH value, the real-time agent dosage and the real-time water inflow.
[0018] Optionally, the real-time liquid level of the reaction tank is measured, and when the real-time liquid level is lower than a preset value, an alarm is generated.
[0019] Optionally, the drug administration model is established based on a gated recurrent unit and a fully connected layer.
[0020] Optionally, the method for calculating the real-time dosage of the agent includes: calculating a first control amount based on the error between the first real-time pH value and the expected pH value, calculating a second control amount based on the real-time water intake, and calculating the real-time dosage of the agent based on the first control amount and the second control amount.
[0021] Optionally, the method for calculating the real-time drug delivery amount includes: adding the first control amount and the second control amount, the second control amount is a rational number, and the first control amount is a positive number.
[0022] As configured above, the present invention collects a wide range of historical operation data from the sewage treatment process, and based on the mathematical AI modeling method, utilizes a large amount of historical operation data to establish a reagent dosing model, analyzes and processes these data to achieve effective compensation for interference items or uncertainties in the water treatment system, and achieves the purpose of rapid and precise adjustment of the pH value. In addition, the present invention can also save reagent consumption, eliminate the drawbacks of traditional dosing methods, and improve the efficiency of the sewage treatment process.
[0023] Based on another aspect of the present invention, the present invention also provides a system for controlling pH value based on mathematical AI modeling, which comprises:
[0024] A model building module, wherein the model building module takes a first historical pH value of the liquid in the reaction tank, a historical dosage of the reagent, and a historical water inflow as inputs, and takes a second historical pH value of the liquid in the reaction tank as output, and trains and establishes a reagent dosing model;
[0025] A measuring module, which is used to measure a first real-time pH value of the reaction tank;
[0026] A calculation module, which is used to input the real-time water intake, the first real-time pH value and the expected pH value into the agent dosing model to calculate the real-time agent dosage;
[0027] A dosing module, which is used to add a reagent to the reaction pool according to the real-time reagent delivery amount;
[0028] The first historical pH and the first real-time pH both represent the pH value of the liquid before the reagent is added to the reaction tank, and the second historical pH value represents the pH value of the liquid after the reagent is added to the reaction tank.
[0029] Optionally, the system includes a liquid level monitoring module, which is used to measure the real-time liquid level of the reaction tank. When the real-time liquid level is lower than a preset value, the liquid level monitoring module generates an alarm prompt.
[0030] It should be noted that the system for controlling pH value based on mathematical AI modeling and the method for controlling pH value based on mathematical AI modeling belong to the same inventive concept and have the same or corresponding specific technical features, so the system for controlling pH value also has the technical effects of the method for controlling pH value, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Those skilled in the art should understand that the drawings are provided for a better understanding of the present invention and do not constitute any limitation on the scope of the present invention.
[0032] Figure 1 A schematic diagram of a method for controlling pH value based on mathematical AI modeling according to an embodiment of the present invention;
[0033] Figure 2 This is a schematic diagram of calculating the real-time dosage of a drug according to a method for controlling pH value based on mathematical AI modeling according to an embodiment of the present invention;
[0034] Figure 3 A curve diagram showing a pH value change in a reaction pool within 120 minutes according to an embodiment of the present invention;
[0035] Figure 4 A curve diagram showing a pH value change within 120 minutes in another reaction tank according to an embodiment of the present invention;
[0036] Figure 5 This is a curve diagram of pH value variation within 7000 minutes in a reaction pool according to an embodiment of the present invention;
[0037] Figure 6 This is a curve diagram of pH value variation within 7000 minutes in another reaction tank according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In this document, unless otherwise specified, the terms "upper", "lower", "left", "right", "inside", "outside", "front", "back", "top", "bottom", etc. are used to indicate directions or positional relationships based on the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction and operation. Therefore, they cannot be understood as limiting the present invention.
[0039] The specific implementation of the present invention will be described in more detail below in conjunction with the schematic diagram. The advantages and features of the present invention will become clearer based on the following description. It should be noted that the drawings are all in a very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in explaining the purpose of the embodiments of the present invention.
[0040] Figure 1 Schematic diagram of a method for controlling pH value based on mathematical AI modeling according to an embodiment of the present invention. Figure 1 An embodiment of the present invention provides a method for controlling pH value based on mathematical AI modeling, which includes step S1, step S2, step S3 and step S4. Step S1, step S2, step S3 and step S4 are described in detail below.
[0041] Step S1: taking the first historical pH value, historical reagent dosage and historical water inflow of the liquid in the reaction tank as input, and taking the second historical pH value of the liquid in the reaction tank as output, to train and establish a reagent dosage model.
[0042] It is understandable that before training and establishing the reagent dosing model, it is necessary to collect extensive historical operation data from the sewage treatment process and perform data preprocessing. Historical operation data may include, for example, the historical liquid level of the reaction tank, the first historical pH value, the second historical pH value, the historical water inlet type, the historical water inlet volume, and the corresponding historical reagent dosage, etc. The historical operation data may also include environmental parameters (such as temperature, pressure, etc.) and other variables that may affect the pH value. The method of data preprocessing includes: deleting the historical operation data when the historical liquid level is lower than the preset value. When the historical liquid level is low, the pH value of the measured reaction tank will be inaccurate, so the historical operation data when the historical liquid level is lower than the preset value is cleaned up, and the historical operation data when the historical liquid level is lower than the preset value is not allowed to participate in the establishment of the reagent dosing model, so as to ensure the accuracy of the reagent dosing model. Data preprocessing is an important means to ensure data quality.
[0043] Considering that the water treatment system is a dynamic system, the drug dosing model is established based on the gated recurrent unit and the fully connected layer.
[0044] Step S2: measuring the first real-time pH value of the reaction pool. In this embodiment, two reaction pools are taken as an example, and the first real-time pH values of the two reaction pools are Y1 and Y2 respectively.
[0045] The first historical pH and the first real-time pH both represent the pH value of the liquid in the reaction pool before the reagent is added, and the second historical pH value represents the pH value of the liquid in the reaction pool after the reagent is added.
[0046] Step S3: Input the real-time water inflow, the first real-time pH value and the expected pH value into the reagent dosing model to calculate the real-time reagent dosage. Exemplarily, the real-time water inflow may include wastewater inflow D1 and / or sewage volume D2. For example, the wastewater inflow may be water discharged from a certain treatment process, and the sewage may be water used to clean equipment and facilities. In this embodiment, there are both wastewater inflow D1 and sewage volume D2, and the wastewater inflow D1 and sewage volume D2 each enter a different reaction tank. The expected pH values of the two reaction tanks are R1 and R2, respectively.
[0047] For example, see Figure 2, the method for calculating the real-time dosage of the agent through the agent dosing model includes: calculating the first control amount according to the error between the first real-time pH value and the expected pH value, calculating the second control amount according to the real-time water inflow, the second control amount is the feedforward control amount, and calculating the real-time dosage of the agent according to the first control amount and the second control amount. Let the first control amounts corresponding to the two reaction pools be Uc1 and Uc2, the second control amounts corresponding to the two reaction pools be Uf1 and Uf2, and the real-time dosage of the agent corresponding to the two reaction pools be U1 and U2. That is, Uc1 is calculated according to the error between Y1 and R1, Uc2 is calculated according to the error between Y2 and R2, Uf1 is calculated according to D1, Uf2 is calculated according to D2, U1 is calculated according to Uc1 and Uf1, and U2 is calculated according to Uc2 and Uf2. In this way, the real-time dosage of the agent U1 and U2 are calculated through intelligent AI. It is understandable that the calculation of the first control amount can be completed in a PID controller, the calculation of the second control amount can be completed in a feedforward compensation controller, and the second control amount can be used as a compensation amount for the first control amount to compensate for the impact of the real-time water intake on the pH value control, predict the potential deviation of the pH value, and make adjustments before the deviation occurs, so as to achieve more accurate control of the pH value. Exemplarily, the method for calculating the real-time dosage of the drug includes: adding the first control amount and the second control amount, the second control amount is a rational number, and the first control amount is a positive number. That is, the second control amount can be a positive number, a negative number or zero.
[0048] Step S4: Add reagents to the reaction tank according to the real-time reagent dosage.
[0049] Further, after adding the real-time agent dosage to the reaction pool, wait for a preset time and measure the second real-time pH value of the reaction pool. It can be understood that the second real-time pH value represents the pH value of the liquid in the reaction pool after the real-time agent dosage is added and the preset time is waited. When the error between the second real-time pH value and the expected pH value exceeds the preset range, it means that the agent dosage model at this time is not accurate enough to predict the real-time agent dosage, and needs to be further optimized. The agent dosage model is optimized according to the first historical pH value, the second historical pH value, the historical agent dosage, the historical water inflow and the first real-time pH value, the second real-time pH value, the real-time agent dosage and the real-time water inflow. It is necessary to wait for a preset time to measure the second real-time pH value, so as to leave time for the physical and chemical treatment process of the water treatment system and to allow the agent to fully react. It can be understood that when the error between the second real-time pH value and the expected pH value does not exceed the preset range, it means that the agent dosage model at this time is relatively accurate and can be left unchanged without modification. Therefore, the present invention will continuously collect new data and update and optimize the agent dosing model as the water treatment system continues to operate. This continuous learning mechanism helps to improve the long-term effectiveness and adaptability of the present invention.
[0050] Based on another aspect of the present invention, the present invention also provides a system for controlling pH value based on mathematical AI modeling, which is based on the same inventive concept as the method for controlling pH value based on mathematical AI modeling. The system for controlling pH value includes a model building module, a measurement module, a calculation module and a dosing module.
[0051] The model building module takes the first historical pH value of the liquid in the reaction tank, the historical reagent dosage and the historical water inflow as input, and takes the second historical pH value of the liquid in the reaction tank as output, and trains to establish a reagent dosage model.
[0052] The measuring module is used to measure the first real-time pH value of the reaction tank. In addition to measuring the pH value, the measuring module can also be used to measure other sewage data, such as real-time water inflow, etc. When the sewage data is abnormal, the measuring module generates an alarm prompt.
[0053] The calculation module is used to calculate the real-time agent dosage according to the real-time water inflow, the first real-time pH value and the expected pH value through the agent dosage model. The calculation module may include a PID controller and a feedforward compensation controller.
[0054] The dosing module is used to add reagents to the reaction pool according to the real-time reagent dosage. For example, the dosing module can include a precision flow device composed of a pump valve with an intelligent metering valve as the core, which can accurately control the dosage rate of the reagent according to the real-time reagent dosage, which is crucial to achieve the goal of accurately controlling the pH value.
[0055] The first historical pH and the first real-time pH both represent the pH value of the liquid before the reagent is added to the reaction tank, and the second historical pH value represents the pH value of the liquid after the reagent is added to the reaction tank.
[0056] Preferably, the system for controlling the pH value includes a liquid level monitoring module, which is used to measure the real-time liquid level of the reaction tank. When the real-time liquid level is lower than a preset value, the liquid level monitoring module generates an alarm prompt.
[0057] The system for controlling pH also includes a display that allows operators to easily monitor the status of the water treatment system, adjust control parameters, and receive real-time feedback, ensuring ease of operation.
[0058] The system for controlling the pH value also includes an optimization module. After adding a real-time amount of reagent to the reaction tank, it waits for a preset time and measures the second real-time pH value of the reaction tank. When the error between the second real-time pH value and the expected pH value exceeds a preset range, the optimization module optimizes the reagent addition model according to the first historical pH value, the second historical pH value, the historical reagent dosage, the historical water inflow and the first real-time pH value, the second real-time pH value, the real-time reagent dosage and the real-time water inflow.
[0059] As configured above, the present invention collects a wide range of historical operation data from the sewage treatment process, and based on the mathematical AI modeling method, utilizes a large amount of historical operation data to establish a reagent dosing model, analyzes and processes these data to achieve effective compensation for interference items or uncertainties in the water treatment system, and achieves the purpose of rapid and precise adjustment of the pH value. In addition, the present invention can also save reagent consumption, eliminate the drawbacks of traditional dosing methods, and improve the efficiency of the sewage treatment process.
[0060] The present invention controls pH value quickly and accurately, which can be referred to Figure 3 , Figure 4 , Figure 5 and Figure 6 , Figure 3 and Figure 4 This is the pH value change curve of the two reaction pools within 120 minutes. Figure 5 and Figure 6 It is the pH value change curve of two reaction pools within 7000 minutes, wherein the ordinate is the real-time pH value, the abscissa Time (min) is the time (unit: minute), the orange curve represents the pH value change curve before using the method for controlling the pH value of the present invention, the blue line curve represents the expected pH value, and the green curve represents the pH value change curve after using the method for controlling the pH value of the present invention. It can be seen that after using the method for controlling the pH value of the present invention, the fluctuation of the pH value is significantly reduced and relatively stable. After a 60-minute dynamic process, the green curve can basically converge to the vicinity of the expected pH value, achieving the purpose of accurately controlling the pH value.
[0061] It should be noted that references to "one embodiment", "an embodiment", "a specific embodiment", "some embodiments", etc. in the specification only indicate that the described embodiment may include a particular feature, structure or characteristic. Moreover, such phrases do not necessarily refer to the same embodiment. In addition, when a particular feature, structure or characteristic is described in conjunction with an embodiment, whether or not explicitly described, it is within the knowledge of a person skilled in the relevant art to implement such feature, structure or characteristic in conjunction with other embodiments.
[0062] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0063] It should also be noted that, although the present invention has been disclosed as a preferred embodiment, the above embodiment is not intended to limit the present invention. For any technician familiar with the art, without departing from the scope of the technical solution of the present invention, the technical content disclosed above can be used to make many possible changes and modifications to the technical solution of the present invention, or modified into equivalent embodiments of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.
[0064] It should also be understood that, unless otherwise specified or indicated, the terms "first", "second", "third", etc. in the specification are merely used to distinguish between the various components, elements, steps, etc. in the specification, and are not used to indicate the logical relationship or sequential relationship between the various components, elements, steps, etc.
[0065] It should also be recognized that the terms described herein are only used to describe specific embodiments and are not intended to limit the scope of the invention. It should be noted that the singular forms "a" and "an" used herein and in the appended claims include plural references unless the context clearly indicates otherwise. For example, a reference to "a step" or "a device" means a reference to one or more steps or devices, and may include secondary steps and secondary devices. All conjunctions used should be understood in the broadest sense. And, the word "or" should be understood to have the definition of a logical "or", rather than a logical "exclusive or", unless the context clearly indicates otherwise. In addition, the implementation of the method and / or device in the embodiments of the present invention may include performing the selected task manually, automatically, or in combination.
Claims
1. A method for controlling pH value based on mathematical AI modeling, characterized in that: include: The first historical pH value, historical reagent dosage and historical water inflow of the liquid in the reaction tank are used as input, and the second historical pH value of the liquid in the reaction tank is used as output to train and establish a reagent dosage model; Measuring a first real-time pH value of the reaction tank; Inputting the real-time water inflow, the first real-time pH value and the expected pH value into the agent dosing model to calculate the real-time agent dosage; Adding reagents to the reaction pool according to the real-time reagent delivery amount; The first historical pH and the first real-time pH both represent the pH value of the liquid before the reagent is added to the reaction tank, and the second historical pH value represents the pH value of the liquid after the reagent is added to the reaction tank.
2. The method for controlling pH value based on mathematical AI modeling according to claim 1, characterized in that: Collect historical operation data, wherein the historical operation data includes the historical liquid level of the reaction tank, the first historical pH value, the second historical pH value, the historical influent type, the historical influent volume and the corresponding historical reagent dosage.
3. The method for controlling pH value based on mathematical AI modeling as claimed in claim 2, characterized in that: Before training and establishing the drug dosing model, data preprocessing is performed, and the data preprocessing method includes: deleting the historical operation data when the historical liquid level is lower than a preset value.
4. The method for controlling pH value based on mathematical AI modeling according to claim 1, characterized in that: After adding the real-time agent dosage to the reaction tank, wait for a preset time and measure the second real-time pH value of the reaction tank. When the error between the second real-time pH value and the expected pH value exceeds a preset range, optimize the agent dosage model according to the first historical pH value, the second historical pH value, the historical agent dosage, the historical water inflow and the first real-time pH value, the second real-time pH value, the real-time agent dosage and the real-time water inflow.
5. The method for controlling pH value based on mathematical AI modeling according to claim 1, characterized in that: The real-time liquid level of the reaction tank is measured, and when the real-time liquid level is lower than a preset value, an alarm is generated.
6. The method for controlling pH value based on mathematical AI modeling according to claim 1, characterized in that: The drug administration model is established based on a gated recurrent unit and a fully connected layer.
7. The method for controlling pH value based on mathematical AI modeling according to claim 1, characterized in that: The method for calculating the real-time dosage of the agent includes: calculating a first control amount according to the error between the first real-time pH value and the expected pH value, calculating a second control amount according to the real-time water intake, and calculating the real-time dosage of the agent according to the first control amount and the second control amount.
8. The method for controlling pH value based on mathematical AI modeling as claimed in claim 7, characterized in that: The method for calculating the real-time medicine delivery amount includes: adding the first control amount and the second control amount, the second control amount is a rational number, and the first control amount is a positive number.
9. A system for controlling pH value based on mathematical AI modeling, characterized in that: include: A model building module, wherein the model building module takes a first historical pH value of the liquid in the reaction tank, a historical dosage of the reagent, and a historical water inflow as inputs, and takes a second historical pH value of the liquid in the reaction tank as output, and trains and establishes a reagent dosing model; A measuring module, which is used to measure a first real-time pH value of the reaction tank; A calculation module, which is used to input the real-time water intake, the first real-time pH value and the expected pH value into the agent dosing model to calculate the real-time agent dosage; A dosing module, which is used to add a reagent to the reaction pool according to the real-time reagent delivery amount; The first historical pH and the first real-time pH both represent the pH value of the liquid before the reagent is added to the reaction tank, and the second historical pH value represents the pH value of the liquid after the reagent is added to the reaction tank.
10. The system for controlling pH value based on mathematical AI modeling as claimed in claim 9, characterized in that: The system comprises a liquid level monitoring module, which is used to measure the real-time liquid level of the reaction tank. When the real-time liquid level is lower than a preset value, the liquid level monitoring module generates an alarm prompt.
Citation Information
Cited By
Multi-modal time series data prediction system and use method thereof
CN120687770A
Method and system for regulating and controlling pH of anaerobic digestion system
CN122212360A
