Optimal Operation of Isolated Micro-Grids-cluster Via Coalitional Energy Scheduling and Reserve Sharing

Microgrids (MG) cluster are isolated from the utility grid but they have the potential to achieve better techno-economic performance by using joint energy and reserve sharing among MGs. This paper proposes a techno-economic framework for the optimal operation of isolated MGs-cluster by scheduling cooperative energy sharing and real-time reserve sharing for ancillary services based on the cooperative game theory. In the day-ahead scheduling, a coalitional sharing scheme is formulated as an adjustable robust optimization (ARO) problem to optimally schedule the energy and reserves of distributed generators (DGs) and energy storage systems (ESSs), thereby responding to the uncertainties of photovoltaic systems, wind turbines, and loads. These uncertainties are the main reason for power system imbalance which is mitigated by regulating the frequency in real-time and a dynamic droop control process is used to realize the reserves in a distributed manner. This control process is embedded into the ARO problem, which is formulated as an affine ARO problem and then transformed into a deterministic optimization problem that is solved by off-shore solvers Apart from the reduction in the operation cost, the frequency restoration can be improved jointly, resulting in the coupled techno-economic contribution of the MGs in the coalition. The contribution of each MG is quantified using shapely value, a cooperative game approach. Simulations are conducted for a case study with 4 MGs and the results demonstrate the merits of the proposed cooperative scheduling scheme.


INTRODUCTION
Due to the interconnection of distributed energy resources (DERs), e.g., wind turbines (WTs), photovoltaic (PV) modules, distributed generators (DGs) (Ma et al., 2016;Hamidi et al., 2017;Lara et al., 2018) and energy storage systems (ESSs), microgrids (MGs) have been playing a crucial role in the development of smart grid technology. MGs are capable of operating in both isolated and gridconnected modes (Faisal et al., 2018;. Other than ensuring the power balancing status among local DERs and loads, MGs can also exchange power flexibly with external systems (Vahedipour-Dahraie et al., 2020), e.g., the utility grid and other MGs. By developing a more efficient and resilient MGs-cluster, these exchanges cover not only conventional energy sources but also emerging ancillary services, especially for isolated MGs-cluster with high penetration of schedulable DERs (Pourghasem et al., 2019).
The optimal operation of isolated MGs was generally investigated considering the uncertainty of schedulable DERs using stochastic optimization (Hu et al., 2016;Shi et al., 2019) and robust optimization (Ghahramani et al., 2019;Liu et al., 2019). In a grid-connected mode, the MGs-cluster is created by connecting them and the distribution network (Luo et al., 2020). Due to cluster formation and grid-connection, each MG utilizes the local grid resources Ghadi et al., 2019;Mostafa et al., 2020), as well as those of other MGs Gao et al., 2017;Ali et al., 2019;Toutounchi et al., 2019).
Regarding the coalitional operation of an MGs-cluster, an energy management problem was extended to a multi-MG in Purage et al., 2019) to minimize the cost. The amount of production cannot be controlled in uncontrollable energy sources; therefore, in (Purage et al., 2019), a controllable distributed energy re-source (CDER) was presented such as DGs and ESS where the production amount can be controlled by the energy management system. Energy management approaches for the utilization of energy resources in MGscluster and the grid were presented in (Zhang and Xu, 2018). This approach successfully decreases the volume of energy acquired from the grid which significantly increases the MG profit. In (Aktas et al., 2017), a stochastic bi-level model that provided an effective solution for the coordinated operation of the MGs-cluster was proposed. In (Simões et al., 2016), a strategy was recommended for the exchange of information between MGs-cluster to enhance the coordination among the MGs to increase the profit and reduce the operational cost of each member of the cluster. In (Xie et al., 2017), an economicprobabilistic model was presented for the balanced exchange of energy between the MGs-cluster by controlling the energy resources and loads of the MGs.
The stability of the power system is achieved when the generation and load are in equilibrium. However, due to the possibility of errors in the day-ahead forecasted outputs of PV, WT, and load demand, the real-time outputs exhibit fluctuations in the frequency. The scheduling of the controllable DER (CDER) output must be readjusted according to the output of the PV, WT, and load demand to achieve frequency stability (Lin et al., 2018). The isolated MGs-cluster requires a robust frequency regulation that depends on the three-level hierarchical energy management system, i.e., primary, secondary, and tertiary control level (Pinzón et al., 2018). The primary control level is focused on the automatic voltage and frequency control of the inverter-interfaced DERs (IIDERs) (Castilla et al., 2019). For secondary control, researchers have implemented the droop-based control method to model the frequency security in energy management (EM) problem. It should be noted that the dependence of IIDERs on MG frequency is insubstantial, however, to keep the power sharing strategy more secure from over-heating risks, the more advanced P-f droop control method is used (Arani and Mohamed, 2017). The highest control level is the tertiary control when primary and secondary levels are insufficient for frequency excursions; this is executed by the MGs-cluster control center (MGCCC) (Basso et al., 2012). For reserve sharing, a linear quadratic regulatorbased technique is used to control the CDERs instead of the traditional proportional-integral derivative-based controller (Ketabi et al., 2017). The fluctuations of the renewable energy sources (RES) significantly influence reserve sharing in the MG and the existing droop control method should be modified to handle RES uncertainty .
In (Rokrok et al., 2018), a contributing factor was introduced for reserve sharing among MGs and the grid to ensure that the system is in equilibrium with the load demand and that the economic impact due to reserve sharing is distributed among the MGs. Further-more, ancillary services regarding frequency support and voltage regulation could be potentially introduced by MGs (Anvari- Moghaddam et al., 2017).
The existing literature indicates that: 1) previous studies on MGs-cluster have mostly considered energy collaboration, reserve cooperation, and economic benefits; besides, the MGscluster are connected to the distribution network. However, power system constraints were not considered and their effect on power quality was neglected; the quality is affected due to the transient nature of PVs and WTs because imbalances in the power supply and demand occur. 2) To maintain the power system in equilibrium, market-based regulation services are provided by different MGs in a cluster; however, the coordination of these services and the provision of economic benefits for the MGs have not been considered.
To address these problems, we propose a scheduling model for energy sharing and reserve sharing for ancillary services to achieve the optimal operation of isolated MGs-cluster. The main contributions of this paper are twofold.
(1) A techno-economic framework is proposed for the optimal operation of isolated MGs-cluster by scheduling cooperative energy sharing and real-time reserve sharing for ancillary services based on the cooperative game theory. (2) An economic subsidy sharing between MGs-cluster members is achieved by determining the Shapley values of the coordinated distribution of economic benefits. In the coalitional operation of the MGs-clusters, the Shapley values are used to allocate economic benefits to individual MGs 2 COALITIONAL SCHEDULING OF ISOLATED MICROGRIDS-CLUSTER

Isolated Microgrids-Cluster System
The typical structure of MGs-cluster is shown in Figure 1, it includes multiple interconnected MGs. Each MG consists of DGs, WTs, PVs, ESSs, and loads, which are managed by the corresponding MG control center (MGCC). The MGCC is responsible for information acquisition from the respective MG and information exchange with the external systems. All MGs are integrated into a ring configuration with NB buses and NL lines; this represents the MGs-cluster that is supported by the MGCCC. The MGCCC is responsible for the secure and efficient operation of the MGs-cluster by providing energy and ancillary services, e.g., regulation of reserves and sharing among MGs across multiple scheduling and control processes.

