Next Article in Journal
Research on Carbon Dioxide Pipeline Leakage Localization Based on Gaussian Plume Model
Previous Article in Journal
Study on Rapid Screening Method for Different Chemical Flooding Methods in Heavy-Oil Reservoirs
Previous Article in Special Issue
A Study on the Key Factors Influencing Power Grid Outage Restoration Times: A Case Study of the Jiexi Area
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A GAN-and-Transformer-Assisted Scheduling Approach for Hydrogen-Based Multi-Energy Microgrid

1
State Grid Hebei Electric Power Co., Ltd., Shijiazhuang 050023, China
2
College of Automation Science and Engineering, Xi’an Jiaotong University, Xi’an 710049, China
*
Author to whom correspondence should be addressed.
Processes 2025, 13(9), 2993; https://doi.org/10.3390/pr13092993
Submission received: 11 August 2025 / Revised: 14 September 2025 / Accepted: 17 September 2025 / Published: 19 September 2025

Abstract

Against the backdrop of ever-increasing energy demand and growing awareness of environmental protection, the research and optimization of hydrogen-related multi-energy systems have become a key and hot issue due to their zero-carbon and clean characteristics. In the scheduling of such multi-energy systems, a typical problem is how to describe and deal with the uncertainties of multiple types of energy. Scenario-based methods and robust optimization methods are the two most widely used methods. The first one combines probability to describe uncertainties with typical scenarios, and the second one essentially selects the worst scenario in the uncertainty set to characterize uncertainties. The selection of these scenarios is essentially a trade-off between the economy and robustness of the solution. In this paper, to achieve a better balance between economy and robustness while avoiding the complex min-max structure in robust optimization, we leverage artificial intelligence (AI) technology to generate enough scenarios, from which economic scenarios and feasible scenarios are screened out. While applying a simple single-layer framework of scenario-based methods, it also achieves both economy and robustness. Specifically, first, a Transformer architecture is used to predict uncertainty realizations. Then, a Generative Adversarial Network (GAN) is employed to generate enough uncertainty scenarios satisfying the actual operation. Finally, based on the forecast data, the economic scenarios and feasible scenarios are sequentially screened out from the large number of generated scenarios, and a balance between economy and robustness is maintained. On this basis, a multi-energy collaborative optimization method is proposed for a hydrogen-based multi-energy microgrid with consideration of the coupling relationships between energy sources. The effectiveness of this method has been fully verified through numerical experiments. Data show that on the premise of ensuring scheduling feasibility, the economic cost of the proposed method is 0.67% higher than that of the method considering only economic scenarios. It not only has a certain degree of robustness but also possesses good economic performance.

1. Introduction

