#### Abstract

In this manuscript, two issues of energy management as well as controlling the emission of pollution in multiple microgrids are followed. For this purpose, a three level optimization problem is developed for simultaneous energy and pollution management. In the proposed model, the combination of microgrids is modeled as a coalition that seeks to maximize the cumulative profits. On the other hand, in the proposed based on the game theory, participation in the pollution permit market is also considered. In the proposed model, it is assumed that the central operator is responsible for the optimal energy and pollution management of all microgrids. The problem facing the central operator is formulated in two levels. The bilevel model is formulated as an MPEC problem. The energy exchanged between the microgrids and upstream network and the share of each microgrid in the pollution permits are the output of the bilevel problem. On the other hand, an optimization problem (third level) is developed from each of the local operators’ points of view. In this problem, how to operate each of the microgrids is determined. The results of studies in this paper show that with the simultaneous management of energy and pollution, the total amount of pollution should be reduced by 8% compared to the case where only energy management is carried out. On the other hand, using the proposed model (three-level) compared to the two-level model, the cost of applying to the whole coalition is reduced by 5%.

#### 1. Introduction

Microgrid, as a new concept in power systems, has changed the structure of a number of activities performed in the power system. An important example is the change in the implementation process of energy management after the presence of the microgrids [1].

The local operators have usually carried out the energy management function in the microgrids. In this function, providing the local loads with meeting the technical and economic conditions are considered as the aim. On the other hand, the central operator seeks to meet the needs of the entire power system.

Therefore, considering the local operators’ decisions by the central system operator is one of the main challenges in the energy management problem, which is investigated in this paper.

Energy management of microgrids is one of the most important topics in many studies in the recent years.

A two level model to optimize the energy management process in a multiple microgrid system is developed in [2]. The energy exchanges between the microgrids and the main network are determined in the upper level. On the other hand, the operation planning for each microgrid is carried out in the lower level.

A bilevel sequential optimization model is proposed in [3] to implement energy management in a multiple microgrids connected to the distribution network. The objective function of the upper level includes minimizing the power losses, bus voltage deviations, and power fluctuations. Also, the overall cost of the multiple microgrids is minimized in the lower level.

The potential cooperative behaviors of multiple grid-connected microgrids to achieve higher energy efficiency and operation economy are simulated in [4]. In this paper the game theory is used to plan the operation of the distribution network with the multiple microgrids.

A stochastic bilevel model is proposed in [5] for the expansion and operation planning of an active distribution network based on multiple microgrids. The cost of the exchange between the multiple microgrid and the main network is considered as the upper level’s objective function.

Technical indexes are defined in the lower level to assess the results of the upper level.

In [6], a multiobjective model is developed to evaluate the impacts of the power supply adequacy, efficiency, voltage profile, and reliability as well as demand response transaction costs in the operation planning of the microgrids.

A new model based on the Stackelberg game theory is proposed in [7] to implement the energy management in the multimicrogrids.

A hybrid metaheuristic multilayer reinforcement learning algorithm is proposed in [8] for optimal coordinated operation of a multimicrogrid system. The proposed model is formulated as a bilevel problem.

In [9], a cooperative strategy is developed for the energy management of the networked microgrids. The daily cost of the system, energy not supplied, and the independence of microgrids are considered in the proposed model.

In [10], an analytical target cascading theory is used to implement the optimal autonomous dynamic planning model for an automated distribution system with microgrids. The power exchange between microgrids and distribution networks can improve dynamic economic planning for coordinated operation.

The decision-making strategy for the distribution network operator with multimicrogrids is proposed in [11], which invites customers using different network accountability designs to manage the network.

A multilayer stochastic algorithm is developed in [12] for energy management considering the active losses, load response, reducing greenhouse gas emissions to reduce global warming and pollution, and uncertainties of renewable energy resources and loads.

In [13], a decentralized sequential control strategy is proposed, for multiple microgrids in island mode and connected to the network, the aim of which is to achieve stability and optimization of microgrids using the proposed strategy.

The authors in [14], provide a strategy for optimal operation of multimicrogrids in peak, smooth, and valley periods. Priorities for producing, charging and discharging, and transferring power between networks and grids and between the grids are determined based on different periods of load and add/deficiency of the power. In [15], energy management in a microgrid is based on a robust optimization method and point estimation.

Probabilistic operation planning in a smart distribution system, considering responsive loads is investigated in [16].