Operating Process of Microgrids-Cluster
Generally, the operating process of the MGs-cluster includes dayahead scheduling and reserve sharing for real-time frequency regulation (see Figure 2). In the day-ahead scheduling, the forecasted power output of PVs, WTs, and loads Ullah et al., 2019), as well as the technical information of DGs and ESS, are sent to the MGCCC by each MGCC. After receiving the information, the MGCCC implements the joint energy and reserve optimization to optimally schedule the energy and reserve of the DGs and ESSs in each MGCC; besides, the energy exchange and reserve sharing among MGs for each day is determined. The scheduling plan is sent to each MGCC after the joint energy and reserve optimization. In each operating period, the outputs of the DGs and ESSs are adjusted by the corresponding MGCC according to the day-ahead scheduling plan and in response to the actual power outputs of PVs, WTs, and loads. In this way, the day-ahead scheduling is done by MGCC that includes the power output of DGs and ESSs. The realtime adjustment of the DGs and ESSs is implemented in a distributed manner using a droop control method (Xiao et al., 2017). However, the transient nature of the WT, PV, and load demand is not entirely predictable; therefore, the forecasted information rarely matches the real-time data. To maintain the stability of the MG, real-time scheduling is a challenging task; therefore, the MGCC and the MGCCC coordinate energy and reserve sharing (Xiao et al., 2017). When the load demand is lower than the power generation, the MG can provide excess energy and reserve energy to other MGs and the MGCCC provides economic compensation to that MG. On the other hand, when an MG has a shortage of energy, the MGCCC arranges for other MGs to pro-vide energy to the respective MG. In this way, energy and reserves can be shared and exchanged within the MGs-cluster in real-time for frequency regulation.
Consequently, this paper proposes to address the technical aspect of the framework by doing frequency regulation and economic aspect by addressing the energy and reserve sharing within the MGs-cluster. Therefore, we propose a techno-economic framework for optimal operation of isolated MGs-cluster. Formulations for energy and reserve scheduling for single MG are given in the next section. The coalition scheduling and reserve sharing formulation is discussed in Section 4. Details of the economic model are presented in Section 5.

Objective Function
The energy and reserve scheduling problem is formulated as an affine adjustable robust optimization problem, where the uncertainties of PVs, WTs, and loads are depicted as a robust set and mitigated by the DGs and ESSs in the real-time frequency regulation. The objective of the MG scheduling is to minimize the total operating cost (OC) of the DGs and ESSs, which is shown in Equation 1: where C n,t,E G,g and C n,t,R G,g are the DG OC in the case of energy and reserve sharing for the gth DG in the nth MG during the tth time interval. n 1, 2, ..., N MG , and N MG are the number of MGs; g 1, 2,...,N n G , and N n G are the number of DGs in the nth MG. C n,t,E B,k and C n,t,R B,k are the ESS OC in case of energy and reserve sharing for the tth ΔESS in the nth MG during the tth time interval respectively. k 1, 2, ..., N n B , and are the number of ESSs in the nth MG. The details on each item is explained in Section 4.3.

Constraints of Day-Ahead Operation
In the day-ahead operation, the constraints concerning the DGs and ESSs are as follows: Ramp n,dn To minimize the OC, the DGs must operate under the constraints defined in Equations 2, 3. The maximum and minimum outputs

Constraints for Real Time Operation.
To minimize the OC in real-time, the following constraints must be satisfied. The constraints concerning DGs and ESSs are as follows: Ramp n,dn G,g ≤ p n,t G,g,f + Δp n,t G,g,q − p n,t−1 G,g,f + Δp n,t−1 G,g,q ≤ Ramp n,up The constraint Equation 9 represents the power capacity limit of DGs, where Δp n,t G,g,q is the change in the qth control level in the gth DG output in the nth MG in the tth time. The index qϵQ denotes that the hierarchical control level is equal to the pri (primary) and sec (secondary) control level. The constraints Equations 11, 12, 15, 16 are the limits of the primary and secondary upward/ downward reserve of the DGs and ESSs respectively. Δp d,n,t B,k,q is the change in the qth control level in the kth ESS output in the nth MG in the tth time. R n,t G,g,q and R n,t B,k,q are define in 4.3.