In recent years, global energy consumption has continued to increase, and environmental degradation has become increasingly serious. The use of traditional energy is subject to the dual limitations of its resource reserves and environmental protection. To this end, clean renewable energy, such as wind power, photovoltaics, and hydrogen energy, has developed rapidly. Implementing renewable energy and collaborative optimization of a hydrogen-based multi-energy microgrid (HMEMG) can enhance energy structure optimization, diminish reliance on fossil fuels, and lower carbon emissions [1,2], thereby fostering sustainable development of the environment. This article revolves around this core issue and explores the use of AI technology to achieve dual guarantees for the feasibility and economy of scheduling decisions.
As the specific application platform integrating electric energy storage, cold energy storage, thermal energy storage, hydrogen energy, and renewable energy, HMEMG not only realizes the joint supply of electric energy, heat energy, and cooling energy at the terminal, which simultaneously boosts energy utilization, but also enables highly efficient conversion with remarkable conservation outcomes. However, the uncertainties of renewable energy and various energy loads [3,4], and the coupling relationship between multiple energy sources, increase the complexity of optimal scheduling problems.
As a typical solution to address uncertainties, robust optimization seeks to identify solutions that remain feasible for all potential realizations of uncertainties within a predefined uncertainty set. In their work, Reference [5] put forward a two-stage stochastic robust optimization model for multi-energy microgrids, taking into account the grid structures of both power grids and heat networks, with the goal of optimizing and minimizing costs under the worst-case scenario of wind power output. Reference [6] adopted a robust optimization approach to handle the uncertainty in renewable energy output, and in the first stage of the two-stage RO, a two-tier game model was designed. Reference [7] developed a two-stage RO model based on expected scenarios, which considers the impact of uncertainties in wind power and photovoltaic output on microgrid operation and takes the optimal operation cost of the expected scenario as the objective function. Reference [8] proposed a distributed robust model predictive control-based energy management strategy for islanded multi-microgrids. Reference [9] proposed a novel cumulative relative regret decision-making strategy for the optimal energy management on a grid-connected multi-energy microgrid considering these uncertainties, which can ensure the robustness of the microgrid and reduce the conservatism of microgrid operation as compared with the traditional robust optimization method. Reference [10] developed a robust optimization model of a microgrid considering uncertainty to take into account the economy and robustness of microgrid operation. Although overemphasizing the worst-case scenarios of uncertain information can ensure the feasibility of scheduling and the safety of the system, it comes at the cost of significantly sacrificing the economic efficiency of scheduling.
Another common and effective method to cope with the uncertainty of renewable energy is the scenario-based method [11]. There are many studies using scenario sets and historical data to deal with uncertainties in multi-energy microgrid systems. However, traditional methods for obtaining scenario sets have numerous limitations. For example, traditional methods typically rely on predefined probability distributions to model the uncertainty of renewable energy. And some traditional methods (such as Monte Carlo simulation and Latin hypercube sampling) often need to generate massive samples to ensure the diversity of scenarios when generating high-dimensional scenarios, leading to a surge in computational costs. But with the development of artificial intelligence technology, these issues have been solved to a certain extent. Reference [12] proposed a method that can effectively achieve controllable generation of renewable energy scenarios. This method can generate scenarios with specific statistical characteristics and new patterns, but its performance is limited by the diversity of historical training sample patterns and may not work well in extreme weather conditions and other situations. Reference [13] proposed a short-term joint wind power scenario generation method suitable for multiple wind farms. It can generate higher-quality scenarios, perform better in terms of scenario quantity control, generation speed, and cost-risk balance, and apply to intraday or step-ahead scenario generation. However, this method cannot be used for photovoltaic power scenario generation.
Recently, machine learning or deep learning algorithms including autoregressive moving average [14], long short-term memory (LSTM) [15] focus on temporal modeling with complexity related to sequence length; difficulty in capturing cross-dependencies among multiple variables and potential oversight of key associations; limited capability in considering meteorological data, as although it emphasizes temporality, it is insufficient in capturing complex associations between meteorological and other variables; variational autoencoder (VAE) [16] has high computational efficiency and requires optimization of the evidence lower bound through complex variational inference. Although it can perform probabilistic modeling, its ability to capture complex dependencies is weaker than that of GAN. It can take meteorological data into account, but its capability to model complex associations is limited; normalizing flows (NF) [17] features high computational efficiency but requires strictly reversible designed structures, increasing both design and computational complexity and leading to limited ability in capturing complex dependencies. It can take meteorological data into account, yet its applicability is relatively low due to structural constraints; the generative adversarial network (GAN) [18] has moderate computational efficiency, can capture complex dependencies among multiple variables, ensures that generated scenarios contain key associations, and is suitable for scenarios requiring complex association modeling, such as those involving meteorological data. Table 1 summarizes the performance of these models in terms of computational complexity, accuracy, and whether they can take meteorological data into account.
Reference [19] used a data-and-model-driven acceleration approach to accelerate the scheduling calculation with uncertainties. Reference [20] proposed an unsupervised deep learning method for scenario prediction, which can be applied to various power system operation scenarios. It generated a set of scenarios representing possible future behaviors based solely on historical observations and point predictions. Reference [21] proposed a distribution-free wind power scenario generation method. The model adopts an LSTM architecture. The generator uses LSTM to capture the time series correlation and generate wind power scenarios. Reference [22] proposed a multi-objective wind power scenario prediction method based on Progressive Generative Adversarial Networks (PG-GAN) to address the challenges brought by the intermittency and volatility of wind power to day-ahead scheduling. Reference [23] employed a clustering method to balance scenario insufficiency and computational complexity.
Although previous studies have achieved promising results in addressing the difficulties brought by the uncertainty of renewable energy to the scheduling of multi-energy power systems, they have failed to perform scenario reduction and balance economic scenarios with feasible scenarios. Therefore, this paper focuses on balancing the economic and feasible scenarios and proposes a GAN-and-Transformer-assisted approach to generate and select economic and feasible scenarios. The main contributions are summarized as follows.
(1)
A scenario-based scheduling model for HMEMG is established with a balancing solution economy and feasibility, in which renewables, various loads, and other equipment are all formulated.
(2)
A GAN-based scenario generation and Transformer-assisted selection approach is proposed to obtain several economic scenarios and feasible scenarios, and avoid computational complexity caused by too many scenarios. Specifically, a C-StyleGAN2-SE model is employed to generate sufficient scenarios, and then, a Transformer architecture is applied to screen out a small number of feasible and economic scenarios.
The rest of this paper is organized as follows. The establishment of a scheduling model for HMEMG is presented in Section 2. The generation of scenarios, as well as the screening of economic scenarios and feasibility scenarios, are shown in detail in Section 3. Numerical results are analyzed in Section 4, and Section 5 concludes the paper.

2. Basic Scheduling Model of Hydrogen-Based Multi-Energy Microgrids

2.1. Hydrogen-Based Multi-Energy Microgrid Structure

As illustrated in Figure 1, the system consists of photovoltaic systems, wind turbines, hydrogen fuel cells, electric heaters, electric-driven chillers, as well as electrical/thermal/cooling storage units. It enables bidirectional interaction with electrical/thermal/cooling loads and the main power grid. Hydrogen is purchased from the market in canned form and directly supplied to fuel cells, with no hydrogen storage facilities installed. On the electrical side, the electricity generated by renewable energy and hydrogen fuel cells is integrated into the electrical bus, which is used to meet electrical loads, drive electric heaters and chillers, charge electrical storage units, and facilitate electricity purchasing from and selling to the main grid through grid-connected power. The thermal side is supplied by the heat generated by hydrogen fuel cells and electric heaters, with surplus heat transferred to thermal storage. On the cooling side, chillers convert electrical energy into cooling capacity, and excess cooling capacity is transferred to cooling storage. Figure 1 uses colors and arrows to identify energy carriers and their flow directions. For the scheduling optimization of this multi-energy microgrid, five uncertain factors are identified, namely wind power output, photovoltaic generation, electrical load, heating load, and cooling load.

