Calcium salt dosing control method and system based on historical operation data and online learning
Patent Information
- Application Number
- CN202610825806.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-09
- Publication Date
- 2026-09-15
Smart Images

Figure CN122755419A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fluoride-containing wastewater treatment technology, and in particular to a calcium salt dosing control method and system based on historical operating data and online learning. Background Technology
[0002] In current engineering practice, chemical precipitation is widely used in the treatment of fluoride-containing wastewater due to its mature technology, stable treatment effect, and strong adaptability. This method typically involves adding calcium salts to the fluoride-containing wastewater, causing fluoride ions in the wastewater to react with calcium ions to form insoluble precipitates, which are then removed through coagulation, flocculation, and solid-liquid separation, thereby reducing the fluoride concentration in the effluent. A defluoridation system generally consists of reaction, precipitation, dosing, and online monitoring units, and the system's operational effectiveness largely depends on the proper control of the dosage.
[0003] To ensure that the effluent fluoride concentration remains stable and meets standards, existing defluoridation systems mostly employ dosing control methods based on manual experience or simple feedback adjustment. For example, a fixed dosing ratio is set based on experience with the influent water quality, or the dosing amount is manually adjusted or PID-regulated based on the deviation between the effluent fluoride ion concentration and the set value. While this type of control method is simple to implement, it has significant limitations in actual operation.
[0004] On the one hand, the defluoridation process is influenced by a variety of factors, including influent fluoride concentration, pH value, flow rate, hydraulic retention time, and coexisting ions, resulting in significant nonlinear and multivariate coupling characteristics. On the other hand, defluoridation systems typically consist of multiple reaction units connected in series, with long hydraulic retention times and a noticeable time lag between reagent dosing and effluent quality testing. Dosing control based on effluent feedback is a typical reactive adjustment method, which struggles to reflect changes in influent water quality and operating conditions in a timely manner. This can lead to problems such as insufficient dosing resulting in substandard effluent quality or excessive dosing causing reagent waste and increased operating costs during load fluctuations or operating condition changes.
[0005] With the development of information and automation technologies, some defluoridation systems have begun to explore model-based predictive dosing control methods. This involves establishing a model relating the dosage to the effluent fluoride concentration to predict the treatment effectiveness of different dosing schemes, thus aiding in dosing decisions. Existing methods largely rely on historical operational data for modeling, using the dosage and some water quality parameters as model inputs and the effluent fluoride concentration as the model output to predict treatment effectiveness.
[0006] However, existing model-based dosing control methods still have significant shortcomings in engineering applications. First, existing methods typically only use simple time shifts at a single moment to handle hydraulic retention time, failing to fully consider the hydrodynamic memory effect and multi-order dynamic time delay characteristics caused by the volume of the defluoridation reactor and pipeline transportation, resulting in a large deviation between the predicted results and the actual effluent response. Second, the prediction models are mostly built offline, lacking a mechanism for continuous updates based on operational feedback, making it difficult to adapt to the drift of water quality conditions and system states during long-term operation. Third, existing methods mostly focus on positively predicting effluent water quality, or only use simple empirical conditions to screen for dosing dosage, lacking a multi-objective predictive optimization control (MPC) mechanism that comprehensively considers water quality compliance penalties and reagent consumption costs, making it difficult to achieve global optimization of dosing costs while ensuring stable effluent compliance. Summary of the Invention
[0007] Purpose of the invention: The purpose of this invention is to provide a calcium salt dosing control method and system based on historical operating data and online learning. This method dynamically predicts and optimizes the calcium salt dosing amount, and achieves adaptive adjustment and stable control of the calcium salt dosing amount while meeting the effluent fluoride concentration standard, thereby improving the operational stability and economy of the wastewater defluoridation process.
[0008] Technical Solution: To achieve the above objectives, the present invention provides a calcium salt dosing control method based on historical operating data and online learning, comprising the following steps:
[0009] S1. Collect historical operating data of the defluorination system and construct multiple sets of multi-order time-delay characteristic sequences X( ) of fluoride ions. Historical operational data includes influent water quality parameters, operating condition parameters, calcium salt dosage data recorded with a uniform timestamp, as well as data with a lag at the calcium salt dosage time. Data on effluent fluoride concentration over time ;
[0010] S2. Based on preset validity conditions, the multi-order time-delay feature sequences are filtered to construct a historical dynamic feature dataset. Each sample in the dataset includes an input feature X( ) and target features ;
[0011] S3. Based on historical dynamic feature datasets, construct a historical empirical prediction model for effluent fluoride concentration. This historical empirical prediction model searches for the optimal calcium salt dosage within the calcium salt dosage constraint range by optimizing the control cost function. This ensures that the predicted fluoride ion concentration in the water meets the target constraint.
[0012] S4, the defluorination system is based on the optimal calcium salt dosage. Real-time operation, recording real-time operating data of the defluorination system according to a unified timestamp;
[0013] S5. Construct an online prediction model for calcium salt dosage based on the TabPFN probabilistic inference framework. This model uses the influent water quality parameters, operating condition parameters, and hysteresis parameters from the real-time operation of the defluoridation system in S4. The target effluent fluoride concentration over time is the input, and the recommended calcium salt dosage is the output. ;
[0014] S6. Based on the established calcium salt dosage decision rules, select the optimal calcium salt dosage. and recommended calcium salt dosage Determining the Decision-Making Calcium Salt Dosage Under Current Operating Conditions of the Defluorination System .
[0015] Preferably, the multi-order time-delay feature sequence X( in S1) ) is represented as:
[0016] X( ) = [S( ), Ca( ), S( -1), Ca( -1), ..., S( -K), Ca( -K)]
[0017] Wherein, K is the historical sampling order, S( is an index of discrete historical sampling times) ) for the first time in history A multidimensional feature vector composed of influent water quality parameters and operating condition parameters at all times, Ca( ) for the first time in history The amount of calcium salt added at any given time.
[0018] Preferably, the influent water quality parameters include influent fluoride ion concentration and pH value, conductivity, temperature or turbidity; the operating condition parameters include influent flow rate and hydraulic retention time; the calcium salt dosage data is the calcium salt dosage, which is calculated from the dosing pump frequency, stroke or flow rate.
[0019] Preferably, the preset validity conditions in S2 include: the sample timestamps can be matched according to the hydraulic residence time; the data on influent fluoride concentration, pH value, influent flow rate, hydraulic residence time, and calcium salt dosage in the multi-order time delay feature sequence are complete; the influent fluoride concentration, pH value, influent flow rate, and calcium salt dosage are all within their respective preset validity ranges; and no shutdown, maintenance, or manual forced drug adjustment has occurred within the corresponding sampling period.
[0020] Preferably, the historical experience prediction model described in S3 optimizes the control cost function within the calcium salt dosage constraint range. Internal search for optimal calcium salt dosage ,include:
[0021] Within the calcium salt dosage constraint range Within, multiple discrete candidate calcium salt dosages are constructed according to a preset step size. The candidate calcium salt dosages are input into the historical experience prediction model to obtain the corresponding predicted effluent fluoride concentration. Among the candidate calcium salt dosages that meet the objective constraints, the dosage that minimizes the optimization control cost function is determined as the optimal calcium salt dosage. ;
[0022] The optimized control cost function:
[0023] ,
[0024] in, This is the penalty coefficient for water quality exceeding standards. This represents the economic penalty coefficient for drug consumption. For the candidate calcium salt dosage Below, the predicted fluoride ion concentration in water is obtained from a historical experience prediction model. To and The target effluent fluoride ion concentration threshold corresponding to the given time;
[0025] The objective constraint is:
[0026] ,
[0027] The optimal control cost function is solved online to calculate the optimal control cost function. Minimize the optimal dosage .
[0028] Preferably, the decision rule includes:
[0029] A. When the online prediction model for calcium salt dosage does not meet the preset activation conditions, the optimal calcium salt dosage will be used. As a basis for deciding the amount of calcium salt to add;
[0030] B. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the recommended calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add;
[0031] C. When the online prediction model for calcium salt dosage meets the preset activation conditions, but the recommended calcium salt dosage... If the preset confidence condition is not met, the optimal calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add;
[0032] D. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the optimal calcium salt dosage is adjusted according to the weighting coefficient λ. and the recommended calcium salt dosage Weighted fusion is performed to determine the calcium salt dosage d*:
[0033] ,
[0034] The preset activation conditions include: the number of recent valid samples used to construct the online update prediction model for calcium salt dosage reaches a preset sample number threshold, and the sample features are complete;
[0035] The preset confidence conditions include: the recommended calcium salt dosage. It is located within the preset safe dosage range.
[0036] Rule D is preferred; when the online prediction model for calcium salt dosage does not meet the preset validity conditions, rule A is adopted.
[0037] Preferably, the decision calcium salt dosage is linearly corrected:
[0038]
[0039] in, and To correct the parameters, the recommended calcium salt dosage and hysteresis at historical time points were used. The correspondence between the actual values of effluent ion concentration over time is continuously updated using an online rolling linear fitting method.
[0040] Preferably, a shadow model is constructed based on an XGBoost regression model using a gradient boosting decision tree, and the multi-order time-delay feature sequence collected after the defluorination system in S4 is running is compared with the time lag at the calcium salt addition time. Multiple sets of samples were used to train the effluent fluoride concentration data over time.
[0041] Based on the same input characteristics of actual operation of the defluorination system, the prediction errors of the historical experience prediction model and the shadow model are compared:
[0042] ,
[0043] in, Based on the prediction results of the historical experience prediction model, The results are from the shadow model prediction. This represents the actual fluoride ion concentration in the effluent. This indicates the prediction error of the historical experience prediction model. Shadow model prediction error;
[0044] When the shadow model outperforms the current historical experience prediction model under preset evaluation conditions, the shadow model replaces the currently running historical experience prediction model and becomes the current effective model.
[0045] Preferably, the corrected calcium salt dosage is... The shadow model is updated by outputting control commands to the dosing control system of the defluoridation system and using the operating conditions of the defluoridation system and the actual effluent fluoride concentration as new samples.
[0046] The calcium salt dosing control system based on historical operating data and online learning described in this invention includes the following steps:
[0047] Multi-order time-delay feature sequence construction module: used to collect historical operating data of the defluorination system and construct multiple sets of multi-order time-delay feature sequences X (for fluoride ions). Historical operational data includes influent water quality parameters, operating condition parameters, calcium salt dosage data recorded with a uniform timestamp, as well as data with a lag at the calcium salt dosage time. Data on effluent fluoride concentration over time ;
[0048] Historical dynamic feature dataset construction module: used to filter the multi-order time-delay feature sequences based on preset validity conditions to construct a historical dynamic feature dataset. Each sample in the dataset includes input feature X( ) and target features ;
[0049] Historical experience prediction model construction module: This module is used to construct a historical experience prediction model for effluent fluoride concentration based on historical dynamic feature datasets. The historical experience prediction model searches for the optimal calcium salt dosage within the calcium salt dosage constraint range by optimizing the control cost function. This ensures that the predicted fluoride ion concentration in the water meets the target constraint.
[0050] Real-time operation control module for the defluorination system: used to enable the defluorination system to operate based on the optimal calcium salt dosage. Real-time operation, recording real-time operating data of the defluorination system according to a unified timestamp;
[0051] Online Update Prediction Model Construction Module: This module is used to construct an online update prediction model for calcium salt dosage based on the TabPFN probabilistic inference framework. The online update prediction model for calcium salt dosage uses the influent water quality parameters, operating condition parameters, and hysteresis parameters of the defluoridation system in S4 during real-time operation. The target effluent fluoride concentration over time is the input, and the recommended calcium salt dosage is the output. ;
[0052] Calcium salt dosage determination module: Used to determine the optimal calcium salt dosage based on the set calcium salt dosage decision rules. and recommended calcium salt dosage Determining the Decision-Making Calcium Salt Dosage Under Current Operating Conditions of the Defluorination System .
[0053] Beneficial effects: The present invention has the following advantages: The method of the present invention can make full use of the historical operating data of the defluoridation system, and achieve adaptive optimization control of calcium salt dosage through online learning and predictive decision-making. Under complex operating conditions and fluctuating influent water quality, it can balance the stable compliance of effluent water quality with the control of reagent dosage, and has good engineering applicability and promotion value. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0055] The technical solution of the present invention will be described in detail below with reference to the embodiments and accompanying drawings.
[0056] Example 1
[0057] This embodiment provides a calcium salt dosing control method based on historical operating data and online learning, such as... Figure 1 As shown, it includes the following:
[0058] I. Collect historical operating data of the defluorination system and construct multiple sets of multi-order time-delay characteristic sequences of fluoride ions.
[0059] Historical operational data includes influent water quality parameters, operating condition parameters, calcium salt dosage data recorded at a uniform timestamp, as well as data with a lag at the calcium salt dosage time. Data on fluoride ion concentration in effluent over time.
[0060] The influent water quality parameters include at least the influent fluoride ion concentration and pH value, and may also include conductivity, temperature or turbidity; the operating condition parameters include at least the influent flow rate and hydraulic retention time; the calcium salt dosage data refers to the calcium salt dosage, which can be calculated from the dosing pump frequency, stroke or flow rate.
[0061] Multi-order time-delay feature sequence X ( ) is represented as:
[0062] X( ) = [S( ), Ca( ), S( -1), Ca( -1), ..., S( -K), Ca( -K)]
[0063] Wherein, K is the historical sampling order, S( is an index of discrete historical sampling times) ) for the first time in history A multidimensional feature vector composed of influent water quality parameters and operating condition parameters at all times, Ca( (This is the first in history) The amount of calcium salt added at any given time.
[0064] Multi-order time-delay feature sequence X ( )and + Actual fluoride ion concentration in the effluent at any given time This constitutes a multi-order time-delay sample with a time memory effect.
[0065] II. Based on preset validity conditions, the multi-order time-delay feature sequences are filtered to construct a historical dynamic feature dataset. Each sample in the dataset includes an input feature X( ) and target features .
[0066] The preset validity conditions include: the sample timestamps can be matched according to the hydraulic residence time; the data on influent fluoride concentration, pH value, influent flow rate, hydraulic residence time, and calcium salt dosage in the multi-order time delay feature sequence are complete; the influent fluoride concentration, pH value, influent flow rate, and calcium salt dosage are all within their respective preset validity ranges; and no shutdown, maintenance, or manual forced drug adjustment has occurred within the corresponding sampling period.
[0067] III. Based on historical dynamic feature datasets, construct a historical experience prediction model for effluent fluoride concentration.
[0068] The historical experience prediction model is constructed based on an XGBoost regression model using a gradient boosting decision tree, by optimizing the control cost function within the calcium salt dosage constraint range. Internal search for optimal calcium salt dosage This ensures that the model predicts the water fluoride ion concentration to meet the target constraint.
[0069] The target constraint is as follows:
[0070]
[0071] in, For the candidate calcium salt dosage Below, the predicted fluoride ion concentration in water is obtained from a historical experience prediction model. To and The target effluent fluoride concentration threshold corresponding to the given time.
[0072] The optimized control cost function is:
[0073]
[0074] Where α is the penalty coefficient for exceeding water quality standards, and β is the economic penalty coefficient for reagent consumption. Let j be the candidate calcium salt dosage within the calcium salt dosage constraint interval, and j be the index of the candidate calcium salt dosage.
[0075] The candidate calcium salt dosages are input into a historical experience prediction model to obtain the corresponding predicted effluent fluoride concentration. The optimal control cost function for each candidate calcium salt dosage is then solved online to determine the candidate calcium salt dosage that minimizes the optimal control cost function while satisfying the objective constraints. This optimal calcium salt dosage is then identified. :
[0076] .
[0077] Model retraining trigger judgment: Set a threshold for triggering updates to the historical experience prediction model. When the number of new valid samples increases since the last model update satisfy At that time, the online retraining or update process of the historical experience prediction model is triggered.
[0078] In addition to being built based on the XGBoost regression model, historical experience prediction models can also be implemented using ensemble learning models, neural network time series models, tabular data prediction models, or combinations of the above models.
[0079] IV. The defluorination system is based on the optimal calcium salt dosage. The system operates in real-time, recording real-time data of the defluorination system at a uniform timestamp, and uses historical experience-based prediction models to predict the timing of calcium salt addition. Data on effluent fluoride concentration over time ;
[0080] V. An online prediction model for calcium salt dosage is constructed based on the TabPFN probabilistic inference framework. This model uses the influent water quality parameters, operating condition parameters, and hysteresis parameters of the defluoridation system during real-time operation. The target effluent fluoride concentration over time is the input, and the recommended calcium salt dosage is the output. .
[0081] VI. Based on the established calcium salt dosage decision rules, determine the calcium salt dosage for the current operating conditions of the defluorination system. The decision rules include:
[0082] A. When the online prediction model for calcium salt dosage does not meet the preset activation conditions, the optimal calcium salt dosage will be used. As a basis for deciding the amount of calcium salt to add;
[0083] B. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the recommended calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add;
[0084] C. When the online prediction model for calcium salt dosage meets the preset activation conditions, but the recommended calcium salt dosage... If the preset confidence condition is not met, the optimal calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add;
[0085] D. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the optimal calcium salt dosage is adjusted according to the weighting coefficient λ. and the recommended calcium salt dosage Weighted fusion is performed to determine the calcium salt dosage d*:
[0086]
[0087] The preset activation conditions include: the number of recent valid samples used to construct the online update prediction model for calcium salt dosage reaches a preset sample number threshold, and the sample features are complete;
[0088] The preset confidence conditions include: the recommended calcium salt dosage. It is located within the preset safe dosage range.
[0089] Rule D is preferred; when the online prediction model for calcium salt dosage does not meet the preset validity conditions, rule A is adopted.
[0090] VII. Utilize historical data on actual calcium salt dosage and lag. The actual effluent fluoride concentration over time was used to linearly correct the calcium salt dosage for decision-making.
[0091]
[0092] in, and To correct the parameters, the recommended calcium salt dosage and hysteresis at historical time points were used. The correspondence between the actual values of effluent ion concentration over time is continuously updated using an online rolling linear fitting method.
[0093] Example 2
[0094] This embodiment provides a solution based on Embodiment 1, including...
[0095] During the operation of the defluoridation system, a candidate prediction model for the effluent fluoride concentration is trained based on newly added sample data, serving as a shadow model. This shadow model runs in parallel without participating in actual control, evaluating its predictive performance against historical experience-based prediction models of effluent fluoride concentration under current operating conditions. When preset switching conditions are met, the shadow model replaces the currently running historical experience-based prediction model, becoming the active model.
[0096] In this embodiment, the specific process of updating and switching the shadow model is as follows:
[0097] Based on recently added valid sample data, a shadow model is constructed following the same training process as the historical experience prediction model. The shadow model can be constructed using an XGBoost regression model based on gradient boosting decision trees.
[0098] Based on the same actual operational input characteristics, the prediction errors of the historical experience prediction model and the shadow model are compared:
[0099]
[0100] in, Based on the prediction results of the historical experience prediction model, The results are from the shadow model prediction. This represents the actual fluoride ion concentration in the effluent. This indicates the prediction error of the historical experience prediction model. Shadow model prediction error.
[0101] When the shadow model outperforms the current historical experience prediction model under preset evaluation conditions, the shadow model replaces the currently running historical experience prediction model and becomes the effective model. The preset evaluation conditions include:
[0102] A. The average prediction error of the shadow model within the preset time window is less than the average prediction error of the currently active model;
[0103] B. The shadow model has better prediction error statistics than the currently active model within a preset sample size window;
[0104] C. Under the same predictive optimization control cost function evaluation, the shadow model has a lower overall optimization cost than the currently active model.
[0105] Furthermore, the corrected calcium salt dosage is output as a control command to the dosing control system, and the actual effluent fluoride concentration is fed back as a new sample to the shadow model update process, forming a closed-loop control.
[0106] In this invention, the defluoridation system uses calcium salt as the defluoridation agent. The wastewater defluoridation is achieved through process units such as chemical reaction, coagulation sedimentation and solid-liquid separation. The system is also equipped with online fluoride ion detection devices for influent and effluent to achieve continuous automatic operation.
[0107] During long-term system operation, data on influent fluoride ion concentration, system operating parameters, calcium salt dosage, and corresponding effluent fluoride ion concentration are collected at fixed sampling intervals. The unit of measurement for effluent fluoride ion concentration is mg / L. This is combined with the system's set hydraulic retention time. Instead of using static mapping of data at a single moment, we define the current decision moment, open a sliding time window in the historical direction, extract the state variables of the current decision moment and multiple past sampling periods, and construct a multi-order time delay feature sequence.
[0108] This invention fully characterizes the hydrodynamic memory effect in the defluoridation system caused by the reaction tank volume and pipeline transportation through multi-order time-delay features. It also utilizes derived features obtained by nonlinear transformation of influent water quality parameters and calcium salt dosage to describe the complex spatiotemporal coupling relationship between the dynamic behavior of calcium salt addition and the final effluent fluoride ion concentration. These variables collectively describe the relationship between calcium salt addition behavior and effluent fluoride ion concentration.
[0109] To quantitatively evaluate the performance of historical experience prediction models for effluent fluoride concentration, this invention can further employ various regression evaluation indicators to compare the prediction results with the actual detection results, specifically including the coefficient of determination R², mean absolute error (MAE), root mean square error (RMSE), mean relative error (MAPE), and maximum absolute error (Max Error). Among these, R², MAE, and RMSE are used in particular to illustrate the model's predictive performance.
[0110] Validation results based on test samples demonstrate that the method of this invention exhibits high accuracy and stability in predicting effluent fluoride concentration, with a coefficient of determination (R²) of 0.9835, a mean absolute error (MAE) of 0.7511 mg / L, and a root mean square error (RMSE) of 1.1283 mg / L. These results indicate that the constructed prediction model can accurately characterize the relationship between calcium salt dosage and effluent fluoride concentration.
[0111] Furthermore, after applying the method of the present invention to the actual operation and control of a defluoridation system, the concentration of fluoride ions in the system effluent can be stably reduced and controlled below the discharge requirement threshold (e.g., 30 mg / L). Under the premise of ensuring stable compliance of effluent quality, the amount of calcium salt added is reduced, thereby saving on the amount of reagents used, which verifies the effectiveness and practicality of the method of the present invention in engineering applications.
Claims
1. A calcium salt dosing control method based on historical operation data and online learning, characterized in that, Includes the following steps: S1, collect historical operation data of the fluoride removal system, and construct a plurality of multi-order time delay characteristic sequences X about fluoride ions The historical operation data includes water quality parameters, operation condition parameters, calcium salt dosage data recorded according to a unified timestamp, and effluent fluoride ion concentration data at a time lag of the calcium salt addition time S2, based on a preset validity condition, filtering the multi-order time delay characteristic sequence, constructing a historical dynamic characteristic dataset, each sample in the dataset including input features X ) and target features ; S3. Based on historical dynamic feature datasets, construct a historical empirical prediction model for effluent fluoride concentration. This historical empirical prediction model searches for the optimal calcium salt dosage within the calcium salt dosage constraint range by optimizing the control cost function. This ensures that the predicted fluoride ion concentration in the water meets the target constraint. S4, the defluorination system is based on the optimal calcium salt dosage. Real-time operation, recording real-time operating data of the defluorination system according to a unified timestamp; S5. Construct an online prediction model for calcium salt dosage based on the TabPFN probabilistic inference framework. This model uses the influent water quality parameters, operating condition parameters, and hysteresis parameters from the real-time operation of the defluoridation system in S4. The target effluent fluoride concentration over time is the input, and the recommended calcium salt dosage is the output. ; S6. Based on the established calcium salt dosage decision rules, select the optimal calcium salt dosage. and recommended calcium salt dosage Determining the Decision-Making Calcium Salt Dosage for the Defluorination System Under Current Operating Conditions .
2. The calcium salt dosing control method according to claim 1, characterized in that, The multi-delay feature sequence X(S1) ) is represented as: X( ) = [S( ), As( ), S( -1), As( -1), ..., S( -K), Ca( -K)], Wherein, K is the historical sampling order, S( is an index of discrete historical sampling times) ) is the first in history A multidimensional feature vector composed of influent water quality parameters and operating condition parameters at all times, Ca( ) is the first in history The amount of calcium salt added at any given time.
3. The calcium salt dosing control method according to claim 2, characterized in that, The influent water quality parameters include influent fluoride ion concentration, pH value, conductivity, temperature, or turbidity; the operating condition parameters include influent flow rate and hydraulic retention time; the calcium salt dosage data is the calcium salt dosage, which is calculated from the dosing pump frequency, stroke, or flow rate.
4. The calcium salt dosing control method according to claim 3, characterized in that, The preset validity conditions mentioned in S2 include: the sample timestamps can be matched according to the hydraulic residence time; the data on influent fluoride concentration, pH value, influent flow rate, hydraulic residence time and calcium salt dosage in the multi-order time delay feature sequence are complete; the influent fluoride concentration, pH value, influent flow rate and calcium salt dosage are all within their respective preset validity ranges; and no shutdown, maintenance or manual forced drug adjustment has occurred within the corresponding sampling period.
5. The calcium salt dosing control method according to claim 1, characterized in that, The historical experience prediction model described in S3 optimizes the control cost function within the calcium salt dosage constraint range. Internal search for optimal calcium salt dosage ,include: Within the calcium salt dosage constraint range Within, multiple discrete candidate calcium salt dosages are constructed according to a preset step size. The candidate calcium salt dosages are input into the historical experience prediction model to obtain the corresponding predicted effluent fluoride concentration. Among the candidate calcium salt dosages that meet the objective constraints, the dosage that minimizes the optimization control cost function is determined as the optimal calcium salt dosage. ; The optimized control cost function: , in, This is the penalty coefficient for water quality exceeding standards. This represents the economic penalty coefficient for drug consumption. For the candidate calcium salt dosage Below, the predicted fluoride ion concentration in water is obtained from a historical experience prediction model. To and The target effluent fluoride ion concentration threshold corresponding to the given time; The objective constraint is: , The optimal control cost function is solved online to calculate the optimal control cost function. Minimize the optimal dosage .
6. The calcium salt dosing control method according to claim 1, characterized in that, The decision-making rules include: A. When the online prediction model for calcium salt dosage does not meet the preset activation conditions, the optimal calcium salt dosage will be used. As a basis for deciding the amount of calcium salt to add; B. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the recommended calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add; C. When the online prediction model for calcium salt dosage meets the preset activation conditions, but the recommended calcium salt dosage... If the preset confidence condition is not met, the optimal calcium salt dosage shall be used. As a basis for deciding the amount of calcium salt to add; D. When the online prediction model for calcium salt dosage meets the preset activation conditions, and the recommended calcium salt dosage... When the preset confidence conditions are met, the optimal calcium salt dosage is adjusted according to the weighting coefficient λ. and the recommended calcium salt dosage Weighted fusion is performed to determine the calcium salt dosage d*: , The preset activation conditions include: the number of recent valid samples used to construct the online prediction model for calcium salt dosage reaches a preset sample number threshold, and the sample features are complete; the preset reliability conditions include: the recommended calcium salt dosage The dosage is within the preset safe dosage range; rule D is preferred; when the online update prediction model for calcium salt dosage does not meet the preset validity conditions, rule A is adopted.
7. The calcium salt dosing control method according to claim 1, characterized in that, Linear correction was performed on the calcium salt dosage for the decision: , in, and To correct the parameters, the recommended calcium salt dosage and hysteresis at historical time points were used. The correspondence between the actual values of effluent ion concentration over time is continuously updated using an online rolling linear fitting method.
8. The calcium salt dosing control method according to claim 7, characterized in that, A shadow model was constructed based on the XGBoost regression model using a gradient boosting decision tree, and the multi-order time-delay feature sequence collected after the defluorination system in S4 was running was compared with the time lag at the calcium salt addition time. Multiple sets of samples were used to train the effluent fluoride concentration data over time. Based on the same input characteristics of actual operation of the defluorination system, the prediction errors of the historical experience prediction model and the shadow model are compared: , in, Based on the prediction results of the historical experience prediction model, For the shadow model prediction results, This represents the actual fluoride ion concentration in the effluent. This indicates the prediction error of the historical experience prediction model. Shadow model prediction error; When the shadow model outperforms the current historical experience prediction model under preset evaluation conditions, the shadow model replaces the currently running historical experience prediction model and becomes the current effective model.
9. The calcium salt dosing control method according to claim 8, characterized in that, Corrected calcium salt dosage The shadow model is updated by outputting control commands to the dosing control system of the defluoridation system and using the operating conditions of the defluoridation system and the actual effluent fluoride concentration as new samples.
10. A calcium salt dosing control system based on historical operating data and online learning, characterized in that, Includes the following steps: Multi-order time-delay feature sequence construction module: used to collect historical operating data of the defluorination system and construct multiple sets of multi-order time-delay feature sequences X ( ) related to fluoride ions. Historical operational data includes influent water quality parameters, operating condition parameters, calcium salt dosage data recorded with a uniform timestamp, as well as data with a lag at the calcium salt dosage time. Data on effluent fluoride concentration over time ; Historical dynamic feature dataset construction module: used to filter the multi-order time-delay feature sequences based on preset validity conditions to construct a historical dynamic feature dataset. Each sample in the dataset includes input feature X( ) and target features ; Historical experience prediction model construction module: This module is used to construct a historical experience prediction model for effluent fluoride concentration based on historical dynamic feature datasets. The historical experience prediction model searches for the optimal calcium salt dosage within the calcium salt dosage constraint range by optimizing the control cost function. This ensures that the predicted fluoride ion concentration in the water meets the target constraint. Real-time operation control module for the defluorination system: used to enable the defluorination system to operate based on the optimal calcium salt dosage. Real-time operation, recording real-time operating data of the defluorination system according to a unified timestamp; Online Update Prediction Model Construction Module: This module is used to construct an online update prediction model for calcium salt dosage based on the TabPFN probabilistic inference framework. The online update prediction model for calcium salt dosage uses the influent water quality parameters, operating condition parameters, and hysteresis parameters of the defluoridation system in S4 during real-time operation. The target effluent fluoride concentration over time is the input, and the recommended calcium salt dosage is the output. ; Calcium salt dosage determination module: Used to determine the optimal calcium salt dosage based on the set calcium salt dosage decision rules. and recommended calcium salt dosage Determining the Decision-Making Calcium Salt Dosage for the Defluorination System Under Current Operating Conditions .