Optimal Dispatching of Smart Hybrid Energy Systems for Addressing a Low-Carbon Community

: A smart hybrid energy system (SHES) is presented using a combination of battery, PV systems, and gas/diesel engines. The economic/environmental dispatch optimization algorithm (EEDOA) is employed to minimize the total operating cost or total CO 2 emission. In the face of the uncertainty of renewable power generation, the constraints for loss-of-load probability (LOLP) and the operating reserve for the rechargeable battery are taken into account for compensating the imbalance between load demand and power supplies. The grid-connected and islanded modes of SHES are demonstrated to address a low-carbon community. For forecasting load demand, PV power, and locational-based marginal pricing (LBMP), the proper forecast model, such as long short-term memory (LSTM) or extreme gradient boosting (XGBoost), is implemented to improve the EEDOA. A few comparisons show that (i) the grid-connected mode of SHES is superior to the islanded-connected mode of SHES due to lower total operating cost and less total CO 2 -eq emissions, and (ii) the forecast-assisted EEDOA could effectively reduce total operating cost and total CO 2 -eq emissions of both modes of SHES as compared to no forecast-assisted EEDOA.


Introduction
Nowadays, the worldwide power system would rapidly develop towards a lowcarbon smart community energy system where intermittent renewable energy sources such as solar PV and wind energy should rely on energy storage systems to keep an uninterrupted energy supply [1,2].In coping with peak loads of the community energy system with non-renewable and renewable energy resources, the hybrid energy management system has become a crucial mechanism to ensure distributed energy resources in intelligent, secure, reliable, and coordinated ways [3][4][5].The hybrid energy management system was responsible for power dispatching, energy savings, and allocating power among generators, so a prediction-based optimization strategy could play a role in balancing the use of diesel generators and emergency batteries [6].Regarding the optimal dispatching of intermittent renewable energy sources, a probabilistic approach was used to solve the economic dispatch problem considering the uncertainty of wind power generation and generators' reliability [7]; however, the uncertainty and variability problem of these sources has brought many complications to handling the complex hybrid energy systems.From economic, energy, and environmental perspectives, the integration of renewable energy sources in the electrical grid was a promising way to reduce the total operating cost according to different operational scenarios [8], but the optimal dispatching of intermittent renewable energy and non-renewable sources was not addressed.
For addressing a smart hybrid energy system, a machine learning-based optimized energy dispatch scheme was implemented to maintain the voltage stability in a power plant operated in an islanded mode [9], a smart hybrid energy system used the genetic algorithm and artificial neural networks to predict hourly electricity demand of the US cities of Fargo and Phoenix [10], and an evolutionary hybrid system which combined statistical and machine learning techniques was used to predict the energy consumption in smart grid network installed in a residential building [11].For improving the load demand forecasting, the artificial neural network technique was validated for short, medium, and long-term load forecasting [12], a deep learning framework was implemented to forecast electricity demand by taking care of long-term historical dependencies [13], the ensemble aggregation algorithms composed of wavelet learners were trained with a subset of selected features to execute the short-term load forecasting [14], and the uncertainty analysis of forecasting errors of PV power and load demand could be compensated by setting an adequate operating reserve (OR) [15] or treated as the dispatchable unit to cover uncertainties in load forecasting [16].
Regarding intermittent renewable energy forecasting, a deep learning-based ensemble approach was demonstrated to learn the uncertainties in wind power data [17], the machine learning models of random forest (RF) and extra trees were well suited for predicting stochastic photovoltaic (PV) generation [18], and a combination of neural networks and support vector machine (SVM) could increase the reliability of wind power forecasting [19], and the Gaussian process regression (GPR) as a probability density forecasting method could handle the uncertainties in power load data in a principled manner [20].Regarding the technological issues for the smart hybrid energy system, an optimal load dispatch of a community-based hybrid energy system using deep learning for solar power and load forecasting could reduce total cost [21], the renewable energy sources in microgrids could ensure the environmental benefits due to the low avoided social costs of carbon [22], the presence of the battery storage system in the power generation sector could reduce the operating cost and improve energy utilization of community-based hybrid energy system [23], and the variance of state-of-charge (SOC) of the battery was tested according to quantifying cumulative impacts of stochastic forecasting errors [24].
In this paper, a smart hybrid energy system (SHES) using a combination of battery, PV system, and gas/diesel engines is served as the sustainable microgrid.The SHES is operated in the grid-connected or islanded modes for a community in New York City.The proposed configurations of SHES are shown in Section 2. The predictions of load demand, PV power, and locational-based marginal pricing (LBMP) by using selected forecast models such as linear regression (LR), logistic regression (LogR), feedforward neural network (FNN), recurrent neural network (RNN), nonlinear autoregressive exogenous model (NARX), Gaussian process regression (GPR), support vector machine (SVM), random forest (RF), extreme gradient boosting (XGBoost), and long short-term memory (LSTM) are shown in Section 3. The hour-ahead and day-ahead forecasting strategy is built from Level 1 to Level 3. Notably, Level 3 shows the blending models by using proper forecast models such as NARX, LSTM, and XGBoost.The economic/environmental dispatch optimization algorithm (EEDOA) for minimizing the total operating cost or CO 2 emissions of the SHES system is shown in Section 4. In order to address the reliable electricity supply and cope with forecasting uncertainties, the loss-of-load probability (LOLP) and the operating reserve (OR) are involved in the EEDOA.The comparisons of SHES in grid-connected or islanded modes are described in Section 5.The results show that the grid-connected mode is superior to the islanded mode due to the main grid with lower LBMP.