Real-Time Frequency Regulation
Normally, the primary control, secondary control, and tertiary control are the hierarchical control approach involve in the frequency regulation of MGs-Cluster. As shown in Figure 1, the primary control level, the VSI-based CDER units alleviate the frequency excursions by adjusting their active power outputs in proportion to the frequency excursions (Rezaei and Kalantar, 2015). The primary control has fast response speed and the time scale is between 0.1 ms and 1ms (Wu et al., 2020). However due to inherent errors of the droop controllers, the MG frequency may be stabilizes at a value which may be distinctive to the reference frequency. In such case, the secondary control level, the MGCC can restore the frequency to its reference value by readjusting the active power set-points (Guo et al., 2014). Worth mentioning that, the restoration function should be carried out subject to the MG economic and environmental targets .The response speed of the secondary control is slower than the primary control and the time scale is between 100 ms and 1s (Feng et al., 2017). The tertiary control level is responsible for should coordinate each MG through MGCCC to share active power among them and also regulate the system (de Azevedo et al., 2017;Feng et al., 2017). The tertiary is generally at the slowest level of control and the time scale is in the range of several seconds to minutes .The detailed steadystate model of the droop control function that is shown in Figure 3 is described in (Rezaei and Kalantar, 2015). Furthermore, the control functions corresponding to internal voltage and current controllers have been neglected in the steady state. Worth to be noted, it is assumed that MG is in the steadystate and all the transients and oscillating modes have been died down. The frequency depends on the behavior of the droopcontrolled inverter-interfaced DGs and ESSs, as defined in Equations 19, 20 (Rezaei and Kalantar, 2015) where, m pg and m p,k are frequency droop control gain of VSI base DG and ESS and ω c 8 kHz The Equation 21 ensures that the frequency remains within secure limits; Δf n,t q,max is the frequency excursion limit.
Δf n,t q ≤ Δf n,t q,max The frequency depends on the behavior of the droopcontrolled inverter-interfaced DGs and ESSs at the primary and secondary control levels. It is noteworthy that, at the primary level, the control functions are processed instantaneously in a few seconds, hence the MGCC does not have enough time to change the base set points of the CDERs. Therefore, ΔP n,t G,g,f , Δp n,t B,k,f 0 for all q pri. (Rezaei and Kalantar, 2015). In contrast, at the secondary control level, the MGCC has more freedom to restore its frequency within its available reserve capacity (Ding et al., 2016). Moreover, if the required energy is not sufficient to restore the frequency, the MGCC has to move to the tertiary control level and purchase energy from another member of the MGs-cluster.

Energy Sharing Among Microgrids
The MGCC tries to schedule its DGs and ESSs to match demand and supply within the MG. The MGCCC supervises the MGCC to schedule the DGs and ESSs for energy sharing when other MGs power generation reaches the capacity constraints. Extending the problem Equations 1-21, the day-ahead energy sharing within MGs-cluster is to minimize the energy exchange cost. Equation  22 shows the amount of energy that an MG can exchange (import/export) with the MGCCC. If the value of p n,t Ex,f is positive, it means MGCC will sell energy to MGCCC. On the other hand, if its value is negative MGCC will buy energy from MGCCC. Equation 23 represents the hourly power balances. The power flow constraint between 2 MGs is expressed in Equation 24 (Rezaei et al., 2018). The overall energy exchange must be zero for isolated MGs-cluster as shown in Equation 25. Where, p n,t Ex,f is the scheduled energy sharing among the MGs, where, L represents an N L *(N B -1) matrix of the power transfer distribution factor and explain in detail in (Rezaei et al., 2018).

Reserve Sharing Among Microgrids
In real-time operation, the MGCC utilizes its reserve to address its mismatch first and then participates in reserve sharing to keep the power system in equilibrium; this is defined in Equation 26. The power balance in real-time after reserve sharing is shown in Equation 27 and the power flow constraint between 2 MGs is defined in Equation 28. The sum of the exchanged energy in the isolated MGs-cluster must be equal to zero as shown in Equation 29.
where Δp n,t Ex is the reserve sharing among the MGs and Δp n,t G,g and Δp n,t B,k are the power levels of the DG and ESS that participate in the primary and secondary frequency control.

