An accurate carbon source dosing control system and method for an anoxic tank
By obtaining real-time biochemical data of hypoxia pools and using random forest models to predict dosage, the problem of inaccurate carbon source addition in urban sewage plants is solved, which improves nitrogen removal efficiency and reduces operating costs.
Patent Information
- Application Number
- CN202410825362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-06-25
AI Technical Summary
During the biological denitrification process of urban sewage plants, due to the low organic carbon concentration in the incoming water, the denitrification is incomplete. The existing technology cannot accurately control the carbon source injection, which affects the denitrification efficiency and increases operating costs.
By obtaining real-time biochemical data of the hypoxia pool, using a random forest model to predict the dosage, generating dosage instructions, combining data such as the instantaneous flow rate of water inlet, nitr nitrogen value and COD value, accurate carbon source dosage is achieved.
It improves the accuracy of carbon source injection, optimizes the matching of carbon source injection volume and denitrification demand, reduces operating costs and reduces greenhouse gas emissions.
Smart Images

Figure CN118812019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water treatment, and particularly to a precise carbon source dosing control system and method for an anoxic tank. Background Art
[0002] Biological nitrogen removal technology has advantages such as high treatment efficiency and relatively low cost, and is widely used in urban sewage treatment. Generally, the biological nitrogen removal process can be divided into two parts: nitrification and denitrification according to the involved bacteria. Most denitrifying bacteria are heterotrophic and require biodegradable organic carbon sources as electron donors, such as short-chain fatty acids. However, the organic carbon concentration in the influent of urban sewage treatment plants is usually very low, which will lead to incomplete denitrification and affect the nitrogen removal efficiency.
[0003] In order to ensure the up-to-standard discharge of total nitrogen and ammonia nitrogen in the effluent, carbon sources are often added to maintain the nitrogen removal efficiency of the biochemical system. During the actual operation process, most sewage treatment plants only control the dosing amount of the external carbon source according to their own experience, ignoring the actual influent volume and water quality fluctuations, which is likely to cause the mismatch between the actual carbon source dosing amount and the denitrification carbon source demand, and cannot be adjusted in real time according to the actual situation. Obviously, this approach is uneconomical and unsustainable, which may increase the operating cost of the sewage treatment plant and have other side effects, such as generating more greenhouse gases and excess sludge. Summary of the Invention
[0004] The present invention provides a precise carbon source dosing control system and method for an anoxic tank, which can improve the precision of carbon source dosing in the anoxic tank.
[0005] In a first aspect, the present invention provides a precise carbon source dosing control method for an anoxic tank, the method comprising: obtaining real-time biochemical data of the anoxic tank in the current cycle, the real-time biochemical data including the instantaneous influent flow rate, nitrate nitrogen value, and COD value of the anoxic tank, and the dissolved oxygen value of the aerobic tank at the outlet of the anoxic tank; calculating the nitrogen removal amount in the current cycle based on the real-time biochemical data of the anoxic tank in the current cycle, and then feeding back the nitrogen removal difference and the dosing amount corresponding to the nitrogen removal amount; generating an input vector for the current cycle based on the real-time biochemical data, as well as the nitrogen removal amount, the fed-back nitrogen removal difference, and the dosing amount; the input vector is used to characterize the biochemical parameters of the anoxic tank in the current cycle; based on the input vector and a preset random forest model, performing dosing prediction to obtain a dosing instruction, the dosing instruction including the opening time, opening frequency, and opening duration of the dosing pump.
[0006] In a possible implementation, based on the real-time biochemical data of the anoxic tank in the current cycle, calculate the nitrogen removal amount in the current cycle, and then feedback the nitrogen removal difference and the chemical dosage corresponding to the nitrogen removal amount, including: determining the initial nitrogen removal amount based on the instantaneous influent flow rate and nitrate nitrogen value of the anoxic tank; determining the first denitrification coefficient based on the COD value and the preset first mapping relationship; determining the second denitrification coefficient based on the dissolved oxygen value and the preset second mapping relationship; correcting the initial nitrogen removal amount based on the first denitrification coefficient and the second denitrification coefficient to obtain the nitrogen removal amount in the current cycle; calculating the chemical dosage corresponding to the nitrogen removal amount based on the nitrogen removal amount in the current cycle.
[0007] In a possible implementation, based on the nitrogen removal amount in the current cycle, calculate the chemical dosage corresponding to the nitrogen removal amount, including: if the nitrogen removal amount in the current cycle is greater than the first threshold, use the first formula to determine the chemical dosage corresponding to the nitrogen removal amount; the first formula is as follows:
[0008]
[0009] where G is the chemical dosage corresponding to the nitrogen removal amount, y is the nitrogen removal amount in the current cycle, b is the DO value, c is the configured concentration of the liquid medicine in the chemical dosing pump, m is the COD value, n is the biodegradability coefficient, ω is the BOD conversion coefficient, q is the instantaneous influent flow rate, and β is the total correction coefficient; if the nitrogen removal amount in the current cycle is less than the first threshold, calculate the flow coefficient based on the instantaneous influent flow rate, and determine the chemical dosage corresponding to the nitrogen removal amount based on the flow coefficient.
[0010] In a possible implementation, based on the flow coefficient, determine the chemical dosage corresponding to the nitrogen removal amount, including: if the flow coefficient is less than the first flow rate, determine that the carbon source dosage is zero, and use the second formula to determine the chemical dosage corresponding to the nitrogen removal amount; the second formula is as follows:
[0011]
[0012] where h is the carbon source conversion coefficient, b is the DO value, ω is the BOD conversion coefficient, g is the carbon source dosage, c is the configured concentration of the liquid medicine in the chemical dosing pump, and Q is the designed daily treatment capacity; if the flow coefficient is greater than or equal to the first flow rate and less than the second flow rate, use the first formula to determine the chemical dosage corresponding to the nitrogen removal amount; if the flow coefficient is greater than or equal to the second flow rate and less than the third flow rate, determine the carbon source dosage based on the nitrogen removal amount, the flow coefficient, and the third mapping relationship, and use the second formula to determine the chemical dosage corresponding to the nitrogen removal amount; if the flow coefficient is greater than the third flow rate, use the first formula to determine the chemical dosage corresponding to the nitrogen removal amount.
[0013] In a possible implementation manner, before performing drug addition prediction based on an input vector and a preset random forest model to obtain a drug addition instruction, it further includes: obtaining biochemical data and drug addition data of an anoxic tank in a historical period; dividing the biochemical data and drug addition data of the anoxic tank in the historical period to obtain the biochemical data and drug addition data in each drug addition cycle; calculating the nitrogen removal amount, post-feedback nitrogen removal difference, and drug addition amount corresponding to the nitrogen removal amount in each drug addition cycle based on the biochemical data in each drug addition cycle; calculating the ideal drug addition instruction for each drug addition cycle based on the biochemical data and drug addition data in each drug addition cycle and the drug addition amount corresponding to the nitrogen removal amount, where the ideal drug addition instruction includes the start time, start frequency, and start duration of a drug addition pump; generating an input vector for each drug addition cycle based on the biochemical data, nitrogen removal amount, post-feedback nitrogen removal difference, and drug addition amount corresponding to the nitrogen removal amount in each drug addition cycle; generating a training sample with the input vector of each drug addition cycle as the input and the ideal drug addition instruction of each drug addition cycle as the output; and performing training based on the training sample to obtain the preset random forest model.
[0014] In a possible implementation manner, performing training based on a training sample to obtain a preset random forest model includes: Step 21: Setting initial values of model parameters of the random forest model; the model parameters include the number of trees, the depth of the tree, the maximum depth of the tree, the minimum number of samples required for node classification, the minimum number of samples required for leaf nodes, the maximum number of features during splitting, and whether to use bootstrap sampling; Step 22: Performing training based on the training set in the training sample and the initial values of the model parameters to obtain an initial drug addition model, and setting the initial drug addition model as the optimal model; Step 23: Evaluating the optimal model based on the test set in the training sample to obtain an evaluation result of the optimal model; the evaluation result includes accuracy and recall rate; Step 24: Adjusting the model parameters, and performing training based on the training set in the training sample and the adjusted model parameters to obtain an updated drug addition model; Step 25: Evaluating the updated drug addition model based on the test set in the training sample to obtain an evaluation result of the updated drug addition model; Step 26: If the evaluation result of the updated drug addition model is better than the evaluation result of the optimal model, determining the updated drug addition model as the optimal model; if the evaluation result of the optimal model is better than the evaluation result of the updated drug addition model, keeping the optimal model unchanged; Step 27: Repeating Step 24 to Step 27 until the number of iterations is greater than the maximum number of iterations; Step 28: Performing training based on the model parameters corresponding to the optimal model to determine the random forest model.
[0015] In a possible implementation manner, based on the model parameters corresponding to the optimal model, training is performed to determine a random forest model, including: Step 31: Based on the model parameters corresponding to the optimal model and the training samples, training is performed to obtain a teacher model and a student model; the teacher model and the student model are random forest models with the same model parameters; Step 32: The teacher model is tested based on the test set in the training samples, and the first test accuracy of the teacher model is calculated; and based on the first test accuracy, a test accuracy threshold is determined; Step 33: Pruning the branches and leaves of the student model to obtain an adjusted student model; Step 34: The adjusted student model is tested based on the test set in the training samples to obtain a second test accuracy; Step 35: If the second test accuracy is greater than or equal to the test accuracy threshold, repeat Step 33 to Step 35 until the second test accuracy is less than the test accuracy threshold; Step 38: If the second test accuracy is less than the test accuracy threshold, determine the student model before adjustment in the current iteration process as the preset random forest model.
[0016] In a possible implementation manner, before performing drug addition prediction based on the input vector and the preset random forest model to obtain a drug addition instruction, it further includes: determining the drug addition amount deviation values of multiple cycles before the current cycle based on the real-time biochemical data and drug addition instructions of multiple cycles before the current cycle stored in advance; updating the input vector based on the drug addition amount deviation values of multiple cycles before the current cycle to obtain an updated input vector.
[0017] In a possible implementation manner, after performing drug addition prediction based on the input vector and the preset random forest model to obtain a drug addition instruction, it further includes: receiving a drug addition instruction input by the user; the drug addition instruction includes the drug addition time and the drug addition amount; calculating the calculated drug addition amount at the drug addition time based on the biochemical data at the drug addition time; calibrating based on the drug addition amount input by the user and the calculated drug addition amount to determine the feasibility of the drug addition instruction; if the drug addition instruction is feasible, generating a drug addition instruction based on the drug addition instruction; if the drug addition instruction is not feasible, outputting a display message, and the display message is used to prompt the user that an error has occurred in the input.
[0018] Second aspect, an embodiment of the present invention provides an accurate dosing control device for carbon sources in an anoxic tank. The device includes a communication module and a processing module. The communication module is used to obtain the real-time biochemical data of the anoxic tank in the current cycle. The real-time biochemical data includes the instantaneous influent flow rate, nitrate nitrogen value, and COD value of the anoxic tank, as well as the dissolved oxygen value of the aerobic tank at the outlet of the anoxic tank. The processing module is used to calculate the nitrogen removal amount in the current cycle based on the real-time biochemical data of the anoxic tank in the current cycle, and then feedback the nitrogen removal difference and the dosing amount corresponding to the nitrogen removal amount. Based on the real-time biochemical data, as well as the nitrogen removal amount, the feedback nitrogen removal difference, and the dosing amount, an input vector for the current cycle is generated. The input vector is used to represent the biochemical parameters of the anoxic tank in the current cycle. Based on the input vector and a preset random forest model, dosing prediction is performed to obtain a dosing instruction. The dosing instruction includes the opening time, opening frequency, and opening duration of the dosing pump.
[0019] Third aspect, an embodiment of the present invention provides an accurate dosing control system for carbon sources in an anoxic tank, which is applied to a biochemical system. The biochemical system includes an anaerobic tank, an anoxic tank, an aerobic tank, a secondary sedimentation area, and a dosing control subsystem. The outlet of the anaerobic tank is connected to the inlet of the anoxic tank, the outlet of the anoxic tank is connected to the inlet of the aerobic tank, the outlet of the aerobic tank is connected to the inlet of the secondary sedimentation area. The dosing control subsystem includes an online nitrate nitrogen analyzer, an online COD analyzer, a dosing pump, and an online dissolved oxygen analyzer. A mixed liquor return system connected to the secondary sedimentation area is provided at the inlet of the anoxic tank. An online nitrate nitrogen analyzer, an online COD analyzer, and a dosing pump are sequentially arranged after the mixed liquor return system. The online dissolved oxygen analyzer is arranged at the inlet of the aerobic tank. The dosing control subsystem is used to execute the steps of the method described in the first aspect and any possible implementation manner in the first aspect as above.
[0020] Fourth aspect, an embodiment of the present invention provides an electronic device, which includes a memory and a processor. The memory stores a computer program. When the processor is used to call and run the computer program stored in the memory, it executes the steps of the method described in the first aspect and any possible implementation manner in the first aspect as above.
[0021] Fifth aspect, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the steps of the method described in the first aspect and any possible implementation manner in the first aspect as above.
[0022] The present invention provides a precise carbon source dosing control system and method for an anoxic tank. By calculating the nitrogen removal amount in each cycle, then feeding back the nitrogen removal difference and the dosing amount corresponding to the nitrogen removal amount, and combining data such as the instantaneous influent flow rate, nitrate nitrogen value, COD value, and dissolved oxygen value, an input vector representing the biochemical parameters of the anoxic tank is generated. Then, through a random forest model, dosing prediction is carried out to generate a dosing instruction, comprehensively considering the influence of current flow rate, forward feedback, backward feedback, and other factors on the dosing amount, making the carbon source dosing more in line with the actual needs and improving the precision of carbon source dosing in the anoxic tank. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a schematic diagram of the architecture of a biochemical system provided by an embodiment of the present invention;
[0025] Figure 2 It is a schematic diagram of the architecture of a dosing control subsystem provided by an embodiment of the present invention;
[0026] Figure 3 It is a schematic flowchart of a precise carbon source dosing control method for an anoxic tank provided by an embodiment of the present invention;
[0027] Figure 4 It is a schematic diagram of the structure of a precise carbon source dosing control device for an anoxic tank provided by an embodiment of the present invention;
[0028] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are proposed to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0030] In the description of the present invention, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" herein is merely a correlative relationship describing related objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, "at least one" and "a plurality of" mean two or more. The terms such as "first" and "second" do not limit the quantity and execution order, and the terms such as "first" and "second" do not necessarily limit to be different.
[0031] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner for easy understanding.
[0032] In addition, the terms "comprising" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally further include other unlisted steps or modules, or may optionally further include other steps or modules inherent to these processes, methods, products or devices.
[0033] To make the objectives, technical solutions and advantages of the present invention clearer, the following will be described through specific embodiments in conjunction with the drawings of the present invention.
[0034] As Figure 1 shown, an embodiment of the present invention provides a schematic diagram of the architecture of a biochemical system. The biochemical system includes an anaerobic tank 1, an anoxic tank 2, an aerobic tank 3, a secondary sedimentation area 4, and a chemical dosing control subsystem 5; the outlet of the anaerobic tank 1 is connected to the inlet of the anoxic tank 2, the outlet of the anoxic tank 2 is connected to the inlet of the aerobic tank 3, the outlet of the aerobic tank 3 is connected to the inlet of the secondary sedimentation area 4, and the chemical dosing control subsystem 5 includes an online nitrate analyzer 6, an online COD analyzer 7, a carbon source chemical dosing point 8, and an online dissolved oxygen analyzer 10; a mixed liquor return system connected to the secondary sedimentation area 4 is provided at the inlet of the anoxic tank 2, and the mixed liquor return system includes a liquid inlet 9 connected to the anoxic tank 2 and a sludge return port 11 of the secondary sedimentation area. An online nitrate analyzer 6, an online COD analyzer 7, and a carbon source chemical dosing point 8 are sequentially arranged after the mixed liquor return system; the online dissolved oxygen analyzer 10 is arranged at the inlet of the aerobic tank 3.
[0035] Among them, the chemical dosing control subsystem 5 is respectively connected to the influent online flowmeter 12, the influent online total nitrogen analyzer 13, the effluent online total nitrogen analyzer 14, the online nitrate nitrogen analyzer 6 at the inlet end of the anoxic tank, the online COD analyzer 7, the online dissolved oxygen analyzer 10 at the inlet end of the aerobic tank, and the chemical dosing pump through signal lines.
[0036] The carbon source precise dosing control system provided by the embodiment of the present invention specifically has four modes: automatic mode, semi-automatic mode, manual mode, and disconnection from online.
[0037] In the automatic mode, the required flow rate of the chemical dosing pump is calculated by the program, and the pump outlet electromagnetic flowmeter is interlocked with the pump frequency converter to automatically adjust the pump to the set flow rate.
[0038] In the semi-automatic mode, the flow rate of the chemical dosing pump needs to be manually input, and it does not participate in the program calculation of the chemical dosing amount. According to the interlock between the pump outlet electromagnetic flowmeter and the pump frequency converter, the pump is automatically adjusted to the set flow rate.
[0039] In the manual input part on the chemical dosing interface, the set flow rate γ, the influent nitrate nitrogen value a, and the DO value b can be input, and it is possible to select to turn on or off next to them. If it is selected to turn on, the operation program executes the input values; if it is selected to turn off, the operation program reads the data displayed by the online instrument.
[0040] The operation rules of the semi-automatic mode are the same as those of the automatic mode, only different in setting the flow rate, the influent TN value, and the influent DO value, and the rest are the same as the automatic operation method and operation rules. If the manual input part is turned on, the manually input values are brought in; if it is turned off, the instrument data is brought in for calculation.
[0041] In the manual mode, the operating frequency of the chemical dosing pump needs to be manually input. The pump outlet electromagnetic flowmeter is not interlocked with the pump frequency, and it operates according to the manually input frequency. If no input is made, it operates at full load.
[0042] As Figure 2 shown, the embodiment of the present invention provides a schematic diagram of the architecture of a chemical dosing control subsystem. The chemical dosing control subsystem includes a carbon source storage tank, a diaphragm pump, a chemical dosing pipeline, a controller, a check valve, a liquid level gauge, and a flowmeter.
[0043] Among them, the liquid level gauge is arranged in the carbon source storage tank and is used to detect the liquid level of the liquid medicine in the carbon source storage tank. The carbon source storage tank is connected to the diaphragm pump through a check valve and a chemical dosing pipeline. The diaphragm pump is connected to the carbon source dosing point through the chemical dosing pipeline. The flowmeter is arranged between the diaphragm pump and the carbon source dosing point and is used to detect the chemical dosing flow rate output by the diaphragm pump. The controller is respectively connected to the diaphragm pump and the flowmeter, detects the chemical dosing flow rate, and controls the start and stop of the diaphragm pump.
[0044] Based on the biochemical system as Figure 1 and the chemical dosing control subsystem as Figure 2 shown, asFigure 3 As shown in Figure 3 , an embodiment of the present invention provides a precise carbon source dosing control method for an anoxic tank. This method includes steps S101 - S105.
[0045] S101. Obtain the real - time biochemical data of the anoxic tank in the current cycle.
[0046] In the embodiment of the present application, the real - time biochemical data includes the instantaneous influent flow rate, nitrate nitrogen value, and COD value of the anoxic tank, as well as the dissolved oxygen value of the aerobic tank at the outlet of the anoxic tank.
[0047] S102. Based on the real - time biochemical data of the anoxic tank in the current cycle, calculate the nitrogen removal amount in the current cycle, and then feedback the nitrogen removal difference and the dosing amount corresponding to the nitrogen removal amount.
[0048] As a possible implementation, the embodiment of the present invention can determine the nitrogen removal amount in the current cycle based on the nitrate nitrogen value and the designed total nitrogen value of the effluent, and then calculate the dosing amount corresponding to the nitrogen removal amount based on the nitrogen removal amount in the current cycle.
[0049] Exemplarily, the embodiment of the present invention can determine the nitrogen removal amount in the current cycle based on the following formula.
[0050] y = a - e;
[0051] Where y is the nitrogen removal amount in the current cycle, a is the nitrate nitrogen value, and e is the designed total nitrogen value of the effluent.
[0052] As another possible implementation, step S102 can be specifically implemented as steps S1021 - S1025.
[0053] S1021. Determine the initial nitrogen removal amount based on the instantaneous influent flow rate and nitrate nitrogen value of the anoxic tank.
[0054] Exemplarily, the embodiment of the present invention can determine the initial nitrogen removal amount based on the following formula.
[0055] ΔN = a×q×t;
[0056] Where ΔN is the initial nitrogen removal amount, a is the nitrate nitrogen value, q is the instantaneous influent flow rate, and t is the hydraulic retention time of the anoxic tank.
[0057] S1022. Determine the first denitrification coefficient based on the COD value and a preset first mapping relationship.
[0058] Where the first denitrification coefficient is used to characterize the denitrification rate affected by COD in the anoxic tank. The denitrification rate is positively correlated with the COD value.
[0059] Exemplarily, the embodiment of the present invention can characterize the relationship between the first denitrification coefficient and COD through a first-order linear relationship. For example, M1 = i1 × COD + k1;
[0060] Wherein, M1 is the first denitrification coefficient, i1 represents the first linear coefficient, k1 is the second linear coefficient, and COD is the COD value.
[0061] S1023. Determine the second denitrification coefficient based on the dissolved oxygen value and a preset second mapping relationship.
[0062] Wherein, the second denitrification coefficient is used to characterize the denitrification rate of the anoxic tank affected by dissolved oxygen. The denitrification rate is negatively correlated with the dissolved oxygen value.
[0063] Exemplarily, the relationship between the second denitrification coefficient and the dissolved oxygen value can be expressed by the following formula.
[0064] M2 = M2max × (1 - k2 × DO);
[0065] Wherein, M2 is the second denitrification coefficient, M2max is the maximum denitrification rate under theoretically completely anoxic conditions, k2 is the third linear coefficient, and DO is the dissolved oxygen value.
[0066] S1024. Correct the initial nitrogen removal amount based on the first denitrification coefficient and the second denitrification coefficient to obtain the nitrogen removal amount in the current cycle.
[0067] Exemplarily, the embodiment of the present invention can determine the nitrogen removal amount in the current cycle based on the following formula.
[0068] y = ΔN × M1 × M2;
[0069] Wherein, y is the nitrogen removal amount in the current cycle, M1 is the first denitrification coefficient, and M2 is the second denitrification coefficient.
[0070] S1025. Calculate the chemical dosage corresponding to the nitrogen removal amount based on the nitrogen removal amount in the current cycle.
[0071] Exemplarily, if the nitrogen removal amount in the current cycle is greater than the first threshold, the first formula is used to determine the chemical dosage corresponding to the nitrogen removal amount. Wherein, the first threshold can be 27 mg / L. For example, when y > 27 mg / L, calculate G (chemical dosage) according to the first formula.
[0072] The first formula is as follows:
[0073]
[0074] Wherein, G is the chemical dosage corresponding to the nitrogen removal amount, y is the nitrogen removal amount in the current cycle, b is the DO value, c is the concentration of the liquid medicine in the chemical dosing pump, m is the COD value, n is the biodegradability coefficient, ω is the BOD conversion coefficient, q is the instantaneous influent flow rate, and β is the total correction coefficient;
[0075] Another exemplary case is that if the nitrogen removal amount in the current cycle is less than the first threshold, then based on the instantaneous influent flow rate, the flow coefficient is calculated, and based on the flow coefficient, the chemical dosage corresponding to the nitrogen removal amount is determined.
[0076] Wherein, when y < 27 mg / L, the embodiments of the present invention can calculate the flow coefficient based on the following formula.
[0077]
[0078] Wherein, f is the flow coefficient, q is the total instantaneous influent flow rate, and Q is the designed daily treatment capacity.
[0079] For example, if the flow coefficient is less than the first flow rate, then the carbon source dosage is determined to be zero, and based on the second formula, the chemical dosage corresponding to the nitrogen removal amount is determined.
[0080] Wherein, the first flow rate can be 0.1, the second flow rate can be 0.4, and the third flow rate can be 1.6.
[0081] When f < 0.1, the g value (carbon source dosage) is determined, g = 0, and the chemical dosage G is determined based on the second formula.
[0082] The second formula is as follows:
[0083]
[0084] Wherein, h is the carbon source conversion coefficient, b is the DO value, ω is the BOD conversion coefficient, g is the carbon source dosage, c is the concentration of the liquid medicine in the chemical dosing pump, and Q is the designed daily treatment capacity;
[0085] Another example is that if the flow coefficient is greater than or equal to the first flow rate and less than the second flow rate, then based on the first formula, the chemical dosage corresponding to the nitrogen removal amount is determined.
[0086] Wherein, when 0.1 ≤ f < 0.4, then based on the first formula, the chemical dosage G is determined.
[0087]
[0088] After obtaining the G value, it can be directly output to the chemical dosing pump command and judged every 5 minutes; it can also be predicted through the random forest model in step S104.
[0089] For another example, if the flow coefficient is greater than or equal to the second flow rate and less than the third flow rate, then based on the nitrogen removal amount, the flow coefficient, and the third mapping relationship, determine the carbon source dosage, and based on the second formula, determine the chemical dosage corresponding to the nitrogen removal amount.
[0090] Among them, the third mapping relationship is shown in Table 1. In the embodiments of the present invention, based on the nitrogen removal amount y and the flow coefficient f, the carbon source dosage g can be determined by looking up the table, that is, the third mapping relationship.
[0091]
[0092]
[0093] Exemplarily, in the embodiments of the present invention, y can be rounded up to an integer, then the f value can be judged, and the g value can be obtained according to Table 1.
[0094] When 0.4 ≤ f < 0.6, corresponding to the longitudinal coefficient y in Table 1, the g value when the horizontal coefficient f = 0.5 in the table is obtained.
[0095] When 0.6 ≤ f < 0.8, corresponding to the longitudinal coefficient y in Table 1, the g value when the horizontal coefficient f = 0.7 in the table is obtained.
[0096] When 1.2 < f ≤ 1.4, corresponding to the longitudinal coefficient y in Table 1, the g value when the horizontal coefficient f = 1.0 in the table is obtained.
[0097] When 1.4 < f ≤ 1.6, corresponding to the longitudinal coefficient y in Table 1, the g value when the horizontal coefficient f = 1.5 in the table is obtained.
[0098] For another example, if the flow coefficient is greater than the third flow rate, then based on the first formula, determine the chemical dosage corresponding to the nitrogen removal amount.
[0099] When 1.6 < f, then based on the first formula, determine the chemical dosage G.
[0100]
[0101] After obtaining the G value, it can be directly output to the chemical dosing pump command and judged every 5 minutes; it can also be predicted through the random forest model in step S104.
[0102] Exemplarily, in the embodiments of the present invention, based on the dissolved oxygen value and the designed total nitrogen value of the effluent, the nitrogen removal difference value L can be calculated and then fed back, and then the chemical dosage G can be corrected based on the fed-back nitrogen removal difference value.
[0103] For example, when 0 ≤ |L| ≤ 1, the final chemical dosage output is G.
[0104] When 1 < L ≤ 2, the final chemical dosage output is G + 0.0087q / c.
[0105] When 2 < L ≤ 4, the final chemical dosage output is G + 0.023q / c.
[0106] When 4 < L, the final chemical dosage output is G + 0.035q / c.
[0107] When -2 ≤ L < -1, the final chemical dosage output is G - 0.0087q / c.
[0108] When -4 ≤ L < -2, the final chemical dosage output is G - 0.023q / c.
[0109] When L < -4, the final chemical dosage output is G + 0.035q / c.
[0110] S103. Generate an input vector for the current cycle based on real-time biochemical data, nitrogen removal amount, post-feedback nitrogen removal difference, and chemical dosage.
[0111] In the embodiments of the present application, the input vector is used to characterize the biochemical parameters of the anoxic tank in the current cycle.
[0112] Exemplarily, in the embodiments of the present invention, the real-time biochemical data, nitrogen removal amount, post-feedback nitrogen removal difference, and chemical dosage can be directly concatenated to obtain the input vector.
[0113] Exemplarily, in the embodiments of the present invention, the chemical dosage deviation values for multiple cycles before the current cycle can be determined based on the real-time biochemical data and chemical dosage instructions for multiple cycles before the current cycle stored in advance; based on the chemical dosage deviation values for multiple cycles before the current cycle, the input vector is updated to obtain the updated input vector.
[0114] S104. Based on the input vector and a preset random forest model, perform chemical dosage prediction to obtain a chemical dosage instruction.
[0115] In the embodiments of the present application, the chemical dosage instruction includes the opening time, opening frequency, and opening duration of the chemical dosing pump.
[0116] The present invention provides a precise carbon source dosing control method for an anoxic tank. By calculating the nitrogen removal amount, post-feedback nitrogen removal difference, and chemical dosage corresponding to the nitrogen removal amount for each cycle, and combining data such as the instantaneous influent flow rate, nitrate nitrogen value, COD value, and dissolved oxygen value, an input vector characterizing the biochemical parameters of the anoxic tank is generated. Then, through a random forest model, chemical dosage prediction is performed to generate a chemical dosage instruction, comprehensively considering the influence of current flow rate, pre-feedback, post-feedback, and other factors on the chemical dosage, making the carbon source delivery more in line with actual needs and improving the precision of carbon source dosing in the anoxic tank.
[0117] Optionally, before step S104 of the precise carbon source dosing control method for the anoxic tank provided by the embodiments of the present invention, steps S201 - S207 are further included.
[0118] S201. Obtain the biochemical data and dosing data of the anoxic tank during the historical period.
[0119] S202. Divide the biochemical data and dosing data of the anoxic tank during the historical period to obtain the biochemical data and dosing data for each dosing cycle.
[0120] S203. Based on the biochemical data for each dosing cycle, calculate the nitrogen removal amount, post - feedback nitrogen removal difference, and the dosing amount corresponding to the nitrogen removal amount for each dosing cycle.
[0121] S204. Based on the biochemical data and dosing data for each dosing cycle, and the dosing amount corresponding to the nitrogen removal amount, calculate the ideal dosing instruction for each dosing cycle.
[0122] In some embodiments, the ideal dosing instruction includes the opening time, opening frequency, and opening duration of the dosing pump.
[0123] Exemplarily, the embodiments of the present invention can adjust the calculated dosing amount based on the dissolved oxygen value to obtain the adjusted dosing amount, and then generate the ideal dosing instruction based on the adjusted dosing amount.
[0124] It should be noted that the dosing instruction includes the opening time, opening frequency, and opening duration of the dosing pump. The embodiments of the present invention can calculate the dosing amount based on the opening frequency, opening duration, and liquid medicine concentration of the diaphragm pump, that is, the dosing pump. Correspondingly, the embodiments of the present invention can calculate the opening duration based on the opening frequency, liquid medicine concentration, and dosing amount of the diaphragm pump. If the opening duration is too long, the opening frequency is increased to increase the dosing flow rate of the diaphragm pump and shorten the opening duration.
[0125] S205. Based on the biochemical data, nitrogen removal amount, post - feedback nitrogen removal difference, and the dosing amount corresponding to the nitrogen removal amount for each dosing cycle, generate the input vector for each dosing cycle.
[0126] Exemplarily, the embodiments of the present invention can directly generate the input vector based on the biochemical data, nitrogen removal amount, post - feedback nitrogen removal difference, and the dosing amount corresponding to the nitrogen removal amount for each cycle.
[0127] Another exemplarily, the embodiments of the present invention can also generate the input vector based on a certain cycle, and the biochemical data, nitrogen removal amount, post - feedback nitrogen removal difference, and the dosing amount corresponding to the nitrogen removal amount for multiple cycles before this cycle. In this way, the influence of historical data on water quality can be considered to improve the accuracy of random forest model training.
[0128] S206. Generate training samples with the input vectors of each drug addition cycle as inputs and the ideal drug addition instructions of each drug addition cycle as outputs.
[0129] S207. Based on the training samples, perform training to obtain a preset random forest model.
[0130] As a possible implementation, step S207 can be specifically implemented as steps 31 - 38.
[0131] Step 31: Set the initial values of the model parameters of the random forest model.
[0132] In some embodiments, the model parameters include the number of trees, the depth of the trees, the maximum depth of the trees, the minimum number of samples required for node classification, the minimum number of samples required for leaf nodes, the maximum number of features during splitting, and whether to use bootstrap sampling.
[0133] Step 32: Based on the training set in the training samples and the initial values of the model parameters, perform training to obtain an initial drug addition model, and set the initial drug addition model as the optimal model.
[0134] Step 33: Based on the test set in the training samples, evaluate the optimal model to obtain the evaluation result of the optimal model.
[0135] In some embodiments, the evaluation result includes accuracy and recall rate.
[0136] Step 34: Adjust the model parameters, and based on the training set in the training samples and the adjusted model parameters, perform training to obtain an updated drug addition model.
[0137] Step 35: Based on the test set in the training samples, evaluate the updated drug addition model to obtain the evaluation result of the updated drug addition model.
[0138] Step 36: If the evaluation result of the updated drug addition model is better than the evaluation result of the optimal model, then determine the updated drug addition model as the optimal model; if the evaluation result of the optimal model is better than the evaluation result of the updated drug addition model, then keep the optimal model unchanged.
[0139] Step 37. Repeat steps 24 to 27 until the number of iterations is greater than the maximum number of iterations.
[0140] Step 38. Based on the model parameters corresponding to the optimal model, perform training to determine the random forest model.
[0141] Exemplarily, step 38 can be specifically implemented as steps 41 - 48.
[0142] Step 41: Based on the model parameters corresponding to the optimal model and the training samples, perform training to obtain a teacher model and a student model.
[0143] In some embodiments, the teacher model and the student model are random forest models with the same model parameters.
[0144] Step 42: Test the teacher model based on the test set in the training samples, and calculate the first test accuracy of the teacher model; and determine the test accuracy threshold based on the first test accuracy.
[0145] Step 43: Prune the branches and leaves of the student model to obtain an adjusted student model.
[0146] Step 44: Test the adjusted student model based on the test set in the training samples to obtain the second test accuracy.
[0147] Step 45: If the second test accuracy is greater than or equal to the test accuracy threshold, repeat steps 33 to 35 until the second test accuracy is less than the test accuracy threshold.
[0148] Step 46: If the second test accuracy is less than the test accuracy threshold, determine the student model before adjustment in the current iteration process as the preset random forest model.
[0149] In this way, the embodiments of the present invention can prune the branches and leaves of the trained random forest model based on the teacher-student model, reduce the complexity of the random forest model, improve the real-time performance of the random forest model, improve the accuracy of the dosing pump control, and thus improve the accuracy of the carbon source dosing in the anoxic tank.
[0150] Optionally, for the anoxic tank carbon source precise dosing control method provided by the embodiments of the present invention, after step S104, steps S501 - S504 are further included.
[0151] S501: Receive the dosing instruction input by the user; the dosing instruction includes the dosing time and the dosing amount.
[0152] S502: Calculate the calculated dosing amount at the dosing time based on the biochemical data at the dosing time.
[0153] S503: Based on the dosing amount input by the user and the calculated dosing amount, perform calibration to determine the feasibility of the dosing instruction.
[0154] S504: If the dosing instruction is feasible, generate a dosing command based on the dosing instruction.
[0155] S505: If the dosing instruction is not feasible, output a display message, and the display message is used to prompt the user that the input is incorrect.
[0156] In this way, when the embodiment of the present invention receives the dosing instruction from the user, it can verify the dosing instruction, avoid misoperation by the user, improve the water quality in the anoxic tank, and achieve precise dosing of carbon source in the anoxic tank.
[0157] It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0158] The following is the device embodiment of the present invention. For the details not described in detail, reference can be made to the corresponding method embodiments above.
[0159] Figure 4 The structural schematic diagram of a precise carbon source dosing control device for an anoxic tank provided by the embodiment of the present invention is shown. The control device 600 includes a communication module 601 and a processing module 602.
[0160] The communication module 601 is used to obtain the real-time biochemical data of the anoxic tank in the current cycle. The real-time biochemical data includes the instantaneous influent flow rate, nitrate nitrogen value, and COD value of the anoxic tank, as well as the dissolved oxygen value of the aerobic tank at the outlet of the anoxic tank.
[0161] The processing module 602 is used to calculate the nitrogen removal amount in the current cycle based on the real-time biochemical data of the anoxic tank in the current cycle, and then feedback the nitrogen removal difference and the dosing amount corresponding to the nitrogen removal amount; generate the input vector in the current cycle based on the real-time biochemical data, as well as the nitrogen removal amount, the feedback nitrogen removal difference, and the dosing amount; the input vector is used to characterize the biochemical parameters of the anoxic tank in the current cycle; perform dosing prediction based on the input vector and the preset random forest model to obtain the dosing instruction, and the dosing instruction includes the opening time, opening frequency, and opening duration of the dosing pump.
[0162] In a possible implementation manner, the processing module 602 is specifically used to determine the initial nitrogen removal amount based on the instantaneous influent flow rate and nitrate nitrogen value of the anoxic tank; determine the first denitrification coefficient based on the COD value and the preset first mapping relationship; determine the second denitrification coefficient based on the dissolved oxygen value and the preset second mapping relationship; correct the initial nitrogen removal amount based on the first denitrification coefficient and the second denitrification coefficient to obtain the nitrogen removal amount in the current cycle; calculate the dosing amount corresponding to the nitrogen removal amount in the current cycle based on the nitrogen removal amount in the current cycle.
[0163] In a possible implementation manner, the processing module 602 is specifically used to, if the nitrogen removal amount in the current cycle is greater than the first threshold, use the first formula to determine the dosing amount corresponding to the nitrogen removal amount; the first formula is as follows:
[0164]
[0165] Wherein, G is the chemical dosage corresponding to the nitrogen removal amount, y is the nitrogen removal amount in the current cycle, b is the DO value, c is the configured concentration of the liquid medicine in the chemical dosing pump, m is the COD value, n is the biodegradability coefficient, ω is the BOD conversion coefficient, q is the instantaneous influent flow rate, and β is the total correction coefficient;
[0166] If the nitrogen removal amount in the current cycle is less than the first threshold, then based on the instantaneous influent flow rate, calculate the flow coefficient, and based on the flow coefficient, determine the chemical dosage corresponding to the nitrogen removal amount.
[0167] In a possible implementation manner, the processing module 602 is specifically configured to, if the flow coefficient is less than the first flow rate, determine that the carbon source dosage is zero, and based on the second formula, determine the chemical dosage corresponding to the nitrogen removal amount; the second formula is as follows:
[0168]
[0169] Wherein, h is the carbon source conversion coefficient, b is the DO value, ω is the BOD conversion coefficient, g is the carbon source dosage, c is the configured concentration of the liquid medicine in the chemical dosing pump, and Q is the designed daily treatment capacity; if the flow coefficient is greater than or equal to the first flow rate and less than the second flow rate, then based on the first formula, determine the chemical dosage corresponding to the nitrogen removal amount; if the flow coefficient is greater than or equal to the second flow rate and less than the third flow rate, then based on the nitrogen removal amount and the flow coefficient, and the third mapping relationship, determine the carbon source dosage, and based on the second formula, determine the chemical dosage corresponding to the nitrogen removal amount; if the flow coefficient is greater than the third flow rate, then based on the first formula, determine the chemical dosage corresponding to the nitrogen removal amount.
[0170] In a possible implementation manner, the communication module 601 is further configured to obtain the biochemical data and chemical dosing data of the anoxic tank in the historical period; the processing module 602 is further configured to divide the biochemical data and chemical dosing data of the anoxic tank in the historical period to obtain the biochemical data and chemical dosing data in each chemical dosing cycle; calculate the nitrogen removal amount, the post-feedback nitrogen removal difference, and the chemical dosage corresponding to the nitrogen removal amount in each chemical dosing cycle based on the biochemical data in each chemical dosing cycle; calculate the ideal chemical dosing instruction in each chemical dosing cycle based on the biochemical data and chemical dosing data in each chemical dosing cycle, and the chemical dosage corresponding to the nitrogen removal amount, and the ideal chemical dosing instruction includes the opening time, opening frequency, and opening duration of the chemical dosing pump; generate the input vector of each chemical dosing cycle based on the biochemical data, nitrogen removal amount, post-feedback nitrogen removal difference, and chemical dosage corresponding to the nitrogen removal amount in each chemical dosing cycle; use the input vector of each chemical dosing cycle as the input and the ideal chemical dosing instruction of each chemical dosing cycle as the output to generate a training sample; perform training based on the training sample to obtain a preset random forest model.
[0171] In a possible implementation, the processing module 602 is specifically configured to perform the following steps: Step 21: Set the initial values of the model parameters of the random forest model; the model parameters include the number of trees, the depth of the trees, the maximum depth of the trees, the minimum number of samples required for node classification, the minimum number of samples required for leaf nodes, the maximum number of features during splitting, and whether to use bootstrap sampling; Step 22: Based on the training set in the training samples and the initial values of the model parameters, perform training to obtain an initial dosing model, and set the initial dosing model as the optimal model; Step 23: Based on the test set in the training samples, evaluate the optimal model to obtain the evaluation result of the optimal model; the evaluation result includes the accuracy rate and the recall rate; Step 24: Adjust the model parameters, and based on the training set in the training samples and the adjusted model parameters, perform training to obtain an updated dosing model; Step 25: Based on the test set in the training samples, evaluate the updated dosing model to obtain the evaluation result of the updated dosing model; Step 26: If the evaluation result of the updated dosing model is better than the evaluation result of the optimal model, determine the updated dosing model as the optimal model; if the evaluation result of the optimal model is better than the evaluation result of the updated dosing model, keep the optimal model unchanged; Step 27, repeat Steps 24 to 27 until the number of iterations is greater than the maximum number of iterations; Step 28, based on the model parameters corresponding to the optimal model, perform training to determine the random forest model.
[0172] In a possible implementation, the processing module 602 is further configured to perform the following steps: Step 31: Based on the model parameters corresponding to the optimal model and the training samples, perform training to obtain a teacher model and a student model; the teacher model and the student model are random forest models with the same model parameters; Step 32: Test the teacher model based on the test set in the training samples, and calculate the first test accuracy of the teacher model; and based on the first test accuracy, determine the test accuracy threshold; Step 33: Prune the branches and leaves of the student model to obtain an adjusted student model; Step 34: Test the adjusted student model based on the test set in the training samples to obtain the second test accuracy; Step 35: If the second test accuracy is greater than or equal to the test accuracy threshold, repeat Steps 33 to 35 until the second test accuracy is less than the test accuracy threshold; Step 46: If the second test accuracy is less than the test accuracy threshold, determine the student model before adjustment in the current iteration process as the preset random forest model.
[0173] In a possible implementation, the processing module 602 is further configured to determine the dosing amount deviation values of multiple cycles before the current cycle based on the real-time biochemical data and dosing instructions of multiple cycles before the current cycle stored in advance; and update the input vector based on the dosing amount deviation values of multiple cycles before the current cycle to obtain an updated input vector.
[0174] In a possible implementation, the communication module 601 is further configured to receive a drug addition instruction input by a user; the drug addition instruction includes a drug addition time and a drug addition amount; the processing module 602 is further configured to calculate a calculated drug addition amount at the drug addition time based on the biochemical data at the drug addition time; perform calibration based on the drug addition amount input by the user and the calculated drug addition amount to determine the feasibility of the drug addition instruction; if the drug addition instruction is feasible, generate a drug addition instruction based on the drug addition instruction; if the drug addition instruction is not feasible, output a display message, and the display message is used to prompt the user that an error has occurred in the input.
[0175] Figure 5 This is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. As Figure 5 shown, the electronic device 700 of this embodiment includes: a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701. When the processor 701 executes the computer program 703, the steps in the above method embodiments are implemented, for example Figure 3 the steps S101-S104 shown. Alternatively, when the processor 701 executes the computer program 703, the functions of each module / unit in the above device embodiments are implemented. For example, Figure 4 the functions of the communication module 601 and the processing module 602 shown.
[0176] Exemplarily, the computer program 703 may be divided into one or more modules / units. The one or more modules / units are stored in the memory 702 and executed by the processor 701 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 703 in the electronic device 700. For example, the computer program 703 may be divided into Figure 4 the communication module 601 and the processing module 602 shown.
[0177] The so-called processor 701 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0178] The memory 702 may be an internal storage unit of the electronic device 700, such as a hard disk or memory of the electronic device 700. The memory 702 may also be an external storage device of the electronic device 700, such as a plug-in hard disk equipped on the electronic device 700, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 702 may also include both an internal storage unit and an external storage device of the electronic device 700. The memory 702 is used to store the computer program and other programs and data required by the terminal. The memory 702 may also be used to temporarily store data that has been output or is to be output.
[0179] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0180] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0181] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0182] The above-described 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 foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A precise dosing control method for carbon sources in an anoxic tank, characterized in that, Including: Obtaining the real-time biochemical data of the anoxic tank in the current cycle, where the real-time biochemical data includes the instantaneous influent flow rate, nitrate nitrogen value, and COD value of the anoxic tank, as well as the dissolved oxygen value of the aerobic tank at the outlet of the anoxic tank; Calculating the nitrogen removal amount in the current cycle based on the real-time biochemical data of the anoxic tank in the current cycle, and then feeding back the nitrogen removal difference and the chemical dosage corresponding to the nitrogen removal amount; Generating an input vector for the current cycle based on the real-time biochemical data, as well as the nitrogen removal amount, the fed-back nitrogen removal difference, and the chemical dosage; the input vector is used to characterize the biochemical parameters of the anoxic tank in the current cycle; Performing chemical dosage prediction based on the input vector and a preset random forest model to obtain a chemical dosage instruction, where the chemical dosage instruction includes the opening time, opening frequency, and opening duration of the chemical dosing pump; The calculating the nitrogen removal amount in the current cycle based on the real-time biochemical data of the anoxic tank in the current cycle, and then feeding back the nitrogen removal difference and the chemical dosage corresponding to the nitrogen removal amount includes: determining an initial nitrogen removal amount based on the instantaneous influent flow rate and nitrate nitrogen value of the anoxic tank; determining a first denitrification coefficient based on the COD value and a preset first mapping relationship; determining a second denitrification coefficient based on the dissolved oxygen value and a preset second mapping relationship; correcting the initial nitrogen removal amount based on the first denitrification coefficient and the second denitrification coefficient to obtain the nitrogen removal amount in the current cycle; calculating the chemical dosage corresponding to the nitrogen removal amount in the current cycle based on the nitrogen removal amount in the current cycle.
2. The precise carbon source dosing control method for anoxic tanks according to claim 1, characterized in that, The calculating the chemical dosage corresponding to the nitrogen removal amount in the current cycle based on the nitrogen removal amount in the current cycle includes: If the nitrogen removal amount in the current cycle is greater than a first threshold, use a first formula to determine the chemical dosage corresponding to the nitrogen removal amount; The first formula is as follows: Where G is the chemical dosage corresponding to the nitrogen removal amount, y is the nitrogen removal amount in the current cycle, b is the DO value, c is the concentration of the liquid medicine in the chemical dosing pump, m is the COD value, n is the biodegradability coefficient, ω is the BOD conversion coefficient, q is the instantaneous influent flow rate, and β is the total correction coefficient; If the nitrogen removal amount in the current cycle is less than the first threshold, calculate a flow coefficient based on the instantaneous influent flow rate, and determine the chemical dosage corresponding to the nitrogen removal amount based on the flow coefficient.
3. The precise dosing control method of carbon source in anoxic tank according to claim 2, characterized in that, The determining the chemical dosage corresponding to the nitrogen removal amount based on the flow coefficient includes: If the flow coefficient is less than a first flow rate, determine that the carbon source dosage is zero, and use a second formula to determine the chemical dosage corresponding to the nitrogen removal amount; The second formula is as follows: Among them, h is the carbon source conversion coefficient, b is the DO value, ω is the BOD conversion coefficient, g is the carbon source dosage, c is the concentration of the liquid medicine in the dosing pump, and Q is the designed daily treatment capacity; If the flow coefficient is greater than or equal to the first flow rate and less than a second flow rate, use the first formula to determine the chemical dosage corresponding to the nitrogen removal amount; If the flow coefficient is greater than or equal to the second flow rate and less than a third flow rate, determine the carbon source dosage based on the nitrogen removal amount, the flow coefficient, and a third mapping relationship, and use the second formula to determine the chemical dosage corresponding to the nitrogen removal amount; If the flow coefficient is greater than the third flow rate, use the first formula to determine the chemical dosage corresponding to the nitrogen removal amount.
4. The precise dosing control method of carbon source in the anoxic tank according to claim 1, wherein Before performing drug addition prediction based on the input vector and the preset random forest model to obtain a drug addition instruction, the following steps are further included: Obtain the biochemical data and drug addition data of the anoxic pond during the historical period; Divide the biochemical data and drug addition data of the anoxic pond during the historical period to obtain the biochemical data and drug addition data for each drug addition cycle; Based on the biochemical data for each drug addition cycle, calculate the nitrogen removal amount, post-feedback nitrogen removal difference, and the corresponding drug addition amount for each drug addition cycle; Based on the biochemical data and drug addition data for each drug addition cycle, and the corresponding drug addition amount for the nitrogen removal amount, calculate the ideal drug addition instruction for each drug addition cycle. The ideal drug addition instruction includes the opening time, opening frequency, and opening duration of the drug addition pump; Based on the biochemical data, nitrogen removal amount, post-feedback nitrogen removal difference, and the corresponding drug addition amount for each drug addition cycle, generate an input vector for each drug addition cycle; Using the input vectors for each drug addition cycle as inputs and the ideal drug addition instructions for each drug addition cycle as outputs, generate training samples; Based on the training samples, perform training to obtain the preset random forest model.
5. The precise carbon source dosing control method for anoxic tanks according to claim 4, characterized in that, The step of performing training based on the training samples to obtain the preset random forest model includes: Step 21: Set the initial values of the model parameters of the random forest model. The model parameters include the number of trees, the depth of the trees, the maximum depth of the trees, the minimum number of samples required for node classification, the minimum number of samples required for leaf nodes, the maximum number of features during splitting, and whether to use bootstrap sampling; Step 22: Based on the training set in the training samples and the initial values of the model parameters, perform training to obtain an initial drug addition model, and set the initial drug addition model as the optimal model; Step 23: Based on the test set in the training samples, evaluate the optimal model to obtain the evaluation result of the optimal model. The evaluation result includes the accuracy rate and the recall rate; Step 24: Adjust the model parameters, and based on the training set in the training samples and the adjusted model parameters, perform training to obtain an updated drug addition model; Step 25: Based on the test set in the training samples, evaluate the updated drug addition model to obtain the evaluation result of the updated drug addition model; Step 26: If the evaluation result of the updated drug addition model is better than the evaluation result of the optimal model, then determine the updated drug addition model as the optimal model; if the evaluation result of the optimal model is better than the evaluation result of the updated drug addition model, then keep the optimal model unchanged; Step 27: Repeat steps 24 to 27 until the number of iterations is greater than the maximum number of iterations; Step 28: Based on the model parameters corresponding to the optimal model, perform training to determine the random forest model.
6. The precise dosing control method of carbon source in anoxic tank according to claim 5, characterized in that, The step of performing training based on the model parameters corresponding to the optimal model to determine the random forest model includes: Step 31: Based on the model parameters corresponding to the optimal model and the training samples, perform training to obtain a teacher model and a student model. The teacher model and the student model are random forest models with the same model parameters; Step 32: Test the teacher model based on the test set in the training samples, and calculate the first test accuracy of the teacher model; and determine a test accuracy threshold based on the first test accuracy; Step 33: Prune the branches and leaves of the student model to obtain an adjusted student model; Step 34: Test the adjusted student model based on the test set in the training samples to obtain a second test accuracy; Step 35: If the second test accuracy is greater than or equal to the test accuracy threshold, repeat Step 33 to Step 35 until the second test accuracy is less than the test accuracy threshold; Step 46: If the second test accuracy is less than the test accuracy threshold, determine the student model before adjustment in the current iteration process as the preset random forest model.
7. The precise carbon source dosing control method for the anoxic tank according to claim 1, characterized in that Before performing the drug addition prediction based on the input vector and the preset random forest model to obtain a drug addition instruction, it further includes: Determine the drug addition amount deviation values for multiple cycles before the current cycle based on the real-time biochemical data and drug addition instructions for multiple cycles before the current cycle stored in advance; Update the input vector based on the drug addition amount deviation values for multiple cycles before the current cycle to obtain an updated input vector.
8. The precise dosing control method of carbon source in anoxic tank according to claim 1, characterized in that, After performing the drug addition prediction based on the input vector and the preset random forest model to obtain a drug addition instruction, it further includes: Receive a drug addition instruction input by the user; the drug addition instruction includes a drug addition time and a drug addition amount; Calculate the calculated drug addition amount at the drug addition time based on the biochemical data at the drug addition time; Perform calibration based on the drug addition amount input by the user and the calculated drug addition amount to determine the feasibility of the drug addition instruction; If the drug addition instruction is feasible, generate the drug addition instruction based on the drug addition instruction; If the drug addition instruction is not feasible, output a display message for prompting the user that the input is incorrect.
9. An accurate carbon source dosing control system for an anoxic tank, characterized in that, Applied to a biochemical system, the biochemical system includes an anaerobic tank, an anoxic tank, an aerobic tank, a secondary sedimentation area, and a drug addition control subsystem; the outlet of the anaerobic tank is connected to the inlet of the anoxic tank, the outlet of the anoxic tank is connected to the inlet of the aerobic tank, the outlet of the aerobic tank is connected to the inlet of the secondary sedimentation area, and the drug addition control subsystem includes an online nitrate analyzer, an online COD analyzer, a drug addition pump, and an online dissolved oxygen analyzer; a mixed liquor return system connected to the secondary sedimentation area is provided at the inlet of the anoxic tank, and the online nitrate analyzer, the online COD analyzer, and the drug addition pump are sequentially provided after the mixed liquor return system; the online dissolved oxygen analyzer is provided at the inlet of the aerobic tank; the drug addition control subsystem is used to execute the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Carbon source adding system and method for sewage treatment plant
CN112978919A