A sewage plant integrated energy system planning method
By constructing a spatiotemporal graph model of a wastewater treatment plant and a spatiotemporal graph neural network for joint prediction, combined with a model prediction and control framework, the problem of dynamic uncertainty in the energy planning of wastewater treatment plants was solved, achieving efficient energy supply and demand scheduling and global optimization, reducing operating costs and optimizing carbon emissions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG YOUCHUANG ENVIRONMENTAL TECH CO LTD
- Filing Date
- 2025-11-24
- Publication Date
- 2026-07-24
Smart Images

Figure CN121543971B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine learning technology, specifically relating to a planning method for an integrated energy system of a wastewater treatment plant. Background Technology
[0002] With the acceleration of urbanization, the efficient planning and operation of energy systems in wastewater treatment plants, as high-energy-consuming infrastructure, are receiving increasing attention. Traditional integrated energy planning for wastewater treatment plants generally relies on historical average data and static load models, lacking the ability to perceive and respond to short-term dynamic changes.
[0003] Such methods typically treat influent flow rate, water quality concentration, and equipment energy consumption as steady-state parameters, ignoring the drastic fluctuations caused by meteorological conditions, residents' work and rest schedules, and emergencies during actual operation. This results in significant deviations in energy supply and demand forecasts, making it difficult to support refined scheduling decisions.
[0004] The core challenge of integrated energy systems for wastewater treatment plants lies in achieving dynamic coordination among treatment process energy consumption, renewable energy output, and external market signals.
[0005] Specifically, the wastewater treatment process itself has strong nonlinear and time-varying characteristics. The energy consumption of its key units, such as booster pump stations, aeration systems, and sludge dewatering equipment, is significantly affected by real-time disturbances in the influent load. At the same time, renewable energy sources such as distributed photovoltaic power generation in the plant area are constrained by weather changes, and the power generation curves exhibit high intermittency and uncertainty. In addition, frequent changes in external economic signals such as time-of-use electricity prices and carbon trading prices further exacerbate the complexity of energy cost optimization.
[0006] Existing planning methods often result in problems such as redundant energy storage configurations, rigid electricity purchase strategies, or insufficient green electricity consumption because they cannot integrate multi-source heterogeneous information for forward-looking predictions.
[0007] Existing technologies have significant limitations in addressing the above problems: on the one hand, traditional prediction models based on statistical regression or simple time series are difficult to capture the complex spatiotemporal coupling relationships in wastewater systems, especially unable to identify the energy consumption transmission effects between different process units; on the other hand, although some studies have attempted to introduce machine learning methods, they generally neglect the deep integration of external environmental variables and internal operating states, and lack an adaptive focusing mechanism for key historical periods and core energy-consuming nodes.
[0008] Therefore, achieving high-precision, fine-grained joint prediction of net load and photovoltaic output on a 24-hour timescale has become a pressing technical challenge to improve the economic efficiency and low-carbon level of wastewater treatment plant energy systems. Summary of the Invention
[0009] To address the technical problem that existing technologies for wastewater treatment plant energy planning rely on static models, which cannot cope with the dynamic uncertainties of influent load, renewable energy output, and energy market prices, resulting in high operating costs and low energy utilization efficiency, this invention provides a comprehensive energy system planning method for wastewater treatment plants.
[0010] This invention constructs a spatiotemporal graph model of the energy system of a wastewater treatment plant, utilizes a spatiotemporal graph neural network to perform high-precision joint prediction of influent load, renewable energy output, and energy market prices, and based on the model predictive control framework, with operating costs and carbon emissions as objective functions, performs multi-timescale rolling optimization scheduling under the premise of meeting effluent water quality standards and equipment physical constraints, generating the optimal control sequence for the interaction power of wastewater treatment equipment, energy storage units, and the power grid, thereby achieving dynamic balance of energy supply and demand and global economic optimization.
[0011] This invention provides a method for planning an integrated energy system for a wastewater treatment plant, comprising the following steps: A spatiotemporal graph model of the integrated energy system of a wastewater treatment plant is constructed. The spatiotemporal graph model includes a set of nodes and a set of edges defined according to the process flow and electrical topology of the wastewater treatment plant. The set of nodes includes wastewater treatment unit nodes, energy supply unit nodes, and energy consumption unit nodes. The set of edges represents the physical connection relationship and energy flow relationship between the nodes. Acquire and process multi-source heterogeneous data to form a time-series feature matrix. The multi-source heterogeneous data includes historical influent water quality and quantity data, sewage treatment equipment operation status data, renewable energy power generation data, energy storage unit status data, grid time-of-use electricity price data, and carbon trading market price data. The time-series feature matrix is input into a pre-trained spatiotemporal graph neural network prediction model to perform multivariate, multi-step rolling prediction, generating wastewater inflow load sequence, renewable energy power generation sequence, and energy market price sequence for the future prediction period. Based on the wastewater influent load sequence, renewable energy power generation sequence, and energy market price sequence, a multi-objective optimization scheduling model is constructed with the objectives of minimizing operating costs and minimizing carbon emissions. The multi-objective optimization scheduling model includes wastewater treatment process mechanism constraints, equipment physical operation constraints, energy storage unit state constraints, and grid interaction power constraints. The multi-objective optimization scheduling model is solved by a model predictive control algorithm in a rolling manner. In each scheduling time step, an optimal control sequence covering the entire prediction cycle is generated. The optimal control sequence includes the start-up and shutdown status and operating power of each sewage treatment equipment, the charging and discharging power of the energy storage unit, and the power purchased and sold from the power grid. The control command for the current time step in the optimal control sequence is executed, and sent to the corresponding actuator through the distributed control system. The actual state data of the system operation is obtained as feedback and used to update the initial state of the multi-objective optimization scheduling model in the next scheduling time step.
[0012] As one embodiment of the present invention, the construction of the spatiotemporal diagram model of the integrated energy system of the wastewater treatment plant specifically includes: The wastewater treatment plant's screens, grit chambers, primary sedimentation tanks, biological reactors, secondary sedimentation tanks, and sludge treatment units are defined as wastewater treatment unit nodes; the photovoltaic power generation arrays and biogas generator sets within the plant area are defined as energy supply unit nodes; water pumps, aeration blowers, sludge return pumps, mixers, and lighting systems are defined as energy consumption unit nodes; chemical energy storage battery packs are defined as energy storage unit nodes; and the connection point with the public power grid is defined as a power grid interaction node. Wastewater flow edges are established based on the flow path of wastewater between each treatment unit; sludge flow edges are established based on the transport path of sludge between the thickening, digestion, and dewatering units; and energy flow edges are established based on the plant's power grid topology, from energy supply unit nodes, energy storage unit nodes, and power grid interaction nodes to each energy consumption unit node. Each edge is assigned a weight, which is calculated based on the physical distance between nodes, the resistance of pipes or cables, and the energy or material transmission efficiency statistically based on historical data, forming a weighted adjacency matrix. The weighted adjacency matrix and node features together define the spatial structure of the spatiotemporal graph model.
[0013] As one embodiment of the present invention, the acquisition and processing of multi-source heterogeneous data to form a time-series feature matrix specifically includes: The wastewater treatment plant's monitoring and data acquisition system acquires data on influent flow rate, chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations every 5 minutes; it also acquires data on the operating current, voltage, power factor, and start / stop status of each pump, blower, and agitator. The photovoltaic power station monitoring system acquires photovoltaic array output power, DC voltage, and DC current data at a frequency of once every 5 minutes; the biogas generator set monitoring system acquires biogas production, methane concentration, and generator output power data. The battery management system acquires data on the state of charge, charge / discharge current, terminal voltage, and individual cell temperature of the energy storage battery pack once every 1 minute. The system obtains time-of-use electricity price data for the next 24 hours from the grid operator and real-time carbon trading price data from the carbon emission trading center through the energy management center interface. All collected data are time-stamp aligned, missing values are filled using Lagrange interpolation, and outliers are removed using the three-times-standard-deviation method. The processed data are then normalized to scale them to the 0-1 range, ultimately constructing a multi-dimensional, time-series aligned feature matrix, which serves as the input to the spatiotemporal graph neural network prediction model.
[0014] As one embodiment of the present invention, the spatiotemporal graph neural network prediction model adopts an encoder-decoder architecture, specifically implemented as follows: The encoder consists of alternating stacked spatial graph convolutional layers and temporally gated recurrent unit layers; the spatial graph convolutional layers use the weighted adjacency matrix to aggregate feature information from neighboring nodes to capture the spatial coupling relationship between different units in the system; the temporally gated recurrent unit layers learn the spatially aggregated feature sequence to capture the dynamic law of the evolution of each variable over time. The decoder also consists of spatial graph convolutional layers and time-gated recurrent unit layers. It receives the context vector output by the encoder as the initial state and uses a sequence-to-sequence generation method to autoregressively generate predicted values for the wastewater inflow load, renewable energy power generation, and energy market price at each prediction time step, until a complete sequence covering the entire prediction period is generated. The prediction period is set to 24 hours, and the prediction time resolution is 15 minutes.
[0015] As one embodiment of the present invention, the construction of the multi-objective optimization scheduling model specifically includes: The objective function is defined as the weighted sum of total operating cost and total carbon emissions. The total operating cost includes the cost of purchasing electricity from the grid minus the revenue from selling electricity to the grid and the operation and maintenance costs of the equipment. The total carbon emissions include indirect carbon emissions from purchased electricity and direct carbon emissions from biogas combustion. Carbon emissions are converted into carbon costs by introducing carbon trading prices. The wastewater treatment process mechanism constraint is established based on Activated Sludge Model No. 2, and the dissolved oxygen concentration, nitrate nitrogen concentration, and sludge concentration in the biological reactor are used as state variables to ensure that the chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations of the effluent meet the national Class A discharge standard during the optimized scheduling process. The physical operation constraints of the equipment include the air volume adjustment range constraint of the aeration blower, the water pump flow adjustment range constraint, the minimum start-stop time interval constraint of each piece of equipment, and the power ramp-up rate constraint. The energy storage unit state constraints include upper and lower limits for state of charge, which are set to range from 20% to 90%; upper limit for charge and discharge power; and daily charge and discharge cycle number constraints. The power grid interaction power constraint is the upper limit constraint on transformer capacity agreed upon with the power grid.
[0016] As one embodiment of the present invention, the step of using a model predictive control algorithm to perform rolling solution of the multi-objective optimization scheduling model specifically includes: At the current scheduling time k, using the prediction data for the next N time steps generated by the spatiotemporal graph neural network prediction model, a finite time domain optimization problem starting from time k is constructed. The interior-point method or sequential quadratic programming method is used to solve this finite-time optimization problem, and the optimal control sequence from time k to time k+N-1 is obtained. Only the first control decision in the optimal control sequence, i.e. the control decision at time k, is applied to the actual system; At the next scheduling time k+1, obtain the new actual state measurement values of the system, and use these new measurement values to update the initial conditions of the prediction model and the optimization model; By repeating the above steps of prediction, optimization, and execution, and continuously optimizing forward at each time step, a closed-loop feedback correction for system uncertainties is achieved, ensuring the robustness and actual optimality of the scheduling strategy. The scheduling time step is set to 15 minutes, consistent with the time resolution of the prediction model.
[0017] Furthermore, the method also includes an online model calibration mechanism, specifically: After each scheduling cycle, the root mean square error between the predicted sequence output by the spatiotemporal graph neural network prediction model and the actual collected data sequence is calculated. An error threshold is set, and when the root mean square error of the prediction is higher than the error threshold for three consecutive scheduling cycles, the model retraining procedure is automatically triggered. The model retraining procedure uses the latest accumulated historical data to fine-tune and update the network weight parameters of the spatiotemporal graph neural network prediction model, in order to adapt to the slow changes in the operating conditions of the sewage treatment plant or the external environment, and to ensure the long-term accuracy of the prediction model.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. By constructing a plant-wide spatiotemporal diagram model, this invention can accurately capture the physical and logical coupling relationships between units in the wastewater treatment process and electrical topology, overcoming the limitations of traditional models that treat each subsystem as an independent black box, and improving the accuracy of system state prediction. 2. By using a spatiotemporal graph neural network for joint prediction, multiple uncertainties such as water inflow load, renewable energy output, and energy prices are incorporated into a unified prediction framework, revealing the deep nonlinear spatiotemporal correlations among them. This enables the prediction results to accurately reflect the interconnected impact of external driving factors such as weather changes and user behavior on the entire energy system. 3. The rolling optimization strategy based on model predictive control realizes the transformation of the scheduling mode from passive response to active prediction. By rehearsing and optimizing the system behavior in the future at each decision moment, it can plan the production, storage and consumption of energy in advance, effectively smooth the volatility of renewable energy, and use time-of-use electricity price and carbon price mechanism for arbitrage. Under the premise of ensuring that the water quality meets the standards, it achieves the global optimization of operating costs and carbon emissions. 4. The introduced closed-loop feedback and online model correction mechanism endows the system with the ability to adaptively learn and continuously optimize, enabling it to cope with long-term drift and sudden disturbances in operating conditions, and ensuring the long-term stability and robustness of the planning method in practical engineering applications. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall technical solution architecture of the integrated energy system planning method for wastewater treatment plants proposed in this invention; Figure 2 This is a schematic diagram of the core principle framework of the spatiotemporal graph neural network joint prediction model in this invention; Figure 3 This is a logical flowchart of the multi-source heterogeneous data acquisition and feature matrix construction in this invention; Figure 4 This is a logical flowchart of the construction and constraint system of the multi-objective optimization scheduling model in this invention; Figure 5 This is a logical flowchart of the model predictive control rolling optimization mechanism in this invention. Detailed Implementation
[0020] Please refer to Figures 1 to 5 This invention provides a comprehensive energy system planning method for wastewater treatment plants, aiming to solve the technical problems of high operating costs and low energy utilization efficiency caused by traditional wastewater treatment plant energy planning relying on static models, being unable to cope with fluctuations in influent load, the intermittency of renewable energy, and dynamic changes in energy market prices.
[0021] This method constructs a spatiotemporal graph model of the integrated energy system of a wastewater treatment plant, integrates multi-source heterogeneous data, uses a spatiotemporal graph neural network for high-precision joint prediction, and realizes multi-timescale rolling optimization scheduling based on the model predictive control framework. Under the premise of meeting the effluent water quality standards and equipment physical constraints, it generates the optimal control sequence for the interaction power of wastewater treatment equipment, energy storage units and power grid, thereby achieving dynamic balance of energy supply and demand and global economic optimization.
[0022] The integrated energy system planning method for wastewater treatment plants includes the following steps: S1, Construct a spatiotemporal diagram model of the integrated energy system of the wastewater treatment plant; S2, acquire and process multi-source heterogeneous data to form a time-series feature matrix; S3, input the time series feature matrix into the pre-trained spatiotemporal graph neural network prediction model, perform multivariate, multi-step rolling prediction, and generate the sewage inflow load sequence, renewable energy power generation sequence and energy market price sequence for the future prediction period; S4. Based on the wastewater influent load sequence, renewable energy power generation sequence, and energy market price sequence, construct a multi-objective optimization scheduling model with the objectives of minimizing operating costs and minimizing carbon emissions. S5, The model predictive control algorithm is used to solve the multi-objective optimization scheduling model in a rolling manner, and the optimal control sequence covering the entire prediction cycle is generated in each scheduling time step. S6, execute the control instruction for the current time step in the optimal control sequence, and obtain the actual state data of the system operation as feedback, which is used to update the initial state of the multi-objective optimization scheduling model in the next scheduling time step.
[0023] In step S1, a spatiotemporal graph model of the integrated energy system of the wastewater treatment plant is constructed. This spatiotemporal graph model is jointly defined by a set of nodes and a set of edges, wherein the set of nodes includes wastewater treatment unit nodes, energy supply unit nodes, energy consumption unit nodes, energy storage unit nodes, and grid interaction nodes.
[0024] The wastewater treatment unit nodes include screens, grit chambers, primary sedimentation tanks, biological reactors, secondary sedimentation tanks, and sludge treatment units; the energy supply unit nodes include photovoltaic power generation arrays and biogas generator sets within the plant area; the energy consumption unit nodes include water pumps, aeration blowers, sludge return pumps, mixers, and lighting systems; the energy storage unit nodes are chemical energy storage battery packs; and the power grid interaction node is the connection point with the public power grid.
[0025] The edge set represents the physical connection relationship and energy flow relationship between the above nodes, specifically including sewage flow edge, sludge flow edge and energy flow edge.
[0026] Wastewater flow edges are established based on the flow path of wastewater between each treatment unit; sludge flow edges are established based on the transport path of sludge between the thickening, digestion, and dewatering units; energy flow edges are established based on the plant's power grid topology, pointing from energy supply unit nodes, energy storage unit nodes, and power grid interaction nodes to each energy consumption unit node.
[0027] Each edge is assigned a weight, which is calculated based on the physical distance between nodes, the resistance of pipes or cables, and the energy or material transmission efficiency statistically derived from historical data, ultimately forming a weighted adjacency matrix.
[0028] The weighted adjacency matrix and the feature vectors of each node together form the spatial structural basis of the spatiotemporal graph model, providing a topological basis for the feature propagation and aggregation of the subsequent spatiotemporal graph neural network.
[0029] In step S2, multi-source heterogeneous data is acquired and processed to form a time-series feature matrix. The multi-source heterogeneous data includes historical influent water quality and quantity data, sewage treatment equipment operation status data, renewable energy power generation data, energy storage unit status data, grid time-of-use electricity price data, and carbon trading market price data.
[0030] Specifically, the monitoring and data acquisition system of the wastewater treatment plant acquires data on influent flow rate, chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations at a frequency of once every 5 minutes; at the same time, it acquires data on the operating current, voltage, power factor, and start / stop status of each pump, blower, and agitator.
[0031] The photovoltaic power station monitoring system acquires photovoltaic array output power, DC voltage, and DC current data every 5 minutes; the biogas generator set monitoring system acquires biogas production, methane concentration, and generator output power data. The battery management system acquires energy storage battery pack state of charge, charge / discharge current, terminal voltage, and individual cell temperature data every 1 minute.
[0032] The system obtains time-of-use electricity price data for the next 24 hours from the grid operator and real-time carbon trading price data from the carbon emission trading center through the energy management center interface.
[0033] All collected data are first timestamped to ensure strict synchronization of data from different sources in the time dimension. Then, Lagrange interpolation is used to fill in missing values to ensure the continuity of the data sequence. Next, outliers are identified and removed using the three-standard-deviation method to eliminate noise introduced by sensor failures or communication interference. Finally, the processed data is normalized to scale it to the 0-1 range, constructing a multi-dimensional, time-series aligned feature matrix.
[0034] Each row of this feature matrix corresponds to one time step, and each column corresponds to one feature dimension. The number of dimensions is equal to the sum of the feature dimensions of all nodes, and it serves as the input to the spatiotemporal graph neural network prediction model.
[0035] In step S3, the temporal feature matrix is input into a pre-trained spatiotemporal graph neural network prediction model for multivariate, multi-step rolling prediction. The spatiotemporal graph neural network prediction model adopts an encoder-decoder architecture. The encoder consists of alternating stacked spatial graph convolutional layers and temporally gated recurrent unit layers.
[0036] The spatial graph convolutional layer uses the weighted adjacency matrix constructed in step S1 to perform neighborhood aggregation on the feature vector of each node, as expressed by the formula: ; Indicates the first The node feature matrix of the layer This is the normalized weighted adjacency matrix. The weight matrix is a learnable matrix. This is the activation function.
[0037] This operation effectively captures the spatial coupling relationships between different units in the system. The time-gated recurrent unit layer receives the spatially aggregated feature sequence, learns the dynamic laws of the evolution of each variable over time through the gating mechanism, suppresses the gradient vanishing problem, and enhances the ability to model long-term dependencies.
[0038] The encoder ultimately outputs a context vector, which encodes the spatiotemporal semantic information of the input sequence.
[0039] The decoder also consists of spatial graph convolutional layers and temporally gated recurrent unit layers. Using the context vector as the initial hidden state, it adopts a sequence-to-sequence autoregressive generation method to generate predicted values of sewage inflow load, renewable energy power generation, and energy market price for the next time step at each prediction time step.
[0040] The prediction period was set to 24 hours, and the prediction time resolution was 15 minutes, thus generating a total of 96 prediction sequences with different time steps. These prediction sequences served as the input boundary conditions for subsequent optimization scheduling.
[0041] In step S4, based on the predicted sequence generated in step S3, a multi-objective optimization scheduling model is constructed with the objectives of minimizing operating costs and carbon emissions. The objective function is defined as the weighted sum of total operating costs and total carbon emissions, i.e.: ; This is a weighting coefficient, ranging from 0 to 1, used to adjust the priority between economic efficiency and environmental friendliness. Total operating cost. This includes the cost of purchasing electricity from the grid minus the revenue from selling electricity to the grid, as well as the operating and maintenance costs of the equipment. The calculation formula is as follows: ; and They are respectively The power purchased and the power sold at any given time. for Time-of-use electricity pricing at any given moment The unit operating and maintenance cost of device i, Its operational status. Total carbon emissions. This includes indirect carbon emissions from purchased electricity and direct carbon emissions from biogas combustion, and is priced through carbon trading. Converted to carbon cost: ; and These are the carbon emission factors for grid power and biogas power generation, respectively.
[0042] This multi-objective optimization scheduling model includes four types of constraints: wastewater treatment process mechanism constraints, equipment physical operation constraints, energy storage unit state constraints, and power grid interaction constraints.
[0043] The wastewater treatment process mechanism constraints are established based on Activated Sludge Model No. 2. The dissolved oxygen concentration, nitrate nitrogen concentration, and sludge concentration in the biological reactor are used as state variables, and their dynamic changes are described by differential equations. This ensures that during the optimized scheduling process, the chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations of the effluent meet the national Class A discharge standard.
[0044] The physical operating constraints of the equipment include the air volume adjustment range constraints of the aeration blower, the water pump flow adjustment range constraints, the minimum start-stop time interval constraints of each piece of equipment, and the power ramp-up rate constraints, to prevent the equipment from frequently starting and stopping or operating under overload.
[0045] Energy storage unit state constraints include upper and lower limits for state of charge (set to 20% to 90%), upper limits for charge and discharge power, and limits for the number of charge and discharge cycles per day, to ensure battery life and safety.
[0046] The power grid interaction constraint is the upper limit constraint on transformer capacity agreed upon with the power grid to avoid overload.
[0047] In step S5, a model predictive control algorithm is used to solve the multi-objective optimization scheduling model in a rolling manner. At the current scheduling time k, using the predicted data for the next N time steps (N=96) generated in step S3, a finite-time domain optimization problem starting at time k is constructed. The objective function and constraints of this optimization problem are as described in step S4.
[0048] The interior-point method is used to solve this finite-time optimization problem, and the optimal control sequence from time k to time k+N-1 is obtained. This sequence includes the start-up and shutdown status and operating power of each sewage treatment device, the charging and discharging power of the energy storage unit, and the power purchased and sold from the power grid.
[0049] Only the first control decision in the optimal control sequence, i.e., the control decision at time k, is applied to the actual system. The scheduling time step is set to 15 minutes to maintain consistency with the time resolution of the prediction model.
[0050] In step S6, the control command for the current time step in the optimal control sequence is executed. The control system distributes the equipment operating power, energy storage charging and discharging command, and grid interaction power command at time k to the corresponding actuators, including frequency converters, relays, energy storage converters, and grid interface tables, through the distributed control system.
[0051] Simultaneously, the system collects real-time operational status data from each unit, including influent water quality and quantity, equipment power, energy storage state of charge, and actual purchased and sold electricity, as feedback signals. At the next scheduling time k+1, these new actual measurements are used to update the initial input state of the spatiotemporal graph neural network prediction model, and steps S3 to S6 are re-executed, forming a closed-loop feedback correction mechanism.
[0052] This mechanism effectively compensates for prediction errors and external disturbances, ensuring the robustness and actual optimality of the scheduling strategy.
[0053] Furthermore, the method also includes an online model calibration mechanism.
[0054] After each scheduling cycle, the root mean square error between the predicted sequence output by the spatiotemporal graph neural network prediction model and the actual collected data sequence is calculated. An error threshold is set, for example, 5%.
[0055] When the root mean square error of prediction exceeds the error threshold for three consecutive scheduling cycles, the model retraining procedure is automatically triggered.
[0056] The program uses the latest accumulated historical data to fine-tune and update the network weight parameters of the spatiotemporal graph neural network prediction model. It employs mini-batch stochastic gradient descent for backpropagation, with a learning rate set to 0.001 and 50 iterations.
[0057] This mechanism enables the model to adapt to slow changes in the operating conditions of wastewater treatment plants or the external environment, such as seasonal changes in influent load patterns or decreased power generation efficiency due to aging of photovoltaic panels, ensuring the long-term accuracy and generalization ability of the prediction model.
[0058] The overall technical solution of the wastewater treatment plant integrated energy system planning method accurately depicts the internal coupling relationship of the system through a spatiotemporal graph model, realizes multi-variable joint prediction through a spatiotemporal graph neural network, achieves rolling optimization scheduling through model predictive control, and ensures long-term stability through a closed-loop feedback and online correction mechanism.
[0059] This method reduces operating costs and carbon emissions while ensuring that the effluent quality meets standards, and improves the renewable energy absorption rate and energy utilization efficiency, thus realizing the transformation of sewage treatment plants from major energy consumers to energy plants.
[0060] The system portion serves as the supporting carrier for the method, including a data acquisition layer, an edge computing layer, a cloud decision-making layer, and an execution control layer.
[0061] The data acquisition layer consists of sensors and smart meters deployed in various process units and energy equipment, and is responsible for high-frequency acquisition of raw data.
[0062] The edge computing layer is deployed on local servers in the factory area. It is responsible for data preprocessing, timestamp alignment, outlier removal and preliminary normalization, and caches short-term historical data for rapid local response.
[0063] The cloud-based decision-making layer is deployed in a remote data center, carrying out the complete computational tasks of the spatiotemporal graph neural network prediction model and the multi-objective optimization scheduling model, and has powerful parallel computing and storage capabilities.
[0064] The execution control layer consists of a distributed control system that receives control commands from the cloud, drives actuators such as frequency converters, contactors, and energy storage converters, and feeds back the equipment status to the data acquisition layer in real time.
[0065] High-reliability, low-latency communication is achieved between different layers via industrial Ethernet or 5G private networks to ensure timely issuance of control commands and accurate feedback of status.
[0066] The system architecture supports modular expansion and can flexibly configure computing resources and communication bandwidth according to the scale of the wastewater treatment plant to meet the needs of different application scenarios.
[0067] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0068] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A planning method for an integrated energy system of a wastewater treatment plant, characterized in that, include: Construct a spatiotemporal diagram model of the integrated energy system of the wastewater treatment plant; Acquire and process multi-source heterogeneous data to form a time-series feature matrix. The multi-source heterogeneous data includes historical influent water quality and quantity data, sewage treatment equipment operation status data, renewable energy power generation data, energy storage unit status data, grid time-of-use electricity price data, and carbon trading market price data. The time-series feature matrix is input into a pre-trained spatiotemporal graph neural network prediction model to perform multivariate, multi-step rolling prediction, generating wastewater inflow load sequence, renewable energy power generation sequence, and energy market price sequence for the future prediction period. Based on the wastewater influent load sequence, renewable energy power generation sequence, and energy market price sequence, a multi-objective optimization scheduling model is constructed with the objectives of minimizing operating costs and minimizing carbon emissions. The multi-objective optimization scheduling model includes wastewater treatment process mechanism constraints, equipment physical operation constraints, energy storage unit state constraints, and grid interaction power constraints. The multi-objective optimization scheduling model is solved by a model predictive control algorithm in a rolling manner. In each scheduling time step, an optimal control sequence covering the entire prediction cycle is generated. The optimal control sequence includes the start-up and shutdown status and operating power of each sewage treatment equipment, the charging and discharging power of the energy storage unit, and the power purchased and sold from the power grid. The control command for the current time step in the optimal control sequence is executed, and sent to the corresponding actuator through the distributed control system. The actual state data of the system operation is obtained as feedback and used to update the initial state of the multi-objective optimization scheduling model in the next scheduling time step. The spatiotemporal graph model includes a set of nodes and a set of edges defined according to the wastewater treatment plant's process flow and electrical topology. The set of nodes includes wastewater treatment unit nodes, energy supply unit nodes, energy consumption unit nodes, energy storage unit nodes, and grid interaction nodes. The set of edges represents the physical connection relationships and energy flow relationships between the nodes. Construct a multi-objective optimization scheduling model with the goals of minimizing operating costs and carbon emissions, including: The objective function is defined as the weighted sum of total operating cost and total carbon emissions. The total operating cost includes the cost of purchasing electricity from the grid minus the revenue from selling electricity to the grid and the operation and maintenance costs of the equipment. The total carbon emissions include indirect carbon emissions from purchased electricity and direct carbon emissions from biogas combustion. Carbon emissions are converted into carbon costs by introducing carbon trading prices. The wastewater treatment process mechanism constraint is established based on Activated Sludge Model No. 2, and the dissolved oxygen concentration, nitrate nitrogen concentration, and sludge concentration in the biological reactor are used as state variables to ensure that the chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentrations of the effluent meet the national Class A discharge standard during the optimized scheduling process. The physical operation constraints of the equipment include the air volume adjustment range constraint of the aeration blower, the water pump flow adjustment range constraint, the minimum start-stop time interval constraint of each piece of equipment, and the power ramp-up rate constraint. The energy storage unit state constraints include upper and lower limits for state of charge; upper limit for charge and discharge power; and daily charge and discharge cycle count constraints. The power grid interaction power constraint is the upper limit constraint on transformer capacity agreed upon with the power grid.
2. The wastewater treatment plant integrated energy system planning method according to claim 1, characterized in that, Constructing a spatiotemporal diagram model of the integrated energy system of a wastewater treatment plant, including: The wastewater treatment plant's screens, grit chambers, primary sedimentation tanks, biological reactors, secondary sedimentation tanks, and sludge treatment units are defined as wastewater treatment unit nodes; the photovoltaic power generation arrays and biogas generator sets within the plant area are defined as energy supply unit nodes; water pumps, aeration blowers, sludge return pumps, mixers, and lighting systems are defined as energy consumption unit nodes; chemical energy storage battery packs are defined as energy storage unit nodes; and the connection point with the public power grid is defined as a power grid interaction node. Wastewater flow edges are established based on the flow path of wastewater between each treatment unit; sludge flow edges are established based on the transport path of sludge between the thickening, digestion, and dewatering units; and energy flow edges are established based on the plant's power grid topology, from energy supply unit nodes, energy storage unit nodes, and power grid interaction nodes to each energy consumption unit node. Each edge is assigned a weight, which is calculated based on the physical distance between nodes, the resistance of pipes or cables, and the energy or material transmission efficiency statistically based on historical data, forming a weighted adjacency matrix. The weighted adjacency matrix and node features together define the spatial structure of the spatiotemporal graph model.
3. The integrated energy system planning method for wastewater treatment plants according to claim 1, characterized in that, Acquire and process multi-source heterogeneous data to form a time-series feature matrix, including: The wastewater treatment plant's monitoring and data acquisition system obtains data on influent flow rate, chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus concentration; it also obtains data on the operating current, voltage, power factor, and start / stop status of each pump, blower, and agitator. The photovoltaic power station monitoring system acquires data on photovoltaic array output power, DC voltage, and DC current; the biogas generator set monitoring system acquires data on biogas production, methane concentration, and generator output power. The battery management system acquires data on the state of charge, charging and discharging current, terminal voltage, and individual cell temperature of the energy storage battery pack. Access future time-of-use electricity price data released by grid operators and real-time carbon trading price data released by the carbon emission trading center through the energy management center interface; All collected data undergoes timestamp alignment, missing value imputation based on Lagrange interpolation, and outlier removal based on three-times-standard-deviation. The processed data is then normalized to scale it to the 0-1 range, ultimately constructing a multi-dimensional, time-series-aligned feature matrix, which serves as the input to the spatiotemporal graph neural network prediction model.
4. The integrated energy system planning method for wastewater treatment plants according to claim 1, characterized in that, The temporal feature matrix is input into a pre-trained spatiotemporal graph neural network prediction model to perform multivariate, multi-step rolling prediction, including: The spatiotemporal graph neural network prediction model adopts an encoder-decoder architecture; The encoder consists of alternating stacked spatial graph convolutional layers and temporally gated recurrent unit layers. The spatial graph convolutional layers use a weighted adjacency matrix to aggregate feature information from neighboring nodes to capture the spatial coupling relationship between different units in the system. The temporally gated recurrent unit layers learn the spatially aggregated feature sequence to capture the dynamic law of the evolution of each variable over time. The decoder also consists of spatial graph convolutional layers and time-gated recurrent unit layers. It receives the context vector output by the encoder as the initial state and adopts a sequence-to-sequence autoregressive generation method. At each prediction time step, it autoregressively generates the predicted values of sewage influent load, renewable energy power generation, and energy market price for the next moment until a complete sequence covering the entire prediction period is generated.
5. The integrated energy system planning method for wastewater treatment plants according to claim 1, characterized in that, The multi-objective optimization scheduling model is solved using a model predictive control algorithm in a rolling manner, including: At the current scheduling time k, using the prediction data for the next N time steps generated by the spatiotemporal graph neural network prediction model, a finite time domain optimization problem is constructed starting from time k. The interior-point method or sequential quadratic programming method is used to solve this finite-time optimization problem, and the optimal control sequence from time k to time k+N-1 is obtained. Only the first control decision in the optimal control sequence, i.e. the control decision at time k, is applied to the actual system; At the next scheduling time k+1, obtain the new actual state measurement values of the system, and use these new measurement values to update the initial conditions of the prediction model and the optimization model; By repeating the above steps of prediction, optimization, and execution, and continuously optimizing towards the future at each time step, a closed-loop feedback correction of system uncertainties is achieved, ensuring the robustness and actual optimality of the scheduling strategy.
6. The wastewater treatment plant integrated energy system planning method according to claim 4, characterized in that, The time-gated recurrent unit layer learns the spatially aggregated feature sequence, including: By using update gates and reset gates to control the forgetting of historical information and the fusion of new information, long-term time dependencies can be modeled and gradient vanishing can be suppressed.
7. The wastewater treatment plant integrated energy system planning method according to claim 4, characterized in that, The decoder employs a sequence-to-sequence autoregressive generation method, including: At each prediction time step t, the prediction output of the previous time step is used as the input of the current time step. Combined with the context vector and the current hidden state, the multivariate prediction value of the current time step is generated.
8. The integrated energy system planning method for wastewater treatment plants according to claim 1, characterized in that, The wastewater treatment plant integrated energy system planning method also includes an online model calibration mechanism, including: After each scheduling cycle, the root mean square error between the predicted sequence output by the spatiotemporal graph neural network prediction model and the actual collected data sequence is calculated. An error threshold is set, and when the root mean square error of the prediction is higher than the error threshold for three consecutive scheduling cycles, the model retraining procedure is automatically triggered. The model retraining procedure uses the latest accumulated historical data to fine-tune and update the network weight parameters of the spatiotemporal graph neural network prediction model, in order to adapt to the slow changes in the operating conditions of the sewage treatment plant or the external environment, and to ensure the long-term accuracy of the prediction model.