A control system and method for identifying flocculation effect and optimizing chemical dosage in water treatment.

By decoupling the floc quality assessment and dosage optimization using a two-level fuzzy controller structure, precise control of the flocculation and sedimentation process in water treatment was achieved. This adapts to complex working conditions, improves the accuracy and robustness of the control system, and reduces the cost of modification.

CN122488604APending Publication Date: 2026-07-31SHANGHAI HENGJI INTELLIGENT CONTROL SYST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610591159.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing water treatment technologies, the quality assessment of floc and the control of chemical dosage during the flocculation and sedimentation process are closely coupled and difficult to optimize independently. Traditional control methods have problems such as strong subjectivity, slow response, and poor interpretability, making them difficult to adapt to complex and ever-changing water quality conditions.

Method used

A two-stage fuzzy controller structure is adopted. The first-stage fuzzy controller obtains the characteristic data of alum floc through an image recognition system to evaluate the quality level. The second-stage fuzzy controller combines process parameters to optimize the dosage, thereby decoupling the alum floc quality evaluation and dosage control. Fuzzy inference and dynamic weight adjustment are used to adapt to different working conditions.

Benefits of technology

It improves the accuracy of flocculation effect identification and the adaptability of dosage optimization, simplifies rule base design, enhances the interpretability and robustness of the system, ensures safe and stable system operation, and has low modification costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122488604A_ABST
    Figure CN122488604A_ABST
Patent Text Reader

Abstract

This invention relates to the field of water treatment technology, specifically disclosing a control system and method for identifying flocculation effects and optimizing dosage in water treatment. An image recognition system acquires images of floc and extracts feature data such as particle size and density. A first-level fuzzy controller infers and outputs the floc quality grade. A process parameter acquisition system obtains the influent flow rate and calculates the rate of change. These parameters, combined with the quality change trend and contour clarity, are input into a second-level fuzzy controller to deduce the dosage adjustment. A feedforward empirical formula is then introduced to calculate the baseline floc dosage, which, in conjunction with the dosage adjustment, yields the final dosage setpoint. After amplitude limiting and anti-vibration processing, the dosing actuator is driven, achieving continuous optimization through a closed-loop cycle. This invention decouples floc quality assessment and dosage control objectives, simplifying the rule base design to improve adaptability to complex water quality conditions and dosing accuracy, ensuring stable and efficient operation of the water treatment system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water treatment technology, and in particular to a control system and method for identifying the flocculation effect and optimizing the dosage in water treatment. Background Technology

[0002] In water treatment processes, flocculation and sedimentation are crucial steps. The morphological characteristics of flocs directly affect the sedimentation effect and the quality of the effluent. Traditional chemical dosing control methods mainly include: Manual experience-based control involves operators visually observing the morphology of the alum flowers and adjusting the dosage based on their experience. This method suffers from high subjectivity, slow response, difficulty in precise quantification, and a high dependence on the operator's experience.

[0003] Single-parameter PID control specifically involves using the clarity of the effluent profile as a feedback signal to adjust the dosage of chemicals using a PID controller. Due to the large time lag, nonlinearity, and time-varying characteristics of the coagulation process, traditional PID control struggles to achieve ideal results.

[0004] The feedforward + feedback composite control, specifically, is exemplified by the patent with publication number CN118666384A, which discloses an intelligent dosing control method based on a predictive model and adaptive fuzzy PID, employing a feedforward + feedback control strategy. While this method represents an improvement, it still suffers from the following shortcomings: it uses floc characteristics as the feedforward input, while the feedback control remains based on profile sharpness deviation, failing to effectively decouple floc quality assessment from dosing control; and its control rules are simplistic, making it difficult to adapt to complex and changing water quality conditions.

[0005] Neural network intelligent control, specifically, is as follows: the patent with publication number CN118458907A constructs a DNN model to predict the dosage of medicine, but the neural network model has a "black box" problem, poor interpretability, and difficulty in on-site debugging.

[0006] Furthermore, although there are existing technologies that employ a dual-controller structure, for example, patent CN105182740A discloses a method for controlling the steam drum water level of a thermal power plant through a variable fuzzy quantization factor, which adopts a dual fuzzy control structure of a main controller and a secondary controller, the function of the secondary controller is to adjust the error input to the main controller and the ratio of error change. Essentially, it is a single-objective control parameter adaptive adjustment, rather than a cascaded structure for different control objectives.

[0007] Therefore, there is an urgent need for a control system and method for identifying the flocculation effect and optimizing the dosage in water treatment to solve the above problems. Summary of the Invention

[0008] The purpose of this invention is to provide a method for identifying the flocculation effect and optimizing the dosage in water treatment, comprising the following steps: Acquire images of alum flowers in real time based on an image recognition system and extract alum flower feature data; The alum flower feature data is input to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level. The process parameters are acquired in real time by the process parameter acquisition system, and the rate of change of process parameters and the trend of quality change are calculated based on the process parameters. The quality grade of the alum floc, the rate of change of the process parameters, the clarity of the outline, and the trend of quality change are input into the second-level fuzzy controller. The second-level fuzzy controller performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. A dosing control command is generated based on the dosing adjustment amount, and the dosing control command is sent to the dosing actuator to adjust the flocculant dosage.

[0009] Furthermore, the present invention also discloses a control system for water treatment flocculation effect identification and dosage optimization, comprising: The acquisition module is used to acquire images of alum flowers in real time based on an image recognition system and extract alum flower feature data; The fuzzy inference module is used to input the alum flower feature data to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level. The trend determination module is used to acquire process parameters collected in real time by the process parameter acquisition system, and to calculate the process parameter change rate and determine the quality change trend based on the process parameters. The output module is used to input the quality grade of the alum floc, the rate of change of the process parameters, the clarity of the outline, and the trend of quality change to the second-level fuzzy controller, which performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. The adjustment module is used to generate a dosing control command based on the dosing adjustment amount, and send the dosing control command to the dosing actuator to adjust the flocculant dosage.

[0010] Furthermore, the trend determination module includes: The acquisition unit is used to acquire process parameters in real time through the process parameter acquisition system and obtain the process parameter values ​​at the current moment. The calculation unit is used to calculate the rate of change of the process parameters based on historical process parameter data; The recognition unit is used to obtain the outline clarity at the current moment in real time through the image recognition system; The determining unit is used to obtain the alum floc quality level at multiple consecutive historical moments from the historical output of the first-level fuzzy controller, and determine the quality change trend based on the historical alum floc quality level data.

[0011] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described control method for water treatment flocculation effect identification and dosage optimization.

[0012] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described control method for identifying the flocculation effect and optimizing the dosage in water treatment.

[0013] The beneficial effects of this application are as follows: Firstly, this invention decouples the two control objectives of alum flower quality assessment and dosage optimization by setting up a two-level fuzzy controller. The first-level controller focuses on quality assessment based on multi-feature fusion, while the second-level controller focuses on dosage optimization based on quality assessment. The two controllers can be optimized independently, thereby improving control accuracy.

[0014] Secondly, after the control task is decomposed, the total number of rules for the two-level controller is much less than that for a single controller, which simplifies the rule base design, enhances the interpretability of the system, and facilitates on-site debugging and maintenance.

[0015] Third, the present invention, through a dynamic weight adjustment module, can adjust the weights of input variables according to different water quality conditions, enabling the control system to adapt to various complex conditions such as high profile clarity, low temperature and low turbidity, and shock loads, thereby improving the robustness of the system.

[0016] Fourth, the present invention includes an output limiting module to limit and protect the single adjustment amount and the cumulative adjustment amount, so as to avoid system oscillation or over-dosing due to extreme control commands and ensure the safe and stable operation of the system.

[0017] Fifth, this invention can be seamlessly integrated with existing image recognition systems and PLC control systems. Only two levels of fuzzy controller software modules need to be added to the original system. No hardware replacement is required, resulting in low modification costs. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of a method flow proposed in an embodiment of this application.

[0019] Figure 2 This is a schematic diagram of the system structure proposed in an embodiment of the present invention.

[0020] Figure 3This is a schematic diagram illustrating the cascading relationship of a two-level fuzzy controller proposed in an embodiment of the present invention.