In this manuscript, a new three-level model based on the game theory is proposed for simultaneous energy and pollution management of the multimicrogrids. In the proposed model, each component of the system is considered as a player. Some activities are performed independently by each player. But certain activities are managed by the central operator. The main novelties of the proposed model are as follows:(i)Simultaneous management of energy and pollution in multimicrogrids(ii)Modeling the coalition of the optimal coalition formation based on a MPEC model (first and second levels)(iii)Modeling the correction reactions of microgrids to the game problem answers (third level)

This manuscript is organized as follows: Section 2 introduces the proposed model for the coalition formation. This section also presents the formulation of the proposed model. The simulation results are described in Section 3. Finally, Section 4 provides the concluding remarks.

#### 2. Model Description

##### 2.1. Model Structure

In this paper, a new model for joint energy and pollution management of a multiple microgrid is presented. The structure of the proposed model is shown in Figure 1. Each microgrid includes distributed conventional generation (DCG) unit, wind power plants (WPP), combined heat and power (CHP) unit, boiler (B), energy storage system (ESS), electrical load (EL), and thermal load (TL).

In the proposed model, the multiple microgrids form a coalition.

At the same time, the coalition seeks to maximize the profits of each of the players and also to manage pollution for the area under the management of each of the players. The simultaneous energy and pollution management for the coalition is carried by the central operator. In the energy management process, the optimal amount of the energy exchanges between the coalition participants as well as the upstream network is determined.

For this purpose, in addition to the technical conditions, the economic conditions of the coalition are considered. In order to manage the pollution, the central operator calculates the minimum required pollution permit and buys it from the pollution permit market.

In this manuscript, in order to model the simultaneous management problem, game theory is used from the perspective of the central. In the proposed model, the cooperative game method is used. In this method, the players found a common strategy to maximize the profits of the entire coalition.

As shown in Figure 1, the coalition consists of N microgrid as the players. The framework shown in Figure 2 can be used to model the optimal energy management of the coalition shown in Figure 1. According to this figure, the model consists of three levels. First, a bilevel problem is solved from the central operator’s point of view to determine the obligations of each player. The obligations include the amount of energy exchanged between the players participating in the coalition and the upstream network. Once the obligations are determined, the rules are announced.

Once the obligations are determined, the local operators can manage the energy and the optimal use of the resources available in the local microgrids. The local energy management processes are independently carried out for local microgrids. The local energy management problem can be formulated and solved as an optimization problem for each of the local microgrids. Thus, level three will include N independent optimization problems.

The pollution management mechanism is implemented based on the model shown in Figure 3. According to this figure, the central operator, on behalf of the microgrids, buys the required amount of pollution from the pollution permit market and determines the share of each microgrid according to the problem of pollution management.

##### 2.2. Proposed Formulation

The simultaneous energy and pollution management problem is formulated as a three level problem. At first a bilevel model is developed to determine the pollution permits and energy exchanges between the microgrids and upstream. Then, the operation conditions of the microgrids are determined using a single level problem. In the following, first, the bilevel model of energy and pollution management is presented. After that, the operation problem of microgrids is formulated.

###### 2.2.1. Modeling the Bilevel Problem

The upper level of the coalition management problem is from the central operator’s point of view. Therefore, the objective function in this level is defined as minimizing the cumulative operational cost of coalition participants as follows:

In (1), term 1 models the electricity generation cost of the distributed generation source. Term 2 determines the electricity generation cost of the CHP. The heat production cost of the boiler is calculated by term 3. The operating cost of the energy storage system in charge and discharge modes is determined by term 4. The fifth term calculates the cost of exchanges between the microgrids. The sixth term will also determine the cost of exchanging with the upstream network. The purchase cost from the pollution permit market is calculated using term 7. The upper level constraints are presented accordingly.

The electrical power balance constraint for the coalition is as follows:

The power balance constraint ensures that the power generated by the conventional generation units, CHPs, and wind power plants, the power delivered by the ESSs, and the power imported from the upstream network meet the power needed for provide the loads, charge the ESSs, and deliver to the upstream.

Power exchange with the upstream network is limited using the following equation:

The power imported/exported from/to the upstream network is limited by (3).

Total pollution permit purchased from the pollution market is determined by the following equation:

An interpretation of (4) is that the total required pollution permits is limited by the total pollution permits purchased from the pollution market.

###### 2.2.2. Local Microgrids Formulation

