Flocculant dosage control method, system, equipment, medium and program
By acquiring real-time images of flocs and multi-source parameters in the flocculation tank, extracting floc features using a target recognition model, and calculating the floc dosage based on the turbidity of the influent and effluent, the problem of inaccurate floc dosing was solved, achieving precise and intelligent control of the flocs, and improving the operating efficiency of the water treatment system and the stability of the effluent quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUODIAN NANJING ELECTRIC POWER TEST RES CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the control of flocculant dosage relies on delayed feedback of effluent turbidity and human experience, which leads to inaccurate timing of dosing, easy waste of chemicals or effluent water quality exceeding standards, and difficulty in real-time monitoring of floc formation and aggregation.
By acquiring images of flocs, influent flow rate, and effluent turbidity in the flocculation tank, the morphology, average size, and distribution density characteristics of the flocs are extracted using a target recognition model. The flocculant dosage is calculated by combining influent and effluent turbidity. A control strategy combining feedforward and feedback is adopted to achieve precise flocculant dosing.
It achieves precise and intelligent flocculant dosing, avoids waste of chemicals, ensures stable effluent quality, and improves the operating efficiency and shock load resistance of the water treatment system.
Smart Images

Figure CN121990662A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of water treatment technology, and in particular to a method, system, equipment, medium and procedure for controlling the dosage of flocculant. Background Technology
[0002] In water supply or wastewater treatment, coagulation / flocculation is a key unit operation for removing suspended solids, colloids, and some dissolved pollutants. Its effectiveness directly determines the operating efficiency of subsequent processes such as sedimentation and filtration, as well as the quality of the effluent. The dosage of flocculant needs to be dynamically adjusted according to the raw water quality (such as turbidity, pH, temperature, and organic matter content) to form dense flocs with good settling properties.
[0003] In related technologies, feedforward estimation is often based on influent flow rate and turbidity, or manual adjustment is based on feedback of effluent turbidity. Since the effluent quality reflects the result of the completed reaction, there is a significant time lag, which cannot characterize the generation, growth and aggregation of flocs during the flocculation reaction in real time. This results in slow response and insufficient precision in chemical dosing control, which can easily lead to waste of chemicals or effluent quality exceeding standards. Summary of the Invention
[0004] This application provides a method, system, equipment, medium, and procedure for controlling the dosage of flocculants, in order to solve the problems in related technologies that rely on delayed feedback of effluent turbidity and human experience for control, which leads to inaccurate timing of dosing, easy waste of chemicals, or effluent water quality exceeding standards.
[0005] The first aspect of this application provides a method for controlling the dosage of flocculant, comprising the following steps: acquiring images of flocs, influent flow rate, influent turbidity, and effluent turbidity in a flocculation tank; inputting the floc images into a target recognition model, the target recognition model outputting floc state classification results, wherein the target recognition model is used to extract target features of the flocs, and classifying the floc state based on the target features to determine the floc state classification results, wherein the target features include morphology, average size, and distribution density features; calculating the floc dosage based on the floc state classification results, the influent flow rate, the influent turbidity, and the effluent turbidity, and controlling the dosing device to add the flocculant according to the floc dosage.
[0006] Optionally, the step of calculating the flocculant dosage based on the floc state classification result, the influent flow rate, the influent turbidity, and the effluent turbidity includes: determining a first flocculant dosage based on the floc state classification result, the influent flow rate, and the influent turbidity; correcting the first flocculant dosage based on the effluent turbidity and the target turbidity to obtain a second flocculant dosage, and controlling the dosing device dosage using the second flocculant dosage; periodically updating the effluent turbidity, and correcting the second flocculant dosage based on the updated effluent turbidity until the effluent turbidity reaches the target turbidity.
[0007] Optionally, determining the first flocculant dosage based on the floc state classification result, the influent flow rate, and the influent turbidity includes: obtaining a mapping table corresponding to the floc state classification result and the dosage adjustment; querying the mapping table using the floc state classification result as an index to determine the dosage adjustment; and determining the first flocculant dosage based on the initial flocculant dosage setting and the dosage adjustment.
[0008] Optionally, before determining the first flocculant dosage based on the initial flocculant dosage setting and the dosage adjustment, the method includes: calculating the initial flocculant dosage setting based on the influent flow rate and influent turbidity.
[0009] Optionally, after periodically updating the effluent turbidity and adjusting the dosage of the second flocculant based on the updated effluent turbidity until the effluent turbidity reaches the target turbidity, the process includes: screening multiple sets of data where the effluent turbidity reaches the target turbidity, wherein each set of data includes: floc image, actual dosage, and final effluent turbidity; and using the multiple sets of data to train and optimize the target recognition model until the model converges.
[0010] Optionally, the target recognition model includes a feature extractor and a classifier. The feature extractor comprises an input layer, a convolutional layer, an activation function layer, and a pooling layer. The input layer receives a preprocessed floc image. The convolutional layer extracts a target feature map from the floc image using at least one convolutional kernel. The activation function layer performs a nonlinear transformation on the convolutional output. The pooling layer downsamples the target feature map to output a feature vector. The classifier receives the feature vector and calculates a weighted comprehensive score based on the morphology, average size, and distribution density features corresponding to the feature vector, according to preset weights. The classification result of the floc state is determined based on the interval of the weighted comprehensive score.
[0011] A second aspect of this application provides a control system for flocculant dosage, comprising: a flocculation tank; a water flow channel disposed beside the flocculation tank, wherein the water flow channel is equipped with a flow meter, an influent turbidity meter, and an effluent turbidity meter for acquiring influent flow rate, influent turbidity, and effluent turbidity, respectively; a floc collection device installed in the water flow channel for acquiring a water sample containing flocs; and an image recognition device comprising a camera probe and an image processing unit, wherein the camera probe is aimed at the water sample in the floc collection device to continuously acquire floc images, and the image processing unit inputs the floc images into a target recognition device. The target identification model outputs floc state classification results, wherein the target identification model is used to extract target features of the flocs and classify them according to the target features to determine the floc state classification results, wherein the target features include morphology, average size and distribution density features; the processing device is communicatively connected to the flow meter, influent turbidity meter, effluent turbidity meter and image recognition device, and is used to calculate the flocculant dosage according to the floc state classification results, the influent flow rate, the influent turbidity and the effluent turbidity, and control the dosing device to add the flocculant according to the dosage.
[0012] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to perform a method for controlling the amount of flocculant added as described in the above embodiments.
[0013] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to perform the method for controlling the amount of flocculant added as described in the above embodiments.
[0014] A fifth aspect of this application provides a computer program product, including a computer program or instructions, which, when executed, implement the method for controlling the amount of flocculant added as described in the above embodiments.
[0015] Therefore, this application has at least the following beneficial effects: This application embodiment can acquire real-time images of flocs in the flocculation tank and combine them with multi-source parameters such as influent flow rate, influent turbidity, and effluent turbidity. The system can comprehensively perceive the actual state of the current flocculation reaction. After inputting the floc images into the target recognition model, the model can accurately extract key features such as the morphology, average size, and distribution density of the flocs, and output clear floc state classification results accordingly. The classification results truly reflect the formation quality and settling potential of the flocs, effectively making up for the information lag and one-sidedness caused by relying solely on influent and effluent turbidity in the traditional method. By comprehensively considering the floc state and water quality and quantity parameters, the flocculant dosage is dynamically calculated, transforming the dosing strategy from passive response to active control. This achieves precise and intelligent flocculant dosing, avoiding waste of chemicals, ensuring stable effluent quality, and improving the operating efficiency and shock load resistance of the water treatment system.
[0016] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0017] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 A flow chart of a water treatment flocculation process based on existing technology; Figure 2 A flowchart of intelligent control for flocculant dosing based on simulated reaction, provided by existing technology; Figure 3 This is a flowchart of a method for controlling the dosage of flocculant according to an embodiment of this application; Figure 4 This is a schematic diagram of a control system for flocculant dosage provided according to an embodiment of this application; Figure 5 This is a schematic diagram of a control system for the overall flocculant dosage provided according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0018] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0019] In existing technologies, such as Figures 1-2As shown, a flocculation sedimentation tank is a process equipment that integrates coagulation, sedimentation and clarification. Due to its simple structure, small footprint and good effluent quality, it is often used in raw water pretreatment systems to preferentially remove large particulate suspended solids, colloids and other impurities from the water.
[0020] A flow meter and a turbidity meter are installed at the inlet of the flocculation and clarification tank, and a turbidity meter is installed at the outlet. The system monitors the inlet flow rate, turbidity, and effluent turbidity, and adjusts the frequency of the dosing pump using PID (Proportional-Integral-Derivative) control algorithms, thereby regulating the flocculant dosage. The goal is to stabilize the effluent turbidity within the set range.
[0021] The raw water to be treated is injected into a small-scale simulated reaction device; flocculant is added to the device, and the turbidity of the water in the device is obtained in real time; the turbidity of the water is compared with the preset turbidity. If the turbidity of the water is better than the preset turbidity, the addition of flocculant is stopped, and the concentration of flocculant in the simulated reaction device is calculated; based on the concentration of flocculant in the simulated reaction device and the amount of raw water to be treated, the amount of flocculant added in the actual flocculation tank is determined.
[0022] However, this method of adjusting the dosage by detecting effluent turbidity has a lag effect. Normally, increasing the flocculant dosage reduces effluent turbidity. However, due to this lag, if the dosage is increased further after the effluent turbidity has already met the standard, it can lead to overdosing, affecting the normal operation of subsequent ultrafiltration and reverse osmosis membrane treatment systems. Conversely, if the dosage is gradually reduced, the effluent turbidity will slowly rise. If the effluent turbidity exceeds the standard, and the dosage continues to decrease, it will eventually lead to further turbidity exceeding the standard. Furthermore, when water quality and quantity fluctuate significantly, the dosage becomes even more uncontrollable, frequently resulting in substandard effluent quality.
[0023] Therefore, the main problems with the equipment of the relevant technology in actual operation are: (1) Unclear dosage of coagulant: The dosage of coagulant has a great impact on the quality of effluent. Too much or too little coagulant will result in poor floc formation in the water, affecting the coagulation effect and causing the effluent turbidity to increase. (2) Effluent floc "escape": In terms of effluent quality monitoring, online turbidity meters are mainly used to monitor changes in turbidity in the water, but the process of floc "escape" cannot be identified. Only on-site personnel are required for inspection and prevention. The monitoring and adjustment methods are seriously lagging behind. A large number of flocs "escape" will seriously affect the normal operation of downstream equipment. (3) Difficulty in sludge discharge control: The timing of sludge discharge is judged based on operating experience, and there is no clear basis for the duration of sludge discharge. The parameters used during commissioning are basically followed. The interval and duration of sludge discharge are closely related to the influent water quality, dosage and sludge volume. Flexible adjustments are required when the water quality changes. This application describes a system for optimizing flocculant dosage in the raw water pretreatment system of thermal power plants using image recognition technology. The system includes a water flow channel (containing a flow meter, influent turbidity meter, and effluent turbidity meter), a floc acquisition device, a floc image recognition device (containing a camera probe), a monitoring and early warning device, and a communication device. The floc acquisition device is installed on the bypass of the flocculation and clarification tank. The flow meter, turbidity meter, image recognition device, and monitoring and early warning device are connected via the communication device and interlocked with the flocculant dosing device. By intelligently judging the floc state and combining the detection results of influent flow rate and effluent turbidity, the system can predict the trend of effluent water quality changes in the flocculation and clarification tank in advance, and intelligently control the flocculant dosage. This system, which uses image recognition technology to optimize floc dosage, can monitor and automatically analyze the floc state in the water in real time, determine whether the floc dosage is appropriate based on the floc state, and provide guidance for adjustment. It can also provide early warnings for effluent turbidity exceeding the warning value; by using image recognition technology to replace manual inspection, it can predict the effluent turbidity of the flocculation clarification tank earlier than a simple influent and effluent turbidity meter, overcoming the problems of untimely and delayed judgment of manual inspection.
[0024] The following description, with reference to the accompanying drawings, describes a method, system, device, medium, and procedure for controlling the flocculant dosage according to embodiments of this application.
[0025] Specifically, Figure 3 This is a schematic flowchart illustrating a method for controlling the dosage of flocculant provided in an embodiment of this application.
[0026] like Figure 3 As shown, the method for controlling the dosage of this flocculant includes the following steps: In step S101, images of flocs in the flocculation tank, influent flow rate, influent turbidity, and effluent turbidity are acquired.
[0027] It is understood that the embodiments of this application can acquire images of flocs in the flocculation tank, influent flow rate, influent turbidity and effluent turbidity, in order to achieve multi-dimensional real-time perception of the flocculation process, so as to accurately assess the current flocculation status in the future.
[0028] It should be noted that the system collects in-flow rate Q and in-flow turbidity T in real time through the water flow channel; it also collects floc images in real time through a camera probe; and it collects effluent turbidity T through an effluent turbidity meter. The floc images provide direct visual information on the morphology, size, and distribution of flocs during the reaction process, overcoming the lag and distortion in state judgment caused by relying solely on in-flow and effluent water quality parameters in traditional methods. In-flow rate and turbidity reflect changes in raw water load, while effluent turbidity is used to verify the treatment effect. By subsequently integrating these parameters, the system can accurately assess the current flocculation state, providing a reliable basis for accurately calculating the flocculant dosage, thereby improving the timeliness, adaptability, and stability of dosing control, ultimately ensuring that the effluent water quality meets standards and reducing chemical consumption.
[0029] In step S102, the floc image is input into the target recognition model, and the target recognition model outputs the floc state classification result. The target recognition model is used to extract the target features of the floc and classify the floc state based on the target features. The target features include morphology, average size and distribution density features. The target recognition model consists of a feature extractor and a classifier. The feature extractor comprises an input layer, a convolutional layer, an activation function layer, and a pooling layer. The input layer receives a preprocessed image of the flocs. The convolutional layer extracts the target feature map from the floc image using at least one convolutional kernel. The activation function layer performs a nonlinear transformation on the convolutional output. The pooling layer downsamples the target feature map to output a feature vector. The classifier receives the feature vector and calculates a weighted comprehensive score based on the morphology, average size, and distribution density features corresponding to the feature vector, according to preset weights. The classification result of the floc state is determined based on the interval of the weighted comprehensive score.
[0030] The preset weights can be determined by querying the corresponding mapping table based on the feature vectors, and the mapping table can be set by the user according to actual needs without specific limitations.
[0031] It is understood that, in this embodiment of the application, by inputting the floc image into a target recognition model composed of a feature extractor and a classifier, the system can automatically and efficiently analyze the key physical characteristics of the flocs during the flocculation process. The feature extractor uses convolutional layers, activation function layers, and pooling layers to extract and compress target features such as morphology, average size, and distribution density in the image step by step, generating a discriminative feature vector. The classifier then uses this feature vector, combined with preset weights, to perform a weighted comprehensive score on the multi-dimensional features, and accurately determines the current floc state based on the score range. This avoids the subjectivity of manual observation and the lag of traditional indirect parameter inference, and realizes the objective quantification and real-time classification of the floc state.
[0032] It should be noted that the floc image recognition device processes the acquired images in real time using a CNN (Convolutional Neural Network) feature extractor to extract key features such as floc morphology (e.g., floc size, density), average size, and distribution density). Subsequently, based on a pre-trained SVM (Support Vector Machine) classifier, the current floc state is categorized into one of the following: "insufficient addition," "appropriate addition," or "excessive addition." The target recognition model's structure is not limited to feature extractors and classifiers; it can directly identify and quantify flocs using deep learning target detection algorithms (such as YOLO), or use recurrent neural networks (RNNs) to process the time-series changes in floc morphology. The appropriate model can be selected for training based on the user's intent. This application can assign different weights (such as 0.5, 0.3, 0.2) to features such as average size, distribution density, and morphology, and classify them through weighted comprehensive scoring to avoid a single feature dominating the judgment. The weight allocation can be based on expert experience or data statistics (such as principal component analysis and regression coefficients), making the classification results closer to the actual process logic and improving the rationality of decision-making. It can also calculate the correlation coefficient between image features and historical optimal dosage, eliminate weakly correlated features (such as correlation coefficient <0.3), and retain the key indicators that truly affect the dosage effect. This can reduce model complexity, reduce noise interference, prevent overfitting, make the recognition model more focused on effective signals, and improve generalization ability.
[0033] Specifically, the processing methods of the target recognition model are as follows: (1) Image preprocessing and standardization: The rectangular area containing the core observed water sample is automatically located and cropped from the image transmitted from the camera probe to ensure that the flocs are always in the center of the image; algorithms such as mean filtering are applied to reduce the interference of water flow bubbles and sensor noise. If necessary, contrast stretching is performed to make the floc edges clearer; all input images are adjusted to the fixed size specified during model training (e.g., 224x224 pixels), and pixel value normalization is performed.
[0034] (2) Parallel computation of deep feature extraction and physical features: The preprocessed image is input into the CNN feature extractor. The image passes through multiple "convolution-activation-pooling" layers in sequence. Finally, at the end of the network (before the fully connected layer), it is converted into a high-dimensional deep feature vector (e.g., a 1024-dimensional vector). The deep feature vector contains average size, distribution density and morphology score. The average size is the average equivalent diameter of all identified flocs by identifying the outline of a single floc through image segmentation technology. The distribution density is the number of flocs per unit area (e.g., per square millimeter). Morphology score: Based on the shape descriptors such as roundness and density of the floc outline, a comprehensive score between 0 and 1 is calculated. 1 represents an ideal floc with a dense shape and smooth edges.
[0035] (3) Input the deep feature vector into the SVM classifier. The SVM will output a preliminary classification probability based on the learning pattern (e.g., [insufficient: 0.7, suitable: 0.25, excessive: 0.05]). Normalize the three physical parameters (average size, distribution density, and morphology score) to 0-100 points respectively, and assign fixed weights according to their importance (e.g., size weight 0.5, density weight 0.3, morphology weight 0.2). Calculate a comprehensive score for physical features. The system does not simply adopt the preliminary result of the SVM, but performs confidence fusion. For example, set the rule: if the confidence of the SVM for a certain class is >90%, and the comprehensive score of physical features falls within the corresponding interval, then it is directly adopted. If the confidence level of the SVM result is average (e.g., the highest confidence level is between 60% and 90%), a weighted voting process using physical feature comprehensive scores is introduced. The final judgment is made based on the SVM result confidence level and the physical feature comprehensive score according to a set ratio. If the SVM confidence level is too low or conflicts with the physical feature comprehensive score, the physical feature comprehensive score is adopted for subsequent model optimization.
[0036] Training methods for object recognition models: (1) Data acquisition: During the initial stage of system operation or a specific commissioning period, the dosing system is manually or semi-automatically controlled by experienced engineers. During this period, the system synchronously and continuously records: input: floc images, influent flow rate, influent turbidity, real-time dosing amount; process verification: real-time observation and recording of floc status by engineers; final result: effluent turbidity after stabilization.
[0037] (2) Data cleaning and labeling: After filtering out invalid data during equipment start-up and shutdown, strong interference, etc., for each set of data, the labeling is not based on subjective human judgment of the image state, but on whether the final effluent turbidity continuously and stably meets the standard and the dosage is relatively economical. The floc state at that moment is defined as the optimal state. For example, when the effluent turbidity is stable at 1.5 NTU (better than the target value of 2 NTU) and the chemical consumption per ton of water is the lowest, the corresponding floc image is labeled as "appropriate dosage". In this way, the model's label is directly linked to the final process economic goal.
[0038] (3) Use the labeled “image-optimal state” data pairs to train the CNN+SVM model in a standard supervised learning manner. The CNN part usually uses a model pre-trained on a large image dataset for transfer learning to improve training efficiency and performance on a small dataset.
[0039] In step S103, the dosage of flocculant is calculated based on the floc state classification results, influent flow rate, influent turbidity, and effluent turbidity, and the dosage is controlled by the dosing device to add the flocculant.
[0040] It is understood that the embodiments of this application can comprehensively calculate the dosage of flocculant based on the floc state classification results, influent flow rate, influent turbidity, and effluent turbidity. This enables multi-parameter coordinated dynamic control of the dosing process. By integrating process state and water quality and quantity information, the system can accurately match the actual flocculation demand with the reagent supply, avoiding over- or under-dosing, improving the real-time, adaptability, and accuracy of dosing control, ensuring stable and efficient flocculation effect, guaranteeing that the effluent water quality meets standards, and reducing operating costs and reagent consumption.
[0041] It should be noted that the floc state classification results directly reflect the quality and trend of the current flocculation reaction, compensating for the control lag caused by relying solely on influent and effluent water quality parameters; influent flow rate and turbidity characterize changes in raw water load and are used for feedforward prediction of reagent demand; effluent turbidity serves as a feedback correction signal to verify and fine-tune the dosing strategy. The PID controller compares its setpoint (already adjusted by the model feedforward signal) with the current actual dosage (or related parameters, such as metering pump frequency), calculates the precise control quantity, and outputs it to the metering pump for fine-tuning.
[0042] Specifically, the classification result (such as "insufficient dosage") is converted into a trend-based instruction for dosage adjustment. This instruction is used to dynamically set the setpoint of the PID controller. For example, when the model determines "insufficient dosage," the system will appropriately increase the "ideal" dosage benchmark desired by the PID controller.
[0043] In this embodiment of the application, the flocculant dosage is calculated based on the floc state classification result, influent flow rate, influent turbidity, and effluent turbidity. This includes: determining the first flocculant dosage based on the floc state classification result, influent flow rate, and influent turbidity; correcting the first flocculant dosage based on the effluent turbidity and the target turbidity to obtain the second flocculant dosage, and using the second flocculant dosage to control the dosing device; periodically updating the effluent turbidity, and correcting the second flocculant dosage based on the updated effluent turbidity until the effluent turbidity reaches the target turbidity. The target turbidity can be set according to actual needs without specific limitations.
[0044] It is understood that the embodiments of this application can determine the first flocculant dosage by combining the floc state classification results, influent flow rate and influent turbidity. The system can achieve precise pre-dosing based on the raw water load and the actual floc formation state in the early stage of the reaction. Subsequently, the deviation between the effluent turbidity and the target turbidity is introduced to correct the first dosage, generating the second flocculant dosage, forming a closed-loop control strategy that integrates feedforward and feedback. The system periodically updates the effluent turbidity data and continuously corrects the second dosage, dynamically approaching the target turbidity requirement, thereby effectively balancing the real-time nature of process state perception and the accuracy of effluent water quality control, avoiding the lag of traditional single feedback control and the blindness of single feedforward control.
[0045] For example, when a water plant is treating high-turbidity raw water, the system obtains the floc state classification result in real time as "small and sparsely distributed flocs," and simultaneously detects an influent flow rate of 1.2 cubic meters per second and an influent turbidity of 85 NTU. The treatment unit determines the first flocculant dosage to be 25 kg per 1000 tons of water according to preset rules. Subsequently, the system reads the effluent turbidity as 3.5 NTU, which is 2 NTU higher than the target turbidity. Therefore, the dosage is increased to 28 kg per 1000 tons of water as the second flocculant dosage, and the dosing device is controlled to execute this dosage.
[0046] In this embodiment of the application, the determination of the first flocculant dosage based on the floc state classification result, influent flow rate, and influent turbidity includes: obtaining a mapping table corresponding to the floc state classification result and the dosage adjustment; querying the mapping table using the floc state classification result as an index to determine the dosage adjustment; and determining the first flocculant dosage based on the initial flocculant dosage setting value and the dosage adjustment.
[0047] It is understood that, in the embodiments of this application, a mapping table between floc state classification results and dosage adjustment can be established, and the corresponding dosage adjustment can be quickly and accurately determined by querying the table using the real-time floc state classification results as an index. Combined with the initial flocculant dosage setting value, the first flocculant dosage adapted to the current flocculation reaction state can be dynamically generated, transforming the abstract floc state into an operable quantitative adjustment parameter, so that the dosing decision is directly related to the floc formation quality, significantly improving the pertinence and response speed of the feedforward control.
[0048] In this embodiment of the application, before determining the first flocculant dosage based on the initial flocculant dosage setting value and the dosage adjustment amount, the method includes: calculating the initial flocculant dosage setting value based on the influent flow rate and influent turbidity.
[0049] It is understood that, in the embodiments of this application, before determining the first flocculant dosage based on the initial flocculant dosage setting and dosage adjustment, the initial flocculant dosage setting can be calculated based on the influent flow rate and influent turbidity. This allows for the establishment of a basic dosage that conforms to the current operating conditions, based on the actual treatment load and pollution concentration of the raw water. The influent flow rate determines the treatment scale, and the influent turbidity reflects the content of colloids and suspended solids. Together, these two constitute the basic input conditions for flocculant requirements, providing a reasonable starting point for subsequent fine-tuning based on floc status. This ensures that the first flocculant dosage has both feedforward adaptability and retains the ability to respond to the dynamic characteristics of the reaction process.
[0050] Specifically, this application divides the influent turbidity into several intervals, each corresponding to a unit turbidity chemical consumption coefficient (e.g., 0.2 kg flocculant per 1,000 tons of water per NTU). Then, combining this with the current influent flow rate, the unit chemical consumption is multiplied by the actual treated water volume to obtain the basic dosage. Simultaneously, considering the impact of flow rate changes on mixing intensity and reaction time, a flow rate correction coefficient is introduced for fine-tuning, ultimately forming the initial flocculant dosage setpoint. This method balances the raw water pollution load and treatment scale, providing a reasonable benchmark for subsequent refined adjustments based on floc state.
[0051] In this embodiment of the application, after periodically updating the effluent turbidity and adjusting the dosage of the second flocculant according to the updated effluent turbidity until the effluent turbidity reaches the target turbidity, the process includes: screening multiple sets of data where the effluent turbidity reaches the target turbidity, wherein each set of data includes: floc image, actual dosage, and final effluent turbidity; and using multiple sets of data to train and optimize the target recognition model until the model converges.
[0052] It is understood that, in the embodiments of this application, after periodically updating the effluent turbidity and correcting the dosage of the second flocculant until the effluent turbidity reaches the target turbidity, the system further filters out multiple sets of valid data under all compliant operating conditions. Each set of data includes the corresponding floc image, actual dosage, and final effluent turbidity. Using this dataset to iteratively train and optimize the target recognition model can continuously improve the accuracy and generalization ability of the model in judging the floc state. As the model gradually converges, its output floc state classification results will be more in line with the actual process requirements, thereby improving the rationality of the feedforward dosage and the adaptive level of the overall control system.
[0053] It should be noted that each set of successful data in this application includes the floc images collected at the time (reflecting the flocculation state), the actual amount of flocculant added (control action), and the final effluent turbidity that meets the standard (effect verification) to construct high-quality training samples for retraining or fine-tuning the target recognition model, so as to continuously iterate and optimize the target recognition model. As the model iterates and optimizes and gradually converges, its output floc state classification results will be more reliable, thereby improving the accuracy of feedforward control, reducing the dependence on effluent feedback correction, and realizing the evolution from passive adjustment to active prediction.
[0054] According to the flocculant dosage control method proposed in this application embodiment, by acquiring floc images in the flocculation tank in real time and combining them with multi-source parameters such as influent flow rate, influent turbidity, and effluent turbidity, the system can comprehensively perceive the actual state of the current flocculation reaction. After inputting the floc images into the target recognition model, the model can accurately extract key features such as the morphology, average size, and distribution density of the flocs, and output clear floc state classification results accordingly. The classification results truly reflect the formation quality and settling potential of the flocs, effectively making up for the information lag and one-sidedness caused by relying solely on influent and effluent turbidity in the traditional method. By dynamically calculating the floc dosage in combination with floc state and water quality and quantity parameters, the dosing strategy is transformed from passive response to active control, thereby achieving precise and intelligent flocculant dosing. This avoids waste of chemicals, ensures stable effluent quality, and improves the operating efficiency and shock load resistance of the water treatment system.
[0055] Next, the control system for the flocculant dosage proposed according to the embodiments of this application is described with reference to the accompanying drawings.
[0056] Figure 4 This is a block diagram of the control system for the flocculant dosage according to an embodiment of this application.
[0057] like Figure 4 As shown, the control system 10 for the flocculant dosage includes: a flocculation tank 100, a water flow channel 200, a floc collection device 300, an image recognition device 400, and a processing device 500.
[0058] The system includes a bypass water flow channel 200 located beside the flocculation tank 100. This channel is equipped with a flow meter, an influent turbidity meter, and an effluent turbidity meter to acquire influent flow rate, influent turbidity, and effluent turbidity, respectively. A floc collection device 300 is installed in the water flow channel 200 to collect water samples containing flocs. An image recognition device 400 includes a camera probe and an image processing unit. The camera probe is aimed at the water sample in the floc collection device 300 to continuously acquire floc images, and the image processing unit inputs the floc images into a target recognition model. The target recognition model outputs floc state classification results. The target recognition model is used to extract target features of the flocs and classify them according to the target features to determine the floc state classification results. The target features include morphology, average size and distribution density. The treatment device 500 is communicatively connected to the flow meter, influent turbidity meter, effluent turbidity meter and image recognition device 400. It is used to calculate the flocculant dosage according to the floc state classification results, influent flow rate, influent turbidity and effluent turbidity, and control the dosing device to add flocculant according to the dosage.
[0059] It should be noted that, as Figure 5As shown, the system of this application includes a water flow channel, a floc collection device, a floc image recognition device, a monitoring and early warning device, and a communication device. The water flow channel, located at a bypass or specific sampling point of the flocculation tank, includes a flow meter, an influent turbidity meter, and an effluent turbidity meter for real-time monitoring of basic water quality parameters. The floc collection device, installed in the water flow channel, is used to acquire representative water samples containing flocs. The floc image recognition device, the core device, includes a high-definition camera probe and an image processing unit. The camera probe is aimed at the water sample inside the floc collection device to continuously capture floc images. Monitoring and Early Warning Device: An industrial computer or PLC with built-in intelligent algorithms (including predictive and PID control algorithms). The communication device supports wired networks, 4G / 5G wireless, Profibus, Modbus, and other industrial buses, indicating that the system can be seamlessly integrated into existing water plant automation platforms (such as SCADA systems). This meets the differentiated needs of water plants of different sizes for real-time performance, reliability, and deployment costs. It can obtain precise dosage based on signal processing from flow meters and turbidity meters and feed this data back to the flocculant dosing control system for automatic dosing. After the camera probe detects floc images, it transmits them to the floc image recognition device for processing, and then sends the processed data to the monitoring and early warning device for analysis and identification. The monitoring and early warning device summarizes the identification results to the communication device, which receives the dosage adjustment signal and transmits it to the flocculant dosing control system for dosing. After dosing, the communication device further adjusts the dosage based on the signal from the effluent turbidity meter. Communication Device: Connects all the above devices to achieve bidirectional data transmission. Protective device: A sealed housing with a transparent observation window integrates the water flow channel, floc collection device and camera probe to ensure a stable imaging environment and avoid external light interference.
[0060] Specifically, step one: data acquisition: the system collects the influent flow rate Q and influent turbidity T in real time through the water flow channel; collects floc images in real time through the camera probe; and collects the effluent turbidity T through the effluent turbidity meter.
[0061] Step Two: Floc State Identification and Classification: The floc image recognition device processes the acquired images in real time, extracting key features such as floc morphology (e.g., floc size, density), average size, and distribution density. Subsequently, based on a pre-trained classification model, the current floc state is classified into one of the following categories: "insufficient addition," "appropriate addition," or "excessive addition."
[0062] It should be noted that during the initial operation of the system, it was run under different water quality conditions (such as high turbidity and low turbidity periods), and a large number of floc images and corresponding, ultimately verified, dosage data were recorded. Based on the images and operational results, the model categorized the floc state into three types: "insufficient," "suitable," and "excessive," and extracted image features. A model combining a Convolutional Neural Network (CNN) and a Support Vector Machine (SVM) was used. The CNN automatically learned image features, and the SVM performed classification. The model learned that: when the flocs are large, dense, and evenly distributed, it corresponds to "suitable"; when the flocs are small and sparse, it corresponds to "insufficient"; and when the flocs are too large, loose, and broken, it corresponds to "excessive."
[0063] Step 3: Feedforward-Feedback Composite Control. The monitoring and early warning device executes the core control logic: Feedforward control (based on model prediction): The classification result (such as "insufficient dosage") is converted into a trend-based instruction for dosage adjustment. This instruction is used to dynamically set the setpoint of the PID controller. For example, when the model determines "insufficient dosage," the system will moderately increase the "ideal" dosage reference desired by the PID controller.
[0064] Feedback control (based on PID): The PID controller compares its setpoint (adjusted by the model feedforward signal) with the current actual dosage (or related parameters, such as the metering pump frequency), calculates the precise control quantity, and outputs it to the metering pump for fine-tuning.
[0065] It should be noted that when the system sets the target effluent turbidity value to 2 NTU, upon detecting an "insufficient dosing" status for flocs, the monitoring and early warning device will immediately increase the dosing setting of the PID controller by 5% (this amount can be optimized based on historical data). The PID controller then increases the metering pump frequency, thereby increasing the dosing. Simultaneously, the data from the effluent turbidity meter serves as feedback. If, after increasing the dosing, the effluent turbidity steadily decreases to the target value, it proves the AI's judgment is correct; if the turbidity remains unchanged or even increases, the system will record this deviation for subsequent model optimization.
[0066] Through this "model feedforward + PID feedback + result calibration" model, the system can increase the dosage in advance before the actual increase in effluent turbidity, effectively overcoming the hysteresis.
[0067] The system comprehensively evaluates water quality based on data such as water quality changes and floc morphology obtained from predictive algorithms, and formulates corresponding control strategies in conjunction with PID control algorithms. The control strategies include frequency adjustment of the dosing pump in the automatic dosing system. The PID controller precisely controls the dosing amount by adjusting the frequency of the dosing pump in real time, thereby achieving precise control of the effluent water quality.
[0068] Step Four: Early Warning and Output. In addition to controlling chemical dosing, the monitoring and early warning device also provides early warnings based on floc status and effluent turbidity trends. All data, control commands, and early warning information are transmitted to the central control room or cloud platform via communication devices. Based on parameters such as the morphology, size, and distribution density of flocs in the water, combined with the effluent turbidity operating curve, the monitoring and early warning device can predict the changing trend of effluent turbidity in advance and adjust the flocculant dosage in real time based on the frequency variation pattern of the flocculant dosing metering pump.
[0069] After the system in this embodiment is put into operation, compared with the traditional control method, the fluctuation range of effluent turbidity is reduced by 60%, the average dosage of flocculant is reduced by about 15%, and fully unattended automatic operation is achieved.
[0070] According to the flocculant dosage control system proposed in this application embodiment, a flow channel is set up in the bypass of the flocculation tank, and a flow meter, an influent turbidity meter, and an effluent turbidity meter are integrated therein. The system can acquire key water quality and quantity parameters such as influent flow rate, influent turbidity, and effluent turbidity in real time. The floc collection device is installed in the flow channel, and the camera probe of the image recognition device continuously images the flocs in the water sample. The image processing unit inputs the collected floc images into the target recognition model. The model classifies the floc state based on target features such as morphology, average size, and distribution density, and outputs the floc state classification result. The processing device integrates the state classification result with the data from various sensors to dynamically calculate the optimal flocculant dosage and drive the dosing device to perform precise dosing. This structure realizes the synchronous perception and fusion analysis of multi-source information in the flocculation process, so that the dosing control not only responds to changes in raw water load, but also conforms to the actual floc formation state. At the same time, the dosing strategy is continuously corrected through effluent turbidity feedback, which significantly improves the real-time performance, accuracy, and adaptability of flocculation control, effectively ensures stable effluent water quality, and reduces reagent consumption.
[0071] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0072] When the processor 602 executes the program, it implements the method for controlling the amount of flocculant added as provided in the above embodiments.
[0073] Furthermore, electronic devices also include: Communication interface 603 is used for communication between memory 601 and processor 602.
[0074] The memory 601 is used to store computer programs that can run on the processor 602.
[0075] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0076] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0077] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0078] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0079] This application also provides a computer-readable storage medium storing a computer program or instructions thereon, which, when executed by a processor, implements the above-described method for controlling the amount of flocculant added.
[0080] This application also provides a computer program product, including a computer program or instructions, which, when executed, implement the above-mentioned method for controlling the amount of flocculant added.
[0081] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0082] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0083] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0084] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or more of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0085] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
Claims
1. A method for controlling the dosage of flocculant, characterized in that, The method includes the following steps: Acquire images of flocs, influent flow rate, influent turbidity, and effluent turbidity in the flocculation tank; The floc image is input into a target recognition model, which outputs a floc state classification result. The target recognition model is used to extract target features of the floc and classify the floc state based on the target features. The target features include morphology, average size, and distribution density features. The dosage of flocculant is calculated based on the floc state classification results, the influent flow rate, the influent turbidity, and the effluent turbidity. The dosage of flocculant is then controlled by the dosing device.
2. The method for controlling the dosage of flocculant according to claim 1, characterized in that, The calculation of flocculant dosage based on the floc state classification result, the influent flow rate, the influent turbidity, and the effluent turbidity includes: The dosage of the first flocculant is determined based on the floc state classification results, the influent flow rate, and the influent turbidity. The dosage of the first flocculant is adjusted according to the effluent turbidity and the target turbidity to obtain the dosage of the second flocculant, and the dosage of the second flocculant is used to control the dosing device. The effluent turbidity is periodically updated, and the dosage of the second flocculant is adjusted according to the updated effluent turbidity until the effluent turbidity reaches the target turbidity.
3. The method for controlling the dosage of flocculant according to claim 2, characterized in that, The step of determining the dosage of the first flocculant based on the floc state classification result, the influent flow rate, and the influent turbidity includes: Obtain a mapping table between the floc state classification results and the dosage adjustment; Using the floc state classification results as an index, the mapping relationship table is queried to determine the dosage adjustment amount; The first flocculant dosage is determined based on the initial flocculant dosage setting and the dosage adjustment.
4. The method for controlling the dosage of flocculant according to claim 3, characterized in that, Before determining the first flocculant dosage based on the initial flocculant dosage setting and the dosage adjustment, the process includes: The initial flocculant dosage setting is calculated based on the influent flow rate and influent turbidity.
5. The method for controlling the dosage of flocculant according to claim 2, characterized in that, The process of periodically updating the effluent turbidity and adjusting the dosage of the second flocculant based on the updated effluent turbidity until the effluent turbidity reaches the target turbidity includes: Multiple sets of data were selected to show that the turbidity of the effluent reached the target turbidity. Each set of data included: floc images, actual dosage, and final effluent turbidity. The target recognition model is trained and optimized using multiple sets of data until the model converges.
6. The method for controlling the dosage of flocculant according to claim 1, characterized in that, The target recognition model comprises a feature extractor and a classifier, wherein... The feature extractor includes an input layer, a convolutional layer, an activation function layer, and a pooling layer. The input layer is used to receive a preprocessed floc image. The convolutional layer uses at least one convolutional kernel to extract a target feature map from the floc image. The activation function layer is used to perform a non-linear transformation on the convolutional output. The pooling layer is used to downsample the target feature map to output a feature vector. The classifier is used to receive feature vectors, calculate a weighted comprehensive score based on the morphology, average size and distribution density features corresponding to the feature vectors according to preset weights, and determine the floc state classification result according to the interval in which the weighted comprehensive score is located.
7. A control system for flocculant dosage, characterized in that, include: Flocculation pool; A water flow channel is installed beside the flocculation tank. The water flow channel is equipped with a flow meter, an inlet turbidity meter and an outlet turbidity meter, which are used to obtain the inlet flow rate, inlet turbidity and outlet turbidity respectively. A floc collection device is installed in the water flow channel to obtain water samples containing flocs; An image recognition device includes a camera probe and an image processing unit. The camera probe is aimed at a water sample inside the floc collection device to continuously collect floc images. The image processing unit inputs the floc images into a target recognition model. The target recognition model outputs a floc state classification result. The target recognition model is used to extract target features of the flocs and classify them according to the target features to determine the floc state classification result. The target features include morphology, average size, and distribution density features. The processing device is communicatively connected to the flow meter, influent turbidity meter, effluent turbidity meter, and image recognition device. It is used to calculate the dosage of flocculant based on the floc state classification results, the influent flow rate, the influent turbidity, and the effluent turbidity, and to control the dosing device to add the flocculant according to the dosage.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method for controlling the amount of flocculant added as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by the processor, they are used to implement the method for controlling the amount of flocculant added as described in any one of claims 1-6.
10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed, they implement the method for controlling the amount of flocculant added as described in any one of claims 1-6.