Microgrid Component Modeling
The MG energy management system usually solves the day-ahead dispatch problem, which is subject to the power balance constraint of the MG and the operational constraints of the MG components. To enable the formulation of this dispatch problem, the cost functions, and the operational constraints of all the MG components are developed in the following paragraphs. The MG generally consists of DGs, ESSs, WTs, PVs, etc. The objective of optimizing the schedule of an MG is to reduce the overall OC, which contains the operational expenses of the DGs and ESSs, as well as the exchange energy cost between the MGs. The basic cost function corresponding to the energy and reserve cost of DGs and ESSs are given as follows: C n,t G,g p n,t G,g a n G,g p n,t G,g + b n G,g C n,t,R G,g qϵQ c n,R G,g,q . R n,t G,g,q C n,t,E B,k a n B,k p n,t B,k and R n,t G,g,q are the charging and discharging power and reserve of the kth ESS. c n B,k is the OC coefficient and c n,R B,k,q is the reserve cost of the kth ESS at control level q.
In the day-ahead scheduling, the MGCC schedules its DGs and ESSs within its capacity constraints to match demand and supply in the MG power system as shown in Equation 34; if the MGCC is not able to match the load and power generation, the MGCCC is responsible for energy sharing from other MGs, as follows: The uncertain nature of PVs and WTs makes it a challenging task to obtain real power output values. Therefore, errors exist in the forecasted value; hence, the real power outputs of PVs and WTs are presented as a sum of the forecast values and errors: p n,t PV,s ∈ p n,t PV,s,f − Δp n,t PV,s , p n,t PV,s,f + Δp n,t PV,s Where, p n,t W,w , p n,t W,w,f , and Δp n,t W,w are the actual power, forecast power, and forecast errors of the wth WT in nth MG in tth time. p n,t PV,s , p n,t PV,s,f ; Δp n,t PV,s are the actual Power, forecast Power, and forecast errors of the sth PV in nth MG in tth time.
Likewise, the load demand p n,t L is expressed as follows: p n,t L ∈ p n,t L,f − Δp n,t L , p n,t L,f + Δp n,t L Where, p n,t L , p n,t L,f and Δp n,t L are the actual load, the forecasted load, and forecast error respectively during the tth time interval, which is displayed in Equation 37.
The discrepancy in the power values ϕ n,t of the nth MG due to the forecast error is defined as follows: where p n,t L,max , p n,t W,w,max , and p n,t PV,s,max are the maximum values of p n,t L , p n,t W,w , and p n,t PV,s , respectively. p n,t L,min ,p n,t W,w,min , and p n,t PV,s,min are the corresponding minimum values. It is evident in Equations 39-44 that ϕ n,t is an interval number and the maximum and minimum values are obtained as follows: The differences between the forecasted and real-time values due to the uncertain nature of PVs, WTs, and load demand might result in instability in the power system; therefore, the MGCC tries to utilize the reserve resources to maintain a stable power system. A new approach for real-time OPF was introduced in (Reddy and Bijwe, 2016) by using the 'best-fit' participation factors (PFs) of each power source. The term ϕ n,t represents the power imbalance to the base point solution; the PF that provides the power source for each reserve is shown in Equations 47, 48. The actual outputs of the DGs and ESSs can be determined with Equations 49, 50. The MGCC will try to balance the uncertainty with its available resources as shown in Equation  51 and if the MG reserve resource hits the capacity constraints, the MGCCC is responsible for reserve sharing from other MGs.