[0021] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0023] like Figure 1 As shown, this application provides a control method for identifying the flocculation effect and optimizing the dosage in water treatment, including the following steps: S1, acquire alum floc images collected in real time based on an image recognition system, and extract alum floc feature data, wherein the alum floc feature data includes at least alum floc particle size, alum floc density, outline clarity and settling velocity; S2, the alum flower feature data is input to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level; S3, acquire the process parameters collected in real time by the process parameter acquisition system, wherein the process parameters include at least the influent flow rate, and calculate the influent flow rate change rate based on the influent flow rate; S4, the quality grade of the alum floc, the rate of change of the influent flow rate, the clarity of the outline, and the calculated quality change trend are input to the second-level fuzzy controller. The second-level fuzzy controller performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. S5, Generate a dosing control command based on the dosing adjustment amount, and send the dosing control command to the dosing actuator to adjust the flocculant dosage.

[0024] As described in steps S1-S5 above, this invention acquires floc images and extracts multi-dimensional floc feature data through an image recognition system. A first-level fuzzy controller accurately assesses the floc quality level. Combined with process parameters acquired by a process parameter acquisition system, a second-level fuzzy controller infers and outputs the dosage adjustment amount. Finally, a dosing control command is generated to drive the dosing actuator to adjust the floc dosage, achieving real-time identification of the water treatment flocculation effect and dynamic optimization control of the dosage. This effectively decouples the floc quality assessment and dosage control objectives, improving the accuracy of dosing control in the water treatment flocculation and sedimentation process and its adaptability to complex water quality conditions. The cascade relationship between the two fuzzy controllers is as follows: Figure 3 As shown.

[0025] In the flocculation and sedimentation stage of water treatment processes, the morphological characteristics of flocs are a core indicator reflecting the flocculation effect, directly determining the subsequent solid-liquid separation effect and the final effluent quality. The dosage of floc is a key factor in regulating the morphological characteristics of flocs. Insufficient dosage will lead to incomplete floc formation and failure to achieve effective pollutant sedimentation, while excessive dosage will waste floc and may also increase the amount of effluent sludge and affect the effluent quality. Therefore, it is necessary to accurately identify the flocculation effect based on the actual morphological characteristics of flocs, and dynamically adjust the floc dosage in combination with real-time parameters of the water treatment process to solve the technical problem that the floc quality assessment and dosage control are closely coupled and difficult to optimize independently in the existing technology.

[0026] Traditional water treatment chemical dosing control methods rely on manual experience, with operators visually observing floc morphology and adjusting dosage based on experience. This approach suffers from strong subjectivity, slow response, and an inability to accurately quantify floc characteristics. Single-parameter PID control uses the clarity of the effluent profile as feedback to adjust dosage, but due to the large lag, nonlinearity, and time-varying characteristics of the coagulation process, it is difficult to achieve ideal control results. Feedforward + feedback composite control fails to effectively decouple floc quality assessment from chemical dosing control, resulting in simplistic control rules that are difficult to adapt to complex water quality conditions. Neural network intelligent control suffers from poor interpretability and difficulty in on-site debugging. This invention specifically proposes a cascaded hierarchical control scheme using two-stage fuzzy controllers. The first-stage fuzzy controller specifically performs quality level assessment based on multi-dimensional floc characteristics. The second-stage fuzzy controller combines process parameters with the floc quality assessment results to optimize the dosage. This effectively decouples the two control objectives of floc quality assessment and dosage optimization, achieving hierarchical independent optimization of the control objectives. Simultaneously, leveraging the characteristics of fuzzy control algorithms, it adapts to the nonlinear and time-varying characteristics of the coagulation process, improving the adaptability of the control system.

[0027] The core of this invention is a cascaded structure of two-stage fuzzy controllers as its core logic support. It decouples the control objectives of floc quality assessment and dosage optimization. Combining real-time data from image recognition and process parameter acquisition, it utilizes fuzzy control to adapt to the large lag, nonlinearity, and time-varying process characteristics of water treatment coagulation, forming a closed-loop control logic for flocculation effect identification, dosage optimization, and execution adjustment. The principle is as follows: First, an image recognition system acquires floc images in real time and extracts floc feature data including floc particle size, density, outline clarity, and settling velocity. This data comprehensively characterizes the flocculation effect from both visual and physical dimensions. This data is then input into the first-stage fuzzy controller. The controller, relying on its built-in first rule base, performs fuzzy inference, transforming the multi-dimensional and difficult-to-quantify floc feature data into standardized floc quality grades, achieving accurate quantitative assessment of the flocculation effect. Simultaneously, a process parameter acquisition system acquires process parameters, with influent flow rate as the core, in real time. Based on the influent flow rate, it calculates the influent flow rate change rate, which reflects the dynamic changes in water load, obtaining real-time operating data of the water treatment process. Finally, the first-stage fuzzy controller outputs the floc quality data... The floc quality grade, the calculated rate of change in influent flow, the contour clarity obtained by the image recognition system, and the quality change trend calculated based on historical floc quality grade data are all used as input parameters to the second-level fuzzy controller. This controller, relying on its built-in second rule base, performs fuzzy inference by combining the evaluation results of the flocculation effect, the change trend, and the dynamic data of the process conditions. It outputs a dosage adjustment amount adapted to the current actual situation. Finally, it generates a corresponding dosing control command based on the dosage adjustment amount and sends the command to the dosing actuator, which then completes the actual adjustment of the floc dosage. The entire scheme constructs a complete control logic through the cascading of two-level fuzzy controllers, including image feature extraction, quantitative evaluation of flocculation effect, fusion of process parameters, precise optimization of dosage, and adjustment of the actuator. It achieves the two control objectives of floc quality evaluation and dosage optimization in a layered and independent manner, which not only improves the accuracy of control but also allows the control system to better adapt to complex and changing water quality conditions. At the same time, the real-time data acquisition, inference, and execution of each link form a continuous closed-loop control, ensuring continuous identification of the flocculation effect and dynamic real-time optimization of the dosage.

[0028] In one embodiment, step S1 includes: S11, acquire the image of alum flowers collected by the image recognition system; S12, an image recognition algorithm is used to extract features from the alum flower image to obtain the particle size parameter, density parameter, outline clarity parameter and settling velocity parameter of each alum flower individual; S13, perform statistical analysis on multiple particle size parameters obtained within a preset time period to calculate the floc particle size characterizing the overall flocculation state; perform statistical analysis on multiple density parameters obtained within the preset time period to calculate the floc density; perform statistical analysis on multiple contour clarity parameters obtained within the preset time period to calculate the contour clarity; and perform statistical analysis on multiple settling velocity parameters obtained within the preset time period to calculate the settling velocity. S14, the alum floc particle size, alum floc density, contour clarity and settling velocity are combined into multi-dimensional alum floc feature data, which is used as the input of the first-level fuzzy controller.

[0029] As described in steps S11-S14 above, by performing phased feature extraction and statistical analysis on the alum floc images collected by the image recognition system, the core feature parameters of each alum floc individual are first extracted from the original alum floc images, and then the feature parameters of multiple individuals within a preset time period are statistically integrated to finally obtain multi-dimensional alum floc feature data that can characterize the overall flocculation state. This transforms the visualized image data into standardized numerical input data, providing accurate and representative input basis for the first-level fuzzy controller, and ensuring the accuracy and objectivity of the subsequent fuzzy inference evaluation of alum floc quality level.

[0030] In the process of identifying the flocculation effect in water treatment, the original floc images collected by the image recognition system are visual images and cannot be directly used as input parameters for the first-level fuzzy controller. Furthermore, the characteristic parameters of a single floc are subject to randomness due to factors such as local water flow velocity, local floc concentration, and local water impurity distribution. Relying solely on the characteristic parameters of a single floc cannot accurately reflect the overall flocculation state of the entire water treatment system. If unprocessed individual parameters or image data are directly used for floc quality grade assessment, the assessment results will be distorted, which will directly affect the accuracy of subsequent dosage adjustments. Therefore, it is necessary to perform professional feature extraction and statistical analysis on the original floc images to convert the image data into numerical feature parameters, while eliminating the randomness error of individual parameters and obtaining comprehensive feature data that can characterize the overall flocculation state. This solves the technical problems that image data cannot be directly input into the controller and that individual parameters lack representativeness.