2.2. Uncertainty of Characterization Multiple-Type Energy

This paper uses x t to describe various uncertainties, which is shown in Formulation (1). x t r e a l is the realized value of all uncertain factors in period t, and its value is a random value. The x [ t ] represents the actual realized values of all uncertainties until period t, as shown in Equation (2).
x t = d t , d t h , d t c , P t w , P t p v T
x [ t ] = x 1 r e a l , x 2 r e a l , , x t r e a l
As shown in Formula (2), the decision at time period t is essentially only related to the uncertainty realization value up to period t, but the decision at period t will affect the response ability against uncertainties in subsequent time periods. To this end, this paper applies the AI-relevant technologies to generate enough scenarios to describe the uncertainties by meteorological data and historical data of uncertainty and meteorological data, and screen out economic and feasible scenarios in order to achieve economic and security responses to future uncertainties. And the details will be shown in Section 3. The specific implementation method of scenario generation is detailed in Section 3. For the sake of brevity, Formulation (3) is used to describe the generated scenarios.
G s = x 1 , x 2 , , x T , s S

2.3. Operation Model of Hydrogen-Based Multi-Energy Microgrids

2.3.1. Hydrogen

In this paper, the hydrogen consumption H s , t is required to stay within the upper and lower bounds specified in Equation (4). The relationship between the electricity P s , t H Y and thermal energy H s , t H Y generated from hydrogen H s , t is expressed by Equations (5) and (6).
H _ H s , t H ¯ ; s S , t T
P s , t H Y = K P H s , t , s S , t T
H s , t H Y = K H H s , t , s S , t T

2.3.2. Heating

The electric heating included in the HMEMG can generate heat independently. The heating power of the electric heating in the multi-energy storage microgrid system can be expressed by Equation (7), where the heating generated by the electric heating and the electric power consumed P s , t c F C are linearly affected by the coefficient K F h .
H s , t F C ( x [ t ] ) = K F h P s , t h F C ( x [ t ] ) ; s S , t T
The heat storage capacity integrated into the system can mitigate the uncertainty of heating loads to a certain degree, as depicted in Equation (8). This heat storage is influenced by the initial stored heat and heating power H s , t S T , and it must operate within the specified upper and lower limits of heat storage capacity. As outlined in Equation (9), the heat storage is subject to these bound constraints.
E _ H T E 0 H T t = 1 t H s , t S T ( x [ t ] ) τ E ¯ H T ; s S , t T
H _ S T H s , t S T ( x [ t ] ) H ¯ S T ; s S , t T
As specified in Equation (10), the system must satisfy the heat balance constraint. To meet the heating load demand within the system, the heating load must equal the sum of the heat generated by the electric heater and hydrogen fuel cell and the heat exchanged with the heat storage system.
H s , t F C ( x [ t ] ) + H s , t S T ( x [ t ] ) + H s , t H Y ( x [ t ] ) = d s , t h ; s S , t T
Finally, to achieve sustainable scheduling, which means to ensure that after the scheduling within a cycle T is completed, the energy storage devices in the microgrid system can meet the requirements for optimal decision-making in the scheduling of the next cycle. As shown in Equation (11), the heating energy storage at the final moment needs to be equal to the heating energy storage at the initial moment.
E 0 H T = E T H T

2.3.3. Cooling

In the HMEMG, the cooling power of the chiller can be expressed by Equation (12). Herein, the cooling capacity generated by the chiller and the electric power it consumes are linearly related through the coefficient K F q .
C s , t C O ( x t ) = K F q P s , t c F C ( x t ) ; s S , t T
Similar to heat storage, the cold storage integrated into the system can mitigate the uncertainty of cooling loads to some extent, as described in Equation (13). This cold storage is influenced by the initial stored cold energy and cooling power C s , t S T , and it must operate within the upper and lower limits of cold storage capacity. As detailed in Equation (14), such cold storage C t S T is subject to these bound constraints.
E _ C L E 0 C L t = 1 t C s , t S T ( x t ) τ E ¯ C L ; s S , t T
C _ S T C s , t S T ( x t ) C ¯ S T ; s S , t T
As specified in Equation (15), the system is required to satisfy the cooling balance constraint. To fulfill the cooling load demand within the system, this demand must equal the sum of the cooling capacity generated by the chiller and the cooling energy exchanged with the cold storage system.
C s , t C O ( x [ t ] ) + C s , t S T ( x [ t ] ) = d s , t c ; s S , t T
Analogous to heating energy storage, in order to realize the sustainable scheduling of cooling load demand, the cooling energy storage at the end period, as indicated in Equation (16), should be equal to that at the initial period.
E 0 C L = E T C L

2.3.4. Electricity

