Data Driven Stochastic Energy Management for Isolated Microgrids Based on Generative Adversarial Networks Considering Reactive Power Capabilities of Distributed Energy Resources and Reactive Power Costs

This paper proposes a two-stage stochastic energy management (EM) in an isolated microgrid (MG) to decide for the day-ahead optimal dispatch. The dispatch aims to effectively manage the MG power sources, including intermittent renewable energy sources (RESs), battery energy storage systems (BESSs), and diesel generators such that the expected operation costs, reactive power costs, spinning reserve, and load shedding are minimized. The Generative Adversarial Networks (GANs) is utilized in this paper as a data driven scenario generation method to model the uncertainties in the output power of the RESs to be used in the stochastic programming formulation. Then, the fast forward scenario reduction algorithm is used to reduce the number of scenarios with the help of SCENRED/GAMS software. Usually, fuel consumption costs of diesel generators are considered to be dependent on active power generation only. However, neglecting the related reactive power costs might result in increased operation costs and deviations in the dispatches from the optimal solutions. Hence, this paper co-optimizes the costs related to both active and reactive powers of diesel generators. In addition, this study considers the reactive power capability of inverter-interfaced distributed energy resources (DERs). Moreover, the detailed models for the different resources are presented, especially for diesel generators where the actual capability curves are used instead of the widely used box constraints. The problem is formulated as a nonlinear programming problem in the General Algebraic Modeling System (GAMS) software and is solved by the CONOPT solver.