[0031] Traditional methods for acquiring alum floc characteristics mostly rely on manual visual observation and empirical estimation, lacking standardized image feature extraction and statistical analysis processes. Even when a few technologies employ image recognition to acquire alum floc characteristics, they often directly use individual alum floc parameters from a single frame image as the evaluation basis, failing to statistically integrate individual parameters across multiple time dimensions and ignoring the randomness of individual parameters. This results in low accuracy and poor representativeness of the acquired alum floc characteristic data, failing to provide reliable data support for subsequent control. This step specifically proposes a standardized alum floc characteristic data acquisition process. First, a dedicated image recognition algorithm is used to convert the original alum floc image into numerical individual characteristic parameters. Then, multiple individual parameters within a preset time period are statistically analyzed and integrated to obtain comprehensive characteristic parameters that reflect the overall flocculation state. Finally, these are combined into multi-dimensional alum floc characteristic data. This approach not only achieves the conversion of image data into controller-recognizable numerical parameters but also eliminates the randomness error of individual parameters, improving the accuracy and representativeness of the characteristic data.

[0032] Step S11 involves acquiring the floc image collected by the image recognition system. This is the foundational step in acquiring the floc feature data. The floc image is collected in real time by a dedicated image recognition system for water treatment flocculation. This system is a specialized supporting device for identifying flocculation effects. The floc image collected by this system is the original data source for subsequent feature extraction and statistical analysis. Only by ensuring the real-time nature and clarity of the floc image acquisition can the subsequent feature extraction work be effective. If the original floc image is blurry or there is a delay in acquisition, it will directly lead to errors or delays in the subsequent feature parameter extraction, thereby affecting the accuracy of the entire flocculation effect identification.

[0033] Step S12 involves using an image recognition algorithm to extract features from the alum flower image, obtaining the particle size, density, outline sharpness, and settling velocity parameters of each alum flower individual. A dedicated image recognition algorithm adapted to the morphological characteristics of alum flowers is employed to accurately identify key information such as pixel boundaries, spatial distribution, visual contours, and motion trajectories of each alum flower individual from the acquired images. This visual information is then converted into calculable and statistically significant numerical individual feature parameters. By transforming visual image data into numerical individual parameters, image information that was previously impossible to directly calculate and analyze becomes parameter data that can be processed subsequently, laying a data foundation for the next step of statistical analysis. For example, the pixel boundary range of a single alum flower can be identified from the alum flower image, and the actual particle size parameter of that alum flower individual can be calculated by combining it with the image calibration ratio. Similarly, the pixel density of a single alum flower in the image can be identified and converted into the actual density parameter of that alum flower individual.

[0034] Step S13 involves statistically analyzing multiple particle size parameters, density parameters, outline clarity parameters, and settling velocity parameters acquired within a preset time period to calculate the floc particle size, floc density, outline clarity, and settling velocity, which characterize the overall flocculation state. Since the characteristic parameters of a single floc exhibit significant randomness—for example, a localized area in a water treatment system may have larger floc particle sizes due to water flow disturbance—the particle size parameters of this localized area cannot represent the overall floc particle size state of the entire system. By statistically analyzing the similar characteristic parameters of multiple floc individuals collected within the preset time period, the randomness error of single-individual parameters can be effectively eliminated, allowing the obtained comprehensive characteristic parameters to truly reflect the overall flocculation state of the entire water treatment system. Integrating discrete individual parameters through statistical analysis improves the representativeness and objectivity of the characteristic data.

[0035] Step S14 involves combining alum floc particle size, alum floc density, contour sharpness, and settling velocity into multi-dimensional alum floc feature data, which serves as input to the first-level fuzzy controller. By integrating scattered single comprehensive feature parameters into standardized multi-dimensional input data, the design requirements of the first-level fuzzy controller for multiple input variables are adapted. The fuzzy inference of the first-level fuzzy controller is based on the multi-dimensional features of alum floc particle size, alum floc density, contour sharpness, and settling velocity. Only by combining these four core comprehensive feature parameters into unified alum floc feature data can they be directly input into the first-level fuzzy controller for subsequent fuzzification processing and rule inference, thereby achieving multi-feature fusion evaluation.

[0036] In one embodiment, step S2 includes: S21, Receive the alum floc feature data, and perform fuzzification processing on the alum floc particle size, alum floc density, contour clarity and settling velocity based on the preset membership function, and calculate the membership degree of each input variable in the corresponding fuzzy subset, wherein the fuzzy subset of the alum floc particle size includes extremely small, small, medium, large and extremely large, the fuzzy subset of the alum floc density includes loose, moderate and dense, the fuzzy subset of the contour clarity includes low, normal and high, and the fuzzy subset of the settling velocity includes slow, medium and fast; S22, perform fuzzy inference based on the first rule base. For each rule in the first rule base, firstly, perform a minimum value operation, that is, compare the membership degree of each input variable involved in the rule in the current fuzzy subset, and take the minimum membership degree value as the trigger strength of the rule. S23. Using the Mamdani inference model, for each triggered rule, the trigger strength is minimized by taking the minimum value of the corresponding output fuzzy subset to determine the output result of the rule. S24, synthesize the output results of all triggered rules by taking the maximum value operation, that is, merge the maximum membership values ​​corresponding to the same output value range in all rule output results to obtain the overall output comprehensive fuzzy relation matrix; S25, the centroid method is used to defuzzify the comprehensive fuzzy relation matrix. The centroid method calculates the geometric center of the region enclosed by the comprehensive fuzzy relation matrix. The output value corresponding to the geometric center is used as the accurate alum flower quality grade output value. The universe of discourse of the alum flower quality grade is divided into five levels: very poor, poor, average, good, and excellent.

[0037] As described in steps S21-S25 above, by sequentially performing fuzzification processing, rule trigger intensity calculation, Mamdani inference model operation, multi-rule output result synthesis, and centroid method defuzzification processing on multi-dimensional floc feature data, systematic fuzzy inference is completed based on the first rule library built into the first-level fuzzy controller. The floc feature data that originally had fuzzy judgment characteristics are transformed into accurate floc quality level output values, realizing standardized and quantitative accurate evaluation of water treatment flocculation effect. This provides a reliable and clear evaluation basis for the second-level fuzzy controller to carry out dosage optimization inference, ensuring the pertinence and accuracy of subsequent dosage adjustments.

[0038] In the process of evaluating the quality grade of floc, characteristic data such as floc particle size and floc density are precise numerical parameters. However, there is no clear quantitative threshold for the correspondence between each characteristic parameter and the floc quality grade. Furthermore, the nonlinear and time-varying characteristics of the coagulation process make the influence of each characteristic parameter on the flocculation effect inherently fuzzy. It is impossible to directly determine the floc quality grade through simple numerical comparison or linear calculation. If numerical thresholds are forcibly used for determination, the evaluation results will be out of touch with the actual flocculation conditions, which will affect the effectiveness of subsequent dosage adjustments. Therefore, it is necessary to use a standardized fuzzy control reasoning process to transform the numerical floc characteristic data into a standardized quality grade that reflects the actual flocculation effect, solve the fuzzy matching problem between floc characteristic parameters and quality grade determination, and achieve an objective and quantitative evaluation of the flocculation effect.

[0039] Traditional methods for judging the quality of flocculent flocculation rely primarily on manual qualitative observation, lacking a standardized fuzzy reasoning process. A few water treatment dosing technologies employing fuzzy control have not designed dedicated fuzzy controllers for flocculent flocculation quality assessment, and the specific implementation methods for trigger intensity calculation, output result synthesis, and defuzzification are not standardized during the reasoning process. This results in highly subjective and inaccurate assessments, failing to provide effective basis for dosing control. This paper proposes a fuzzy reasoning process specifically adapted for flocculent flocculation quality assessment. It uses preset membership functions to fuzzify feature data, calculates rule trigger intensity using minimum value operations, implements rule output based on the Mamdani reasoning model, synthesizes multi-rule output results using maximum value operations, and finally completes defuzzification using the centroid method. This forms a standardized and streamlined fuzzy reasoning system for flocculent flocculation quality grading, enabling precise quantitative assessment of flocculation effects.

