1. Introduction
Energy and environmental issues are two important challenges to sustainable global development. In most countries around the world, power generation still relies on fossil energy sources such as coal-fired power stations, which creates serious energy waste and environmental problems. As the population grows rapidly, so does residential electricity consumption, impacting the stability of urban power grids [
1]. In recent years, smart grids and microgrids have been progressively built to address the challenges of overloading the grid. Smart grids, as opposed to microgrids, are vast, networked systems that employ digital technologies to track, regulate, and oversee the electricity flow throughout the entire grid. In contrast, microgrids are smaller, more compact, localised systems that often function either alone or in tandem with a larger smart grid. Microgrids, integral to the smart grid, consist of clusters of distributed generators (DGs), energy storage systems (ESS), loads, and various monitoring and protection devices [
2]. By interacting with the main grid and facilitating the distributed renewable energy resources (wind and photovoltaic), microgrids can enhance efficient energy management and grid stability and reduce the grid’s environmental impact [
3]. However, the intermittency and uncertainty of renewable energy output in microgrids make its application challenging, and their energy management strategies have attracted considerable attention [
4]. To ensure the balance of power supplied by the microgrid, the uncertainty of renewable energy output on the supply side is a factor that must be considered in the energy management of the microgrid [
5]. The accurate description of the uncertainty in renewable energy output relies on the progress of load forecasting methods. Traditional forecasting approaches such as MLP and decision trees have been insufficient in accurately characterising the uncertainty of renewable energy output, thereby negatively impacting the results of microgrid energy management.
To address this challenge, in recent years, with the progress of prediction theory and artificial intelligence technology as well as the energy internet environment, power consumption data, weather data, wind power generation data, photovoltaic power generation data, system operation, and system maintenance data can be collected, which can provide an important foundation for the training of prediction models [
6]. Deep learning models can extract the mapping relationship between numerical weather prediction (NWP) data such as wind speed and wind power data. This relationship can be used to predict future wind power generation output with significant nonlinear fitting capabilities [
7]. Deep learning models that are commonly used to predict wind power generation sequences are Long-term Short-term Memory Networks (LSTM), Temporal Convolutional Networks (TCN), Transformer, Generative Adversarial Network (GAN), etc. [
8]. TCN maintains long-term sequence prediction performance by utilising residual blocks and dilated causal convolution for better time series prediction: Shao et al. [
9] achieved higher accuracy than LSTM by adjusting the receptive field of TCN to predict the wind energy components at different frequencies. However, TCN models only extract forward time information; they ignore backward information. The Bidirectional Temporal Convolutional Network (BiTCN) model proposed by Graves et al. [
10] can capture bidirectional information of the time series. Experimental results show that its prediction accuracy is higher than that of unidirectional TCN. However, due to the considerable volatility of wind power, the prediction results using only deep learning models are not satisfactory [
11]. Many existing predictive models rely on single inputs or simpler model structures that ignore the complex time-series correlations between multiple variables. Most methods deal with linear relationships between only some of the input variables and fail to adequately account for nonlinear interactions and long-term dependencies between variables. The prediction results are often inadequate. To address this challenge, the development of hybrid models is an effective solution to achieve higher accuracy in wind energy forecasting. Meanwhile, the introduction of attention mechanisms in deep learning hybrid prediction models can effectively capture the key information in the complex spatio-temporal features of wind power or photovoltaic power and improve the model’s ability to focus on important time steps and feature dimensions, thus improving the accuracy and robustness of the model’s predictions. Liu et al. [
12] suggested a new model that mixes convolutional neural networks (CNNs) with Bidirectional Long Short-Term Memory (BiLSTM) networks, calling it the CNN-BiLSTM model for predicting PV power. They reported that the hybrid model had a lower Mean Absolute Error (MAE) and greater stability than the basic model when dealing with weather-related uncertainties in grid operations. Cheng et al. [
13] proposed a domain-knowledge integrated Transformer (DKFormer) model to correct wind power forecasting errors using specialised data processing modules and boundary constraints using measured power and NWP data. With the increasing demand for simplified microgrid energy management models, reinforcement learning methods have become a hot topic in recent years, and they have been applied to address issues in microgrid energy management. As a model-free intelligent algorithm, reinforcement learning can learn and find optimal solutions to optimisation problems in uncertain and dynamic environments. Chen et al. [
14] proposed a model-free deep reinforcement learning (DRL)-based energy management strategy (EMS) for regenerative braking energy storage systems (RBESS) in railway power systems, formulating the problem as a Markov decision process (MDP) with a multistage reward function. Their EMS demonstrated performance superior to that of traditional methods by over 5% in energy management objectives. Zhao et al. [
15] suggested an enhanced duelling double deep Q network algorithm with mixed penalty function (EN-D3QN-MPF) for microgrid energy management, integrating renewable sources and flexible loads while optimising low-carbon economic operation and EV charging satisfaction, demonstrating performance superior to GA, PSO, and other DRL methods through real-world case validation.
Current research on neural network-based prediction methods predominantly focuses on the dispatch of a single energy source. This approach limits the ability to coordinate and optimise multiple energy sources in a microgrid, thereby reducing the overall efficiency of the system [
16]. In addition, with the advancement of the dual-carbon goal, a multi-energy complementary microgrid operation model considering carbon quota and carbon trading is necessary in microgrid energy management. To predict wind power or photovoltaic power generation, deep learning-based optimisation methods can account for uncertainty, distribution, and complex nonlinear relationships through data-driven optimisation [
17], compared with traditional optimisation, which relies on conservative assumptions in relation to the efficient dispatch of power and load changes in the microgrid. Li et al. [
18] reported a data-driven two-stage distributionally optimised model for community integrated energy systems, combining a Wasserstein-GAN scenario generation method with integrated demand response to achieve lower operating costs, higher renewable energy utilisation, and faster computation compared to conventional methods while balancing economic operation and system robustness. Another data-driven distributional optimisation (DRO) method for integrated energy system scheduling, using CGAN-generated scenarios and a hybrid 1-norm/∞-norm uncertainty was presented by Ma et al. [
19] to reduce operating costs and enhance computational efficiency. Yang et al. [
20] suggested a two-stage microgrid scheduling framework that combines improved Gaussian process regression forecasting with adaptive optimisation, reducing the impacts of renewable energy uncertainty through day-ahead worst-case scenario planning and intra-day rolling optimisation for cost reduction while maintaining system reliability. Zhu et al. [
21] came up with a two-stage optimisation model for residential energy hubs that simultaneously optimises energy market bidding and flexible ramp product provision, using an LSTM-based interval prediction method to reduce solution conservatism while improving economic performance through multi-market participation. Xu et al. [
22] outlined a photovoltaic mechanism/data-fusion-driven adaptive optimisation strategy for combined heat and power microgrids, combining clear-sky radiation modelling with data-driven error confidence intervals to minimise operating costs while effectively mitigating PV output uncertainty. The simulated results were compared with the analytical solutions. Although numerous optimisation models have been reported in the open literature, including those mentioned above, there are significant knowledge gaps, and uncertainties remain.
Given the urgent need for a dependable and effective way to manage microgrid energy, this study aims to create a strong optimisation model for electricity/heat/gas/hydrogen multi-energy complementary microgrids. The model includes a carbon trading system. This model will handle the uncertainty of wind power output, which will be predicted and managed using a deep learning model called BiTCN-Transformer. The model is based on multimodal time series; the BiTCN captures the local temporal dependencies, while the Transformer model dynamically learns the correlations between different time points. By combining the two, the model can pay attention to both nearby and distant information, helping it to better understand the various patterns in the time data, which makes processing the data more thorough and precise and ultimately improves the model’s ability to make predictions. Subsequently, microgrid energy management experiments are to be conducted under two typical scenarios: a high wind power scenario and a low wind power scenario, combined with tariff and load data, to verify the effectiveness of the proposed model in coping with the supply-side uncertainty of microgrids and the synergy of multi-energy complements at the same time. The purpose is to reduce the operating cost of microgrids, improve the utilisation rate of renewable energy, reduce emissions, and ultimately enhance the reliability of the system’s operation. The following are the study’s primary contributions:
- (a)
A multi-energy complementary microgrid energy management framework for electricity, heat, gas, and hydrogen with a carbon trading mechanism is proposed, which contains multi-energy complementary multiple resource loads and a carbon trading model.
- (b)
A deep learning model using BiTCN-Transformer is suggested to forecast wind power output and make specific predictions and tests are done to confirm that this model performs better than others based on different evaluation criteria.
- (c)
Based on the point prediction results, interval prediction is performed in two typical cases, a high wind power scenario and a low wind power scenario, using a nonparametric kernel density estimation model and a confidence interval calculation method to construct a boxed uncertainty set for the robust operational optimisation model.
3. Data
The data required for the deep learning prediction model include variables such as temperature, wind direction, air pressure, relative humidity, wind speed data, and wind power generation. In this study, real data from a wind farm in Xinjiang in 2019 were used for validation and prediction, and the data were collected at hourly intervals for a duration of one year from 1 January 2019 to 31 December 2019, thus accumulating a large dataset of 8760 observations.
Table 1 provides the symbols and statistical characteristics of the measured variables.
To check for potential interconnections between the variables, Pearson correlation coefficients of the variables were calculated as shown in Equation (62) and the experimental results were analysed. The results of the resulting correlation matrix are shown in
Figure 5.
where
and
are two arbitrary time series variables and
and
stand for the mean values of the sequences
and
.
Figure 5 shows that there is a direct negative correlation between wind speed and relative humidity, with a coefficient value of −0.25. In addition, relative humidity is negatively correlated with atmospheric pressure. Furthermore, atmospheric pressure was positively correlated with all other atmospheric variables except wind speed, indicating an indirect relationship between these variables and wind speed. In addition, the coefficient value of wind speed and historical wind power output is 0.92, indicating an extremely important correlation between wind speed and wind power. Therefore, wind speed and historical wind power output are also important eigenvalues to be used as deep learning for the model. The wind speed data and wind power output data are shown in
Figure 6a,b.
Since wind speed and wind power output data are continuous variables, the missing value treatment of the data used in this study uses linear interpolation to fill in the missing values by following the trend of neighbouring data points. The method is computationally simple, efficient, and suitable for real-time processing of large-scale data. The derivation of the formula for linear interpolation is based on the point-slope equation, as shown in Equation (63).
where
denotes the rate of change between data points.
The Z-Score method is still required for outlier treatment of data after missing value treatment as used in this study. If the variable data follow a normal distribution, the mean deviation
and standard deviation
of each variable are calculated, and data exceeding
3
are considered outliers. When
> 3, the data is determined to be an outlier. This method can be used for the rapid detection of extreme values in the variables, and the calculation is simple, which can greatly improve the efficiency of data cleaning. The principle of the method is shown in Equation (64).
To maintain data integrity and prevent information leakage, a temporal segmentation method was applied to the dataset. This process entails dividing the dataset into different subsets, allocating 80% for the training set, 15% for the validation set, and another 5% for the test set, as shown in
Table 2.
The model parameters are fine-tuned using the training set, while the hyperparameters are optimised using the validation set. This careful delineation and systematic utilisation of the different dataset components ensured a rigorous and unbiased assessment of the model’s generalisation capabilities. To facilitate model convergence during training, the eigenvalues were normalised as shown in Equation (65).
where
represents normalisation operation,
is the original feature value, and
and
are the global minimum and global maximum of the
-th feature, respectively.
The electricity, heat, and hydrogen loads required by the microgrid in the optimisation model for each time of day are shown in
Figure 7a.
Figure 7b shows the results of the electricity price forecast for each day-ahead period.
4. Results and Discussion
The effectiveness of the proposed prediction and optimisation models was verified through two sets of experiments. Historical wind speed and wind power generation data were used to conduct point prediction and ablation experiments for the deep learning model, with comparisons made against other advanced models through prediction result curves, regression plots, and evaluation metrics. Based on the point prediction results, interval prediction was performed using a kernel density model and confidence interval calculation method, with scenarios divided into high and low wind power output conditions. These two scenarios were employed to construct a robust optimisation box uncertainty set, followed by two-stage robust optimisation of the multi-energy complementary microgrid energy management model to analyse daily variations in electrical, thermal, and hydrogen loads along with carbon trading outcomes under both scenarios. The experiments were conducted in a computational environment consisting of a Windows 10 (8-core, 64-bit) operating system with a GeForce RTX 3080Ti GPU, using MATLAB R2023b for program execution.
4.1. Predictive Modelling Results
Deep learning point predictions are the basis of interval prediction, so to better construct the uncertainty set for two-stage robust optimisation, the predictive effectiveness of the proposed deep learning point predictions needs to be validated. Ablation experiments are an excellent method of validating the effectiveness of point prediction. Ablation experiments provide an effective means of evaluating the contribution and necessity of individual components in the model. By removing or replacing specific components or sub-models sequentially, a clearer picture of the impact of each part on the overall performance of the model can be obtained. This approach not only helps optimise the model structure but also helps deepen the understanding of its mechanisms. In this study, ablation experiments were conducted to verify the point prediction validity of the proposed predictive model.
The dataset division of the ablation experiment is determined by
Table 2, and the random seed is set to 35. The ablation experiment needs to systematically remove some of the components to analyse the roles of each part. Meanwhile, the LSTM, as a classical recurrent neural network, is commonly used to capture temporal dependencies, and it is a typical representative of the traditional recursive architecture. Therefore, the LSTM, BiTCN, and Transformer models were selected as the baseline models for the ablation experiments.
Figure 8 displays a comparison of the prediction results of LSTM, BiTCN, Transformer, and the proposed model. As shown in
Figure 8, the tests with the proposed prediction model show better results in order, while the single-model LSTM has the biggest difference from the actual values. Both the BiTCN and Transformer models show improvements, but still have noticeable errors compared to the true values. The proposed model has the best fitting effect between the prediction results and the real values.
Table 3 displays the evaluation metrics of the ablation experiment model. As shown in
Table 3, the quantitative data analysis reveals that the fitting ability of the LSTM model is limited. The reason for this limitation is that the LSTM model relies on a single model for time series modelling, while the lack of an attention mechanism and bidirectional temporal modelling capability leads to insufficient capture of local features, making it the weakest performer among the four model architectures.
After switching to the BiTCN model, the comprehensive performance of the model is improved. Its convolutional filter enhances the local feature extraction of wind speed and wind power sequences and realises multi-scale time series modelling. Compared with the LSTM model, the MAE of the BiTCN model is reduced by 15.6%, the RMSE is reduced by 12.6%, and the R2 is improved by 3.3%.
The Transformer model incorporates an internal attention model, which can effectively extract local short-term fluctuations in wind and wind speed data and, at the same time, helps to understand different situations in time series data from multiple perspectives. This implementation greatly reduces the error and improves the fitting ability. Compared to the BiTCN model, the MAE is reduced by 5.8%, the RMSE is reduced by 4.4%, and R2 is improved by 1.7%.
By integrating the BiTCN model and the Transformer model into the BiTCN-Transformer framework, this integration improves the performance of the model in terms of feature extraction and global dependency of wind data. The simulation results indicate that the proposed model further reduces the MAE by 2.8%, RMSE by 0.6%, and R2 by 1.2% compared to the Transformer model.
Table 4 shows the results of the evaluation metrics of the proposed model compared with other state-of-the-art prediction models for wind power prediction. Other models include CNN-LSTM [
34], Informer [
35], and VMD-CNN-BiLSTM [
36].
In terms of comprehensive performance, the proposed model achieves a remarkable balance between prediction accuracy and computational efficiency. Compared with CNN-LSTM, its MAE and RMSE are reduced by 29.7% and 33.0%, respectively, R2 is improved by 3.98%, and the single training time is only 68 s, which is 26.1% shorter than the 92 s of CNN-LSTM. This advantage is attributed to BiTCN’s bidirectional temporal convolution module, which significantly improves computational efficiency by replacing the serial LSTM structure in CNN-LSTM with parallelised feature extraction.
Although the R2 of the Informer model is slightly better than that of the proposed model, its computation time is 2.13 times that of the latter and its MAE and RMSE are higher than that of the proposed model. This indicates that although the global self-attention mechanism relied on by Informer can capture long sequence dependencies, it has high computational complexity and is difficult to adapt to real-time prediction needs. On the other hand, BiTCN-Transformer, through the synergistic design of local dilation convolution and a lightweight attention module, ensures the time-series modelling capability while considering the accuracy and efficiency.
It is worth noting that the MAE and RMSE of VMD-CNN-BiLSTM are slightly better than the proposed model, but its operation time is 3.09 times longer than that of the proposed model and its R2 is lower than that of the proposed model. This is because VMD-CNN-BiLSTM needs to perform variational modal decomposition preprocessing superimposed on the time-series iterative computation of bidirectional LSTM, which leads to a surge in model complexity. In contrast, BiTCN-Transformer avoids the error accumulation problem of signal decomposition by joint bidirectional convolution-attention modeming.
4.2. Interval Prediction Results
To establish the uncertainty set of the robust optimisation model, predicting the interval of wind power output is necessary; the upper and lower bounds of the intervals define the limits of the uncertainty set in the robust optimisation framework. In this study, interval prediction was performed for two scenarios, a high wind power scenario and a low wind power scenario, and the kernel density estimation method was used to fit the point predictions of the proposed deep learning model to obtain the interval prediction of wind power under the corresponding confidence intervals.
The wind power prediction intervals need to meet the grid dispatch’s demand for fault tolerance for extreme errors. In this study, a 90% confidence level was chosen to meet the reliability requirements of the IEC 61400-25 standard [
37] for wind power prediction. The wind power interval prediction for both scenarios was performed based on the kernel density estimation model and the point prediction results of the proposed deep learning model, as shown in
Figure 9. Interval prediction not only requires the construction of clear upper and lower bounds, but also necessitates an analysis of the results with evaluation indicators. In this study, two evaluations of the prediction results under two different scenarios, PICP and CWC, were conducted to verify the effectiveness of the proposed model in interval prediction, as shown in
Table 5. As illustrated in
Table 5, the PICP and CWC of the proposed model interval prediction in the two scenarios are within a good range of values, which indicates that the proposed model can consider the balance between robustness and economy in constructing the uncertainty set in a good way.
4.3. Optimisation Modelling Results
The outcomes of the data interval predictions are used to build the uncertainty set for the two-stage robust optimisation model. To determine the changes in electrical energy demand, thermal energy load, hydrogen energy load, and findings pertaining to carbon trading for each of the two wind power scenarios, the model was solved using Matlab software (R2023b).
The results of the optimisation for the high-wind power scenario are displayed in
Figure 10.
Figure 10 shows that:
As shown in
Figure 10a, in the result of energy management of electric power load, in the low tariff period (2–5 h), the wind power output is low (31.6–69.2 kW), which is not enough to support the electric power demand of the electric load (206–214 kW) and electrolyser. At the same time, the purchased power is increased to 136–483 kW. At this time, the cost of hydrogen production is lowest, the EES is charged with a constant power of 100 kW, and the EC is charged at a full power of 300 kW. During the high tariff stage (15–17 h), the output of wind power increases. During this time, the highest amount of power from the CHP system (420 kW) and EES discharge (200 kW) can be sold to the grid (207 kW) by combining the CHP gas power generation and the storage system discharge to maximise profit during peak hours. In the CHP start-stop control phase (9–22 h), it is activated in the rising electricity price phase. The output is dynamically adjusted according to the demand of the thermoelectric coupling and the electricity/heat ratio is set at 1:1.2 to realise the energy ladder utilisation.
Figure 10b shows that during the thermal electrolytic coupling period (6 h), the thermal load increases to 200 kW in the morning peak, but the CHP system has not yet been activated. The TES system releases 133.53 kW of stored heat, and the boiler only needs to provide 66.64 kW to reduce gas consumption. During the CHP waste heat excess phase (17 h), the CHP generates 504 kW of waste heat due to power supply demand, which significantly exceeds the current heat load limit. Therefore, the TES stores 146.30 kW of heat to prevent waste and reserve it for future heat supply. In the CHP–boiler combined operation stage (20 h), the boiler supplements the 78.94 kW load, realising the economic operation mode of “CHP + boiler peaking”.
Figure 10c shows that between 2 and 5 h, EC makes hydrogen at its maximum rate of 48.24 kg/h during the cheaper tariff time, producing more hydrogen than needed and storing 63.8 kg of HS, which helps cover costs later when tariffs are higher. In the hydrogen purchase–storage phase (15–17 h), hydrogen production is stopped during the peak tariff period, and the demand is met by hydrogen purchases, while HS is storing hydrogen to smooth out the cost fluctuation caused by hydrogen purchases.
Figure 10d shows renewable energy contributions to a higher value of carbon emissions due to the higher amount of wind power and therefore a higher utilisation of carbon allowances.
The optimisation results for the low-wind power scenario are shown in
Figure 11.
As illustrated in
Figure 11a, in terms of the electrical energy management results, during the low tariff period (2–5 h), the wind power output is 0.8–8 kW, only 2.5% of the high wind power scenario, at which time the EC is shut down due to the lack of wind power to produce hydrogen, and the amount of hydrogen purchased is increased to 80 kg/h. The charging of the EES is limited as a result. In the high tariff phase (15–17 h), when the wind power output grows slightly and the CHP system is overloaded, the EES is discharged at 200 kW, and the revenue from electricity sales is reduced due to the decreased efficiency of the CHP system.
Figure 11b shows the CHP waste heat utilisation rate continues to improve compared to the high wind power scenario, and continuous CHP work is achieved for 9–17 h. TES completes the heat storage of 480.5 kW from 1–8 h and releases heat storage of 460.2 kW from 14–17 h, smoothing out the deviation between the CHP heat output and the load demand. At the same time, the boiler continues to operate.
Figure 11c reveals that a completed EC shutdown leads to a complete interruption of hydrogen production and full-time dependence on hydrogen purchases. In addition, the HS function is reversed: 1–5 h mandatory HS (hydrogen purchases are greater than the load) and 19–21 h continuous discharge from the tanks, which triggers the risk of a hydrogen energy shortage.
Figure 11d shows that due to the extremely low wind power output, the value of renewable energy contributing to carbon emissions is also extremely low, the carbon quota gap is huge, and a larger carbon cost needs to be paid, which makes the overall operation cost higher.
The results of microgrid optimisation for both high and low wind power scenarios show that the DGs within the microgrid in the low wind power scenario are increased relative to the high wind power scenario, indicating that the proposed microgrid optimisation model can still achieve the lowest cost within the system in the case of insufficient access to renewable energy sources, which verifies the validity and reliability of the proposed model.
4.4. Economic Analysis
An economic analysis is needed to visually compare the difference in microgrid costs between the high-wind and low-wind scenarios through a cost evaluation.
Table 6 shows the comparison of cost indicators, such as total cost as well as carbon emission cost, for both scenarios.
As displayed in
Table 6 and the comparison of load dispatching power in the high and low wind power scenarios, the total system cost in the low wind power scenario increases by 283%, the cost of carbon emissions increases by 314%, the revenue from electricity sales decreases by 24.8%, and the cost of the HS system increases by 21.9%. This happens because in the high wind power scenario, the microgrid system lowers costs and carbon emissions by effectively using wind power, energy storage, hydrogen production, and heat storage together. However, in the low wind power scenario, the system relies more on buying power and hydrogen, leading to higher carbon emissions due to not enough renewable energy being available. In addition, in the high wind scenario, the tariff difference triggers the arbitrage behaviour of electric storage, which can significantly reduce the total system cost. In the low wind scenario, the tariff mechanism fails, the CHP system is overloaded, and the cost of the generation unit increases significantly.
In a high wind power scenario, wind energy output can substantially decrease system carbon emissions. Conversely, in a low wind power scenario, inadequate wind energy necessitates the use of hydrogen fuel cells for operation, thereby increasing the system’s carbon emissions. The microgrid model proposed in this work can modulate the output of each component to maintain system operation according to the fluctuating availability of renewable energy. However, a significant proportion of renewable energy is essential to reducing costs and carbon emissions within the microgrid system, and enhancing energy management in challenging circumstances necessitates improved resilience in system design.
4.5. Robust Parameter Sensitivity Analysis
The uncertainty parameter
represents the maximum relative deviation allowed for wind power output from the midpoint of the uncertainty set interval. Changes in
significantly impact cost scheduling outcomes. When
is 0, wind power output strictly equals the midpoint of the forecasted interval, meaning no fluctuation. When
is 0.5, wind power output can reach the original upper and lower bounds of the forecasted interval. Thus, the mathematically valid range for
is [0, 0.5].
Figure 12 shows the total system cost variation as
increases from 0 to 0.5 under confidence intervals of 90%, 95%, and 99%.
From
Figure 12, it is noted that a larger
value corresponds to a wider range of wind power fluctuations, requiring the system to account for greater uncertainty. To address these expanded uncertainty scenarios, additional equipment such as gas turbines and HS must compensate, leading to higher system costs as
increases. When
is in the range of [0, 0.3], the system cost rises gradually, because minor adjustments by backup equipment can offset the increased costs caused by moderate uncertainty. However, when
is within [0.3, 0.5], the cost increases more sharply. This is due to efficiency losses in the CHP system and frequent charging/discharging cycles of HS, which become insufficient to manage the heightened uncertainty. As a result, costs escalate further, indicating that moderate
values strike a balance between system robustness and economic efficiency. Additionally, the size of the confidence interval directly impacts total costs. For a fixed
, expanding the confidence interval widens the predicted wind power range, forcing the system to prepare for more extreme scenarios. This necessitates greater resource reserves, further driving up costs.
5. Conclusions and Future Directions
The uncertainty of renewable energy output greatly affects the stability of microgrid optimisation operations. A strong optimisation model for a multi-energy complementary microgrid that includes carbon trading is proposed here, and the BiTCN-Transformer model is used to make deep learning predictions in two common scenarios—one with a lot of wind power and one with little wind power—to build the uncertainty set for the robust optimisation model. Simulation and comparison experiments are carried out. This article summarises the main work, as follows:
(a) A comprehensive optimisation model is presented for a multi-energy complementary microgrid that integrates electricity, heat, gas, and hydrogen and incorporates a carbon trading mechanism. The multi-energy complementary microgrid model improves how different power sources work together, helping to smooth out changes in energy demand and making sure the microgrid runs steadily and reliably.
(b) We propose a wind power point prediction method based on the BiTCN-Transformer deep learning model, which utilises a nonparametric kernel density model and confidence intervals to construct interval prediction results from deep learning, thereby establishing a box uncertainty set for the robust optimisation model.
(c) The proposed multi-energy complementary microgrid model for electricity, heat, gas, and hydrogen demonstrates considerable benefits in both high- and low-wind-power scenarios. This situation underscores that the integration of a significant proportion of renewable energy is essential for the smooth and efficient operation and management of the microgrid.
(d) Economic analysis demonstrates that microgrid operation under high- and low-wind-power scenarios differs. In the low wind scenario, the total system cost climbs 283% (2.8 times), carbon emission costs rise 314%, power sales revenue drops 24.8%, and HS system costs jump 21.9%. The analysis shows that a high renewable energy penetration is still essential for system cost reduction and efficiency.
(e) The proposed predictive model relies on the variability of wind power and wind speed data from the preceding year. Future models such as GAN can directly generate future wind power output data and establish robust optimisation model uncertainty sets. The suggested model for microgrid energy management can incorporate more renewable energy sources, such as solar power generation, to improve the microgrid’s capacity for renewable energy consumption. Meanwhile, model-free reinforcement learning methods, as an emerging approach in microgrid energy management, can achieve desired results and should be prioritised in future research.