INDICES AND SETS
Probability of scenario ''s'' a g , b g ,c g Active power cost coefficients of diesel generators a g ,b g ,c g Reactive power cost coefficients of diesel generators C d Diesel fuel cost $/L or $/gal E max Max induced EMF of synchronous generator ''V'' P g, max Max active power of generator ''g'' P g, min Min active power of generator ''g'' P ch i,max , P ch i,min   Uncertainty in power systems has a significant impact on the optimal decisions in both the planning and operation stages. The uncertainty has tremendously increased due to the high penetration levels of renewable energy sources (RESs) and increased load demands seeking for luxurious welfare with environmental concerns. Uncertainty in modern power systems comes from various sources such as load variations, failure of components, intermittent behavior of RESs, and energy price changes. Classical optimization techniques that prove to be accurate under deterministic conditions fall insufficient in computational ability in the microgrid (MG) environment due to the wider range of uncertainties in the decision variables of MGs. In system operation, it is more complicated to handle uncertainties than in the planning stage. Furthermore, the impact of uncertainties in MGs is higher than that of the conventional power systems due to the small size of the MG which indicates that even small variations would have a salient influence on the MG operation. Neglecting the influence of the uncertainty can negatively affect the total operation schedule such that the final optimal solution may not be the best operating condition [1]. The classical approach to handle uncertainty in power systems is adding spinning reserve that can be utilized when needed. However, this method may not be secure as underestimated reserve leads to reliability issues while overestimation may result in increased costs. Stochastic optimization has a huge literature in uncertainty modeling in power systems applications. Uncertain parameters in stochastic programming are usually represented by scenarios. Each scenario can be seen as a plausible realization of the stochastic variable. However, large number of scenarios is required to perfectly represent the stochastic variables which may lead to intractability and computational complexity problems. Therefore, scenario reduction is required to solve this problem in the expense of some information loss. Hence, in this paper, stochastic optimization is utilized to account for uncertainties in RESs as it is considered the most common method for uncertainty handling in a wide range of applications such as operation research, finance, economics, and engineering as well as its advantages compared to the other methods [2].
Day-ahead energy management (EM) in MGs is widely studied in the literature in order to optimally manage the limited power sources to supply its load demands in the most techno-economical way over a certain time scale. In [3], EM model was proposed for an isolated MG with unbalanced conditions and a novel linearization approach was proposed. Whereas in [4], an EM model with demand response was derived with a smart load estimator in an isolated MG. While in [5], EM model was implemented to minimize the operation costs and emissions for different operating strategies. Also, in [6], dynamic programming was derived to solve the EM problem in MGs to reduce costs and emissions. In [7], EM was used in a high RESs penetration MG to reduce energy cost, power fluctuations, peak load, and emissions while maximizing the reliability. A centralized EM model was utilized in [8] for an isolated MG considering the threephase model to study its effect on optimal operation of the MG. In [9], a mixed-integer linear programming model for the optimal EM of residential MGs, modeled as unbalanced, three-phase system was presented. Also, in [10], a power quality constrained optimal EM for three phases residential MG was developed in the transition mode between gridconnected and islanded operation to minimize the operation costs considering the outage of the main grid.
In the above studies, the uncertainties from RESs were not considered which may affect the optimal dispatch and the VOLUME 9, 2021 calculated operation cost results. On the other hand, many works have taken RESs uncertainties into consideration. For example, in [11], a stochastic-predictive EM was proposed in an isolated MG to account for uncertainty in the RESs power forecast. While in [12], stochastic EM model was presented in a grid connected MG to minimize a multi objective function of costs and emissions with demand response. The work in [13] proposed a stochastic scheduling for an MG to minimize the expected operation costs and power losses while considering the intermittent behavior of RESs. The authors of [14] developed a stochastic scheduling scheme with demand response for an MG. Whereas in [15], the economic analysis and EM of an MG with different battery storage technologies with different characteristics were presented while considering the market price and load uncertainties. Finally, in [16], the stochastic optimization was decomposed into several deterministic sub problems, whose solutions were aggregated using simulations and a cost based rule. Although in the aforementioned studies, uncertainties in RESs were considered in the EM model but the contribution of the reactive power from inverter interfaced distributed energy resources (DERs) was not considered. This leads to loss the opportunity to gain benefits from the reactive power capability of DERs that use power electronic converters. The optimization of reactive power from DERs to allow for ancillary services such as voltage support and reduction of power losses was considered in [17], [18] however, these studies did not consider the costs related to the reactive power of diesel generators. Therefore, optimal dispatch results will be affected and errors in the calculated total operation costs will occur. In addition, most of these studies solved the optimal power flow (OPF) problem either for the active power dispatch or the reactive power dispatch, [12]- [18]. Some studies took the costs of reactive power into account when solving the reactive power dispatch problem, [19], [20]. However, the active power dispatch was not considered. Simultaneous active/reactive power dispatch in the EM problem can lead to accurate operation decisions compared to the separate dispatch for active power or reactive power when executed alone.
In stochastic optimization, the optimization solution is based upon the scenario values and probabilities so the scenario generation method is vital to achieve realistic results. Many of the previous researches focused on the model based scenario generation methods that first attempt to fit probability distributions, then uses Monte Carlo Simulation (MCS) as in [16], [21]- [23] or Latin Hyper cube Sampling (LHS) as in [24], [25] to sample from these probability distributions and generate scenarios. The probability distributions are not guaranteed to be accurate in representing the uncertain variables. Whereas in [26], [27], copula methods were utilized in the scenario generation process. However, it is hard to capture the temporal and spatial dynamics of RESs power profiles depending only on the first and second statistics when using copula methods. Another scenario generation method is the auto regressive moving average (ARMA) that is used to generate scenarios of RESs power profiles from the time series [28]. Furthermore, auto regressive integrated moving average (ARIMA) can be used to generate RESs scenarios for stochastic scheduling of a resilient MG [29]. Although the use of time series has the advantage of its simplicity for implementation, it is prone to misidentification of patterns [30].
Recently, machine learning approaches have been utilized in RESs scenario generation as they better capture the intermittent characteristics of renewables compared to copula or time series methods [30], [31]. In [32], [33], neural network models were trained to either provide time series power generation or occurrence probability of the RESs power scenarios. Compared to copula or time series approaches, these machine learning algorithms may better capture the nonlinear dynamics of RESs. But all of these techniques rely on the careful selection of input features which makes them difficult to be used in practice. Recently, generative adversarial networks (GANs) are gaining a great interest in machine learning and computer vision because they give accurate results and can learn the distribution of the historical data without any modeling [30], [31]. In [30], [31], GANs were used to generate high quality RESs scenarios which correctly capture the rapid variations and randomness in RESs and proved that the generated scenarios have the same visual and statistical properties as historical data.
Based on the previous review, reactive power costs from conventional generators were usually neglected for simplifications which might lead to unexpected costs in the operation of the MG. Moreover, the uncertain behavior of RESs is a critical issue in MG operational planning, and thus, must be modeled accurately. Therefore, this work investigates the impact of the diesel reactive power costs on the overall operation costs. Additionally, the impact of utilizing the reactive power capability of inverter interfaced DERs on the operation costs is studied. Hence, in this paper, a stochastic energy management approach in an isolated MG is proposed based on network-constraint multi-period AC OPF. The isolated MG has a variety of power/energy sources; including diesel generators, wind turbines (WTs), photovoltaic (PV) systems, and battery energy storage systems (BESSs). Therefore, the main contributions in this paper compared to the previous literature can be highlighted as follows: • A two-stage stochastic optimization is proposed for solving the network-constraint multi-period day-ahead energy management problem in an isolated MG to decide for the optimal dispatch and the expected redispatch in the operation stage. The objective is to minimize the total operational costs which include active/reactive power costs, reserve cost, and load shedding cost while considering the uncertainties from RESs output powers.
• Reactive power costs from diesel generators are considered and are co-optimized with active power costs to give a complete picture of the total operation costs with joint active/reactive power dispatches. • The reactive power capability of the inverter-interfaced DERs like wind, PVs, and BESSs with consideration of the capability curves of the inverters is taken into account.
• Generative Adversarial Networks (GANs) technique is utilized as a model-free scenario generation method to model RESs uncertainties. This technique avoids the disadvantages of the model based techniques as it does not require specifying models or fitting probability distributions. Then, the fast forward scenario reduction algorithm is used to reduce the number of scenarios to provide a more tractable model.
• Detailed modeling of the synchronous diesel generators by the consideration of their capability curves not just the widely used box constraints to provide a realistic behavior of these generators. The rest of the paper is organized as follows. Section two presents the modeling of RESs uncertainties. Thus, in this section, the GANs approach is described to generate RESs scenarios and the scenario reduction technique is also discussed. Section three provides the detailed problem formulation of the two-stage stochastic EM model. Section four presents the description of the MG test system while Section five provides the results and discussions. Finally, the conclusions are outlined in Section six.