As outlined in Equation (17), the electrical energy storage is influenced by the initial stored electrical energy E 0 P O W and the charging/discharging power P s , t S T . The stored energy at any given moment must lie within the specified upper and lower limits. Additionally, the charging and discharging power, constrained by the physical characteristics of the equipment, must also operate within its own upper and lower bounds, as specified in Equation (18). The functional relationship between electrical energy storage and the charging/discharging power is detailed in Equation (19).
E _ P O W E 0 P O W t = 1 t f P O W ( P s , t S T ( x [ t ] ) ) E ¯ P O W ; t T , s S
P _ S T P s , t S T ( x [ t ] ) P ¯ S T ; t T , s S
f P O W ( x ) = x τ / η E d i s , i f x 0 x τ η E c h , o t h e r w i s e
In addition, for power scheduling to be also sustainable in the future, as shown in Equation (20), the energy storage at the final moment needs to be equal to the energy storage at the initial moment.
E 0 P O W = E T P O W
In some extreme scenarios, the power of renewable energy needs to be partially curtailed to ensure the safe operation of the power system. As shown in Equation (21), the power discarded from renewable energy sources must not exceed the power generated by renewable energy sources at the current moment.
0 P s , t c u r ( x [ t ] ) P s , t r e n ; t T , s S
Lastly, as specified in Equation (22), the power exchanged between the microgrid system and the main grid must adhere to the upper and lower limits.
P _ G D P s , t G D ( x [ t ] ) P ¯ G D ; t T , s S
Furthermore, the aforementioned constraints are interconnected via the load balancing equation specified in Equation (23).
P s , t r e n P s , t c u r ( x [ t ] ) + P s , t S T ( x [ t ] ) + P s , t G D ( x [ t ] ) + P s , t H Y ( x [ t ] ) = P s , t c F C ( x [ t ] ) + P s , t h F C ( x [ t ] ) + d s , t ; t T , s S

2.3.5. Objective Function

In Equation (24), λ t P O W and λ t H Y are the electricity price and hydrogen price, respectively. Both of them are regarded as definite quantities in this paper. The overall objective function is the expected value of the transaction cost with the main grid cost and the cost of hydrogen in each scenario within the set S . The weighting coefficient α s of each representative scenario is related to the number of selected scenarios.
min q , h , m , p s S α s t T λ t P O W p s , t G D ( x [ t ] ) + λ t H Y H s , t ( x [ t ] ) τ

2.4. Rolling Economic Dispatch

As shown in Equation (2), the realization process of uncertainties is a period-by-period process. Considering the deviation between scenarios and the actual values of uncertainty, a rolling optimization scheduling strategy is adopted to ensure that decisions are more in line with the actual operating status. The rolling progress is shown in Figure 2.
As shown in Figure 2, as time goes on, uncertainties are realized period by period, and the realized values are used to update the current scenario set. The updated scenario G s u p can be described with Formulation (25). This dynamic adjustment ensures that the scenario set remains representative of potential future states, reducing the risk of basing decisions on inaccurate data. And the decisions made at each period are not only dependent on the realized value of random factors at the present moment but also related to the simulation scenarios at future moments.
G s u p = x [ t ] , x t + 1 , , x T ; t T , s S

3. GAN-and-Transform-Assisted Scenario Generation and Reduction

3.1. The Overall Framework of Method

The proposed framework for scenario generation and processing is illustrated in Figure 3. First, a Transformer-based prediction model utilizes historical power data and meteorological information to generate forecast data for renewable energy and loads. Second, these generated forecast data, together with historical data and meteorological data, serve as conditional inputs to the enhanced generative adversarial network C-StyleGAN2-SE for generating a large number of potential scenarios. Next, a screening process based on the MAPE is applied, with the generated forecast data used as a reference baseline to eliminate redundant scenarios, resulting in precise economic scenarios and feasible scenarios. Finally, the representative scenarios are integrated into the HMEMG scheduling optimization model to achieve a balance between economic efficiency and operational robustness.

3.2. Transformer-Based Day-Ahead Forecast Data Generation

To provide reliable conditional information for scenario generation, this paper adopts a Transformer model for day-ahead forecasting of multiple energy types, including wind power and electrical load. The entire framework is illustrated in Figure 4.
We employ a multi-task Transformer with a shared encoder and task-specific decoders to jointly forecast wind power and electrical load over a 24-h horizon. The inputs to the model include: (1) historical power data of wind and electricity load, (2) meteorological data such as temperature, humidity, and wind speed. The model outputs 24-h day-ahead predictions for each energy type. The shared encoder uses multi-head self-attention to capture long-range temporal structure and cross-variable dependencies; each decoder applies cross-attention to fuse the shared representation with task-specific context, thereby improving accuracy for its target series. The resulting forecasts play two roles: they condition the C-StyleGAN2-SE model to synthesize candidate scenarios and serve as baselines for the MAPE-based screening in Section 3.3.

3.3. GAN-Based Scenario Generation Technology

The input data for scenario generation in this paper consists of three categories: (1) Meteorological data, including temperature, humidity, weather type, and month information, (2) Historical actual power data, and (3) Forecasted data from the Transformer-based model introduced in Section 3.2.
Based on these datasets, this paper employs the C-StyleGAN2-SE to generate realistic and diverse day-ahead scenarios for wind power and electrical load. The framework, shown in Figure 5, includes the following three main stages:
(1)
C-StyleGAN2 is trained to capture spatio-temporal dependencies of multi-energy time series under meteorological conditions; the input of this module is only meteorological Data.
(2)
The Sequence Encoder (SE) learns to infer the latent representation of the scheduling day from historical and forecasted data. The input of this module consists of three types of datasets: meteorological data, historical actual power data, and forecast data.
(3)
During scenario generation, the SE-predicted latent variables are combined with random latent variables through style mixing, ensuring both consistency with forecasts and diversity across scenarios.
Repeating this process produces a large ensemble of plausible operating scenarios. These are subsequently filtered and reduced to obtain representative scenarios for scheduling optimization. These large numbers of scenarios enable the description of randomness characteristics.

