A method for dosing treatment of sewage and a computer readable storage medium
By setting up online monitoring devices at various nodes of the wastewater treatment plant and combining activated sludge kinetic algorithms and carbon source dosage prediction models, the carbon source dosage is dynamically allocated, solving the problem of inaccurate carbon source dosage, achieving precise control, reducing waste and energy consumption, and improving the efficiency and economy of the wastewater treatment system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-17
AI Technical Summary
Existing wastewater treatment plants have failed to fully consider fluctuations in influent water quality and other loads in their carbon source addition methods, resulting in inaccurate calculations of carbon source demand, waste of reagents, increased operating costs and sludge production, and increased energy consumption.
Online monitoring devices are installed at various nodes of the wastewater treatment plant. By combining activated sludge kinetics algorithms and carbon source dosage prediction models, the carbon source dosage is dynamically allocated through the first comprehensive efficiency index, achieving precise control of the carbon source dosage.
It improves the accuracy of carbon source dosage calculation, reduces carbon source waste and operating energy consumption, and enhances the overall operating efficiency and economy of the wastewater treatment system.
Smart Images

Figure CN121348711B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wastewater treatment technology, and in particular to a method for chemical treatment of wastewater and a computer-readable storage medium. Background Technology
[0002] Biological deoxygenation refers to the technology of converting nitrogen in wastewater into nitrogen gas using microorganisms. It boasts advantages such as high efficiency, environmental friendliness, and cost-effectiveness, and is widely used in domestic wastewater treatment. In wastewater treatment, nitrogen mainly exists in the form of organic nitrogen and ammonia nitrogen. The biological denitrification process includes ammonification, nitrification, denitrification, and assimilation. Among these, denitrification is a key step that uses an external carbon source to provide electrons to promote the conversion of nitrate nitrogen into nitrogen gas.
[0003] Currently, to ensure the normal operation of denitrification, most wastewater treatment plants use carbon source addition to improve denitrification efficiency. Because urban wastewater has a low carbon-to-nitrogen ratio, the influent cannot provide sufficient carbon source, necessitating additional carbon source addition. However, existing carbon source addition methods mainly rely on manual calculations or single formula calculations, failing to fully consider the impact of fluctuations in influent water quality and other loads on carbon source demand. This leads to overdosing, resulting not only in wasted reagents and increased operating costs but also in significantly increased sludge production, increasing system energy consumption and treatment complexity. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] In view of the above-mentioned shortcomings and deficiencies of the prior art, this application provides a method for chemical treatment of wastewater and a computer-readable storage medium, which solves the technical problem that the carbon source addition method that relies on manual calculation or a single formula calculation fails to fully consider the impact of fluctuations in influent water quality and other loads on the carbon source demand, thus leading to overdosing. This not only wastes the reagents and increases operating costs, but also significantly increases sludge production, thereby increasing the system's energy consumption and treatment difficulty.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the main technical solutions adopted in this application include:
[0008] In a first aspect, embodiments of this application provide a method for chemical treatment of wastewater. The method is based on a wastewater treatment system, which includes: a control device and an anoxic tank and an aerobic tank arranged along the influent direction of the wastewater treatment plant, as well as online monitoring devices and chemical dosing devices installed at various nodes of the wastewater treatment plant.
[0009] When urban domestic water flows into the sewage treatment plant through the main inlet pipe, the control device uses online monitoring parameters obtained in real time by the online monitoring device, including the measured values of total nitrogen in the inlet, COD in the inlet, and total nitrogen in the effluent.
[0010] The control device obtains the carbon-nitrogen ratio suitability and effluent compliance redundancy value based on the measured values of total nitrogen in the influent, COD in the influent, and total nitrogen in the effluent, and constructs the first comprehensive efficiency index based on the carbon-nitrogen ratio suitability and effluent compliance redundancy value.
[0011] The control device obtains the corresponding first theoretical carbon source dosage based on online monitoring parameters and a pre-set activated sludge kinetic algorithm, and inputs the online monitoring parameters into a pre-trained carbon source dosage prediction model to obtain the corresponding second theoretical carbon source dosage.
[0012] The control device allocates weights for the first theoretical carbon source dosage and the second theoretical carbon source dosage based on the first comprehensive efficiency index, and obtains the actual carbon source dosage based on the allocation weights, the first theoretical carbon source dosage, and the second theoretical carbon source dosage, so as to realize the automatic dosing of carbon source reagents by the dosing device.
[0013] Optionally, in a specific embodiment, the online monitoring parameters further include: the measured value of nitrate nitrogen in the aerobic tank, the measured value of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank;
[0014] The control device obtains the carbon-nitrogen ratio suitability and effluent compliance redundancy value based on the measured values of influent total nitrogen, influent COD, and effluent total nitrogen. It then constructs a first comprehensive performance index based on these values, including:
[0015] The control device obtains the carbon-nitrogen ratio fit degree based on the measured values of influent COD and total nitrogen, as well as the preset optimal carbon-nitrogen ratio. The carbon-nitrogen ratio fit degree is calculated as the product of the ratio of the measured values of influent COD and total nitrogen and the reciprocal of the optimal carbon-nitrogen ratio.
[0016] The control device obtains the nitrate nitrogen conversion rate based on the measured values of nitrate nitrogen in the aerobic tank, the measured values of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank. The nitrate nitrogen conversion rate is calculated as the ratio of the difference between the measured values of nitrate nitrogen in the aerobic tank and the measured values of nitrate nitrogen in the anoxic tank to the product of the measured values of nitrate nitrogen in the aerobic tank and the reflux ratio in the anoxic tank.
[0017] The control device obtains the effluent compliance redundancy value based on the measured value of total nitrogen in the effluent and the pre-set design total nitrogen in the effluent. The effluent compliance redundancy value is calculated as the product of the difference between the measured value of total nitrogen in the effluent and the design total nitrogen in the effluent, and the reciprocal of the design total nitrogen in the effluent.
[0018] The control device performs a weighted summation of the carbon-nitrogen ratio suitability, nitrate nitrogen conversion rate, and effluent compliance redundancy value to obtain the corresponding first comprehensive efficiency index.
[0019] Optionally, in one specific embodiment, the control device allocates the allocation weights of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on a first comprehensive efficiency index, including:
[0020] Based on the pre-set performance baseline, the position of the first comprehensive performance index on the performance baseline is determined, and the corresponding allocation weights are assigned to the first theoretical carbon source addition amount and the second theoretical carbon source addition amount according to the position of the first comprehensive performance index on the performance baseline.
[0021] Optionally, in one specific embodiment, the performance baseline is established based on the following steps:
[0022] Multiple sets of historical operating data were acquired, each set of which had a corresponding historical carbon source dosage and the difference in total nitrogen in the effluent before and after the carbon source dosage.
[0023] Based on each set of historical operating data, the second historical comprehensive efficiency index corresponding to each set of historical operating data is obtained. Based on the historical carbon source dosage and the difference in total nitrogen in the effluent before and after the carbon source dosage, the historical carbon source dosage marginal benefit corresponding to each set of historical operating data is obtained. Among them, the marginal benefit of each historical carbon source dosage is the ratio of the difference in total nitrogen in the effluent before and after the carbon source dosage to the historical carbon source dosage.
[0024] The second historical comprehensive efficiency index and historical carbon source addition marginal benefit corresponding to each set of historical operating data are divided into intervals with each interval being 0.1 of the second historical comprehensive efficiency index, and the average historical comprehensive efficiency index and historical average marginal benefit within each interval are obtained.
[0025] Based on the average historical comprehensive efficiency index and historical average marginal benefit across all intervals, and using a pre-defined formula (Formula 1), a performance baseline is fitted; Formula 1 is:
[0026] y i =kln(x i )+b;
[0027] Where i is the index of the interval, y i x represents the historical average marginal benefit of the interval index i. i Let be the average overall performance index of the interval index i, and k and b are parameters required to fit the performance baseline.
[0028] Optionally, in one specific embodiment, after the performance baseline is fitted, the initial performance baseline is corrected and the boundary is set based on the pre-set optimal denitrification process parameters.
[0029] Optionally, in one specific embodiment, the control device allocates the allocation weights of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on a first comprehensive efficiency index, including:
[0030] The control device obtains the corresponding first marginal benefit based on the first comprehensive performance index and the preset performance baseline;
[0031] Based on the first marginal benefit and the pre-set three-level thresholds, the corresponding benefit level is obtained; wherein, the three-level thresholds include high benefit, medium benefit and low benefit;
[0032] Based on the aforementioned benefit level, the allocation weights for the first theoretical carbon source addition amount and the second theoretical carbon source addition amount are determined.
[0033] Optionally, in a specific embodiment, the online monitoring parameters further include: the measured value of nitrate nitrogen in the aerobic tank, the measured value of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank;
[0034] The online monitoring parameters are input into a pre-trained carbon source injection prediction model to obtain the corresponding second theoretical carbon source injection amount, including:
[0035] Based on the measured values of influent COD and total nitrogen and the pre-set optimal carbon-nitrogen ratio, a carbon-nitrogen ratio fit is constructed.
[0036] The nitrate nitrogen conversion rate was constructed based on the measured values of nitrate nitrogen in the aerobic tank, the measured values of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank.
[0037] Based on the measured values of nitrate nitrogen in the aerobic tank, the reflux ratio in the anoxic tank, and the measured values of total nitrogen in the influent, the nitrate nitrogen loading intensity was constructed.
[0038] Based on the measured total nitrogen value of the effluent and the pre-set design total nitrogen value of the effluent, a gap in effluent compliance is constructed;
[0039] Based on the effluent compliance gap, carbon-nitrogen ratio suitability, and nitrate nitrogen conversion rate, the urgency of carbon source demand is constructed.
[0040] Feature vectors were extracted from the measured values of influent COD, influent total nitrogen, effluent total nitrogen, nitrate nitrogen in the aerobic tank, nitrate nitrogen in the anoxic tank, reflux ratio in the anoxic tank, carbon-nitrogen ratio, nitrate nitrogen conversion rate, nitrate nitrogen load intensity, effluent compliance gap, and carbon source demand urgency.
[0041] Based on a pre-set attention layer, feature amplification is performed on all feature vectors to obtain the corresponding attention feature matrix;
[0042] A linear transformation is performed on the attention feature matrix to obtain the second theoretical carbon source addition amount.
[0043] Optionally, in a specific embodiment, after performing a linear transformation on the attention feature matrix to obtain the second theoretical carbon source dosage, the method further includes:
[0044] Based on the nitrate nitrogen conversion rate, the measured value of total nitrogen in the effluent, the pre-set target nitrate nitrogen conversion rate, and the pre-set design total nitrogen in the effluent, an appropriate process coefficient is obtained. The appropriate process coefficient is the product of the ratio of the target nitrate nitrogen conversion rate to the nitrate nitrogen conversion rate and the ratio of the design total nitrogen in the effluent to the total nitrogen boundary value, where the total nitrogen boundary value is the larger value between the measured total nitrogen in the effluent and 80% of the design total nitrogen in the effluent. The second theoretical carbon source dosage is statically constrained and calibrated based on the appropriate process coefficient and the pre-set carbon source type coefficient.
[0045] Optionally, in one specific embodiment, the online monitoring parameters further include the measured value of nitrate nitrogen in the anoxic pond;
[0046] Obtaining the actual carbon source dosage to enable automatic dosing of carbon source reagents by the dosing device includes:
[0047] Based on the detected water temperature of the biological treatment tank and a pre-set formula two, the actual carbon source dosage is adjusted for temperature; the formula two is:
[0048] Q1 = Q0 × 1.05 (T-20) ;
[0049] Where Q1 is the actual carbon source dosage after temperature correction, Q0 is the actual carbon source dosage, and T is the water temperature of the biological treatment tank;
[0050] Based on the detected pH value of the biological treatment tank, the actual carbon source dosage after temperature correction is adjusted for pH. The pH correction is as follows: when the pH value of the biological treatment tank is greater than 9.0 or less than 6.5, the actual carbon source dosage after temperature correction is multiplied by 1.1.
[0051] Based on the measured value of nitrate nitrogen in the anoxic pond and the pre-set target nitrified nitrogen in the anoxic pond, the actual carbon source dosage after pH correction is corrected by feedback. The feedback correction is to multiply the actual carbon source dosage after pH correction by the ratio of the measured value of nitrate nitrogen in the anoxic pond to the target nitrified nitrogen in the anoxic pond.
[0052] The actual carbon source dosage after feedback correction is constrained based on the preset maximum and minimum allowable dosages. The process constraint is as follows: when the actual carbon source dosage after feedback correction is greater than the maximum allowable dosage, the actual carbon source dosage after feedback correction is corrected to the maximum allowable dosage; when the actual carbon source dosage after feedback correction is less than the minimum allowable dosage, the actual carbon source dosage after feedback correction is corrected to the minimum allowable dosage.
[0053] Based on the actual carbon source dosage under process constraints and the pre-set PID algorithm, control commands are sent to the dosing device to achieve automatic dosing of carbon source reagents.
[0054] Secondly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for chemical treatment of wastewater.
[0055] (III) Beneficial Effects
[0056] This application discloses a method for chemical treatment of wastewater. By setting up online monitoring devices at various nodes of the wastewater treatment plant, real-time monitoring of water quality at each stage of the wastewater treatment process is achieved. This enables timely acquisition of information on changes in water quality parameters, providing basic data support for the precise control of carbon source dosage.
[0057] By combining activated sludge kinetics algorithm and carbon source dosage prediction model, multiple calculations and verifications of carbon source dosage were achieved, which improved the calculation accuracy of actual carbon source dosage.
[0058] Based on this, the weight of the theoretical carbon source dosage is allocated using the first comprehensive efficiency index, thereby achieving dynamic adaptation of the carbon source dosage scheme under different water quality conditions. This ensures that the core indicators of wastewater treatment meet the standards, while minimizing carbon source waste and operating energy consumption, and improving the overall operating efficiency and economy of the wastewater treatment system. Attached Figure Description
[0059] Figure 1 A flowchart illustrating a method for chemical treatment of wastewater provided in this application embodiment;
[0060] Figure 2 This is a schematic diagram of the performance baseline establishment process provided in the embodiments of this application;
[0061] Figure 3 This is a schematic diagram of the carbon source addition prediction model processing flow provided in the embodiments of this application. Detailed Implementation
[0062] To better explain and facilitate understanding of this application, the following detailed description of the application is provided in conjunction with the accompanying drawings and specific embodiments.
[0063] In wastewater treatment, nitrogen mainly exists in the form of organic nitrogen and ammonia nitrogen. Biological nitrogen removal processes include ammonification, nitrification, denitrification, and assimilation. Denitrification is a crucial step in converting nitrate nitrogen into nitrogen gas by providing electrons from an external carbon source. To ensure the proper functioning of denitrification, most wastewater treatment plants use carbon source addition to improve its efficiency. However, due to the low carbon-to-nitrogen ratio in urban wastewater, the influent cannot provide sufficient carbon source, necessitating additional carbon source addition. Existing carbon source addition methods rely primarily on manual calculations or single formula calculations, failing to adequately consider the impact of fluctuations in influent water quality and other loads on carbon source demand. This leads to overdosing, resulting in wasted reagents, increased operating costs, and significantly increased sludge production, further increasing system energy consumption and treatment complexity.
[0064] This application provides a method for chemical treatment of wastewater. By setting up online monitoring devices at various nodes of the wastewater treatment plant, real-time monitoring of water quality at each stage of the wastewater treatment process is realized, and information on changes in water quality parameters can be obtained in a timely manner, providing basic data support for the precise control of carbon source dosage.
[0065] By combining activated sludge kinetics algorithm and carbon source dosage prediction model, multiple calculations and verifications of carbon source dosage are achieved, improving the accuracy of actual carbon source dosage calculation. Furthermore, the weight of theoretical carbon source dosage is allocated using the first comprehensive efficiency index, thereby achieving dynamic adaptation of carbon source dosage schemes under different water quality conditions. This ensures that the core indicators of wastewater treatment meet the standards, while minimizing carbon source waste and operating energy consumption, thus improving the overall operating efficiency and economy of the wastewater treatment system.
[0066] To better understand the above technical solutions, exemplary embodiments of this application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application can be understood more clearly and thoroughly, and that the scope of this application can be fully conveyed to those skilled in the art.
[0067] This application provides a method for chemical treatment of wastewater, such as... Figure 1 As shown, this method is based on a wastewater treatment system, which includes: a control device and anoxic and aerobic tanks set along the influent direction of the wastewater treatment plant, as well as online monitoring devices and dosing devices set at various nodes of the wastewater treatment plant;
[0068] S10. When urban domestic water flows into the sewage treatment plant along the main inlet pipe, the control device uses online monitoring parameters obtained in real time by the online monitoring device, including the measured values of total nitrogen in the inlet, COD in the inlet, and total nitrogen in the effluent.
[0069] S20. The control device obtains the carbon-nitrogen ratio suitability and effluent compliance redundancy value based on the measured values of total nitrogen in the influent, COD in the influent, and total nitrogen in the effluent, and constructs the first comprehensive efficiency index based on the carbon-nitrogen ratio suitability and effluent compliance redundancy value.
[0070] S30. The control device obtains the corresponding first theoretical carbon source dosage based on online monitoring parameters and a pre-set activated sludge kinetic algorithm, and inputs the online monitoring parameters into a pre-trained carbon source dosage prediction model to obtain the corresponding second theoretical carbon source dosage.
[0071] S40. The control device allocates the allocation weights of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on the first comprehensive efficiency index, and obtains the actual carbon source dosage based on the allocation weights, the first theoretical carbon source dosage and the second theoretical carbon source dosage, so as to realize the automatic addition of carbon source reagent by the dosing device.
[0072] The wastewater dosing treatment method provided in this embodiment combines activated sludge kinetics algorithm and carbon source dosage prediction model to achieve multiple calculations and verifications of carbon source dosage, improving the accuracy of actual carbon source dosage calculation. By allocating the weight of theoretical carbon source dosage through the first comprehensive efficiency index, dynamic adaptation of carbon source dosage schemes under different water quality conditions is achieved. This ensures that the core indicators of wastewater treatment meet the standards, minimizes carbon source waste and operating energy consumption, and improves the overall operating efficiency and economy of the wastewater treatment system.
[0073] Specifically, the aforementioned wastewater treatment system includes a control device and an anoxic tank and an aerobic tank arranged sequentially along the wastewater treatment plant's inlet main pipe to the outlet main pipe;
[0074] The online monitoring device is set up as follows: a COD monitoring sensor and a total nitrogen monitoring sensor are installed on the main inlet pipe to monitor the measured values of total nitrogen and COD in the inlet in real time.
[0075] A total nitrogen monitoring sensor is installed on the main outlet pipe to monitor the actual value of total nitrogen in the outlet water in real time;
[0076] Nitrate nitrogen monitoring sensors are installed on both the anoxic and aerobic tanks. Flow sensors are installed on the conveying pipes and return pipes between the anoxic and aerobic tanks to monitor the measured nitrate nitrogen values in the aerobic tank, the measured nitrate nitrogen values in the anoxic tank, and the return ratio in the anoxic tank in real time.
[0077] The dosing device is installed on the aerobic and anaerobic tanks.
[0078] All dosing devices and online monitoring devices are connected to the control unit.
[0079] Furthermore, the carbon source storage tank of the dosing device is deployed next to the anoxic pool (≥3m from the pool wall for easy maintenance), and its volume is designed according to the maximum dosage in 7 days. It is equipped with liquid level sensors, dikes, leak detection instruments, etc.
[0080] The metering pump of the dosing device is installed on the equipment foundation between the storage tank outlet and the dosing pipeline. A diaphragm metering pump is used, and the pipeline length between the pump and the dosing port at the front end of the anoxic tank is ≤10m.
[0081] Furthermore, a water temperature sensor and a pH sensor are installed in the mixing area between the aerobic tank and the anoxic tank.
[0082] Furthermore, the control devices include PLC controllers, PID controllers, data acquisition gateways, etc.
[0083] This embodiment deploys multiple types of sensors at key nodes such as the influent, effluent, anoxic tank, aerobic tank, and reflux pipeline to achieve real-time monitoring of the entire process, including influent load (COD, total nitrogen), reaction process (nitrate nitrogen), effluent effect (total nitrogen), and process parameters (internal reflux ratio). This provides basic data support for the precise control of subsequent carbon source addition.
[0084] Optionally, in a specific embodiment, the online monitoring parameters further include: the measured value of nitrate nitrogen in the aerobic tank, the measured value of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank;
[0085] The control device obtains the carbon-nitrogen ratio suitability and effluent compliance redundancy value based on the measured values of influent total nitrogen, influent COD, and effluent total nitrogen. It then constructs a first comprehensive performance index based on these values, including:
[0086] The control device obtains the carbon-nitrogen ratio fit degree based on the measured values of influent COD and total nitrogen, as well as the preset optimal carbon-nitrogen ratio. The carbon-nitrogen ratio fit degree is calculated as the product of the ratio of the measured values of influent COD and total nitrogen and the reciprocal of the optimal carbon-nitrogen ratio.
[0087] The control device obtains the nitrate nitrogen conversion rate based on the measured values of nitrate nitrogen in the aerobic tank, the measured values of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank. The nitrate nitrogen conversion rate is calculated as the ratio of the difference between the measured values of nitrate nitrogen in the aerobic tank and the measured values of nitrate nitrogen in the anoxic tank to the product of the measured values of nitrate nitrogen in the aerobic tank and the reflux ratio in the anoxic tank.
[0088] The control device obtains the effluent compliance redundancy value based on the measured value of total nitrogen in the effluent and the pre-set design total nitrogen in the effluent. The effluent compliance redundancy value is calculated as the product of the difference between the measured value of total nitrogen in the effluent and the design total nitrogen in the effluent, and the reciprocal of the design total nitrogen in the effluent.
[0089] The control device performs a weighted summation of the carbon-nitrogen ratio suitability, nitrate nitrogen conversion rate, and effluent compliance redundancy value to obtain the corresponding first comprehensive efficiency index.
[0090] Specifically, the carbon-to-nitrogen ratio (C / N ratio) is used to reflect the matching of influent carbon sources with denitrification requirements. When the C / N ratio is greater than or equal to 1.2, it indicates that the carbon source is sufficient and the carbon requirement for denitrification is low; if the C / N ratio is less than or equal to 0.8, it indicates that the influent carbon source is insufficient and an additional carbon source is required. The C / N ratio is obtained using the following formula:
[0091] ;
[0092] R1 represents the carbon-to-nitrogen ratio fit, while the optimal carbon-to-nitrogen ratio is generally set to 5:1.
[0093] Nitrate nitrogen conversion rate reflects the denitrification activity in the biological treatment stage. A nitrate nitrogen conversion rate greater than or equal to 0.7 indicates high denitrification activity and excellent carbon source utilization efficiency. A nitrate nitrogen conversion rate less than or equal to 0.4 indicates low denitrification activity, requiring improved carbon source dosing accuracy. The nitrate nitrogen conversion rate is obtained using the following formula:
[0094] ;
[0095] R2 represents the nitrification conversion rate, while the recirculation ratio in the anoxic tank is generally determined by the wastewater flow rate out of the anoxic tank and the wastewater flow rate into the anoxic tank through the recirculation pipe.
[0096] The effluent compliance redundancy value reflects the safe distance between the current effluent and the compliance target. Generally, if the effluent compliance redundancy value is less than or equal to 0, it indicates that the effluent meets the standard and carbon source addition can be controlled. If the effluent compliance redundancy value is greater than 0.2, it indicates a risk of effluent exceeding the standard, and it is necessary to effectively ensure sufficient carbon source. The effluent compliance redundancy value is generally obtained using the following formula:
[0097] ;
[0098] R3 is the redundancy value for effluent compliance, while the total nitrogen in the designed effluent is a pre-set value, which is generally set to 8 mg / L.
[0099] The carbon-nitrogen ratio, nitrification conversion rate, and effluent compliance redundancy are weighted and summed to form a first comprehensive performance index that reflects the denitrification efficiency profile.
[0100] In general, E1 = 0.3 × R1 + 0.5 × R2 + 0.2 × R3;
[0101] E1 is the first comprehensive efficiency index. The higher the first comprehensive efficiency index, the better the denitrification efficiency. 0.3, 0.5, and 0.2 are pre-set weights, which are set based on the priority of the denitrification effect.
[0102] This application quantifies the matching relationship between influent carbon sources and denitrification requirements by using carbon-nitrogen ratio adaptation, reflects the real-time activity of the biological reaction tank by using nitrate nitrogen conversion rate, and provides real-time early warning of the safe distance between effluent and the target standard by using effluent compliance redundancy value. It breaks through the limitations of traditional single-indicator evaluation, constructs an efficiency profile, and comprehensively and objectively describes the operating status of the wastewater treatment plant, providing a reliable and scientific basis for subsequent weight allocation and dosage calculation.
[0103] Optionally, in one specific embodiment, the control device allocates the allocation weights of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on a first comprehensive efficiency index, including:
[0104] Based on the pre-set performance baseline, the position of the first comprehensive performance index on the performance baseline is determined, and the corresponding allocation weights are assigned to the first theoretical carbon source addition amount and the second theoretical carbon source addition amount according to the position of the first comprehensive performance index on the performance baseline.
[0105] Furthermore, the process of establishing a performance baseline is as follows: Figure 2 As shown, it includes:
[0106] S01. Obtain multiple sets of historical operating data, where each set of historical operating data has a corresponding historical carbon source dosage and the difference in total nitrogen in the effluent before and after carbon source dosage;
[0107] S02. Based on each set of historical operating data, obtain the second historical comprehensive efficiency index corresponding to each set of historical operating data, and based on the historical carbon source addition amount and the difference in total nitrogen in the effluent before and after carbon source addition corresponding to each set of historical operating data, obtain the historical carbon source addition marginal benefit for each set; wherein, the marginal benefit of each historical carbon source addition is the ratio of the difference in total nitrogen in the effluent before and after carbon source addition to the historical carbon source addition amount.
[0108] S03. Take the second historical comprehensive efficiency index and historical carbon source addition marginal benefit corresponding to each set of historical operating data, divide them into intervals with each interval of 0.1 of the second historical comprehensive efficiency index, and obtain the average historical comprehensive efficiency index and historical average marginal benefit in each interval.
[0109] S04. Based on the average historical comprehensive efficiency index and historical average marginal benefit across all intervals, and a pre-set formula (Formula 1), fit the efficiency baseline; formula 1 is:
[0110] y i =kln(x i )+b;
[0111] Where i is the index of the interval, y i x represents the historical average marginal benefit of the interval index i. i Let be the average overall performance index of the interval index i, and k and b are parameters required to fit the performance baseline.
[0112] Specifically, the energy efficiency baseline is a benchmark established based on the optimal operating data, design parameters, and denitrification mechanism of a wastewater treatment plant. It represents the comprehensive efficiency index and the benefit of carbon source addition. Its core function is to quantify the denitrification state (e.g., high, medium, low) corresponding to the range of the comprehensive efficiency index, and to provide an objective basis for the weighting of the two theoretical values, avoiding biases from subjectively set weights. The energy efficiency baseline uses the comprehensive efficiency index as the horizontal axis and the marginal benefit of carbon source addition (i.e., the decrease in total nitrogen resulting from adding 1 kg of carbon source, in mg / L·kg⁻¹) as the horizontal axis. -1 Using the vertical axis as the ordinate, a single-peak or decreasing curve is formed (the higher the comprehensive efficiency index, the more stable the marginal benefit).
[0113] Generally, it is necessary to select historical operating data from the past 12 months (covering different seasons and influent load conditions). Each set of historical operating data has the corresponding historical carbon source dosage and the difference in total nitrogen in the effluent before and after the carbon source dosage.
[0114] Historical operating data were screened, retaining only valid data such as total nitrogen in effluent (≤8mg / L), complete carbon source dosage records, and no equipment malfunctions (e.g., abnormal aeration or agitation). The screened data was then preprocessed to remove outliers (e.g., sudden changes in influent flow rate >50% or missing monitoring data). The remaining data were then retained to establish an efficiency baseline.
[0115] Using the aforementioned three-dimensional efficiency quantification model, the second historical comprehensive efficiency index for each set of valid data is calculated.
[0116] E'=0.3R 11 +0.5R 22 +0.2R 33 ;
[0117] Where E' is the second historical comprehensive performance index, R 11 For historical carbon-nitrogen ratio fit, R 22 R represents the historical nitrate nitrogen conversion rate. 33 Redundancy for historical water discharge standards.
[0118] Calculate the historical marginal benefit of carbon source addition for each data set. The marginal benefit is represented by the ordinate of the baseline, reflecting the actual value of carbon source addition. The marginal benefit is calculated using the following formula:
[0119] ;
[0120] Where F represents the marginal benefit (here, the historical marginal benefit of carbon source addition). If the carbon source addition amount remains unchanged in a certain set of data, the marginal benefit is estimated by linear interpolation of two adjacent sets of data. The units for total nitrogen in the effluent are mg / L, the units for carbon source addition amount are kg / d, and the units for the final marginal benefit are mg / L·kg. -1 .
[0121] The calculated second historical comprehensive efficiency index and historical carbon source addition marginal benefit data are grouped into intervals according to the value of the second historical comprehensive efficiency index (e.g., each interval is 0.1).
[0122] Calculate the average historical comprehensive efficiency index and the historical average marginal benefit for each interval.
[0123] Nonlinear fitting (such as logarithmic fitting or polynomial fitting) is used to fit the data for all intervals into a smooth curve, i.e., the energy efficiency baseline. The fitting is achieved using Formula 1, namely:
[0124] y i =kln(x i )+b;
[0125] Where i is the index of the interval, y i x represents the historical average marginal benefit of the interval index i. i Let be the average overall performance index of the interval index i, and k and b are parameters required to fit the performance baseline.
[0126] Subsequently, to avoid extreme operating conditions, two rounds of calibration were performed:
[0127] Design parameter calibration involves substituting the optimal comprehensive efficiency index and design marginal benefit corresponding to the optimal denitrification operating conditions designed for the wastewater treatment plant (such as a design carbon-to-nitrogen ratio of 5:1, nitrate nitrogen conversion efficiency of 0.7, and total nitrogen in effluent of 8 mg / L) into the energy efficiency baseline, correcting the fitting parameters, and ensuring that the design operating conditions fall within the high-efficiency and stable range of the baseline.
[0128] Set boundaries, with an upper limit, a second historical comprehensive efficiency index ≥ 0.8, and historical carbon source addition marginal benefit data ≥ -0.05 mg / L·kg. -1 (Indicating high denitrification efficiency and carbon source addition benefit approaching saturation), lower limit boundary, second historical comprehensive efficiency index ≤ 0.2, historical carbon source addition marginal benefit data ≤ 0.4 mg / L·kg -1(This indicates that denitrification is inefficient, while adding a carbon source is highly effective); the baseline portion beyond the boundary is treated as a linear extension, which distorts the weight allocation corresponding to the extreme values.
[0129] Based on the calibrated energy efficiency baseline, the first comprehensive efficiency index / second historical comprehensive efficiency index is divided into three intervals according to the marginal benefit level, with each interval corresponding to a specific denitrification state:
[0130] The high-efficiency stable range (high benefit) is defined as follows: the ratio of the first comprehensive efficiency index to the second historical comprehensive efficiency index is ≥0.8, and the marginal benefit range is [-0.05, -0.1). At this point, it indicates that the denitrification activity is high, the carbon source is fully utilized, and the addition benefit is saturated. At this point, the allocation weights of the first theoretical carbon source addition amount and the second theoretical carbon source addition amount are 0.7 and 0.3, respectively.
[0131] The intermediate transition range (medium benefit) is 0.3 < first comprehensive efficiency index / second historical comprehensive efficiency index < 0.8, with a marginal benefit range of [-0.3, -0.1], indicating that the denitrification state is stable and the carbon source addition benefit is balanced. At this time, the allocation weights of the first theoretical carbon source addition amount and the second theoretical carbon source addition amount are 0.5 and 0.5, respectively.
[0132] The inefficient improvement range (low benefit) is defined as follows: First comprehensive efficiency index / Second historical comprehensive efficiency index ≤ 0.3 ([-0.4, -0.3)). This indicates low denitrification activity, insufficient carbon source / inefficient utilization, and extremely high addition benefits. In this case, the allocation weights of the first theoretical carbon source addition amount and the second theoretical carbon source addition amount are 0.3 and 0.7, respectively.
[0133] This application constructs an efficiency baseline and dynamically allocates the weights of dual theoretical carbon source additions based on it, which not only ensures the scientific and objective nature of intelligent control, but also significantly improves the accuracy and economy of carbon source addition, while reducing the difficulty of operation and maintenance.
[0134] Optionally, in one specific embodiment, the control device allocates the allocation weights of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on a first comprehensive efficiency index, including:
[0135] The control device obtains the corresponding first marginal benefit based on the first comprehensive performance index and the preset performance baseline;
[0136] Based on the first marginal benefit and the pre-set three-level thresholds, the corresponding benefit level is obtained; wherein, the three-level thresholds include high benefit, medium benefit and low benefit;
[0137] Based on the aforementioned benefit level, the allocation weights for the first theoretical carbon source addition amount and the second theoretical carbon source addition amount are determined.
[0138] This application uses the quantitative indicator of marginal benefit to allocate subsequent weights, avoiding the subjective bias of traditional fixed weights and adapting to different working conditions.
[0139] Optionally, in a specific embodiment, online monitoring parameters are input into a pre-trained carbon source dosage prediction model to obtain the corresponding second theoretical carbon source dosage, the process of which is as follows: Figure 3 As shown, it includes:
[0140] S31. Construct derived features based on online monitoring parameters;
[0141] Based on the measured values of influent COD and total nitrogen and the pre-set optimal carbon-nitrogen ratio, a carbon-nitrogen ratio fit is constructed.
[0142] The nitrate nitrogen conversion rate was constructed based on the measured values of nitrate nitrogen in the aerobic tank, the measured values of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank.
[0143] Based on the measured values of nitrate nitrogen in the aerobic tank, the reflux ratio in the anoxic tank, and the measured values of total nitrogen in the influent, the nitrate nitrogen loading intensity was constructed.
[0144] Based on the measured total nitrogen value of the effluent and the pre-set design total nitrogen value of the effluent, a gap in effluent compliance is constructed;
[0145] Based on the effluent compliance gap, carbon-nitrogen ratio suitability, and nitrate nitrogen conversion rate, the urgency of carbon source demand is constructed.
[0146] S32. Extract features from the derived features and online monitoring parameters to obtain the corresponding feature vectors;
[0147] Feature vectors were extracted from the measured values of influent COD, influent total nitrogen, effluent total nitrogen, nitrate nitrogen in the aerobic tank, nitrate nitrogen in the anoxic tank, reflux ratio in the anoxic tank, carbon-nitrogen ratio, nitrate nitrogen conversion rate, nitrate nitrogen load intensity, effluent compliance gap, and carbon source demand urgency.
[0148] S33. Based on the pre-set attention layer, feature amplification is performed on all feature vectors to obtain the corresponding attention feature matrix;
[0149] S34. Perform a linear transformation on the attention feature matrix to obtain the second theoretical carbon source addition amount.
[0150] Specifically, a system of basic features, derived features, and interactive enhancement features is constructed based on online monitoring parameters.
[0151] Based on the denitrification process mechanism, static features with clear process logic are derived from online monitoring parameters: that is, derived features are constructed.
[0152] The carbon-nitrogen ratio fit is constructed based on the measured values of influent COD and total nitrogen and the pre-set optimal carbon-nitrogen ratio.
[0153] in, ;
[0154] R1 represents the carbon-to-nitrogen ratio fit, while the optimal carbon-to-nitrogen ratio is generally set to 5:1.
[0155] The nitrate nitrogen conversion rate was constructed based on the measured values of nitrate nitrogen in the aerobic tank, the measured values of nitrate nitrogen in the anoxic tank, and the reflux ratio in the anoxic tank.
[0156] in, ;
[0157] R2 is the nitrification conversion rate, while the recirculation ratio in the anoxic tank is generally determined by the flow rate of wastewater flowing out of the anoxic tank and the flow rate of wastewater flowing into the anoxic tank through the recirculation pipe.
[0158] Based on the measured values of nitrate nitrogen in the aerobic tank, the reflux ratio in the anoxic tank, and the measured values of total nitrogen in the influent, the nitrate nitrogen loading intensity was constructed.
[0159] in, ;
[0160] R4 represents the nitrate nitrogen loading intensity.
[0161] Based on the measured total nitrogen value of the effluent and the pre-set design total nitrogen value of the effluent, a gap in effluent compliance is constructed;
[0162] in, ;
[0163] R5 represents the gap in achieving the water quality standard.
[0164] Based on the effluent compliance gap, carbon-nitrogen ratio suitability, and nitrate nitrogen conversion rate, the urgency of carbon source demand is constructed.
[0165] in, ;
[0166] R6 represents the urgency of carbon source demand.
[0167] Invalid data is extracted based on process logic to ensure the validity of features:
[0168] If R1 < 0.2 (quarterly shortage of internal carbon sources) or R1 > 5 (severe surplus of internal carbon sources), replace it with 1.0;
[0169] If R2 < 0 (nitrate nitrogen in the aerobic tank < nitrate nitrogen in the anoxic tank, violating process logic), replace it with 0.3;
[0170] If R4 > 5 (nitrate nitrogen load far exceeds the system's capacity), replace it with 5.0;
[0171] Z-score normalization is used to eliminate the influence of dimensions.
[0172] The standardized results of online monitoring parameters and subsequent derived parameters are concatenated into a one-dimensional feature vector in a fixed order, with a vector dimension of 1×11.
[0173] The attention mechanism automatically assigns feature importance weights to focus on the factors that have the greatest impact on carbon source demand, specifically:
[0174] First, the weights are initialized based on the mutual information (MI) value between the feature and the carbon source dosage to ensure that the weights of the core process features are higher.
[0175] The initial weighting of derived features (R2, R4, R5) is ≥0.15;
[0176] The initial weighting of the measured values of total nitrogen in the influent, nitrate nitrogen in the anoxic tank, and total nitrogen in the effluent is ≥0.12.
[0177] Other features have an initial weight ratio of ≥0.05;
[0178] The initial weights of all features are summed to 1, and the specific weights of the features are determined based on the model training process.
[0179] By multiplying the feature vectors element-wise with the attention weights, the influence of the core features is amplified. The output attention feature matrix still has a dimension of 1×11, but the numerical contribution of the core features has been strengthened.
[0180] A linear mapping is achieved through a fully connected layer, transforming the attention-enhanced feature matrix into specific carbon source addition values:
[0181] Q 理论 =X attn ×W linear +b linear ;
[0182] Among them, W linea b is the linear layer weight matrix. linear For the linear layer bias term, Q 理论 X represents the second theoretical carbon source addition amount. attn This is the attention feature matrix.
[0183] During model training, the attention weights, linear layer weights, and bias terms are simultaneously optimized by minimizing the process-weighted MSE loss between the predicted and actual carbon source dosages. This ensures that the output of the second theoretical carbon source dosage conforms to the process rules and accurately matches the actual carbon source requirements.
[0184] This embodiment constructs derived features by monitoring parameters online to comprehensively characterize the process status related to carbon source demand. Then, it focuses on key factors through an attention layer and finally outputs a quantified theoretical dosage through linear transformation. This not only ensures the physical meaning of the features but also improves the accuracy of model prediction.
[0185] Furthermore, after performing a linear transformation on the attention feature matrix to obtain the second theoretical carbon source dosage, the following steps are also included:
[0186] Based on the measured values of nitrate nitrogen conversion rate, total nitrogen in effluent, pre-set target nitrate nitrogen conversion rate, pre-set design total nitrogen in effluent, and pre-set Formula 3, the suitable process coefficient is obtained; Formula 3 is:
[0187] ;
[0188] Among them, K g To adapt to the process coefficient, For the pre-set target nitrate nitrogen conversion rate, N0 represents the nitrate nitrogen conversion rate, N1 represents the designed total nitrogen in the effluent, and N1 represents the measured total nitrogen in the effluent.
[0189] The second theoretical carbon source dosage is statically constrained and calibrated based on the adaptive process coefficient and the pre-set carbon source type coefficient.
[0190] This embodiment constructs an adaptive process coefficient (dynamically correcting denitrification efficiency deviation by combining nitrate nitrogen conversion rate and strictly adhering to the effluent compliance baseline based on total nitrogen boundary value) and introduces a carbon source type coefficient (adapting to the differences in degradation characteristics of different carbon sources). It performs pure static parameter calibration on the second theoretical carbon source dosage, which not only bridges the gap between theoretical predictions of data-driven models and actual processes, but also achieves accurate conversion of predicted values to process feasible values. It automatically supplements carbon when denitrification is inefficient, rationally controls carbon when effluent compliance is sufficient, and does not require model reconstruction when switching carbon sources. It also constructs a process safety boundary to avoid impact on the biochemical system, simplifies operation and maintenance, and enhances the versatility of the solution for different wastewater treatment plant processes. Ultimately, it achieves precise optimization of carbon source consumption while ensuring stable effluent compliance, thus improving the overall engineering practicality and economy of the solution.
[0191] Optionally, in a specific embodiment, obtaining the actual carbon source dosage to enable the dosing device to automatically add the carbon source reagent includes:
[0192] Based on the detected water temperature of the biological treatment tank and a pre-set formula two, the actual carbon source dosage is adjusted for temperature; the formula two is:
[0193] Q1 = Q0 × 1.05 (T-20) ;
[0194] Where Q1 is the actual carbon source dosage after temperature correction, Q0 is the actual carbon source dosage, and T is the water temperature of the biological treatment tank, with T only taking the temperature value.
[0195] Based on the detected pH value of the biological treatment tank, the actual carbon source dosage after temperature correction is adjusted for pH. The pH correction is as follows: when the pH value of the biological treatment tank is greater than 9.0 or less than 6.5, the actual carbon source dosage after temperature correction is multiplied by 1.1.
[0196] Based on the measured value of nitrate nitrogen in the anoxic pond and the pre-set target nitrified nitrogen in the anoxic pond, the actual carbon source dosage after pH correction is corrected by feedback. The feedback correction is to multiply the actual carbon source dosage after pH correction by the ratio of the measured value of nitrate nitrogen in the anoxic pond to the target nitrified nitrogen in the anoxic pond.
[0197] The actual carbon source dosage after feedback correction is constrained based on the preset maximum and minimum allowable dosages. The process constraint is as follows: when the actual carbon source dosage after feedback correction is greater than the maximum allowable dosage, the actual carbon source dosage after feedback correction is corrected to the maximum allowable dosage; when the actual carbon source dosage after feedback correction is less than the minimum allowable dosage, the actual carbon source dosage after feedback correction is corrected to the minimum allowable dosage.
[0198] Based on the actual carbon source dosage under process constraints and the pre-set PID algorithm, control commands are sent to the dosing device to achieve automatic dosing of carbon source reagents.
[0199] Specifically, the activity of denitrifying bacteria is strongly correlated with water temperature, with 20℃ being the optimal activity temperature. When the temperature deviates from this range, the carbon source dosage needs to be adjusted to compensate for the change in activity. That is, water temperature sensors deployed in the mixed area of the aerobic and anaerobic tanks are used to monitor the biological treatment tank water temperature in real time, taking only the numerical value and ignoring the unit. The biological treatment tank water temperature is then substituted into Formula 2 above to calculate the temperature-corrected dosage.
[0200] The optimal pH range for denitrifying bacteria is 6.5–9.0. Outside this range, microbial activity is inhibited, requiring additional carbon source supplementation to counteract this inhibition. Specifically, pH sensors deployed in the mixed zone of the aerobic and anaerobic tanks are used to collect the pH value of the biological treatment tank in real time. If 6.5 ≤ pH ≤ 9.0, no correction is needed, and Q1 is directly used as the pH-corrected dosage (Q2 = Q1). If pH > 9.0 or pH < 6.5, then Q2 = Q1 × 1.1 (an additional 10% carbon source is added to compensate for the decreased carbon source utilization efficiency caused by activity inhibition), and Q2 is the actual carbon source dosage after pH correction.
[0201] The measured nitrate nitrogen level in the anoxic tank serves as a feedback signal to ensure precise matching between the carbon source dosage and the real-time nitrate nitrogen substrate content, avoiding carbon source excess or substrate residue. Specifically, a pre-set target nitrate nitrogen level in the anoxic tank (typically set at 1-3 mg / L, adjusted according to wastewater treatment plant design standards, and must be lower than the designed total nitrogen in the effluent to ensure no risk of exceeding standards later) is used. The measured nitrate nitrogen level in the anoxic tank is collected in real-time by a nitrate nitrogen sensor, and the actual carbon source dosage, after pH correction, is then adjusted accordingly.
[0202] ;
[0203] Q3 represents the actual carbon source addition amount after feedback correction.
[0204] By limiting the maximum / minimum allowable dosage, we can avoid excessive carbon source addition that could cause shocks to the biological system (such as sludge bulking, excessive COD in effluent, etc.) or insufficient addition that could cause denitrification to stop.
[0205] The PID algorithm is used to offset delays and disturbances during the dosing process (such as changes in pipeline resistance and calculation pump errors), ensuring that the actual dosing amount matches the actual carbon source dosing amount constrained by the process. Specifically, the PID parameters, with a proportionality coefficient K, are preset. p Integral coefficient K i and differential coefficient K d The initial value can be set according to the experience value of similar dosing systems in sewage treatment plants (such as K). p =2.0, K i =0.1, K d =0.05), and subsequent optimization was achieved through running and debugging;
[0206] The actual carbon source dosage under process constraints is used as the target value of the PID controller, and the actual flow feedback value of the pump is used as the feedback signal.
[0207] The PID controller automatically adjusts the output control command to the metering pump of the dosing device based on the deviation between the target value and the feedback value. The metering pump adjusts its operating frequency or stroke according to the control command to achieve accurate and automatic dosing of carbon source reagents.
[0208] This application achieves dynamic adaptation of dosage to environmental conditions, microbial activity, and substrate requirements through a three-layer progressive correction of temperature, pH, and nitrate nitrogen feedback. It then avoids system risks through process boundary constraints and finally ensures dosage accuracy through PID closed-loop control, ensuring that the carbon source dosage is in line with real-time operating conditions.
[0209] Another embodiment of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for chemical treatment of wastewater.
[0210] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0211] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0212] In this application, unless otherwise expressly specified and limited, "above" or "below" the second feature can mean that the first and second features are in direct contact, or that they are in indirect contact through an intermediate medium. Furthermore, "above," "on top of," and "over" the second feature can mean that the first feature is directly above or diagonally above the second feature, or simply that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature can mean that the first feature is directly below or diagonally below the second feature, or simply that the first feature is at a lower horizontal level than the second feature.
[0213] In the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0214] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method of dosing treatment of sewage, characterized by, The method is realized based on a sewage treatment system, the system comprising: a control device and an anoxic tank and an aerobic tank arranged along the water inflow direction of the sewage treatment plant, and an online monitoring device arranged at each node of the sewage treatment plant and a dosing device; When the urban domestic water flows into the sewage treatment plant along the water inflow main pipe, the control device obtains online monitoring parameters in real time based on the online monitoring device, wherein the online monitoring parameters comprise the measured value of the total nitrogen of the water inflow, the measured value of the COD of the water inflow and the measured value of the total nitrogen of the water outflow; The control device obtains the carbon-nitrogen ratio adaptation degree and the water outflow standard redundancy value based on the measured value of the total nitrogen of the water inflow, the measured value of the COD of the water inflow and the measured value of the total nitrogen of the water outflow, and constructs a first comprehensive performance index based on the carbon-nitrogen ratio adaptation degree and the water outflow standard redundancy value; the control device obtains the carbon-nitrogen ratio adaptation degree based on the measured value of the COD of the water inflow, the measured value of the total nitrogen of the water inflow and the pre-set optimal carbon-nitrogen ratio, and the carbon-nitrogen ratio adaptation degree is the calculation result of the product of the ratio of the measured value of the COD of the water inflow and the measured value of the total nitrogen of the water inflow and the inverse of the optimal carbon-nitrogen ratio; the control device obtains the water outflow standard redundancy value based on the measured value of the total nitrogen of the water outflow and the pre-set design total nitrogen of the water outflow, and the water outflow standard redundancy value is the calculation result of the product of the difference between the measured value of the total nitrogen of the water outflow and the design total nitrogen of the water outflow and the inverse of the design total nitrogen of the water outflow; The control device obtains the corresponding first theoretical carbon source dosage based on the online monitoring parameters and the pre-set activated sludge kinetics algorithm, and inputs the online monitoring parameters into the pre-trained carbon source dosage prediction model to obtain the corresponding second theoretical carbon source dosage; The control device allocates the allocation weight of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on the first comprehensive performance index, and obtains the actual carbon source dosage based on the allocation weight, the first theoretical carbon source dosage and the second theoretical carbon source dosage, so as to realize the automatic addition of the carbon source medicament by the dosing device.
2. The method of dosing treatment of sewage according to claim 1, characterized in that, The online monitoring parameters further comprise: the measured value of the nitrate nitrogen in the aerobic tank, the measured value of the nitrate nitrogen in the anoxic tank and the internal reflux ratio of the anoxic tank; The control device obtains the carbon-nitrogen ratio adaptation degree and the water outflow standard redundancy value based on the measured value of the total nitrogen of the water inflow, the measured value of the COD of the water inflow and the measured value of the total nitrogen of the water outflow, and constructs a first comprehensive performance index based on the carbon-nitrogen ratio adaptation degree and the water outflow standard redundancy value, comprising: The control device obtains the nitrate nitrogen conversion rate based on the measured value of the nitrate nitrogen in the aerobic tank, the measured value of the nitrate nitrogen in the anoxic tank and the internal reflux ratio of the anoxic tank, and the nitrate nitrogen conversion rate is the calculation result of the ratio of the difference between the measured value of the nitrate nitrogen in the aerobic tank and the measured value of the nitrate nitrogen in the anoxic tank and the product of the measured value of the nitrate nitrogen in the aerobic tank and the internal reflux ratio of the anoxic tank; The control device obtains the corresponding first comprehensive performance index by weighted summation of the carbon-nitrogen ratio adaptation degree, the nitrate nitrogen conversion rate and the water outflow standard redundancy value.
3. The method of dosing treatment of sewage according to claim 1, characterized in that, The control device allocates the allocation weight of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on the first comprehensive performance index, comprising: Based on the pre-set performance baseline, the position of the first comprehensive performance index on the performance baseline is determined, and the corresponding allocation weight of the first theoretical carbon source dosage and the second theoretical carbon source dosage is allocated according to the position of the first comprehensive performance index on the performance baseline.
4. The method of dosing treatment of sewage according to claim 3, characterized in that, The performance baseline is established based on the following steps: Obtaining a plurality of sets of historical operation data, wherein each set of historical operation data has a corresponding historical carbon source dosage and a difference in total nitrogen in effluent before and after the carbon source is added; Based on each set of historical operation data, a second historical comprehensive performance index corresponding to each set of historical operation data is obtained, and a historical carbon source addition marginal benefit corresponding to each set is obtained based on the historical carbon source dosage corresponding to each set of historical operation data and the difference in total nitrogen in effluent before and after the carbon source is added; wherein each historical carbon source addition marginal benefit is the ratio of the difference in total nitrogen in effluent before and after the carbon source is added to the historical carbon source dosage; The second historical comprehensive performance index and the historical carbon source addition marginal benefit corresponding to each set of historical operation data are grouped in intervals of 0.1 for the second historical comprehensive performance index, and the average historical comprehensive performance index and the historical average marginal benefit in each interval are obtained; Based on the average historical comprehensive performance index and the historical average marginal benefit in all intervals, and a pre-set formula one, a performance baseline is fitted; the formula one is: y i = k ln(x i )+ b; where i is the index of the interval, y i is the historical average marginal benefit of the interval of index i, x i is the average composite performance index of the interval of index i, and k and b are parameters needed to fit the performance baseline.
5. The method of dosing treatment of sewage according to claim 4, characterized in that, After fitting the performance baseline, the initial performance baseline is modified and boundary set based on pre-set optimal denitrification working condition parameters.
6. The method of dosing treatment of sewage according to claim 1, characterized in that, The control device allocates a distribution weight of the first theoretical carbon source dosage and the second theoretical carbon source dosage based on the first comprehensive performance index, including: The control device obtains a corresponding first marginal benefit based on the first comprehensive performance index and the pre-set performance baseline; Based on the first marginal benefit and a pre-set three-level threshold, a corresponding benefit value level is obtained; wherein the three-level threshold includes high benefit, medium benefit and low benefit; Based on the benefit value level, the distribution weight of the first theoretical carbon source dosage and the second theoretical carbon source dosage is allocated.
7. The method of dosing treatment of sewage according to claim 1, characterized in that, The online monitoring parameters further include: measured value of nitrate nitrogen in the aerobic tank, measured value of nitrate nitrogen in the anoxic tank, and internal reflux ratio in the anoxic tank; The online monitoring parameters are input into a pre-trained carbon source dosage prediction model to obtain a corresponding second theoretical carbon source dosage, including: Based on the measured value of influent COD, the measured value of influent total nitrogen, and the pre-set optimal carbon-nitrogen ratio, a carbon-nitrogen ratio adaptation degree is constructed; Based on the measured value of nitrate nitrogen in the aerobic tank, the measured value of nitrate nitrogen in the anoxic tank, and the internal reflux ratio in the anoxic tank, a nitrate nitrogen conversion rate is constructed; Based on the measured value of nitrate nitrogen in the aerobic tank, the internal reflux ratio in the anoxic tank, and the measured value of influent total nitrogen, a nitrate nitrogen load intensity is constructed; Based on the measured value of effluent total nitrogen, and the pre-set design effluent total nitrogen, an effluent standard gap is constructed; Based on the effluent standard gap, the carbon-nitrogen ratio adaptation degree, and the nitrate nitrogen conversion rate, a carbon source demand urgency is constructed; Feature extraction is performed on the measured value of influent COD, the measured value of influent total nitrogen, the measured value of effluent total nitrogen, the measured value of nitrate nitrogen in the aerobic tank, the measured value of nitrate nitrogen in the anoxic tank, the internal reflux ratio in the anoxic tank, the carbon-nitrogen ratio adaptation degree, the nitrate nitrogen conversion rate, the nitrate nitrogen load intensity, the effluent standard gap, and the carbon source demand urgency to obtain a corresponding feature vector; Based on a pre-set attention layer, feature amplification is performed on all feature vectors to obtain a corresponding attention feature matrix; Linear transformation is performed on the attention feature matrix to obtain the second theoretical carbon source dosage.
8. The method of dosing treatment of sewage according to claim 7, characterized in that, The linear transformation is performed on the attention feature matrix to obtain the second theoretical carbon source addition amount, and the method further comprises the following steps: Based on the nitrate nitrogen conversion rate, the measured value of the total nitrogen in the effluent, the pre-set target nitrate nitrogen conversion rate, and the pre-set design total nitrogen in the effluent, an adaptive process coefficient is obtained; the adaptive process coefficient is the product of the ratio of the target nitrate nitrogen conversion rate to the nitrate nitrogen conversion rate and the ratio of the design total nitrogen in the effluent to the total nitrogen boundary value, wherein the total nitrogen boundary value is the larger value between the measured value of the total nitrogen in the effluent and 80% of the design total nitrogen in the effluent; and the second theoretical carbon source addition amount is statically constrained and calibrated based on the adaptive process coefficient and the pre-set carbon source type coefficient.
9. The method of dosing treatment of sewage according to claim 1, characterized in that, The online monitoring parameter further comprises a measured value of nitrate nitrogen in the anoxic tank; The actual carbon source addition amount is obtained to realize automatic addition of the carbon source medicament by the dosing device, and the method comprises the following steps: The actual carbon source addition amount is temperature-corrected based on the detected biochemical tank water temperature and the pre-set formula two; the formula two is: Q1 = Q0 x 1.05 (T-20) ; Wherein, Q1 is the actual carbon source addition amount after temperature correction, Q0 is the actual carbon source addition amount, and T is the biochemical tank water temperature; The actual carbon source addition amount after temperature correction is pH-corrected based on the detected biochemical tank pH value; wherein, the pH correction is that when the biochemical tank pH value is greater than 9.0 or less than 6.5, the actual carbon source addition amount after temperature correction is multiplied by 1.1; The actual carbon source addition amount after pH correction is feedback-corrected based on the measured value of nitrate nitrogen in the anoxic tank and the pre-set target nitrate nitrogen in the anoxic tank; wherein, the feedback correction is that the actual carbon source addition amount after pH correction is multiplied by the ratio of the measured value of nitrate nitrogen in the anoxic tank to the target nitrate nitrogen in the anoxic tank; The actual carbon source addition amount after feedback correction is process-constrained based on the pre-set maximum allowed addition amount and the pre-set minimum allowed addition amount; the process constraint is that when the actual carbon source addition amount after feedback correction is greater than the maximum allowed addition amount, the actual carbon source addition amount after feedback correction is corrected to the maximum allowed addition amount, and when the actual carbon source addition amount after feedback correction is less than the minimum allowed addition amount, the actual carbon source addition amount after feedback correction is corrected to the minimum allowed addition amount; Based on the actual carbon source addition amount after process constraint and the pre-set PID algorithm, a control instruction is sent to the dosing device to realize automatic addition of the carbon source medicament.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by a processor to realize the method for dosing treatment of sewage according to any one of claims 1 to 9. The computer program is executed by a processor to realize the method for dosing treatment of sewage according to any one of claims 1 to 9.
Citation Information
Patent Citations
Iterative-ADP-algorithm-based optimal control method for wastewater treatment
CN106873379A
Urban sewage plant external carbon source accurate control method based on deep learning
CN116029612A