Smart Hybrid Energy System
In this study, the grid-connected mode of the smart hybrid energy system (SHES) is depicted in Figure 1, where the power source is a combination of a highly efficient gas engine (P ge ), a diesel engine (P de ), a photovoltaic (PV) system (P pv ), an environmentallyfriendly liquid battery (P sb ), and the main grid (P mg ).Notably, the DC/DC converter with prescribed efficiency (η con ), the DC/AC inverter with prescribed efficiency (η inv ), and the efficiency of the electrical generator with the prescribed efficiency (η ge ) are specified.Natural gas and diesel are assumed to be sufficient for the gas engine and diesel engine, respectively.The DC and AC buses are responsible for dispatching power sources to meet the load demand (P load ) according to capacities of devices of power and energy storage, fuel prices, and CO 2 -eq emissions.To address the off-the-grid electricity system for locations not fitted with an electricity distribution system, the islanded (standalone) mode of the SHES does not connect to the main grid.The SHES in the face of the probability of fault occurs due to the uncertainty of renewable power production, so the energy storage system (rechargeable battery) becomes a critical option by restoring the excessive renewable power and compensating for the power gap.
respectively.The DC and AC buses are responsible for dispatching power sources to meet the load demand (Pload) according to capacities of devices of power and energy storage, fuel prices, and CO2-eq emissions.To address the off-the-grid electricity system for locations not fitted with an electricity distribution system, the islanded (standalone) mode of the SHES does not connect to the main grid.The SHES in the face of the probability of fault occurs due to the uncertainty of renewable power production, so the energy storage system (rechargeable battery) becomes a critical option by restoring the excessive renewable power and compensating for the power gap.

Forecasting
The short-term or long-term forecasting of load demand and renewable energy is a useful approach for addressing the SHES operation at lower total operating cost and greater reduction of carbon emissions.In this study, the forecasting algorithms with selected forecast models are addressed as follows.

Forecast Models
(i) Linear regression (LR): LR is denoted as a forecast model which is directly described by

Forecasting
The short-term or long-term forecasting of load demand and renewable energy is a useful approach for addressing the SHES operation at lower total operating cost and greater reduction of carbon emissions.In this study, the forecasting algorithms with selected forecast models are addressed as follows.