3.4. MAPE-Transformer-Based Scenario Reduction Based on Forecast Deviation

To reduce computational complexity while ensuring the robustness of the scheduling model, the large set of potential day-ahead scenarios generated in Section 3.3 is filtered into two categories based on the MAPE: economic scenarios and feasible scenarios. The proposed scenario reduction is implemented through a filtering procedure based on forecast-guided MAPE criteria, which removes scenarios that deviate excessively from the day-ahead forecast data. For the scenario s, the MAPE E S is calculated as:
E s = 1 T t = 1 T | x s v ( t ) f v ( t ) | max ( ϵ , | f v ( t ) | )
where x s v ( t ) is the generated value of variable v at time t, f v ( t ) is the day-ahead forecasted data, T is the number of time steps in the scheduling day, and ϵ is a small constant to avoid division by zero.
The economic scenarios are defined as those whose MAPE does not exceed E ¯ S E , indicating a high degree of consistency with the expected operating point. The feasible scenarios are defined as those whose MAPE is between E _ S F and E ¯ S F , allowing a wider range of deviations that remain physically and operationally acceptable. The determination of E ¯ S E , E _ S F and E ¯ S F is based on the distribution of MAPE across all generated scenarios. Scenarios with excessively large MAPE are discarded due to being too extreme.
After filtering, scenarios in each category are sorted in ascending order of MAPE, and a set number of top-ranked scenarios are selected as representative scenarios. These representative scenarios are then embedded into the multi-energy microgrid scheduling model to perform optimization under different operation conditions. The economic scenarios provide the baseline for cost-optimal dispatch, while the feasible scenarios ensure that the scheduling plan remains robust against various uncertainties.

4. Numerical Tests

Numerical tests are implemented on a real HMEMG. All tests are simulated using MATLAB R2022a and Gurobi 10.0.3 on a desktop with Intel i5-9300H CPU @ 2.40 GHz with 16 GB RAM (Intel, Santa Clara, CA, USA).

4.1. Data Preparation

The system structure and parameters of the tested HMEMG are shown in Figure 1 and Table 2, respectively. The transaction electricity price between HMEMG and the main grid is shown in Figure 6. It should be noted that since the price of hydrogen is relatively stable within a day, the test uses the same price, but this model applies to situations where the price of hydrogen also fluctuates hourly.

4.2. Screening Results of Economic and Feasible Scenarios

This subsection verifies the screening method of feasibility and economic scenarios proposed in this paper. Specifically, this part first generated 8000 sets of potential uncertainty scenarios by employing the proposed C-StyleGAN-SE-based scenario generation technology in Section 3.3. Then, the MAPE was calculated for 8000 scenarios, and their distribution was statistically analyzed. The statistical results for wind power and load are presented in Table 3 and Table 4, respectively.
According to the results in Table 1 and Table 2, for the load scenarios, the proportion of scenarios with an MAPE lower than 20 exceeds 70%. It can be considered that E ¯ S E of load power is 20. Compared with the load, wind power generation has greater volatility. Therefore, scenarios with a relatively large MAPE in wind power scenarios are acceptable. The proportion of wind power scenarios with an MAPE lower than 40 exceeds 65%, so it can be considered that E ¯ S E of wind power is 40. What’s more, when the MAPE of load and wind power scenarios exceeds 40 and 80, respectively, the proportion of such scenarios is very small (both below 2%). However, there is a certain proportion of load scenarios with MAPE higher than 30 and wind power scenarios with MAPE higher than 60. Therefore, it can be considered that the [ E _ S F , E ¯ S F ] range for load scenarios is [30, 40], and that for wind power scenarios is [60, 80].
Considering the impact of computational complexity caused by large-scale scenarios, the economic scenarios and feasible scenarios are clustered and compressed according to their proportions, resulting in a set of scenarios that are small in quantity while retaining representativeness. The testing results are illustrated in Figure 7 and Figure 8.

4.3. Comparisons with Other Scheduling Methods

The effectiveness of the proposed scheduling method is verified in this section by comparing it with several other types of methods. 500 Monte Carlo simulations are conducted, and the comparisons between the deterministic method with perfect information, the scheduling method with only robust scenario, the scheduling method with only economic scenario, and the proposed method are summarized in Table 5.
In Table 5, the deterministic method with perfect information is a hypothetical ideal that essentially represents a theoretical lower bound for all stochastic programming methods. The methods that only include economic scenarios and robust scenarios are used to conduct comparative analysis on the economy and robustness of the proposed methods, respectively.
As shown, compared with the scheduling method with only robust scenarios, the proposed method improves economic benefits by 2.770% with a feasibility loss of 0.4%. Besides, the feasibility rate of the proposed method reaches 98.8%, which is acceptable for system operation. Compared with the scheduling method with only economic scenarios, the proposed method improves the feasibility rate by 29.8% with an economic loss of 0.674%.
In summary, the proposed method not only avoids the high failure risk of the method with only economic scenarios but also circumvents the high-cost issue of the method with only robust scenarios, truly realizing the balance of economy and robustness in scheduling and being more suitable for application in complex practical operations.

