Energy-saving and consumption-reducing method for air blower of sewage treatment plant based on machine learning

By establishing a mixing mechanism model in the blower of a wastewater treatment plant and coupling it with real-time data flow, and using a digital twin and attention encoder-decoder decision model for optimized control, the problem of adaptability to fluctuations in influent water quality was solved, and high-precision, stable energy-saving and consumption-reducing effects were achieved.

CN121541475APending Publication Date: 2026-02-17BEIJING QINGCHENG ENVIRONMENTAL DEV CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511825010.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing machine learning technologies cannot effectively adapt to fluctuations in influent flow and quality in wastewater treatment plant blower control, leading to excessive or insufficient aeration, low oxygen utilization, and the physical unreliability of purely data-driven models, making it difficult to achieve fully automated optimization without human intervention.

Method used

A hybrid mechanism model is continuously coupled with real-time data streams. Virtual sensor values ​​and predicted values ​​are calculated using digital twins to generate comprehensive digital twin data packages. An attention encoder-decoder decision model is used to select optimal control parameters. Combined with real-time comparison and online incremental fine-tuning, the control sequence is ensured to comply with physical conservation and quality constraints.

Benefits of technology

It enables online dynamic tracking of key parameters, ensuring high accuracy and long-term consistency of state perception, avoiding the physical unreliability problem of pure data-driven models, realizing fully automatic closed-loop optimization without human intervention, and improving the energy-saving and consumption-reducing effect of blowers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541475A_ABST
    Figure CN121541475A_ABST
Patent Text Reader

Abstract

The invention discloses a sewage treatment plant blower energy saving and consumption reduction method based on machine learning, and relates to the technical field of machine learning, and the method comprises the steps: building a mixed mechanism model, carrying out the continuous coupling calibration with a real-time data flow, obtaining a dynamically updated multi-dimensional digital twinborn body, calculating a virtual sensor value and a predicted value through the digital twinborn body, and carrying out the calculation of the predicted value. Generating a comprehensive digital twin data packet; and inputting the integrated digital twin data packet into a pre-trained attention encoder-decoder decision model, and obtaining an optimal control candidate set through parallel decoding, physical conservation error regular constraint and non-dominated sorting. According to the method, online dynamic tracking of key parameters is realized, the problem of long-term disjunction of a digital twinborn predicted value caused by parameter drift of a pure mechanism model is solved, and high precision and long-term consistency of state sensing are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, and in particular to a machine learning-based method for energy saving and consumption reduction of blowers in wastewater treatment plants. Background Technology

[0002] With the widespread application of activated sludge processes in wastewater treatment, blowers, as core equipment in aeration systems, typically account for a large proportion of the total power consumption of the entire plant, making them a primary target for energy optimization in wastewater treatment plants. Early blower control relied mainly on a constant dissolved oxygen setpoint combined with traditional PID regulation or worst-case pressure control. While simple to implement, this method cannot adapt to drastic fluctuations in influent flow and quality, leading to over- or under-aeration and generally low actual oxygen utilization. Furthermore, traditional mechanistic model parameters are difficult to identify accurately in real time, and prediction accuracy rapidly declines after long-term operation, making it difficult to maintain energy-saving effects. In recent years, with the penetration of machine learning technology in wastewater treatment, some studies have attempted to use purely data-driven models such as LSTM and deep reinforcement learning to directly regress the optimal airflow or frequency.

[0003] However, existing machine learning technologies still have room for improvement. First, while pure mechanistic models are interpretable, key parameters are significantly affected by temperature, sludge concentration, surfactants, etc., and lack effective online correction mechanisms, resulting in long-term disconnect between digital twin predictions and actual processes, making it difficult to support closed-loop optimization. In addition, while pure data-driven models can capture complex nonlinear relationships, they generally suffer from physical unreliability issues. The generated control sequences often violate the blower affinity law or oxygen mass conservation law. In actual deployment, they are either completely filtered by hard constraints or cause equipment surge and excessive ammonia nitrogen in the effluent, making it difficult to achieve truly unattended fully automated optimization. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a machine learning-based method for energy saving and consumption reduction of blowers in wastewater treatment plants, which solves the problem that while pure data-driven models can capture complex nonlinear relationships, they generally suffer from physical unreliability.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] This invention provides a machine learning-based method for energy saving and consumption reduction of blowers in wastewater treatment plants, comprising:

[0008] A hybrid mechanism model is established and continuously coupled and calibrated with real-time data streams to obtain a dynamically updated multidimensional digital twin. Virtual sensor values ​​and predicted values ​​are calculated through the digital twin to generate a comprehensive digital twin data package.

[0009] The integrated digital twin data package is input into a pre-trained attention encoder-decoder decision model, and the optimal control candidate set is obtained through parallel decoding, physical conservation error regularization constraint and non-dominated sorting.

[0010] The optimal candidate set is input into the fully automated decision-making process to conduct a hard constraint safety risk assessment, and the control parameter scheme with the best comprehensive score is automatically selected according to the preset multi-objective optimization weight strategy.

[0011] The system executes the optimal control parameter scheme and compares the actual operating data with the predicted value in real time. When the deviation between the actual value and the predicted value exceeds the deviation threshold, the system automatically uses the actual operating data to perform online incremental fine-tuning and updates to the decision model.

[0012] As a preferred embodiment of the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning described in this invention, the establishment of the hybrid mechanism model specifically includes:

[0013] Obtain the physical parameters of the wastewater treatment plant, load the blower affinity equation, and establish the air volume-pressure-power mapping relationship;