Forecast Models
(i) Linear regression (LR): LR is denoted as a forecast model which is directly described by where y LR is the predicted variable, X is the input matrix, β is the parameter vector as the regression coefficient, and ε represents the error vector.The values of β are often fitted using the least-squares approach.(ii) Logistic regression (LogR): LogR is denoted as a forecast model in which the function is described by and the predicted variable y is shown by [25] where x i (i = 1, . . ., n) is the input element, and δ represents the standard logistic function.y LogR is used to model and predict categorical values through the optimization tools in Matlab ® .(iii) Feedforward neural network (FNN): A three-layer FNN is described by [26] where h represents the hidden layer vector, and σ h and σ y are the activation functions.W h , w b , W y , and w y are undetermined weight matrices and vectors.Moreover, Bayesian optimization is utilized to adjust the parameters of the FNN model and improve the validation accuracy of FNN.(iv) Recurrent neural network (RNN): y RNN in the discrete-time settings is described by [27] where U h is additional weight.Moreover, Bayesian optimization is utilized to adjust the parameters of the RNN model and improve the validation accuracy of RNN.(v) Nonlinear autoregressive exogenous model (NARX): This model relates the current and past values of the time series of input and outputs as described by [28] y Notably, ε t represents the error term due to disturbances, and f is some nonlinear functions such as neural network, sigmoid function, and so on.Moreover, Bayesian optimization is implemented to optimize the hyperparameters of NARX and ensure the validation accuracy of NARX.(vi) Gaussian process regression (GPR): y GPR is usually described by [29] where h(x) is the explicit basis function, and f (x) ∼ GP(0, k(x, x )).The Gaussian process (GP) is a set of random variables, and k is the covariance matrix.Moreover, Bayesian optimization is utilized to adjust the parameters of the GPR model and improve the validation accuracy of GPR.(vii) Support vector machine (SVM): SVM is a supervised learning algorithm.y SVM classifies data by finding the best hyperplane β [30] where β is determined by solving the following optimization algorithm Moreover, Bayesian optimization is utilized to adjust the parameters of the SVM classifier and improve the validation accuracy of SVM.(viii) Random forest (RF) [31]: RF is an ensemble learning method for classification and regression.y RF is evaluated through three steps: (i) A decision tree using all the features/variables of interest as an entire dataset; (ii) Bagging is used to reduce the variance of a decision tree; (iii) The random subspace method for constructing decision forests.Moreover, Bayesian optimization is utilized to adjust the parameters of the RF model and improve the validation accuracy of RF. (ix) Extreme gradient boosting (XGBoost) [32]: XGBoost is a decision-tree-based ensemble machine learning algorithm that uses a gradient boosting framework.y XGBoost is evaluated through a combination of software and hardware optimization techniques to yield superior results using fewer computing resources in the shortest amount of time.Moreover, Bayesian optimization is utilized to adjust the parameters of XGBoost and improve the validation accuracy of XGBoost.(x) Long short-term memory (LSTM): LSTM is a recurrent neural network (RNN) architecture used in the field of deep learning.y LSTM is evaluated by [33] ) represent weights of input, recurrent, and bias, respectively.Moreover, Bayesian optimization is implemented to optimize the hyperparameters of LSTM networks and ensure the validation accuracy of LSTM.
The forecast accuracy is validated by measuring the mean absolute scaled error (MASE) where t = 1, n is the set of forecasting sample periods.y j t is the output of forecast model j at a given period t and j = i, ii, . . . .A t represents the real-time value at a given period t.Notably, n = 2 and n = 24 are denoted as hour-ahead and day-head forecasts, respectively.The Bayesian optimization algorithm is a sequential design strategy for the global optimization of a probabilistic model of the objective function, which is available in Matlab ® .In this study, the SHES, a class of community-based hybrid energy systems, is implemented to serve a community in New York City, where load demand, PV power, and locational-based marginal pricing (LBMP) dominate the energy management strategies.Notably, LBMP is the electricity price of the main grid, usually composed of the energy price, transmission congestion cost, and loss cost.Feasible forecasting strategies contribute to reducing greenhouse gas emissions by allocating the priorities of power units and ultimately reduce the operating costs and environmental impacts of SHES.