5. Conclusions

This paper discusses a GAN-and-Transformer-assisted scheduling approach for HMEMG to better balance economy and robustness and avoid the complex min-max structure in robust optimization. The proposed GAN-based scenario generation technology achieves effective simulation of uncertainties, and the proposed MAPE-Transformer-based scenario screening technology achieves effective screening of feasible scenarios and economic scenarios.
In the numerical test, by comparing with other economic and feasibility scenarios, the proposed scheduling method achieved a 29.8% feasibility improvement at the expense of 0.674% economic efficiency. Our future work will extend the framework to power and energy system optimization problems with transmission constraints and prove the theoretical feasibility of including scenarios. With the introduction of transmission constraints and the increase in scenario dimensions, subsequent research may face challenges related to model complexity and solution difficulty.

Author Contributions

Conceptualization, Y.Y., P.L. and Y.Z.; methodology, Y.Y., P.L. and Y.Z.; validation, Y.Y., P.L., Z.T. (Zhao Tao), Z.T. (Zhongxiang Tang) and H.M.; formal analysis, Z.T. (Zhao Tao) and Z.T. (Zhongxiang Tang); investigation, Z.T. (Zhao Tao) and Z.T. (Zhongxiang Tang); resources, Y.Y., P.L., H.M. and Y.Z.; writing—original draft preparation, Y.Y., P.L., Z.T. (Zhao Tao) and Z.T. (Zhongxiang Tang); writing—review and editing, Y.Y., P.L. and H.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Electric Technology Project of State Grid Hebei Electric Power Co., Ltd. (Contract No. kj2024-077).

Data Availability Statement

The data of this study are available from the corresponding author upon request.

Acknowledgments

All authors thank the reviewers and all members of our team for their insightful comments.

Conflicts of Interest

Authors Yang Yang, Penghui Liu, and Hao Ma were employed by State Grid Hebei Electric Power Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Nomenclature

Indices
s Index of scenarios, s S .
t Index of time periods, t T .
Parameters
d _ , d ¯ Upper/Lower bound of electricity load (kW).
d _ h , d ¯ h Upper/Lower bound of heating load (kW).
d _ c , d ¯ c Upper/Lower bound of cooling load (kW).
P _ w , P ¯ w Upper/Lower bound of wind power (kW).
P _ p v , P ¯ p v Upper/Lower bound of photovoltaic power (kW).
H _ , H ¯ Upper/Lower bound of hydrogen consumption rate (kg/h).
P _ G D , P ¯ G D Upper/Lower bound of transfer power with the main grid (kW).
K P Hydrogen electricity generation coefficient (kWh/kg).
K H Hydrogen heating generation coefficient (kWh/kg).
P _ S T , P ¯ S T Upper/Lower bound of discharging and charging (kWh).
E 0 P O W , E T P O W Energy level of electricity ES at initial and final periods (kWh).
E _ P O W , E ¯ P O W Upper/Lower capacity bound of ES (kWh).
η E d i s Discharging efficiency of ES.
η E c h Charging efficiency of ES.
K F h Heating efficiency of electric heating.
E 0 H T , E T H T Energy level of heat storage at initial and final periods (kWh).
H _ S T , H ¯ S T Upper/Lower bound of heat absorption and release (kW).
E _ H T , E ¯ H T Upper/Lower capacity bound of HS (kWh).
K F c Refrigeration efficiency of the chiller.
E 0 C L , E T C L Energy level of cold storage at initial and final periods (kWh).
C _ S T , C ¯ S T Upper/Lower bound of cold absorption and release (kW).
E _ C L , E ¯ C L Upper/Lower capacity bound of CS (kWh).
λ P O W , λ H Y Price of electricity (CNY/kWh) and hydrogen (CNY/kg).
τ Length of the time period (h).
E S Mean absolute percentage error (MAPE).
E ¯ S E MAPE Upper bound of economic scenario.
E _ S F , E ¯ S F MAPE Upper/Lower bound of feasible scenario.
Random Variables and Decision Variables
d Electricity load (kW).
d h Heating load (kW).
d c Cooling load (kW).
P w Wind power (kW).
P p v Photovoltaic power (kW).
P G D Exchanging power with the main grid (kW).
H Hydrogen consumption rate (kg/h).