[0014] By simplifying the ASM1 model to retain the core kinetic equations of the nitrification process and coupling them with the air volume-pressure-power mapping relationship, a mixed mechanism model is formed.

[0015] As a preferred embodiment of the machine learning-based energy-saving and consumption-reducing method for wastewater treatment plant blowers described in this invention, the step of calculating virtual sensor values ​​and predicted values ​​through the digital twin to generate a comprehensive digital twin data package specifically includes:

[0016] The digital twin uses a rolling forward simulation model of its internal mixing mechanism to generate predicted values ​​for dissolved oxygen and effluent ammonia nitrogen.

[0017] The digital twin calculates the current dynamic ratio of oxygen transfer efficiency in real time, which is used as a virtual sensor value for oxygen transfer efficiency, and calculates the current nitration reaction rate in real time, which is used as a virtual sensor value for nitration rate.

[0018] The status parameters of the blower are collected in real time and integrated with the predicted values, virtual sensor values ​​of oxygen transfer efficiency and virtual sensor values ​​of nitrification rate to generate a comprehensive digital twin data package.

[0019] As a preferred embodiment of the machine learning-based energy-saving and consumption-reducing method for wastewater treatment plant blowers described in this invention, the pre-training process of the attention encoder-decoder decision model specifically includes:

[0020] Collect historical integrated digital twin data packages and corresponding actual control parameters from multiple wastewater treatment plants to construct a training sample set;

[0021] The training sample set is input into the attention encoder for multi-head self-attention encoding to obtain a high-dimensional feature representation, and the high-dimensional feature representation is fed into the decoder to generate multiple candidate control sequences in parallel.

[0022] Each time a candidate sequence is generated, it is input in real time into the hybrid mechanism model frozen before the start of pre-training, the mass conservation and energy conservation errors are calculated, and the conservation errors are added as physical consistency regularization terms to the total loss function for backpropagation optimization.

[0023] An attention encoder is used to perform multi-head self-attention encoding on the integrated digital twin data package to extract the long-term and short-term dependencies between water load, virtual sensor values ​​and control parameters;

[0024] Repeat the iteration until all candidate sequences satisfy physical conservation and form a Pareto distribution in the multi-objective space, thus completing the training of the attention encoder-decoder decision model.

[0025] As a preferred embodiment of the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning described in this invention, the step of obtaining the optimal control candidate set through parallel decoding, physical conservation error regularization constraint and non-dominated sorting refers to the decoder outputting multiple candidate control parameter sequences in parallel at one time, calling the hybrid mechanism model to simulate all candidate sequences, calculating their respective energy consumption, effluent ammonia nitrogen risk and action frequency, and using non-dominated sorting to retain the first layer solution as the optimal control candidate set.

[0026] As a preferred embodiment of the machine learning-based energy-saving and consumption-reducing method for wastewater treatment plant blowers described in this invention, the hard constraint safety risk assessment specifically includes:

[0027] Forward simulation is performed on the hybrid mechanism model of the input freezing parameters for each candidate control parameter sequence in the optimal control candidate set to predict the effluent ammonia nitrogen concentration curve in future periods;

[0028] The probability that the effluent ammonia nitrogen concentration curve exceeds the effluent water quality standard limit is taken as the risk of exceeding the standard. The effluent water quality standard limit is determined by the standard implemented by the wastewater treatment plant.

[0029] For each candidate in the optimal control candidate set, the surge margin is calculated in real time, and only candidates that simultaneously meet the surge margin and the effluent water quality standard limit are retained.

[0030] As a preferred embodiment of the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning described in this invention, the step of automatically selecting the control parameter scheme with the optimal comprehensive score according to a preset multi-objective optimization weight strategy specifically includes:

[0031] For candidates that pass the hard constraint safety risk assessment, a comprehensive score is calculated by weighting energy consumption, water quality risk, and frequency of actions.

[0032] The scheme with the lowest overall score is selected as the optimal control parameter scheme.

[0033] As a preferred embodiment of the machine learning-based energy-saving and consumption-reducing method for wastewater treatment plant blowers described in this invention, the real-time comparison of actual operating data with the predicted values ​​specifically includes:

[0034] Real-time calculation of the deviation between actual and predicted values ​​of dissolved oxygen, air pressure, and effluent ammonia nitrogen;

[0035] When the deviation continuously exceeds the set deviation threshold, online incremental fine-tuning is triggered.

[0036] As a preferred embodiment of the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning described in this invention, the step of automatically using actual operating data to perform online incremental fine-tuning and updating of the decision model specifically includes:

[0037] Freeze the encoder and physical constraint layer, and only unfreeze the back network of the decoder;

[0038] Using the latest actual operating data as a small batch of samples, the AdamW optimizer is used to fine-tune the back network of the decoder. After fine-tuning, the current decision model is directly replaced.

[0039] As a preferred embodiment of the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning described in this invention, the method of simplifying the ASM1 model while retaining the core kinetic equations of the nitrification process to obtain the core kinetic equations of nitrification is as follows:

[0040] Obtain all state variables and reaction rate equations related to the nitrification process in the standard ASM1 model, and remove variables and equations that are not related to denitrification, heterotrophic bacteria growth and phosphorus accumulation;

[0041] By performing piecewise linear equivalent substitution of the Monod switching function in the remaining equations, a simplified nitration kinetic equation is obtained.

[0042] By coupling the simplified nitration kinetic equation with the oxygen mass transfer equation, the complete core nitration kinetic equation is obtained.

[0043] The beneficial effects of this invention are as follows: By continuously coupling and calibrating the hybrid mechanistic model with the real-time data stream, online dynamic tracking of key parameters is achieved, solving the problem of long-term disconnect between the predicted values ​​of the digital twin due to parameter drift in the pure mechanistic model, and ensuring high accuracy and long-term consistency of state perception; at the same time, by embedding the mass conservation and energy conservation errors into the loss function as physical consistency regularization terms in real time during the training of the attention encoder-decoder decision model, all generated control sequences naturally comply with the blower affinity law and oxygen balance constraints, fundamentally eliminating the defects of pure data-driven models that are physically unreliable, easily filtered out by hard constraints, or cause surge and water quality exceedances, and finally realizing truly unattended fully automatic closed-loop optimization. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a flowchart of a machine learning-based method for energy saving and consumption reduction of blowers in wastewater treatment plants.

[0046] Figure 2 A flowchart illustrating the process of constructing a hybrid mechanism model and generating integrated digital twin data packages.

[0047] Figure 3 This is a flowchart of the pre-training and optimization process for an attention encoder-decoder decision model.

[0048] Figure 4 This is a flowchart of a fully automated decision-making process and a safety risk assessment and execution fine-tuning process. Detailed Implementation

[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0050] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0052] Reference Figures 1-4 This is one embodiment of the present invention, which provides a machine learning-based method for energy saving and consumption reduction of blowers in wastewater treatment plants, comprising the following steps:

[0053] S1: Establish a hybrid mechanism model and continuously couple and calibrate it with real-time data streams to construct a dynamically updated multidimensional digital twin. Calculate virtual sensor values ​​and predicted values ​​through the digital twin to generate a comprehensive digital twin data package.

[0054] S1.1: Obtain the effective volume of the biological treatment tank, the resistance characteristic curve of the aeration pipe network, the performance curve of the blower, and the aerator arrangement parameters of the sewage treatment plant as physical parameters; load the blower affinity law equation into the physical parameters to obtain the precise mapping relationship that the air volume is proportional to the rotational speed, the pressure is proportional to the square of the rotational speed, and the power is proportional to the cube of the rotational speed, thereby establishing the air volume-pressure-power mapping relationship.

[0055] S1.2: Obtain all state variables and reaction rate equations from the standard ASM1 model, extracting autotrophic nitrifying bacteria concentration, ammonia nitrogen concentration, dissolved oxygen concentration, and nitrification reaction rate equations. Remove all state variables and reaction rate equations related to denitrification, heterotrophic bacteria growth, slow degradation of organic matter, and phosphorus accumulation. Linearize the Monod switching function in the retained nitrification reaction rate equations, replacing the original hyperbolic form with an equivalent piecewise linear function within typical operating conditions, resulting in a simplified nitrification kinetic equation. Directly use the nitrification oxygen consumption rate output from the simplified nitrification kinetic equation as the oxygen consumption term in the oxygen mass transfer equation, ensuring that the oxygen supply rate obtained from the oxygen mass transfer equation is equal to the nitrification oxygen consumption rate in real time, thus obtaining the complete core nitrification kinetic equation. Then, directly substitute the total air volume required by the oxygen mass transfer equation into the air volume-pressure-power mapping relationship to obtain the blower pressure and power consumption under the corresponding air volume, making the aeration rate simultaneously determine the oxygen supply and blower power consumption, forming a mixed mechanism model.

[0056] It should also be noted that the typical operating condition range refers to the range of ammonia nitrogen and dissolved oxygen concentrations that are most commonly observed in the daily operation of the biological treatment tank of a wastewater treatment plant. For example, the typical operating condition range for ammonia nitrogen concentration is 0.5 mg / L to 8 mg / L (it may briefly reach 15 mg / L during influent impact, but it is below 8 mg / L for more than 90% of the time). Within the most common ammonia nitrogen and dissolved oxygen concentration range, the Monod switching function changes most frequently and has the greatest impact.

[0057] The mixing mechanism model is continuously coupled and calibrated with real-time field data streams, including influent flow rate, influent ammonia nitrogen concentration, temperature, current dissolved oxygen concentration, blower speed, air pressure, current, and power. An extended Kalman filter is used to correct key parameters of the mixing mechanism model at fixed intervals (60 seconds) to ensure consistency between the model's output and field measurements, thus constructing a dynamically updated multidimensional digital twin. Specifically, the multidimensional digital twin uses the currently calibrated mixing mechanism model parameters and the latest real-time state variables as initial values, and runs a forward simulation. This involves sequentially integrating the nitrification core kinetic equations, oxygen mass transfer equations, and flow-pressure-power mapping relationships within the mixing mechanism model to obtain predicted values ​​for dissolved oxygen concentration, air pressure, and blower power at the next moment. The real-time dissolved oxygen concentration, air pressure, and blower power measured by field instruments are then used to further refine the simulation. As the observed value, it is subtracted from the predicted value obtained in the previous step to obtain the prediction error at the current moment; the extended Kalman filter calculates the optimal Kalman gain for this operation based on the Jacobian matrix of the key parameters near the current operating point of the hybrid mechanism model (i.e., how much the dissolved oxygen, wind pressure, and power change by 1% for each key parameter), combined with the prediction error and the instrument noise covariance; the Kalman gain is multiplied by the prediction error to directly add a correction to the key parameters, so that the predicted value of the hybrid mechanism model in the next cycle immediately approaches the field measured value, thus completing one correction; the corrected key parameters are immediately replaced in the hybrid mechanism model for the digital twin rolling prediction in the next cycle.

