Water treatment agent delivery verification and prediction system and method
Through the water treatment agent delivery verification and prediction system combined with big data and AI technology, the problem of hysteresis and insufficient accuracy of drug delivery is solved, accurate prediction and automatic adjustment of drug delivery is achieved, and water quality stability and economicality are improved.
Patent Information
- Application Number
- CN202510339466.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-29
AI Technical Summary
In the existing water treatment process, there is a lag in response, insufficient accuracy, and lack of closed-loop verification, resulting in unstable water quality and waste of resources, making it difficult to achieve intelligent and low-carbon management.
Using big data, Internet and AI technology, combined with deep learning and closed-loop control, the ResNet network training model is used to train the model and use a simulated oblique tube device for feedback verification to achieve accurate prediction and automatic adjustment of drug delivery.
It improves water quality stability, reduces the amount of drug added, achieves the goal of cost-effective water treatment, and ensures the high-precision operation and stability of the system.
Smart Images

Figure CN120387085A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of water treatment technology, and in particular relates to a water treatment agent dosage verification and prediction system and method. It makes full use of technologies such as AI artificial intelligence and big data analysis, deeply combines water treatment process technology and water plant management methods, transforms simple and extensive management models, and realizes the intelligent, low-carbon and efficient management goals of modern water plants. Background Art
[0002] With the rapid development of smart water services, the precise addition of chemicals during water treatment has become a key step in achieving stable water quality and reducing operating costs. In traditional water treatment processes, the dosage of chemicals mainly relies on manual experience or control systems based on fixed rules (such as simple proportional adjustment based on influent flow or turbidity). For example, in the sedimentation tank dosing process, operators usually set the initial dosage based on historical experience and dynamically adjust it by manually monitoring the effluent turbidity. However, this method has significant drawbacks: (1) Response lag and lack of precision: Manual experience cannot adapt to water quality fluctuations (such as influent turbidity, temperature fluctuations, etc.) in real time, resulting in excessive or insufficient dosage of reagents, unstable water quality (such as excessive effluent turbidity) or waste of resources. For example, when raw water turbidity increases sharply during the rainy season, traditional methods lack predictive capabilities and often lag for several hours before completing adjustments, seriously affecting treatment efficiency.
[0003] (2) Reliance on simple linear models: Existing automated systems often use linear regression or threshold control algorithms, which make it difficult to capture the nonlinear relationship between water quality parameters and chemical requirements. For example, alum consumption is not only related to influent turbidity, but also to multiple factors such as water temperature, pH value, and sedimentation tank flow rate. Linear models cannot effectively fit such complex relationships, resulting in prediction errors as high as 15%-30%.
[0004] (3) Lack of closed-loop verification mechanism: Existing technologies usually only implement reagent addition through feedforward control, and lack real-time feedback verification of the actual water output effect.
[0005] In addition, existing technologies generally fail to solve the "prediction-verification" closed-loop coordination problem, which leads to cumulative errors in the model in practical applications and makes it difficult to balance water quality stability and economic goals.
[0006] Therefore, there is an urgent need for a water treatment agent dosage verification and prediction system and method, which uses deep learning technology to explore the nonlinear relationship between multiple parameters and combines it with a closed-loop control mechanism to achieve precise adjustment, so as to solve the problems of traditional methods such as response lag, low model accuracy and insufficient long-term stability, and promote the upgrading of water treatment technology towards intelligence and low carbon. Summary of the Invention
[0007] The object of the present invention is to provide a water treatment chemical dosing verification and prediction system and method, which realizes accurate prediction and automatic adjustment of chemical dosing through the integration of big data, Internet and AI technologies, achieves the goal of economical and efficient water treatment, and solves the problems of difficult accurate chemical dosing and insufficient model stability in the existing water treatment process.
[0008] To solve the above technical problems, the present invention is realized through the following technical solutions: The present invention is a water treatment chemical dosing verification and prediction method, including the following steps: Step S1: Predict and train the extraction of characteristic parameters and target parameters of the chemical dosing process environment in the water plant; Step S2: When the upper computer program doses chemicals in the water plant, after cleaning the target data collected at each collection point, store it in the server SQL SERVER database; Step S3: Segment the data in different seasons in the time dimension and scale the different input parameters; Step S4: Input the parameter changes of different groups into the trained prediction model to predict the dosing amount in real time; Step S5: Conduct feedback verification through a simulated inclined tube device to ensure high-precision control of the system during the actual chemical dosing process.
[0009] As a preferred technical solution, in the step S1, the specific process of training the prediction model is as follows: Step S11, historical data collection: Obtain the chemical dosing process environment data and target parameter data of the water plant from the historical database; the process environment data is the data collected by the camera; the collected historical data includes influent flow rate, turbidity, influent COD, PH, temperature, ammonia nitrogen, total phosphorus, chemical dosing amount and effluent turbidity; take the chemical dosing amount parameter as the target parameter data, and the rest of the data as the chemical dosing process environment data for model training; Step S12, data preprocessing: Preprocess the collected data, and make the preprocessed data and the corresponding labels into a data set; the labels are represented by one-hot encoding, so as to facilitate comparison with the output of the model and label each data with the corresponding category and collection location; Step S13, data set division: Divide the data set into a training set and a validation set; the training set is used for model parameters, and the validation set is used to evaluate the model performance; and the training set accounts for 85% of the data set, and the validation set accounts for 15% of the data set; Step S14, Network Architecture Design: The ResNet deep residual network is adopted; ResNet (Residual Network) is a classic architecture that solves the problems of gradient vanishing / explosion and network degradation in the training of deep neural networks. Its core idea is skip connection, which allows gradients to directly backpropagate to the shallow layers; The max pooling operation extracts the maximum value in each pooling window from the input feature map as the output. The activation function of ResNet is the rectified linear unit. The ReLU function sets negative values to zero and keeps positive values unchanged. For the residual block, ResNet uses skip connections to allow information to be directly passed to solve the problems of gradient vanishing and model degradation.
[0010] The specific calculation formula of the residual block is as follows: ; Then apply the activation function to this result: ; In the formula, represents the input feature, F represents the residual function, represents the weight parameters of the residual block, represents performing a convolution operation and an activation function on the input feature and outputting the residual feature, represents the output of the residual block; Step S15, Model Training: Use the training set to train the ResNet network; train the network by defining an appropriate loss function and optimizer, and use the cross-entropy loss function for classification. The specific formula is as follows: ; In the formula, L represents the loss value, H represents the one-hot encoded vector, represents the true label, and p is the probability vector predicted by the model. Each element represents the predicted probability of the corresponding class; Step S16, Model Evaluation and Tuning: After the training is completed, use the validation set to evaluate the prediction model; calculate metrics such as classification accuracy, precision, and recall, and perform model tuning according to the model evaluation results; Step S17, Deployment and Application: Deploy the trained prediction model to the actual intelligent dosing system, use the model for inference and classification, and obtain the prediction results of the water plant.
[0011] As a preferred technical solution, in the step S15, the specific process of using the training set to train the ResNet network is as follows: Step S151: Train the network by defining a loss function and an optimizer; Step S152: Input the data to be trained into the prediction model, and calculate the prediction output of the model through forward propagation. The specific formula is as follows: ; In the formula, X is the input feature, W is the weight matrix, and Z is the pre-activation value. The pre-activation value Z is transformed through the activation function to obtain the final activation value. Step S153: Compare the prediction output of the model with the true label, and calculate the value of the loss function. The calculation formula of the loss function is as follows: ; In the formula, S is the loss function, which is used to measure the difference between the model prediction result and the true label. m is the number of training samples. represents the true label of the i-th sample. represents the prediction result of the model for the i-th sample. Step S154: Calculate the gradient of the loss function through backpropagation. Calculate the gradient with respect to the loss function through the backpropagation algorithm, so as to obtain the gradient information about the model parameters. The specific calculation formula of backpropagation is as follows: ; In the formula, represents the loss gradient of a certain layer, which is used to measure the contribution of the change in the output of this layer to the overall loss. A represents the activation value of the previous layer, which is used to calculate the loss gradient of the current layer. Y represents the true label, which is used to calculate the loss gradient. represents the weight gradient, which is the contribution of the weight of the current layer to the overall loss. represents the bias gradient, which is the contribution of the bias of the current layer to the overall loss. Step S155: Use the optimizer SGD to update the parameters of the prediction model according to the gradient information. Use the optimizer SGD to update the parameters of the model according to the gradient information. The optimizer will determine the update direction and step size of the parameters according to the learning rate and other hyperparameters. Step S156: Repeat the above training steps iteratively until the predefined stop condition is reached.
[0012] As a preferred technical solution, in step S2, during data cleaning, the invalid data with the sedimentation tank influent pH below 6.9 and above 8.8, the sedimentation tank influent turbidity below 10 and above 150, the sedimentation tank effluent turbidity above 3000 and the flow rate below 1 and above 5, and the flow rate below 3000 and below 1 and above 5.5 are removed, and then the valid data is subjected to data cleaning and data filling. Then, the cleaned data is subjected to format conversion and entered into the model code for model training preparation. The input parameters are the influent flow rate, influent pH, influent turbidity, influent temperature, effluent turbidity, and effluent temperature, and the target parameter is the chemical dosage.
[0013] As a preferred technical solution, in step S3, the data in different seasons are segmented in the time dimension, and different input parameters are scaled proportionally. The specific process is as follows: Step S31: Input multi-dimensional time series data (such as temperature, turbidity, PH, etc.), and extract the multi-scale features of the temperature sequence through wavelet transform; Step S32: Use the quantum annealing algorithm to find the optimal time segmentation scheme to dynamically adapt to climate change; Step S33: Extract the time period features through quantum Fourier transform and construct a time correlation graph (node = time point, edge weight = DTW distance); Step S34: Use the quantum approximate optimization algorithm to solve the maximum cut problem to obtain the optimal season division; Step S35: Map the parameter values to the quantum state superposition space, perform quantum normalization processing, realize non-linear transformation while retaining the physical meaning of the original value range, and add quantum noise to protect data privacy during the scaling process; The scaling formula combines quantum mechanics and thermodynamics formulas as follows: ; In the formula, represents the scaling matrix obtained by quantum adversarial training, represents the activation energy effect of the Sigmoid function simulating the Arrhenius equation, represents the activation energy of the chemical reaction, X represents the residual term; represents the quantum entanglement term; Step S36: Construct a spatio-temporal consistency verification index and a self-correction mechanism; The constructed verification index is as follows: Intra-season similarity ≥ 0.85 (based on dynamic time warping DTW); Inter-season discrimination ≥ 2.0 (evaluating the distribution difference through KL divergence); Self-correction mechanism: When it is detected that the new data distribution drifts beyond the threshold, quantum re-clustering is automatically triggered.
[0014] Step S37: Inject physical constraints.
[0015] As a preferred technical solution, in step S4, the system supports fine-tuning the recommended dosage given by the prediction model. By setting the upper and lower floating parameters of the dosage in the system, the amount of alum added can be adjusted to the target effluent turbidity according to the real-time water quality conditions; the final predicted dosage data is the sum of the system-predicted dosage and the manually set floating parameters. After the dosage is determined, the dosage result will be sent to the automatic control system, and the automatic control system will complete the control and dosage of the agent.
[0016] As a preferred technical solution, in step S5, when there is a deviation between the actual output of the controlled quantity and the set value, the controller makes targeted adjustments based on the size and direction of the detected difference, and performs feedback verification through a simulated inclined tube device; In the actual dosing process control, due to the existence of multiple interference sources such as turbidity, pH, temperature, etc., the use of model control for all disturbances will result in certain fluctuations and deviations compared to expectations. Therefore, the project combines the model with verification to form a composite control system, which can not only give the advantages of model control (it can give timely recommendations on the dosing of chemicals based on information such as flow rate and water quality), but also maintain timely feedback and adjustments when the effluent water quality fluctuates, thereby achieving high-precision control requirements.
[0017] Therefore, by using the simulated inclined tube device for feedback verification, the stressful manual alum addition process can be offloaded to the computer system when the simulated inclined tube is used as feedback to independently control the alum addition system. The turbidity of the sedimentation tank under automatic alum addition is fully qualified and effective, and the economic efficiency of the automatic alum addition is also relatively significant. In this system, the simulated inclined tube can serve as feedback verification and work in conjunction with the model algorithm to automatically add coagulant, thereby achieving automatic coagulant addition in the horizontal flow sedimentation tank.
[0018] As a preferred technical solution, in step S5, an underwater camera is installed under the simulated inclined tube device to capture the alum flower image, and the system periodically obtains the alum flower image and converts it into a picture to be processed; the picture is filtered, smoothed, enhanced and restored, and the image is preprocessed by edge extraction and threshold segmentation; after obtaining the preprocessed binary image, the area, perimeter, density and other characteristics of the object are obtained through region growing, filling and feature extraction, and then a deep neural network classifier is used to learn and classify the alum flower type, and finally a decision is made.
[0019] The present invention is a water treatment agent injection verification and prediction system, comprising a raw water regulating tank, a flocculation reaction tank, a sedimentation tank, a filter tank, a clear water tank, a collection device, a simulated inclined tube underwater camera, and an intelligent dosing system; The raw water regulating tank is used to receive the water pumped by the source water pump; the raw water regulating tank, the flocculation reaction tank, the sedimentation tank, the filtration tank and the clear water tank are sequentially connected by pipelines; the clear water tank supplies the treated water to users through a water supply pump; The acquisition device acquires the data generated during the operation of the water plant and sends the acquired data to the intelligent chemical dosing system; The intelligent chemical dosing system includes a pretreatment module, a feature extraction module, a prediction model module and a model output module; the model output module feeds back the output result of the prediction model module to the chemical dosing terminal; the chemical dosing terminal is used for adding coagulants, coagulant aids and chlorine treatment.
[0020] The chemical dosing control of the intelligent chemical dosing system adopts one-key operation, the online feedback experimental device runs fully automatically and intelligently, and the platform system intuitively displays the operation data of the water plant in all directions, tracks the alarms in real time, and automatically follows up and analyzes the process management points.
[0021] The present invention has the following beneficial effects: (1) Through the integration of big data, Internet and AI technologies, the present invention realizes the accurate prediction and automatic adjustment of chemical dosing, not only improves the water quality stability, but also reduces the dosage of alum, achieving the goal of economical and efficient water treatment; (2) The present invention extracts the multi-scale features of the temperature sequence through wavelet transform, uses the quantum annealing algorithm to find the optimal time segmentation scheme, and utilizes the deep integration of quantum computing and classical machine learning to realize the intelligent decoupling and optimization of complex time series features on the premise of ensuring the consistency of physical laws, laying a high-quality data foundation for subsequent model training; (3) Through the feedback verification of the simulated inclined tube device and the automatic control of the PLC automatic control system, the present invention ensures the high-precision operation and stability of the system.
[0022] Of course, it is not necessary for any product implementing the present invention to achieve all the above-mentioned advantages simultaneously. Description of the Drawings
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0024] Figure 1 It is a flowchart of a method for verifying and predicting the dosing of water treatment chemicals of the present invention; Figure 2 It is a schematic structural diagram of a system for verifying and predicting the dosing of water treatment chemicals of the present invention; Figure 3In the embodiment, it is a line graph of water quality change about 1 - 2 hours ahead of the sedimentation tank; Figure 4 In the embodiment, it is a schematic diagram of floc image processing and training; Figure 5 It is a schematic diagram of prediction model training. Specific Embodiments
[0025] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0026] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0027] In order to make the purpose, technical solution and advantages of the present application clearer, the following is a further detailed description of the present application in conjunction with the attached Figures 1-5 and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0028] Embodiment 1 Please refer to Figure 1 As shown, the present invention is a method for verifying and predicting the dosage of water treatment chemicals, including the following steps: Step S1: Train a prediction model for extracting characteristic parameters and target parameters of the water plant chemical dosing process environment; Step S2: When the upper computer program doses chemicals in the water plant, after cleaning the target data collected at each collection point, store it in the server SQL SERVER database; Step S3: Segment the data in different seasons in the time dimension and scale different input parameters; Step S4: Input the parameter changes of different groups into the trained prediction model to predict the dosing amount in real time; Step S5: Conduct feedback verification through a simulated inclined tube device to ensure high-precision control of the system during the actual chemical dosing process.
[0029] Please refer to Figure 5 As shown, in step S1, the specific process of training the prediction model is as follows: Step S11. Historical data collection: Obtain the water treatment plant chemical dosing process environment data and target parameter data from the historical database; the process environment data is the data collected by the camera; the collected historical data includes influent flow rate, turbidity, influent COD, PH, temperature, ammonia nitrogen, total phosphorus, chemical dosing amount, and effluent turbidity; use the chemical dosing amount parameter as the target parameter data, and the remaining data as the chemical dosing process environment data for model training; Step S12. Data preprocessing: Preprocess the collected data, and make the preprocessed data and corresponding labels into a dataset; the labels are represented by one-hot encoding to facilitate the comparison of the model output and label each data with the corresponding category and collection location; Step S13. Dataset division: Divide the dataset into a training set and a validation set; the training set is used for model parameters, and the validation set is used to evaluate the model performance; and the training set accounts for 85% of the dataset, and the validation set accounts for 15% of the dataset; Step S14. Network architecture design: Adopt the ResNet deep residual network; ResNet (Residual Network) is a classic architecture to solve the problems of gradient vanishing / explosion and network degradation in the training of deep neural networks. Its core idea is skip connection, which allows gradients to directly backpropagate to the shallow layers; The max pooling operation extracts the maximum value in each pooling window from the input feature map as the output. The activation function of ResNet is the rectified linear unit. The ReLU function sets negative values to zero and keeps positive values unchanged. For the residual block, ResNet uses skip connections to allow information to be directly passed to solve the problems of gradient vanishing and model degradation.
[0030] The specific calculation formula of the residual block is as follows: ; The above formula is used when the dimensions of the input and output are the same (such as the same number of channels and the same size); when the dimensions of the input and output are different (such as different numbers of channels or size transformation), the specific calculation formula of the residual block is as follows: ; In the formula, is a projection matrix (usually implemented by 1*1 convolution) used to adjust the dimension of the input to match ; Then apply the activation function to this result: ; In the formula, represents the input feature, F represents the residual function, Represents the weight parameters of the residual block, Represents performing a convolution operation and an activation function on the input features and outputting residual features, Represents the output of the residual block; Step S15, Model Training: Use the training set to train the ResNet network; Train the network by defining an appropriate loss function and optimizer, and use the cross-entropy loss function for classification. The specific formula is as follows: ; In the formula, L represents the loss value, H represents the one-hot encoded vector, represents the true label, and p is the probability vector predicted by the model. Each element represents the predicted probability of the corresponding class; Step S16, Model Evaluation and Tuning: After training is completed, use the validation set to evaluate the prediction model; Calculate metrics such as classification accuracy, precision, and recall, and perform model tuning based on the model evaluation results; Step S17, Deployment and Application: Deploy the trained prediction model to the actual intelligent dosing system, use the model for inference and classification, and obtain the water plant prediction results.
[0031] In step S15, the specific process of using the training set to train the ResNet network is as follows: Step S151: Train the network by defining a loss function and an optimizer; Step S152: Input the data to be trained into the prediction model and calculate the predicted output of the model through forward propagation; The specific formula is as follows: ; In the formula, X is the input feature, W is the weight matrix, and Z is the pre-activation value; The pre-activation value Z is transformed through the activation function to obtain the final activation value; Step S153: Compare the predicted output of the model with the true label and calculate the value of the loss function; The loss function calculation formula is as follows: ; In the formula, S is the loss function, used to measure the difference between the model prediction result and the true label, m is the number of training samples, represents the true label of the i-th sample, represents the prediction result of the model for the i-th sample; Step S154: Calculate the gradient of the loss function through backpropagation; Calculate the gradient with respect to the loss function through the backpropagation algorithm, so as to obtain the gradient information about the model parameters; The specific calculation formula of backpropagation is as follows: ; In the formula, It represents the loss gradient of a certain layer, which is used to measure the contribution of the change in the output of this layer to the overall loss; A represents the activation value of the previous layer, which is used to calculate the loss gradient of the current layer; Y represents the true label, which is used to calculate the loss gradient. It represents the weight gradient, which is the contribution of the weights of the current layer to the overall loss. It represents the bias gradient, which is the contribution of the bias of the current layer to the overall loss. Step S155: Use the optimizer SGD to update the parameters of the prediction model according to the gradient information; use the optimizer SGD to update the parameters of the model according to the gradient information; the optimizer will determine the update direction and step size of the parameters according to the learning rate and other hyperparameters. Step S156: Repeat the above training steps until a predefined stopping condition is reached.
[0032] In step S2, during data cleaning, invalid data with the influent pH of the sedimentation tank below 6.9 and above 8.8, the influent turbidity of the sedimentation tank below 10 and above 150, the effluent turbidity of the sedimentation tank above 3000 and the flow rate below 1 and above 5, and the flow rate below 3000 and the flow rate below 1 and above 5.5 are removed, and then the valid data is subjected to data cleaning and data filling; according to the actual situation of the plant area, the water flow velocity in the sedimentation tank is too fast under high flow rates, and the chemical dosage is likely to reach the threshold, so the chemical dosage of the pump is reduced to supplement the data on the premise of ensuring the quality of the factory effluent, and the chemical dosage is randomly increased or decreased for data supplementation under low flow rates; then the cleaned data is subjected to format conversion and entered into the model code for model training preparation. The input parameters are influent flow rate, influent pH, influent turbidity, influent temperature, effluent turbidity, and effluent temperature, and the target parameter is the chemical dosage.
[0033] After data analysis, since the water quality temperature will have a certain impact on the floc precipitation and there are differences in water quality characteristics in each season, according to the time characteristics of the local water quality temperature, the data in different seasons are simply segmented in the time dimension, and different input parameters are scaled by a certain proportion.
[0034] Note: Take March 11th to May 31st of the current year and October 1st to November 10th of the current year as the temperature characteristic time periods in spring and autumn, June 1st to September 30th of the current year as the temperature characteristic time period in summer, and November 11th of the current year to March 10th of the following year as the temperature characteristic time period in winter.
[0035] In step S3, the data in different seasons are segmented in the time dimension, and different input parameters are scaled. The specific process is as follows: Step S31: Input multi-dimensional time series data (such as temperature, turbidity, pH, etc.), and extract the multi-scale features of the temperature sequence through wavelet transform. Step S32: Use the quantum annealing algorithm to find the optimal time segmentation scheme and dynamically adapt to climate change; Step S33: Extract the time period features through quantum Fourier transform and construct a time correlation graph (nodes = time points, edge weights = DTW distance); Step S34: Use the quantum approximate optimization algorithm to solve the maximum cut problem and obtain the optimal season division; Step S35: Map the parameter values to the quantum state superposition space, perform quantum normalization processing, realize nonlinear transformation while retaining the physical meaning of the original value range, and add quantum noise during the scaling process to protect data privacy; The scaling formula combines quantum mechanics and thermodynamics formulas as follows: ; In the formula, represents the scaling matrix obtained by quantum adversarial training, represents the activation energy effect of the Sigmoid function simulating the Arrhenius equation, represents the activation energy of the pharmaceutical reaction, X represents the residual term; represents the quantum entanglement term; represents the physical constant, represents the input variable, represents the hyperparameter; Step S36: Construct a spatio-temporal consistency verification index and a self-correction mechanism; The constructed verification index is as follows: Intra-season similarity ≥ 0.85 (based on dynamic time warping DTW); Inter-season discrimination ≥ 2.0 (evaluating the distribution difference through KL divergence); Self-correction mechanism: When it is detected that the new data distribution drifts beyond the threshold, quantum reclustering is automatically triggered.
[0036] In step S4, the system supports fine-tuning of the recommended dosing amount given by the prediction model. By setting the upper and lower floating parameters of the drug amount in the system, the adjustment of the alum dosage according to the real-time water quality conditions to the target effluent turbidity is realized; the final predicted dosing amount data is the sum of the system-predicted dosing amount and the manually set floating parameters. After the dosing amount is determined, the dosing result will be sent to the automatic control system, and the automatic control system will complete the control and dosing of the drug.
[0037] In step S5, when there is a deviation between the actual output of the controlled variable and the set value, the controller adjusts it specifically according to the detected difference magnitude and direction, and performs feedback verification through simulating the inclined tube device; In the actual chemical dosing process control, due to the existence of multiple interference sources such as turbidity, pH, temperature, etc., if model control is applied to all disturbances, the results will show certain fluctuations and deviations compared with the expectations. Therefore, the project combines the model with verification to form a composite control system, which can not only give full play to the advantages of model control (able to give timely dosing suggestions for chemicals based on information such as flow rate and water quality), but also maintain the ability to provide timely feedback and adjustment when the effluent water quality fluctuates, thus achieving high-precision control requirements.
[0038] Therefore, through the use of a simulated inclined tube device for feedback verification; when the coagulant addition system is controlled separately with the simulated inclined tube as the feedback, the labor-intensive coagulant addition work can be completed by the computer system; the turbidity of the sedimentation tank under automatic coagulant addition control is completely qualified and the effect is good; the economy of the automatic coagulant addition dosage is also relatively obvious. In this system, the simulated inclined tube can work in coordination with the feedback verification and the model algorithm, and jointly act on the automatic dosing to achieve the automatic dosing of the coagulant in the horizontal flow sedimentation tank.
[0039] According to the size of the incoming water pipeline, mixing well, and reaction tank, the flow range of the simulated inclined tube is generally 0.1 - 0.2 m³ / h, and the time for the incoming water to flow to the turbidity meter of the simulated inclined tube is about 25 minutes. The turbidity of the water outlet of the simulated inclined tube is consistent with that of the corresponding sedimentation tank water outlet, and the curve shape is similar to that of the sedimentation tank water outlet turbidity curve. The water quality changes about 1 - 2 hours earlier than the sedimentation tank, please refer to Figure 3 as shown. The sludge discharge time interval of the simulated inclined tube is generally 24 hours. By connecting to the PLC automatic control system, automatic control of water inlet, sludge discharge, and backwashing can be achieved without adding additional maintenance work.
[0040] Please refer to Figure 4 as shown, in step S5, an underwater camera is installed under the simulated inclined tube device to capture the floc picture. For the floc pictures captured on-site, first, image digital grayscale processing is performed. Since there are many noise points and distortions in the original image signal, generally, filtering, smoothing, enhancement, and restoration are required; then, preprocessing such as edge extraction and threshold segmentation is performed on the image. After obtaining the preprocessed binary image, the characteristics such as the area, perimeter, and density of the object are obtained through means such as region growing, filling, and feature extraction, and then the deep neural network classifier is used for learning to classify the floc types and finally make a decision. Historical data analysis shows that this algorithm can effectively obtain the characteristics of the floc image and provide image status feedback information for process control.
[0041] According to the results of actual on-site tests, due to the large water flow at the site, there are also significant differences in the continuously captured floc pictures. Analyzing a single image alone cannot represent the floc formation situation at that time. Therefore, when conducting model training, the floc parameters in the vicinity of the current moment will be comprehensively analyzed.
[0042] Example 2 Refer to Figure 2 As shown in the figure, the present invention is a verification and prediction system for water treatment chemical dosing, which can be used to execute the method contents of Example 1 and subsequent Example 3 of the present invention, including: raw water regulating tank, flocculation reaction tank, sedimentation tank, filter tank, clear water tank, acquisition device, simulated inclined tube underwater camera and intelligent chemical dosing system; The raw water regulating tank is used to receive the water pumped by the source water pump; the raw water regulating tank, flocculation reaction tank, sedimentation tank, filter tank and clear water tank are connected in sequence through pipelines; the clear water tank supplies the treated water to users through a water supply pump; The acquisition device acquires the data generated during the operation of the water plant and sends the acquired data to the intelligent chemical dosing system; The intelligent chemical dosing system includes a pretreatment module, a feature extraction module, a prediction model module and a model output module; the model output module feeds back the output result of the prediction model module to the chemical dosing terminal; the chemical dosing terminal is used to add coagulants, flocculants and chlorination treatment.
[0043] The chemical dosing control of the intelligent chemical dosing system adopts one-key operation, and the online feedback experimental device runs fully automatically and intelligently. The platform system comprehensively and intuitively displays the operation data of the water plant, tracks the alarms in real time, and automatically follows up and analyzes the process management points.
[0044] Example 3 Taking the intelligent chemical dosing of an actual water plant as an example: The total treatment scale of the water plant is 100,000 m3 / d, which is divided into 2 groups. The main technological process of the water system: Grid - grit chamber - A2O + MBBR - secondary sedimentation tank - coagulation sedimentation tank - contact tank.
[0045] In this project, the chemical dosing system of a group of coagulation sedimentation tanks in the system is transformed into an intelligent one. One set of intelligent chemical dosing system with the function of alum flower image recognition is adopted to realize the intelligent control of the current chemical dosing points, reduce the manual labor load and chemical dosing cost, and improve the stability of the effluent water quality.
[0046] After the system is built, it has functions such as intelligent dosing of PAC and PAM, online monitoring and analysis of influent and effluent water quality, water quality early warning, and online simulation of chemical dosing amount. In addition, the system realizes the unmanned and intelligent chemical dosing control of this group of coagulation sedimentation processes, can respond to water quality fluctuations in real time, and reduces the chemical consumption by 10% - 15% compared with the original chemical dosing method. Under the condition of not exceeding the designed water quality and water volume, it ensures that the effluent of the coagulation sedimentation unit continuously and stably meets the standards (the designed standard turbidity ≤ 3 NTU, and the actual effluent index is stably below 2).
[0047] The chemical dosing cockpit can view the data model, comparison of chemical dosing effects, actual dosing amount, recommended dosing amount, influent analysis, effluent analysis, effluent water quality warning, original and processed photos of floc photos collected by the underwater camera, etc.
[0048] When the water temperature of the reservoir is 10 - 23 °C, the turbidity is generally about 2 NTU, ammonia is generally about 0.15 mg / L, permanganate index is generally about 1.5 mg / L, iron is about 0.15 mg / L, manganese is about 0.10 mg / L, pH value is generally 6.70 - 7.20, total hardness is 10 - 20 mg / L, chloride is generally 3 - 6 mg / L, and total alkalinity is generally 8 - 20 mg / L.
[0049] The intelligent chemical dosing of this project uses model prediction as the control core, and is customized and developed according to the actual process, water quality status, management mode, etc. of the water plant, so that it can match the process, management and operation habits of the water plant. The system has just been launched, and the specific operation effect still needs to be adjusted and observed. It is expected that the system can achieve the reduction of the dosing amount of flocculant according to the change of influent water quality while meeting the effluent water quality; at the same time, when the influent water quality deteriorates or mutates, the system responds in a timely manner and automatically adds chemicals to ensure the quality of the water leaving the factory and improve the impact resistance.
[0050] It should be noted that in the above system embodiments, the included units are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0051] In addition, those of ordinary skill in the art can understand that all or part of the steps in implementing the above method embodiments can be completed by instructing relevant hardware through a program, and the corresponding program can be stored in a computer-readable storage medium.
[0052] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. These embodiments are selected and specifically described in this specification to better explain the principle and practical application of the present invention, so that those skilled in the art can understand and utilize the present invention well. The present invention is only limited by the claims and their full scope and equivalents.
Claims
1. A method for verifying and predicting the dosing of water treatment agents, characterized in that, The steps include: Step S1: extracting characteristic parameters and target parameters of the water plant's dosing process environment to train a prediction model; Step S2: When the water plant puts the chemicals in, the host computer program cleans the target data collected at each collection point and stores it in the SQL Server database; Step S3: Segment the data of different seasons by time dimension and scale the different input parameters; Step S4: Input the trained prediction model according to the parameter changes of different groups to predict the dosage in real time; Step S5: Feedback verification is performed by simulating the inclined tube device to ensure high-precision control of the system during the actual dosing process.
2. The method for verifying and predicting the dosing of a water treatment agent according to claim 1, characterized in that, In step S1, the specific process of training the prediction model is as follows: Step S11, historical data collection: obtaining water plant dosing process environment data and target parameter data from the historical database; Step S12, data preprocessing: preprocessing the collected data, and making the preprocessed data and corresponding labels into a data set; Step S13, data set division: divide the data set into a training set and a validation set; Step S14, network architecture design: using ResNet deep residual network; Step S15, model training: use the training set to train the ResNet network; Step S16, model evaluation and tuning: After training is completed, the prediction model is evaluated using the validation set; Step S17, deployment and application: deploy the trained prediction model to the actual smart dosing system.
3. A method for verifying and predicting the dosage of a water treatment agent according to claim 2, characterized in that In step S15, the specific process of using the training set to train the ResNet network is as follows: Step S151: training the network by defining a loss function and an optimizer; Step S152: input the data to be trained into the prediction model, and calculate the prediction output of the model through forward propagation; Step S153: Compare the predicted output of the model with the true label and calculate the value of the loss function; Step S154: Calculate the gradient of the loss function through back propagation; Step S155: Use the optimizer SGD to update the parameters of the prediction model according to the gradient information; Step S156: Repeat the above training steps until a predefined stopping condition is reached.
4. A method for verifying and predicting the dosing of water treatment agents according to claim 1, characterized in that, In step S2, during data cleaning, invalid data including the pH of the sedimentation tank inlet water lower than 6.9 and higher than 8.8, the turbidity of the sedimentation tank inlet water lower than 10 and higher than 150, the turbidity of the sedimentation tank outlet water higher than 3000, the flow rate lower than 1 and higher than 5, and the flow rate lower than 1 and higher than 5.5 are eliminated, and then data cleaning and data filling are performed on the valid data; the cleaned data is then formatted and entered into the model code for model training preparation.
5. A method for verifying and predicting the dosage of a water treatment agent according to claim 1, characterized in that, In step S3, the data of different seasons are segmented by time dimension, and different input parameters are scaled proportionally. The specific process is as follows: Step S31: extracting multi-scale features of the temperature series through wavelet transform; Step S32: Using quantum annealing algorithm to find the optimal time division scheme to dynamically adapt to climate change; Step S33: extracting time period features through quantum Fourier transform and constructing a time correlation graph; Step S34: using a quantum approximate optimization algorithm to solve the maximum cut problem and obtain the optimal seasonal division; Step S35: Mapping the parameter value to the quantum state superposition space and performing quantum normalization processing; Step S36: constructing spatiotemporal consistency verification indicators and self-correction mechanisms; Step S37: Inject physical constraints.
6. A method for verifying and predicting the dosing of a water treatment agent according to claim 1, characterized in that, In step S4, the system supports fine-tuning the recommended dosage given by the prediction model. By setting the upper and lower floating parameters of the dosage in the system, the amount of alum added can be adjusted to the target effluent turbidity according to the real-time water quality conditions; the final predicted dosage data is the sum of the system-predicted dosage and the manually set floating parameters. After the dosage is determined, the dosage result will be sent to the automatic control system, and the automatic control system will complete the control and dosage of the agent.
7. A method for verifying and predicting the dosing of a water treatment agent according to claim 1, characterized in that, In step S5, when there is a deviation between the actual output of the controlled variable and the set value, the controller makes targeted adjustments based on the size and direction of the detected difference, and performs feedback verification through a simulated inclined tube device.
8. A method for verifying and predicting the dosage of a water treatment agent according to claim 1, characterized in that In step S5, an underwater camera is installed under the simulated inclined tube device to capture the alum flower picture, and the system periodically obtains the alum flower picture and converts it into a picture to be processed; the picture is filtered, smoothed, enhanced and restored, and the image is pre-processed by edge extraction and threshold segmentation; After obtaining the preprocessed binary image, the area, perimeter, density and other characteristics of the object are obtained through region growing, filling and feature extraction. Then, a deep neural network classifier is used to learn and classify the alum flower type, and finally a decision is made.
9. A water treatment chemical dosing verification and prediction system, characterized in that, It includes a raw water regulating tank, a flocculation reaction tank, a sedimentation tank, a filter tank, a clear water tank, a collection device, a simulated inclined tube underwater camera and an intelligent dosing system; The raw water regulating tank is used to receive water pumped by the source water pump; the raw water regulating tank, flocculation reaction tank, sedimentation tank, filter tank and clear water tank are connected in sequence through pipelines; the clear water tank supplies the treated water to users through the water supply pump; The collecting device collects data generated during the operation of the water plant and sends the collected data to the smart dosing system; The intelligent dosing system includes a pretreatment module, a feature extraction module, a prediction model module and a model output module; the model output module feeds back the output results of the prediction model module to the dosing terminal; the dosing terminal is used to add coagulants, flocculants and chlorination treatment.
10. A water treatment chemical dosing verification and prediction system according to claim 9, characterized in that, The dosing control of the smart dosing system adopts one-button operation, the online feedback experimental device operates fully automatically and intelligently, and the platform system intuitively displays the water plant operation data, real-time tracking of alarms, and automatic follow-up analysis of process management points in an all-round manner.
Citation Information
Cited By
Intelligent control method and system for water treatment agent
CN121050322A
Intelligent biological treatment robot system for watershed water environment and customized adding method thereof
CN121292634A