Forecasting Algorithm
Under the limitations of data sources at prescribed time intervals and the importance of influence, the factors for the hour-ahead and day-ahead forecasting of load demand, PV power, and LBMP are categorized with load demands of one hour, two hours, three hours, and 24 h ahead, (max/min) ambient temperatures, current ambient temperature, temperatures of the heat index, dew point, wind chill, and feels like.Moreover, the forecasting strategy is built from level 1 to level 3.
Level 1: A total of seven forecast models from (i) to (vii) are trained and validated according to selected eleven factors.The corresponding MASE of the hour-ahead and day-ahead forecast models regarding seven forecast models are shown in Tables 1 and 2, Energies 2023, 16, 3698 6 of 19 respectively.It is noted that the forecast models of FNN, RNN, GPR, SVM, and RF could find the MASE for forecasting load demand, PV power, and LBMP at the minimum levels by using Bayesian optimization.Level 3: Referring to a feature-weighted linear stacking method that incorporates meta-features for improved accuracy [34], the blending model adopts the information from Levels 1 and 2 to improve the prediction accuracy.The blending model by LSTM and XGBoost with prescribed coefficients (a, b, c) for the hour-ahead forecasts is shown as Similarly, the blending model by NARX and XGBoost with prescribed coefficients (α, β, γ) for the day-ahead forecast is shown as Notably, these coefficients in Equations ( 11) and ( 12) are determined by minimizing MASE of forecasting load demand, PV power, and LBMP using Bayesian optimization.Moreover, the forecast strategies from Level 1 to Level 3 are described by a flowchart which is shown in Figure S1 in Supplementary Materials.Based on the hour-ahead and day-ahead forecasts in Tables 1 and 2, the blending model could ensure the lowest MASE of forecasting load demand, PV power, and LBMP than other models used in Levels 1 and 2.
The comparisons of the hour-ahead and day-ahead forecasting performances of load demand, PV power, and LBMP are shown in Figure 2a-c, respectively.By using the blending models for hour-ahead and day-ahead forecasting, Figure 2a shows that the hour-ahead load demand forecasting is superior to the day-ahead load demand forecasting as compared to the real-time data of load demand, Figure 2b shows that the hour-ahead PV power forecasting is superior to the day-ahead PV power forecasting as compared the real-time data of PV power, and Figure 2c shows that the hour-ahead LBMP forecasting is superior to the day-ahead LBMP forecasting as compared the real-time data of LBMP.Notably, the day-ahead load demand forecasting fails when they exceed 18 h, and the hour-ahead and day-ahead LBMP forecastings are not qualified, while two LBMP peaks appear at specific periods.
Energies 2023, 16, 3698 8 of 20 The comparisons of the hour-ahead and day-ahead forecasting performances of load demand, PV power, and LBMP are shown in Figure 2a-c, respectively.By using the blending models for hour-ahead and day-ahead forecasting, Figure 2a shows that the hourahead load demand forecasting is superior to the day-ahead load demand forecasting as compared to the real-time data of load demand, Figure 2b shows that the hour-ahead PV power forecasting is superior to the day-ahead PV power forecasting as compared the real-time data of PV power, and Figure 2c shows that the hour-ahead LBMP forecasting is superior to the day-ahead LBMP forecasting as compared the real-time data of LBMP.Notably, the day-ahead load demand forecasting fails when they exceed 18 h, and the hour-ahead and day-ahead LBMP forecastings are not qualified, while two LBMP peaks appear at specific periods.

Optimal Power Dispatch Strategy
The priority of power supplies according to the intermittent energy source, carbon emissions, and fuel/electricity prices is taken into consideration to address the optimal power dispatch strategy for the SHES.In this approach, the PV power is the priority unit due to free solar energy and zero emissions, and the battery is the second priority unit to cope with the power gap and meet the limits of the state of charge (SOC) of the battery simultaneously; the gas engine or diesel engine or main grid is the third priority unit to achieve the cost balancing among parallel energy sources.

Operating Reserve
The operating reserve (OR) is added to compensate imbalance between load demand and power supplies and the unpredictable imbalance due to the forecasting uncertainties.For the assessment of forecasting uncertainty, the normal probability density function (npdf) is shown by [15] where  represents the forecasting errors of load demand ( ) and PV power ( ).Both forecasting errors are expressed by where  and  represent the real-time and forecasting load demand at a time period t, respectively.Similarly,  and  represent the real-time and forecasting PV power at a time period t, respectively.The first npdf of the forecasting errors of load demand and PV power is specified to address the operating reserve quantification.Second, the forecasting error of net demand ( ) is described by and