[0040] Step S21 receives the multi-dimensional floc feature data obtained from the previous steps. Based on preset membership functions, it performs fuzzification processing on floc particle size, floc density, contour clarity, and settling velocity, respectively. It calculates the membership degree of each input variable in its corresponding fuzzy subset. Specifically, the fuzzy subset for floc particle size is divided into extremely small, small, medium, large, and extremely large; the fuzzy subset for floc density is divided into loose, moderate, and dense; the fuzzy subset for contour clarity is divided into low, normal, and high; and the fuzzy subset for settling velocity is divided into slow, medium, and fast. By converting precise numerical floc feature parameters into fuzzy membership values, it adapts to the fuzzy features of floc quality determination, solving the technical problem that numerical parameters cannot be directly used for fuzzy rule reasoning, and laying a data foundation for subsequent rule reasoning. For example, if a specific value is obtained from the detection of alum floc particle size, the membership degree of this value can be calculated to be 0.8 in the medium fuzzy subset and 0.2 in the large fuzzy subset through a preset membership function. This realizes the transformation from specific value to fuzzy membership degree, allowing the feature parameters to adapt to the requirements of fuzzy inference. For different physical distribution characteristics of input features, triangular membership functions and Gaussian membership functions can be used in combination for fuzzification mapping.

[0041] The specific function type and expression are as follows: Type 1: Triangular membership function (applied to floc particle size) With settling velocity ); This function is suitable for linear transition variables with clear boundary characteristics, and its mathematical expression is: in, These are the lower limit, peak value, and upper limit parameters of the fuzzy subset domain, respectively. Type 2: Gaussian membership function (applied to the density of alum flowers) ); Because the distribution of density data better conforms to the characteristics of normal central distribution, a Gaussian smoothing mapping is used. Its mathematical expression is: Where d is a centrally symmetric value. The standard deviation parameter determines the width of the function.

[0042] The core parameters of the fuzzy universe are strictly discretized according to the preset boundaries of the water treatment process. (Based on input features...) Taking the average particle size of alum floc as an example, its fuzzy domain is divided into 5 levels. The corresponding core parameters (boundary settings) are: Minimal (VS): The interval boundary is set to ; Small (S): The interval boundary is set to ; Middle (M): The interval boundary is set to ; Large (L): The interval limit is set to ; Maximum (VL): The interval limit is set to .

[0043] Step S22 performs fuzzy inference based on the first rule base built into the first-level fuzzy controller. For each rule in the first rule base, the minimum membership degree of each input variable involved in the rule in the current fuzzy subset is calculated, and the minimum membership degree value is selected as the trigger strength of the rule. By accurately determining the actual applicability of each alum flower quality assessment rule, the rule will only be triggered when all input variables involved in the rule have a certain membership degree in the corresponding fuzzy subset. The minimum value calculation can objectively reflect the actual triggering degree of the rule, avoid false triggering of rules due to high membership degree of a single variable, and improve the rationality of rule inference. For example, an evaluation rule states that if the floc size is large, the floc density is dense, the outline is clear, and the settling velocity is fast, the quality grade is excellent. Calculations show that the membership degree for large floc size is 0.9, for dense floc density is 0.8, for high outline clarity is 0.9, and for fast settling velocity is 0.7. After minimization, the trigger strength of this rule is 0.7, which intuitively reflects the actual applicability of this rule.

[0044] Step S23 employs the Mamdani inference model. For each rule triggered after trigger strength calculation, the trigger strength is minimized by taking the minimum value of the corresponding output fuzzy subset, thus determining the output result of that rule. By combining the trigger strength of a rule with the output fuzzy subset, the inference transformation from input fuzzy membership to output fuzzy subset is achieved. The minimization operation of the Mamdani inference model ensures that the output result of a rule matches the actual trigger strength, guaranteeing the rationality of the inference result of a single rule and laying the foundation for the subsequent synthesis of multiple rule output results.

[0045] Step S24 involves combining the output results of all triggered rules obtained through minimum value operation by performing maximum value operation. The maximum membership values ​​corresponding to the same output value range among all rule output results are then merged to obtain the overall fuzzy relation matrix. By integrating the fuzzy output results of all triggered rules, the problem of scattered output results after multiple rules are triggered is solved, forming a comprehensive fuzzy relation matrix that fully reflects the overall reasoning result. The maximum value operation selects the most representative membership value in each output value range, ensuring that the comprehensive fuzzy relation matrix completely reflects the reasoning results of all triggered rules. For example, if two triggered rules have membership values ​​of 0.7 and 0.6 in the excellent output value range, after the maximum value operation, the membership value of that range is determined to be 0.7 and merged into the comprehensive fuzzy relation matrix.