[0058] It should also be noted that the instrument noise covariance is derived from the square of the standard deviation of the measured values ​​of the field instruments under stable operating conditions, which is then filled into a diagonal matrix and used in a fixed manner; the correction amount is derived from the extended Kalman filter, which directly outputs the result after calculation in each cycle based on the prediction error, the fixed Jacobian matrix, and the fixed instrument noise covariance matrix; the key parameters refer to the real-time conversion factor of oxygen transfer efficiency under standard conditions, the autotrophic bacteria activity index, the total resistance coefficient of the aeration network, and the blower efficiency correction factor. Because even slight drifts in these four parameters can lead to dissolved oxygen prediction deviations, they must be tracked and corrected in real time by the extended Kalman filter as key parameters.

[0059] Among them, the real-time conversion factor of oxygen transfer efficiency under standard conditions is obtained by dividing the value measured by offline clear water aeration test by the sludge correction factor; the autotrophic bacteria activity index is obtained as an initial value from historical sludge activity test reports; the total resistance coefficient of the aeration network is calculated as an initial value based on the network design drawings and the first measured air pressure data; and the blower efficiency correction factor is calculated as an initial value based on the blower's factory performance curve and the first measured power.

[0060] S1.3: The multidimensional digital twin simulates its own internal mixing mechanism model in a rolling forward simulation with a fixed step size (60 seconds). Starting from the real-time state variables at the current moment and the latest calibrated parameters, it calculates the dissolved oxygen concentration and the final effluent ammonia nitrogen concentration of each biological tank section in the future prediction period by integrating at each time step, and obtains the predicted values ​​of dissolved oxygen and effluent ammonia nitrogen for the entire prediction period.

[0061] The multidimensional digital twin calculates the ratio of the actual oxygen transfer efficiency to the standard oxygen transfer efficiency in real time based on the current airflow, liquid depth, and water temperature, obtaining the virtual sensor value of the oxygen transfer efficiency, expressed as:

[0062] ;

[0063] in, The virtual sensor value represents the oxygen transfer efficiency. Indicates the current air volume. This indicates the standard oxygen transfer efficiency of the aerator, which is the factory default value, for example, 0.30. This represents the liquid depth correction factor. Indicates the effective volume of the biological treatment tank. Indicates saturated dissolved oxygen. Indicates the current dissolved oxygen. This represents the temperature-sludge comprehensive correction factor, which is usually taken as 0.85~0.95.

[0064] The multidimensional digital twin calculates the nitrification rate in real time based on the current ammonia nitrogen load and dissolved oxygen concentration, obtaining the virtual sensor value of the nitrification rate, expressed as:

[0065] ;

[0066] in, This represents the virtual sensor value indicating the nitration rate. This represents the current corrected autotrophic bacteria growth rate coefficient, output in real time by the extended Kalman filter. This indicates the current ammonia nitrogen concentration. This indicates the current dissolved oxygen concentration. This indicates the current concentration of autotrophic bacteria, which is output in real time from the state of the mixed mechanism model.

[0067] The multidimensional digital twin integrates real-time data collected on-site, such as influent flow rate, influent ammonia nitrogen concentration, current dissolved oxygen concentration, blower pressure, current, and speed, with predicted values ​​of dissolved oxygen and effluent ammonia nitrogen, virtual sensor values ​​of oxygen transfer efficiency, and virtual sensor values ​​of nitrification rate, to form a comprehensive digital twin data package.

[0068] Preferably, compared to existing methods, this scheme constructs a hybrid mechanism model and forms a high-precision multidimensional digital twin through real-time calibration. This enables accurate perception of core process variables that are difficult to measure directly, such as oxygen transfer efficiency and nitrification reaction rate, thus overcoming the blind spots of traditional methods that rely on limited instrument data. Through physical constraint embedding and real-time output of virtual sensor values, it provides a more comprehensive and reliable state representation for the subsequent attention encoder-decoder decision model, ensuring that the generated control candidate set naturally satisfies the conservation of mass and energy, significantly improving the physical credibility of optimization decisions and water quality safety. At the same time, the closed-loop adaptive correction mechanism ensures the long-term stability of the model, avoiding the problem of rapid accuracy decline caused by the drift of traditional mechanism or pure data-driven methods with changing operating conditions. This enables the blower to operate within safe boundaries and continuously save energy and reduce consumption.

[0069] S2: Input the integrated digital twin data package into the pre-trained attention encoder-decoder decision model, and obtain the optimal control candidate set through parallel decoding, physical conservation error regularization constraint and non-dominated sorting;

[0070] S2.1: First, complete the pre-training of the attention encoder-decoder decision model. The specific process is as follows:

[0071] Collect integrated digital twin data packages generated from the continuous operation of multiple wastewater treatment plants, as well as the actual blower frequency and pressure control parameters executed during the same period. Pair the integrated digital twin data packages at each moment with the corresponding actual control parameters to form a training sample set.

[0072] The attention encoder-decoder decision model adopts an encoder-decoder structure based on the Transformer architecture. The encoder consists of multiple layers of multi-head self-attention modules and a feedforward network, which are stacked to encode the comprehensive digital twin data packets into high-dimensional feature representations. The decoder also consists of multiple stacked structures, each layer containing masked multi-head self-attention, encoder-decoder cross-attention, and a feedforward network. A linear projection layer is connected at the decoder output to directly regress the blower frequency setpoint and pressure setpoint sequences for multiple future time steps. During the training phase, the decoder uses a teacher-forced input of real historical control parameter sequences as targets, while during the inference phase, an autoregressive approach is used to gradually generate candidate control parameter sequences.