II. UNCERTAINTY MODELING OF RENEWABLE ENERGY RESOURCES
The uncertainty modeling of RESs in the stochastic programming framework requires two processes, first the scenario generation process and second the scenario reduction process as follows: In stochastic programming, uncertain variables are characterized by scenarios as mentioned before. To generate scenarios for the output power of RESs using GANs, the historical data of RESs power profiles are used as inputs to the GANs. The distribution of the historical data of RESs power profiles is unknown and hard to be modelled. Suppose a noise vector input with a known distribution that is easily sampled from (e.g., Gaussian) is obtained. The aim is to transform a sample drawn from this known distribution such that it follows the historical data distribution (without ever learning the real data distribution explicitly). This can be achieved by simultaneously training two deep neural networks (DNNs); the generator network and the discriminator network, Fig. 1. During each training period, the generator updates its weights to generate ''fake'' samples trying to ''fool'' the discriminator network, while the discriminator tries to tell the difference between the real historical samples and the generated samples. After the training finishes, the generator can identify the distribution of the real data so that the discriminator cannot distinguish whether a scenario came from the generator or from the historical data. Therefore, the generated scenarios are indistinguishable from the real historical data, and become as realistic as possible. More technical details about GANs are explained in [30], [31]. The general architecture of GANs is shown in Fig. 1.