The lower level objective function in the bilevel problem is minimizing the operation cost for each microgrid. In fact, each microgrid participates in the coalition based on the following objective function:

Terms 1 to 5 have been introduced in equation (1). Local microgrid constraints include the following.

*(1) Distributed Conventional Generation Unit Constraints*. The generation capability of the conventional unit is limited by the following constraint [17]:

The minimum and maximum generation of the conventional generation units is limited by (6).

The ramp up and down rates of the conventional power plant in microgrid *i* is determined using the following equations [17]:

Constraints (7) and (8), respectively, determine the maximum ability to increase and decrease production of the conventional generation units.

The pollution produced due to the production of electrical energy by the conventional power plant in microgrid *i* is calculated using the following equation:

According to (9), the pollution produced due to the production of electrical energy by the conventional power plant is in proportion to the electrical energy production.

*(2) CHP Unit Constraints*. The electrical production capacity of the CHP unit is limited by the following constraint [18]:

The minimum and maximum generation of the CHPs is limited by (10).

The ramp up and down rates of the CHP unit in microgrid *i* is determined using the following equations [18]:

Constraints (11) and (12), respectively, determine the maximum ability to increase and decrease production of the CHPs.

The pollution of the CHP unit is determined similar to the conventional power plant using the following equation:

According to (13), the pollution produced due to the production of electrical energy by CHPs is in proportion to the electrical energy production.

The amount of heat generated by the CHP unit in microgrid *i* is calculated by the following equation:

An interpretation of (14) is that the thermal generation of the CHPs is in proportion to the electrical energy production.

*(3) Boiler Constraints*. The thermal generation capability of the boiler in microgrid *i* is determined using the following constraint [19]:

The thermal production of the boiler is restricted by (15).

The pollution produced due to the production of thermal energy by the boiler in microgrid *i* will be determined using the following equation:

According to (16), the pollution produced due to the production of thermal energy by boilers is in proportion to the thermal production.

*(4) Energy Storage System Constraints*. The state of charge of the energy storage system is specified by the following equation [20]:

The stored energy in the energy storage systems at each hour is determined by (7).

The stored energy at the end of each day is determined using the following equation [20]:

Constraint (18) causes the energy remaining in the energy storage system at the end of each day to be equal to the energy available at the end of the previous day.

The power balance constraint for the energy storage is established by the following equation [20]:

An interpretation of (19) is that the total energy spent to charge the energy storage system is equal to the energy delivered by the energy storage system at the time of discharge during the day.

The energy limit for the energy storage system is modeled as follows [20]:

The minimum and maximum stored energy in the energy storage system is limited by (20).

Charging and discharging power constraint of the energy storage system is determined by the following equation:

The minimum and maximum charging and discharging capacity of the energy storage system is restricted by (21).

*(5) General Microgrid Constraints*. The balance of electricity production and consumption in each microgrid is established using the following equation:

According to (22), the balance of energy supply and delivery at each hour will be maintained for each microgrid.

Exchange limit for each microgrid is as follows:

The power imported/exported from/to the other microgrids is limited by (23).

The thermal balance relationship in each microgrid is as follows:

According to (24), the production of the thermal energy at each our is equal to the consumed thermal energy.

The pollution limit for each microgrid established by the following constraint:

According to the above constraint, the total pollution produced by power plants, boilers, and CHPs must be less than the pollution permit assigned to each microgrid.

In this manuscript, the coalition management is formulated as a bilevel model according to Figure 4. The amount of energy and pollution permits exchanges is determined at the upper level. The operational decisions are determined for local microgrids in the lower level. Thus, the proposed model becomes a mathematical program with equilibrium constraints (MPECs).

The structure of the proposed MPEC problem is shown in Figure 4. The main-dual conversion method is used to solve this problem. In the method used, all complementary conditions are replaced by a strong double equation [21].

In this paper, the wind power plants production is modeled using the probabilistic distributed function. For this purpose, the random nature of wind speed is simulated by the Weibull probabilistic distribution function as follows [12]:

Also, the electrical output power of the wind turbine is determined as follows:

###### 2.2.3. Third Level Formulation of the Proposed Model

The bilevel model determines the energy exchanges between the microgrids and upstream network. The share of each microgrid in the pollution permits is also determined.