[0046] Step S25 uses the centroid method to defuzzify the comprehensive fuzzy relation matrix, calculates the geometric center of the region enclosed by the matrix, and uses the output value corresponding to this center as the precise alum floc quality grade output value. The universe of discourse for the alum floc quality grade is explicitly divided into five levels: very poor, poor, average, good, and excellent. The synthesized fuzzy relation matrix is ​​then converted into precise control instructions (dosage adjustment percentage) executable by the PLC, and defuzzified using the centroid method. The specific processing method is as follows: The theoretical centroid method formula for continuous domains provides the geometric center for calculating the area of ​​a fuzzy set: In the actual engineering code of the controller, the continuous universe of discourse is divided into a finite number of high-precision discrete points, and the system uses a discretized weighted average algorithm to solve for the final accurate output value. : Among them, the Represents the comprehensive fuzzy relation matrix. Describes the first [unclear] on the output universe. Each quantization point, the This represents the corresponding membership degree value. The input feature vector represents the three-dimensional visual feature vector extracted in real time from the flocculation reaction tank, i.e. .in, Characterizing the average particle size of floc (unit: ), Characterizing the density of alum flowers (dimensionless range: ), Characterizing the settling velocity of flocculents (unit: The input feature vector m is processed and identified in real time by an edge-side visual AI analysis terminal deployed on-site, generating structured data and storing it in the underlying SQLite database. The control system obtains the latest normalized values ​​through a data interface at a fixed frequency (e.g., every second). The output decision variable represents the dynamic adjustment ratio of the dosage calculated by the system after fuzzy inference and defuzzification (e.g., the output result range is...). Output decision variables. The control program performs defuzzification calculations based on the centroid method to obtain specific values. Then, the adjustment command is sent directly to the field PLC via industrial Ethernet (such as Modbus TCP protocol), and the actual flow rate of the dosing pump is changed by adjusting the frequency of the frequency converter.

[0047] The above algorithm can fully integrate the smoothing contributions of all triggering rules, effectively avoiding step oscillations in the control signal caused by single-variable mutations. By transforming the fuzzy comprehensive relationship matrix into a precise numerical alum floc quality level, it solves the problem that fuzzy inference results cannot be directly used as input parameters for the second-level fuzzy controller. The centroid method obtains precise output values ​​by calculating the geometric center, which can fully integrate the smoothing contributions of all triggering rules, effectively avoiding oscillations in the evaluation results caused by single-variable mutations, and improving the stability and accuracy of alum floc quality level evaluation. The final precise alum floc quality level can be directly used as the core input parameter of the second-level fuzzy controller, providing a clear and reliable basis for subsequent dosage optimization inference. It should be noted that the input variables of the second-level fuzzy controller include: The current quality level Q is derived from the output of the first-level controller; Quality change trend E: that is, the derivative of the evaluation value (improving, deteriorating, or remaining stable).

[0048] Inlet flow rate change rate ΔF: Real-time data acquisition from the online flow meter.

[0049] Outline clarity C: from the results of alum flower recognition.

[0050] The output variable of the second-level fuzzy controller is: The dosage adjustment A has a range of -50% to +50%.

[0051] The second-level fuzzy controller performs fuzzification processing on each input variable and defines fuzzy subsets and membership functions.

[0052] The current fuzzy subset of quality levels includes: Poor (Q_Poor), Fair (Q_Fair), Average (Q_Average), Good (Q_Good), and Excellent (Q_Excellent); A fuzzy subset of the quality change trend: improving, remaining stable, and deteriorating.

[0053] The fuzzy subset of the rate of change of influent flow includes: very little, less, medium, more, and a lot; The fuzzy subset of contour sharpness includes: low (L), normal (N), and high (H).

[0054] The fuzzy subset of the dosage adjustment A includes: the universe of discourse is set to [-50%, +50%], and it is divided into: significantly reduced (NB), slightly reduced (NS), unchanged (Z), slightly increased (PS), and significantly increased (PB).

[0055] The second-level fuzzy controller has a built-in second rule library containing no fewer than 20 dosing control rules, which are used to optimize the dosing amount based on quality assessment results and process parameters.

[0056] In one embodiment, step S3 includes: Step S31: The influent flow rate data is collected in real time by the flow meter in the process parameter acquisition system to obtain the influent flow rate value at the current moment; Step S32: Calculate the rate of change of the influent flow rate based on historical influent flow rate data; Step S33: Obtain the contour sharpness parameters at the current moment in real time through the image recognition system; Step S34: Obtain the alum floc quality level at multiple consecutive historical moments from the historical output of the first-level fuzzy controller, and determine the quality change trend based on the historical alum floc quality level data. The quality change trend includes improving, stabilizing, and deteriorating.

[0057] As described in steps S31-S34 above, the influent flow rate data is collected in real time by the dedicated flow meter of the process parameter acquisition system, and the influent flow rate change rate is calculated. The contour clarity parameter at the current moment is obtained synchronously by the image recognition system. Then, the continuous floc quality grade data is extracted from the historical output of the first-level fuzzy controller and the quality change trend is determined. The system completes the acquisition and processing of the process input parameters required by the second-level fuzzy controller, providing comprehensive, real-time, accurate and unified process parameter support for the dosage optimization reasoning of the second-level fuzzy controller. This ensures that the dosage optimization reasoning is highly consistent with the dynamic operating conditions of the actual water treatment process, and improves the pertinence and foresight of the dosage adjustment.

[0058] In the process of optimizing and controlling the dosage of flocculants in water treatment, the dosage inference of the second-stage fuzzy controller cannot be accurately optimized solely by relying on the single parameter of floc quality grade. The dosage during coagulation is directly related to the dynamic operating conditions of the water treatment process. As a core basic parameter of the water treatment process, the influent flow rate directly changes the water load. The flocculant concentration per unit volume of water needs to be dynamically adjusted according to the water load. Relying solely on the real-time influent flow rate value cannot reflect the dynamic trend of water load changes. Contour clarity is a key visual characteristic parameter for the flocculant flocculation effect and needs to be acquired in real time to assist in the accurate determination of the dosage. Quasi-inference, the changing trend of floc quality can reflect the dynamic development direction of flocculation effect and is an important forward-looking basis for adjusting the dosage. Without the support of such process parameters, the dosage inference of the second-stage fuzzy controller will be out of touch with the actual operating conditions, resulting in a lack of pertinence and foresight in the dosage adjustment. Therefore, it is necessary to systematically complete the calculation of the influent flow rate change rate, the acquisition of real-time profile clarity, and the determination of quality change trend to solve the technical problem that the dosage inference of the second-stage fuzzy controller lacks comprehensive process condition parameter support, so that the dosage optimization adjustment can not only fit the actual flocculation effect of floc but also adapt to the dynamic changes of process conditions.

[0059] In traditional water treatment chemical dosing control technologies, some only use a single influent flow rate value as a process reference parameter, without calculating the change rate of the influent flow rate, and cannot reflect the dynamic change characteristics of the water body load. Some of the auxiliary characteristic parameters obtained by other technologies are from different sources than the core evaluation parameters, resulting in poor data synchronization. There are also technologies that do not combine the historical output data of floc quality to determine the change trend, and only rely on the current floc quality level to adjust the chemical dosage, resulting in a lag in the adjustment of the chemical dosage and being unable to adapt to the dynamic development of the flocculation effect. This step specifically proposes a standardized and systematic process parameter acquisition and processing flow. The influent flow rate is collected and the change rate is calculated through the process parameter acquisition system. The real-time contour clarity parameter is obtained relying on the same image recognition system. The data is extracted from the historical output of the first-level fuzzy controller to determine the quality change trend, realizing the real-time and synchronous acquisition and standardized processing of multi-dimensional process parameters, ensuring the unity of the parameter source and the synchronization of data, and providing comprehensive and accurate process parameter inputs for the second-level fuzzy controller.

[0060] Step S31 uses the flowmeter in the process parameter acquisition system to collect the influent flow rate data in real time and obtain the influent flow rate value at the current moment, which is the basic link of process parameter acquisition. The influent flow rate data is collected in real time by the dedicated flowmeter in the process parameter acquisition system supporting the water treatment process during the influent process. The flowmeter is a dedicated device for process parameter acquisition and can accurately capture the actual value of the influent flow rate at the current moment. By obtaining the core basic operating condition parameters of the water treatment process, only by ensuring the real-time and accuracy of the influent flow rate collection can the subsequent calculation of the change rate fit the dynamic changes of the actual working conditions. For example, the flowmeter accurately collects a specific influent flow rate value at a certain moment, and this value is the core original basis for the subsequent calculation of the influent flow rate change rate.

[0061] Step S32 calculates the change rate of the influent flow rate based on the historical influent flow rate data. Taking the influent flow rate value at the current moment collected in S31 and the historical influent flow rate data stored in the process parameter acquisition system as the calculation basis, the quantitative calculation of the influent flow rate change rate is completed. By converting the static influent flow rate value into a quantitative parameter that can reflect the dynamic change trend of the water body load, the problem that a single influent flow rate value cannot reflect the dynamic changes of the process working conditions is solved. The influent flow rate change rate can intuitively reflect the rising, falling or stable state of the influent flow rate, enabling the chemical dosage inference of the second-level fuzzy controller to adapt to the dynamic changes of the water body load. For example, if the current influent flow rate value shows a continuous upward trend compared with the historical data, the calculated influent flow rate change rate is positive, which can enable the chemical dosage adjustment to adapt to the increase in the water body load in advance.

[0062] Step S33 uses an image recognition system to acquire the contour clarity parameter at the current moment in real time. The contour clarity parameter is collected in real time by the same image recognition system used in the previous extraction of floc features to ensure the consistency of the data source and the synchronization of the acquisition time between the parameter and the floc feature data. This avoids data deviation and time difference caused by acquisition from different systems. By providing real-time visual feature parameters of floc to the second-level fuzzy controller, it assists in the optimization reasoning of the dosage. The contour clarity can directly reflect the formation state of floc and is an important auxiliary basis for adjusting the dosage. Real-time acquisition of this parameter allows the dosage adjustment to better match the current actual flocculation effect.

[0063] Step S34 obtains the floc quality levels of multiple consecutive historical moments from the historical output of the first-level fuzzy controller, and determines the quality change trend based on the historical floc quality level data. The quality change trend includes improving, stabilizing, and deteriorating. The floc quality level data comes directly from the historical output results of the first-level fuzzy controller, ensuring the authenticity of the data and its correlation with the core evaluation parameters. By determining the dynamic development direction of the floc flocculation effect, the dosage adjustment is made forward-looking, avoiding the lag adjustment caused by relying solely on the current floc quality level. By analyzing the floc quality level data of multiple consecutive historical moments, the dynamic development state of the flocculation effect can be accurately judged. For example, if the floc quality level of multiple consecutive historical moments gradually improves from poor to average, and then continues to improve to good, the quality change trend can be accurately determined to be improving. At this time, the second-level fuzzy controller can appropriately reduce the dosage to achieve forward-looking optimization adjustment of the dosage, making the dosage adjustment more in line with the dynamic development of the flocculation effect.

[0064] In one embodiment, step S4 includes: S41, receive the floc quality grade, the quality change trend, the influent flow rate change rate, and the outline clarity as input variables, and perform fuzzification processing on each input variable based on a preset membership function, calculate the membership degree of each input variable in the corresponding fuzzy subset, wherein the fuzzy subset of the floc quality grade includes poor, poor, average, good, and excellent; the fuzzy subset of the quality change trend includes improving, stable, and worsening; the fuzzy subset of the influent flow rate change rate includes very little, less, medium, more, and a lot; and the fuzzy subset of the outline clarity includes low, normal, and high. S42, perform fuzzy inference based on the second rule base. For each rule in the second rule base, calculate the trigger strength of the rule by taking the minimum value operation, and obtain the output result of the rule through the Mamdani inference model. Then, synthesize the output results of all triggered rules to obtain the comprehensive fuzzy relation matrix of the dosage adjustment amount, wherein the domain range of the dosage adjustment amount is -50% to 50%. S43, the centroid method is used to defuzzify the comprehensive fuzzy relation matrix of the dosage adjustment amount, the geometric center of the region enclosed by the comprehensive fuzzy relation matrix is ​​calculated, and the output value corresponding to the geometric center is used as the precise dosage adjustment amount; S44, a feedforward empirical calculation formula is introduced to link the dosing adjustment amount. First, the baseline dosing amount of flocculant is calculated based on the sludge feed amount, sludge concentration, dry sludge ratio and flocculant concentration. Then, the precise dosing adjustment amount is calculated with the baseline dosing amount of flocculant to obtain the final dosing setting value.

[0065] As described in steps S41-S44 above, the quality grade, quality change trend, influent flow rate change rate, and contour clarity of floc are standardized and fuzzified. Based on the second rule library built into the second-level fuzzy controller, fuzzy inference and result synthesis for dosage optimization are completed. Then, the precise dosage adjustment amount is obtained by defuzzification using the centroid method. Finally, the feedforward empirical calculation formula is introduced to link the dosage adjustment amount with the flocculant baseline dosage to obtain the final dosing set value that fits the actual water treatment process. This achieves precise optimization of dosage by integrating multi-dimensional parameters, allowing the dosage adjustment amount obtained by fuzzy inference to be combined with the actual dosing requirements of the process and implemented. This provides a precise and executable dosage basis for the generation of subsequent dosing control instructions, ensuring a high degree of adaptation between flocculant dosage adjustment and flocculant flocculation effect and dynamic process conditions.

[0066] In the optimization of flocculant dosage in water treatment, determining the dosage adjustment requires considering the evaluation results of flocculant flocculation effect, the dynamic trend of flocculation effect, and the real-time operating parameters of the water treatment process. Furthermore, the correspondence between each input parameter and the dosage adjustment lacks a clear quantitative threshold, exhibiting inherent fuzziness. This makes precise dosage optimization impossible through simple linear calculations. Additionally, the dosage adjustment obtained through pure fuzzy inference is a proportional adjustment value and cannot be directly used as the actual flocculant dosage. A baseline dosage must be calculated based on the actual basic dosage requirements of the process before it can be implemented. Relying solely on a single parameter for dosage calculation, or failing to integrate the fuzzy inference results with the process baseline dosage, leads to a disconnect between the dosage adjustment and actual operating conditions, and the adjustment results cannot be directly implemented. Therefore, a standardized fuzzy inference process is needed to integrate multi-dimensional parameters to obtain an accurate dosage adjustment. Then, a feedforward empirical formula is introduced to combine with process parameters to calculate the baseline dosage, ultimately yielding a final, implementable dosage setting. This addresses the technical challenges of integrating multi-dimensional parameters in dosage optimization and the inability to directly implement fuzzy inference results.

[0067] Traditional water treatment chemical dosing control technologies sometimes rely solely on single process parameters or flocculation effect parameters for dosage calculation, failing to achieve multi-dimensional parameter integration and optimization. Other technologies employing fuzzy control lack standardized dosage reasoning processes and do not incorporate feedforward empirical formulas to calculate baseline dosages based on actual process conditions. This results in low dosage adjustment accuracy and the inability to directly convert reasoning results into actual dosages. This step specifically proposes a standardized fuzzy reasoning process adapted to dosage optimization. It integrates floc quality and multi-dimensional process parameters to obtain precise dosage adjustments. Simultaneously, it introduces feedforward empirical calculation formulas to calculate baseline flocculant dosages based on core process parameters such as sludge feed rate and sludge concentration. The proportional dosage adjustment is then linked with the baseline dosage to obtain the final dosing setpoint, achieving a balance between the accuracy and practicality of dosage optimization.

[0068] Step S41 receives the floc quality grade, quality change trend, influent flow rate change rate, and outline sharpness obtained from the previous steps as input variables. The floc quality grade is output by the first-level fuzzy controller; the quality change trend and influent flow rate change rate are obtained by processing historical output data from the process parameter acquisition system combined with the first-level fuzzy controller; and the outline sharpness is acquired in real-time by the image recognition system. Each input variable is fuzzified based on a preset membership function, and the membership degree of each input variable in the corresponding fuzzy subset is calculated. Specifically, the first-level fuzzy controller fuzzifies the input and output variables and defines fuzzy subsets and membership functions, where: The fuzzy subset of floc size includes: extremely small (VS), small (S), medium (M), large (L), and extremely large (VL); The fuzzy subset of floc density includes: loose (LD), moderate (MD), and dense (HD); The blurry subset of contour sharpness includes: low (L), normal (N), and high (H); The fuzzy subset of settling velocity includes: slow (V_Slow), medium (V_Medium), and fast (V_Fast); The fuzzy subset of alum floc quality grades includes: very poor (VP), poor (P), average (F), good (G), and excellent (E).

[0069] The first-level fuzzy controller has a built-in first rule library containing no fewer than 30 quality level evaluation rules, which are used to comprehensively evaluate the floc flocculation effect of floc based on the characteristics of floc.

[0070] By unifying multi-dimensional precise numerical parameters and qualitative state parameters into membership values ​​suitable for fuzzy inference, the problem of different types of input parameters being unable to be directly integrated for fuzzy inference is solved. This lays a unified data foundation for rule-based inference of subsequent dosage optimization. For example, if the quality grade of alum floc obtained at a certain moment is "good", the membership degree of this parameter in the "good" fuzzy subset can be calculated as 0.9 and in the "general" fuzzy subset as 0.1 through a preset membership function. This realizes the transformation from qualitative grade to fuzzy membership degree, allowing different types of input parameters to be integrated in the same inference system.

[0071] Step S42 performs fuzzy inference based on the second rule base built into the second-level fuzzy controller. For each rule in the second rule base, the trigger strength of the rule is calculated by taking the minimum value operation, and then the output result of the rule is obtained through the Mamdani inference model. Subsequently, the output results of all triggered rules are synthesized to obtain the comprehensive fuzzy relation matrix of the dosage adjustment. The domain range of the dosage adjustment is clearly set to -50% to 50%. By relying on a standardized fuzzy inference process, the system achieves fusion optimization of multi-dimensional input parameters. Minimum value calculations accurately determine the actual applicability of each dosing control rule, avoiding false triggering. The Mamdani inference model then transforms rule inputs into outputs. The resulting comprehensive fuzzy relation matrix fully reflects the dosing optimization inference results of all triggered rules. The dosing adjustment domain is set to -50% to 50%, ensuring the dosing ratio adjustment remains within a reasonable range and avoiding imbalances in flocculation effects caused by over-adjustment. For example, if a control rule states that the alum quality grade is excellent and the effect trend is stable, the dosing adjustment remains unchanged. The minimum value calculation yields a trigger strength of 0.8 for this rule. After obtaining the corresponding output through the Mamdani inference model, this output is combined with the outputs of other triggered rules into the comprehensive fuzzy relation matrix.

[0072] Step S43 uses the centroid method to defuzzify the comprehensive fuzzy relation matrix of the dosage adjustment, calculates the geometric center of the region enclosed by the comprehensive fuzzy relation matrix, and uses the output value corresponding to the geometric center as the precise dosage adjustment. By transforming the fuzzy comprehensive reasoning result into a precise numerical dosage adjustment, the problem that the fuzzy relation matrix cannot be directly used as the basis for dosage adjustment is solved. The centroid method can fully integrate the smoothing contribution of all triggering rules during the defuzzification process, effectively avoiding the step oscillation of the dosage adjustment caused by univariate mutations, making the obtained precise dosage adjustment more stable and more in line with the actual dosage requirements. The final output precise dosage adjustment is a proportional adjustment value, which can be directly used for subsequent linkage calculations with the flocculant baseline dosage.

[0073] Step S44 introduces a feedforward empirical calculation formula to link the dosage adjustment. First, the baseline dosage of flocculant is calculated based on the sludge inflow rate, sludge concentration, dry sludge ratio, and flocculant concentration. The specific calculation method for the baseline dosage is as follows: PAM baseline dosage = sludge feed amount × sludge concentration × dry sludge ratio (system default configuration 0.5%) / PAM concentration; The precise dosage adjustment is then calculated together with the baseline flocculant dosage to obtain the final dosing setting value. The calculation method for the final dosing setting value is as follows: The final dosing setting value is calculated as follows: PAM baseline dosage × [1 + adjustment ratio of the secondary fuzzy controller output].

[0074] The purpose of the above calculation method is to combine the proportional dosing adjustment with the benchmark dosage that fits the actual process, so as to realize the engineering implementation of the fuzzy inference results and solve the problem that the proportional adjustment obtained by pure fuzzy inference cannot be directly used as the actual dosage. The feedforward empirical calculation formula is combined with the core material parameters of the water treatment process to calculate the benchmark dosage, which ensures the process rationality of the dosage. Then, the dosing adjustment obtained by fuzzy inference is combined with dynamic proportional adjustment, so that the final dosing set value not only meets the basic dosing requirements of the process, but can also be dynamically adjusted according to the flocculant flocculation effect and process conditions. For example, if the benchmark dosage of flocculant is calculated to a fixed value by the feedforward empirical formula, and the dosing adjustment obtained by fuzzy inference is 50%, then the benchmark dosage and the adjustment ratio are linked to calculate the final flocculant dosing set value, so as to achieve precise optimization and implementation of the dosage.

[0075] In one embodiment, step S5 includes: S51, receive the precise dosing adjustment amount output by the second-level fuzzy controller, and perform amplitude limiting processing on the precise dosing adjustment amount, determine whether the precise dosing adjustment amount exceeds the preset safe adjustment range, and if it exceeds the preset safe adjustment range, limit the precise dosing adjustment amount to the boundary value of the safe adjustment range. S52 converts the dosage adjustment amount after the amplitude limiting process into a control signal that can be recognized by the dosing actuator; S53, the control signal is sent to the controller of the dosing actuator to drive the dosing actuator to adjust the actual dosage of flocculant according to the dosing adjustment amount; S54, after the control signal is sent, the anti-oscillation dead zone filtering stage is entered. If the subsequent drug adjustment amount output by the second-level fuzzy controller is continuously less than the preset adjustment threshold within the preset waiting time, no new instruction will be output to maintain system stability. S55, return to step S1, repeat steps S1 to S5 to form a closed-loop control, realize continuous identification of water treatment flocculation effect and real-time optimization of dosage.

[0076] As described in steps S51-S55 above, the precise dosing adjustment amount output by the second-level fuzzy controller is sequentially subjected to safety limiting processing and standardized control signal conversion. The control signal is then transmitted to the dosing actuator to complete the adjustment of the actual flocculant dosage. An anti-vibration dead zone filter is added to maintain the stability of system operation. Finally, a closed-loop control is formed by cyclically executing the entire process. The reasoning result of the optimized dosing amount is fully transformed into the actual process control action that the dosing actuator can accurately execute, realizing the safe, stable, and real-time adjustment of the flocculant dosage. At the same time, relying on the closed-loop control, the flocculation effect of water treatment is continuously identified and the dosing amount is dynamically optimized to ensure the stability of the control process of the flocculation and sedimentation stage in water treatment and the continuity of process operation. In the implementation phase of optimizing flocculant dosage in water treatment, the precise dosage adjustment output by the second-level fuzzy controller may exceed its range due to extreme conditions such as water quality shocks or sudden changes in operating conditions. Directly using these values ​​for actual dosing control can lead to either overdosing or underdosing of flocculant. Overdosing results in waste and increased effluent sludge, while underdosing leads to poor flocculant coagulation and affects effluent quality, both causing imbalances in the flocculation and sedimentation process. Furthermore, the dosage adjustment obtained through fuzzy inference is a purely numerical parameter that cannot be directly recognized and executed by the dosing actuator. Simultaneously, continuous small-scale dosing adjustments cause frequent actuator actions, increasing equipment mechanical stress. Losses can also cause oscillations in the control system, affecting the overall operational stability. In addition, water treatment flocculation and sedimentation is a continuous and dynamic process, and the water quality and process parameters will continue to change. A single adjustment of the dosage cannot adapt to the dynamic changes in the process. If only an open-loop control mode is used, the accuracy of the dosage control will continue to decrease with the changes in the process. Therefore, it is necessary to limit the dosage adjustment to a safe range, complete the standardized signal conversion, add anti-oscillation links, and build a closed-loop control system to solve the technical problems of safety, signal adaptability, system stability, and process continuity in the dosage execution. This will allow the results of the dosage optimization to be implemented safely and stably, and continuously adapt to the dynamically changing water treatment process requirements.

[0077] Traditional water treatment chemical dosing control technologies often lack dedicated limiting mechanisms for dosing adjustments, making them prone to process imbalances due to extreme adjustments. Others lack dedicated anti-oscillation control mechanisms, leading to frequent system oscillations caused by frequent actuator movements. Still others employ open-loop control, failing to continuously optimize dosing based on real-time changes in flocculation performance, resulting in a gradual decrease in control accuracy. This paper proposes a comprehensive dosing execution process that includes limiting, signal conversion, execution control, anti-oscillation filtering, and closed-loop control. First, a safe range limit is established for the dosing adjustment. Then, this is converted into a control signal recognizable by the dosing actuator. After the dosing action, an anti-oscillation dead zone filter is added to prevent system oscillations. Finally, the entire process is executed cyclically to form a closed-loop control, achieving safe dosing, stable system operation, and continuous dynamic process control.

[0078] Step S51 receives the precise dosing adjustment amount output by the second-level fuzzy controller and performs amplitude limiting processing on the precise dosing adjustment amount to determine whether the precise dosing adjustment amount exceeds the preset safe adjustment range. If it exceeds the range, the precise dosing adjustment amount is limited to the boundary value of the safe adjustment range. The precise dosing adjustment amount is directly derived from the output result after defuzzification processing of the second-level fuzzy controller. The amplitude limiting processing performs range determination and numerical correction on the numerical dosing adjustment amount through the preset safe adjustment range threshold. By avoiding the process operation risks caused by exceeding the range of dosing adjustment amount under extreme operating conditions, the safety of flocculant dosing adjustment is ensured from the execution source, preventing problems such as reagent waste and process imbalance caused by over-adjustment. For example, if the preset safe adjustment range is -30% to 30%, and the precise dosing adjustment amount output by the second-level fuzzy controller is 40%, which exceeds the preset safe adjustment range, the value is corrected to 30% after amplitude limiting processing to avoid process problems caused by over-dosing of flocculant.

[0079] Step S52 converts the dosage adjustment amount after amplitude limiting into a control signal recognizable by the dosing actuator. Based on the dosage adjustment amount after amplitude limiting, the conversion from numerical parameters to hardware-recognizable control signals is completed according to the hardware signal specifications of the dosing actuator. By solving the signal incompatibility problem between the numerical dosage adjustment amount and the dosing actuator, the safety-optimized dosage adjustment amount can be accurately recognized by the dosing actuator, laying the signal transmission foundation for the subsequent adjustment of the actual flocculant dosage and ensuring the adaptability and accuracy of the control signal.

[0080] Step S53 sends a control signal to the controller of the dosing actuator to drive the dosing actuator to adjust the actual dosage of flocculant according to the dosing adjustment amount. The converted control signal is sent to the dedicated controller of the dosing actuator through a dedicated data transmission method. The controller drives the dosing actuator to complete the actual adjustment action of flocculant dosage according to the instructions of the control signal. The conversion from control signal to actual process adjustment action is the core link in the implementation of the dosing optimization result. It truly transforms the dosing adjustment amount after fuzzy reasoning, parameter calculation and safety limit into the actual dosage of flocculant, which directly affects the water treatment flocculation and sedimentation process and realizes precise on-site adjustment of dosing amount.

[0081] Step S54: After the control signal is sent, the system enters the anti-oscillation dead zone filtering stage. Within a preset waiting time, if the subsequent dosing adjustment amount output by the second-level fuzzy controller is continuously less than the preset adjustment threshold, no new command will be output to maintain system stability. The system starts immediately after the dosing actuator completes one dosing adjustment action. The subsequent dosing adjustment amount output by the second-level fuzzy controller is judged by two core indicators: the preset waiting time and the adjustment threshold, to determine whether to output a new control command. This avoids frequent start-stop of the dosing actuator due to small and continuous dosing adjustment commands, reducing mechanical wear on the equipment. At the same time, it prevents continuous fluctuations in the flocculant dosage caused by frequent small adjustments, avoiding oscillations in the entire control system and improving the operational stability of the dosing control system. For example, if the preset adjustment threshold is 1%, and the subsequent dosing adjustment amount output by the second-level fuzzy controller is continuously 0.5%, meeting the condition of being continuously less than the preset adjustment threshold, no new control command will be output, and the current flocculant dosage will remain unchanged.

[0082] Step S55 returns to step S1, and steps S1 to S5 are repeated to form a closed-loop control, realizing continuous identification of the flocculation effect in water treatment and real-time optimization of the dosage. By executing the program cyclically, the flocculation effect identification result after each dosage adjustment is used as the input basis for the next dosage optimization, thus constructing a complete control loop system. Through the closed-loop control system of flocculation effect identification, dosage optimization, dosage execution, and re-identification of flocculation effect, it adapts to the continuous and dynamic operation characteristics of the water treatment flocculation and sedimentation process, allowing the dosage to be continuously and dynamically optimized according to the real-time changes in flocculation effect and process parameters. This avoids the problem of decreased control accuracy caused by process changes in the open-loop control mode, ensuring the continuous and stable operation of the water treatment flocculation and sedimentation process.

[0083] like Figure 2 As shown, the present invention also discloses a control system for water treatment flocculation effect identification and dosage optimization, comprising: The acquisition module is used to acquire images of alum flowers in real time based on an image recognition system and extract alum flower feature data; The fuzzy inference module is used to input the alum flower feature data to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level. The trend determination module is used to acquire process parameters collected in real time by the process parameter acquisition system, and to calculate the process parameter change rate and determine the quality change trend based on the process parameters. The output module is used to input the quality grade of the alum floc, the rate of change of the process parameters, the clarity of the outline, and the trend of quality change to the second-level fuzzy controller, which performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. The adjustment module is used to generate a dosing control command based on the dosing adjustment amount, and send the dosing control command to the dosing actuator to adjust the flocculant dosage.

[0084] In one embodiment, the trend determination module includes: The acquisition unit is used to acquire process parameters in real time through the process parameter acquisition system and obtain the process parameter values ​​at the current moment. The calculation unit is used to calculate the rate of change of the process parameters based on historical process parameter data; The recognition unit is used to obtain the outline clarity at the current moment in real time through the image recognition system; The determining unit is used to obtain the alum floc quality level at multiple consecutive historical moments from the historical output of the first-level fuzzy controller, and determine the quality change trend based on the historical alum floc quality level data.

[0085] This application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described control method for water treatment flocculation effect identification and dosage optimization.

[0086] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described control method for identifying the flocculation effect and optimizing the dosage in water treatment.

[0087] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0088] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0089] The above description is merely a preferred embodiment of the present invention and does not limit the scope of this application. Any equivalent results or equivalent process transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of protection of this application.