Optimal Power Dispatch Strategy
The priority of power supplies according to the intermittent energy source, carbon emissions, and fuel/electricity prices is taken into consideration to address the optimal power dispatch strategy for the SHES.In this approach, the PV power is the priority unit due to free solar energy and zero emissions, and the battery is the second priority unit to cope with the power gap and meet the limits of the state of charge (SOC) of the battery simultaneously; the gas engine or diesel engine or main grid is the third priority unit to achieve the cost balancing among parallel energy sources.

Operating Reserve
The operating reserve (OR) is added to compensate imbalance between load demand and power supplies and the unpredictable imbalance due to the forecasting uncertainties.For the assessment of forecasting uncertainty, the normal probability density function (npdf ) is shown by [15] where ε represents the forecasting errors of load demand (ε t L ) and PV power (ε t PV ).Both forecasting errors are expressed by where L t A and L t F represent the real-time and forecasting load demand at a time period t, respectively.Similarly, PV t A and PV t F represent the real-time and forecasting PV power at a time period t, respectively.The first npdf of the forecasting errors of load demand and PV power is specified to address the operating reserve quantification.Second, the forecasting error of net demand (ε t ND ) is described by Energies 2023, 16, 3698 9 of 19 where ND t A and ND t F represent the net real-time and net forecasting load demand at a time period t , respectively.η con and η inv represent the efficiencies of the converter and inverter, respectively.Third, the loss-of-load probability (LOLP) or risk is specified where the LOLP is expressed by where P r (ε t ND > 0) represents the probability of ND t F while ε t ND > 0, t = 1, 2, . . ., 24.For accessing the forecasting uncertainty at 12 o'clock (t = 12), Figure 3a,b shows that the forecasting errors of load demand and PV power are symmetric probability distributions, respectively.By Equations ( 17)-( 20), the probability distributions of net load demand (ε t ND ) is depicted in Figure 3c, notably the green part while ε t ND > 0 is adjusted to evaluate LOLP.Through the inverse of the normal cumulative distribution function of ND t F , the daily OR t with 5~30% of LOLP is obtained, which is depicted in Figure 4a.It is noted that the higher LOLP implies a lower OR t .Figure 4b shows the profile of OR (t = 12 h) vs. LOLP; notably, in this study, OR (t = 12 h) is determined at the accepted risk (LOLP) with 10%.
Energies 2023, 16, 3698 10 of 20 where  and  represent the net real-time and net forecasting load demand at a time period t, respectively. and  represent the efficiencies of the converter and inverter, respectively.Third, the loss-of-load probability (LOLP) or risk is specified where the LOLP is expressed by where  ( > 0) represents the probability of  while  > 0, t = 1, 2, …, 24.
For accessing the forecasting uncertainty at 12 o'clock (t=12), Figure 3a,b shows that the forecasting errors of load demand and PV power are symmetric probability distributions, respectively.By Equations ( 17)-( 20), the probability distributions of net load demand ( ) is depicted in Figure 3c, notably the green part while  > 0 is adjusted to evaluate LOLP.Through the inverse of the normal cumulative distribution function of  , the daily OR t with 5~30% of LOLP is obtained, which is depicted in Figure 4a.It is noted that the higher LOLP implies a lower OR t .Figure 4b shows the profile of OR (t = 12 h) vs. LOLP; notably, in this study, OR (t = 12 h) is determined at the accepted risk (LOLP) with 10%.

Optimization
The economic/environmental dispatch optimization algorithm (EEDOA) is described as follows.

Or
The islanded mode: (ii) The upper and lower bounds of power units , <  <  , , <  <  , In Equation ( 21), the conflicting objectives are converted into a single goal with weight coefficients w and , CT represents the total operating cost ($/kWh) of the SHES, which includes the price of main grid electricity and operating costs by using the power of the gas engine and diesel engine, and ET represents the total CO2 emissions (kg CO2eq/kWh) which involve CO2 emissions from the gas engine, diesel engine, and main grid.In Equations ( 22)-( 25), OR can be found if LOLP is fixed at 10% in Figure 4a, and the hour-ahead forecasting of load demand and PV power can be found in Figure 2a,b.