After solving the bilevel optimization problem, the operational planning problem for each microgrids is solved in the third level. This problem is modeled single level from the perspective of local operators. The formulation of the third level problem is similar to lower level problem explained in Section 2.2.2.

The framework of the proposed model is presented in Figure 5. The first and second levels of the problem are solved in the form of a bilevel problem (MPEC problem). The bilevel model determines the energy exchanges between the microgrids and upstream network. The share of each microgrid in the pollution permits is also determined.

After solving the bilevel optimization problem introduced in the previous section and determining the obligations of each of the microgrids, in the third level, how to operate each of the microgrids is determined. This is modeled as a single level optimization problem from the perspective of local operators.

#### 3. Numerical Results

In this section, a system with three microgrids similar to Figure 1 is considered in order to demonstrate the capability of the proposed model. Specifications of conventional power plants, CHP, boiler, and energy storage system in the microgrids are presented in Tables 1–4, respectively. The electrical and thermal loads in the microgrids are shown in Figures 6 and 7, respectively. The wind power plants generations in the microgrids are depicted in Figure 8. The maximum interchange capability between microgrids and with the upstream network is considered 1.7 MW and 2 MW, respectively. The maximum daily pollution production for each microgrid is considered 5000 lb.

In the first step by implementing the MPEC problem in GAMs software, the output of the bilevel model is determined. The output of this model includes the pollution permits purchased from the pollution market and amount of power exchange between different microgrids. The total pollution permits and the share of each microgrid in the pollution permits are shown in Figures 9 and 10, respectively. Examination of the results shows that at 12 to 17 o’clock, the largest pollution permits is purchased to supply electrical and thermal energy in microgrids. The reason for this is the relatively high electrical and thermal load in these hours. According to the results presented in Figure 9, it can be concluded that microgrids 3, 1, and 2 have the largest share in the purchased pollution permits, respectively. Of course, the rate of change in the contamination permit at different times is the same in all three micrograms.

The results show that the second microgrid receives energy and the first and third microgrids will deliver energy. The energy received energy by the second microgrid is presented in Figure 11. The energy delivered by the first and third microgrid are shown in Figures 12 and 13, respectively.

After solving the MPEC model, the amounts of exchanges between microgrids and the share of the pollution permits are considered as the input of the single level problems of operation of microgrids. These problems are solved using GAMs software. The conventional power plants generations in microgrids are depicted in Figure 14.

According to this figure, it can be concluded that conventional power plants in microgrids 1 and 3 have almost the same share in the production of electricity, but conventional power plant in microgrid 2 has less production than other conventional power plants. The electrical generations of CHPs are displayed in Figure 15. The results show that the CHP in microgrid 3, with a large distance compared to other CHPs, has a significant share in the production of electricity, then the CHP in microgrid 1 is next and with a very small difference compared to CHP in microgrid 1, CHP in microgrid 2 generate electrical energy.

The state of charge of the energy storage systems in the microgrids are presented in Figures 16–18, respectively.

The energy storage system in microgrid 1 is charged at hours 7 and 8 and discharged at hours 15 and 17. In microgrid 2, the energy storage system is charged at hour 4 and discharged at hour 15. The energy storage system in microgrid 3 is charged at hours 1, 4, and 5 and discharged at hours 15 to 17.

Studies results show that the thermal generations of the boilers in the first and second microgrids are zero. In this case, the thermal loads are provided by the CHP units. But in the third microgrid, in addition to the CHP unit, the boiler also generates heat. The thermal energy generated by the boiler in the third microgrid is shown in Figure 19.

In order to better analyze the capability of the proposed model, in this section, the total pollution generated by the resources available in the coalition for different amounts of energy exchange capability between microgrids is shown in Figure 20. The results show that by increasing the capacity of 250 kW (15%) power exchange between microgrids, the total pollution is reduced by 6%. This is due to the use of less polluting sources in other microgrids.

One of the main innovations of the model proposed in this paper, compared to the models proposed in other articles reviewed in the introduction, is the simultaneous management of pollution and energy in the microgrids coalition. In order to determine the effectiveness of this model, in Figure 21, the total hourly pollution in the coalition is presented in a situation where pollution management is not carried out. A comparison of Figures 21 and 9 shows that using the model proposed in this paper, the pollution has been reduced by approximately 8%.