2) SCENARIO REDUCTION VIA FAST FORWARD SELECTION (FFS)
In this paper, fast forward selection (FFS) algorithm is used to reduce the number of generated RESs power scenarios extracted from GANs to reduce the intractability of the problem when a large set of data is used [34]- [36]. The FFS method is the best algorithm when comparing accuracy and it is recommended if the number of preserved scenarios is small (strong reduction) [34]- [36]. The reduction algorithms employ a certain probability distance between the original and the reduced set of the generated scenarios. The probability distance trades off scenario probabilities and distances of scenario values. Therefore, elimination will occur if scenarios are close or have small probabilities. The most common probability distance utilized in the literature is the Kantorovich distance [34]- [36]. FFS starts with empty scenario tree then every iteration the scenario that minimizes the Kantorovich distance between selected and initial set is selected. Then the distance between each non-selected scenario and the selected scenarios is calculated and the scenario that has the minimum distance is selected and the sets of selected and non-selected scenarios are updated. This process is repeated till it ends when the specified number of selected scenarios is reached. Then the probabilities of each non-selected scenario are transferred to its closest selected scenario. Finally, a reduced VOLUME 9, 2021 scenario tree with associated probabilities is obtained to be used in the stochastic EM model instead of the original RESs power scenarios set.

III. TWO-STAGE STOCHASTIC ENERGY MANAGEMENT PROBLEM FORMULATION
The problem objective function aims to minimize the expected system total operation costs, which include both the cost related to the day-ahead dispatch and the expected cost of the anticipated balancing actions to be taken during the actual operation of the MG. In the first stage, the scheduled dayahead power dispatch for diesel generators, RESs, and BESSs are decided without considering the uncertainties. In the second stage, the re-dispatch of the previously scheduled units and load shedding are executed after considering the uncertainties which are represented by the different scenarios.
In this paper, for diesel generators, there are two types related to reserves that need to be considered: • Scheduling and allocation of reserves in the first stage: how much capacity has to be allocated for each day.
The MG operator must ensure that an adequate amount of reserve is kept in generators to face the unpredictable variability of RESs generation.
• Deployment or use of reserves: how the scheduled reserves are utilized in each time period (hourly) as the RESs uncertainty is revealed, which is executed in the second stage.

A. PROBLEM OBJECTIVE FUNCTION
The objective is to minimize the day ahead total active/reactive operation costs in the first stage in addition to the expected re-dispatch and the load shedding costs in the actual system operation i.e. the second stage as follows: where and The fuel cost is a function of the fuel consumption and it is given by the first term in the objective function. Usually, fuel consumption data in (L/h) or (gal/h) at 25%, 50%, 70%, and 100% of the diesel generator power rating is given by the manufacturer. Based on this data, the fuel consumption characteristics can be fitted to a quadratic polynomial function of the active power output and the cost coefficients can be obtained [20]. The scheduled reserve fuel cost is assumed to be linear and added to the fuel costs in the first term. The reactive power costs are given in the second term. The reactive power cost coefficients are related to their corresponding active power cost coefficients by: a g = a g sin 2 ∅, b g = b g sin∅, c g = c g [19], [20].
The third term of the objective function is the second stage expected cost and is composed of two sub terms; the expected deployed reserve costs and the expected load shedding costs depending on each scenario. Where, VOLL is a metric which estimates the cost per unit energy not delivered to consumers. It represents the price consumers would be willing to pay to avoid disruptions [37].

B. FIRST STAGE PROBLEM CONSTRAINTS
These are the constraints pertaining to the first stage (scheduling stage) and involving the first stage variables. These constraints do not depend on the scenarios.