Optimization
The economic/environmental dispatch optimization algorithm (EEDOA) is described as follows.min Subject to (i) The grid-connected mode: Or The islanded mode: (ii) The upper and lower bounds of power units P ge,min < P t ge < P ge,max P de,min < P t de < P de,max P sb,min < P t sb < P sb,max In Equation ( 21), the conflicting objectives are converted into a single goal with weight coefficients w and λ, C T represents the total operating cost ($/kWh) of the SHES, which includes the price of main grid electricity and operating costs by using the power of the gas engine and diesel engine, and E T represents the total CO 2 emissions (kg CO 2eq/kWh) which involve CO 2 emissions from the gas engine, diesel engine, and main grid.In Equations ( 22)-(25), OR t can be found if LOLP is fixed at 10% in Figure 4a, and the hour-ahead forecasting of load demand and PV power can be found in Figure 2a,b.
According to average prices in December 2018 from the U.S. Energy Information Administration (EIA) [35], the fuel prices of natural gas and diesel are given at 0.412 $/m 3 and 0.888 $/L, respectively.According to the information from the New York Independent System Operator (NYISO) [36], the floating grid price (C mg ) is determined by max{LBMP, 5 $/MWh}.Assumed that the maximum power outputs of the gas engine and diesel engine are set as P ge,max = 250 kWh and P de,max = 648 kWh, respectively, the operating costs of the gas engine and diesel engine are obtained according to the following regression models C diesel = 0.888 × 13 + 0.2088496P i de + 0.0000192 Moreover, the total operating cost (C T ) of the SHES is described by According to the IPCC 2013 100-year GWP report by using SimaPro ® , CO 2 emissions of gas engines, diesel engines, and main grid are 0.738 kgCO 2 -eq/kWh, 1.138 kgCO 2 -eq/kWh, and 0.788 kg CO 2 -eq/kWh, respectively.Moreover, the total CO 2 emissions (E T ) of the SHES are described by For the islanded mode of SHES with the prescribed period, C i mg and P i mg are removed from two objectives in Equations ( 31) and (32), respectively.The state of charge (SOC) of the battery for the grid-connected and islanded modes is described by where η d and η c represent the discharging and charging efficiencies of the battery, respectively.E c represents the fixed battery capacity.

Results and Discussion
First, the accepted risk or LOLP is fixed at 10%, and OR t can be found in Figure 4b, the SHES of efficiencies with η con = 0.98 and η inv = 0.88 are specified, and the minimum power outputs of the gas engine and diesel engine are set with P ge,min = P de,min = 0. Second, the specifications of rechargeable batteries include battery efficiencies with η d = η c = 0.7, the battery capacity with E c = 2400 kW, and the operating bounds of charge and discharge of rechargeable battery between P sb,min = −1000 kWh and P sb,max =750 kWh.Third, the EEDOA with specified w is solved by using a GAMS ® solver named the Branch-and-Reduce Optimization Navigator (BARON) [37].Notably, the EEDOA with w = 1 is treated as the economic dispatch optimization problem, and the EEDOA with w = 0 becomes the environmental dispatch optimization problem.Moreover, the optimal dispatching of a smart hybrid energy system via uncertainty analysis, operating reserve, and hour-ahead and day-ahead forecasting strategies described by a flowchart are shown in Figure 5.

Daily Forecasting Comparisons
In order to meet the real-time daily load demand, the economic/environmental power dispatch strategies for the grid-connected and islanded modes of SHES by solving EEDOA are shown in Figure 6a,c and Figure 7a,c

