Flocculant intelligent dosing optimization method and system based on multi-stage dynamic regulation
By employing a multi-stage dynamic control method for intelligent flocculant dosing, the flocculation process is identified in real time. Key indicators are predicted using machine learning and physicochemical constraints, and combined with a multi-objective optimization algorithm. This method solves the problems of reagent waste and high treatment costs during the flocculation process, achieving efficient and economical flocculant dosing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2026-06-09
- Publication Date
- 2026-07-07
AI Technical Summary
Existing flocculant dosing control methods neglect the dynamic and phased nature of the flocculation process, cannot adapt to the different needs of each stage, and fail to effectively balance the complex interactions and optimization objectives among multiple factors, resulting in waste of reagents or high treatment costs.
A multi-stage dynamic control method for intelligent flocculant dosing is adopted. By collecting data in real time to identify the stages of the flocculation process, using machine learning sub-models and physicochemical constraint equations to predict key indicators, and combining multi-objective optimization algorithms and fuzzy membership degree selection mechanisms, intelligent flocculant dosing is achieved.
It improves control precision and adaptability, reduces reagent costs, enhances sludge dewatering performance, and achieves comprehensive cost optimization and automated control across the entire chain.
Smart Images

Figure CN122344012A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater treatment, and in particular to a method and system for optimizing intelligent flocculant dosing based on multi-stage dynamic control. Background Technology
[0002] In water supply and wastewater treatment processes, flocculation is a crucial step in removing suspended solids, colloids, and some dissolved substances. The dosage and dosing strategy of flocculants directly determine the effluent quality, operating costs, and the difficulty of subsequent sludge treatment.
[0003] Traditional flocculant dosing control methods are mainly based on static empirical formulas, feedback from single-point water quality indicators (such as raw water turbidity), or simple dosage range settings. These methods have the following inherent defects: 1. Ignoring the dynamics and stages of the flocculation process: The flocculation process includes stages with distinct physicochemical mechanisms, such as rapid mixing, floc growth, and settling stabilization. Traditional methods use a single control strategy, which cannot adapt to the different needs of each stage, easily leading to waste of reagents or poor results. 2. Ignoring the complex interactions between multiple factors: When using composite flocculants or when water quality conditions (pH, temperature) change, there are nonlinear synergistic or antagonistic effects between various factors, which simple linear models cannot accurately describe, leading to inaccurate control. 3. Single and fragmented optimization objectives: Usually, only effluent turbidity is used as the optimization objective, without incorporating conflicting important economic and technical indicators such as reagent cost and sludge properties (such as moisture content) into a unified optimization framework, which may lead to high overall treatment costs or difficulties in sludge dewatering.
[0004] In existing technologies, although some studies have attempted to introduce sensors or machine learning models for prediction, most of them still only establish a single mapping relationship between "dosage and final effluent turbidity". They lack in-depth characterization and constraints on the intrinsic physicochemical mechanism of flocculation, resulting in weak model generalization ability and single decision-making dimension, making it difficult to achieve stable, economical and efficient whole-process optimization in actual complex and variable water treatment scenarios. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the technical problem to be solved by the present invention is to provide a method and system for intelligent flocculant dosing optimization based on multi-stage dynamic control. This method and system are based on intelligent dosing decision-making through segmented identification of flocculation kinetics, quantification of multi-factor synergistic effects, and balancing of multi-objective conflicts.
[0006] This invention is achieved by the following technical solution: a method for optimizing intelligent flocculant dosing based on multi-stage dynamic control, comprising the following steps: S1. Real-time acquisition of time-series data reflecting the state of the flocculation process, and determination of the current stage of the flocculation process through a preset stage identification model or rule, wherein the stage includes at least a rapid mixing stage, a growth stage and a settling stabilization stage; S2. Based on the current stage identified in S1, call the pre-established machine learning sub-model and corresponding physicochemical constraint equations for that stage, input the current water quality parameters and process parameters, and predict the key indicators for that stage. S3. Establish a multi-objective comprehensive objective function, and use the key indicator thresholds obtained in S2 and the predicted values of sludge dewatering performance indicators as constraints. Then, use a multi-objective optimization algorithm to solve for the optimal flocculant type and dosage. The predicted values of sludge dewatering performance indicators are output by a sludge dewatering performance prediction model that includes a construction interaction term. S4. Execute the decision parameters obtained from S3, and return to S1 in subsequent processes to form a closed-loop rolling optimization.
[0007] Furthermore, the sub-model of the rapid mixing section described in S2 uses flocculant charge density and initial Zeta potential. g With 0 as the core input and the degree of electrical neutralization as the optimization objective, the dosage output by the prediction model must satisfy the hard boundary constraint |ζ. 实时 |≤5mV, the model structure introduces a nonlinear transfer function of charge demand-feed amount. D = f ( Q in , g 0, C PAC This function includes a correction term for the proportion of polynuclear hydroxyl complexes in PAC hydrolysis products to adapt to water quality with different alkalinity.
[0008] Furthermore, the sub-model of the growth section described in S2 uses flocculant molecular weight, current dosage, and velocity gradient. G Using the flocculent two-dimensional fractal dimension as the core input. D f To optimize the target, image analysis is used to extract... D f The constraint condition is set to 1.6≤ D f ≤2.3. When predicting D f When the concentration is less than 1.6, it is identified as a "loose dendritic structure" risk, triggering a coagulant replenishment strategy.
[0009] Furthermore, the sub-model of the settling stability section described in S2 uses the fractal dimension of the flocs. D f The core input is the shearing history, and the optimization target is the turbidity of the supernatant or the sedimentation rate.
[0010] Furthermore, the steps in S3 for calculating the optimal flocculant type and dosage include: first, using a multi-objective optimization algorithm to obtain the Pareto optimal solution set; then, introducing an automatic compromise solution selection mechanism based on fuzzy membership to calculate the satisfaction function at each point on the frontier. Automatically select max(min( m 1, m 2, m 3)) The corresponding solution is used as the recommended addition scheme.
[0011] Furthermore, the comprehensive objective function of the multiple objectives in S3 is as follows: the first objective is the effluent quality, the second objective is the reagent cost, and the third objective is the sludge dewatering performance.
[0012] Furthermore, the sludge dewatering performance prediction model is trained and outputs predicted values of sludge dewatering performance indicators. The specific steps are as follows: 1) Feature construction: Based on the original feature set *X={x1, x2, ..., xm}*, perform interaction term feature operations on all or selected features to generate interaction term features; 2) Construct an initial sludge dewatering performance prediction model. Use the original features and all constructed interaction term features as input to train the prediction model, so that the prediction model learns the independent contribution of each interaction term to the target variable, and obtain the trained sludge dewatering performance prediction model. 3) Input the feature input set into the trained sludge dewatering performance prediction model and output the predicted values of the sludge dewatering performance index.
[0013] Furthermore, the rapid mixing section is dominated by colloidal destabilization and charge neutralization, the growth section is dominated by adsorption bridging and floc aggregation growth, and the sedimentation stabilization section is dominated by floc compaction and gravity sedimentation.
[0014] Furthermore, the time-series data includes at least one of stirring power, floc image feature value, Zeta potential, and supernatant turbidity, and the sludge dewatering performance index includes the predicted value of sludge cake moisture content, sludge specific resistance, capillary water absorption time, or sludge cake volume after dewatering.
[0015] Furthermore, a flocculant dosing optimization system based on a multi-stage dynamic control method includes a data sensing module, a stage identification module, a multi-model prediction module, a multi-objective optimization decision module, and a control execution module. The data sensing module acquires water quality parameters, process state parameters, and image data in real time. The stage identification module embeds mechanism-data hybrid driven identification logic, which calculates the real-time decay gradient dNpdt of the power criterion Np and the rate of change of Zeta potential to output the current flocculation stage label and confidence level. The multi-model prediction module embeds machine learning sub-models bound to each stage and a sludge dewatering performance prediction model, wherein the feature input set of the sludge dewatering performance prediction model includes original features and constructed interaction terms. The multi-objective optimization decision module has built-in three-objective comprehensive function and multi-objective optimization algorithm, with the output of the prediction module as a constraint, and has built-in fuzzy membership degree automatic solution selection logic. The control execution module is connected to the multi-objective optimization decision module and is used to convert the decision scheme into control commands and execute them.
[0016] Beneficial effects of this invention: 1. The control accuracy and adaptability are significantly improved. The switching of flocculation stage is identified by the power metric gradient, avoiding the blindness of traditional timed control. The segmented binding mechanism constraint model makes the control strategy closely follow the essence of flocculation dynamics.
[0017] 2. Enhanced robustness and interpretability of the model: By introducing fractal dimension constraints and SHAP interaction effect analysis, the model can not only provide predicted values, but also explain whether the agents are synergistic or antagonistic, making it easier for on-site process personnel to understand and adjust.
[0018] 3. The overall cost of the entire chain is optimal. For the first time, sludge dewatering performance (such as the moisture content of sludge cake) is incorporated into a unified framework as an independent optimization target, which effectively solves the industrial pain point of water quality meeting standards but sludge being difficult to treat, and reduces the overall cost of sludge transportation and disposal.
[0019] 4. High degree of automation, with a built-in fuzzy membership degree automatic solution selection mechanism, reducing the need for manual intervention and realizing closed-loop intelligent control from perception, recognition, prediction to decision execution. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating an optimized method for intelligent flocculant dosing based on multi-stage dynamic control. Figure 2 A segmented schematic diagram of the flocculation kinetics process is provided, showing the division of the rapid mixing stage, growth stage, and sedimentation stabilization stage on the time axis and their respective dominant mechanisms. Figure 3 This is a schematic diagram illustrating the working principle of the multi-objective optimization decision module provided in this embodiment of the invention (including Pareto front and fuzzy membership degree selection logic). Detailed Implementation
[0021] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0022] Reference Figure 1-Figure 3 As shown, this invention provides a method for optimizing intelligent flocculant dosing based on multi-stage dynamic control, the steps of which are as follows: S1. Data Acquisition and Stage Identification.
[0023] Real-time time-series data reflecting the state of the flocculation process is collected. Using a preset stage identification model or rules, the current stage of the flocculation process is determined. The stages include at least a rapid mixing stage, a growth stage, and a settling stabilization stage. The time-series data includes at least one of the following: stirring power, floc image feature values, zeta potential, and supernatant turbidity. The time-series data may also include ultrasonic attenuation spectroscopy (for monitoring floc particle size distribution), focused beam reflectance measurement (FBRM), or an online laser particle size analyzer.
[0024] The current flocculation process is in at least the following stages: 1) Rapid mixing stage: dominated by colloid destabilization and charge neutralization; 2) Growth stage: dominated by adsorption bridging and floc aggregation growth; 3) Settling stabilization stage: dominated by floc compaction and gravity settling.
[0025] The flocculation stage identification model or rule can be based on the power criterion decay gradient. The stage identification model embeds mechanism-data hybrid driving identification logic, which calculates the real-time decay gradient of the power criterion Np. The zeta potential change rate is used to output the current flocculation stage label and confidence level. The specific determination steps are as follows: a. Power number N p calculate.
[0026] By collecting the real-time current I (unit: A) and rotational speed n (unit: r / s) of the stirrer, the stirring power P is first calculated as: P = K · I · n (where K is the motor constant). Considering the mechanical losses in the process of transferring shaft power to the fluid, the actual effective power P used for fluid stirring is... fluid Slightly smaller than P, it is usually approximated in the power metric formula in engineering calculations: N p = P fluid / (ρ · n 3 · D 5Where ρ is the fluid density (unit: kg / m³), n is the impeller speed (unit: r / s, i.e., ω), and D is the impeller diameter (unit: m). During the flocculation process, N p The change reflects the change in fluid viscosity.
[0027] b. Determination of the end of the rapid mixing segment.
[0028] calculate Np The first derivative with respect to time t (i.e., the instantaneously decaying gradient) .when < -0.05 s -1 If this state is maintained for 5 sampling cycles, it is determined to be a pre-trigger signal for the end of the rapid mixing phase. This signal reflects that the fluid viscosity change caused by the drug injection has been completed.
[0029] c. Determining the start and end of the growth segment.
[0030] Start: After the pre-trigger signal, the absolute value of the Zeta potential was detected to drop to |ζ. 实时 | ≤ 5mV (neutralization complete), and If the power approaches 0 (power stable), then it is determined to have entered the growth stage. Wherein, ζ 实时 It is the real-time detected Zeta potential, measured in mV (millivolts).
[0031] Conclusion: When the two-dimensional fractal dimension of flocs was detected through image analysis D f growth rate The first occurrence of a negative value (i.e., the flocs begin to break up after reaching their maximum size), or the cumulative velocity gradient. Gt If the value exceeds a preset threshold (e.g., 20000), the growth segment is considered to have ended.
[0032] d. Determination of the settlement stability zone.
[0033] Once the system enters the settling and stabilization phase, the stirring intensity is reduced or stopped. The criterion for judgment is the rate of decrease in the turbidity of the supernatant. (Where Turb is turbidity) remains negative and its absolute value is less than a certain small threshold (e.g., 0.1 NTU / s, turbidity unit / second) until the turbidity stabilizes, indicating that the flocs have settled sufficiently.
[0034] S2: Segmented constraint invocation and prediction.
[0035] Based on the current stage identified by S1, the machine learning sub-model and corresponding physicochemical constraint equations pre-established for that stage are invoked, and the current water quality parameters and process parameters are input to predict the key indicators for that stage.
[0036] The sub-models at different stages focus on different physicochemical mechanisms and optimization objectives: S21. Sub-model of the rapid mixing section: based on flocculant charge density, initial Zeta potential g The core input is 0, and the optimization objective is the degree of electrical neutralization. The dosage output by the prediction model must satisfy the hard boundary constraint |ζ. 实时 |≤5mV, the model structure introduces a nonlinear transfer function of charge demand-feed amount. D = f ( Q in , g 0, C PAC This function includes a correction term for the proportion of polynuclear hydroxyl complexes in PAC hydrolysis products to adapt to water with different alkalinity levels. D It is the charge requirement of the flocculant, expressed in mol / m³ or equivalent stoichiometry; Q in It is the inflow rate, in m³ / h (cubic meters per hour). g 0 represents the initial Zeta potential (before flocculant addition), in mV; C PAC This refers to the concentration or dosage of polyaluminum chloride (PAC), expressed in mg / L or g / m³.
[0037] S22. Sub-model of the growth section: based on flocculant molecular weight, current dosage, and velocity gradient. G Using the flocculent two-dimensional fractal dimension as the core input. D f To optimize the objective, image analysis was used to extract... D f The constraint condition is set to 1.6≤ D f ≤2.3. When predicting D f When the concentration is less than 1.6, it is classified as a "loose, dendritic structure" risk, triggering a coagulant replenishment strategy. Among these, D f It is the two-dimensional fractal dimension of flocs, dimensionless, used to characterize the density and branching degree of floc structure. This sub-model introduces the fractal dimension. D f The morphological constraints of the growth stage, the fractal dimension is directly related to the density and shear resistance of the flocs, and its physical meaning is clear. It can effectively guide the coordinated adjustment of stirring intensity and coagulant addition, which is different from the traditional method that only focuses on floc particle size.
[0038] S23. Sub-model of the settling stabilization section: based on the fractal dimension of the flocs. D fShear history (preferably cumulative velocity gradient) Gt The core input is ), and the optimization objective is either the turbidity of the supernatant or the sedimentation rate. G Velocity gradient, in seconds -1 It is determined by the stirring intensity. ( m For fluid dynamic viscosity, V (where t is the volume of the mixing tank) and t is the mixing duration in seconds (s). G t It is the cumulative velocity gradient (Camp number), dimensionless, characterizing the total shear history experienced by the floc. This reflects the total shear force experienced by the flocs throughout the entire flocculation process.
[0039] S3. Multi-objective collaborative optimization decision-making.
[0040] Based on multi-objective collaboration, decision parameters are output. The specific steps are as follows: S31. Establish a multi-objective comprehensive objective function, where the optimization objectives are: the first objective is the effluent quality, the second objective is the reagent cost, and the third objective is the sludge dewatering performance.
[0041] S32. And the key indicator thresholds obtained from the current stage prediction sub-model in S2 (such as neutralization completion rate ≥85%, fractal dimension) D f The predicted values of ≥1.6 and the sludge dewatering performance index characterizing the third objective are used together as constraints. The predicted values of the sludge dewatering performance index are output by the sludge dewatering performance prediction model containing constructed interaction terms. The sludge dewatering performance index includes the predicted value of cake moisture content, sludge specific resistance, capillary water absorption time, or dewatered cake volume.
[0042] The above-mentioned sludge dewatering performance prediction model, which includes interaction terms, is trained and outputs predicted values of sludge dewatering performance indicators. The specific steps are as follows: 1) Feature construction: Based on the original feature set *X={x1, x2, ..., xm}* (such as PAC dosage, PAM dosage, pH, temperature, etc.), interaction term feature operations are performed on all or selected features to generate interaction term features. For example: x_PAC · x_PAM, x_PAC · x_pH. Preferably, the interaction term feature operation method constructs feature interaction terms through multiplication, performing multiplication on (xi, xj) to generate the interaction term feature xij = xi · xj. Other interaction term feature operation methods include the logarithm of the ratio (ln(x1 / x2)), polynomial combination (x1^2*x2), or automatic feature crossing based on kernel methods (such as FM factorization machine). Alternatively, feature crossing layers in neural networks (such as DeepCrossing) can be used to automatically learn higher-order interactions. 2) Construct an initial sludge dewatering performance prediction model (such as XGBoost), take the original features and all constructed interaction term features as input, train the sludge dewatering performance prediction model, so that the prediction model learns the independent contribution of each interaction term to the target variable (such as cake moisture content), and obtain the trained sludge dewatering performance prediction model. 3) Input the feature input set into the trained sludge dewatering performance prediction model and output the predicted values of the sludge dewatering performance indicators. The feature input set consists of the original features of the current stage (such as PAC dosage, PAM dosage, pH, temperature, etc.) and constructed interaction terms (x_PAC · x_PAM, x_PAC · x_pH, etc.).
[0043] The sludge dewatering performance prediction model, once trained, allows for the quantification of the interaction effects of each pair of factors. Experiments show that after adding the interaction term, the model's R² for predicting cake moisture content increased from 0.72 to 0.89. Especially when dealing with the boundary conditions of high PAC addition and low pH, it can accurately capture the phenomenon of increased moisture content caused by the obstruction of floc-bound water release.
[0044] S33. A multi-objective optimization algorithm is used to solve for the optimal flocculant type and dosage. The process pain point of "excessive PAC addition causing a surge in sludge cake moisture content" is clearly quantified. By solving the Pareto front and applying fuzzy membership for automatic solution selection, a global balance is achieved without manual intervention, ensuring effluent compliance, economical chemical consumption, and easy sludge dewatering.
[0045] Specifically, the steps for calculating the optimal flocculant type and dosage include: first, using a multi-objective optimization algorithm (such as NSGA-II) to obtain the Pareto optimal solution set; then, introducing an automatic compromise solution selection mechanism based on fuzzy membership to calculate the satisfaction function at each point on the frontier. Automatically select max(min( m 1, m 2, m 3)) The corresponding solution is used as the recommended addition scheme. Wherein, μk It is the first k The satisfaction (membership degree) of each objective, with a value range of [0,1]; fk Is the current solution at the th k The actual function value on each target; It is the first on the frontier of Pareto k The maximum value of each objective; It is the first on the frontier of Pareto k The minimum value of each objective.
[0046] Where, max(min( m 1, m 2, m 3)) The corresponding solutions specifically include: each solution on the Pareto front (i.e., a combination of PAC / PAM dosage and stirring intensity) corresponds to the satisfaction of three objectives: μ1: Satisfaction with the goal of minimizing effluent turbidity (the larger the better, because the lower the turbidity, the higher the μ1). μ2: Satisfaction with the goal of minimizing drug costs (the higher the better, because the lower the cost, the higher the μ2); μ3: Satisfaction with the goal of minimizing the moisture content of the mud cake (the larger the better, because the lower the moisture content, the higher the μ3).
[0047] min(μ1,μ2,μ2) represents the lowest satisfaction among the three objectives of the solution, which is the "weakest link" of the solution (i.e., the aspect that performs the worst among the three objectives); max(min(μ1,μ2,μ3)) is to take the maximum value of the "weakest link" of all Pareto solutions, that is, to find the "worst performing solution" among all solutions.
[0048] The preferred multi-objective optimization algorithm is NSGA-II, but MOEA / D (a decomposition-based multi-objective evolutionary algorithm), multi-objective particle swarm optimization (MOPSO), or a preference-based weighted summation method (which requires pre-determining weights and is suitable for scenarios with explicit preferences) can also be used. If computational resources are limited, grid search or Bayesian multi-objective optimization can also be employed.
[0049] S4. Execution and Feedback.
[0050] The decision parameters obtained from S3 are executed, and S1 is returned in subsequent processes to form a closed-loop rolling optimization.
[0051] Furthermore, the present invention also relates to a dosing system based on the above-mentioned intelligent flocculant dosing optimization method based on multi-stage dynamic control, including a data sensing module, a stage identification module, a multi-model prediction module, a multi-objective optimization decision-making module, and a control execution module.
[0052] The data sensing module acquires water quality parameters, process status parameters, and image data in real time. The stage identification module embeds mechanism-data hybrid driven identification logic, calculating the real-time decay gradient dNpdt of the power criterion Np and the rate of change of the Zeta potential to output the current flocculation stage label and confidence level. The multi-model prediction module embeds machine learning sub-models bound to each stage and a sludge dewatering performance prediction model. The feature input set of the sludge dewatering performance prediction model includes original features and constructed interaction terms. The constructed interaction terms consist of the product of the dosages of the two flocculants. x i⋅ x j The constructed interaction terms include the logarithm of the ratio (ln(x1 / x2)), polynomial combination (x1^2*x2), or automatic feature crossing based on kernel methods (such as FM factorization machine). Higher-order interactions can also be automatically learned using feature crossing layers in neural networks (such as DeepCrossing). The multi-objective optimization decision module has the built-in three-objective synthesis function and multi-objective optimization algorithm, using the output of the prediction module as a constraint, and includes built-in fuzzy membership degree automatic solution selection logic. The control execution module is connected to the multi-objective optimization decision module and is used to convert the decision scheme into control commands and execute them.
[0053] Example 1: In a practical application at a water plant, the system and method described above are used for multi-objective optimization decision-making based on the NSGA-II algorithm. The raw water quality parameters are collected in real-time by online sensors. The specific steps are as follows: S1. The stage identification module calculates the stirring power coefficient. Np Real-time gradient It captures abrupt changes in fluid viscosity. When a rapid decay and leveling of the gradient is detected, a phase switching signal is output.
[0054] S2. In the fast mixing section, the fast mixing sub-model is invoked. This model is a constrained support vector regression (SVR) model, with the initial zeta potential as input. g 0 (e.g., -22mV), influent flow rate, PAC charge density, output to satisfy constraints | g 实时 Minimum PAC dosage ≤ 5mV.
[0055] In the growth phase, the growth phase sub-model is invoked. The inputs to this model are the PAC dosage, PAM dosage, and velocity gradient.G The output is the predicted fractal dimension of the flocs. Df If prediction Df If the value is less than 1.8, the system will automatically increase the PAM dosage ratio to enhance the bridging effect.
[0056] The sludge dewatering performance prediction model uses XGBoost, and the input features include original features and constructed interaction terms (such as...). x PAC · x PAM The model outputs the predicted moisture content of the mud cake in real time.
[0057] S3. The multi-objective optimization decision module uses NSGA-II to solve for the Pareto front. The three objective functions are as follows: f 1 = Minimize effluent turbidity. f 2 = Minimize drug costs. f 3 = Minimize the moisture content of the mud cake. After the solution is completed, the fuzzy membership degree of each point on the front is automatically calculated, and the maximum (min) value is selected. m 1, m 2, m 3) The corresponding PAC / PAM combination and stirring intensity are issued as the optimal settings for execution.
[0058] The formula for the fuzzy membership function is as follows:
[0059] μk : No. k The satisfaction (membership degree) of each objective, with a value range of [0,1]; fk The current solution is at the th position. k The actual function value on each target; Pareto Frontier k The maximum value of each objective; Pareto Frontier k The minimum value of each objective.
[0060] Example 2: The difference from Example 1 is in the specific implementation of interactive item modeling.
[0061] Specifically, when constructing the sludge dewatering performance prediction model, the original input features include: PAC dosage (x1), anionic PAM dosage (x2), cationic PAM dosage (x3), pH (x4), and temperature (x5). To quantify synergistic / antagonistic effects, the following interaction term features are constructed: x1*x2 (interaction between PAC and anionic PAM); x1*x3 (interaction between PAC and cationic PAM); x1*x4 (PAC and pH interaction); x2*x4 (interaction between PAM and pH); x2*x3 (The interaction of the two PAMs may produce antagonism).
[0062] The original features and interaction terms were input together into the XGBoost model for training. Experiments showed that the model including interaction terms improved the R² of predicting cake moisture content from 0.72 to 0.89. Especially under the boundary conditions of high PAC dosage and low pH, the model was able to accurately capture the increase in moisture content caused by the obstruction of floc-bound water release, while the model without interaction terms showed a serious underestimation.
[0063] Example 3: It is basically the same as Example 1 and Example 2, except that the specific implementation of the stage identification module is different.
[0064] Specifically, the stage identification module (corresponding to step S1) can be implemented using a weighted scoring method based on expert rules or a machine learning model based on time-series classification. The following provides a highly robust rule implementation example that can be tuned on-site.
[0065] I. Rule Design and Feature Extraction.
[0066] The following characteristics are calculated in real time using a sliding window (e.g., 20 seconds) based on four sensor signals: stirring power, average floc size, Zeta potential, and supernatant turbidity: Current value and recent moving average (smoothed noise); Signal change slope (linear regression slope); Signal fluctuation standard deviation; Based on the flocculation kinetic mechanism, a set of sub-conditional score functions are defined for each stage, and the membership degree between 0 and 1 is used to represent them:
[0067] The scores of each sub-condition are summed according to preset weights to obtain the confidence vector [conf0, conf1, conf2] for the three stages at each time step.
[0068] II. Anti-shake and stage switching logic.
[0069] To prevent frequent jumps caused by noise, the following mechanism is set up: Minimum dwell time: After a phase switch, a minimum of 10 seconds (configurable) must be maintained before another switch is allowed; Lag threshold: The confidence level of the new stage must be higher than the confidence level of the current stage by a preset difference (e.g., 0.15) before switching.
[0070] The system is initially set to a fast mixed segment during startup (if less than 30 seconds).
[0071] III. Parameter Configuration and Interface Key thresholds (such as power decay rate threshold, particle size growth rate threshold, weighting coefficient, minimum residence time, etc.) are defined through configuration files (such as YAML format), which facilitates rapid adjustment under different water plant or process conditions without modifying the core code.
[0072] The module provides a unified interface to the outside world. A code example is shown below: Python def identify_stage(sensor_data: dict) -> int: """ Input: A sensor data dictionary containing the current time and historical data sequences. Output: Stage labels 0 (rapid mixing stage), 1 (growth stage), 2 (sedimentation stabilization stage) """
[0073] IV. Verification Results Tests were conducted on measured data from three different raw water conditions: low turbidity, high turbidity, and variable temperature. The accuracy of stage identification exceeded 92% (with an allowable lag error within 5 seconds), and the stage switching frequency was less than once per minute, meeting the actual control stability requirements.
[0074] Example 4: It is basically the same as Example 2, except that: based on the prediction model containing interaction terms constructed in Example 2, in order to further quantify and explain the synergistic or antagonistic effects among multiple factors, the following method can be used to extract interaction information from the model.
[0075] I. Direct Interpretation of Linear Model Coefficients.
[0076] Specifically, for linear regression models with interaction terms: y = β 0+ β 1 x 1+ β 2 x 2+ β 4 x 4+ β 12 ( x 1 x 2)+ β 14 ( x 1 x 4)+… If the interaction term coefficient β 12If β > 0 and is statistically significant, then x1 and x2 have a synergistic effect; if β 12 If <0, it indicates an antagonistic effect.
[0077] Example: In the prediction of sludge cake moisture content, if the interaction coefficient between PAC dosage x1 and anionic PAM dosage x2 is negative, it indicates that the combined use of the two can reduce the moisture content (synergistically improve dehydration); if the interaction coefficient with pH is positive, then low pH will weaken the effect of PAC (antagonistic).
[0078] The pseudocode implementation example is as follows: Python import statsmodels.api as sm import pandas as pd # Construct the feature matrix (including original features and interaction terms) X = df[['PAC', 'PAM_anion', 'pH']].copy() X['PAC_PAM'] = X['PAC'] * X['PAM_anion'] X['PAC_pH'] = X['PAC'] * X['pH'] X['PAM_pH'] = X['PAM_anion'] * X['pH'] X = sm.add_constant(X) # Fitting a linear model model = sm.OLS(y, X).fit() print(model.summary()) # Extract interaction term coefficients and determine effects interaction_terms = ['PAC_PAM', 'PAC_pH', 'PAM_pH'] for term in interaction_terms: coef = model.params[term] p_val = model.pvalues[term] if p_val < 0.05: effect = "synergistic" if coef < 0 else "antagonistic" # Note: Lower moisture content is better; negative coefficient indicates synergy. print(f"{term}: coefficient={coef:.4f}, effect={effect}") else: print(f"{term}: No significant interaction effect")
[0079] II. SHAP Interaction Value Analysis Method Based on XGBoost Specifically, calculate the SHAP interaction value matrix. , indicating features i and j Additional contribution to prediction when they work together.
[0080] Observe the interaction trend through SHAP dependency graph: Draw the SHAP main effect graph of PAC dosage and color it according to PAM dosage. If the slope of the curve becomes more negative as PAM increases, it is a synergistic effect.
[0081] Global interaction strength available Quantification.
[0082] The code example is as follows: Python import xgboost as xgb import shap import numpy as np # Training an XGBoost model (features include interaction terms) model = xgb.XGBRegressor(n_estimators=100, max_depth=5) model.fit(X_train, y_train) # Create a SHAP interpreter explainer = shap.TreeExplainer(model) shap_values = explainer.shap_values(X_test) shap_interaction = explainer.shap_interaction_values(X_test) # Interaction value matrix [number of samples, number of features, number of features] # Calculate the global interaction strength between feature pairs 'PAC' and 'PAM_anion' feat_names = X_test.columns.tolist() idx1, idx2 = feat_names.index('PAC'), feat_names.index('PAM_anion') inter_strength = np.mean(np.abs(shap_interaction[:, idx1, idx2])) print(f"Global interaction strength between PAC and PAM: {inter_strength:.4f}") # Draw a SHAP dependency graph (showing interaction effects) shap.dependence_plot( ind='PAC', shap_values=shap_values, features=X_test, interaction_index='PAM_anion', show=False )
[0083] III. Quantitative Indicators of Synergy Coefficient.
[0084] Define the synergy coefficient:
[0085] If S ij >1 represents collaboration, S ij <1 indicates antagonism. Example: Under certain operating conditions, the synergistic coefficient between PAC and anionic PAM is 1.35.
[0086] Among them, S ij It is a feature x i and x j The synergy coefficient between them is dimensionless; S ij >1 indicates collaboration, S ij <1 indicates antagonism; x i , x j These are the i-th and j-th characteristic variables (such as PAC dosage, PAM dosage, pH, etc.). , It is a feature x iHigh-level and low-level values (such as the upper and lower limits of the dosage). f (•) is the target value (such as the moisture content of the cake) output by the prediction model (such as the sludge dewatering performance model).
[0087] IV. Investment Strategy Guidance.
[0088] Specifically, the process rules are adjusted based on the extracted interaction effects: PAC × Anionic PAM Synergistic Effect → Proportional Co-doping; PAC × pH antagonism → When pH < 6.5, prioritize adjusting the pH to the neutral range, and then optimize the PAC dosage; Cationic PAM × Anionic PAM antagonism → Avoid simultaneous high-dose administration.
[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for optimizing intelligent flocculant dosing based on multi-stage dynamic control, characterized by the following steps: as follows: S1. Real-time acquisition of time-series data reflecting the state of the flocculation process, and determination of the current stage of the flocculation process through a preset stage identification model or rule, wherein the stage includes at least a rapid mixing stage, a growth stage and a settling stabilization stage; S2. Based on the current stage identified in S1, call the pre-established machine learning sub-model and corresponding physicochemical constraint equations for that stage, input the current water quality parameters and process parameters, and predict the key indicators for that stage. S3. Establish a multi-objective comprehensive objective function, and use the key indicator thresholds obtained in S2 and the predicted values of sludge dewatering performance indicators as constraints. Then, use a multi-objective optimization algorithm to solve for the optimal flocculant type and dosage. The predicted values of sludge dewatering performance indicators are output by a sludge dewatering performance prediction model that includes a construction interaction term. S4. Execute the decision parameters obtained from S3, and return to S1 in subsequent processes to form a closed-loop rolling optimization.
2. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 1, characterized in that: S2 The sub-model of the rapid mixing section described in the paper uses flocculant charge density and initial Zeta potential. ζ With 0 as the core input and the degree of electrical neutralization as the optimization objective, the dosage output by the prediction model must satisfy the hard boundary constraint |ζ. 实时 |≤5mV, the model structure introduces a nonlinear transfer function of charge demand-feed amount. D = f ( Q in , ζ 0, C PAC This function includes a correction term for the proportion of polynuclear hydroxyl complexes in PAC hydrolysis products.
3. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 1 or 2, characterized in that: S2 The sub-model of the growth stage described in the text uses flocculant molecular weight, current dosage, and velocity gradient. G Using the flocculent two-dimensional fractal dimension as the core input. D f To optimize the target, image analysis is used to extract... D f The constraint condition is set to 1.6≤ D f ≤2.3, when predicting D f When the concentration is less than 1.6, it is identified as a "loose dendritic structure" risk, triggering a coagulant replenishment strategy.
4. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 3, characterized in that: S2 The sub-model of the settling stability section described in the paper uses the fractal dimension of the flocs. D f The core input is the shearing history, and the optimization target is the turbidity of the supernatant or the sedimentation rate.
5. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 1, 2, or 4, characterized in that: S3 The steps for calculating the optimal flocculant type and dosage include: first, using a multi-objective optimization algorithm to obtain the Pareto optimal solution set; then, introducing an automatic compromise solution selection mechanism based on fuzzy membership degrees to calculate the satisfaction function at each point on the frontier. Automatically select max(min( μ 1, μ 2, μ 3)) The corresponding solution is used as the recommended addition scheme.
6. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 5, characterized in that: The comprehensive objective function of the multiple objectives in S3 has the following objectives: the first objective is the effluent quality, the second objective is the reagent cost, and the third objective is the sludge dewatering performance.
7. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 6, characterized in that: The specific steps for training the sludge dewatering performance prediction model and outputting predicted values of sludge dewatering performance indicators are as follows: 1) Feature construction: Based on the original feature set *X={x1, x2, ..., xm}*, perform interaction term feature operations on all or selected features to generate interaction term features; 2) Construct an initial sludge dewatering performance prediction model. Use the original features and all constructed interaction term features as input to train the prediction model, so that the prediction model learns the independent contribution of each interaction term to the target variable, and obtain the trained sludge dewatering performance prediction model. 3) Input the feature input set into the trained sludge dewatering performance prediction model and output the predicted values of the sludge dewatering performance index.
8. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 1, 2, 4, 6, or 7, characterized in that: The rapid mixing section is dominated by colloid destabilization and charge neutralization; the growth section is dominated by adsorption bridging and floc aggregation growth; and the sedimentation stabilization section is dominated by floc compaction and gravity sedimentation.
9. The intelligent flocculant dosing optimization method based on multi-stage dynamic control according to claim 8, characterized in that: The time-series data includes at least one of stirring power, floc image feature value, Zeta potential, and supernatant turbidity. The sludge dewatering performance indicators include predicted sludge cake moisture content, sludge specific resistance, capillary water absorption time, or sludge cake volume after dewatering.
10. A flocculant dosing optimization system based on the multi-stage dynamic control-based intelligent flocculant dosing optimization method described in claim 1, characterized in that: The system comprises a data sensing module, a stage identification module, a multi-model prediction module, a multi-objective optimization decision-making module, and a control execution module. The data sensing module acquires water quality parameters, process state parameters, and image data in real time. The stage identification module embeds mechanism-data hybrid driven identification logic, calculating the real-time decay gradient dNpdt of the power criterion Np and the Zeta potential change rate to output the current flocculation stage label and confidence level. The multi-model prediction module embeds machine learning sub-models bound to each stage and a sludge dewatering performance prediction model, where the feature input set of the sludge dewatering performance prediction model includes original features and constructed interaction terms. The multi-objective optimization decision-making module incorporates the three-objective comprehensive function and multi-objective optimization algorithm, using the output of the prediction module as constraints, and includes built-in fuzzy membership degree automatic solution selection logic. The control execution module connects to the multi-objective optimization decision-making module and is used to convert decision schemes into control commands for execution.