References

  1. Zheng, H.Y.; Song, M.L.; Shen, Z.Y. The Evolution of Renewable Energy and Its Impact on Carbon Reduction in China. Energy 2021, 237, 121639. [Google Scholar] [CrossRef]
  2. Zhou, Y.; Zhai, Q.; Xu, Z.; Wu, L.; Guan, X. Multi-Stage Adaptive Stochastic-Robust Scheduling Method with Affine Decision Policies for Hydrogen-Based Multi-Energy Microgrid. IEEE Trans. Smart Grid 2024, 15, 2738–2750. [Google Scholar] [CrossRef]
  3. Zhou, Y.Z.; Zhai, Q.Z.; Wu, L. Optimal Operation of Regional Microgrids with Renewable and Energy Storage: Solution Robustness and Nonanticipativity Against Uncertainties. IEEE Trans. Smart Grid 2022, 13, 4218–4230. [Google Scholar] [CrossRef]
  4. Zhou, Y.Z.; Zhai, Q.Z.; Zhou, M.Y.; Li, X. Generation Scheduling of Self-Generation Power Plant in Enterprise Microgrid with Wind Power and Gateway Power Bound Limits. IEEE Trans. Sustain. Energy 2019, 11, 758–770. [Google Scholar] [CrossRef]
  5. Ou, Y.H.; Lv, L.; Liu, J.Y.; Gao, H.J. Stochastic Robust Economic Dispatch of Combined Heat and Power Microgrid Considering Renewable Energy Uncertainty. Electr. Power Constr. 2022, 43, 19–28. [Google Scholar]
  6. Zhao, W.; Diao, H.B.; Li, P.Q.; Lv, X.X.; Lei, E.T.; Mao, Z.Y.; Xue, W.Q. Transactive Energy-based Joint Optimization of Energy and Flexible Reserve for Integrated Electric-heat Systems. IEEE Access 2021, 9, 14491–14503. [Google Scholar] [CrossRef]
  7. Sang, B.; Zhang, T.; Liu, Y.J.; Liu, L.S.; Zhu, J.J.; Wang, R. Two-stage Robust Optimal Scheduling of Grid-connected Microgrid Under Expected Scenarios. IET Gener. Transm. Distrib. 2020, 40, 6161–6172. [Google Scholar]
  8. Zhao, Z.L.; Guo, J.T.; Luo, X.; Lai, C.S.; Yang, P.; Lai, L.L.; Li, P.; Guerrero, J.M.; Shahidehpour, M. Distributed Robust Model Predictive Control-Based Energy Management Strategy for Islanded Multi-Microgrids Considering Uncertainty. IEEE Trans. Smart Grid. 2022, 13, 2107–2120. [Google Scholar] [CrossRef]
  9. Chen, T.P.; Cao, Y.H.; Qing, X.L.; Zhang, J.R.; Sun, Y.H.; Amaratunga, G.A.J. Multi-energy Microgrid Robust Energy Management with a Novel Decision-Making Strategy. Energy 2022, 239, 121840. [Google Scholar] [CrossRef]
  10. Yang, J.; Su, C.Q. Robust Optimization of Microgrid Based on Renewable Distributed Power Generation and Load Demand Uncertainty. Energy 2021, 223, 120043. [Google Scholar] [CrossRef]
  11. Li, H.; Ren, Z.; Fan, M.; Li, W.; Xu, Y.; Jiang, Y.; Xia, W. A Review of Scenario Analysis Methods in Planning and Operation of Modern Power Systems: Methodologies, Applications, and Challenges. Electr. Power Syst. Res. 2022, 205, 107722. [Google Scholar] [CrossRef]
  12. Dong, W.; Chen, X.; Yang, Q. Data-driven Scenario Generation of Renewable Energy Production Based on Controllable Generative Adversarial Networks with Interpretability. Appl. Energy 2022, 308, 118387. [Google Scholar] [CrossRef]
  13. Krishna, A.B.; Abhyankar, A.R. An Efficient Data-Driven Conditional Joint Wind Power Scenario Generation for Day-Ahead Power System Operations Planning. IEEE Trans. Power Syst. 2024, 39, 3105–3117. [Google Scholar] [CrossRef]
  14. Morales, J.M.; Minguez, R.; Conejo, A.J. A methodology to generate statistically dependent wind speed scenarios. Appl. Energy 2010, 87, 843–855. [Google Scholar] [CrossRef]
  15. Yang, J.; Zhang, S.; Xiang, Y.; Liu, J.; Liu, J.; Han, X.; Teng, F. LSTM Auto-Encoder Based Representative Scenario Generation Method for Hybrid Hydro-PV Power System. IET Gener. Transmi. Distrib. 2020, 14, 5935–5943. [Google Scholar] [CrossRef]
  16. Qi, Y.; Hu, W.; Dong, Y.; Fan, Y.; Dong, L.; Xiao, M. Optimal configuration of concentrating solar power in multienergy power systems with an improved variational autoencoder. Appl. Energy 2020, 274, 115124. [Google Scholar] [CrossRef]
  17. Dumas, J.; Wehenkel, A.; Lanaspeze, D.; Cornélusse, B.; Sutera, A. A Deep Generative Model for Probabilistic Energy Forecasting in Power Systems: Normalizing Flows. Appl. Energy 2022, 305, 117871. [Google Scholar] [CrossRef]
  18. Chen, Y.; Wang, Y.; Kirschen, D.; Zhang, B. Model-Free Renewable Scenario Generation Using Generative Adversarial Networks. IEEE Trans. Power Syst. 2018, 33, 3265–3275. [Google Scholar] [CrossRef]
  19. Zhou, Y.; Han, Z.; Zhai, Q.; Wu, L.; Cao, X.; Guan, X. A Data-And-Model-Driven Acceleration Approach for Large-Scale Network-Constrained Unit Commitment Problem with Uncertainty. IEEE Trans. Sustain. Energy 2025, 1–13. [Google Scholar] [CrossRef]
  20. Chen, Y.; Wang, X.; Zhang, B. An unsupervised deep learning approach for scenario forecasts. In Proceedings of the 2018 Power Systems Computation Conference (PSCC), Dublin, Ireland, 11–15 June 2018. [Google Scholar]
  21. Liang, J.; Tang, W. Sequence Generative Adversarial Networks for Wind Power Scenario Generation. IEEE J. Sel. Areas Commun. 2020, 38, 110–118. [Google Scholar] [CrossRef]
  22. Yuan, R.; Wang, B.; Mao, Z.; Watada, J. Multi-Objective Wind Power Scenario Forecasting Based on PG-GAN. Energy 2021, 226, 120379. [Google Scholar] [CrossRef]
  23. Gao, S.; Wang, Y.; Zhou, Y.; Yu, H. An Improved Scheduling Approach for Multi-Energy Microgrids Considering Scenario Insufficiency and Computational Complexity. Processes 2025, 13, 576. [Google Scholar] [CrossRef]