[0073] The comprehensive digital twin data package from the training sample set is input into the attention encoder. The attention encoder arranges all variables according to the time series and encodes their positions, enabling the decision model to distinguish the data order at different time steps. Each attention head uses three different linear layers to convert the value of each variable in the arranged time series into a query vector, a key vector, and a value vector. For example, when an attention head focuses on the impact of influent flow rate on the virtual sensor value of oxygen transfer efficiency, the query vector comes from the influent flow rate sequence, and the key and value vectors come from the virtual sensor value sequence of oxygen transfer efficiency. Other attention heads focus on the relationships between different pairs of variables. Within each attention head, the dot product of the query vector and the key vector is calculated to obtain an attention score, which represents the strength of the impact of each time step on other time steps. The higher the score, the stronger the correlation. The attention score is normalized to a weight between 0 and 1 using the softmax function, and then the value vector is weighted and summed to obtain the attention result of the current attention head. The attention results of all attention heads are concatenated along the feature dimension and linearly transformed to fuse into a high-dimensional feature representation that includes the long-term and short-term dependencies between influent load, virtual sensor values, and control parameters.

[0074] After the high-dimensional feature representation is fed into the decoder, the decoder generates multiple (e.g., ten) candidate control parameter sequences in parallel using a teacher-forced method. Each candidate control parameter sequence contains a sequence of blower frequency setpoints and pressure setpoints for multiple future time steps starting from the current moment. During the generation process, after the control parameters for each time step are generated, the control parameters for the current time step, along with the state variables in the current integrated digital twin data package, are immediately input into the hybrid mechanism model of the frozen parameters for one forward simulation. The difference between the oxygen supply and the oxygen consumption in the nitrification process within the current time step is obtained as the mass conservation error, and the difference between the actual power of the blower and the power calculated by the affinity law is obtained as the energy conservation error. These two conservation errors are directly added to the total loss function as physical consistency regularization terms. Together with the cumulative energy consumption loss, the risk loss of excessive ammonia nitrogen in the effluent, and the loss of control action switching frequency, they constitute the final loss function. Through backpropagation, the decoder parameters are optimized simultaneously, so that all generated candidate control parameter sequences gradually approach the optimal Pareto front of the three objectives while satisfying the constraints of mass conservation and energy conservation.

[0075] Repeat the above iterations until all generated candidate control parameter sequences satisfy the mass and energy conservation constraints and form a Pareto distribution in the three-objective space. This completes the pre-training of the attention encoder-decoder decision model.

[0076] S2.2: Input the current integrated digital twin data packet into the pre-trained attention encoder-decoder decision model; The attention encoder performs multi-head self-attention encoding on the current integrated digital twin data packet in the manner of S2.1 to obtain a high-dimensional feature representation; After receiving the high-dimensional feature representation, the decoder generates multiple candidate control parameter sequences in parallel at one time.

[0077] After the decoder generates all candidate control parameter sequences, it sequentially extracts one candidate control parameter sequence and inputs it into the hybrid mechanism model of the frozen parameters step by step from the current moment to perform forward simulation of the entire time period. The hybrid mechanism model obtains the corresponding air volume and power based on the frequency setpoint and pressure setpoint directly given at each time step, and accumulates the power of all time steps to obtain the cumulative energy consumption. At the same time, the hybrid mechanism model obtains the ammonia nitrogen concentration curve of the effluent based on the virtual sensor value of oxygen transfer efficiency, virtual sensor value of nitrification rate, and predicted values ​​of dissolved oxygen and effluent ammonia nitrogen at each time step, and calculates the probability of the effluent ammonia nitrogen concentration exceeding the effluent water quality standard limit as the risk of effluent ammonia nitrogen exceeding the standard; and calculates the number of times the frequency setpoint or pressure setpoint changes between adjacent time steps as the control action switching frequency.

[0078] After completing the simulation of all candidate control parameter sequences, the three target values ​​corresponding to each candidate control parameter sequence are obtained: cumulative energy consumption, risk of effluent ammonia nitrogen exceeding the standard, and frequency of control action switching. The fast non-dominated sorting algorithm is used to sort all candidate control parameter sequences, and the first layer of candidate control parameter sequences that are not dominated by any other candidate in the three targets of cumulative energy consumption, risk of effluent ammonia nitrogen exceeding the standard, and frequency of control action switching are found. The first layer of candidate control parameter sequences is output as the optimal control candidate set.

[0079] Preferably, this invention embeds the physical conservation error into the loss function in real time as a regularization constraint during the training of the attention encoder-decoder decision model, ensuring that all generated candidate control parameter sequences naturally satisfy the conservation of oxygen mass and blower energy, thus avoiding the problem of invalid solutions that violate physical laws, which is prone to occur in traditional pure data-driven methods. By decoding multiple candidates in parallel and combining them with fast non-dominated sorting, the optimal control candidate set located at the Pareto front of the three objectives is directly obtained, significantly improving decision diversity and global optimality. The deep integration of physical constraints and multi-objective optimization enables the optimal control candidate set to continuously minimize blower energy consumption while ensuring 100% compliance of effluent ammonia nitrogen, and at the same time reduces equipment wear caused by frequent switching of control actions, thereby improving the overall safety, stability and energy-saving effect of the blower.

[0080] S3: Input the optimal candidate set into the fully automated decision-making process, conduct hard constraint safety risk assessment, and automatically select the control parameter scheme with the best comprehensive score according to the preset multi-objective optimization weight strategy;

[0081] S3.1: After receiving the optimal control candidate set, the fully automatic decision-making process sequentially extracts each candidate control parameter sequence from the optimal control candidate set and inputs each candidate control parameter sequence into the hybrid mechanism model of the frozen parameters step by step for a complete time-period forward simulation.