1) FIRST STAGE EQUALITY CONSTRAINTS
These constraints include the active and reactive power balance at each bus, the active, reactive, and apparent power flow through lines, BESSs state of charge (SOC), and preventing the simultaneous charging/discharging of the BESSs for each time slot.
• Active power balance for each time slot and at each bus: • Reactive power balance for each time slot and at each bus : • Active power flow through lines for each time slot: • Reactive power flow through lines for each time slot: • Apparent power flow through lines for each time slot: • BESSs state of charge for each time slot and at each bus: • Prohibiting BESSs charging and discharging at the same time for each time slot and at each bus: • Diesel generator active and reactive power limits for each time slot (Generator capability curves) [38], [39]: a) Prime-mover limits for each time slot: Limits on the mechanical power input from the primemover impose constraints on the active power generation and scheduled reserve.
b) Armature current limits for each time slot: The armature current results in copper losses leading to increased temperature in armature windings and the surrounding environment. This encounters a limitation on generator maximum current flowing in the armature without overheating. The apparent power rating is related to the armature current and the terminal voltage of the generator.
c) Field current limits for each time slot: A maximum limit on the value of the field current is imposed by the heating in the field winding due to copper losses in the field circuit.
• Spinning reserve limits of each generator for each time slot: • Inverter interfaced DERs' capability curves for each time slot and at each bus: In this paper; WTs, PV systems, and BESSs are assumed to have inverter interface with the MG so that reactive power as well as active power could be supplied according to the inverter capability curves. It is possible to represent the constraints based on the converter current and voltage limitations, similar to the synchronous generators, by the following equations [40], [41]: a) Inverter current limits for each time slot: b) Inverter voltage limits for each time slot: • RESs scheduled power limits for each time slot and at each bus: • BESSs state of charge limits for each time slot and at each bus: • BESSs charging and discharging active power limits for each time slot and at each bus: • Line capacity limits for each time slot: • Bus voltages bounds for each time slot:

C. SECOND STAGE PROBLEM CONSTRAINTS
These are the constraints pertaining to the actual system operation and involving second-stage variables (depending on each scenario).

1) SECOND STAGE EQUALITY CONSTRAINTS
These constraints include the active and reactive power balance at each bus, the active, reactive, and apparent power flow through lines, BESSs state of charge, preventing the simultaneous charging/discharging of the BESSs, and load shedding for each time slot and scenario.
• Active power balance for each time slot, bus and scenario: • Reactive power balance for each time slot, bus and scenario : (25) • Active power flow through lines for each time slot, bus and scenario: • Reactive power flow through lines for each time slot, bus and scenario: • Apparent power flow through lines for each time slot, bus and scenario: • BESSs state of charge for each time slot, bus and scenario: (29) • Prohibiting BESSs charging and discharging at the same time for each time slot, bus and scenario: • Active and reactive load shedding at each bus, time slot and scenario: Q lsh i,t,s = P lsh i,t,s tan l (32)

2) SECOND STAGE INEQUALITY CONSTRAINTS
These constraints involve the capability curves and the spinning reserve limits for diesel generators, inverter interfaced DERs capability curves, BESSs SOC limits, BESSs charging and discharging power limits, line capacity limits, bus voltage limits, and load shedding limits for each time slot and scenario.
• Diesel generator active and reactive power limits (Generator capability curves) at each time slot and scenario: a) Prime-mover limits at each time slot and scenario: P g,t + r up g,t,s ≤ P g,max (33) P g,t − r dn g,t,s ≥ P g,min (34) b) Armature current limits at each time slot and scenario: c) Field current limits at each time slot and scenario: • Up/Down deployment reserve limits at each time slot and scenario: • Inverter interfaced DERs' capability curves at each time slot and scenario: a) Inverter current limits at each time slot and scenario:  (40) • BESSs state of charge limits at each time slot and scenario: • BESSs charging and discharging active power limits at each time slot and scenario: • Line capacity limits at each time slot and scenario: • Bus voltages bounds at each bus, time slot and scenario: • Load shedding limits at each bus, time slot and scenario:

IV. TEST SYSTEM DESCRIPTION
The low voltage MG shown in Fig. 2, [40], [42], is used in this paper to implement the proposed EM strategy. An 80 kW diesel generator is connected to Bus 1 to represent the slack bus for this isolated MG. The cost parameters for diesel generators are obtained using the curve fitting MATLAB tool ''cftool'' to fit the fuel consumption data to a second order polynomial function. The specification data for the diesel generators are shown in Table. 1. While the inverter interfaced DERs data are listed in Table. 2. The charging/discharging efficiencies of the BESSs are assumed to be 77% [43]. The maximum and minimum bus voltages are assumed to be 1.05 and 0.95 p.u., respectively. Three types of loads are considered in this system; residential, commercial and industrial with their profiles taken from [40], [42]. It is assumed that load shedding can be done for 0, 25%, 50%, 75% or 100% of the commercial and residential loads at any bus. The cost of load shedding compensation is included utilizing real cost data from [37] and after inflation adjustment, the VOLL for residential and commercial loads are obtained and shown in Table. 3. In addition, the price of the diesel fuel is averaged and inflation adjusted as obtained from [44], [45].
The historical data for wind speeds and solar irradiances and temperatures are obtained from [46] for ten years. Then the WTs and PVs power profiles are calculated with the help of [14], [47], [48]. After that, these power profiles are used as input for the GANs discussed in section II.1 [30], [31]. Accordingly, 500 scenarios are generated for WTs power profiles and another 500 scenarios for PVs power profiles. These   scenarios are then reduced using the FFS algorithm with the help of SCENRED/GAMS software to 5 scenarios for WTs power profiles and 3 scenarios for PV power profiles as the forecast error in wind powers is generally higher than that of PV systems [49], [50]. Therefore, a total of 15 scenarios are utilized to model the uncertain behaviors of RESs. The reduced set of WTs and PVs scenarios are shown in Fig. 3 and Fig. 4, respectively.

V. RESULTS AND DISCUSSIONS
The stochastic day-ahead EM optimization problem is modeled as a nonlinear programing (NLP) problem in the General Algebraic Modeling System (GAMS) environment and is solved using the CONOPT solver. The CONOPT solver is a feasible path solver based on the generalized reduced gradient algorithm. It is well suited for NLP problems with large number of variables and constraints. It can give faster and better results than other NLP solvers such as MINOS or SNOPT. GAMS/CONOPT has many built-in tests and messages that can indicate whether the model has any errors and whether the solution is global or local optimum [51]. The optimization problem is solved with neglecting/considering the reactive power costs of the diesel generators while neglecting/considering the reactive power capabilities from inverter VOLUME 9, 2021 interfaced DERs to investigate their impact on the MG operation while considering RESs uncertainties. Furthermore, sensitivity analyses are performed to investigate the impact of the number of reduced scenarios and the RESs penetration and uncertainty levels. The general framework of the proposed problem formulation and solution procedure is presented in Fig. 5.

A. IMPACT OF NEGLECTING/CONSIDERING THE REACTIVE POWER CAPABILITIES AND COSTS
In this section the optimization problem is solved while neglecting/considering the reactive power costs of the diesel generators as well as neglecting/considering the reactive power capabilities from inverter interfaced DERs to investigate their impact on the MG operation.
In this case, the diesel reactive power costs are not considered and there is no reactive power support from inverter interfaced DERs. Accordingly, the term related to reactive power costs from diesel generators is omitted from the objective function and both RESs and BESSs are able to provide active powers only. The optimized total operation costs in this case are 242,675 $/day. However, the actual total operation costs should be 299,164 $/day as there are 56,489 $/day (reactive power costs) not added. The neglected reactive power costs are calculated as follows; after the optimization is executed, the non-optimized reactive power costs from the dispatched  diesel reactive power, Fig. 6, are calculated using the relevant terms of (1), i.e., the ''C 2 '' term. The generators active power dispatched are shown in Fig. 7.