Daily Forecasting Comparisons
In order to meet the real-time daily load demand, the economic/environmental power dispatch strategies for the grid-connected and islanded modes of SHES by solving EEDOA are shown in Figures 6a,c and 7a,c, respectively.(a) In the grid-connected mode, the main grid (gray bar) in Figure 6a,c dominates the main power supply due to limits of energy storage capacity and intermittent solar energy.Due to the main grid with lower LBMP, conventional gas/diesel engines are absent.Using the environmental dispatch strategy by solving EEDOA with w = 0, the power supply from the battery shown in Figure 6c is higher than in Figure 6a, such that the corresponding SOC in Figure 6d is lower than in Figure 6b.(b) In the islanded mode, the gas turbine (orange bar) and diesel engine (gray bar) in Figure 7a,c become the main power supplies due to no main grid.Using the economic dispatch strategy by solving EEDOA with w=1, the diesel consumption (diesel engine) in Figure 7a is higher than in Figure 7c, such that the corresponding SOC in Figure 7b is higher than in Figure 7d.
In the grid-connected mode, the lower bounds of SOC in Figure 6b,d can maintain over 0.1; notably, the power dispatch with a forecast can reduce the upper bounds of SOC as compared to the power dispatch without a forecast.In the islanded mode, the power dispatch with a forecast can reduce the upper bounds of SOC as compared to the power dispatch without a forecast, but it may induce a very low battery (close to 0) risk during a period of one day as shown in Figure 7b,d.It is noted that the hour-ahead forecast power dispatch strategy can reduce QR and decrease operating costs.(a) In the grid-connected mode, the main grid (gray bar) in Figure 6a,c dominates the main power supply due to limits of energy storage capacity and intermittent solar energy.Due to the main grid with lower LBMP, conventional gas/diesel engines are absent.Using the environmental dispatch strategy by solving EEDOA with w = 0, the power supply from the battery shown in Figure 6c is higher than in Figure 6a, such that the corresponding SOC in Figure 6d is lower than in Figure 6b.(b) In the islanded mode, the gas turbine (orange bar) and diesel engine (gray bar) in Figure 7a,c become the main power supplies due to no main grid.Using the economic dispatch strategy by solving EEDOA with w=1, the diesel consumption (diesel engine) in Figure 7a is higher than in Figure 7c, such that the corresponding SOC in Figure 7b is higher than in Figure 7d.
In the grid-connected mode, the lower bounds of SOC in Figure 6b,d can maintain over 0.1; notably, the power dispatch with a forecast can reduce the upper bounds of SOC as compared to the power dispatch without a forecast.In the islanded mode, the power dispatch with a forecast can reduce the upper bounds of SOC as compared to the power dispatch without a forecast, but it may induce a very low battery (close to 0) risk during a period of one day as shown in Figure 7b,d.It is noted that the hour-ahead forecast power dispatch strategy can reduce QR and decrease operating costs.

Monthly Forecasting Comparisons
In order to meet the real-time monthly load demand, the economic/environmental power dispatch strategies for the grid-connected and islanded modes of SHES by solving

Monthly Forecasting Comparisons
In order to meet the real-time monthly load demand, the economic/environmental power dispatch strategies for the grid-connected and islanded modes of SHES by solving EEDOA are addressed, and the corresponding SOC of the battery is shown in Figure 8a-d.These figures show that the day-ahead forecast power dispatch strategy can reduce the upper bounds of SOC as compared to the power dispatch without forecast.Similarly, the day-ahead forecast power dispatch strategy may induce a very low battery (close to 0) risk during a period of one month.It is verified that the power dispatch for the grid-connected and islanded modes of SHES using the long-term forecasting algorithm is feasible.
Moreover, Table 3 shows that the forecast-based economic dispatch optimization strategy can reduce the monthly operating costs (C T ) of SHES in both modes by 1.8~6.1% as compared to it without the use of forecast methods, and the forecast-based environmental dispatch optimization strategy can reduce the monthly CO 2 -eq emissions (E T ) of SHES in both modes by 1.9~5.1% as compared to it without the use of forecast methods.Notably, the monthly operating costs of the grid-connected mode are lower than the islanded mode by 72.6%.From the economic aspect, the grid-connected mode of SHES is superior to the islanded mode of HMG.Moreover, Table 3 shows that the forecast-based economic dispatch optimization strategy can reduce the monthly operating costs (CT) of SHES in both modes by 1.8~6.1% as compared to it without the use of forecast methods, and the forecast-based environmental dispatch optimization strategy can reduce the monthly CO2-eq emissions (ET) of SHES in both modes by 1.9~5.1% as compared to it without the use of forecast methods.Notably, the monthly operating costs of the grid-connected mode are lower than the islanded mode by 72.6%.From the economic aspect, the grid-connected mode of SHES is superior to the islanded mode of HMG.