[0082] The hybrid mechanism model takes the frequency setpoint at the current time step in the candidate control parameter sequence as the inverter output frequency. Based on the blower affinity law, it calculates the current speed as proportional to the frequency setpoint to obtain the actual speed. Then, based on the affinity law, it calculates the current airflow as proportional to the actual speed to obtain the actual airflow. Simultaneously, it uses the affinity law to calculate the theoretical air pressure as proportional to the square of the actual speed to obtain the theoretical air pressure. The pressure setpoint in the candidate control parameter sequence is used as the actual air pressure output. The blower operating point coordinates are obtained as the combination point of the actual airflow and actual air pressure. The corresponding blower operating point position is then compared with the blower surge curve. The minimum surge margin for the current time step is obtained by comparing the curves, and the minimum value of all time steps over the entire period is taken as the surge margin of the current candidate control parameter sequence. If the current surge margin is less than the preset safety margin threshold, the current candidate control parameter sequence is directly eliminated. The preset safety margin threshold is based on the surge curve provided by the blower manufacturer and extrapolated by 10% to 20% to set a safety boundary, ensuring that the operating point is always far away from the actual surge zone and avoiding accidental entry into surge due to pipeline resistance fluctuations or measurement errors. The typical value is 1.1 to 1.2 times the surge line air volume value (i.e., a margin of 10% to 20%).

[0083] Simultaneously, the hybrid mechanism model calculates the virtual sensor values ​​of oxygen transfer efficiency and nitrification rate in real time at each time step based on the candidate control parameter sequence, along with the current dissolved oxygen concentration. It then integrates the complete core nitrification kinetic equation and the hydraulic retention characteristics of the biological tank at each time step to obtain the effluent ammonia nitrogen concentration change curve for each moment during the entire prediction period. The probability of the effluent ammonia nitrogen concentration change curve exceeding the effluent water quality standard limit is then used as the exceedance risk of the current candidate control parameter sequence. If the current exceedance risk is greater than the preset risk threshold, the current candidate control parameter sequence is directly eliminated. The risk threshold is set based on the effluent water quality standard of the wastewater treatment plant and extrapolated with a certain safety margin. For example, the effluent ammonia nitrogen standard limit of 0.5 mg / L is used as the benchmark, and the risk threshold is set to ensure that the exceedance probability does not exceed 1%~5%, even under influent shock or slight model deviations.

[0084] S3.2: After completing the hard constraint safety risk assessment of all candidate control parameter sequences, only the candidate control parameter sequences that simultaneously meet the surge margin requirement and the risk requirement of excessive ammonia nitrogen in the effluent are retained to form a safe candidate subset.

[0085] For each candidate control parameter sequence in the safety candidate subset, a comprehensive score is calculated by weighting and summing using preset multi-objective optimization weights (energy consumption weight, water quality risk weight, and action frequency weight). The energy consumption item is the cumulative energy consumption, the water quality risk item is the probability of exceeding the standard, and the action frequency item is the number of times the control parameter changes in adjacent time steps, all normalized. The expression for calculating the comprehensive score is:

[0086] ;

[0087] in, This represents the overall score of the candidate control parameter sequence; the smaller the score, the better. This represents the normalized cumulative energy consumption within the safe candidate subset. Indicates energy consumption weight. This indicates the risk of excessive ammonia nitrogen levels in the effluent, as normalized by the candidate safety subset. Indicates water quality risk weights. This represents the normalized control action switching frequency within the safe candidate subset. This indicates the frequency weight of actions.

[0088] It should also be noted that the default settings for the multi-objective optimization weights are: energy consumption weight 0.6, water quality risk weight 0.3, and action frequency weight 0.1. The reason for this setting is that energy saving is the primary objective of wastewater treatment plant blower optimization, so energy consumption has the highest weight; water quality must meet 100% of the standards, but there are already hard constraints to cover this, so water quality risk has the second highest weight but does not exceed energy consumption weight; and action frequency only affects equipment lifespan and maintenance costs, which is a secondary objective, so it has the lowest weight. This setting ensures that power consumption is minimized under any circumstances, while preventing any accidents of exceeding water quality standards, and avoiding mechanical wear and shortened lifespan caused by frequent operation of frequency converters and valves, thus achieving the best balance between economic benefits, compliance, and equipment friendliness.

[0089] The fully automated decision-making process compares the comprehensive scores of all candidate control parameter sequences within the safe candidate subset and directly selects the candidate control parameter sequence with the smallest comprehensive score as the final optimal control parameter scheme output; if multiple candidate control parameter sequences have the same comprehensive score, the candidate control parameter sequence with the lowest cumulative energy consumption is selected as the optimal control parameter scheme.

[0090] Preferably, this invention introduces a hard-constraint safety risk assessment based on the optimal control candidate set. First, a safe candidate subset is formed through dual filtering using surge margin and the risk of excessive ammonia nitrogen in the effluent. This eliminates dangerous schemes that could lead to equipment surge or water quality exceeding standards, ensuring the absolute safety of the blower operation. Furthermore, a preset multi-objective optimization weight is used to perform a fine-grained weighted score on the safe candidate subset, achieving a balanced optimization that prioritizes energy consumption, strictly adheres to water quality standards, and ensures smooth operation. This avoids the shortcomings of traditional single-objective or simple rule-based control, which is prone to getting trapped in local optima or frequent actions. The weight strategy is flexibly adjustable according to the actual needs of the water plant, making the decision-making process fully automated and requiring no manual intervention. This significantly improves control accuracy and long-term stability, achieving comprehensive optimization in energy saving, compliance, and equipment protection.