2) CASE (2): NEGLECTING REACTIVE POWER COSTS WHILE CONSIDERING REACTIVE POWER SUPPORT FROM INVERTER INTERFACED DERs
In this case, the diesel reactive power costs are neglected while the inverter interfaced DERs are assumed to supply reactive power. Hence, the term related to reactive power costs from diesel generators is omitted from the objective function and both RESs and BESSs are able to provide active and reactive powers. The reactive powers produced from diesel generators are slightly decreased compared to Case 1 as shown in Fig. 8. This is because the reactive power costs were not optimized in both cases while in Case 2 some reactive power is supplied from inverter interfaced DERs. In this case, diesel generators can supply active power at a given cost and reactive power at no costs while inverter interfaced DERs can supply both active and reactive powers at no cost. Therefore, the reactive power loads are supplied mainly from diesel generators while the active power loads are mainly supplied from DERs. The diesel generators active power dispatches are nearly the same as Case 1 and is shown in Fig. 9.  The optimized total operation costs per day in this case are 256,153 $ without considering the reactive power costs (31,679 $). This makes the actual total operation costs to be 287,833 $. The diesel reactive power costs in this case are less than the previous case because some of the reactive power is provided from DERs.

3) CASE (3): CONSIDERING REACTIVE POWER COSTS AND REACTIVE POWER SUPPORT FROM INVERTER INTERFACED DERs
This case verifies the impact of utilizing the reactive power capability of inverter interfaced DERs in reducing the operation costs while taking the reactive power costs from diesel generators into account. In other words, the term related to reactive power costs from diesel generators is included in the objective function and both RESs and BESSs are able to provide active and reactive powers. In this case, the optimized (actual) total operation costs per day are 284,537 $, with reactive power costs of 30,589 $/day which are the lowest costs as compared to the previous cases. The reactive power dispatched from diesel generators is reduced compared to the previous cases and shown in Fig. 10. The generators active power dispatched are given in Fig. 11. The different costs for the three cases are tabulated in Table. 4.

B. SENSITIVITY ANALYSES FOR THE STOCHASTIC EM PROBLEM
In this section, the impact of the selected number of scenarios on the isolated MG operation costs and computational complexity is studied through sensitivity analysis. Furthermore, the effect of RESs penetration level and uncertainty level is analyzed.

1) IMPACT OF NUMBER OF SCENARIOS ON MG OPERATION AND PROBLEM INTRACTABILITY
In this section, the effect of the selected number of scenarios on the total operation costs and the time required to solve the problem is analyzed. The utilized EM model here will be considering reactive power costs and reactive power support from inverter interfaced DERs (as Case 3 before). The relation between the number of selected scenarios and the operation costs is shown in Fig. 12, where the total operation costs have different values with the number of scenarios which affects the solution accuracy when scenario reduction takes place. On the other hand, the number of iterations and the execution time are displayed in Fig. 13 as functions of the number of selected scenarios. The number of iterations and the execution time are increased with the increase in number of scenarios which affects the complexity and intractability of the decision making problem which, in practice, needs to be solved in reasonable times to be applicable in real situations. As shown from Fig. 12, the operation cost value tends to be settled after increasing the number of scenarios which means that utilization of around 35 scenarios is enough to represent the whole uncertainty information and at this point the optimization takes 4.2 hours and 35,092 iterations to finish. As presented in Fig. 12, the average operation costs are around 282,000 $/day but can be deviated by ±6,000 $ (error of 4%) according to the selected number of scenarios. In Section V.A, the chosen number of scenarios is 15 to reduce the computational burden as the error in the calculated operation costs is noticed to be small as 0.8 % from the average operation costs. From the above discussions, in the problem of stochastic EM, tradeoffs between the number of scenarios and tractability should be made by the operator according to the system preferences.

2) IMPACT OF RESs PENETRATION AND UNCERTAINTY LEVELS
In this section, the RESs uncertainties are modeled by only three scenarios for simplicity; as forecast, high, and low scenarios with probabilities of 0.6, 0.2, and 0.2, respectively. The RESs power penetration level for either WTs or PVs is defined by setting the forecast scenario to be a percentage of the hourly total demand (x-axis in Fig. 14), while the other two scenarios, low and high, are built as given percentages of the RESs power forecast, below and above respectively. The uncertainty level is defined as a measure of how far from the RESs power forecast scenario the low and high scenarios are. The uncertainty level considered with 10% increments in such a way that c % uncertainty means that the high and low scenarios are equal to the RESs power forecast multiplied by (1 + c/100) and (1 − c/100), respectively. The utilized EM model here is that used for Case 3. Fig. 14 shows the change of the total operation costs as the RESs power penetration increases, each curve represents a different uncertainty level. A decreasing trend in the operation costs can be noticed as the RESs power penetration increases. This intensifies the economic benefits gained from RESs utilization. However, increased RESs penetration level results in increasing of the uncertainties which means scheduling more reserves from the diesel generators that are added to the costs. At nearly the value of RESs forecast equals 35% of the total demand, the RESs power generation can feed nearly all loads. Thus, operation costs start to settle at a certain value while the power produced from the diesel generators are reduced to a very low value.

VI. CONCLUSION
The operation costs of diesel generators usually include fuel costs related to active power only without considering those related to reactive power costs. Moreover, the reactive power support from inverter interfaced DERs is not always utilized. This paper investigated the impact of co-optimizing the fuel costs related to active and reactive powers of diesel generators while considering the reactive power support from inverter interfaced DERs to obtain the optimal dispatch for the available resources of an isolated MG. The costs related to load shedding were also considered in the problem formulation. Moreover, the detailed models for different resources were presented, especially for diesel generators where the actual capability curves were used instead of the widely used box constraints. The problem was formulated as a twostage stochastic optimization problem and was solved in the GAMS environment using the CONOPT solver. The first stage considers the dispatch of resources based on the forecasted data while the second stage considers the expected re-dispatch due to uncertainties. The uncertainties from RESs are usually modeled using scenarios in the framework of stochastic optimization but the common scenario generation methods require knowing the probability distributions which is not always accurate. Therefore, GANs was utilized in this paper as a data driven scenario generation method which can recognize the historical data characteristics for RESs without fitting models or probability distributions. Then, the Fast Forward Selection is utilized to reduce the number of the generated scenarios to prevent intractability issues.
The results presented in the paper showed the possible deviations of the optimal dispatch results and erroneous operation costs when neglecting the reactive power fuel costs related to diesel generators. Accordingly, combined active/reactive power dispatch is essential in the EM of isolated MGs to provide correct results. Moreover, utilizing the reactive power capabilities of inverter interfaced DERs can significantly reduce the operating costs of isolated MGs. Hence, it is recommended to allow inverter interfaced DERs inject reactive power in case of isolated operation rather than operating at a unity power factor.
The number of the selected scenarios affects both the accuracy and the complexity of the EM problem, so that a trade-off between these two should be considered precisely. Moreover, in this paper, the total operation costs are calculated as the RESs power penetration level increases, at different uncertainty levels. A decreasing trend in the operation cost can be noticed as the RESs power penetration level increases as expected. However, this trend is less marked as the uncertainty associated to RESs generation increases due to the increase in the scheduled generator reserves. Hence, the uncertainties in RESs should be accurately modeled in the EM problem especially in small systems like isolated MGs.
Although the stochastic optimization can effectively handle the RESs uncertainties, its computational complexity is relatively high due to the large number of scenarios required to accurately model the uncertain variables even with scenario reduction process that may deteriorate the modeling accuracy. Therefore, future works will be directed to searching for other methods that do not require probability distributions with low computational complexity. Furthermore, in addition to the RESs uncertainties, various sources of uncertainties should be considered such as load variations and component failures.