Coagulant adding method based on deep learning

By constructing a coagulant injection system in tap water treatment based on deep learning, the hysteresis and inaccurate coagulant injection under artificial experience control is solved, and the precise real-time coagulant injection and the improvement of tap water treatment efficiency are achieved.

CN119539008APending Publication Date: 2025-02-28KUNMING UNIV OF SCI & TECH

Patent Information

Application Number
CN202411643993.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The dosing method of coagulant in existing tap water treatment mainly relies on artificial experience control, and there are problems of hysteresis and insufficient addition amount, resulting in waste of coagulant and unstable water quality of the effluent.

Method used

Using a coagulant dosing method based on deep learning, a deep learning network is established by constructing a water quality feature set and a coagulant dosing feature set, collecting water quality data in real time, simulating and predicting the coagulant dosing situation, determining the best dosing plan and implementing it.

Benefits of technology

It realizes the accurate and uninvolved real-time injection of coagulants, improves the efficiency of tap water treatment, solves the problem of unstable water quality in the effluent, and saves manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119539008A_ABST
    Figure CN119539008A_ABST
Patent Text Reader

Abstract

The invention discloses a coagulant adding method based on deep learning, which is characterized by comprising the following steps: S1, constructing a water quality feature set through existing water quality data; s2, constructing a dosing feature set through existing coagulant dosing data; s3, constructing a deep learning network based on the feature set; s4, the automatic control PLC collects real-time water quality data and stores the data in a database; s5, importing database data into the deep learning network, and simulating and predicting coagulant adding conditions; s6, judging and predicting an optimal coagulant adding scheme and storing the optimal coagulant adding scheme into a database; and S7, reading the database by the PLC and adding the flocculating agent. According to the method, the actual water quality data of the waterworks and the coagulant adding condition are combined with the characteristics of deep learning, so that an optimal coagulant adding scheme can be provided for the waterworks, higher tap water treatment efficiency is realized, and manpower, material resources and time cost are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent control of tap water treatment, and in particular to a coagulant adding method based on deep learning. Background Art

[0002] With the development of intelligent control of tap water treatment, the treatment process and efficiency of tap water treatment are becoming more and more mature, but the intelligent control of tap water treatment needs to be further improved. Coagulant is a chemical substance that can accelerate the aggregation of suspended particles and colloids in water to form larger precipitates. Coagulant can not only effectively remove suspended matter in water, but also purify water quality and improve filtration, and has very important application value. However, most of the current coagulant addition methods are still controlled by human experience, which has a large lag, the dosage is not accurate enough, and it is easy to cause waste of coagulants and the water quality of the effluent is relatively unstable.

[0003] Therefore, in order to solve the above problems, this paper proposes a coagulant dosing method based on deep learning. Summary of the invention

[0004] The purpose of the present invention is to design a coagulant dosing method based on deep learning to solve the existing problems;

[0005] In order to achieve the above object, the present invention is implemented by the following technical scheme: a coagulant addition method based on deep learning, characterized in that it comprises the following steps:

[0006] S1. Construct a water quality feature set through existing water quality data;

[0007] S2, constructing a dosing feature set through existing coagulant dosing data;

[0008] S3. Building a deep learning network based on the feature set;

[0009] S4, automatic control PLC collects real-time water quality data and stores it in the database;

[0010] S5. Importing the database data into the deep learning network to simulate and predict the coagulant addition situation;

[0011] S6, determining and predicting the best coagulant dosage plan and storing it in a database;

[0012] S7, PLC reads the database to execute flocculant addition.

[0013] Furthermore, in S1, the water quality data includes instantaneous water volume data of raw water entering the water plant, turbidity data of the sedimentation tank, temperature data, pH value data of the sedimentation tank, residual chlorine data of the clear water tank and turbidity data of the water to be filtered; according to the requirements of the water plant, the water quality data are divided into multiple groups as the water quality feature set.

[0014] Furthermore, in S2, the coagulant dosage data includes PAC dosage data and PAM dosage data; according to the requirements of the water plant, the coagulant dosage data is divided into multiple groups as the coagulant dosage feature set.

[0015] Furthermore, in S3, the deep learning network is constructed specifically as follows: according to the needs of the water plant, the water quality feature set and the coagulant addition feature set are used as the initial input, and the specified effluent water quality data is used as the output, thereby constructing a deep learning network.

[0016] Further, in S4, the automatic control PLC collects real-time water quality data including instantaneous water volume data of incoming raw water, turbidity data of sedimentation tank, temperature data, pH value data of sedimentation tank, residual chlorine data of clear water tank and turbidity data of water to be filtered;

[0017] The automatic control PLC collects real-time water quality data and stores it in the database: the data is stored in the MySQL database.

[0018] Furthermore, in S5, the database data is imported into the deep learning network, and the simulation prediction of the coagulant addition situation is specifically as follows: real-time water quality data and coagulant addition data are collected, imported into the deep learning network, and the structure and parameters of the deep learning model are updated; and the coagulant addition situation is predicted.

[0019] Further, in S6, the determination and prediction of the optimal coagulant addition scheme is as follows:

[0020] S6.1. Compare and calculate all the prediction results, and the results that meet the effluent water quality requirements but have the lowest energy consumption under the same water inlet conditions will be memorized;

[0021] S6.2, in the next batch of calculations, the variant that obtained the best result from the previous batch of calculations is used and has a higher priority;

[0022] S6.3, the better variants calculated by the new batch cover the previously memorized variants;

[0023] S6.4, keep replacing and retaining more and more advantageous variants.

[0024] Furthermore, in S7, the PLC reads the database to execute flocculant addition. Specifically, the PLC reads the data in the database and converts the data into electrical signals through analog signal conversion, which are finally sent to the coagulant pump main control cabinet in the form of electrical signals to adjust the flow of the coagulant pump (group) to provide the required amount.

[0025] The beneficial effects of the present invention are:

[0026] 1. The present invention aims at the problem that most of the current coagulant addition methods still remain in the addition controlled by human experience, which has a large hysteresis, the addition amount is not accurate enough, it is easy to cause waste of coagulant, and the water quality of the effluent is relatively unstable; the present invention can predict an accurate control addition plan through a deep learning network and give it to the automatic control equipment for execution, which truly solves the problem of inaccurate addition amount controlled by human experience, realizes an accurate real-time addition method for coagulant addition in water plants without human participation, and achieves higher tap water treatment efficiency;

[0027] 2. The present invention can better solve the problem of unstable water output caused by artificial coagulant addition in water plants, provide better auxiliary effects for the operation of water plants, save manpower and material resources; and provide technical reference for other fields of intelligent control technology for tap water treatment. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0029] Figure 1 The figure is a schematic diagram of the process of the method of the present invention. DETAILED DESCRIPTION

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

[0031] Example 1

[0032] See also Figure 1 As shown, 1. A coagulant addition method based on deep learning, characterized in that it includes the following steps:

[0033] S1. Construct a water quality feature set through existing water quality data;

[0034] In one embodiment, water quality data can be divided into historical water quality data and real-time water quality data from the time dimension. Historical water quality data includes the instantaneous water volume data of raw water, sedimentation tank turbidity data, temperature data, sedimentation tank pH value data, clear water tank residual chlorine data and turbidity data of water to be filtered, etc. of the water plant in recent years, as well as the risks and problem data that have occurred during the operation of the water plant; real-time water quality data only includes the instantaneous water volume data of raw water, sedimentation tank turbidity data, temperature data, sedimentation tank pH value data, clear water tank residual chlorine data and turbidity data of water to be filtered, etc., and does not include the risks and problem data that occurred during the operation of the water plant, because the current risk data cannot be collected or predicted immediately at the first time, and there is a certain lag.

[0035] S2, constructing a dosing feature set through existing coagulant dosing data;

[0036] In one embodiment, the coagulant addition data can be divided into historical coagulant addition data and real-time coagulant addition data from the time dimension. The historical coagulant addition data includes not only the PAC addition data and PAM addition data of the water plant in recent years, but also the risks and problem data that have occurred in the process of flocculant addition in the water plant; the real-time coagulant addition data only includes the current PAC addition data and PAM addition data, and does not include the risks and problem data that occurred in the process of flocculant addition, because the current risk data cannot be collected or predicted immediately at the first time, and there is a certain lag.

[0037] S3. Building a deep learning network based on the feature set;

[0038] In one embodiment, the process of building a deep learning network based on the feature set is divided into two steps:

[0039] (1) Construct single-layer neurons layer by layer, and train a single-layer network each time;

[0040] The weights between layers except the top layer are changed to bidirectional, so that the top layer is still a single-layer neural network, and the other layers constitute a graph model; the input of the top layer is the water quality feature set and the coagulant addition feature set; all weights are adjusted through the Wake-Sleep algorithm to ensure that the generated top-layer representation can restore the nodes of the bottom layer as accurately as possible.

[0041] For example, a node at the top level represents the influent water quality data and coagulant dosage data for a certain period of time. Then the influent water quality data and coagulant dosage data for all periods of time should activate this node, and the prediction result generated downward from this result should be able to show a rough trend of water quality changes.

[0042] After all layers are trained, they are tuned using the wake-sleep algorithm; the wake-sleep algorithm is divided into two parts: wake and sleep.

[0043] 1) Wake stage: cognitive process, which generates abstract representations of each layer through external features and upward weights, and uses gradient descent to modify the downward weights between layers.

[0044] 2) Sleep phase: The generation process generates the bottom-level state through the top-level representation and downward weights, while modifying the upward weights between layers.

[0045] In one embodiment, S3 further includes:

[0046] In the deep learning network, according to the requirements of effluent water quality indicators, the water quality feature set and the coagulant addition feature set are used as the initial input, and the specified water quality data and coagulant addition data that meet the standards are used as the output, so as to construct a deep learning network. Since the water quality feature set and the coagulant addition feature set contain various types of water quality and coagulant addition data, as well as existing risk problem water quality data, by using the two as the input of the deep learning network, a deep learning network that can predict water quality changes can be constructed.

[0047] S4, automatic control PLC collects real-time water quality data and stores it in the database;

[0048] In one embodiment, the automatic control PLC collects real-time water quality data using the Profibus protocol and the Ethernet / IP protocol, uses the standard Ethernet protocol to transmit data, and has a high degree of compatibility.

[0049] In one embodiment, S4 also includes that the database adopts MySQL database, is written in C and C++, and is tested using multiple compilers to ensure the portability of the source code.

[0050] S5. Importing the database data into the deep learning network to simulate and predict the coagulant addition situation;

[0051] In one implementation, after collecting real-time water service data, the collected heterogeneous data must first be preprocessed. The preprocessing mainly uses three methods: normalization, principal component analysis, and whitening. The activation function of the intermediate hidden layer neurons of the deep learning network uses the ReLU function, and the formula is:

[0052] f(x)=max(0,x),

[0053] Where f(x) is the output and x is the input; the last layer activation function uses the softmax function, and the formula is:

[0054]

[0055] Among them, x i is the output of the i-th neuron, z i The intermediate variable z is obtained by weighting, summing and biasing the input to the i-th neuron. j Input the jth neuron with the intermediate variable obtained through weighting, summing and biasing;

[0056] Since the traditional sigmoid function has the problems of gradient vanishing and large amount of calculation, the activation function of the intermediate hidden layer neurons adopts the ReLU function. However, the actual water quality prediction and coagulant addition often need to solve a multi-classification neural network problem. Therefore, the softmax function is selected as the activation function of the last layer.

[0057] The loss function adopts the cross entropy loss function, and the formula is:

[0058] L=-[ylogy^+(1-y)log(1-y^)],

[0059]

[0060] where x (i) is the expected output, is the actual output; the optimization function uses stochastic gradient descent method and iterative training

[0061] Until the deep learning network enters a steady state.

[0062] Some implementation codes are as follows:

[0063]

[0064] Since the cross entropy function can avoid gradient dissipation, the price difference entropy function is selected as the loss function.

[0065] Compared with the traditional gradient descent method, the stochastic gradient descent method does not select all variables for optimization each time, but randomly selects a small number of variables for optimization, which greatly reduces the optimization workload. Therefore, the stochastic gradient descent method is selected as the optimization function.

[0066] S6, determining and predicting the best coagulant dosage plan and storing it in a database;

[0067] In one embodiment, the coagulant addition process assumes that the mixing process uses a mechanical mixing tank. The coagulant is added to the water through a metering pump and then enters the mechanical mixing tank for stirring. In terms of the degree of mixing inside the reactor, the mechanical mixing tank is approximately a continuous full mixed flow reactor with the following characteristics: fresh materials are mixed evenly in an instant; materials with different residence times are mixed with each other, i.e., backmixed; the material concentration is the same everywhere in the reactor and is equal to the material concentration at the reactor outlet. Based on the characteristics of the reactor, according to the law of conservation of matter, there is the following formula:

[0068]

[0069] The relationship between the concentration of the reagent in the effluent and influent of the mixing tank is obtained by Laplace transformation:

[0070]

[0071] Among them, X in (t) is the influent concentration of the mixing tank, X out (t) is the effluent concentration of the mixing tank, V is the effective volume of the mixing tank, q is the flow rate of the raw water, y in (s) is the concentration of the influent agent, y out (s) is the concentration of the effluent agent.

[0072] Assuming that the coagulant (alum) is completely hydrolyzed during the mixing process, and the pH value of the water in the mixing tank is maintained at an intermediate value, the reagent particles produced by the hydrolysis of the coagulant are mainly positively charged aluminum hydroxide particles, and the colloidal particles in the water are mainly destabilized and condensed through adsorption-electrical neutralization. Assuming that the colloidal particles in the original water before mixing are all primary colloidal particles, and the primary colloidal particles and aluminum hydroxide particles are uniform spheres with diameters equal to 2μm and 100nm respectively. Then the surface charge concentration expression after the colloidal particles and the reagent particles undergo adsorption-electrical neutralization is as follows:

[0073]

[0074] Where ρ1 and ρ2 are the surface charge concentrations of colloid particles and pharmaceutical particles, respectively, and A1 and A2 are the surface areas of colloid particles and pharmaceutical particles.

[0075] Assume that when ρ 1,2 When y is 0, the colloidal particles are in a destabilized state and begin to aggregate. According to the area ratio of the two particles, the concentration of destabilized colloids in water can be approximately calculated as follows: However, when the dosage is too much, the destabilized colloid particles will adsorb too many aluminum hydroxide particles to stabilize again. From the above, the concentration of destabilized colloid particles in water can be approximately calculated as follows: When the dosage is less than the optimal dosage, the number concentration of destabilized colloid particles in water is approximately y out / (m y)·400, when the dosage is greater than the optimal dosage, the number concentration of destabilized particles in water is approximately 2y out / (m y )·400-X out / m x , where m x ,m y They are the mass of single pharmaceutical particles and primary impurity particles respectively.

[0076] The destabilized colloid particles condense under the action of Brownian motion to form particles of different sizes. In the modeling process, the continuous size of the particles is divided into intervals, each interval represents a certain diameter, and the particle diameter calculation formula in different intervals is as follows. Assume that the colloid particles in the effluent of the mixing tank obey the following classic distribution:

[0077]

[0078] Where N is the particle number concentration, V i is the interval, the internal particle volume, N0 and V0 are the total number of initial particles and the average volume of particles respectively.

[0079] In the above formula, the volume V represented by the interval is expressed as follows:

[0080]

[0081] Among them, a i and a i-1 are the upper and lower bounds of the interval, and a i =2a i-1 .

[0082] PAC can quickly form precipitation of colloids in sewage or sludge through it or its hydrolysis products, which is convenient for separating large particles of sediment. PAM is commonly known as flocculant or coagulant. The average molecular weight of PAM ranges from thousands to tens of millions. There are several functional groups along the bond-like molecules. Most of them can be ionized in water and belong to polymer electrolytes. Cationic and anionic PAM are suitable for sewage with negative and positive charges respectively. After adding PAM to sewage or sludge, it must be effectively mixed. The specific amount of PAM used has a great relationship with the concentration, properties and treatment equipment of colloids and suspended solids in sewage or sludge. The optimal dosage must be obtained through scientific experiments. According to the optimal dosage concentration (PPM1 concentration of polyacrylamide to be added) and the influent flow rate (t / h) and the concentration of the prepared polyacrylamide solution (PPM2 concentration of prepared polyacrylamide), the displayed value (LPM) on the dosing pump flowmeter can be calculated, that is: influent flow rate (t / h) / 60×PPM1 concentration of polyacrylamide to be added / PPM2 concentration of prepared polyacrylamide.

[0083] In summary, the optimal dosage of coagulant can be predicted by deep learning network simulation, and the dosage is adjusted according to the real-time water quality collected and transmitted to the database by the automatic control PLC until the minimum dosage that meets the effluent standard is simulated. The optimal dosage parameters are then transmitted and stored in the MySQL database.

[0084] S7, PLC reads the database to execute flocculant addition;

[0085] In one embodiment, the analog signal of the coagulant dosage is converted through the MySQL database and finally sent to the coagulant pump main control cabinet to adjust the flow of the coagulant pump (group) to provide the required amount.

[0086] In a real-time example, data from various water management businesses can be stored through distributed storage, local centralized storage, cloud storage, edge storage and other storage methods according to the scale and data volume of the water management business, thereby improving the data storage efficiency of the deep learning network and reducing data transmission delay.

[0087] In the description of this specification, reference is made to the terms "one embodiment", "some embodiments", "examples", "particular examples", etc.

[0088] Descriptions such as “an example” or “some examples” mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without contradiction.

[0089] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0090] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0091] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.

Claims

1. A coagulant dosing method based on deep learning, characterized in that: The following steps are involved: S1. Construct a water quality feature set through existing water quality data; S2, constructing a dosing feature set through existing coagulant dosing data; S3. Building a deep learning network based on the feature set; S4, automatic control PLC collects real-time water quality data and stores it in the database; S5. Importing the database data into the deep learning network to simulate and predict the coagulant addition situation; S6, determining and predicting the best coagulant dosage plan and storing it in a database; S7, PLC reads the database to execute flocculant addition.

2. A coagulant addition method based on deep learning according to claim 1, characterized in that: In S1, the water quality data includes instantaneous water volume data of raw water coming into the water plant, turbidity data of the sedimentation tank, temperature data, pH value data of the sedimentation tank, residual chlorine data of the clear water tank and turbidity data of the water to be filtered; according to the requirements of the water plant, the water quality data is divided into multiple groups as the water quality feature set.

3. According to a method for adding a coagulant based on deep learning according to claim 1, it is characterized in that: In S2, the coagulant dosage data includes PAC dosage data and PAM dosage data; according to the requirements of the water plant, the coagulant dosage data is divided into multiple groups as the coagulant dosage feature set.

4. A coagulant dosing method based on deep learning according to claim 1, characterized in that: In S3, the deep learning network is constructed specifically as follows: according to the needs of the water plant, the water quality feature set and the coagulant addition feature set are used as the initial input, and the specified effluent water quality data is used as the output, thereby constructing a deep learning network.

5. A coagulant dosing method based on deep learning according to claim 1, characterized in that: In S4, the automatic control PLC collects real-time water quality data including the instantaneous water volume data of incoming raw water, turbidity data of sedimentation tank, temperature data, pH value data of sedimentation tank, residual chlorine data of clear water tank and turbidity data of water to be filtered; The automatic control PLC collects real-time water quality data and stores it in the database: the data is stored in the MySQL database.

6. A coagulant dosing method based on deep learning according to claim 1, characterized in that: In S5, the database data is imported into the deep learning network, and the simulation prediction of the coagulant addition situation is specifically as follows: real-time water quality data and coagulant addition data are collected, imported into the deep learning network, and the structure and parameters of the deep learning model are updated; and the coagulant addition situation is predicted.

7. A coagulant addition method based on deep learning according to claim 1, characterized in that: In S6, the determination and prediction of the optimal coagulant addition scheme is as follows: S6.

1. Compare and calculate all the prediction results, and the results that meet the effluent water quality requirements but have the lowest energy consumption under the same water inlet conditions will be memorized; S6.2, in the next batch of calculations, the variant that obtained the best result from the previous batch of calculations is used and has a higher priority; S6.3, the better variants calculated by the new batch cover the previously memorized variants; S6.4, keep replacing and retaining more and more advantageous variants.

8. The method for adding a coagulant based on deep learning according to claim 1, characterized in that: In S7, PLC reads the database to execute flocculant addition. Specifically, PLC reads the data in the database and converts the data into electrical signals through analog signal conversion. The electrical signals are finally sent to the main control cabinet of the coagulant pump to adjust the flow of the coagulant pump to provide the required amount.

Citation Information

Patent Citations

  • Mathematical model auxiliary control method based on A2O biological tank process

    CN117113661A

  • Water plant coagulant dosage prediction method and system

    CN117316334A

  • Process intelligent control model method for automatically detecting and starting coagulation kinetic model

    CN117850361A

Cited By

  • System and method for generating intelligent putting strategy of water body antibacterial agent

    CN120746345A