Cooperative Game-Based Energy and Reserve Sharing
The coalitional game for the energy and reserve sharing model is denoted as {N, υ, φ}. The MGs-cluster is denoted by 8 where the number of MGs is N. Therefore, 2 N possible alliances can cooperate for N MG. Furthermore, a 4-MG game comprises 16 possible alliances, including an empty alliance {∅} and the grand alliance {N}. υ denotes the characteristic function for a random alliance S ⊂ 2 N and φ is the vector of payment to be allocated to individual MGs . The MGs-cluster coalitional operation that is used to quantify the economic benefit is based on the coalitional characteristic function. To achieve equal distribution of benefits/turn over to Frontiers in Energy Research | www.frontiersin.org March 2021 | Volume 9 | Article 629131 each member of the cluster, an allocation framework is adopted. In the cooperative environment, the power exchange should consider energy sharing and the MG can provide reserve sharing for ancillary services to other members of the cluster. The MGCCC is responsible for the determination of the optimal energy and reserve sharing. The benefit function π S is formulated as follows: where the total OC of the MGs-cluster is denoted by C S and S is the number of MGs in this coalition. ϕ t represents the total power mismatch in terms of: Equations 45, 46 indicate that the overall power mismatches with the maximum and minimum values are defined as: Therefore, the proposed model of energy sharing scheduling and real-time reserve sharing for the isolated MGs-cluster is defined as follows: where x is the vector of the decision variables, including p n,t G,g and p n,t B,k , where (n 1, 2, . . . . . . . . . , N). The uncertain variables of the MGs-cluster are denoted by u and consist of p n,t W,w , p n,t PV,s , and p n,t L . G(x.u) are the equality constraints, which include Equations 6, 17, 19, 20, 22, 23, 25-27, 29, 51 whereas H(x.u)are the inequality constraints, comprised of 7,[9][10][11][12][13][14][15][16][17][18][19][20][21]24,28,[34][35][36][37][38][46][47][48][49][50][53][54]. Note that "maxπ S (x.u)" is equivalent to "minC S (x.u)" based on Equation 1.
To solve the optimization problem that is shown in Equations 46-48, the uncertain variables have to be determined. One of the best approaches to solve this problem is the affine ARO (Kumar et al., 2017). The off-shore solvers used is CPLEX.

Profit Distribution Between Microgrids-Cluster
In a coalitional game, every alliance S aims to ensure that each member of the game obtains an economic benefit; thus, the characteristic function of each MG union is represented by v(S). Due to the coalition of MGs, it is essential to determine the characteristic function of each union, which indicates that each member makes a profit due to the coalitional mode. The characteristic function is defined as follows: where ω is a single MG in the coalition S. When the MGs operate without the coalition mode, the entire profits acquired by the MGs are ωϵS π ω . The proposed scheduling model for energy sharing and real-time reserve sharing for MGs-cluster in the coalitional game is super-additive (Kumar et al., 2017) as follows: This approach is described in Equation 57 and the simulation results verify that the maximum profit is achieved by the alliance in which all MGs in the cluster participated. Hence for equal distribution of profits among all members of the MGs-figure, the Shapley value is the best approach (Anvari- Moghaddam et al., 2017). The Shapley value is formulated for the nth MG as follows: where |N | are the total number of MGs and the sum extends over all subsets S of S excluding the nth MG. |S | is the number of MGs in S . The formula can be interpreted as follows: considering that the coalition is formed 1 MG at a time, each MG demands its contribution v (S ∪{ n }) − v (S ) as fair compensation; it then uses the average of this contribution over different combinations in which the coalition can be formed. It should be mentioned that the MGCCC is the authorized entity for conducting the benefit distribution.
6 CASE STUDY

Case Description
A cluster of 4 MGs (see Figure 1) is used as a test system for the proposed model. Each MG comprises 1 DG, 1 ESS,1 WT, and 1 PV. The associated parameters of these components are listed in Table 1. Figure 4 shows the forecast values of the output powers of the WT, PV, and load demands; their forecasting errors are 20%, 10%, and 10% , respectively, Furthermore, the power mismatch among MGs due to unpredictable nature of PVs, WTs, and Load are shown in Figure 5. The service fee imposed by the MGCCC on both the buyer and seller MG is 0.005 $/kW (Sampath et al., 2018).