Figure 1. The structure of a hydrogen-based multi-energy microgrid.
Figure 1. The structure of a hydrogen-based multi-energy microgrid.
Processes 13 02993 g001
Figure 2. Rolling optimization diagram.
Figure 2. Rolling optimization diagram.
Processes 13 02993 g002
Figure 3. The overall methodological framework.
Figure 3. The overall methodological framework.
Processes 13 02993 g003
Figure 4. The framework of Transformer-based forecasted data generation.
Figure 4. The framework of Transformer-based forecasted data generation.
Processes 13 02993 g004
Figure 5. Framework of the C-StyleGAN2-SE-based scenario generation model.
Figure 5. Framework of the C-StyleGAN2-SE-based scenario generation model.
Processes 13 02993 g005
Figure 6. The transaction electricity price with the main grid.
Figure 6. The transaction electricity price with the main grid.
Processes 13 02993 g006
Figure 7. The screening results of load scenarios.
Figure 7. The screening results of load scenarios.
Processes 13 02993 g007
Figure 8. The screening results of wind power scenarios.
Figure 8. The screening results of wind power scenarios.
Processes 13 02993 g008
Table 1. The comparison of different models mentioned in the Introduction.
Table 1. The comparison of different models mentioned in the Introduction.
ModelComputational EfficiencyAccuracyConsider Meteorological Data
GANModerateHighYes
LSTMModeratelowNo
VAEHighModerateYes
Table 2. The Parameters of the tested HMEMG.
Table 2. The Parameters of the tested HMEMG.
ParameterValueParameterValue
d _ , d ¯ 0, 1200 (kW) d _ h , d ¯ h 0, 200 (kW)
d _ c , d ¯ c 0, 200 (kW) P _ w , P ¯ w 0, 1000 (kW)
P _ p v , P ¯ p v 0, 500 (kW) H _ , H ¯ 0, 25 (kg/h)
P _ G D , P ¯ G D −600, 600 (kW) K p 19.09 (kWh/kg)
K h 9.91 (kWh/kg) P _ S T , P ¯ S T −100, 100 (kWh)
E 0 P O W , E T P O W 150, 150 (kWh) E _ P O W , E ¯ P O W 60, 300 (kWh)
η E d i s , η E c h 0.9, 0.9 K F h , K F c 0.94, 0.94
E 0 H T , E T H T 100, 100 (kWh) E _ C L , E ¯ C L 40, 200 (kWh)
H _ S T , H ¯ S T −50, 50 (kW) E _ H T , E ¯ H T 40, 200 (kWh)
E 0 C L , E T C L 100, 100 (kWh) λ H Y 15 (CNY/kg)
C _ S T , C ¯ S T −50, 50 (kW) τ 1 (h)
Table 3. The MAPE distribution of load.
Table 3. The MAPE distribution of load.
MAPE (%)0–1010–2020–3030–40Over 40
Proportion (%)41.9531.7513.511.31.5
Table 4. The MAPE distribution of wind power.
Table 4. The MAPE distribution of wind power.
MAPE (%)0–2020–4040–6060–80Over 80
Proportion (%)25.1541.87521.17510.151.7
Table 5. Results of computational efficiency and economy.
Table 5. Results of computational efficiency and economy.
MethodFeasible Rate (%)Cost (¥)
Deterministic method1004244.035
Method with only feasible scenarios99.24421.341
Method with only economic scenarios694273.398
The proposed method98.84302.192
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, Y.; Liu, P.; Ma, H.; Tao, Z.; Tang, Z.; Zhou, Y. A GAN-and-Transformer-Assisted Scheduling Approach for Hydrogen-Based Multi-Energy Microgrid. Processes 2025, 13, 2993. https://doi.org/10.3390/pr13092993

AMA Style

Yang Y, Liu P, Ma H, Tao Z, Tang Z, Zhou Y. A GAN-and-Transformer-Assisted Scheduling Approach for Hydrogen-Based Multi-Energy Microgrid. Processes. 2025; 13(9):2993. https://doi.org/10.3390/pr13092993

Chicago/Turabian Style

Yang, Yang, Penghui Liu, Hao Ma, Zhao Tao, Zhongxiang Tang, and Yuzhou Zhou. 2025. "A GAN-and-Transformer-Assisted Scheduling Approach for Hydrogen-Based Multi-Energy Microgrid" Processes 13, no. 9: 2993. https://doi.org/10.3390/pr13092993

APA Style

Yang, Y., Liu, P., Ma, H., Tao, Z., Tang, Z., & Zhou, Y. (2025). A GAN-and-Transformer-Assisted Scheduling Approach for Hydrogen-Based Multi-Energy Microgrid. Processes, 13(9), 2993. https://doi.org/10.3390/pr13092993

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop