Bioreactor aeration self-adaptive control method and system based on machine learning

By employing a machine learning-based adaptive control method for bioreactor aeration, deep reinforcement learning and LSTM networks are used to generate aeration control commands. Combined with adaptive PID control and seasonal compensation, the problems of unstable effluent quality and high energy consumption in wastewater treatment are solved, achieving efficient pollutant compliance and reduced energy consumption.

CN121209259APending Publication Date: 2025-12-26AOLIU (SHENZHEN) TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511238277.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In existing technologies, the effluent quality is unstable and energy consumption is high due to load fluctuations and seasonal changes during the biological treatment of wastewater. Traditional control strategies lack adaptive capabilities and are difficult to fully cope with complex nonlinear biochemical processes and multi-objective optimization needs.

Method used

An adaptive control method for bioreactor aeration based on machine learning is adopted. Data is processed by a deep reinforcement learning DRL model and an LSTM network to generate aeration control commands. Combined with an adaptive PID controller and a seasonal compensation factor, the operating parameters of the bioreactor are adaptively adjusted to ensure stable and compliant pollutant emissions and reduced energy consumption.

Benefits of technology

The effluent ammonia nitrogen compliance rate was increased to 98.5%, the dissolved oxygen fluctuation range was reduced to ±0.3 mg/L, the aeration energy consumption was reduced to 0.38 kWh/m³ (a decrease of 15.6%), and the shock load response time was shortened to within 15 minutes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121209259A_ABST
    Figure CN121209259A_ABST
Patent Text Reader

Abstract

The invention provides a bioreactor aeration self-adaptive control method and system based on machine learning, and the method comprises the steps: collecting the water inlet flow, ammonia nitrogen concentration, dissolved oxygen concentration, water temperature and chemical oxygen demand data of a bioreactor in real time through a sensor, and carrying out the water balance verification and the Kalman filtering pretreatment containing a water temperature compensation item; generating an aeration instruction by adopting multi-model collaboration; outputting a reference aeration rate by a deep reinforcement learning DRL model; the self-adaptive PID controller dynamically adjusts the proportionality coefficient according to the dissolved oxygen deviation and calculates the correction amount; and the LSTM network generates a fusion weight, and combines the seasonal compensation factor and the safety coefficient to synthesize the final aeration rate. The system passes mutation rate constraint and nitrification efficiency verification, an ASM1 model is triggered to recheck when the deviation exceeds the standard, and after passing, an air blower with the precision of + / -2% executes an instruction and performs closed-loop feedback in a period smaller than or equal to 10 seconds. After the method is implemented, the aeration energy consumption is reduced to 0.38 kWh / m, the effluent ammonia nitrogen standard reaching rate is improved to 98.5%, the dissolved oxygen fluctuation range is reduced to + / -0.3 mg / L, and the impact load response time is shortened to be within 15 minutes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biochemical reaction process control technology, specifically to a machine learning-based adaptive control method and system for aeration in a bioreactors. Background Technology

[0002] Biological wastewater treatment processes are widely used in municipal and industrial wastewater treatment. The core unit—the bioreactor—degrades organic pollutants and nutrients in the water through microbial metabolism. The operational performance of the bioreactor directly affects whether the effluent quality meets standards and the energy cost. Traditional wastewater treatment control typically uses fixed aeration rates, preset operating parameters, or simple PID feedback control to maintain indicators such as dissolved oxygen. However, influent wastewater quality fluctuates significantly, with substantial daily and seasonal variations, causing the bioreactor load to frequently deviate from its design conditions. For example, daytime industrial wastewater discharge may cause a surge in pollutants, while the load decreases significantly at night; temperature changes between winter and summer affect microbial activity, thus altering the reaction rate. If the control strategy lacks adaptability, undertreatment and exceeding effluent standards may occur under high loads, while excessively high aeration may be maintained under low loads, leading to energy waste.

[0003] Existing technologies have attempted to apply fuzzy control and model predictive control to wastewater treatment to improve control effectiveness to some extent. However, these methods often require the establishment of precise mathematical models or empirical rules, making it difficult to comprehensively address complex nonlinear biochemical processes and multi-objective optimization needs. With the development of neural networks and deep learning technologies, a trend has emerged towards using data-driven methods to optimize control. For example, some studies have proposed using artificial neural networks to predict wastewater treatment results or employing reinforcement learning to automatically adjust control parameters, thereby simultaneously considering effluent quality and operating costs.

[0004] However, when applying such machine learning methods to the control of actual bioreactors, there are still problems such as unclear objective functions, inadequate description of constraints, and insufficient details in algorithm implementation. Summary of the Invention

[0005] The technical problem this invention aims to solve is to provide a machine learning-based adaptive control method and system for bioreactor aeration, addressing the issues of unstable effluent quality and high energy consumption caused by load fluctuations and seasonal variations in existing technologies. By introducing neural network modeling and deep learning optimization algorithms, this invention achieves adaptive adjustment of bioreactor operating parameters without requiring a precise mechanistic model, ensuring stable and compliant pollutant discharge while significantly reducing energy consumption.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: Machine learning-based adaptive control methods for bioreactor aeration include: Step 1: Collect the influent flow rate Q of the bioreactor using sensors. in ammonia nitrogen concentration Dissolved oxygen concentration (DO), water temperature (T), and chemical oxygen demand (COD); Step 2: Preprocess the collected data; Step 3: Multi-model collaborative generation of aeration control instructions; Data is processed through deep reinforcement learning DRL models and LSTM networks to generate aeration control instructions; Step 4: Safe execution and closed-loop control.

[0007] Step 2 above specifically includes: Water balance check: When the inflow rate Q in With water output Q out The absolute value of the deviation exceeds the set value, triggering sensor calibration; Using water temperature compensation term T 1.15 Kalman filtering and dynamic 3σ filtering were used to process ammonia nitrogen data.

[0008] Step 3 above specifically includes the following steps: Step 3.1: Input the preprocessed parameters into the deep reinforcement learning (DRL) model and output the baseline aeration rate. The state inputs of the DRL model include real-time dissolved oxygen (DO) concentration, ammonia nitrogen concentration, water temperature, and water load ratio. ; Step 3.2: Based on the deviation e(t) between the measured and target dissolved oxygen concentration (DO), the aeration correction amount ΔQ is calculated using an adaptive PID controller, based on ammonia nitrogen... The required dissolved oxygen concentration is used to calculate the aeration rate and adjust the aeration rate to achieve the target dissolved oxygen concentration. The proportionality coefficient K is used for this purpose. p satisfy: ; The smooth function smooths the error signal e(t). Step 3.3: Use an LSTM network to process historical time-series data to generate hidden states. Calculate the fusion weights: ; Among them, load factor ; This step uses an LSTM neural network to perform time-series analysis on historical running data, generating hidden states that contain time features. Based on hidden state and load factor The fusion weight α is calculated using the Sigmoid function, where the load factor comprehensively considers temperature T and flow ratio. ammonia nitrogen Key process parameters, such as multi-parameter fusion, are used to achieve adaptive weight allocation, thereby improving the adaptability and control accuracy of the control system to different operating conditions. Step 3.4: Calculate the seasonal compensation factor: ; To compensate for temperature variations caused by seasonal changes, temperature (T) and dissolved oxygen (DO) are standardized. This step involves environmental adaptive adjustment of the system using a seasonal compensation factor (β). This is the low temperature compensation coefficient. The project achieves enhanced compensation at temperatures below 20°C. This is the dissolved oxygen deviation correction factor. The item normalizes the dissolved oxygen concentration deviation from the standard value of 2.0 mg / L; η is the temperature influence coefficient, and item T / 35 achieves the standardization of temperature, so that the compensation factor can adapt to the temperature change characteristics of different seasons and improve the stability and treatment efficiency of the sewage treatment system during the whole year. Step 3.5: Synthesize the final aeration command: .

[0009] Step 4 above specifically includes the following steps: Step 4.1, Verify the instruction mutation rate: dQ air / dt ≤0.2Q design ; Step 4.2, Verify nitrification efficiency: When |Q final - Q theory When the concentration exceeds 20%, the kinetic equation of IWA's Activated Sludge Model 1 (ASM1 model) is invoked to calculate the required dissolved oxygen based on influent ammonia nitrogen, and a safety margin treatment is performed. A review was conducted, including the theoretical oxygen demand. max(4.57Δ , 1.2ΔCOD); Step 4.3: Output Q after verification. final The system feeds into the blower actuator and collects dissolved oxygen (DO) concentration feedback values ​​at a cycle of ≤10 seconds to form a closed loop.

[0010] The hidden state of the LSTM network in Step 3.3 above Updated via the following gating mechanism: where the input... It includes time-series data on water volume and ammonia nitrogen concentration over the past n hours.

[0011] The ASM1 model verification in step 4.2 above includes: Calculation of oxygen demand of nitrifying bacteria based on the kinetic equation of activated sludge model No. 1; When the review result is consistent with Q final If the deviation is still greater than 20%, freeze the control command and trigger an audible and visual warning.

[0012] Systems using the aforementioned machine learning-based adaptive control method for bioreactor aeration include: Sensing module: includes an immersion DO sensor, an online ammonia nitrogen monitor, and a flow meter distributed throughout the bioreactor; Edge computing module: used to perform water balance verification, dynamic filtering, and load factor S(t) calculation; The control module includes: DRL model unit: configured to output Q air_base ; PID control unit: configured to dynamically adjust K p And calculate ΔQ; LSTM processing unit: configured to generate hidden states and fusion weight α; Compensation synthesis unit: configured to calculate β and Q final ; Safety verification unit: integrates mutation rate constraint module and ASM1 model verification module.

[0013] The aforementioned security verification unit provides real-time constraints. ∈[Q air_min Q air_max Furthermore, the air volume control accuracy of the blower actuator is ±2%.

[0014] This invention discloses a machine learning-based adaptive control method and system for bioreactor aeration. The system verifies the aeration efficiency through mutation rate constraints and nitrification efficiency. When deviations exceed limits, an ASM1 model review is triggered. Upon successful review, the blower executes commands with a closed-loop feedback cycle of ≤10 seconds. After implementation, aeration energy consumption decreased to 0.38 kWh / m³ (a 15.6% reduction), the effluent ammonia nitrogen compliance rate increased to 98.5%, dissolved oxygen fluctuation range narrowed to ±0.3 mg / L, and shock load response time was shortened to within 15 minutes. Attached Figure Description The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is the overall architecture diagram of the present invention; Figure 2 This is a diagram of the fusion machine learning model of the present invention; Figure 3 This invention includes the control and actual values ​​of aeration volume, and a measured graph of dissolved oxygen. Figure 4 This is the temperature-aeration rate correlation curve of the present invention. Detailed Implementation

[0015] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments.

[0016] Machine learning-based adaptive control methods for bioreactor aeration include: Step 1: Collect the influent flow rate Q of the bioreactor using sensors. in ammonia nitrogen concentration Dissolved oxygen concentration (DO), water temperature (T), and chemical oxygen demand (COD); Step 2: Preprocess the collected data; Step 3: Multi-model collaborative generation of aeration control instructions; Data is processed through deep reinforcement learning DRL models and LSTM networks to generate aeration control instructions; Step 4: Safe execution and closed-loop control.

[0017] Step 2 above specifically includes: Water balance check: When the inflow rate Q in With water output Q out Sensor calibration is triggered when the absolute value of the deviation exceeds a set value, such as 20%. Using water temperature compensation term T 1.15 Kalman filtering and dynamic 3σ filtering were used to process ammonia nitrogen data.

[0018] Step 3 above specifically includes the following steps: Step 3.1: Input the preprocessed parameters into the deep reinforcement learning (DRL) model and output the baseline aeration rate. The state inputs of the DRL model include real-time dissolved oxygen (DO) concentration, ammonia nitrogen concentration, water temperature, and water load ratio. ; Step 3.2: Based on the deviation e(t) between the measured dissolved oxygen concentration (DO) and the target value of 2.0 ± 0.3 mg / L, the aeration correction amount ΔQ is calculated using an adaptive PID controller, based on ammonia nitrogen... The required dissolved oxygen concentration is used to calculate the aeration rate and adjust the aeration rate to achieve the target dissolved oxygen concentration. The proportionality coefficient K is used for this purpose. p satisfy: ; The `smooth` function smooths the error signal e(t). Since dissolved oxygen sensors can be affected by factors such as water quality fluctuations and temperature changes, generating measurement noise, using the `smooth` function can avoid frequent start-ups and shutdowns of aeration equipment, saving energy and extending equipment lifespan, while ensuring the accuracy and stability of dissolved oxygen control. (Constrain K) p ∈[0.5,1.5]; Step 3.3: Use an LSTM network to process historical time-series data to generate hidden states. Calculate the fusion weights: ; Among them, load factor ; This step uses an LSTM neural network to perform time-series analysis on historical running data, generating hidden states that contain time features. Based on hidden state and load factor The fusion weight α is calculated using the Sigmoid function, where the load factor comprehensively considers temperature T and flow ratio. ammonia nitrogen ( Key process parameters such as these are used to achieve adaptive weight allocation through multi-parameter fusion, thereby improving the adaptability and control accuracy of the control system to different operating conditions. Step 3.4: Calculate the seasonal compensation factor: ; To compensate for temperature variations caused by seasonal changes, temperature (T) and dissolved oxygen (DO) are standardized. This step involves environmental adaptive adjustment of the system using a seasonal compensation factor (β). This is the low temperature compensation coefficient. The project achieves enhanced compensation at temperatures below 20°C. This is the dissolved oxygen deviation correction factor. The item normalizes the dissolved oxygen concentration deviation from the standard value of 2.0 mg / L; η is the temperature influence coefficient, and item T / 35 achieves the standardization of temperature, so that the compensation factor can adapt to the temperature change characteristics of different seasons and improve the stability and treatment efficiency of the sewage treatment system during the whole year. Step 3.5: Synthesize the final aeration command: ; Where γ∈[0.2,0.3], the safety factor .

[0019] Step 4 above specifically includes the following steps: Step 4.1, Verify the instruction mutation rate: dQ air / dt ≤0.2Q design; Step 4.2, Verify nitrification efficiency: When |Q final - Q theory When the concentration exceeds 20%, the kinetic equation of IWA's Activated Sludge Model 1 (ASM1 model) is invoked to calculate the required dissolved oxygen based on influent ammonia nitrogen, and a safety margin treatment is performed. A review was conducted, including the theoretical oxygen demand. max(4.57Δ , 1.2ΔCOD); Step 4.3: Output Q after verification. final The system feeds into the blower actuator and collects dissolved oxygen (DO) concentration feedback values ​​at a cycle of ≤10 seconds to form a closed loop.

[0020] The hidden state of the LSTM network in Step 3.3 above Updated via the following gating mechanism: where the input... It contains time-series data on water volume and ammonia nitrogen concentration over the past n hours, where n=6.

[0021] The ASM1 model verification in step 4.2 above includes: Calculation of oxygen demand of nitrifying bacteria based on the kinetic equation of activated sludge model No. 1; When the review result is consistent with Q final If the deviation is still greater than 20%, freeze the control command and trigger an audible and visual warning.

[0022] Systems using the aforementioned machine learning-based adaptive control method for bioreactor aeration include: Sensing module: includes an immersion DO sensor, an online ammonia nitrogen monitor, and a flow meter distributed throughout the bioreactor; Edge computing module: used to perform water balance verification, dynamic filtering, and load factor S(t) calculation; The control module includes: DRL model unit: configured to output Q air_base ; PID control unit: configured to dynamically adjust K p And calculate ΔQ; LSTM processing unit: configured to generate hidden states and fusion weight α; Compensation synthesis unit: configured to calculate β and Q final ; Safety verification unit: integrates mutation rate constraint module and ASM1 model verification module.

[0023] The aforementioned security verification unit provides real-time constraints. ∈[Q air_min Q air_maxFurthermore, the air volume control accuracy of the blower actuator is ±2%.

[0024] Example 1: A machine learning-based adaptive control method and system for aeration in a bioreactor includes the following steps: 1. Data Acquisition and Preprocessing: Acquire key data during the operation of the bioreactor, including influent characteristic parameters (such as flow rate, chemical oxygen demand (COD), ammonia nitrogen concentration, etc.), environmental parameters (seasonal factors such as temperature), and internal reactor conditions (dissolved oxygen concentration, sludge concentration, or other indicators that characterize microbial activity). Perform preprocessing such as normalization on the collected data to facilitate subsequent modeling.

[0025] 2. Objective Function Construction: Based on the requirements for bioreactor operation optimization, an objective function and constraints are established, including key parameters. The objective function aims to comprehensively balance effluent quality and energy consumption, and can be defined as minimizing the weighted sum of energy consumption and effluent quality deviations within the control period, such as: ; in, Indicates the first Energy consumption during a period of time (e.g., electricity consumption for aeration and oxygen supply). This indicates the concentration of pollutants or water quality indicators in the effluent during that period. The set effluent water quality target or discharge standard limit, Let be the deviation penalty function, when Exceeding the target value When taking a positive value (for example, it can be set to...), or When the standard is not exceeded By selecting appropriate weighting coefficients This ensures that the control strategy meets the effluent standards while minimizing energy consumption. The objective function implicitly includes the impact of influent characteristics and microbial activity on operational performance: changes in influent load will be reflected in effluent water quality indicators. In the calculations, microbial activity is affected by factors such as temperature and substrate concentration, which can alter pollutant degradation efficiency, thereby impacting effluent quality and energy consumption requirements. Furthermore, the following constraints are set to define the optimization search space: Effluent water quality constraints: Ensure that key effluent indicators meet regulatory requirements at all times, such as COD concentration. ammonia nitrogen Etc., to ensure that the treatment results meet the standards.

[0026] Energy consumption constraints: Control measures must be within the limits of energy supply and equipment capacity; for example, the airflow of the aeration blower should not exceed the design maximum value. This is to avoid control commands that cannot be executed.

[0027] Operational stability constraints include maintaining a suitable dissolved oxygen range within the bioreactor (avoiding excessively low dissolved oxygen levels that could negatively impact microbial activity or excessively high dissolved oxygen levels that could waste energy) and ensuring that the sludge loading rate remains within a reasonable range, thereby ensuring the safe and stable operation of the system.

[0028] Environmental adaptability constraints: The impact of seasonal temperature variations and influent water quality fluctuations on microbial activity is considered during the optimization process, taking into account different temperatures. Scenario analysis is conducted on conditions such as low temperatures in winter and high temperatures in summer, as well as the range of influent concentrations, to ensure that the resulting control strategies are effective throughout the entire operating range.

[0029] 3. Machine Learning Modeling: Based on the collected data and the constructed objective function, a neural network model is built to approximate the operating characteristics of the bioreactor or directly generate control strategies. The neural network can employ a deep learning architecture, such as a Long Short-Term Memory (LSTM) network to capture time-series features, or a multi-layer feedforward neural network to map environmental states to optimal control outputs. In one implementation, an LSTM neural network is constructed to predict the effluent quality and reactor state at the next time step under given control parameters, and this is used as the internal model to evaluate the objective function. The network input includes the influent characteristics, environmental parameters, and reactor state (such as current influent flow rate, pollutant concentration, temperature, and dissolved oxygen level at the previous time step) at the current time step and several previous time steps. The network output is the predicted key effluent indicators and state for the next time step. The prediction model is trained using historical data, with the loss function being the minimum error between the predicted and actual values. A gradient descent algorithm (such as the Adam optimizer) is used to iteratively adjust the network weights until the prediction accuracy meets the requirements.

[0030] 4. Iterative Optimization Control Strategy: Supported by a prediction model or value assessment model, an intelligent optimization algorithm is used to iteratively search for the optimal control strategy to minimize the objective function. In a preferred embodiment, deep reinforcement learning is employed for control optimization. Specifically, the operation and control of the bioreactor are abstracted as an interaction between an agent and the environment: determined by the environmental state... The system displays the characteristics of the influent, microbial activity, and the current state of the reactor, and outputs control actions from the intelligent agent. (e.g., adjusting aeration rate or reflux ratio), define the reward function for each time period. ; The agent uses the negative of the overall operating cost for each time period as the reward value, and maximizes the accumulated reward. To indirectly minimize the objective function, the agent employs a deep neural network to approximate the strategy or value function (e.g., Deep Q-Network (DQN) with an experience replay mechanism or a policy gradient method), and iteratively updates the network parameters through gradient descent to continuously improve the performance of the control strategy. After numerous training iterations, the reinforcement learning agent gradually forms a near-optimal control strategy, exhibiting a good balance between energy consumption and effluent quality in the simulation environment. In another embodiment, a genetic algorithm (GA) is used to optimize the control parameters: the sequence of operating parameters of the bioreactor over a period of time is encoded as chromosome individuals, and the control strategy is optimized through population evolution. The objective function value is used as the fitness evaluation, and individuals with high fitness are selected for crossover and mutation in each iteration to gradually evolve a better combination of control parameters. The genetic algorithm is suitable for offline optimization of the operating curve of the bioreactor, such as optimizing the aeration strategy within a daily variation cycle. Combined with the above neural network prediction model, GA can search for a near-global optimal control scheme without relying on human experience. After multiple generations of iteration, when the population fitness converges or meets the constraint requirements, the optimal control parameter settings are output. Both of the above iterative optimization methods fully utilize the capabilities of machine learning: reinforcement learning is suitable for real-time adaptive control and can learn about environmental changes online; genetic algorithms excel at globally searching for the optimal strategy and can calculate reference schemes offline. Depending on the specific application requirements, this invention can select one or combine both for the optimal control of bioreactors. Throughout the optimization process, the control strategy is thoroughly tested and adjusted by introducing a simulation environment or digital twin technology to ensure its reliability and effectiveness in practical applications.

[0031] 5. Application and Update of Control Strategy: The trained or optimized control strategy is deployed in the actual operation of the bioreactor. Specifically, an intelligent controller module is set up in the wastewater treatment control system. This module receives real-time sensor data as input, calculates control commands through a trained deep learning model or reinforcement learning agent, and outputs them to the actuators (such as blower frequency converters, return pumps, etc.) to adjust the operating parameters of the bioreactor. The system executes a closed-loop process of "reading status - decision-making control - applying action" in a predetermined short cycle (e.g., every few minutes) to achieve automatic control. Once a new trend in influent water quality or environmental conditions is detected (e.g., long-term load increase or continuous temperature changes due to seasonal alternation), a model update mechanism can be triggered: new operating data is collected to retrain the neural network model or adjust the reinforcement learning strategy, enabling the controller to continuously evolve and maintain optimal control performance. This online update ensures the adaptability of the method of this invention to changes and avoids model inaccuracies due to environmental changes.

[0032] Example 2: The purpose of this invention is to provide a machine learning-based adaptive control method and system for bioreactor aeration to address the technical problems in existing AAO processes for wastewater treatment plants, which lack comprehensive consideration of multiple factors such as influent characteristics and microbial activity, resulting in an inability to quickly respond to sudden water quality changes, poor system adaptability, and difficulty in coping with seasonal variations and water quality fluctuations. To achieve the above objective, as... Figure 1 The following is a diagram of the overall architecture of this invention: First aspect: An adaptive control method for aeration in wastewater treatment plants based on machine learning includes the following steps: 1.1 Process parameters are continuously collected through an immersion sensor array, including water temperature (T), water flow (Q), NH4⁺-N, DO, COD, TN and other parameters.

[0033] 1.2 Edge computing and dynamic processing: After receiving data, the edge computing gateway executes the following sequentially: Water balance check: Calculate the inflow rate Q every 15 minutes. in With water output Q out Deviation ΔQ=|Q in - Q out Sensor calibration is triggered when |ΔQ|>20%.

[0034] Ammonia nitrogen data fusion: The ammonia nitrogen detection values ​​are filtered by a 15-minute moving average and then corrected by a Kalman filter (including a water temperature compensation term T^1.15).

[0035] The data acquisition module synchronously performs dynamic 3σ filtering (coefficient k=2.5) and aligns with the timestamp, transmitting the data to the edge computing gateway via industrial Ethernet. A sliding window mechanism is employed, receiving the latest data and updating the processing results every 5 minutes to maintain data freshness.

[0036] Calculation of load factor S(t): ; in, The hydraulic load ratio reflects the hydraulic load status. , The ammonia nitrogen loading ratio reflects the ammonia nitrogen loading status. .

[0037] The processed data is encapsulated using OPC UA and uploaded to the machine learning controller over the network.

[0038] 1.3 Multi-model collaborative decision-making: The machine learning controller executes the following decision-making process every 15 minutes: Normalized state variables: ; DRL model outputs baseline aeration rate: ; This indicates that the optimal action a is selected under state s. The input state includes real-time DO value (target 2.0 ± 0.2 mg / L), ammonia nitrogen concentration (detected value ± 0.5 mg / L), water temperature (detected value ± 0.5℃), and water load ratio.

[0039] The adaptive PID controller calculates the correction ΔQ in real time based on the DO deviation, where ΔNH4⁺-N is the instantaneous deviation (in mg / L) between the current ammonia nitrogen value and the set value. ; ; Among them, K p The proportionality coefficient is K, which is a constraint. p ∈[0.5,1.5], to avoid drastic fluctuations in parameters. e(t): DO deviation (mg / L), that is, the difference between real-time DO and target value (2.0±0.2mg / L).

[0040] The dynamic weight allocator updates the fusion weights every 15 minutes. ; The dynamic weights α ∈ [0.2, 0.8], and the time-series data input to the LSTM includes water volume, ammonia nitrogen, and load index for the past 6 hours. In the dynamic weight allocator, the hidden state of the LSTM network... The feature encoding of historical time-series data is generated through the following steps: (a) Input the sequence of process parameters for the past N time steps This includes water volume, ammonia nitrogen concentration, and seasonal index; (b) Update the hidden state using the LSTM gating mechanism and cell state The formula is: ; ; ; ; ; ; in , , , These represent the calculations for the output gate, forget gate, output gate, and candidate cell state, respectively. For the weight matrix and bias terms obtained during training, This refers to the Sigmoid function. The above formulas and mechanisms together constitute the core framework of LSTM, achieving efficient modeling and selective information storage of time-series data through gating mechanisms, used for computation. In .

[0041] To compensate for the shortcomings of S(t) such as linear weighting, lack of seasonal pattern differentiation, and lack of dynamic coupling with DO, a seasonal compensation factor β is superimposed: ; ; ; ; , , These are a low-temperature sensitive activation function, a nonlinear penalty for DO bias, and a regional seasonal model, used to compensate for the impact of low temperature on microbial activity and to comprehensively evaluate the reduction of aeration compensation. K1=0.1 (temperature compensation coefficient, unit: ℃^-1), K2=0.3 (DO adjustment coefficient, unit: (mg / L)^-1), yielding the final aeration rate: ; Final aeration volume Q final middle, This is a long-term optimization item. This is a short-term correction item. This is the environmental compensation term. Here, SF is the safety factor, used to cope with shock loads and low-temperature suppression; γ=0.25 (constrained 0.2-0.3) is the global compensation coefficient controlling the seasonal compensation factor (β) and the ammonia nitrogen load term (…). The overall contribution weight of the final aeration volume. , ( =15 minutes).

[0042] 1.4 Safe Execution and Closed-Loop Control The instruction verification module detects the aeration rate mutation rate (threshold dQ) in real time. air / dt ≤0.2Q design And verify the nitrification efficiency (theoretical oxygen demand = max(4.57ΔNH4⁺-N, 1.2ΔCOD) ±20%, when |Q final - Q theory When the aeration rate exceeds 20%, the ASM1 model verification is triggered. If successful, the actuator adjusts the blower speed (corresponding to an airflow control accuracy of ±2%), and simultaneously controls the aeration volume Q. air_min final <Q​air_max The system adapts to the control frequency, ensuring it remains within safe limits and guaranteeing its lifespan and control efficiency. The sensor array feeds back the DO value to the controller within 10 seconds, forming a closed-loop control. If the DO value fails, an anomaly detection is performed. If the anomaly detection passes, the aeration rate is adjusted accordingly; otherwise, an early warning is issued, requiring manual intervention.

[0043] The second aspect: A machine learning-based aeration system for a wastewater treatment plant includes a sensing module, an edge computing module, and a control module. The sensing module is used to collect the actual operating parameters of the wastewater treatment plant and transmit the actual operating parameters to the edge computing module. The edge computing module is used to perform data cleaning, filtering, and feature engineering (including seasonal tags) based on actual operating parameters before uploading the data to the control module. The control module is used to regulate the aeration of the wastewater treatment plant by integrating deep reinforcement learning (DRL), an adaptive PID controller, and a seasonal compensation framework based on a mechanistic model. See details... Figure 2 This is a diagram of a fusion machine learning model.

[0044] Example 3: 1. Implementation Scenario Configuration 1.1 Overview of the wastewater treatment plant: A municipal wastewater treatment plant (capacity 30,000 tons / day) adopts the AAO process.

[0045] 1.2 Sensing Module Configuration: 1.2.1 Immersion Sensor Array: DO sensors (5 units): range 0–20 mg / L, accuracy ±0.1 mg / L (aerobic tank inlet / front / middle / rear / outlet ends) Ammonia nitrogen online monitoring instruments (3 units): measuring range 0.1–150 mg / L, accuracy ±0.2 mg / L (inlet / intermediate / outlet) COD online monitoring instruments (2 units): measuring range 0–1000 mg / L, accuracy ±3 mg / L (influent / effluent) Water temperature sensors (6 units): measuring range -10–50℃, accuracy ±0.1℃ (distributed arrangement) Flow meters (3 units): measuring range 0–2000 m³ / h, accuracy ±0.8% (inlet pipe / sludge return pipe / aeration pipe) 1.3 Edge computing module: Industrial-grade gateway (Intel Atom processor), data acquisition frequency 5 minutes / time.

[0046] 2. Control process execution 2.1 Data Preprocessing (Edge Layer) 2.1.1 Water Balance Verification: Calculate the deviation between the inflow rate Qin and the outflow rate Qout every 15 minutes. ΔQ = |Qin − Qout|, if |ΔQ| > 20%, sensor calibration is triggered. 2.1.2 Ammonia Nitrogen Data Fusion: 15-minute moving average filter + Kalman filter (water temperature compensation term T) 1.15 ) Dynamic 3σ filtering (coefficient k=2.5) removes outliers. 2.2 Multi-model collaborative decision-making (control layer, executed every 15 minutes) 2.2.1 Calculation of Load Factor:

[0047] 2.2.2 DRL model output baseline aeration rate: (Inputs: Real-time DO, ammonia nitrogen, water temperature, water load ratio) 2.2.3 Adaptive PID correction (DO target value 2.0±0.3mg / L):

[0048] LSTM dynamic weight allocation (historical 6-hour time series data):

[0049] (Hidden state is updated via LSTM gating mechanism) 2.2.4.1 Seasonal compensation (low temperature compensation coefficient) DO adjustment coefficient ): , , ,

[0050] 2.2.5 Final Aeration Rate Synthesis (see...) Figure 3 Analysis of DO and aeration control; aeration volume after seasonal compensation for aeration is shown in [reference needed]. Figure 4 ):

[0051] 2.3 Safe Execution and Closed-Loop Verification 2.3.1 Mutation rate constraint: dQ air / dt ≤0.2Q design 2.3.2 Verification of nitrification efficiency: Theoretical oxygen demand Q theory = max(4.57Δ -N, 1.2ΔCOD) ±20%, if |Q final - Qtheory >20%, triggering ASM1 model review. 2.3.3 Actuator: Blower frequency variable speed control (air volume control accuracy ±2%), DO feedback cycle 10 seconds.

[0052] 3. Comparison of Implementation Results

[0053] Example 4: Online Fusion Method for Aeration Weights Based on Two-Layer Stacked LSTM 1. Implementation Scenarios and Hardware Configuration The sensing module and edge computing gateway (Intel Atom E3950, 4GB RAM) of the 30,000 tons / day AAO process wastewater treatment plant in Example 3 are used. This example only replaces the "LSTM dynamic weight allocation" unit in the control layer, while the rest of the modules remain unchanged.

[0054] 2. Network Structure Type: Stacked LSTM, 64 hidden cells / layer.

[0055] Input time window: 6 h (72 5 min steps).

[0056] Input feature dimensions: 6 (see Table 1).

[0057] Output: 64-dimensional hidden state h, mapped to fusion weight α∈(0,1) via a fully connected layer.

[0058]

[0059] μ Q , σ Q , μ NH , σ NH Data is obtained from 30 days of daily rolling statistics from the edge gateway.

[0060] 3. Forward formula, time step t = 1 - 72 For details regarding the forget gate, cell state, and output gate, please refer to section 1.3 of Example 2. The final hidden state h = h0 is taken. 72 4. Weighted Output Layer z=W h ·h + W s ·S(t) + b; α = σ(z) (σ is Sigmoid); 5. Training and Optimization

[0061] After training, the ONNX model is exported, and the edge gateway can be hot-updated via OPC UA without downtime.

[0062] 6. Online closed-loop process, every 15 minutes The edge gateway pushes the latest 72×6 timing matrix → α is obtained through LSTM inference; The final aeration rate Q is synthesized by combining α and the PID correction amount ΔQ according to Equation 2.2.5 in Example 3. final ; If α exceeds [0.2, 0.8] for 3 consecutive times, a "model mismatch" warning is triggered, and automatic retraining will occur the next day; Inference time <10 s, CPU usage <8%.

Claims

1. A machine learning-based adaptive control method for aeration in bioreactors, characterized in that, include: Step 1: Collect the influent flow rate Q of the bioreactor using sensors. in ammonia nitrogen concentration Dissolved oxygen concentration (DO), water temperature (T), and chemical oxygen demand (COD); Step 2: Preprocess the collected data; Step 3: Multi-model collaborative generation of aeration control instructions; Data is processed through deep reinforcement learning DRL models and LSTM networks to generate aeration control instructions; Step 4: Safe execution and closed-loop control.

2. The adaptive control method for bioreactor aeration based on machine learning according to claim 1, characterized in that, Step 2 specifically includes: Water balance check: When the inflow rate Q in With water output Q out The absolute value of the deviation exceeds the set value, triggering sensor calibration; Using water temperature compensation term T 1.15 Kalman filtering and dynamic 3σ filtering were used to process ammonia nitrogen data.

3. The adaptive control method for bioreactor aeration based on machine learning according to claim 2, characterized in that, Step 3 specifically includes the following steps: Step 3.1: Input the preprocessed parameters into the deep reinforcement learning (DRL) model and output the baseline aeration rate. The state inputs of the DRL model include real-time dissolved oxygen (DO) concentration, ammonia nitrogen concentration, water temperature, and water load ratio. ; Step 3.2: Based on the deviation e(t) between the measured and target dissolved oxygen concentration (DO), the aeration correction amount ΔQ is calculated using an adaptive PID controller, based on ammonia nitrogen... The required dissolved oxygen concentration is used to calculate the aeration rate and adjust the aeration rate to achieve the target dissolved oxygen concentration. The proportionality coefficient K is used for this purpose. p satisfy: ; The smooth function smooths the error signal e(t). Step 3.3: Use an LSTM network to process historical time-series data to generate hidden states. Calculate the fusion weights ; Step 3.4: Calculate the seasonal compensation factor ; Step 3.5: Synthesize the final aeration command: .

4. The adaptive control method for bioreactor aeration based on machine learning according to claim 3, characterized in that, The fusion weights in Step 3.3 The calculation formula is: ; Among them, load factor ; This step uses an LSTM neural network to perform time-series analysis on historical running data, generating hidden states that contain time features. ; Based on hidden state and load factor The fusion weight α is calculated using the Sigmoid function, where the load factor comprehensively considers temperature T and flow ratio. ammonia nitrogen By integrating key process parameters, adaptive weight allocation of multiple parameters is achieved, thereby improving the adaptability and control accuracy of the control system to different operating conditions.

5. The adaptive control method for bioreactor aeration based on machine learning according to claim 4, characterized in that, The seasonal compensation factor in Step 3.4 The calculation formula is: ; To compensate for temperature variations caused by seasonal changes, temperature (T) and dissolved oxygen (DO) are standardized. This step involves environmental adaptive adjustment of the system using a seasonal compensation factor (β). This is the low temperature compensation coefficient. The project achieves enhanced compensation at temperatures below 20°C. This is the dissolved oxygen deviation correction factor. The item normalizes the dissolved oxygen concentration deviation from the standard value of 2.0 mg / L; η is the temperature influence coefficient, and item T / 35 achieves the standardization of temperature, so that the compensation factor can adapt to the temperature change characteristics of different seasons and improve the stability and treatment efficiency of the sewage treatment system during the whole year.

6. The adaptive control method for bioreactor aeration based on machine learning according to claim 5, characterized in that, Step 4 specifically includes the following steps: Step 4.1, Verify the instruction mutation rate: dQ air / dt ≤0.2Q design ; Step 4.2, Verify nitrification efficiency: When |Q final - Q theory When the concentration is >20%, the kinetic equation of IWA's Activated Sludge Model 1 (ASM1 model) is invoked to calculate the required dissolved oxygen based on influent ammonia nitrogen, and a safety margin treatment is performed. A review was conducted, including the theoretical oxygen demand. max(4.57Δ , 1.2ΔCOD); Step 4.3: Output Q after verification. final The system feeds into the blower actuator and collects dissolved oxygen (DO) concentration feedback values ​​at a cycle of ≤10 seconds to form a closed loop.

7. The adaptive control method for bioreactor aeration based on machine learning according to claim 6, characterized in that, The hidden state of the LSTM network in Step 3.3 Updated via the following gating mechanism: where the input... It includes time-series data on water volume and ammonia nitrogen concentration over the past n hours.

8. The adaptive control method for bioreactor aeration based on machine learning according to claim 7, characterized in that, The ASM1 model verification in step 4.2 includes: Calculation of oxygen demand of nitrifying bacteria based on the kinetic equation of activated sludge model No. 1; When the review result is consistent with Q final If the deviation is still greater than 20%, freeze the control command and trigger an audible and visual warning.

9. A system using the machine learning-based adaptive control method for bioreactor aeration according to any one of claims 1-8, characterized in that, include: Sensing module: includes an immersion DO sensor, an online ammonia nitrogen monitor, and a flow meter distributed throughout the bioreactor; Edge computing module: used to perform water balance verification, dynamic filtering, and load factor S(t) calculation; The control module includes: DRL model unit: configured to output Q air_base ; PID control unit: configured to dynamically adjust K p And calculate ΔQ; LSTM processing unit: configured to generate hidden states and fusion weight α; Compensation synthesis unit: configured to calculate β and Q final ; Safety verification unit: integrates mutation rate constraint module and ASM1 model verification module.

10. The machine learning-based adaptive control system for bioreactor aeration according to claim 9, characterized in that, The security verification unit is subject to real-time constraints. ∈[Q air_min Q air_max Furthermore, the air volume control accuracy of the blower actuator is ±2%.

Citation Information

Cited By

  • Wastewater emergency treatment module without settling zone, treatment method and integrated skid-mounted equipment

    CN121800379A

  • Aeration system and aeration method for sewage treatment

    CN122036065A

  • Method, control system and evaluation system for online self-adaptive updating of partial nitrification accurate aeration control and storage medium

    CN122144901A

  • Method, control system, evaluation system and storage medium for online adaptive updating of precise aeration control for short-cut nitrification

    CN122144901B