[0091] S4: Execute the optimal control parameter scheme, and compare the actual operating data with the predicted value in real time. When the deviation between the actual value and the predicted value exceeds the deviation threshold, automatically use the actual operating data to perform online incremental fine-tuning and update the decision model.

[0092] S4.1: The optimal control parameter scheme selected by the fully automatic decision-making process includes a sequence of blower frequency setpoints and pressure setpoints for multiple time steps from the current moment. The frequency setpoints and pressure setpoints for the current time step are converted into standard control commands and sent to the field blower frequency converter for execution via OPC-UA or Modbus-TCP protocol. At the same time, a short-term anti-jitter window is activated after the command is sent to avoid repeated issuance of the same command within the same cycle, which could cause oscillations.

[0093] Every fixed period (one minute), the dissolved oxygen concentration, wind pressure, and effluent ammonia nitrogen concentration collected in real time by the field instruments, as well as the concentration obtained by the laboratory or online analyzer, are taken as actual values ​​and compared with the corresponding predicted values ​​of dissolved oxygen and effluent ammonia nitrogen in the integrated digital twin data package. The absolute or relative deviation of the three is calculated. Specifically, the absolute deviation of dissolved oxygen is calculated by subtracting the measured value of dissolved oxygen from the predicted value of dissolved oxygen, the absolute deviation of wind pressure is calculated by subtracting the measured value of wind pressure from the predicted value of wind pressure, and the absolute deviation of effluent ammonia nitrogen is calculated by subtracting the measured value of effluent ammonia nitrogen from the predicted value of effluent ammonia nitrogen, or the relative deviation is calculated uniformly.

[0094] A continuous counter is invoked, and when any deviation exceeds a preset deviation threshold for multiple consecutive cycles, an online incremental fine-tuning mechanism is immediately triggered. The deviation threshold is determined based on the prediction error distribution during historical stable operation, using the 95th percentile of historical errors as a benchmark. The reason is that the 95th percentile covers 95% of normal fluctuations in daily life (including minor disturbances, instrument noise, small water ingress impacts, etc.), and fine-tuning is only triggered by genuine operating condition drift or model aging, avoiding frequent and meaningless online learning. A higher percentile is not used because some extreme but short-lived disturbances (heavy rain, temporary chemical addition, instantaneous sensor drift) would also be treated as normal, and fine-tuning would only be triggered by extremely rare catastrophic events. As a result, the model would not be updated for a long time, and eventually become seriously inaccurate when normal operating conditions change, significantly reducing energy-saving effects. A lower percentile is not used because a large number of normal fluctuations would be misjudged as "model failure," causing fine-tuning to be triggered almost every day or even every hour, resulting in a continuous learning state, which not only wastes computing resources but also temporarily reduces model stability during the fine-tuning process.

[0095] S4.2: After triggering online incremental fine-tuning, freeze all encoder layers and loss calculation layers with embedded physical consistency regularization terms in the attention encoder-decoder decision model, and only unfreeze the parameters of the last few fully connected network layers and linear projection layers of the decoder.

[0096] We collect actual integrated digital twin data packages and corresponding real control parameters generated after executing the optimal control parameter scheme in the recent period as mini-batch samples; we use the AdamW optimizer to perform gradient descent optimization on the thawing layer with a small learning rate (1e-5~1e-6) in a small number of steps, and the loss function maintains the complete form of the pre-training loss function, including physical consistency regularization, energy consumption loss, water quality risk loss and action frequency loss; after optimization, we directly replace the currently serving attention encoder-decoder decision model with the fine-tuned model weights to achieve seamless updates without awareness, so that the decision model can quickly adapt to operating condition drift or unmodeled disturbances without affecting the control commands being executed, thereby completing the energy saving and consumption reduction task.

[0097] This embodiment also provides a computer device applicable to the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as proposed in the above embodiment.

[0098] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0099] This embodiment also provides a storage medium storing a computer program. When executed by a processor, the program implements the energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning, as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0100] In summary, this invention achieves online dynamic tracking of key parameters through continuous coupling calibration of a hybrid mechanistic model and real-time data stream. This completely solves the problem of long-term disconnect between the predicted values ​​of the digital twin caused by parameter drift in pure mechanistic models, ensuring high accuracy and long-term consistency of state perception. Simultaneously, by embedding mass conservation and energy conservation errors into the loss function as physical consistency regularization terms in real-time during the training of the attention encoder-decoder decision model, all generated control sequences naturally comply with the blower affinity law and oxygen balance constraints. This fundamentally eliminates the defects of purely data-driven models, such as physical unreliability, susceptibility to filtering by hard constraints, or the occurrence of surge and water quality exceedances. Ultimately, this invention achieves truly unattended, fully automated closed-loop optimization.

[0101] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for energy saving and consumption reduction of blowers in wastewater treatment plants based on machine learning, characterized in that: include, A hybrid mechanism model is established and continuously coupled and calibrated with real-time data streams to obtain a dynamically updated multidimensional digital twin. Virtual sensor values ​​and predicted values ​​are calculated through the digital twin to generate a comprehensive digital twin data package. The integrated digital twin data package is input into a pre-trained attention encoder-decoder decision model, and the optimal control candidate set is obtained through parallel decoding, physical conservation error regularization constraint and non-dominated sorting. The optimal candidate set is input into the fully automated decision-making process to conduct a hard constraint safety risk assessment, and the control parameter scheme with the best comprehensive score is automatically selected according to the preset multi-objective optimization weight strategy. The system executes the optimal control parameter scheme and compares the actual operating data with the predicted value in real time. When the deviation between the actual value and the predicted value exceeds the deviation threshold, the system automatically uses the actual operating data to perform online incremental fine-tuning and updates to the decision model.

2. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The establishment of the hybrid mechanism model specifically involves: Obtain the physical parameters of the wastewater treatment plant, load the blower affinity equation, and establish the air volume-pressure-power mapping relationship; By simplifying the ASM1 model to retain the core kinetic equations of the nitrification process and coupling them with the air volume-pressure-power mapping relationship, a mixed mechanism model is formed.

3. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The step of calculating virtual sensor values ​​and predicted values ​​using the digital twin to generate a comprehensive digital twin data package specifically involves: The digital twin uses a rolling forward simulation model of its internal mixing mechanism to generate predicted values ​​for dissolved oxygen and effluent ammonia nitrogen. The digital twin calculates the current dynamic ratio of oxygen transfer efficiency in real time, which is used as a virtual sensor value for oxygen transfer efficiency, and calculates the current nitration reaction rate in real time, which is used as a virtual sensor value for nitration rate. The status parameters of the blower are collected in real time and integrated with the predicted values, virtual sensor values ​​of oxygen transfer efficiency and virtual sensor values ​​of nitrification rate to generate a comprehensive digital twin data package.

4. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The pre-training process of the attention encoder-decoder decision model is as follows: Collect historical integrated digital twin data packages and corresponding actual control parameters from multiple wastewater treatment plants to construct a training sample set; The training sample set is input into the attention encoder for multi-head self-attention encoding to obtain a high-dimensional feature representation, and the high-dimensional feature representation is fed into the decoder to generate multiple candidate control sequences in parallel. Each time a candidate sequence is generated, it is input in real time into the hybrid mechanism model frozen before the start of pre-training, the mass conservation and energy conservation errors are calculated, and the conservation errors are added as physical consistency regularization terms to the total loss function for backpropagation optimization. An attention encoder is used to perform multi-head self-attention encoding on the integrated digital twin data package to extract the long-term and short-term dependencies between water load, virtual sensor values ​​and control parameters; Repeat the iteration until all candidate sequences satisfy physical conservation and form a Pareto distribution in the multi-objective space, thus completing the training of the attention encoder-decoder decision model.

5. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The process of obtaining the optimal control candidate set through parallel decoding, physical conservation error regularization constraints, and non-dominated sorting refers to the decoder outputting multiple candidate control parameter sequences in parallel at one time, simulating all candidate sequences using a hybrid mechanism model, calculating their respective energy consumption, effluent ammonia nitrogen risk, and action frequency, and retaining the first-level solution as the optimal control candidate set using non-dominated sorting.

6. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The hard constraint security risk assessment is specifically as follows: Forward simulation is performed on the hybrid mechanism model of the input freezing parameters for each candidate control parameter sequence in the optimal control candidate set to predict the effluent ammonia nitrogen concentration curve in future periods; The probability that the effluent ammonia nitrogen concentration curve exceeds the effluent water quality standard limit is used as the risk of exceeding the standard. The effluent water quality standard limit is determined by the standard implemented by the wastewater treatment plant. For each candidate in the optimal control candidate set, the surge margin is calculated in real time, and only candidates that simultaneously meet the surge margin and the effluent water quality standard limit are retained.

7. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1 or 6, characterized in that: The method of automatically selecting the control parameter scheme with the optimal comprehensive score according to the preset multi-objective optimization weight strategy is as follows: For candidates that pass the hard constraint safety risk assessment, a comprehensive score is calculated by weighting energy consumption, water quality risk, and frequency of actions. The scheme with the lowest overall score is selected as the optimal control parameter scheme.

8. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The real-time comparison of actual operating data with the predicted value specifically includes: Real-time calculation of the deviation between actual and predicted values ​​of dissolved oxygen, air pressure, and effluent ammonia nitrogen; When the deviation continuously exceeds the set deviation threshold, online incremental fine-tuning is triggered.

9. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 1, characterized in that: The automatic online incremental fine-tuning and updating of the decision model using actual operational data specifically involves: Freeze the encoder and physical constraint layer, and only unfreeze the back network of the decoder; Using the latest actual operating data as a small batch of samples, the AdamW optimizer is used to fine-tune the back network of the decoder. After fine-tuning, the current decision model is directly replaced.

10. The energy-saving and consumption-reducing method for wastewater treatment plant blowers based on machine learning as described in claim 2, characterized in that: The core kinetic equations of the nitration process are retained by simplifying the ASM1 model, specifically as follows: Obtain all state variables and reaction rate equations related to the nitrification process in the standard ASM1 model, and remove variables and equations that are not related to denitrification, heterotrophic bacteria growth and phosphorus accumulation; By performing piecewise linear equivalent substitution of the Monod switching function in the remaining equations, a simplified nitration kinetic equation is obtained. By coupling the simplified nitration kinetic equation with the oxygen mass transfer equation, the complete core nitration kinetic equation is obtained.

Citation Information

Patent Citations

  • Accurate dissolved oxygen control and regulation method based on big data and evolutionary algorithm

    CN109928493A

  • Aeration air volume coupling control method and device, medium and intelligent aeration system

    CN118343863A

  • Sewage treatment aeration control method and system based on artificial intelligence and mechanism model

    CN118838168A

  • Photovoltaic power station intelligent remote operation and maintenance method and system based on relay protection

    CN120639014A

  • Sewage recovery monitoring method and system based on industrial big data

    CN120831929A