Self-adaptive sewage treatment plant intelligent operation method and system
By constructing an adaptive process model for sub-unit groups and a reinforcement learning mechanism, the dosing of chemicals and operation of equipment are dynamically adjusted, solving the problems of water quality compliance and resource optimization in complex scenarios of sewage treatment plants, and achieving stable unattended operation.
Patent Information
- Application Number
- CN202511827462.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-28
AI Technical Summary
The existing PLC control system of wastewater treatment plant cannot meet the stable treatment requirements of complex fluctuations in industrial wastewater. It lacks differentiated design for each unit and adaptive learning capabilities, resulting in low water quality compliance rate, high resource consumption and difficulty in achieving unattended operation.
An adaptive process model is constructed for sub-unit groups. Through reinforcement learning and experience playback mechanisms, the dosage of reagents and the operating power of equipment are dynamically adjusted. The model parameters are optimized by combining action networks and evaluation networks to generate differentiated control commands and achieve unattended operation.
It significantly improved the accuracy of water quality control and the efficiency of resource utilization, reduced the consumption of chemicals and equipment energy, and achieved stable operation without human intervention.
Smart Images

Figure CN121934492A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated control technology for wastewater treatment, and in particular to an adaptive intelligent operation method and system for wastewater treatment plants. Background Technology
[0002] Currently, while most wastewater treatment plants are equipped with basic PLC control systems, they cannot meet the stable treatment requirements under complex fluctuations in industrial wastewater. On the one hand, process models lack differentiated design for each unit, resulting in insufficient adaptability and accuracy. Existing control schemes mostly use general-purpose calculation models, failing to be customized to address the inherent differences in the processes of pretreatment, anaerobic, aerobic, and advanced treatment units. On the other hand, intelligent learning and adaptive update mechanisms are lacking, relying on manual intervention. The systems do not cover multi-parameter collaborative learning across the entire process, lack online model updates based on experience data, and cannot dynamically adjust core parameters. On-site debugging by maintenance personnel is required, leading to parameter adjustments lagging behind water quality changes. This not only increases labor costs but also easily results in effluent exceeding standards due to untimely intervention, failing to meet the actual operational needs of unattended wastewater treatment plants.
[0003] Therefore, existing wastewater treatment control schemes, due to the lack of unit-based models and insufficient adaptive learning, are unable to balance the needs of water quality compliance, resource optimization, and unmanned operation. A smart operation method with unit-based process models as the core and reinforcement learning adaptive updates as support is needed to solve the above technical problems. Summary of the Invention
[0004] To address the aforementioned issues of insufficient unit-based models and inadequate adaptive learning, which make it difficult to balance the needs of water quality compliance, resource optimization, and unattended operation, this invention provides an intelligent bidding method and system.
[0005] In a first aspect, the adaptive intelligent operation method and system for wastewater treatment plants provided by the present invention adopts the following technical solution: An adaptive intelligent operation method for wastewater treatment plants, comprising: S1. Configure a unit group, the unit group including a pretreatment unit, an anaerobic unit, an aerobic unit and an advanced treatment unit connected in sequence, to acquire water quality data, equipment operation data and reagent dosage data, and process them to obtain standardized data; S2. Construct the unit process model for the corresponding unit group, set the core parameters of the unit process model, and use the adjustment amount of the core parameters as the action variable of reinforcement learning, and output the dosage of the reagent and the operating power of the equipment for each unit; S3. Construct an action network and an evaluation network. Input the standardized data into the action network, and output the adjustment amount of the unit process model from the action network. Calculate the reward value based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group. Input the reward value into the evaluation network, and optimize the weight parameters of the action network and the evaluation network through network iteration. S4. Set model update trigger conditions and update the unit process model through the experience playback mechanism; S5. Transmit the core parameters of the updated unit process model to the PLC control unit, generate control instructions, and send them to the actuators of the unit group.
[0006] Furthermore, the water quality data includes the influent chemical oxygen demand (COD) of the pretreatment unit. Influent suspended solids concentration effluent suspended solids concentration The influent water temperature of the anaerobic unit Influent sulfate concentration Chemical oxygen demand of influent Chemical oxygen demand of effluent pH value of influent Dissolved oxygen concentration in the influent of the aerobic unit Actual dissolved oxygen concentration influent ammonia nitrogen concentration Ammonia nitrogen concentration in effluent Sulfidating bacteria concentration saccharifying bacteria concentration Chemical oxygen demand (COD) of influent to the advanced treatment unit Water color Chemical oxygen demand of effluent Water color Total nitrogen Total phosphorus ; Furthermore, the equipment operating data includes the power of the preprocessing unit bar screen. Sludge scraper power The power of the stirrer in the anaerobic unit The power of the aeration blower in the aerobic unit Reflux pump power The power of the filter in the deep processing unit Dehydrator power ; Furthermore, the reagent dosage data includes the real-time dosage of polyaluminum chloride (PAC) in the pretreatment unit. Real-time dosage of PAM amide Ferrous ions in the aerobic unit dosage hydrogen peroxide in the deep treatment unit Real-time dosage Real-time dosage of PAM amide .
[0007] Furthermore, the processing yields standardized data, including: Replace outlier data with the weighted average of the same parameter data over n consecutive sampling periods; When the data missing duration t is less than the preset duration threshold When missing data is needed, linear interpolation is used to complete it. The calculation formula is as follows: ,in, For missing moments The completion value, , These are the valid data before and after the missing time point, respectively. , These are the collection times for the corresponding valid data. When the data loss duration is greater than or equal to the preset duration, the system will automatically switch to the backup sensor to collect data. A normalization algorithm is used to map all data to a normalized interval.
[0008] Furthermore, the construction of the unit process model corresponding to the unit group includes the construction of the pretreatment unit process model and the anaerobic unit process model, wherein: The formula for constructing the process model of the pretreatment unit is: , ,in, This refers to the dosage of polyaluminum chloride (PAC). The dosage coefficient for polyaluminum chloride (PAC) is... Chemical oxygen demand (COD) of the influent to the pretreatment unit. This refers to the influent flow rate of the pretreatment unit. This is the correction factor for suspended solids. The concentration of suspended solids in the influent of the pretreatment unit. This refers to the dosage of PAM (particulate amide) for pretreatment. The PAM dosage coefficient for the pretreatment unit is given when the suspended solids concentration in the effluent from the pretreatment unit is... When the preset threshold is exceeded, the value will be increased by a preset ratio. ; The formula for constructing the anaerobic unit process model is: ,in, This is the stirring power coefficient. This is the optimal water temperature for the growth of anaerobic bacteria. A preset threshold is set for sulfate concentration. This is the sulfate correction factor. The pH value of the influent to the anaerobic unit. This is the optimal pH value for anaerobic bacteria. This is the pH correction factor.
[0009] Furthermore, the construction of the unit process model corresponding to the unit group includes completing the construction of the aerobic unit process model and the deep treatment unit process model, wherein: The formula for constructing the aerobic unit process model is: ,in, This is the aeration power coefficient. The target dissolved oxygen concentration for the aerobic unit; The concentration of sulfur-oxidizing bacteria in the influent of the aerobic unit. The concentration of saccharifying bacteria in the influent of the aerobic unit. This represents the sum of the optimal bacterial concentrations in the aerobic unit. This is a correction factor for bacterial concentration, when the ammonia nitrogen concentration in the effluent of the aerobic unit... When emissions exceed the standard, adjust upwards by a preset ratio. ; The formula for constructing the process model of the deep processing unit is: ,in, for Dosage for Dosage coefficient, The target chemical oxygen demand (COD) of the effluent from the advanced treatment unit. Preset threshold for chromaticity, This is the color correction factor. PAM dosage for deep processing units This represents the PAM addition coefficient for the deep processing unit.
[0010] Furthermore, the calculation of the reward value based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group includes: Construct the reward value formula, the formula is as follows: ,in, Corresponding to the pretreatment unit, anaerobic unit, aerobic unit, and advanced treatment unit, These are the weighting coefficients for water quality and cost. These are the parameter stability weighting coefficients; For unit pollutant reduction rate, This refers to the consumption of a single unit of medicine. Energy consumption of unit equipment These are the adjusted values for the core parameters. These are the values of the core parameters before adjustment; The pollutant reduction rate for each unit is calculated based on the unit process objectives, including setting the pollutant reduction rate for the pretreatment unit. Set the pollutant reduction rate for the anaerobic unit. Set the pollutant reduction rate of the aerobic unit. Set the pollutant reduction rate of the deep treatment unit. .
[0011] Furthermore, the step of iteratively optimizing the weight parameters of the action network and the evaluation network includes: Build an experience database for each unit and calculate the unit's drug consumption. Equipment energy consumption And calculate the reward value. Old state dataset of the collection unit Core parameter adjustment actions Reward Value New state dataset And store it in the experience database of the corresponding unit; The formula for calculating the network objective value is as follows: ,in For reward decay coefficient, To evaluate the target network, For action target network, , For the corresponding weights; Construct a loss function and update the evaluation network weights. The loss function is as follows: ,in To evaluate the network's output value for the i-th empirical tuple, the loss function is minimized. Update the evaluation network weights ; Update action network weights based on policy gradient ascent algorithm The gradient formula is: The action target network and the evaluation target network are updated according to the soft update rule, and the formula is: in, For soft update coefficients, the arrow ← indicates the parameter assignment update action, that is, assigning the weighted calculation result on the right to the target network weight on the left.
[0012] Furthermore, the setting of the model update trigger condition includes: The water quality fluctuation trigger condition is that the fluctuation amplitude of the water quality index of the unit influent meets the following conditions. ,in, For unit The current value of this indicator for influent. This is the average duration of the indicator. The average value within, The preset fluctuation threshold is used; The early warning trigger condition is the effluent index of the unit for m consecutive sampling periods. satisfy ,in As the early warning coefficient, For unit The discharge standard values for effluent indicators The warning threshold for the core indicators of effluent from unit i; The parameter deviation trigger condition is the current value of the unit's core parameter. Compared with the initial calibration value The absolute value of the deviation satisfies ;in, For parameter deviation threshold, Corresponding unit Core parameter adjusted values For unit Initial calibration values for core parameters; The equipment malfunction trigger condition is the unit The operating parameters of the core equipment exceeded the preset normal operating range, and this continued for a period of time. ,in, The duration of the parameter anomaly This is the threshold for the duration of the abnormality.
[0013] Furthermore, the updating of the unit process model through the experience playback mechanism includes: Extract historical experience data of units that meet the triggering conditions, and filter out experience tuples whose equipment operating parameters are within the normal range as valid experience data; The network iteratively updates and loads the current action network and evaluation network weights for this unit, setting the number of iterations to [number]. The learning rate is At each iteration, the network loss value is calculated based on valid empirical data. ,when Stop the iteration early. For unit The update loss threshold; Adjust the core parameters output by the updated action network. With current core parameters Superposition yields new core parameters ;in, The range of values is limited to , For unit Maximum adjustment range for core parameters; Set verification period Continuous monitoring of the unit during the verification period effluent water quality indicators Power relative to equipment operating status Energy consumption If the verification cycle ends, the unit All effluent water quality indicators meet the requirements. , The emission standard value for this indicator, and the equipment energy consumption. If no abnormal increase is observed, then confirm the unit. The process model update takes effect. If the above conditions are not met, the unit needs to be re-evaluated. Perform network iterative updates and parameter adjustments.
[0014] Furthermore, the transmission of the core parameters of the updated unit process model to the PLC control unit includes: The PLC control unit generates analog and digital commands based on the new core parameters. The analog commands are standard signals used by the preprocessing unit to adjust the frequency of the booster pump inverter, the frequency of the sludge scraper inverter, the opening of the PAM dosing valve, and the opening of the polyaluminum chloride (PAC) dosing valve; by the anaerobic unit to adjust the frequency of the agitator inverter and the frequency of the circulating pump inverter; and by the aerobic unit to adjust the frequency of the aeration blower inverter and the return pump. Inverter frequency, deep processing unit adjusts the frequency of the dosing pump inverter, PAM dosing valve opening and Adjust valve opening; Digital commands are used to start and stop the core equipment of the control unit. The core equipment of the pretreatment unit is a bar screen and a sludge scraper. The core equipment of the anaerobic unit is a mixer and a circulating pump. The core equipment of the aerobic unit is a return pump and an aeration blower. The core equipment of the deep treatment unit is a filter and a dewatering machine.
[0015] Secondly, an intelligent auction system includes: The data acquisition module is configured as a configuration unit group, which includes a pretreatment unit, an anaerobic unit, an aerobic unit and an advanced treatment unit connected in sequence. It acquires water quality data, equipment operation data and reagent dosage data, and processes them to obtain standardized data. The model building module is configured to build unit process models for the corresponding unit groups, set the core parameters of the unit process models, and use the adjustment amount of the core parameters as action variables for reinforcement learning, outputting the dosage of reagents and the operating power of equipment for each unit; The reinforcement learning module is configured to construct an action network and an evaluation network. The standardized data is input into the action network, which outputs the adjustment amount of the unit process model. The reward value is calculated based on the pollutant reduction rate, reagent consumption and equipment energy consumption of the unit group. The reward value is input into the evaluation network, and the weight parameters of the action network and the evaluation network are optimized through network iteration. The model update module is configured to set model update trigger conditions and update the unit process model through an experience playback mechanism; The instruction issuing module is configured to transmit the core parameters of the updated unit process model to the PLC control unit, generate control instructions, and issue them to the actuators of the unit group.
[0016] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the aforementioned adaptive intelligent operation method for wastewater treatment plants.
[0017] Fourthly, the present invention provides a terminal device, including a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, the instructions being adapted to be loaded and executed by the processor to provide an adaptive intelligent operation method for wastewater treatment plants.
[0018] In summary, the present invention has the following beneficial technical effects: 1. This invention proposes a modular customized process model, significantly improving the accuracy of water quality control and resource utilization efficiency. Addressing the fundamental differences in the processes of pretreatment, anaerobic, aerobic, and advanced treatment units, this invention constructs a dedicated dynamic calculation model. The modular model relies on the removal patterns of core pollutants in each unit to... By incorporating specific influencing factors such as pH, bacterial concentration, and color into parameter calculations, the effluent quality compliance rate is significantly improved, while the unit water reagent consumption and equipment energy consumption are reduced, thus solving the problems of large water quality fluctuations and high resource consumption in existing general models.
[0019] 2. This invention employs a dual-network reinforcement learning approach and an experience replay mechanism to achieve adaptive model updates and support unattended operation. The invention constructs a dual-network architecture consisting of an action network and an evaluation network. Standardized data is input into the action network to output core parameter adjustments, calculate reward values, and optimize the weights of the evaluation network. Simultaneously, the experience replay mechanism extracts effective historical data to iteratively update the model. By continuously learning water quality fluctuation patterns and process adaptability through historical experience data, core parameters can be dynamically optimized without manual intervention, significantly reducing labor costs.
[0020] 3. Based on the updated core parameters, the PLC control unit of this invention generates differentiated analog and digital commands. The analog commands adjust the frequency of the inverters and the opening of the dosing valves of each unit equipment to ensure that the dosing amount and equipment power output by the model are implemented. The digital commands control the start and stop of the core equipment of each unit to ensure the operational stability in unattended scenarios. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 This is a principle block diagram of Embodiment 1 of the present invention; Figure 3 This is a structural block diagram of Embodiment 2 of the present invention. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to the accompanying drawings.
[0023] Example 1 Reference Figure 1 and Figure 2 An adaptive intelligent operation method for wastewater treatment plants according to this embodiment includes: S1. Configure a unit group, the unit group including a pretreatment unit, an anaerobic unit, an aerobic unit and an advanced treatment unit connected in sequence, to acquire water quality data, equipment operation data and reagent dosage data, and process them to obtain standardized data; S11. Obtain water quality data, equipment operation data, and chemical dosage data. S111. The water quality data includes: the chemical oxygen demand (COD) of the influent to the pretreatment unit. Influent suspended solids concentration effluent suspended solids concentration The influent water temperature of the anaerobic unit Influent sulfate concentration Chemical oxygen demand of influent Chemical oxygen demand of effluent pH value of influent Dissolved oxygen concentration in the influent of the aerobic unit Actual dissolved oxygen concentration influent ammonia nitrogen concentration Ammonia nitrogen concentration in effluent Sulfidating bacteria concentration saccharifying bacteria concentration Chemical oxygen demand (COD) of influent to the advanced treatment unit Water color Chemical oxygen demand of effluent Water color Total nitrogen Total phosphorus ; S112. The equipment operating data includes the power of the preprocessing unit bar screen. Sludge scraper power The power of the stirrer in the anaerobic unit The power of the aeration blower in the aerobic unit Reflux pump power The power of the filter in the deep processing unit Dehydrator power ; S113. The reagent dosage data is collected by an electromagnetic flowmeter installed in the reagent dosing pipeline, and the reagent dosage data includes the real-time dosage of polyaluminum chloride (PAC) in the pretreatment unit. Real-time dosage of PAM amide Ferrous ions in the aerobic unit dosage hydrogen peroxide in the deep treatment unit Real-time dosage Real-time dosage of PAM amide .
[0024] S12. The processing yields standardized data, including: S121. Replace the outlier data with the weighted average of the same parameter data over n consecutive sampling periods; The 3σ criterion is used to identify outliers. When the parameter data of a certain sampling period deviates from the mean of the parameter of the past 100 sampling periods by more than 3 times the standard deviation, it is identified as outlier. The outlier data is replaced with the weighted mean of the same parameter data of n consecutive sampling periods, where n ranges from 3 to 8, preferably n=5. The weight of the weighted mean is set according to the distance of time from the outlier data, with the closer the distance, the greater the weight. The total weight is 1. Specifically, the weights of the first two periods of outlier data are 0.3 and 0.2, respectively; the weights of the last two periods of outlier data are 0.2 and 0.3, respectively; and the weight of the middle period is 0.0. This weighting method better reflects the changing trend of the parameter. S122. When the data missing duration t is less than a preset duration threshold. hour, For a time limit of 5 minutes, missing data is filled using linear interpolation. The calculation formula is as follows: ,in, For missing moments The completion value, , These are the valid data before and after the missing time point, respectively. , These are the collection times for the corresponding valid data. When the data loss duration is greater than or equal to the preset duration, the system will automatically switch to the backup sensor to collect data. S123. Use a normalization algorithm to map all data to a normalized interval.
[0025] The Min-Max normalization algorithm is used to map all data to the normalization interval [0,1]. The normalization formula is as follows: in, The original data before normalization. x is the historical minimum value of this parameter. This is the historical maximum value of the parameter; normalization is used to eliminate dimensional differences between different parameters, so that water quality data, equipment operation data, and reagent dosage data can be directly input into the reinforcement learning network for calculation.
[0026] S2. Based on the core pollutant removal mechanisms of the pretreatment unit, anaerobic unit, aerobic unit, and advanced treatment unit, and combined with the water quality characteristics, microbial metabolic patterns, and equipment operation characteristics of each unit, a unit process model for the corresponding unit group is constructed. Core parameters with dynamic adjustment characteristics are set for each unit process model. The initial values of the core parameters are calibrated based on the historical operation data of the wastewater treatment plant and the process manual. The adjustment amount of the core parameters is used as the action variable for reinforcement learning. The value range of the action variable is limited to ±30% of the initial value of the core parameters to avoid process fluctuations caused by parameter mutations. Through the dynamic calculation of the unit process model, the dosage of reagents and the operating power of equipment for each unit are output to adapt to the real-time water quality conditions, thereby realizing the regulation of reagent dosing and equipment operation. S21. The construction of the unit process model corresponding to the unit group includes completing the construction of the pretreatment unit process model and the anaerobic unit process model, wherein: S211. The formula for constructing the process model of the pretreatment unit is: , ,in, This refers to the dosage of polyaluminum chloride (PAC). The dosage coefficient for polyaluminum chloride (PAC) is... Chemical oxygen demand (COD) of the influent to the pretreatment unit. This refers to the influent flow rate of the pretreatment unit. The suspended solids correction factor has an initial value range of 0.001 to 0.003, preferably 0.002. The concentration of suspended solids in the influent of the pretreatment unit is expressed in mg / L. This refers to the dosage of PAM (particulate amide) for pretreatment. The PAM dosage coefficient for the pretreatment unit is initially set between 0.1 and 0.3, preferably 0.2. This coefficient is applied when the suspended solids concentration in the effluent from the pretreatment unit... When the preset threshold is exceeded, the value will be increased by a preset ratio. The concentration of suspended solids in the effluent from the pretreatment unit The preset threshold is set to 50 mg / L. When the threshold is exceeded, the adjustment will be increased by a preset percentage of 10% to 20%. The preferred increase ratio is 15%, until... Once the concentration drops below the preset threshold, the model enables dynamic adjustment of PAC dosage based on influent COD, SS, and flow rate. PAM and PAC are linked and adapted to avoid waste of reagents or inadequate SS removal. The formula for constructing the S212 anaerobic unit process model is as follows: ,in, The stirring power coefficient has an initial value range of 0.01 to 0.03, preferably 0.02. The optimal water temperature for anaerobic bacteria growth is set at 35±2℃. A preset threshold for sulfate concentration is set at 200 mg / L. This is the sulfate correction factor, with an initial value ranging from 0.001 to 0.003, preferably 0.002. The pH value of the influent to the anaerobic unit is taken as 7.0 ± 0.5. This is the optimal pH value for anaerobic bacteria. The pH correction factor has an initial value range of 0.05 to 0.1, with 0.08 being preferred. This model allows the stirring power to be dynamically adjusted according to the influent COD, water temperature, sulfate, and pH, adapting to the growth and metabolic needs of anaerobic bacteria and improving the COD removal efficiency of the anaerobic unit.
[0027] S213. The formula for constructing the aerobic unit process model is: ,in, The aeration power coefficient has an initial value range of 0.02 to 0.05, preferably 0.03. , is the target dissolved oxygen concentration for the aerobic unit, with a value of 2~4 mg / L, preferably 3 mg / L; The concentration of sulfur-oxidizing bacteria in the influent of the aerobic unit. The concentration of saccharifying bacteria in the influent of the aerobic unit. This represents the sum of the optimal bacterial concentrations in the aerobic unit, with a value of 10. 8 CFU / mL The bacterial concentration correction coefficient has an initial value range of 0.005~0.01, preferably 0.008, when the ammonia nitrogen concentration in the effluent of the aerobic unit... When emissions exceed the standard, adjust upwards by a preset ratio. The preferred upward adjustment ratio is 20%, directly Meets emission standards; S214. The formula for constructing the process model of the deep processing unit is: ,in, for Dosage for The dosage coefficient, initially ranging from 0.015 to 0.04, is preferably 0.03. The target chemical oxygen demand (COD) of the effluent from the advanced treatment unit is set at ≤50 mg / L. Set a preset threshold for chromaticity, in multiples, and set it to 30 times. This is the color correction factor, with an initial value range of 0.01~0.03, preferably 0.02. PAM dosage for deep processing units The PAM addition coefficient for the deep processing unit has an initial value range of 0.05 to 0.15, with 0.1 being preferred.
[0028] S3. Construct an action network and an evaluation network. Input the standardized data into the action network, and output the adjustment amount of the unit process model from the action network. Calculate the reward value based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group. Input the reward value into the evaluation network, and optimize the weight parameters of the action network and the evaluation network through network iteration. An action network and an evaluation network based on Deep Deterministic Policy Gradient (DDPG) were constructed. Both the action network and the evaluation network adopted a fully connected neural network architecture. The action network consists of an input layer, two hidden layers, and an output layer. The number of neurons in the input layer matches the dimensionality of the standardized data, totaling 28 dimensions. The number of neurons in the hidden layer is 128 and 64, respectively. The activation function is ReLU, and the activation function of the output layer is Tanh, which is used to adjust the core parameters of the output unit process model. The evaluation network has the same structure as the action network, and the activation function is ReLU. The output layer is linearly activated and is used to evaluate the quality of the adjustment amount output by the action network.
[0029] The standardized data is categorized into pretreatment units, anaerobic units, aerobic units, and advanced treatment units, and then input into the action network. The adjustment amount of the core parameters output by the action network is limited to ±30% of the current value of the core parameters to avoid process runaway caused by parameter mutations. A multi-dimensional reward value is constructed based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group. The reward value and the new state dataset of the unit are input into the evaluation network. The weight parameters of the action network and the evaluation network are iteratively optimized using the gradient descent method. The iteration batch size is set to 64, and the learning rate is set to 0.001, so that the adjustment amount output by the network continuously converges towards the direction of "water quality compliance, optimal cost, and stable parameters".
[0030] S31. The calculation of the reward value based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group includes: S311. Construct the reward value formula, the formula is as follows: ,in, Corresponding to the pretreatment unit, anaerobic unit, aerobic unit, and advanced treatment unit, This is a weighting coefficient for water quality and cost, ranging from 10 to 50, with 30 being preferred. It is used to balance the effectiveness of pollutant reduction with operating costs. This is a parameter stability weighting coefficient, with a value range of 5 to 20, preferably 10, used to penalize large fluctuations in parameters and ensure process stability. The unit pollutant reduction rate, with a value ranging from 0 to 1. This represents the unit consumption of reagents, expressed in yuan / hour, calculated based on the real-time unit price of the reagents. Energy consumption per unit device, expressed in yuan / h, calculated based on an industrial electricity price of 0.8 yuan / (kW・h). These are the adjusted values for the core parameters. The values before core parameter adjustment; reward value A positive value indicates that the parameter adjustment has achieved the optimization goals of high reduction rate, low cost, and small parameter fluctuation; otherwise, the network weights need to be adjusted in the opposite direction.
[0031] S312. Calculate the pollutant reduction rate for each unit according to the unit process target. The reduction rate ranges from 0 to 1. If the calculated result is less than 0, it is set to 0, indicating that the effluent index is higher than the influent, which is judged as a process abnormality. If it is greater than 1, it is set to 1, indicating that the pollutants are completely removed. The pollutant reduction rate of the pretreatment unit is set. Set the pollutant reduction rate for the anaerobic unit. Set the pollutant reduction rate of the aerobic unit. Set the pollutant reduction rate of the deep treatment unit. The pollutant reduction rate of each unit is calculated in real time and synchronized to the evaluation network, serving as the core basis for calculating the reward value. If the reduction rate is lower than the preset threshold (0.4 for the pretreatment unit, 0.5 for the anaerobic unit, 0.7 for the aerobic unit, and 0.4 for the deep treatment unit), the reward value will trigger a penalty mechanism, and α will be temporarily increased by 50% to prioritize ensuring that the water quality meets the standards.
[0032] S32. The iterative optimization of the weight parameters of the action network and evaluation network is achieved based on the experience replay and target network soft update mechanism of the Deep Deterministic Policy Gradient (DDPG) algorithm. The experience database adopts a first-in-first-out (FIFO) storage strategy, and the capacity of a single unit of the experience database is set to 10,000 records to avoid data redundancy that would reduce iteration efficiency. The target network soft update mechanism ensures smooth parameter adjustment without oscillation. During the iterative optimization process, the learning rate of both the action network and the evaluation network is set to 0.001. The optimizer uses the Adam optimizer, specifically including: S321. Construct an experience database for each unit. The database is stored separately for pretreatment units, anaerobic units, aerobic units, and advanced treatment units to avoid cross-unit data interference. First, calculate the unit's reagent consumption based on real-time collected data on reagent dosage, equipment operating power, and material unit price. Equipment energy consumption And calculate the reward value. Old state dataset of the collection unit Core parameter adjustment actions Reward Value New state dataset This constitutes a quaternary empirical tuple. And store it in the experience database of the corresponding unit; S322. Randomly sample a batch of empirical tuples from the unit empirical database, the number of samples... The evaluation network objective value is calculated based on the sampled empirical tuples, using the following formula: The formula is: ,in This is the reward decay coefficient, ranging from 0.9 to 0.99, with 0.95 being preferred. It is used to mitigate the impact of long-term rewards on current network optimization. To evaluate the target network, a network with the same structure as the evaluation network but with lagging weight updates is used to avoid fluctuations in the target value. This is the action target network, which has the same structure as the action network but with lagging weight updates, and is used for output. The corresponding optimal action; These are the weight parameters of the action target network. To evaluate the weight parameters of the target network; the evaluation network target value integrates the current reward and the optimal long-term reward, so that network optimization is more in line with long-term benefits; S323. Construct the loss function and update the evaluation network weights. The loss function is: , The number of empirical tuples sampled in a single iteration is 64, where... To evaluate the network's output value for the i-th empirical tuple, i.e., to evaluate the network based on the old state... and adjusting movements The output value assessment is obtained by minimizing the loss function. Update the evaluation network weights The loss function is optimized using gradient descent, with the iteration direction being the negative gradient direction of the loss function. When the loss function value... At this time, pause the evaluation of network weight updates to avoid overfitting; S324. Update Action Network Weights Based on Policy Gradient Ascent Algorithm The gradient formula is: ,in, To evaluate the gradient of the network to the action, reflecting the degree of influence of the action on the value; The gradient of the action network with respect to the weights reflects the degree of influence of the weights on the action output; the gradient incline is the direction of weight update, causing the adjustment of the action network output to converge towards the direction of maximizing the reward value. The action target network and the evaluation target network are updated according to a soft update rule, using the following formula: in, This is the soft update coefficient, ranging from 0.001 to 0.01, preferably 0.005, used to achieve smooth updates of the target network weights and avoid network oscillations caused by sudden weight changes; arrow This indicates a parameter assignment and update action, which assigns the weighted calculation result on the right to the target network weight on the left.
[0033] S4. Set multi-dimensional model update trigger conditions to accurately capture changes in operating conditions such as water quality fluctuations, effluent warnings, parameter deviations, and equipment anomalies, ensuring that the unit process model adapts to actual operating needs in a timely manner; extract historical effective experience data through an experience playback mechanism to drive iterative optimization of the action network and evaluation network, thereby updating the core parameters of the unit process model and realizing online adaptive upgrades of the model, specifically including: S41. The setting of model update trigger conditions, each condition taking effect independently, triggers a model update when any condition is met, specifically including: S411. The triggering condition for water quality fluctuations is that the fluctuation amplitude of the water quality index of the unit's influent meets the following conditions. ,in, For unit The current value of this indicator for influent. This is the average duration of the indicator. The average value within a given timeframe, ranging from 30 to 60 minutes, with 45 minutes being preferred. The preset fluctuation threshold ranges from 0.15 to 0.3, with 0.2 being preferred. S412. The early warning approach trigger condition is the effluent index of the unit for m consecutive sampling periods. satisfy ,in As the early warning coefficient, The value range is 0.8~0.9, with 0.85 being preferred. For unit The discharge standard values for effluent indicators; the range of the number of consecutive sampling periods m is set to 3~5, preferably 4. When the effluent indicators of a unit are sampled for 4 consecutive sampling periods... When this happens, the model is updated. S413. The parameter deviation trigger condition is the current value of the unit's core parameter. Compared with the initial calibration value The absolute value of the deviation satisfies ;in, The parameter deviation threshold ranges from 0.001 to 0.005, with 0.003 being preferred. Corresponding unit Core parameter adjusted values For unit Initial calibration values for core parameters; S414. Equipment anomaly triggering conditions are designed based on the operating parameters of the core equipment in the unit. The core equipment includes the bar screen and scraper in the pretreatment unit, the agitator in the anaerobic unit, the aerator and return pump in the aerobic unit, and the filter and dewatering machine in the deep treatment unit. The operating parameters of the core equipment include operating power and operating current. The preset normal operating range is ±15% of the equipment's rated parameters. Anomaly duration threshold is also specified. The value range is 30-60 seconds, with 45 seconds being preferred; The equipment malfunction trigger condition is the unit The operating parameters of the core equipment exceeded the preset normal operating range, and this continued for a period of time. ,in, The duration of the parameter anomaly This is the threshold for the duration of the abnormality.
[0034] S42. The method of updating the unit process model through the experience playback mechanism, and conducting iterative optimization based on unit-specific experience data that meets the triggering conditions, ensures that the updated model adapts to the current operating conditions of the unit, specifically including: S421. Extract historical experience data of units that meet the triggering conditions. The time range for extracting experience tuples is within 72 hours before the triggering time. Filter valid experience data according to equipment operating parameters. The filtering criteria are that the equipment operating power is 85%~115% of the rated power and the operating current is 80%~120% of the rated current. Remove experience tuples under abnormal equipment conditions. The remaining experience tuples are considered valid experience data. S422. Network Iterative Update: Load the current action network and evaluation network weights for this unit, setting the number of iterations to [number]. The value ranges from 50 to 100, with 80 being preferred, and the learning rate is [value missing]. In each iteration, the value ranges from 0.0005 to 0.002, with 0.001 being preferred. The network loss value is calculated based on valid empirical data. ,when Stop the iteration early. For unit The update loss threshold is set to a value ranging from 0.01 to 0.03, preferably 0.02. During each iteration, 64 empirical tuples are randomly sampled from the effective empirical data, and the network loss value is calculated based on the sampled data. ;when If the iteration stops early, it continues until the threshold is reached. Second-rate; S423. Adjust the core parameters output by the updated ActionNet. With current core parameters Superposition yields new core parameters ;in, The range of values is limited to , For unit Maximum adjustment range for core parameters; S424. Set Verification Period The value range is 1 to 2 hours, preferably 1.5 hours, and the unit is continuously monitored during the verification period. effluent water quality indicators Power relative to equipment operating status Energy consumption If the verification cycle ends, the unit All effluent water quality indicators meet the requirements. , The emission standard value for this indicator, and the equipment energy consumption. If no abnormal increase is observed, then confirm the unit. The process model update takes effect. If the above conditions are not met, the unit needs to be re-evaluated. Perform network iterative updates and parameter adjustments.
[0035] The criteria for determining whether equipment energy consumption shows no abnormal increase are: the average energy consumption increase during the verification period is ≤10% compared to before the update; if all effluent water quality indicators of unit i meet the requirements at the end of the verification period. And equipment energy consumption If the increase is ≤10%, the update of the process model of unit i is confirmed to be effective; if any of the above conditions are not met, return to step S421 and perform network iteration update and parameter adjustment process for unit i. S5. Transmit the core parameters of the updated unit process model to the PLC control unit, generate control instructions, and send them to the actuators of the unit group.
[0036] The updated core parameters of the unit process model are transmitted to the PLC control unit using the industrial Ethernet communication protocol. The PLC control unit has a built-in parameter parsing module that converts the new core parameters into control instructions that the actuators can recognize. After logical verification, the instructions are sent to the actuators of the unit group to achieve closed-loop automatic control of process parameters, specifically including: S51. The core parameters of the updated unit process model are transmitted to the PLC control unit. Based on the values of the new core parameters and the real-time operating conditions of the unit, the PLC control unit generates differentiated analog and digital instructions. These instructions are then sent to the drive modules of the corresponding actuators. The drive modules adjust the equipment operating parameters or control start and stop according to the instructions, including: S511. The PLC control unit generates analog and digital commands based on the new core parameters. The analog commands are standard signals used by the preprocessing unit to adjust the frequency of the lift pump inverter, the frequency of the scraper inverter, the opening of the PAM dosing valve, and the opening of the polyaluminum chloride (PAC) dosing valve; by the anaerobic unit to adjust the frequency of the agitator inverter and the frequency of the circulating pump; and by the aerobic unit to adjust the frequency of the aeration blower inverter and the return pump. Inverter frequency, deep processing unit adjusts the frequency of the dosing pump inverter, PAM dosing valve opening and Adjust valve opening; S512. Digital commands are used to start and stop the core equipment of the control unit. The core equipment of the pretreatment unit is a bar screen and a sludge scraper. The core equipment of the anaerobic unit is a stirrer and a circulating pump. The core equipment of the aerobic unit is a return pump and an aeration blower. The core equipment of the deep treatment unit is a filter and a dewatering machine.
[0037] Example 2 Reference Figure 3 This embodiment provides an adaptive intelligent operation system for wastewater treatment plants, including: The data acquisition module is configured as a configuration unit group, which includes a pretreatment unit, an anaerobic unit, an aerobic unit and an advanced treatment unit connected in sequence. It acquires water quality data, equipment operation data and reagent dosage data, and processes them to obtain standardized data. The model building module is configured to build unit process models for the corresponding unit groups, set the core parameters of the unit process models, and use the adjustment amount of the core parameters as action variables for reinforcement learning, outputting the dosage of reagents and the operating power of equipment for each unit; The reinforcement learning module is configured to construct an action network and an evaluation network. The standardized data is input into the action network, which outputs the adjustment amount of the unit process model. The reward value is calculated based on the pollutant reduction rate, reagent consumption and equipment energy consumption of the unit group. The reward value is input into the evaluation network, and the weight parameters of the action network and the evaluation network are optimized through network iteration. The model update module is configured to set model update trigger conditions and update the unit process model through an experience playback mechanism; The instruction issuing module is configured to transmit the core parameters of the updated unit process model to the PLC control unit, generate control instructions, and issue them to the actuators of the unit group.
[0038] A computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device, the aforementioned adaptive intelligent operation method for a wastewater treatment plant.
[0039] A terminal device includes a processor and a computer-readable storage medium, the processor being configured to implement various instructions; the computer-readable storage medium being configured to store multiple instructions adapted for loading and execution by the processor of the aforementioned adaptive intelligent operation method for wastewater treatment plants.
[0040] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. An adaptive intelligent operation method for wastewater treatment plants, characterized in that, include: The configuration unit group includes a pretreatment unit, an anaerobic unit, an aerobic unit, and an advanced treatment unit connected in sequence. It acquires water quality data, equipment operation data, and reagent dosage data, and processes them to obtain standardized data. Construct a unit process model for the corresponding unit group, set the core parameters of the unit process model, and use the adjustment amount of the core parameters as the action variable of reinforcement learning, and output the dosage of the reagent and the operating power of the equipment for each unit; Construct an action network and an evaluation network. Input the standardized data into the action network, and output the adjustment amount of the unit process model from the action network. Calculate the reward value based on the pollutant reduction rate, reagent consumption, and equipment energy consumption of the unit group. Input the reward value into the evaluation network, and optimize the weight parameters of the action network and the evaluation network through network iteration. Set model update trigger conditions and update the unit process model through the experience playback mechanism; The core parameters of the updated unit process model are transmitted to the PLC control unit, which generates control instructions and sends them to the actuators of the unit group.
2. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that... The water quality data includes the influent chemical oxygen demand (COD) of the pretreatment unit. Influent suspended solids concentration effluent suspended solids concentration The influent water temperature of the anaerobic unit Influent sulfate concentration Chemical oxygen demand of influent Chemical oxygen demand of effluent pH value of influent Dissolved oxygen concentration in the influent of the aerobic unit Actual dissolved oxygen concentration influent ammonia nitrogen concentration Ammonia nitrogen concentration in effluent Sulfidating bacteria concentration saccharifying bacteria concentration Chemical oxygen demand (COD) of influent to the advanced treatment unit Water color Chemical oxygen demand of effluent Water color Total nitrogen Total phosphorus ; The equipment operating data includes the power of the pre-processing unit bar screen. Sludge scraper power The power of the stirrer in the anaerobic unit The power of the aeration blower in the aerobic unit Reflux pump power The power of the filter in the deep processing unit Dehydrator power ; The dosage data includes the real-time dosage of polyaluminum chloride (PAC) in the pretreatment unit. Real-time dosage of PAM amide Ferrous ions in the aerobic unit dosage hydrogen peroxide in the deep treatment unit Real-time dosage Real-time dosage of PAM amide .
3. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The construction of the unit process model corresponding to the unit group includes the construction of the pretreatment unit process model and the anaerobic unit process model, wherein: The formula for constructing the process model of the pretreatment unit is: , ,in, This refers to the dosage of polyaluminum chloride (PAC). The dosage coefficient for polyaluminum chloride (PAC) is... Chemical oxygen demand (COD) of the influent to the pretreatment unit. This refers to the influent flow rate of the pretreatment unit. This is the correction factor for suspended solids. The concentration of suspended solids in the influent of the pretreatment unit. This refers to the dosage of PAM (particulate amide) for pretreatment. The PAM dosage coefficient for the pretreatment unit is given when the suspended solids concentration in the effluent from the pretreatment unit is... When the preset threshold is exceeded, the value will be increased by a preset ratio. ; The formula for constructing the anaerobic unit process model is: ,in, This is the stirring power coefficient. This is the optimal water temperature for the growth of anaerobic bacteria. A preset threshold is set for sulfate concentration. This is the sulfate correction factor. The pH value of the influent to the anaerobic unit. This is the optimal pH value for anaerobic bacteria. This is the pH correction factor.
4. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The construction of the corresponding unit process model includes the construction of the aerobic unit process model and the deep treatment unit process model, wherein: The formula for constructing the aerobic unit process model is: ,in, This is the aeration power coefficient. The target dissolved oxygen concentration for the aerobic unit; The concentration of sulfur-oxidizing bacteria in the influent of the aerobic unit. The concentration of saccharifying bacteria in the influent of the aerobic unit. This represents the sum of the optimal bacterial concentrations in the aerobic unit. This is a correction factor for bacterial concentration, when the ammonia nitrogen concentration in the effluent of the aerobic unit... When emissions exceed the standard, adjust upwards by a preset ratio. ; The formula for constructing the process model of the deep processing unit is: ,in, for Dosage for Dosage coefficient, The target chemical oxygen demand (COD) of the effluent from the advanced treatment unit. Preset threshold for chromaticity, This is the color correction factor. PAM dosage for deep processing units This represents the PAM addition coefficient for the deep processing unit.
5. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The calculation of reward values based on pollutant reduction rate, reagent consumption, and equipment energy consumption of unit groups includes: Construct the reward value formula, the formula is as follows: ,in, Corresponding to the pretreatment unit, anaerobic unit, aerobic unit, and advanced treatment unit, These are the weighting coefficients for water quality and cost. These are the parameter stability weighting coefficients; For unit pollutant reduction rate, This refers to the consumption of a single unit of medicine. Energy consumption of unit equipment These are the adjusted values for the core parameters. The values are those before the core parameters were adjusted. The pollutant reduction rate of each unit is calculated according to the unit process target.
6. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The step of iteratively optimizing the weight parameters of the action network and the evaluation network includes: Build an experience database for each unit and calculate the unit's drug consumption. Equipment energy consumption And calculate the reward value. , The formula for calculating the network objective value is as follows: ,in For reward decay coefficient, To evaluate the target network, For action target network, , For the corresponding weights; Construct a loss function and update the evaluation network weights. The loss function is as follows: ,in To evaluate the network's output value for the i-th empirical tuple, the loss function is minimized. Update the evaluation network weights ;in, For the old state dataset of the cell, Adjust actions for core parameters For reward value, For a new state dataset, update the action network weights based on the policy gradient ascent algorithm. .
7. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The setting of model update trigger conditions includes: The water quality fluctuation trigger condition is that the fluctuation amplitude of the water quality index of the unit influent meets the following conditions. ,in, For unit The current value of this indicator for influent. This is the average duration of the indicator. The average value within, The preset fluctuation threshold is used; The early warning trigger condition is the effluent index of the unit for m consecutive sampling periods. satisfy ,in As the early warning coefficient, For unit The discharge standard values for effluent indicators The warning threshold for the core indicators of effluent from unit i; The parameter deviation trigger condition is the current value of the unit's core parameter. Compared with the initial calibration value The absolute value of the deviation satisfies ;in, For parameter deviation threshold, Corresponding unit Core parameter adjusted values For unit Initial calibration values for core parameters; The equipment malfunction trigger condition is the unit The operating parameters of the core equipment exceeded the preset normal operating range, and this continued for a period of time. ,in, The duration of the parameter anomaly This is the threshold for the duration of the abnormality.
8. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The updating of the unit process model through the experience playback mechanism includes: Extract historical experience data of units that meet the triggering conditions, and filter out experience tuples whose equipment operating parameters are within the normal range as valid experience data; The network iteratively updates the current action network and evaluation network weights of the unit. In each iteration, the network loss value is calculated based on effective empirical data to obtain new core parameters. Set a verification period, and continuously monitor the unit's effluent water quality indicators and equipment operating status (power and energy consumption) within the verification period, and confirm the unit's performance. The process model update has taken effect.
9. The adaptive intelligent operation method for wastewater treatment plants according to claim 1, characterized in that, The process of transmitting the core parameters of the updated unit process model to the PLC control unit includes: The PLC control unit generates analog and digital commands based on the new core parameters. The analog commands are standard signals used by the preprocessing unit to adjust the frequency of the lift pump inverter, the frequency of the scraper inverter, and the opening of the PAM and PAC dosing valves; by the anaerobic unit to adjust the frequency of the agitator inverter and the circulating pump inverter; and by the aerobic unit to adjust the frequency of the aeration blower inverter and the return pump. Inverter frequency, deep processing unit adjusts the frequency of the dosing pump inverter, PAM dosing valve opening and Adjust valve opening; Digital commands are used to start and stop the core equipment of the control unit. The core equipment of the pretreatment unit is a bar screen and a sludge scraper. The core equipment of the anaerobic unit is a mixer and a circulating pump. The core equipment of the aerobic unit is a return pump and an aeration blower. The core equipment of the deep treatment unit is a filter and a dewatering machine.
10. An adaptive intelligent operation system for wastewater treatment plants, characterized in that, The adaptive intelligent operation method for wastewater treatment plants according to any one of claims 1-9 includes: The data acquisition module is configured as a configuration unit group, which includes a pretreatment unit, an anaerobic unit, an aerobic unit and an advanced treatment unit connected in sequence. It acquires water quality data, equipment operation data and reagent dosage data, and processes them to obtain standardized data. The model building module is configured to build unit process models for the corresponding unit groups, set the core parameters of the unit process models, and use the adjustment amount of the core parameters as action variables for reinforcement learning, outputting the dosage of reagents and the operating power of equipment for each unit; The reinforcement learning module is configured to construct an action network and an evaluation network. The standardized data is input into the action network, which outputs the adjustment amount of the unit process model. The reward value is calculated based on the pollutant reduction rate, reagent consumption and equipment energy consumption of the unit group. The reward value is input into the evaluation network, and the weight parameters of the action network and the evaluation network are optimized through network iteration. The model update module is configured to set model update trigger conditions and update the unit process model through an experience playback mechanism; The instruction issuing module is configured to transmit the core parameters of the updated unit process model to the PLC control unit, generate control instructions, and issue them to the actuators of the unit group.