Claims

1. A method for identifying the flocculation effect and optimizing the dosage in water treatment, characterized in that, Includes the following steps: Acquire images of alum flowers in real time based on an image recognition system and extract alum flower feature data; The alum flower feature data is input to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level. The process parameters are acquired in real time by the process parameter acquisition system, and the rate of change of process parameters and the trend of quality change are calculated based on the process parameters. The quality grade of the alum floc, the rate of change of the process parameters, the clarity of the outline, and the trend of quality change are input into the second-level fuzzy controller. The second-level fuzzy controller performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. A dosing control command is generated based on the dosing adjustment amount, and the dosing control command is sent to the dosing actuator to adjust the flocculant dosage.

2. The water treatment flocculation effect identification and dosage optimization control method according to claim 1, characterized in that, The step of extracting the feature data of alum flowers includes: Acquire images of alum flowers captured by an image recognition system; Image recognition algorithms are used to extract features from the alum flower images to obtain the feature parameters of each alum flower individual; Statistical analysis is performed on multiple characteristic parameters acquired within a preset time period to calculate floc characteristic data representing the overall flocculation state; The alum flower feature data is used as the input to the first-level fuzzy controller.

3. The water treatment flocculation effect identification and dosage optimization control method according to claim 1, characterized in that, The step of the first-level fuzzy controller performing fuzzy inference based on the first rule base and outputting the quality level of alum floc includes: The alum flower feature data is received, and each input variable is fuzzified based on a preset membership function. The membership degree of each input variable in the corresponding fuzzy subset is calculated. Fuzzy reasoning is performed based on the first rule base, the trigger strength of each rule in the first rule base is calculated, and the output result of each rule is determined based on the trigger strength; The outputs of all triggered rules are combined to obtain the overall fuzzy relation matrix. The comprehensive fuzzy relation matrix is ​​defuzzified to obtain accurate alum flower quality grade output values.

4. The water treatment flocculation effect identification and dosage optimization control method according to claim 1, characterized in that, The steps of acquiring process parameters in real time by the process parameter acquisition system, and calculating the process parameter change rate and determining the quality change trend based on the process parameters include: The process parameter acquisition system collects process parameters in real time to obtain the current process parameter values. The rate of change of the process parameters was calculated based on historical process parameter data; The image recognition system obtains the current contour sharpness in real time. The quality levels of alum floc at multiple consecutive historical moments are obtained from the historical output of the first-level fuzzy controller, and the quality change trend is determined based on the historical alum floc quality level data.

5. The water treatment flocculation effect identification and dosage optimization control method according to claim 1, characterized in that, The step of inputting the alum flower quality grade, the rate of change of the process parameters, the clarity of the outline, and the quality change trend into the second-level fuzzy controller, and having the second-level fuzzy controller perform fuzzy inference based on the second rule base and output the dosage adjustment amount, includes: The alum floc quality grade, the quality change trend, the process parameter change rate, and the outline clarity are received as input variables, and each input variable is fuzzified based on a preset membership function to calculate the membership degree of each input variable in the corresponding fuzzy subset. Fuzzy reasoning is performed based on the second rule base, the trigger strength of each rule in the second rule base is calculated, and the output result of each rule is determined based on the trigger strength. Then, the output results of all triggered rules are combined to obtain the comprehensive fuzzy relation matrix of the dosage adjustment. The comprehensive fuzzy relation matrix of the dosage adjustment amount is defuzzified to obtain the accurate dosage adjustment amount; By introducing a feedforward empirical formula, the baseline dosage of flocculant is calculated based on process parameters. Then, the precise dosage adjustment is calculated together with the baseline dosage of flocculant to obtain the final dosage setting value.