In this paper, a three-level model for simultaneous management of energy and pollution is proposed. In order to determine the function of this model in relation to the case where the problem is solved in two levels, Figure 22 shows the total cost of the coalition in two cases of two levels and three levels for different amounts of exchange restriction between micrograms. The results show that by increasing the exchange ability, the cost of applying to the whole coalition decreases. On the other hand, in the three-level model, the total cost is reduced by about 5% compared to the two-level model.

#### 4. Conclusions

A new model for optimal operation planning of a multiple microgrids is presented in this manuscript. The microgrids include the conventional power plants, CHPs, boilers, and energy storage systems. The game theory is considered as the base of the presented model to consider the decision independence of microgrids. The microgrids are the main players and can form a coalition and decide to operation planning in order to provide local loads as well as exchange with other players and the upstream network. For this purpose, the proposed model has been implemented at three different levels. At first the power exchanged between the microgrids and pollution permits’ share of each microgrid are determined. Then, the operation planning of each microgrid is carried out. The results show that according to the proposed model, in addition to manage the energy and pollution by the central operator, the independence of the microgrids is maintained. Examining the results, it can be seen that using the proposed model, the total pollution has been reduced by 8% and also the cost of applying to the coalition by 5%.

#### Nomenclature

*Indices*

i: | Index of microgrids |

t: | Index of hours |

*Constants*

N: | Number of microgrids |

: | Operational cost of the distributed conventional generation unit in microgrid i |

: | Operational cost of the CHP in microgrid i |

: | Operational cost of the boiler in microgrid i |

: | Ope rational cost of the energy storage system charging in microgrid i |

: | Operational cost of the energy storage system discharging in microgrid i |

: | Exchange power price at time t |

: | Pollution permit price at time t |

: | Maximum generation limitation of distributed conventional generation unit in microgrid i |

: | Minimum generation limitation of distributed conventional generation unit in microgrid i |

: | Ramping up of the distributed conventional generation unit in microgrid i |

: | Ramping down of the distributed conventional generation unit in microgrid i |

: | Pollution rate of the distributed conventional generation unit in microgrid i |

: | Maximum electrical generation limitation of CHP unit in microgrid i |

: | Minimum electrical generation limitation of CHP unit in microgrid i |

: | Ramping up of the CHP unit in microgrid i |

: | Ramping down of the CHP unit in microgrid i |

: | Pollution rate of the CHP unit in microgrid i |

: | Heat rate of the CHP unit in microgrid i |

: | Maximum heat generation limitation of CHP unit in microgrid i |

: | Pollution rate of boiler in microgrid i |

: | Charging efficiency of the energy storage system in microgrid i |

: | Discharging efficiency of the energy storage system in microgrid i |

: | Minimum energy capacity of the energy storage system in microgrid i |

: | Maximum energy capacity of the energy storage system in microgrid i |

: | Maximum power limitation of the energy storage system in microgrid i |

: | Maximum power reduced by flexible load in microgrid i |

: | Maximum tradable power for microgrid i |

: | Maximum permissible pollution for microgrid i at hour t |

: | Maximum tradable power with upstream network |

: | Electrical load in microgrid i at hour t |

: | Thermal load in microgrid i at hour t |

V: | Wind speed |

I: | Shape factor of the wind power plant |

C: | Scale factor of the wind power plant |

R_{cw}: | Nominal power of the wind power plant |

VR: | Nominal speed of wind |

VC: | Cut-in speed |

VF: | Cut-off speed |

V: | wind speed |

I: | shape factor |

C: | scale factor |

*Variables*

: | Generation of the distributed conventional generation unit in microgrid i at hour t |

: | Electrical generation of CHP in microgrid i at hour t |

: | Thermal generation of CHP in microgrid i at hour t |

: | Charging power of the energy storage system in microgrid i at hour t |

: | Discharging power of the energy storage system in microgrid i at hour t |

: | Energy purchased by microgrid i at hour t |

: | Energy sold by microgrid i at hour t |

: | Pollution generated by distributed conventional generation unit in microgrid i at hour t |

: | Pollution generated by CHP unit in microgrid i at hour t |

: | Thermal generation of CHP in microgrid i at hour t |

: | Pollution generated by boiler in microgrid i at hour t |

: | State of charge of the energy storage system in microgrid i at hour t |

: | Power purchased from the upstream network at hour t |

: | Power sold from the upstream network at hour t |

: | Energy generated by independent wind power plant at hour t |

: | Total pollution permits purchased from the pollution market at hour t. |

#### Data Availability

The data used to support the study are included in the paper.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.