Figure 1 .
Figure 1.Schematic configuration of SHES with the grid-connected mode.

Figure 1 .
Figure 1.Schematic configuration of SHES with the grid-connected mode.

Figure 2 .
Figure 2. Comparisons of hour-ahead and day-ahead forecasts and real-time data w.r.t.(a) load demand, (b) PV power, and (c) locational-based marginal pricing (LBMP).

Figure 5 .
Figure 5. Flow chart for optimal dispatching of smart hybrid energy system via uncertainty analysis, operating reserve, and hour-ahead and day-ahead forecasting strategies.

Figure 5 .Figure 6 .
Figure 5. Flow chart for optimal dispatching of smart hybrid energy system via uncertainty analysis, operating reserve, and hour-ahead and day-ahead forecasting strategies.

Figure 6 .
Figure 6.The grid-connected mode of SHES using economic dispatching by showing (a) power dispatch stacking and (b) SOC responses for one day and using environment dispatching by showing (c) power dispatch stacking and (d) SOC responses for one day.

Figure 6 .
Figure 6.The grid-connected mode of SHES using economic dispatching by showing (a) power dispatch stacking and (b) SOC responses for one day and using environment dispatching by showing (c) power dispatch stacking and (d) SOC responses for one day.

Figure 7 .
Figure 7.The islanded mode of SHES using economic dispatching by showing (a) power dispatch stacking and (b) SOC responses for one day and using environment dispatching by showing (c) power dispatch stacking and (d) SOC responses for one day.

Figure 7 .
Figure 7.The islanded mode of SHES using economic dispatching by showing (a) power dispatch stacking and (b) SOC responses for one day and using environment dispatching by showing (c) power dispatch stacking and (d) SOC responses for one day.

Figure 8 .
Figure 8. SOC responses for one month: (a) the grid mode of SHES using economic dispatching, (b) the grid mode of SHES using environment dispatching, (c) the islanded mode of SHES using economic dispatching, and (d) the islanded mode of SHES using environment dispatching.

Figure 8 .
Figure 8. SOC responses for one month: (a) the grid mode of SHES using economic dispatching, (b) the grid mode of SHES using environment dispatching, (c) the islanded mode of SHES using economic dispatching, and (d) the islanded mode of SHES using environment dispatching.

Table 1 .
Comparisons of hour-ahead forecast models of load demand, PV power, and LBMP.

Table 2 .
Comparisons of day-ahead forecast models of load demand, PV power, and LBMP.Based on the same eleven factors and the outputs of seven forecast models in Level 1 for an hour-ahead forecast by using XGBoost and LSTM, the corresponding MASE of forecasting load demand, PV power, and LBMP through training and validation are shown in Table1.It is noted that the XGBoost ensures a lower MASE than LSTM in Level 2. Based on the same factors and forecast models for the day-ahead forecast by using XGBoost and NARXNN, the corresponding MASE of day-ahead forecasting load demand, PV power, and LBMP through training and validation are shown in Table2.It is noted that the NARXNN ensures the lowest MASE of forecasting load demand than XGBoost in Level 2, and XGBoost ensures the lowest MASE of forecasting PV power and LBMP than NARXNN in Level 2.

Table 3 .
The grid-connected and islanded modes w.r.t.total operating cost and CO 2 -eq emissions.Activation functions in hidden layer and output layer, respectively W h , w b ,W y , w y Weights inFNNand RNN npdf Normal probability density function ε L , ε PV Forecasting errors of load demand and PV power, respectively, kWh L A , L F Real-time and forecasting load demand, respectively, kWh ND A , ND F Net real-time and net forecasted demand, respectively, kWh P r Probability