Simulation Results and Discussion
Since the MGs-cluster consists of a system of 4 MGs, 16 different alliances can be formed in the coalitional game. The turn-over of the coalition's MG (1,2,3), MG (1,2,4), MG (1,3,4), MG (2,3,4), and MG (1,2,3,4) are $61. 10, $48.40, $48.53, $46.50, and $71.25 respectively, which is calculated by Equation 61 and shown in Table 2 and Figure 6 The maximum obtained profit is $71.25, which is obtained by the coalition MG (1, 2, 3, 4). The results indicate that if all 4 MGs operate in a coordinated and coalitional Frontiers in Energy Research | www.frontiersin.org March 2021 | Volume 9 | Article 629131 8 manner, the combined profit is maximized. The total economic cost of MG4 is $6.64, demonstrating that MG4 compensates for all its expenses by selling its surplus electricity that is worth $64.42 and $33.02 in energy and reserve sharing respectively. To obtain an economic benefit and it also plays its part to keep the isolated MGs-cluster in equilibrium and stable.
The optimal results of jointed energy and reserve scheduling in term of MG (1,2,3,4) consist of day-ahead scheduling of DGs and ESSs, furthermore, the participation factor (PFs) of DGs and ESSs are shown in Figures 7, 8, respectively The DGs participate in both energy and reserve scheduling but the DG in MG2 operates on a full load, as shown in Figure 7A. Therefore, the respective DG cannot participate in reserve energy as shown in Figure 8A However, as shown in Figure 7B, it is noted that ESSs do not participate in the energy scheduling, specifically MG1, MG2, and MG3, while they focus on participation in reserve energy sharing as presented in Figure 8B, therefore their PFs exceed 0.2 for all time interval. But MG4 will charge and discharge in the first to fourth and the 20th and 24th hour respectively. As a result, the participation of ESS in MG4 is reserve sharing is less than those of MG1, MG2, and MG3 during these time intervals.
The real-time outputs of all CDERs and the exchanged energy in period 5:00 to 5:15 based on the optimal plan are depicted in Figure 9. The output of the WTs in MG1 decreases from 52.2 kW to 41.76 kW, the DG output increases from 180 kW to 200 kW, the ESS discharges 3.26 kW, and 6.10 kW of reserve energy is purchased from MG3 through MGCCC to compensate for the mismatch. The load increases from 180.81 kW (planned value) to 198.89 kW (real-time value).
The real-time outputs of all CDERs and the exchanged energy in period 12:00 to 12:15 based on the optimal plan are shown in   The real-time outputs of all CDERs and the exchanged energy in period 21:00 to 21:15 based on the optimal plan are shown in subsection Figure 9. The output of the WTs in MG1 increases from 42.1 kW (planned value) to 50.52 kW (real-time value), the load increases from 302.70 kW to 332.97 kW, and the PV output decreases from 1.44 kW to 1.296 kW. Since the DG was scheduled to operate on a full load, it cannot participate in reducing the mismatch. Therefore MG1 purchases 8.49 kW from MG3 and 25.14 kW from MG4 through MGCCC to compensate for the mismatch.
Using the obtained optimal coalitional energy and reserve scheduling solution for MG (1,2,3,4), we obtain the values of the    Table 3. Compared with the benefit values for MG1, MG2, MG3, and MG4 presented in Table 2. As presented in Table 2 when MGs operate in isolated mode the turnover in of every MG is null as each MG tries to balance its generation and load as well as DGs also try to follow the load curve in both energy and reserve operation which is shown in Figure 12. In Cooperative mode, each MG tries to balance its generation and load as well to get some benefit by sell surplus energy to other MGs as compare the benefit of MG4 in (Isolated Mode) which is 0$ with the turn-over in (Cooperative Mode) which is 25.56$, the value of such benefit is 25.56$-0$ 25.56$. The other benefit of the cooperative mode of operation is the smooth curve of DG which in other words reduces the operation cost of DG which is shown in Figure 12.

CONCLUSION
This study proposed a techno-economic framework for the optimal operation of isolated MGs-cluster by scheduling coalitional energy sharing and real-time reserve sharing for ancillary services such as frequency regulation caused by the uncertainty of PVs, WTs, and loads. The coalitional economic benefits of each member of a coalition are determined by shapely. A case study was conducted on the Isolated MGs-cluster and simulation results have been investigated in terms of energy and reserve sharing to stabilize the frequency of cluster power systems in real-time which is the technical aspect of our framework. Furthermore, we verify the effectiveness of the proposed coalitional sharing scheme for the economic operation of a cluster, compared with their isolated operation which explains FIGURE 9 | Reserve sharing in the fifth, 12th, and 21st hours.