6. The water treatment flocculation effect identification and dosage optimization control method according to claim 1, characterized in that, The step of generating a dosing control command based on the dosing adjustment amount and sending the dosing control command to the dosing actuator to adjust the flocculant dosage includes: The system receives the precise dosing adjustment amount output by the second-level fuzzy controller and limits the precise dosing adjustment amount so that it does not exceed the preset safe adjustment range. The dosage adjustment amount after the amplitude limiting process is converted into a control signal that can be recognized by the dosing actuator; The control signal is sent to the controller of the dosing actuator to drive the dosing actuator to adjust the actual dosage of flocculant according to the dosing adjustment amount; After the control signal is sent, the system enters the anti-oscillation phase to maintain system stability under preset conditions. Return to the steps of acquiring the alum flower image collected in real time based on the image recognition system and extracting the alum flower feature data to form a closed-loop control.

7. A control system for identifying flocculation effect and optimizing chemical dosage in water treatment, characterized in that, include: The acquisition module is used to acquire images of alum flowers in real time based on an image recognition system and extract alum flower feature data; The fuzzy inference module is used to input the alum flower feature data to the first-level fuzzy controller, which performs fuzzy inference based on the first rule base and outputs the alum flower quality level. The trend determination module is used to acquire process parameters collected in real time by the process parameter acquisition system, and to calculate the process parameter change rate and determine the quality change trend based on the process parameters. The output module is used to input the quality grade of the alum floc, the rate of change of the process parameters, the clarity of the outline, and the trend of quality change to the second-level fuzzy controller, which performs fuzzy inference based on the second rule base and outputs the dosage adjustment amount. The adjustment module is used to generate a dosing control command based on the dosing adjustment amount, and send the dosing control command to the dosing actuator to adjust the flocculant dosage.

8. The control system for water treatment flocculation effect identification and dosage optimization according to claim 7, characterized in that, The trend determination module includes: The acquisition unit is used to acquire process parameters in real time through the process parameter acquisition system and obtain the process parameter values ​​at the current moment. The calculation unit is used to calculate the rate of change of the process parameters based on historical process parameter data; The recognition unit is used to obtain the outline clarity at the current moment in real time through the image recognition system; The determining unit is used to obtain the alum floc quality level at multiple consecutive historical moments from the historical output of the first-level fuzzy controller, and to determine the quality change trend based on the historical alum floc quality level data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.