Ecological analysis method and system based on urban water treatment
By collecting and preprocessing ecological data in real time, building an ecological prediction model and using PID controllers and scaling factors for automated chemical dosing, we solve the control problems of urban water treatment technology in dealing with ecological complexity and dynamic changes in water quality, and achieve disinfection. Precise control of by-product concentration and stable operation of water treatment systems.
Patent Information
- Application Number
- CN202411308857.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing urban water treatment technology has significant problems in coping with ecological complexity and dynamic changes in water quality, and it is difficult to effectively control the concentration of disinfection by-products, resulting in excessive or insufficient use of agents and the stability of the effluent quality cannot be guaranteed.
By determining ecological data and deploying sensors, we collect and preprocess ecological data in real time, build an ecological prediction model to predict the concentration of disinfection by-products, and use PID controllers and proportional factors to automate chemical dosing and dynamically adjust the chemical dosage to accurately control disinfection. The concentration of by-products.
It has significantly improved the accuracy and automation level of the urban water treatment system, reduced the excessive generation of disinfection by-products, avoided the overuse of chemicals, and improved the stability and operating efficiency of the system.
Smart Images

Figure CN119336079A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of environmental engineering, and in particular to an ecological analysis method and system based on urban water treatment. Background Art
[0002] As the global water shortage and environmental pollution problems become increasingly serious, the importance of urban water treatment technology has become increasingly prominent. Modern urban water treatment systems play a key role in treating and purifying sewage and providing safe drinking water. These systems mainly rely on physical, chemical and biological treatment methods to remove suspended matter, dissolved matter, pathogens and toxic compounds in water. Among them, chemical treatment methods, such as chlorination and ozonation, are often used to remove pathogens in sewage and reduce the concentration of harmful substances in water. Although these methods are highly efficient, their by-products, such as disinfection by-products, remain in the water, which will bring potential risks to the ecological environment and human health. With the improvement of water quality standards and the enhancement of public awareness of environmental protection, how to reduce or avoid the generation of harmful by-products while maintaining water treatment efficiency has become a core issue in current water treatment technology research.
[0003] However, existing water treatment technologies still have significant deficiencies in the control of disinfection by-products. Traditional chemical treatment methods are prone to generate a wide variety of disinfection by-products, such as chloroform and haloacetic acid. These by-products are not only difficult to completely remove, but may also enter the environment after water treatment, causing long-term impacts on the ecosystem. Existing water treatment processes lack the ability to respond to water quality fluctuations in real time, and it is difficult to effectively respond to fluctuations in disinfection by-product concentrations caused by water quality changes. Lack of full use of ecological data means that the amount of reagents added during the treatment process is usually based on experience or static model results and cannot be adjusted dynamically, resulting in inaccurate control of disinfection by-product concentrations. Most existing water treatment systems rely on fixed parameter settings and lack an adaptive adjustment mechanism. It is difficult to make effective adjustments and optimizations based on real-time monitoring data, resulting in excessive or insufficient use of reagents, which wastes resources and fails to ensure the stability of effluent quality. Summary of the invention
[0004] In view of the problems existing in the above-mentioned existing ecological analysis method and system based on urban water treatment, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is that existing urban water treatment technologies have significant problems in dealing with ecological complexity and dynamic changes in water quality.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: an ecological analysis method based on urban water treatment, which comprises: Determine ecological data and deploy sensors to collect ecological data in real time and perform preprocessing; Based on the pre-treated ecological data, an ecological prediction model is constructed to predict the concentration of disinfection by-products; The predicted disinfection byproduct concentration is compared with the set disinfection byproduct concentration threshold to obtain a concentration error, and the concentration error is input into the PID controller to obtain a control input; Use the proportional factor to convert the control input into the dosage of the agent and input it into the agent dosing pump for automatic dosing.
[0007] As a preferred solution of the ecological analysis method based on urban water treatment of the present invention, wherein: the determination of ecological data and deployment of sensors refers to determining the ecological data to be monitored according to the sorting target of urban water treatment, and the ecological data includes indicators of reagent concentration, redox potential, pH value, dissolved oxygen and water temperature; Selecting sensors according to the determined ecological data, the sensors include electrochemical sensors, temperature sensors and online chromatographs; Sensors are deployed at the water source nodes of the water treatment system, which include coagulation tanks, reaction tanks, sedimentation tanks and outlets.
[0008] As a preferred solution of the ecological analysis method based on urban water treatment of the present invention, wherein: the real-time collection of ecological data by sensors and pre-processing refers to setting a data collection frequency, and collecting ecological data in real time through each sensor; The collected ecological data are preprocessed, including using the Kalman filter algorithm to eliminate noise in the ecological data, applying statistical methods to detect outliers in the ecological data, performing linear interpolation correction on the detected outliers, and using calibration curves to correct the ecological data.
[0009] As a preferred solution of the ecological analysis method based on urban water treatment of the present invention, wherein: the construction of the ecological prediction model based on the pre-processed ecological data refers to normalizing the pre-processed ecological data and converting the indicators of different dimensions to the range of [0,1]; The ecological prediction model was constructed by using a multivariate regression model to predict the generation of disinfection byproduct concentrations; Establish the basic model, the formula is: Where A(t) represents the concentration of disinfection byproducts at time point t, X i (t) represents the value of the i-th indicator at time point t, k i is the regression coefficient of the ith indicator, is the error term, n is the total number of indicators in the ecological data; Calculate the cumulative effect value B(t) of each indicator on the concentration of disinfection by-products at time point t, the formula is: Wherein, P(t) represents the concentration of the reagent at time point t, O(t) represents the redox potential at time point t, H(t) represents the pH value at time point t, D(t) represents the concentration of dissolved oxygen at time point t, and T(t) represents the water temperature at time point t; The nonlinear threshold effect of each indicator on the concentration of disinfection by-products at time point t is calculated by the sigmoid function, and the comprehensive nonlinear impact value C(t) of all indicators is obtained. The formula is: in, represents the maximum impact of the i-th indicator of ecological data on the concentration of disinfection by-products, a i represents the slope of the sigmoid function, X i (t) represents the value of the i-th indicator at time point t, b i represents the critical value of the ith indicator of ecological data, and n is the total number of indicators in the ecological data; Construct a complete ecological prediction model formula, the formula is: Among them, B( ) represents the cumulative effect of each index on the concentration of disinfection by-products within a time interval, d Represents the integral variable A small increment of , t0 is the initial time point, is the error term.
[0010] As a preferred embodiment of the ecological analysis method based on urban water treatment of the present invention, wherein: the prediction of disinfection byproduct concentration refers to dividing the pre-treated ecological data into a training set and a test set; Substitute the training set into the ecological prediction model and use the least square method to calibrate the parameters of the ecological prediction model; Evaluate the performance of the model through cross-validation; Substitute the test set into the trained ecological prediction model to predict the concentration of disinfection byproducts; The accuracy of the model was evaluated by comparing the DBP concentrations predicted by the model with the DBP concentrations actually detected; Further adjust the model parameters based on the evaluation results; By substituting real-time ecological data into the ecological prediction model, the predicted concentration of disinfection by-products in the future can be obtained.
[0011] As a preferred embodiment of the ecological analysis method based on urban water treatment of the present invention, wherein: the predicted disinfection by-product concentration is compared with the set disinfection by-product concentration threshold to obtain a concentration error, and the concentration error is input into the PID controller to obtain a control input, which refers to analyzing the fluctuation of the disinfection by-product concentration under different conditions based on historical ecological data, setting the disinfection by-product concentration threshold, and comparing the predicted disinfection by-product concentration with the disinfection by-product concentration threshold to obtain the concentration error; The concentration error is input into the PID controller to calculate the control input. The PID controller includes proportional gain, integral gain and differential gain. The formula is: Where u(t) represents the control input generated at time point t, E(t+Dt) represents the concentration error between the predicted disinfection byproduct concentration at the future time point t+Dt and the disinfection byproduct concentration threshold, and K p (t) is the proportional gain, representing the response intensity to the concentration error at time point t, K i (t) is the integral gain, which represents the response intensity to the cumulative concentration error at time point t, K d (t) is the differential gain, which represents the response intensity to the error change rate at time point t, dE(t+Dt) represents the small change in the concentration error at the future time point t+Dt, and dt represents the small increment at time point t; Determine the baseline value of concentration error, error duration, and error change rate through historical ecological data and application scenarios; If the concentration error is higher than the reference value of the concentration error, the value of the proportional gain is increased; if the concentration error is lower than the reference value of the concentration error, the value of the proportional gain is decreased; If the duration of the error is higher than the reference value of the error duration, the value of the integral gain is increased; if the duration of the error is lower than the reference value of the error duration, normal operation is maintained; If the error change rate is higher than the reference value of the error change rate, the value of the differential gain is increased, and if the error change rate is lower than the reference value of the error change rate, the value of the differential gain is decreased.
[0012] As a preferred solution of the ecological analysis method based on urban water treatment of the present invention, wherein: the use of a proportional factor to convert the control input amount into a dosage of a reagent and input it into a reagent dosing pump for automatic dosing means defining the maximum dosage Q of the reagent dosing pump max And the minimum dosage Q min The maximum value of the control input u max and the minimum value u min , determine the scale factor, the formula is: Among them, K uThe proportional factor for converting the control input into the dosage of the reagent; The calculated control input is converted into the dosage of the reagent using the proportional factor, the formula is: Where Q(t) is the dosage of the reagent at time point t, and u(t) represents the control input generated at time point t; The obtained dosage of the agent at the time point t is input into the agent dosing pump for automatic dosing.
[0013] Another object of the present invention is to provide an ecological analysis system based on urban water treatment, which comprises: Initialization module, used to determine ecological data and deploy sensors for testing; Data acquisition module, used to collect ecological data in real time through sensors and perform preprocessing; A model building module is used to build an ecological prediction model based on the pre-processed ecological data to predict the concentration of disinfection by-products; A control calculation module is used to compare the predicted disinfection by-product concentration with the set disinfection by-product concentration threshold to obtain a concentration error, and input the concentration error into a PID controller to obtain a control input; The medicine dosing module is used to use a proportional factor to convert the control input amount into the medicine dosing amount and input it into the medicine dosing pump for automatic dosing.
[0014] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of an ecological analysis method based on urban water treatment when executing the computer program.
[0015] A computer-readable storage medium stores a computer program, which implements the steps of an ecological analysis method based on urban water treatment when executed by a processor.
[0016] The beneficial effects of the present invention are as follows: through real-time collection and preprocessing of ecological data, accurate prediction of disinfection by-product concentrations, adaptive adjustment of PID controllers, and physical quantity conversion of control signals, the accuracy and automation level of urban water treatment systems are significantly improved. Through accurate prediction and real-time control, the system effectively reduces the excessive generation of disinfection by-products, while avoiding excessive use of chemicals, thereby improving the stability and operating efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0018] Figure 1 Schematic diagram of a process for ecological analysis based on urban water treatment.
[0019] Figure 2 Schematic diagram of the process of converting concentration error into control input.
[0020] Figure 3 This is a structural diagram of an ecological analysis system based on urban water treatment. DETAILED DESCRIPTION
[0021] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0022] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments. Example
[0024] Reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and which provides an ecological analysis method based on urban water treatment. The ecological analysis method based on urban water treatment includes: S1. Determine ecological data and deploy sensors to collect ecological data in real time and pre-process them; Specifically, determining ecological data and deploying sensors means determining the ecological data that needs to be monitored according to the city water treatment sorting objectives. Ecological data include indicators such as reagent concentration, redox potential, pH value, dissolved oxygen and water temperature. These indicators are selected because they can directly reflect the chemical reaction efficiency, by-product generation trend and overall ecological impact during the treatment process, and are the basis for optimizing the water treatment process. Select sensors based on the determined ecological data, including electrochemical sensors (for measuring redox potential, pH value and dissolved oxygen), temperature sensors (for measuring water temperature) and online chromatographs (for measuring drug concentration); Sensors are deployed at the water source nodes of the water treatment system to ensure coverage of the entire water treatment process. The water source nodes include coagulation tanks, reaction tanks, sedimentation tanks and outlets.
[0025] By determining ecological data and deploying corresponding sensors at various water source nodes in the water treatment system, important indicators such as reagent concentration, redox potential, pH value, dissolved oxygen and water temperature can be monitored in real time. The acquisition and analysis of these data help to accurately evaluate the efficiency of chemical reactions and the generation trend of disinfection by-products, thereby optimizing the water treatment process, improving the overall treatment effect, and ensuring that the ecological impact is minimized.
[0026] Furthermore, real-time collection of ecological data through sensors and preprocessing refers to setting a data collection frequency to collect ecological data in real time through each sensor; The collected ecological data are preprocessed, including using the Kalman filter algorithm to eliminate noise in the ecological data, applying statistical methods to detect outliers in the ecological data, performing linear interpolation correction on the detected outliers, and using calibration curves to correct the ecological data.
[0027] Real-time collection of ecological data by sensors and preprocessing can significantly improve the accuracy and reliability of the data. Setting an appropriate data collection frequency can ensure the real-time and continuity of ecological data. The Kalman filter algorithm can effectively eliminate data noise, and statistical methods can be used to detect outliers. Linear interpolation correction can be performed on outliers to ensure data consistency. The data can be corrected through calibration curves to improve data accuracy. These measures comprehensively improve the quality of ecological data and provide a more reliable basis for subsequent analysis and decision-making.
[0028] S2. Based on the pre-treated ecological data, an ecological prediction model is constructed to predict the concentration of disinfection by-products; Specifically, based on the preprocessed ecological data, constructing an ecological prediction model means normalizing the preprocessed ecological data and converting indicators of different dimensions to the range of [0,1]; The ecological prediction model was constructed by using a multivariate regression model to predict the generation of disinfection byproduct concentrations; Establish the basic model, the formula is: Where A(t) represents the concentration of disinfection byproducts at time point t, X i (t) represents the value of the i-th indicator at time point t, k i is the regression coefficient of the ith indicator, is the error term, n is the total number of indicators in the ecological data; In order to better simulate the complex dynamic interactions in the water treatment process, nonlinear functions are introduced, including sine functions and exponential decay functions, which can more accurately express the complex relationship between redox potential, pH value and dissolved oxygen; The relationship between redox potential and pH value is expressed as a periodic change using a sine function, as follows: , where O(t) represents the redox potential at time point t, and H(t) represents the pH value at time point t; The exponential decay function is used to describe that the effect of dissolved oxygen on the concentration of the reagent gradually weakens with increasing temperature. The expression is: , where D(t) represents the concentration of dissolved oxygen at time point t, and T(t) represents the water temperature at time point t; By combining the periodic relationship between agent concentration, redox potential and pH value, and the attenuation relationship between dissolved oxygen and temperature, the cumulative effect of each index on the concentration of disinfection by-products at time point t, B(t), is calculated as follows: Where P(t) represents the concentration of the drug at time point t; In order to simulate the cumulative effect of time on the concentration of disinfection byproducts during water treatment, the integral operation is introduced to incorporate the cumulative effect of time interval into the model. The cumulative effect of the time interval from the initial time point t0 to the time point t is expressed by integral operation, and the expression is: ,in Represents the integral variable A small change in B( ) represents the cumulative effect of each indicator on the concentration of disinfection by-products within a time interval; The cumulative effect of time interval can reflect the concentration of disinfection by-products in long-term operation and provide a basis for long-term optimization control; In real-world scenarios, indicators will produce threshold effects, which means that after many indicators exceed the threshold, their impact on the concentration of disinfection by-products will significantly increase or decrease; The nonlinear threshold effect of each indicator on the concentration of disinfection by-products at time point t is calculated by the sigmoid function, and the comprehensive nonlinear impact value C(t) of all indicators is obtained. The formula is: in, Represents the maximum impact value of the ith indicator of ecological data on the concentration of disinfection by-products. The actual generation of disinfection by-product concentrations corresponding to different indicators is extracted from historical experimental data, and the experimental data is fitted to the form of sigmoid function using nonlinear regression method to determine The value of a i Represents the slope of the sigmoid function, which controls the steepness of the sigmoid function.i represents the critical value of the ith indicator of ecological data, n is the total number of indicators in the ecological data, and the critical value of each indicator in the ecological data is determined by existing scientific literature and the experience of experts in the field; a i The larger the value, the steeper the curve of the sigmoid function, which means that when X i (t) reaches or approaches the critical value b i When the concentration of disinfection byproducts increases or decreases rapidly, the concentration of disinfection byproducts will increase or decrease rapidly; a i The smaller it is, the flatter the curve of the sigmoid function is, which means that when X i (t) has a slow effect on the concentration of disinfection byproducts, even if X i (t) reaches or approaches the critical value b i When the concentration of disinfection byproducts is high, it will not change rapidly; Construct a complete ecological prediction model formula, the formula is: Among them, B( ) represents the cumulative effect of each index on the concentration of disinfection by-products within a time interval, d Represents the integral variable Small increments of , used for cumulative calculations over time intervals.
[0029] Through normalization operation, each indicator in the ecological data is converted into a unified scale range, which not only eliminates the differences between different dimensions, so that each indicator can be compared and analyzed under the same standard, but also lays the foundation for the establishment of subsequent multivariate regression models. The actual situation in the water treatment process is often more complicated. The existing technology uses a simple linear model that is difficult to fully reflect the nonlinear interaction between the indicators. By innovatively introducing nonlinear functions, including sine functions and exponential decay functions, which are used to describe the periodic relationship between redox potential and pH value and the attenuation relationship of the influence of dissolved oxygen on the concentration of the agent, the model can more accurately simulate complex chemical reaction processes, especially the dynamic changes under different environmental conditions. By combining these functions with the concentration of the agent, the cumulative effect of each indicator on the generation of disinfection by-products at time point t is calculated, which can fully reflect the result of the joint action of various indicators at the current moment. In order to further consider the influence of time on the generation of disinfection by-products, this method introduces integral operations to calculate the cumulative effect of the time interval from the initial time point to the current time point, which can capture The cumulative impact of various indicators in long-term operation is captured, providing a long-term trend analysis tool for the generation of disinfection by-products, making the model not only suitable for short-term instantaneous analysis, but also providing a scientific basis for optimization control in long-term operation, thereby helping the water treatment system to minimize the generation of harmful by-products while maintaining efficient operation. The model also takes into account the threshold effect of each indicator, which is of great significance in many practical applications. When certain indicators exceed a specific threshold, their impact on the generation of disinfection by-products will increase or decrease significantly. By introducing the sigmoid function, this method can accurately describe this nonlinear threshold effect and calculate the comprehensive nonlinear impact value of each indicator at time point t. This processing method enables the model to respond more sensitively to changes in variables in the system, especially when approaching the critical point, it can predict and control the generation of disinfection by-products in advance to avoid possible risks. By combining the cumulative effect and the nonlinear threshold effect, a complete ecological prediction model is constructed, which can not only accurately predict the generation of disinfection by-products, but also make dynamic adjustments according to the operating conditions of the system.
[0030] Furthermore, predicting disinfection byproduct concentrations refers to dividing the preprocessed ecological data into a training set and a test set; Substitute the training set into the ecological prediction model and use the least squares method to calibrate the parameters of the ecological prediction model to minimize the prediction error of the model; Evaluate the performance of the model through cross-validation to avoid overfitting; Substitute the test set into the trained ecological prediction model to predict the concentration of disinfection byproducts; The accuracy of the model was evaluated by comparing the DBP concentrations predicted by the model with the DBP concentrations actually detected; Further adjust the model parameters based on the evaluation results; By substituting real-time ecological data into the ecological prediction model, the predicted concentration of disinfection by-products in the future can be obtained.
[0031] By dividing the preprocessed ecological data into training sets and test sets, and using the least squares method to calibrate the parameters of the ecological prediction model, the prediction error of the model is effectively reduced. Overfitting is avoided through cross-validation, ensuring that the model has good generalization ability. By inputting real-time data into the model, the concentration of disinfection by-products in the future can be accurately predicted, thereby improving the accuracy and reliability of the model in practical applications and providing strong support for the optimization of the water treatment process.
[0032] S3, comparing the predicted disinfection byproduct concentration with the set disinfection byproduct concentration threshold to obtain a concentration error, and inputting the concentration error into a PID controller to obtain a control input; Specifically, the predicted disinfection byproduct concentration is compared with the set disinfection byproduct concentration threshold to obtain a concentration error, and the concentration error is input into the PID controller to obtain a control input. The fluctuation of the disinfection byproduct concentration under different conditions is analyzed based on historical ecological data, and the disinfection byproduct concentration threshold is set, and the predicted disinfection byproduct concentration is compared with the disinfection byproduct concentration threshold to obtain the concentration error; The concentration error is input into the PID controller to calculate the control input. The PID controller is a commonly used industrial control system, widely used in the field of automation control, used to adjust the key parameters of various process processes to keep the system output near the set target value. The PID controller includes proportional gain, integral gain and differential gain. The formula of the PID controller is: Where u(t) represents the control input generated at time point t, E(t+Dt) represents the concentration error between the predicted disinfection byproduct concentration and the disinfection byproduct concentration threshold at the future time t+Dt, and K p (t) is the proportional gain, representing the response intensity to the concentration error at time point t, K i (t) is the integral gain, which represents the response intensity to the cumulative concentration error at time point t. is the integral of the error, representing the cumulative concentration error from the initial time point t0 to the time point t, K d (t) is the differential gain, which represents the response intensity to the error change rate at time point t. is the derivative of the error, which indicates the error change rate at the future time point t+Dt; Determine the baseline value of concentration error, error duration, and error change rate through historical ecological data and application scenarios; If the concentration error is higher than the baseline value of the concentration error, increase the value of the proportional gain to speed up the response and quickly reduce the error, such as significantly reducing or increasing the dosage of the agent. If the concentration error is lower than the baseline value of the concentration error, reduce the value of the proportional gain to avoid over-adjustment and maintain stability. Adjustment of proportional gain can balance fast response and system stability, ensuring rapid adjustment when the error is large and avoiding overreaction when the error is small; If the duration of the error is higher than the reference value of the error duration, the value of the integral gain is increased to gradually accumulate the concentration error and correct it. If the duration of the error is lower than the reference value of the error duration, normal operation is maintained. Integral gain adjustment can gradually eliminate errors in long-term operation, avoid continuous deviations, and prevent the negative effects of over-adjustment; If the error change rate is higher than the reference value of the error change rate, the differential gain value is increased to predict the error change in advance and make quick adjustments. If the error change rate is lower than the reference value of the error change rate, the differential gain value is reduced to reduce unnecessary adjustment actions and maintain smooth operation. The adjustment of the differential gain can help the system predict future error trends and make corresponding adjustments in advance to ensure that the system can still maintain stable and precise control when the error changes rapidly.
[0033] By comparing the predicted disinfection byproduct concentration with the set threshold, the concentration error is obtained, and then the error is input into the PID controller for processing. This closed-loop control strategy enables the system to dynamically adjust the dosage of the agent and other operating parameters based on real-time monitoring and prediction, thereby effectively reducing the generation of disinfection byproducts and ensuring water quality safety. The PID controller realizes comprehensive processing of concentration errors by combining the adjustment of proportional gain, integral gain and differential gain. The role of proportional gain is to quickly respond to the current error and ensure that it can respond quickly when the disinfection byproduct concentration deviates from the set value. In this way, when the error is large, measures can be taken quickly to bring the concentration back to the target range as soon as possible. By dynamically adjusting the value of proportional gain, over-adjustment can be avoided when the error is small, thereby maintaining stability and preventing unnecessary disturbances caused by frequent operation adjustments. The role of integral gain is reflected in the correction of accumulated errors. If the system is in a deviation state for a long time, the integral gain can gradually accumulate errors and eliminate this long-term deviation by adjusting the operating parameters. By monitoring the error duration, it can be determined whether the integral gain needs to be increased, thereby achieving more precise control over a long period of time and avoiding continuous deviations in long-term operation. By setting a baseline value for the error duration, excessive adjustments caused by short-term fluctuations can be avoided. The differential gain plays a key role in predicting future error changes. When the error change rate is high, increasing the value of the differential gain can predict the error trend in advance and make quick adjustments to prevent the error from expanding rapidly in a short period of time. This early adjustment mechanism can significantly improve the response speed and ensure stable operation in the face of emergencies. When the error change rate is low, reducing the differential gain can avoid unnecessary adjustment actions and prevent frequent adjustments caused by small error changes, further maintaining the stability of the system.
[0034] S4, using a proportional factor to convert the control input amount into a dosage amount of the agent and input it into the agent dosing pump for automatic dosing; Specifically, using the proportional factor to convert the control input into the amount of drug to be added and input into the drug dosing pump for automatic dosing means defining the maximum dosage Q of the drug dosing pump max And the minimum dosage Q min The maximum value of the control input u max and the minimum value u min , determine the scale factor, the formula is: Among them, K u The proportional factor for converting the control input into the dosage of the reagent; The calculated control input is converted into the dosage of the reagent using the proportional factor, the formula is: Where Q(t) is the dosage of the reagent at time point t, and u(t) represents the control input generated at time point t; The obtained dosage of the agent at the time point t is input into the agent dosing pump for automatic dosing.
[0035] By defining the maximum and minimum dosage of the chemical dosing pump and associating them with the maximum and minimum values of the control input, the proportional factor is determined, and the control input is accurately converted into the chemical dosage. The corresponding chemical dosage can be calculated according to the control input at time point t through the proportional factor and input into the chemical dosing pump to achieve automatic and precise dosing. This method ensures the precise match between the chemical dosage and the control requirements, optimizes the use efficiency of the chemical, and ensures the safety and effectiveness of the water treatment process. Example
[0036] Reference Figure 3 , which is the second embodiment of the present invention, and which is different from the previous embodiment, provides an ecological analysis system based on urban water treatment, including: Initialization module, used to determine ecological data and deploy sensors for testing; Data acquisition module, used to collect ecological data in real time through sensors and perform preprocessing; A model building module is used to build an ecological prediction model based on the pre-processed ecological data to predict the concentration of disinfection by-products; A control calculation module is used to compare the predicted disinfection by-product concentration with the set disinfection by-product concentration threshold to obtain a concentration error, and input the concentration error into a PID controller to obtain a control input; The medicine dosing module is used to use a proportional factor to convert the control input amount into the medicine dosing amount and input it into the medicine dosing pump for automatic dosing.
[0037] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0038] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0039] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0040] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit with a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit with a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0041] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. An ecological analysis method based on urban water treatment, characterized in that: include, Determine ecological data and deploy sensors to collect ecological data in real time and perform preprocessing; Based on the pre-treated ecological data, an ecological prediction model is constructed to predict the concentration of disinfection by-products; The predicted disinfection byproduct concentration is compared with the set disinfection byproduct concentration threshold to obtain a concentration error, and the concentration error is input into the PID controller to obtain a control input; Use the proportional factor to convert the control input into the dosage of the agent and input it into the agent dosing pump for automatic dosing.
2. The ecological analysis method based on urban water treatment according to claim 1, characterized in that: Determining ecological data and deploying sensors refers to determining ecological data that needs to be monitored according to the sorting objectives of urban water treatment, and the ecological data includes indicators such as agent concentration, redox potential, pH value, dissolved oxygen and water temperature; Selecting sensors according to the determined ecological data, the sensors include electrochemical sensors, temperature sensors and online chromatographs; Sensors are deployed at the water source nodes of the water treatment system, which include coagulation tanks, reaction tanks, sedimentation tanks and outlets.
3. The ecological analysis method based on urban water treatment as claimed in claim 2, characterized in that: The real-time collection of ecological data by sensors and preprocessing refers to setting a data collection frequency and collecting ecological data in real time by each sensor; The collected ecological data are preprocessed, including using the Kalman filter algorithm to eliminate noise in the ecological data, applying statistical methods to detect outliers in the ecological data, performing linear interpolation correction on the detected outliers, and using calibration curves to correct the ecological data.
4. The ecological analysis method based on urban water treatment as claimed in claim 3, characterized in that: The constructing of the ecological prediction model according to the preprocessed ecological data refers to normalizing the preprocessed ecological data and converting the indicators of different dimensions to the range of [0,1]; The ecological prediction model was constructed by using a multivariate regression model to predict the generation of disinfection byproduct concentrations; Establish the basic model, the formula is: Where A(t) represents the concentration of disinfection byproducts at time point t, X i (t) represents the value of the i-th indicator at time point t, k i is the regression coefficient of the ith indicator, is the error term, n is the total number of indicators in the ecological data; Calculate the cumulative effect value B(t) of each indicator on the concentration of disinfection by-products at time point t, the formula is: Wherein, P(t) represents the concentration of the reagent at time point t, O(t) represents the redox potential at time point t, H(t) represents the pH value at time point t, D(t) represents the concentration of dissolved oxygen at time point t, and T(t) represents the water temperature at time point t; The nonlinear threshold effect of each indicator on the concentration of disinfection by-products at time point t is calculated by the sigmoid function, and the comprehensive nonlinear impact value C(t) of all indicators is obtained. The formula is: in, represents the maximum impact of the i-th indicator of ecological data on the concentration of disinfection by-products, a i represents the slope of the sigmoid function, X i (t) represents the value of the i-th indicator at time point t, b i represents the critical value of the ith indicator of ecological data, and n is the total number of indicators in the ecological data; Construct a complete ecological prediction model formula, the formula is: Among them, B( ) represents the cumulative effect of each index on the concentration of disinfection by-products within a time interval, d Represents the integral variable A small increment of , t0 is the initial time point, is the error term.
5. The ecological analysis method based on urban water treatment as claimed in claim 4, characterized in that: The prediction of disinfection byproduct concentration refers to dividing the pre-processed ecological data into a training set and a test set; Substitute the training set into the ecological prediction model and use the least square method to calibrate the parameters of the ecological prediction model; Evaluate the performance of the model through cross-validation; Substitute the test set into the trained ecological prediction model to predict the concentration of disinfection byproducts; The accuracy of the model was evaluated by comparing the DBP concentrations predicted by the model with the DBP concentrations actually detected; Further adjust the model parameters based on the evaluation results; By substituting real-time ecological data into the ecological prediction model, the predicted concentration of disinfection by-products in the future can be obtained.
6. The ecological analysis method based on urban water treatment according to claim 5, characterized in that: The step of comparing the predicted disinfection byproduct concentration with the set disinfection byproduct concentration threshold to obtain a concentration error, and inputting the concentration error into the PID controller to obtain a control input refers to analyzing the fluctuation of disinfection byproduct concentrations under different conditions based on historical ecological data, setting a disinfection byproduct concentration threshold, and comparing the predicted disinfection byproduct concentration with the disinfection byproduct concentration threshold to obtain a concentration error; The concentration error is input into the PID controller to calculate the control input. The PID controller includes proportional gain, integral gain and differential gain. The formula is: Where u(t) represents the control input generated at time point t, E(t+Dt) represents the concentration error between the predicted disinfection byproduct concentration at the future time point t+Dt and the disinfection byproduct concentration threshold, and K p (t) is the proportional gain, representing the response intensity to the concentration error at time point t, K i (t) is the integral gain, which represents the response intensity to the cumulative concentration error at time point t, K d (t) is the differential gain, which represents the response intensity to the error change rate at time point t, dE(t+Dt) represents the small change in the concentration error at the future time point t+Dt, and dt represents the small increment at time point t; Determine the baseline value of concentration error, error duration, and error change rate through historical ecological data and application scenarios; If the concentration error is higher than the reference value of the concentration error, the value of the proportional gain is increased; if the concentration error is lower than the reference value of the concentration error, the value of the proportional gain is decreased; If the duration of the error is higher than the reference value of the error duration, the value of the integral gain is increased; if the duration of the error is lower than the reference value of the error duration, normal operation is maintained; If the error change rate is higher than the reference value of the error change rate, the value of the differential gain is increased, and if the error change rate is lower than the reference value of the error change rate, the value of the differential gain is decreased.
7. The ecological analysis method based on urban water treatment according to claim 6, characterized in that: The use of the proportional factor to convert the control input amount into the amount of medicine to be added and input into the medicine dosing pump for automatic dosing means defining the maximum dosage Q of the medicine dosing pump max And the minimum dosage Q min The maximum value of the control input u max and the minimum value u min , determine the scale factor, the formula is: Among them, K u The proportional factor for converting the control input into the dosage of the reagent; The calculated control input is converted into the dosage of the reagent using the proportional factor, the formula is: Where Q(t) is the dosage of the reagent at time point t, and u(t) represents the control input generated at time point t; The obtained dosage of the agent at the time point t is input into the agent dosing pump for automatic dosing.
8. An ecological analysis system based on urban water treatment based on the ecological analysis method based on urban water treatment according to any one of claims 1 to 7, characterized in that: include, Initialization module, used to determine ecological data and deploy sensors for testing; Data acquisition module, used to collect ecological data in real time through sensors and perform preprocessing; A model building module is used to build an ecological prediction model based on the pre-processed ecological data to predict the concentration of disinfection by-products; A control calculation module is used to compare the predicted disinfection by-product concentration with the set disinfection by-product concentration threshold to obtain a concentration error, and input the concentration error into a PID controller to obtain a control input; The medicine dosing module is used to use a proportional factor to convert the control input amount into the medicine dosing amount and input it into the medicine dosing pump for automatic dosing.
9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that when the processor executes the computer program, the steps of the ecological analysis method based on urban water treatment described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the ecological analysis method based on urban water treatment according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for predicting concentration of disinfection by-product haloacetic acid in water supply system
CN110287651A
Zero-valent iron-based mechanochemical wastewater treatment method
CN117486344A
Drug adding control method, device and equipment based on deep learning
CN118183889A
Waterlogging model creation method and system applied to urban water treatment
CN118627407A
Control system for injecting disinfectant in water service
JP2015202446A
Cited By
Rock wool production line control method and system
CN120010423A
Optimized fermentation control method for winter warm type greenhouse organic garbage treatment and application
CN120295100A
Intelligent circulating water operation management and control method and system
CN120579724A