Proportional-integral-based coagulant dosage feed-forward adaptive optimization device
By using a feedforward adaptive optimization device for coagulant dosage based on proportional integral during the water treatment process, the problem of difficulty in real-time adjustment and optimization of coagulant dosage in the prior art is solved, and efficient and accurate water treatment effect is achieved, reducing the cost of water enterprises.
Patent Information
- Application Number
- CN202510071252.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
During the water treatment process, it is difficult for the prior art to adjust and optimize the amount of coagulant in real time, resulting in the effluent water quality not meeting the standards and increasing the costs of water enterprises.
The feedforward adaptive optimization device for coagulant dosage is adopted based on proportional integral. The dosage of coagulant is automatically adjusted by collecting raw water turbidity, evaluating turbidity fluctuations, judging dynamic state, implementing PI feedforward precompensation strategy, selecting dosage, performing cup-can coagulation, collecting post-sink turbidity, judging static state, and performing monotonic detection and optimization strategies.
Real-time adjustment and optimization of the coagulant dosage is achieved, the operation efficiency and accuracy of the water treatment process are improved, and the experimental operation workload and cost of water enterprises are reduced.
Smart Images

Figure CN119990625A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of coagulation process of water treatment, and in particular relates to a coagulant dosage feedforward adaptive optimization device based on proportional integral. Background Art
[0002] With the rapid development and popularization of urbanization and industrialization, water pollution and shortage have gradually become one of the important problems facing today's society. Therefore, water treatment technology is the key to solving water resource problems. Generally, the water treatment technology process mainly includes coagulation, sedimentation, filtration and disinfection, and the coagulation process is one of the most important links, which deeply affects the final effect of water treatment. Generally speaking, the coagulation process includes mixing and flocculation, and flocculation is the most important process in this process.
[0003] In the flocculation process, the flocculation effect of water quality is affected by multiple factors such as water temperature, pH value, type of coagulant, amount of coagulant added and hydraulic conditions. However, in the actual production process of water companies within a certain period of time, external water quality conditions such as water temperature, pH value and hydraulic conditions are usually basically fixed and unchanged, and have a limited impact on the real-time flocculation effect of water companies; in addition, in the daily flocculation process of water companies, coagulants must be purchased in advance, so the type of coagulant is also highly determined. In short, in a normally operating water company, compared with factors such as water temperature, pH value, and type of coagulant, the amount of coagulant added is the factor that has the greatest impact on the flocculation effect of water quality.
[0004] In the flocculation process, the amount of coagulant added directly determines the final flocculation effect of the water quality, which in turn affects the overall effluent quality of the water plant. This means that if less coagulant is added, the turbidity of the raw water quality after sedimentation will be higher, greatly reducing the effluent quality of the water company; on the contrary, if the amount of coagulant added is too much, the economic benefits and effluent quality of the water company will face varying degrees of decline. Therefore, in the flocculation process, how to determine the appropriate amount of coagulant added has always been the core issue of flocculation process research in water treatment technology. In order to solve this problem, scholars at home and abroad have made a lot of attempts and efforts. However, so far, these attempts and efforts have not completely solved the problem of the optimal coagulant dosage for different raw water qualities. The reason is that, affected by factors such as water temperature, pH value, type of coagulant and hydraulic conditions, the relationship between the coagulant dosage and the flocculation effect of different raw water qualities shows the characteristics of nonlinearity, time lag and time variation. For example, in the flocculation process, the raw water needs to flow slowly through a very long horizontal flow sedimentation tank, and the water quality indicators can be obtained through the sensor at the tail of the horizontal flow sedimentation tank. Therefore, there is a time delay of 1 to 2 hours between the addition of coagulant and the coagulation result. This phenomenon is also called the large time lag phenomenon.
[0005] In the daily production process, in order to determine the appropriate amount of coagulant, water companies use a common beaker experiment method. The specific steps of this method are as follows: First, researchers conduct a six-beaker experiment in the laboratory. This experiment treats six groups of the same raw water by adding different doses of coagulants; Second, after sufficient stirring, reaction and waiting, the researchers complete the flocculation and sedimentation process of the six beaker experiments; Third, the researchers accurately measure the turbidity of the supernatant of the water samples in all beakers, that is, the turbidity after sedimentation, and use these data to study the functional relationship between different coagulant dosages and the turbidity of water samples after sedimentation; Fourth, based on the rich experience of technicians, the relationship data between the turbidity after sedimentation and the coagulant dosage is corrected to determine the optimal coagulant dosage corresponding to the current raw water quality. By executing all the steps described above, water companies provide a certain reference basis for the treatment of different raw water qualities.
[0006] At present, the six-beaker experiment can obtain the dosage of coagulant suitable for different raw water qualities, which basically meets the daily water treatment needs of water treatment companies. However, this method still has the following disadvantages:
[0007] First, the dosage of coagulant in the flocculation process is often excessive. This is because the adjustment of the dosage of coagulant often cannot match the changes in the incoming water in real time. In order to ensure that the effluent quality meets the standards, water companies usually need to add excessive amounts of coagulants, and this practice has brought many negative effects to water companies. First, excessive coagulants seriously increase the cost of purchasing reagents for water companies; second, excessive coagulants interact with the added reagents of other processes, which directly leads to a corresponding increase in the cost of subsequent treatment. For example, excessive PAC (polyalumina) is added to the water, resulting in excessive residual aluminum ions in the water, which increases the treatment cost of water companies.
[0008] Second, the coagulant dosage results are heavily dependent on the operator's experience and judgment, reducing the accuracy and reliability of the beaker experiment. This is because, in the beaker experiment, the adjustment of water temperature, the initial humidity of the beaker, the mixing and stirring speed of the solution, the addition time and specific amount of the coagulant and other operating details may have a certain impact on the flocculation effect of the water quality, which leads to different operators being likely to obtain very different experimental results. At this time, the coagulant dosage depends on the operator's experimental habits, experience or judgment, which greatly reduces the accuracy and reliability of the beaker experiment.
[0009] Third, the six-beaker test cannot cope with the problem of sudden changes in raw water quality, and it is difficult to ensure that the effluent quality of water companies meets the standards. This is mainly reflected in the reservoir discharge caused by sudden heavy rains, the overflow of reservoirs caused by insufficient water, and the adjustment or change of the output and process of sewage discharge enterprises, which can cause the turbidity of raw water to soar from a few NTU to hundreds to thousands of NTU in a short period of time. These sudden changes require water companies to adjust the dosage of coagulants in a timely and accurate manner. However, affected by the details of artificial experimental operations, it is difficult for the six-beaker test to accurately and efficiently determine the optimal dosage of coagulants, which is likely to reduce the effluent quality of water companies and make it difficult to meet national or local standards, thereby increasing the administrative fines costs of water companies.
[0010] In view of the above reasons, water companies are in urgent need of an automatic optimization algorithm for coagulant dosage based on an intelligent cup-tank coagulation device to achieve real-time adjustment and optimization of coagulant dosage. Summary of the invention
[0011] In order to solve the above problems existing in the prior art, the present invention provides a feedforward adaptive optimization device for coagulant dosage based on proportional integral. The technical problem to be solved by the present invention is achieved through the following technical solutions:
[0012] A feedforward adaptive optimization device for coagulant dosage based on proportional integral includes:
[0013] Collection module, used to collect raw water turbidity;
[0014] The fluctuation assessment module is used to obtain the difference between the raw water turbidity and the raw water turbidity of the previous round and the difference ratio, and determine the turbidity change state according to the difference;
[0015] A dynamic judgment module is used to determine whether to adopt the PI optimization strategy or the binary optimization strategy according to the turbidity change state, and the stable dosage dynamically tracked by the binary optimization strategy;
[0016] PI feedforward precompensation strategy, used to calculate the feedforward precompensation dosage based on the difference ratio, and calculate the next round of PI segment dosage using the feedforward precompensation dosage and the total increased dosage;
[0017] A dosage selection module is used to select the dosage of the current round from the monotonic detection dosage, the stable dosage, the next round PI segment dosage and the binary dosage;
[0018] The cup coagulation module is used to add coagulant into the cup according to the dosage selected in this round until the coagulation is completed;
[0019] The collection module is used to collect the turbidity of water after the current round of coagulation is completed;
[0020] The static state judgment module is used to judge the state of the post-settling turbidity of the current round according to the post-settling turbidity collected by the collection module;
[0021] The monotonic detection strategy module is used to calculate the monotonic verification increment according to whether the consecutive rounds of the PI strategy reach the round threshold, and calculate the monotonic detection dosage according to the interval in which the monotonic verification increment is located;
[0022] PI optimization strategy module, used to calculate the total increase in dosage using the difference between the turbidity after sedimentation and the turbidity upper warning line value;
[0023] BM optimization strategy module, used to find the binary value dosage using BM optimization strategy according to the state of turbidity after sedimentation in the current round;
[0024] The parameter update module is used to update the dosage, error, current tracking identifier and raw water turbidity.
[0025] Beneficial effects:
[0026] The present invention provides a coagulant dosage feedforward adaptive optimization device based on proportional integral, the device includes: an acquisition module, a fluctuation evaluation module, a dynamic state judgment module, a PI feedforward pre-compensation strategy module, a dosage selection module, a cup filling module, a static state judgment module, a monotonic detection strategy module, a PI optimization strategy module, a BM optimization strategy module and a parameter update module, all modules cooperate with each other according to the fitting curve relationship between the dosage and the coagulation effect, by executing different dosage search strategies, to obtain the optimal flocculant dosage suitable for the current water quality and having the best coagulation effect. Compared with the classic six-beaker test method, the present invention can not only save the experimental operation workload of water companies, but also obtain the flocculant dosage that achieves the same post-settling turbidity, fully improve the operating efficiency and accuracy of the coagulation process, thereby improving the work efficiency and economic benefits of water companies.
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a fitting curve diagram of the relationship between the turbidity after sedimentation and the amount of flocculant added provided by the present invention;
[0029] Figure 2 It is a schematic diagram of a feedforward adaptive optimization device for coagulant dosage based on proportional integral provided by the present invention;
[0030] Figure 3 It is a schematic diagram of the execution flow of the fluctuation assessment module provided by the present invention;
[0031] Figure 4It is a schematic diagram of the execution flow of the dynamic state judgment provided by the present invention;
[0032] Figure 5 It is a schematic diagram of the execution flow of the PI feedforward pre-compensation strategy module provided by the present invention;
[0033] Figure 6 It is a schematic diagram of the execution flow of the dosage selection module provided by the present invention;
[0034] Figure 7 It is a schematic diagram of the execution flow of the static state judgment module provided by the present invention;
[0035] Figure 8 It is a schematic diagram of the execution flow of the monotonic detection strategy module provided by the present invention;
[0036] Fig. 9 It is a schematic diagram of the execution flow of the P1 optimization strategy module provided by the present invention;
[0037] Fig.10 It is a schematic diagram of the execution flow of the BM optimization strategy module provided by the present invention;
[0038] Fig.11 It is a schematic diagram of the execution flow of the parameter updating module provided by the present invention. DETAILED DESCRIPTION
[0039] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.
[0040] The present invention makes the following basic assumptions:
[0041] According to multiple rounds of verification of intelligent cup coagulation experiments, for the same raw water quality, there is a regularity in the relationship between the coagulation effect parameters represented by the post-settlement turbidity and the flocculant dosage. In the process of gradually increasing the flocculant dosage, the post-settlement turbidity first shows a trend of significant decrease. At this time, a small amount of flocculant reacts chemically with some suspended matter, organic matter, heavy metal particles and other impurities in the water to form a large number of flocs. When the flocculant dosage continues to increase, the post-settlement turbidity first decreases to a smaller value, and then continues to increase slowly. In this process, an appropriate amount of flocculant forms more flocs with most of the impurities to be treated in the water, which fully reduces the post-settlement turbidity of the water quality. However, when too much flocculant is added, the excess flocculant gradually becomes an impurity component in the water, while increasing the post-settlement turbidity of the water quality, causing the deterioration of the water quality coagulation effect and the waste of flocculant. In short, in order to formulate a search strategy for the flocculant dosage, the present invention provides a fitting curve of the relationship between the post-settlement turbidity and the flocculant dosage as the basic assumption for the subsequent automatic optimization strategy, such as Figure 1 As shown. Figure 1It can be seen that when the turbidity after sedimentation reaches the target turbidity for the first time, the amount of flocculant added to the raw water quality is small, which is the optimal flocculant dosage corresponding to the current water quality, corresponding to Figure 1 Point A marked in the figure.
[0042] refer to Figure 2 The present invention provides a feedforward adaptive optimization device for coagulant dosage based on proportional integral, comprising:
[0043] Collection module, used to collect raw water turbidity;
[0044] The fluctuation assessment module is used to obtain the difference between the raw water turbidity and the raw water turbidity of the previous round and the difference ratio, and determine the turbidity change state according to the difference;
[0045] A dynamic judgment module is used to determine whether to adopt the PI optimization strategy or the binary optimization strategy according to the turbidity change state, and the stable dosage dynamically tracked by the binary optimization strategy;
[0046] PI feedforward precompensation strategy, used to calculate the feedforward precompensation dosage based on the difference ratio, and calculate the next round of PI segment dosage using the feedforward precompensation dosage and the total increased dosage;
[0047] A dosage selection module is used to select the dosage of the current round from the monotonic detection dosage, the stable dosage, the next round PI segment dosage and the binary dosage;
[0048] The cup tank coagulation module is used to add coagulant into the cup according to the dosage selected in this round until the coagulation is completed.
[0049] The collection module is used to collect the turbidity of water after the current round of coagulation is completed;
[0050] The static state judgment module is used to judge the state of the post-settling turbidity of the current round according to the post-settling turbidity collected by the collection module;
[0051] The function of the static judgment module is to judge whether the turbidity after sedimentation is too high, too low or optimal after the coagulation experiment. The turbidity after sedimentation collected by the water quality sensor is rounded off to one decimal place.
[0052] The monotonic detection strategy module is used to calculate the monotonic verification increment according to whether the consecutive rounds of the PI strategy reach the round threshold, and calculate the monotonic detection dosage according to the interval in which the monotonic verification increment is located;
[0053] When the PI optimization strategy is executed too many times in a row and the number of rounds Numb_PI is greater than the threshold NP_Thre, it is necessary to judge the monotonicity of the function between the post-settling turbidity of the current round and the amount of flocculant added based on the results of the intelligent cup coagulation experiment of the adjacent rounds.
[0054] PI optimization strategy module, used to calculate the total increase in dosage using the difference between the turbidity after sedimentation and the turbidity upper warning line value;
[0055] The PI optimization strategy module calculates the system control quantity through the error proportion and error integral, that is, the proportional control quantity and the error integral control are calculated through the difference e_SS(t) between the post-settling turbidity PT and the turbidity upper warning line r_up, thereby controlling the dosage of the reagent.
[0056] BM optimization strategy module, used to find the binary value dosage using BM optimization strategy according to the state of turbidity after sedimentation in the current round;
[0057] According to the design of the overall process, when the algorithm completes the PI strategy search, that is, e_SS(t)≤0, the flocculant dosage in the current round is Figure 1 Between point A and point B, and the amount of flocculant added in the previous round is between Figure 1 In order to approach point A with the optimal flocculant dosage, this algorithm adopts a binary search method with high search efficiency. At the same time, the flocculant dosage of two adjacent rounds is used as the input parameter, and the BM optimization strategy is used to find the binary value dosage.
[0058] The parameter update module is used to update the dosage, error, current tracking identifier and raw water turbidity.
[0059] After PI strategy optimization or BM strategy optimization, the dosage of flocculant has been determined. At this time, the algorithm-related parameters should be updated for comparison in the next round of search.
[0060] Specific reference Figure 2 ,exist Figure 2 In the process, the parameters are initialized first, and then the raw water is collected. Then, the raw water turbidity RT(t) is obtained through the water quality sensor probe, and t represents the current experimental round. In addition, Numb is equal to the experimental round. If it is the first experiment, that is, Numb=1, then the dosage Dos(t) is obtained by looking up the table, and t represents the current experimental round. If Numb>1, enter the adaptive optimization mode.
[0061] First, the 8-fluctuation assessment module is used to evaluate the raw water fluctuation state. According to the fluctuation state, the dynamic parameters are updated in the 9-dynamic judgment module. Then, according to the raw water state, the dosage feedforward pre-compensation is performed in the 10-PI feedforward pre-compensation module. After completing the PI turbidity dosage pre-compensation, enter the 11-dosage selection module. This module selects different strategies according to different dosage states and gives a new round of cup tank coagulation experiment agent dosage Dos(t).
[0062] The intelligent cup coagulation device adds the response agent, performs the coagulation experiment, and collects the final post-settling turbidity PT(t) of the supernatant of the water. In the 3-static state judgment module, it is determined that the dosage optimization strategy should be selected and the relevant parameters should be updated. If the continuous optimization round Numb_PI in the PI optimization section exceeds the threshold NP_Thre, it enters the 4-linear detection area to verify whether the dosage and the post-settling turbidity are in a monotonic relationship interval. Preferably, NP_Thre=3.
[0063] After completing the linear verification, the 5-PI segment dosage calculation module gives the dosage iteration under the PI strategy, and the 6-BI segment dosage calculation module gives the dosage iteration under the BI strategy. Finally, the network parameters are updated and the next round of iteration begins.
[0064] In a specific embodiment of the present invention, reference Figure 3 , the fluctuation assessment module is used to:
[0065] The difference RT_diff between the water turbidity of adjacent iterations is obtained, which is expressed as: RT_diff = RT - RT (t-1);
[0066] If RT_diff is not less than 0, it means that the turbidity of the water remains unchanged or is increasing, and the difference ratio RT_diff_rate=RT_diff / RT(t-1) is determined; if RT_diff is greater than 0, the difference ratio RT_diff_rate=RT_diff / RT is determined;
[0067] It is determined whether the absolute value of RT_diff is greater than the turbidity fluctuation threshold Tru_Fluc_The. If so, the excessive fluctuation flag Exc_Fluc=1 is set, otherwise the excessive fluctuation flag Exc_Fluc=0 is set. Preferably, Tru_Fluc_Ther=3.
[0068] In a specific embodiment of the present invention, reference Figure 4 , the dynamic judgment module is used to:
[0069] Determine whether the excessive fluctuation indicator Exc_Fluc is greater than 0. If so, it means that the water quality of this round of raw water has changed significantly compared with the previous round of raw water. Then set INC to 1, the dynamic tracking strategy identifier Track_Dyn to 0, the PI optimization strategy dynamic identifier PI_Opt_Dyn to 1, and the binary optimization strategy dynamic identifier BM_Goon_Dyn to 0. At this time, no matter which optimization strategy the system was in before, it is forced to change to the PI optimization strategy.
[0070] If the excessive fluctuation flag Exc_Fluc is not greater than 0, set Track_Dyn=BM_Goon_SS-DB_Again, PI_Opt_SS, PI_Opt_Dyn=PI_Opt_SS and BM_Goon_Dyn=BM_Goon_SS;
[0071] Among them, BM_Goon_SS is the static binary optimization strategy identifier, DB_Again is the binary optimization strategy identifier again, BM_Goon_Dyn is the dynamic binary optimization strategy identifier, and BM_Goon_SS is the static binary optimization strategy identifier BM_Goon_SS;
[0072] Calculate the dynamic tracking strategy start flag Track_Dyn_Opt equal to Track_Dyn minus the previous round of Track_Dyn(t-1);
[0073] Determine whether the dynamic tracking strategy start flag Track_Dyn_Opt is greater than 0. If so, it means that the system enters dynamic tracking for the first time, and then determine that the stable dosage Stab_Dos of the coagulant in the current iteration is equal to the dosage Dos(t-1) in the previous iteration;
[0074] If Track_Dyn_Opt is equal to 0, it is determined whether Track_Dyn is greater than 0. If so, it means that it is in dynamic tracking, and Stab_Dos is determined to remain unchanged. If Track_Dyn is equal to 0, it means that the system has jumped out of the dynamic tracking strategy, and Stab_Dos is determined to be 0.
[0075] In a specific embodiment of the present invention, reference Figure 5 , the PI feedforward pre-compensation strategy is used to:
[0076] The water change rate activation function RT_dr_Com=RT_diff_rate / [1+abs(RT_diff_rate)] is calculated using the difference ratio between the water turbidities of adjacent iterations, and the nonlinear activation function K_f=RT_dr_Com / [1+abs(RT_dr_Com)] is calculated using RT_dr_Com; wherein RT_diff_rate is the difference ratio of the turbidities of adjacent rounds;
[0077] Determine whether RT_dr_Com is greater than 0. If so, set the raw water turbidity change direction identifier Cha_dire to 1, indicating that the turbidity is rising;
[0078] If RT_dr_Com is not greater than 0, determine whether RT_dr_Com is less than 0. If so, set Cha_dire to -1, indicating that the turbidity decreases;
[0079] If RT_dr_Com is equal to 0, then set Cha_dire to 0, indicating that the turbidity remains unchanged;
[0080] Calculate the feedforward pre-compensation dosage Kp_fluc=Dos(t-1)*RT_dr_Com*K_f*Cha_dire; where Dos(t-1) is the dosage of the coagulant in the previous round;
[0081] The feedforward precompensation dosage Kp_fluc is used to calculate the proportional total increase dosage DosC_P_Fianl when the turbidity increases and the turbidity decreases; wherein DosC_P_Fianl=Kp_fluc(t)+DosC_Tatol when the turbidity increases, and DosC_P_Fianl=DosC_Tatol when the turbidity decreases; Kp_fluc(t) is the feedforward precompensation dosage, and DosC_Tatol is the total increase dosage;
[0082] DosC_P_Fianl is used to calculate the final increase in the amount of coagulant added DosC, and DosC is used to calculate the dosage Dos_PI of the next round PI segment; wherein, DosC = K_Tatol*(DosC_P_Fianl+DosC_I); wherein, K_Tatol is the preset overall scaling factor, and DosC_I is the integral increase term; Dos_PI = K_Tatol*(Dos+DosC), Dos is the dosage of the current round, preferably, K_Tatol = 1.2.
[0083] In a specific embodiment of the present invention, reference Figure 6 , the dosage selection module is used to:
[0084] If the monotonic area identifier is 1, the monotonic detection dosage Dos_INC is selected as the dosage of the current round;
[0085] If the identifier Track_Dyn in the current tracking is 1, the stable dosage Stab_Dos is selected as the dosage of the current round;
[0086] If the PI optimization strategy dynamic flag PI_Opt_Dyn is 1, the dosage of the next PI segment is selected as the dosage of the current round;
[0087] If the dynamic binary strategy identifier BM_Goon_Dyn is 1, the final binary value dosage D_Midd_Fiinal is selected as the dosage of the current round.
[0088] Otherwise, the system reports an error.
[0089] In a specific embodiment of the present invention, reference Figure 7 , the static state judgment module is used to:
[0090] Calculate the difference e(t) between the post-settlement turbidity PT(t) collected by the collection module and the target turbidity TT, as well as the difference e_SS(t) with the upper warning line value r_up of the post-settlement turbidity; wherein TT is 1, 2 or 10NTU, r_up=TT-Thre_up, Thre_up is the upper warning line threshold, preferably, Thre_up is 0.1 or 0.2.
[0091] Query the linear detection state flag In_detec, and determine whether to enter the linear detection state according to In_detec; where In_detec is 1 for entering, and 0 for not entering;
[0092] If the linear detection state is entered, it is determined whether the post-settling turbidity PT(t) is less than the post-settling turbidity PT_Inc used for linear detection comparison; if it is less than, it means that the corresponding relationship between the dosage and the post-settling turbidity is within the monotonic interval, and the linear area identifier INC is set to 1, otherwise it is set to 0, indicating that the dosage has exceeded the linear interval; when the dosage exceeds the linear interval, the dosage under the current round PI strategy is set to Dos_PI(t) = Dos(t)*K_Redu, K_Redu is the reduction coefficient;
[0093] If the linear detection state is not entered, it is determined whether e_SS(t) is greater than 0. If it is greater than 0, Tue_Qua_H is set to 1 and Find_DB_SS is set to 0; Tue_Qua_H is the mark of excessive turbidity after sedimentation, and Find_DB_SS is the mark of turbidity after sedimentation being lower than the upper warning line, higher than the lower warning line, and in the best interval;
[0094] If e_SS(t) is less than or equal to 0, it means the post - sedimentation turbidity PT(t) has reached the standard. Set Tue_Qua_OK to 1. Tue_Qua_OK = 1 represents that the post - sedimentation turbidity meets the requirements. Judge whether PT < r_low holds. If it holds, set Tue_Qua_L to 1 and set Find_DB_SS to 0. If PT >= r_low holds, set Find_DB_SS to 1, indicating that the post - sedimentation turbidity is in the optimal range. r_low is the lower warning line value of the post - sedimentation turbidity; r_low = TT - Thre_low, where Thre_low is the lower warning line threshold; Tue_Qua_L is the identifier for too low post - sedimentation turbidity; Thre_low is 0.1 or 0.2.
[0095] If Find_DB_SS > 0, set Track_SS to 1. Track_SS is the identifier in static tracking. Track_SS = 1 represents that the current dosing amount is the optimal dosing amount, and the dosing amount adjustment strategy enters the tracking state.
[0096] If Find_DB_SS = 0, judge whether the continuous over - standard identifier CES is 1. If CES = 1, it means that in the previous tracking strategy, the post - sedimentation turbidity of the current round has continuously exceeded the standard, then set Track_SS to 0. If CES = 0 and Tue_Qua_L = 1, it means that the post - sedimentation turbidity is too low and the dosing amount is too large, then set Track_SS to remain unchanged.
[0097] Merge the states of Find_DB_SS and Track_SS into Track_SS, which means: Track_SS = Find_DB_SS + Track_SS.
[0098] Judge whether Tue_Qua_OK is equal to 0. If it is equal to 0, then judge whether BM_Goon_SS is 0. If BM_Goon_SS is equal to 0, it means the system is not in the dichotomy optimization strategy. Set PI_Opt_SS to 1 and increase Numb_PI by 1 at the same time. Here, BM_Goon_SS is the static dichotomy strategy identifier, PI_Opt_SS is the identifier for the static PI segment strategy, and Numb_PI is the continuous round number of the PI segment.
[0099] If Tue_Qua_OK > 0 or BM_Goon_SS > 0, set PI_Opt_SS to 0 and clear Numb_PI, representing that the system enters the dichotomy optimization strategy.
[0100] In the dichotomy optimization strategy, if BM_Goon_SS = 0, set BM_ACT_SS to 1, otherwise set it to 0. BM_ACT_SS is the identifier that the post - sedimentation turbidity PT meets the static dichotomy strategy.
[0101] If BM_ACT_SS is equal to 1, the static binary strategy flag BM_Goon_SS is set to 1, and then the states of BM_Goon_SS and BM_ACT_S are merged into BM_Goon_SS, which is expressed as BM_Goon_SS=BM_Goon_SS+BM_ACT_SS; otherwise, if BM_ACT_SS is equal to 0, and the continuous exceeding flag CES is 0, BM_Goon_SS remains unchanged, indicating that the system is still in the binary large strategy. If the continuous exceeding flag CES is 1, BM_Goon_SS is set to 0 and PI_Opt_SS is set to 1, Numb_PI is increased by 1, the system re-enters the PI optimization strategy and the states of BM_Goon_SS and BM_ACT_S are merged into BM_Goon_SS, which is expressed as: BM_Goon_SS=BM_Goon_SS+BM_ACT_SS;
[0102] If Tue_Qua_H is 1, EU_Numb increases by 1, otherwise, EU_Numb is set to 0. EU_Numb is the number of times the post-settling turbidity PT exceeds the upper warning limit r_up continuously;
[0103] Determine whether EU_Numb is greater than EUN_Thre, where EUN_Thre is the threshold value of the number of times exceeding the upper limit of the warning; preferably, EUN_Thre is 3; if EU_Numb>EUN_Thre, it means that the turbidity after sedimentation exceeds the upper limit of the turbidity warning for multiple consecutive times, then the continuous exceeding flag CES is set to 1, and then EU_Numb is reset to zero; if EU_Numb<=EUN_Thre, CES is set to 0;
[0104] Determine whether BM_Goon_SS is equal to 1. If it is equal to 1, determine whether Tue_Qua_L is equal to 1. If it is equal to 1, set DB_Again to 1. DB_Again is a binary flag again, which means that under the tracking strategy, if the post-settling turbidity PT is lower than the turbidity warning lower limit, the binary optimization strategy is started again; if BM_Goon_SS=0 or BM_Goon_SS=1, Tue_Qua_L=0, set DB_Again=0, indicating that the system is in the PI optimization strategy or in the tracking mode, and there is no need to start the binary optimization strategy;
[0105] The turbidity of the water in this round is assigned to RT(t-1), which is expressed as RT(t-1)=RT.
[0106] In a specific embodiment of the present invention, reference Figure 8 , the monotonic detection strategy module is used to:
[0107] Determine whether the continuous round Numb_PI of the PI strategy is greater than the round threshold NP_Thre. If so, set In_detec to 1 and set the monotonic verification increment Min_Inc = Dos(t)*K_M; K_MI is the linearity verification increment coefficient; preferably, NP_Thre = 3.
[0108] When Numb_PI>NP_Thre, In_detec is set to 1. In_detec 1 indicates that the linear detection state has been entered. According to the numerical value of the turbidity after sedimentation between adjacent rounds, the algorithm can determine the monotonicity between the turbidity after sedimentation and the dosage of the current round, that is, determine whether the dosage of the flocculant in the current round is within Figure 1 Point A and point B correspond to the left or right of the dosage value. During the search process, if the current round dosage is Figure 1 To the left of point A, the automatic optimization algorithm continues to increase the value of the difference between the dosages of adjacent rounds according to the PI strategy and continues the next round of dosage experiment. Otherwise, the current round dosage is Figure 1 To the right of point B, the algorithm needs to return to a lower dosage and continue the next round of search.
[0109] Because the current dosage varies within a large range, it is necessary to constrain the upper and lower limits of Min_Inc.
[0110] Determine whether Min_Inc is less than the monotonic verification increment lower limit Min_Inc_LL. If so, set Min_Inc to Min_Inc_LL;
[0111] If Min_Inc is not less than the monotonic verification increment lower limit Min_Inc_LL, then determine whether Min_Inc is greater than the monotonic verification increment upper limit Min_Inc_UL. If so, set Min_Inc to Max_Inc_UL; if not, set Min_Inc = Dos(t)*K_MI, where Dos(t) is the dosage of the current round; preferably Min_Inc_LL = 3, Max_Inc_UL = 10;
[0112] Calculate the dosage of monotonic detection Dos_INC(t)=Dos(t)+Min_Inc;
[0113] The post-settling turbidity PT_Inc for monotonic detection comparison is set equal to the post-settling turbidity PT(t) collected in the current round, which is convenient for comparison in the next round.
[0114] In a specific embodiment of the present invention, reference Fig. 9 , the PI optimization strategy module is used to:
[0115] Determine whether the static PI segment strategy flag PI_Opt_SS is 0. If so, do not start the PI optimization strategy, and set the PI strategy continuous round Numb_PI to 0; if PI_Opt_SS is 1, start the PI optimization strategy, and add 1 to Numb_PI;
[0116] Calculate the basic ratio Kp_Basic = Dos(t) / [RT(t)-PT(t)], where the current dosage is divided by the difference between the raw water turbidity and the turbidity after sedimentation; where Dos(t) is the dosage of the current round, RT(t) is the raw water turbidity, and PT(t) is the turbidity after sedimentation;
[0117] Calculate the basic change in dosage DosC_Basic = Kp_Basic*e_SS(t); where e_SS(t) is the difference between the turbidity after sedimentation and the turbidity upper warning line value;
[0118] Calculate the error ratio e_pro = e_SS(t) / r_up; where r_up is the upper warning line value of turbidity after sedimentation;
[0119] Calculate the static increase dosage DosC_P_Sta = Kp_Basic*e_pro;
[0120] Determine whether the raw water turbidity fluctuates. If not, set the dynamic ratio Kp_dyn=1; otherwise, set Kp_dyn=abs[RT(t)-RT(t-1)] / [PT(t)-PT(t-1)];
[0121] Determine whether e_SS(t)>0 is true, if so, calculate DosC_P_Dyn(t)=abs(e_SS(t)*Kp_dyn), otherwise, calculate DosC_P_Dyn(t)=e_SS(t)*Kp_dyn;
[0122] Calculate the total increased dosage DosC_Tatol=DosC_P_Sta+DosC_P_Dyn(t);
[0123] Determine again whether e_SS(t)>0 is true, if so, calculate the error accumulation ei(t)=ei(t)+e_SS(t), otherwise ei(t)=0;
[0124] Calculate the activation conversion coefficient I_factor=1 / [1+exp(-RT)]+0.5, the integral coefficient Ki=e_SS(t) / [1+abs(e_SS(t)] and the integral increase term DosC_I(t)=ei(t)*I_factor*Ki*Dos(t)+*I_factor.
[0125] In a specific embodiment of the present invention, with reference to Fig.10 , the BM optimization strategy module is used for:
[0126] If the static binary strategy flag BM_Goon_SS = 1 holds, start the BM optimization strategy;
[0127] After entering the BM optimization strategy, judge whether the post-sedimentation turbidity compliance flag Tue_Qua_OK = 0 holds. If it holds, it means the dosing amount is too large, set the left endpoint D_L = Dos and the right endpoint D_R = D_R. If it does not hold, it means the dosing amount is too small, set D_L = D_L, D_R = Dos;
[0128] If the dynamic binary strategy flag BM_Goon_Dyn = 1 holds, set the middle endpoint D_Midd = (D_L + D_R) / 2, otherwise jump out of the BM optimization strategy;
[0129] If D_R <= D_L holds, judge whether the post-sedimentation turbidity too low flag Tue_Qua_L = 1 holds. If it holds, expand the left endpoint downward and synchronously expand the right endpoint upward, which are respectively expressed as: D_L = D_R*(1 - Exp_Rat), D_R = D_L*(1 + Exp_Rat), where Exp_Rat is the left and right spacing expansion threshold; If D_R > D_L holds or Tue_Qua_L = 0 holds, set that both D_L and D_R are not adjusted; Preferably, Exp_Rat = 15%;
[0130] Calculate the middle endpoint D_Midd = (D_L + D_R) / 2 again, and synchronously calculate the left and right endpoint spacing LR_Spac = (D_R - D_L) / D_R;
[0131] If the left and right endpoint spacing LR_Spac < Spac_Thre holds, set the left and right endpoint spacing too small flag Spac_Small = 1, otherwise Spac_Small = 0, where Spac_Thre is the left and right endpoint spacing expansion threshold; Preferably, Spac_Thre = 15%;
[0132] If the left and right endpoint spacing too small flag Spac_Small = 1, it means that the search space needs to be expanded; In the case where the search space needs to be expanded, if the post-sedimentation turbidity too low flag Tue_Qua_L = 1 holds, it means the dosing amount is too large. Therefore, the left endpoint should be moved downward to make the middle endpoint move downward for searching. The left shift ratio of the left endpoint can be set as LL = 1 - Exp_Rat;
[0133] If the left and right endpoint spacing too small flag Spac_Small = 1 does not hold, it means the search space is sufficient, or the dosing amount is not excessive, then set LL = 1;
[0134] Determine whether Tue_Qua_H=1. If so, it means that the search space needs to be expanded but the dosage is insufficient. Therefore, the right endpoint moves upward, so that the middle endpoint moves upward for searching. The right endpoint right shift ratio RR=1+Exp_Rat can be set. If not, set RR=1.
[0135] Recalculate the left and right endpoints and the middle endpoint, which are expressed as: D_L = D_L*LL, D_R = D_R*RR, D_Midd = (D_L+D_R) / 2, D_Midd = K_B*D_Midd, K_B is the binary strategy scaling factor, and K_B = 1 is selected.
[0136] In a specific embodiment of the present invention, reference Fig.11 As shown, the parameter updating module is used for:
[0137] Increase the round t by 1, and update the value of the previous round of raw water turbidity RT(t-1) to the raw water turbidity RT, update the value of the previous round of dosage Dos(t-1) to the dosage Dos, update the status of the identifier Track_Dyn(t-1) in the previous round of tracking to the identifier Track_Dyn in the current tracking, and update the value of the previous round of error e_SS(t-1) to the current e_SS(t).
[0138] The technical effects of the present invention are described below by way of examples.
[0139] Example 1 (initial turbidity of water quality RT = 5NTU, water quality fluctuates slightly):
[0140] 1. Obtain the initial turbidity T(0)=5NTU of the raw water quality from the water plant control end.
[0141] 2. Initialization: initial turbidity RT = 5NTU, initial dosage DOS = 5, target turbidity TT = 2.0, running round number t = 0, upper warning line threshold Thre_up = 0.1, lower warning line threshold Thre_low = 0.3, PT is the turbidity after sedimentation.
[0142] 3. The left value D_L=0, the right value D_R=0, the middle value D_Midd=0, and the binary strategy scaling coefficient K_B=1.
[0143] 4. Overall scaling factor K_Tatol = 1.2,
[0144] 5. Dynamic PI optimization strategy flag PI_Opt_Dyn = 0, dynamic binary optimization strategy flag BM_Goon_Dyn = 0, dynamic tracking strategy start flag Track_Dyn = 0, stable dosage Stab_Dos = 0,
[0145] 6. According to Figure 2 The overall process shown, based on the intelligent cup tank coagulation device, respectively executes the PI optimization strategy, monotonicity judgment, binary optimization strategy and tracking strategy processes.
[0146] Table 1 Operation data of automatic optimization algorithm when the initial turbidity is 5NTU
[0147]
[0148]
[0149] It can be seen from Table 1 that the optimization algorithm can quickly achieve PT to meet the target requirements through the PI strategy, and then find the optimal dosage through the BM strategy, and then maintain the dosage according to the tracking strategy. When the raw water turbidity fluctuates, the algorithm can follow and respond in time, and adaptively adjust the dosage on the basis of ensuring that the turbidity PT after sedimentation meets the standard.
[0150] Example 2 (initial turbidity of water quality RT = 5NTU, water quality fluctuates violently):
[0151] 1. Obtain the initial turbidity RT=5NTU of the raw water quality from the water plant control end.
[0152] 2. Initialization: initial turbidity RT = 5NTU, initial dosage DOS = 5, target turbidity TT = 2.0, running round number t = 0, upper warning line threshold Thre_up = 0.1, lower warning line threshold Thre_low = 0.3, PT is the turbidity after sedimentation.
[0153] 3. The left value D_L=0, the right value D_R=0, the middle value D_Midd=0, and the binary strategy scaling coefficient K_B=1.
[0154] 4. Overall scaling factor K_Tatol = 1.2,
[0155] 5. Dynamic PI optimization strategy flag PI_Opt_Dyn = 0, dynamic binary optimization strategy flag BM_Goon_Dyn = 0, dynamic tracking strategy start flag Track_Dyn = 0, stable dosage Stab_Dos = 0,
[0156] according to Figure 2 The overall process shown, based on the intelligent cup tank coagulation device, respectively executes the PI optimization strategy, monotonicity judgment, binary optimization strategy and tracking strategy processes.
[0157] Table 2 Operation data of automatic optimization algorithm when the initial turbidity is 5 NTU
[0158]
[0159] From Table 2, we can see that when the raw water turbidity fluctuates violently, the optimization algorithm can rely on the PI strategy and feedforward pre-compensation strategy to respond in time to ensure that the turbidity PT after sedimentation meets the standard. When the turbidity rises rapidly, the dosage rises rapidly, and when the turbidity decreases, the dosage decreases. When the turbidity rises from 5NTU to 100NTU and then falls back to around 5NTU, the algorithm tracks the dosage of 17.2, which is also back to the optimal dosage of about 16.4 found by the algorithm at the beginning.
[0160] The present invention is implemented by Figure 2 The process shown can quickly obtain the optimal flocculant dosage for the current raw water quality with the assistance of the intelligent cup coagulation device, and adjust the dosage adaptively following the raw water fluctuation. Compared with the classic six-beaker experiment method, the automatic optimization algorithm can not only save the experimental operation workload of water companies, but also obtain the flocculant dosage to achieve the same post-settling turbidity, fully improve the operating efficiency and accuracy of the coagulation process, thereby improving the work efficiency and economic benefits of water companies.
[0161] It is worth noting that the terms "first" and "second" in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0162] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality of components or steps.
[0163] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A feedforward adaptive optimization device for coagulant dosage based on proportional integral, characterized in that: include: Collection module, used to collect raw water turbidity; The fluctuation assessment module is used to obtain the difference between the raw water turbidity and the raw water turbidity of the previous round and the difference ratio, and determine the turbidity change state according to the difference; A dynamic judgment module is used to determine whether to adopt the PI optimization strategy or the binary optimization strategy according to the turbidity change state, and the stable dosage dynamically tracked by the binary optimization strategy; PI feedforward precompensation strategy, used to calculate the feedforward precompensation dosage based on the difference ratio, and calculate the next round of PI segment dosage using the feedforward precompensation dosage and the total increased dosage; A dosage selection module is used to select the dosage of the current round from the monotonic detection dosage, the stable dosage, the next round PI segment dosage and the binary dosage; The cup coagulation module is used to add coagulant into the cup according to the dosage selected in this round until the coagulation is completed; The collection module is used to collect the turbidity of water after the current round of coagulation is completed; The static state judgment module is used to judge the state of the post-settling turbidity of the current round according to the post-settling turbidity collected by the collection module; The monotonic detection strategy module is used to calculate the monotonic verification increment according to whether the consecutive rounds of the PI strategy reach the round threshold, and calculate the monotonic detection dosage according to the interval in which the monotonic verification increment is located; PI optimization strategy module, used to calculate the total increase in dosage using the difference between the turbidity after sedimentation and the turbidity upper warning line value; BM optimization strategy module, used to find the binary value dosage using BM optimization strategy according to the state of turbidity after sedimentation in the current round; The parameter update module is used to update the dosage, error, current tracking identifier and raw water turbidity.
2. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The fluctuation assessment module is used to: The difference RT_diff between the water turbidity of adjacent iterations is obtained, which is expressed as: RT_diff = RT - RT (t-1); If RT_diff is not less than 0, it means that the turbidity of the water remains unchanged or is increasing, and the difference ratio RT_diff_rate=RT_diff / RT(t-1) is determined; if RT_diff is greater than 0, the difference ratio RT_diff_rate=RT_diff / RT is determined; It is determined whether the absolute value of RT_diff is greater than the turbidity fluctuation threshold Tru_Fluc_The. If so, the excessive fluctuation flag Exc_Fluc=1 is set; otherwise, the excessive fluctuation flag Exc_Fluc=0 is set.
3. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The dynamic judgment module is used to: Determine whether the excessive fluctuation flag is greater than 0. If so, set INC to 1, the dynamic tracking strategy identifier Track_Dyn to 0, the PI optimization strategy dynamic identifier PI_Opt_Dyn to 1, and the binary optimization strategy dynamic identifier BM_Goon_Dyn to 0; If the fluctuation is too large flag is not greater than 0, set Track_Dyn = BM_Goon_SS-DB_Again, PI_Opt_SS, PI_Opt_Dyn = PI_Opt_SS and BM_Goon_Dyn = BM_Goon_SS; Among them, BM_Goon_SS is the static binary optimization strategy identifier, DB_Again is the binary optimization strategy identifier again, BM_Goon_Dyn is the dynamic binary optimization strategy identifier, and BM_Goon_SS is the static binary optimization strategy identifier BM_Goon_SS; Calculate the dynamic tracking strategy start flag Track_Dyn_Opt equal to Track_Dyn minus the previous round of Track_Dyn(t-1); Determine whether the dynamic tracking strategy start flag Track_Dyn_Opt is greater than 0. If so, determine that the stable dosage Stab_Dos of the coagulant in the current iteration is equal to the dosage Dos(t-1) in the previous iteration; If Track_Dyn_Opt is equal to 0, it is determined whether Track_Dyn is greater than 0. If so, it means that it is in dynamic tracking, and Stab_Dos is determined to remain unchanged. If Track_Dyn is equal to 0, it means that the system has jumped out of the dynamic tracking strategy, and Stab_Dos is determined to be 0.
4. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The PI feedforward pre-compensation strategy is used to: The water change rate activation function RT_dr_Com=RT_diff_rate / [1+abs(RT_diff_rate)] is calculated using the difference ratio between the water turbidities of adjacent iterations, and the nonlinear activation function K_f=RT_dr_Com / [1+abs(RT_dr_Com)] is calculated using RT_dr_Com; wherein RT_diff_rate is the difference ratio of the turbidities of adjacent rounds; Determine whether RT_dr_Com is greater than 0. If so, set the raw water turbidity change direction identifier Cha_dire to 1, indicating that the turbidity is rising; If RT_dr_Com is not greater than 0, determine whether RT_dr_Com is less than 0. If so, set Cha_dire to -1, indicating that the turbidity decreases; If RT_dr_Com is equal to 0, then set Cha_dire to 0, indicating that the turbidity remains unchanged; Calculate the feedforward pre-compensation dosage Kp_fluc=Dos(t-1)*RT_dr_Com*K_f*Cha_dire; where Dos(t-1) is the dosage of the coagulant in the previous round; The feedforward precompensation dosage Kp_fluc is used to calculate the proportional total increase dosage DosC_P_Fianl when the turbidity increases and the turbidity decreases; wherein DosC_P_Fianl=Kp_fluc(t)+DosC_Tatol when the turbidity increases, and DosC_P_Fianl=DosC_Tatol when the turbidity decreases; Kp_fluc(t) is the feedforward precompensation dosage, and DosC_Tatol is the total increase dosage; DosC_P_Fianl is used to calculate the final increase in coagulant dosage DosC, and DosC is used to calculate the dosage Dos_PI of the next round PI segment; wherein, DosC = K_Tatol*(DosC_P_Fianl+DosC_I); wherein, K_Tatol is the preset overall scaling factor, and DosC_I is the integral increase term; Dos_PI = K_Tatol*(Dos+DosC), and Dos is the dosage of the current round.
5. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The dosage selection module is used to: If the monotonic area identifier is 1, the monotonic detection dosage Dos_INC is selected as the dosage of the current round; If the identifier Track_Dyn in the current tracking is 1, the stable dosage Stab_Dos is selected as the dosage of the current round; If the PI optimization strategy dynamic flag PI_Opt_Dyn is 1, the dosage of the next PI segment is selected as the dosage of the current round; If the dynamic binary strategy identifier BM_Goon_Dyn is 1, the final binary value dosage D_Midd_Fiinal is selected as the dosage of the current round.
6. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The static state judgment module is used to: Calculate the difference e(t) between the post-settling turbidity PT(t) collected by the collection module and the target turbidity TT, as well as the difference e_SS(t) between the post-settling turbidity and the upper warning line value r_up; Query the linear detection state flag In_detec, and determine whether to enter the linear detection state according to In_detec; where In_detec is 1 for entering, and 0 for not entering; If the linear detection state is entered, it is determined whether the post-settling turbidity PT(t) is less than the post-settling turbidity PT_Inc used for linear detection comparison; if it is less than, it means that the corresponding relationship between the dosage and the post-settling turbidity is within the monotonic interval, and the linear area identifier INC is set to 1, otherwise it is set to 0, indicating that the dosage has exceeded the linear interval; when the dosage exceeds the linear interval, the dosage under the current round PI strategy is set to Dos_PI(t) = Dos(t)*K_Redu, K_Redu is the reduction coefficient; If the linear detection state is not entered, it is determined whether e_SS(t) is greater than 0. If it is greater than 0, Tue_Qua_H is set to 1 and Find_DB_SS is set to 0; Tue_Qua_H is the mark of excessive turbidity after sedimentation, and Find_DB_SS is the mark of turbidity after sedimentation being lower than the upper warning line, higher than the lower warning line, and in the best interval; If e_SS(t) is less than or equal to 0, it means that the post-sedimentation turbidity PT(t) has reached the standard. Set Tue_Qua_OK to 1. Tue_Qua_OK = 1 indicates that the post-sedimentation turbidity meets the requirements. Determine whether PT < r_low holds. If it holds, set Tue_Qua_L to 1 and Find_DB_SS to 0. If PT >= r_low holds, set Find_DB_SS to 1, indicating that the post-sedimentation turbidity is in the optimal range. r_low is the lower warning line value of the post-sedimentation turbidity; r_low = TT - Thre_low, where Thre_low is the lower warning line threshold. Tue_Qua_L is the identifier for too low post-sedimentation turbidity. If Find_DB_SS > 0, set Track_SS to 1. Track_SS is the identifier in static tracking. Track_SS = 1 represents that the current dosing amount is the optimal dosing amount, and the dosing amount adjustment strategy enters the tracking state. If Find_DB_SS = 0, determine whether the continuous over-standard identifier CES is 1. If CES = 1, it means that in the previous tracking strategy, the post-sedimentation turbidity of the current round has continuously exceeded the standard, then set Track_SS to 0. If CES = 0 and Tue_Qua_L = 1, it means that the post-sedimentation turbidity is too low and the dosing amount is too large, then set Track_SS to remain unchanged. Merge the states of Find_DB_SS and Track_SS into Track_SS, indicating: Track_SS = Find_DB_SS + Track_SS. Determine whether Tue_Qua_OK is equal to 0. If it is equal to 0, then determine whether BM_Goon_SS is 0. If BM_Goon_SS is equal to 0, it means that the system is not in the dichotomy optimization strategy. Set PI_Opt_SS to 1 and increase Numb_PI by 1 at the same time. Among them, BM_Goon_SS is the static dichotomy strategy identifier, PI_Opt_SS is the identifier for the static PI segment strategy, and Numb_PI is the continuous round number of the PI segment. If Tue_Qua_OK > 0 or BM_Goon_SS > 0, set PI_Opt_SS to 0 and clear Numb_PI, representing that the system enters the dichotomy optimization strategy. In the dichotomy optimization strategy, if BM_Goon_SS = 0, set BM_ACT_SS to 1, otherwise set it to 0. BM_ACT_SS is the identifier that the post-sedimentation turbidity PT meets the static dichotomy strategy. If BM_ACT_SS is equal to 1, the static binary strategy flag BM_Goon_SS is set to 1, and then the states of BM_Goon_SS and BM_ACT_S are merged into BM_Goon_SS, which is expressed as BM_Goon_SS=BM_Goon_SS+BM_ACT_SS; otherwise, if BM_ACT_SS is equal to 0, and the continuous exceeding flag CES is 0, BM_Goon_SS remains unchanged, indicating that the system is still in the binary large strategy. If the continuous exceeding flag CES is 1, BM_Goon_SS is set to 0 and PI_Opt_SS is set to 1, Numb_PI is increased by 1, the system re-enters the PI optimization strategy and the states of BM_Goon_SS and BM_ACT_S are merged into BM_Goon_SS, which is expressed as: BM_Goon_SS=BM_Goon_SS+BM_ACT_SS; If Tue_Qua_H is 1, EU_Numb increases by 1, otherwise, EU_Numb is set to 0. EU_Numb is the number of times the post-settling turbidity PT exceeds the upper warning limit r_up continuously; Determine whether EU_Numb is greater than EUN_Thre, where EUN_Thre is the threshold of the number of times the turbidity exceeds the upper limit of the warning. If EU_Numb>EUN_Thre, it means that the turbidity after sedimentation exceeds the upper limit of the turbidity warning for multiple times in a row, then the continuous exceeding flag CES is set to 1, and then EU_Numb is reset to zero. If EU_Numb<=EUN_Thre, CES is set to 0. Determine whether BM_Goon_SS is equal to 1. If it is equal to 1, determine whether Tue_Qua_L is equal to 1. If it is equal to 1, set DB_Again to 1. DB_Again is a binary flag again, which means that under the tracking strategy, if the post-settling turbidity PT is lower than the turbidity warning lower limit, the binary optimization strategy is started again; if BM_Goon_SS=0 or BM_Goon_SS=1, Tue_Qua_L=0, set DB_Again=0, indicating that the system is in the PI optimization strategy or in the tracking mode, and there is no need to start the binary optimization strategy; The turbidity of the water in this round is assigned to RT(t-1), which is expressed as RT(t-1)=RT.
7. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The monotonic detection strategy module is used to: Determine whether the continuous round Numb_PI of the PI strategy is greater than the round threshold NP_Thre. If so, set In_detec to 1 and set the monotonic verification increment Min_Inc = Dos(t)*K_M; K_MI is the linearity verification increment coefficient; Determine whether Min_Inc is less than the monotonic verification increment lower limit Min_Inc_LL. If so, set Min_Inc to Min_Inc_LL; If Min_Inc is not less than the monotonic verification increment lower limit Min_Inc_LL, then determine whether Min_Inc is greater than the monotonic verification increment upper limit Min_Inc_UL. If so, set Min_Inc to Max_Inc_UL; if not, set Min_Inc = Dos(t)*K_MI, where Dos(t) is the dosage of the current round; Calculate the dosage of monotonic detection Dos_INC(t)=Dos(t)+Min_Inc; The post-settling turbidity PT_Inc for monotonic detection comparison is set equal to the post-settling turbidity PT(t) collected in the current round.
8. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The PI optimization strategy module is used to: Determine whether the static PI segment strategy flag PI_Opt_SS is 0. If so, do not start the PI optimization strategy, and set the PI strategy continuous round Numb_PI to 0; if PI_Opt_SS is 1, start the PI optimization strategy, and add 1 to Numb_PI; Calculate the basic ratio Kp_Basic = Dos(t) / [RT(t)-PT(t)], where the current dosage is divided by the difference between the raw water turbidity and the turbidity after sedimentation; where Dos(t) is the dosage of the current round, RT(t) is the raw water turbidity, and PT(t) is the turbidity after sedimentation; Calculate the basic change in dosage DosC_Basic = Kp_Basic*e_SS(t); where e_SS(t) is the difference between the turbidity after sedimentation and the turbidity upper warning line value; Calculate the error ratio e_pro = e_SS(t) / r_up; where r_up is the upper warning line value of turbidity after sedimentation; Calculate the static increase dosage DosC_P_Sta = Kp_Basic*e_pro; Determine whether the raw water turbidity fluctuates. If not, set the dynamic ratio Kp_dyn=1; otherwise, set Kp_dyn=abs[RT(t)-RT(t-1)] / [PT(t)-PT(t-1)]; Determine whether e_SS(t)>0 is true. If true, calculate DosC_P_Dyn(t)=abs(e_SS(t)* Kp_dyn), otherwise, calculate DosC_P_Dyn(t)=e_SS(t)*Kp_dyn; Calculate the total increased dosage DosC_Tatol=DosC_P_Sta+DosC_P_Dyn(t); Determine again whether e_SS(t)>0 is true, if so, calculate the error accumulation ei(t)=ei(t)+e_SS(t), otherwise ei(t=0; Calculate the activation conversion coefficient I_factor=1 / [1+exp(-RT)]+0.5, the integral coefficient Ki=e_SS(t) / [1+abs(e_SS(t)] and the integral increase term DosC_I(t)=ei(t)*I_factor*Ki*Dos(t)+*I_factor.
9. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The BM optimization strategy module is used to: If the static binary strategy flag BM_Goon_SS=1, the BM optimization strategy is started; After entering the BM optimization strategy, it is judged whether the post-sedimentation turbidity compliance flag Tue_Qua_OK = 0 holds. If it holds, it means the dosing amount is too large, and the left endpoint D_L = Dos and the right endpoint D_R = D_R are set. If it does not hold, it means the dosing amount is too small, and D_L = D_L and D_R = Dos are set; If the dynamic binary strategy flag BM_Goon_Dyn = 1 holds, the middle endpoint D_Midd = (D_L + D_R) / 2 is set, otherwise the BM optimization strategy is exited; If D_R <= D_L holds, it is judged whether the post-sedimentation turbidity is too low flag Tue_Qua_L = 1 holds. If it holds, the left endpoint is extended downward, and the right endpoint is extended upward synchronously, which are respectively expressed as: D_L = D_R*(1 - Exp_Rat), D_R = D_L*(1 + Exp_Rat), where Exp_Rat is the left and right spacing expansion threshold. If D_R > D_L holds or Tue_Qua_L = 0 holds, D_L and D_R are set without adjustment; The middle endpoint D_Midd = (D_L + D_R) / 2 is calculated again, and the left and right endpoint spacing LR_Spac = (D_R - D_L) / D_R is calculated synchronously; If the left and right endpoint spacing LR_Spac < Spac_Thre holds, the left and right endpoint spacing is too small flag Spac_Small = 1 is set, otherwise Spac_Small = 0, where Spac_Thre is the left and right endpoint spacing expansion threshold; If the left and right endpoint spacing is too small flag Spac_Small = 1 holds, it means the search space needs to be expanded; in the case where the search space needs to be expanded, if the post-sedimentation turbidity is too low flag Tue_Qua_L = 1 holds, it means the dosing amount is too large, and the left endpoint left shift ratio LL = 1 - Exp_Rat; If the left and right endpoint spacing is too small flag Spac_Small = 1 does not hold, then LL = 1 is set; It is judged whether Tue_Qua_H = 1 holds. If it holds, the right endpoint right shift ratio RR = 1 + Exp_Rat is set. If it does not hold, then RR = 1 is set; The left and right endpoints and the middle endpoint are recalculated, which are respectively expressed as: D_L = D_L*LL, D_R = D_R*RR, D_Midd = (D_L + D_R) / 2, D_Midd = K_B*D_Midd, where K_B is the binary strategy scaling coefficient.
10. The feedforward adaptive optimization device for coagulant dosage based on proportional integral according to claim 1, characterized in that: The parameter update module is used for: Increment the round t by 1, update the value of the raw water turbidity RT(t - 1) in the previous round to the raw water turbidity RT, update the value of the dosing amount Dos(t - 1) in the previous round to the dosing amount Dos, update the state of the identifier Track_Dyn(t - 1) in the previous round of tracking to the current identifier Track_Dyn in tracking, and update the value of the error e_SS(t - 1) in the previous round to the current e_SS(t).