Abstract
In order to avoid the environmental emission of fossil fuels, renewable energy resources expansion trend is undeniable. This paper analyzes the possibility of cooperation between neighboring independent microgids in a smart grid with renewable resources considering the security assets and vulnerabilities. The ultimate goal is to decrease the overall security risks on the smart grid. Modeling of microgrids cooperation is formulated via a coalition game definition considering the permissible amount of their vulnerabilities. Load shedding minimization can be obtained during cyber-attack occurrence for each member of coalition microgrids. This paper presents a comprehensive algorithm for optimal coalition of neighboring microgrids based on a utility function calculation which has three major components: Budget for Attack (BA), Budget for Defense (BD) and microgrid relationship effectiveness, to contribute more understanding, microgrid relationship effectiveness formulation is developed by the introduction of friction and influence matrices. Proportional Fairness (PF) index is employed to illustrate the improvement of utility function in case of optimal coalition in comparison with non-cooperative state. Microgrids coalition optimal choice based on suggested algorithm is validated by probability attack and loss of load probability (LOLP) simulation for each microgrid before and after the coalition form.
Introduction
Microgrids which mainly consist of renewable resources with complicated control systems, have monitoring and control capabilities. Therefore the possibility of penetration of such systems has increased which may lead to security breaches. The cyber-attack on microgrids causes problems for energy management [1]. Due to the utilization of microgrids in critical conditions, it is essential to establish more robust control systems in order to be resistant against cyber-attacks [2]. Using microgrids with renewable energy resources without cyber security consideration is impossible [3, 4]. The attacks can be effected on the communication protocols between the microgrids with renewable resources such as IEC61850 protocol. In this way a penetration may occur to enable access to the system configuration [5]. There have been numerous researches about economic performance and optimum operation of microgrids [4, 7].
In [8] a model for random costs of microgrids consisting of wind, solar regarding to optimum operation has been introduced. To meet worst case cyber phenomena, optimum policies of cyber defender and attacker should be scheduled. In order to provide the smart grid with a maximum resistance against cyber-attacks, the defender should be allocated its defense resources to improve the system operation and to overcome the system vulnerabilities [9]. The game theory has been used to model attacker’s behaviors and their response as well as remedial strategies of cyber defenders [10, 11]. The formation of the coalition is a dynamic process and by applying merge and split nodes in each coalition as an iterative process, the optimal coalition obtained [12]. The minimum required resources for the optimal defense strategy are extracted due to minimize the risk of power system [13–16]. In [17] coalition game approach is applied for defensive resource allocation and attack preventing that cooperative methods in cognitive radio ad-hoc networks has been analyzed. Microgrid developers and operators should be provided a comprehensive approach to physical and cyber security according to smart cyber facilities. One of the most important factors in cyber security of microgrids is hardening them against cyber-attacks; for this purpose it is essential to consider sufficient budget. Due to any fault occurrence either on the main network or on the microgrids go to islanding mode, an appropriate coalition between microgrids is an effective way for increasing resistance against attacks and minimizing loss of load. Also, the cost of cyber defense of each microgrid will be optimized during their coalition. Cyber-Physical interdependencies will increase the level of attack. This event not only can be very destructive, but also can be very difficult to schedule defense requirement. An intelligent attacker can utilize a set of actions to endanger cyber-physical asset to reach desired goals [17, 18].
This paper presents a structure of cyber security for smart microgrids including renewable resources. In this paper, a cyber security infrastructure based on coalitional game for islanding microgrids is presented. In this regard, a comprehensive algorithm is suggested to coordinate defense countermeasure of microgrids via their cooperation during any type of cyber-attack. With the help of PF index, an optimal coalition of microgrids will be obtained. To illustrate the applicability of the proposed algorithm, a sample grid with four independent microgrids is studied and dual, triple and grand coalition of islanding microgrids is surveyed to achieve the maximum utility of each state. In the next section, some preliminaries about the cyber security and renewable resources is explained. Section 3 will summarize attack methods on the smart grid by focusing on renewable microgrids. Implementation of the coalition game theory of islanding microgrids cyber security is discussed in Section 4. Simulation of proposed algorithm and results analysis will be submitted in Section 5. The conclusion is expressed in Section 6.
Preliminaries of cyber security of renewable resources
The approach of renewable energies (solar and wind) and combined heat and power (CHP) in microgrids leads to numerous discussions about the smart grid. In this respect, distribution automation of a smart grid is introduced and passive defense discussions can be raised. An islanding microgrid in the lack of wind or solar energy provide an opportunity for attackers while an attack on automation system of smart grid may create outages. Also, the attack could be done on the control systems of solar photovoltaic or wind turbines or CHP. Model and characteristic of each studied renewable energy resources is given as follow.
Wind turbine model
Wind power depends on several factors like speed of wind, wind direction and location, but the main factor is wind speed. Wind speed for any wind farm is time varying. There are several methods for modelling of wind speed [19].
Wind power simulation, v
t
is derived as Equation (1) [20]:
The μ
t
is the mean value of recorded wind speed in hour t and σ
t
represents standard deviation. The output power of a wind turbine generator P
W
(v
t
) could be formulated as a nonlinear function of wind speed.
In Equation (2) v c i, v r and v c o indicate of cut in wind speed, nominal wind speed and cut out wind speed respectively. P r is nominal power, (a, b, c and d) are the parameters which should be defined by the factory [21, 22].
Power from photovoltaic mostly depends on sunlight and temperature. The temperature impact in solar power generation is normally modeled as a nonlinear relation. Solar radiation data is used to determine the probability distribution of the photovoltaic characteristics. Photovoltaic output power is related to location of PV arrays [23]. Photovoltaic cell produce current I as Equation (3).
Where V and I are terminal voltage and current of the solar cell. I
P
V is produced current by sunlight, I0 stands for leakage current in diodes, R
S
and R
P
series and parallel resistances of the equivalent circuit, q denotes electric charge (1.60217646 * 10–19C), k is Boltzmann constant (1.3806503 * 10–23), T shows p-n junction temperature and a is an ideality factor of the diode. The output power of solar cell will be calculated by Equation (4) [24].
CHP as a clean and effective approach for heat and electricity production has benefits such as increasing efficiency, reduction of air pollution, reliability improvement. Natural gas, biomass and biogas as a clean energy resources can be used in CHP. Total efficiency of CHP is calculated by Equation (5) [25].
E Gen : the total yearly electricity generation (kWh/yr)
T Gen : the total yearly thermal generation of generator (kWh/yr)
l fuel : the total yearly fuel consumption level of CHP generator (kg/yr)
LHV fuel : the lower heating value of fuel
Attackers may provide more computational resources and advanced attack tools by allocating sufficient money. The probability of a successful attack on a system depends on the cyber defense equipment. A probability function shows the relationship between attacker and defender [26, 27]. It is assumed that there is N target (MG
i
microgrid). The attacker has a total budget for attack (BA) and the defender has a total budget for defending (BD) to protect the system under attacks. The probability of a successful attack is calculated with the assumption of allocating BA and BD to N target.
Overall relation of risk for any target is calculated based on Equation (9).
Threats belong to cyber-attacks have been increased due to more communication and telecommunication. Microgrids have potential for cyber-attacks based on their type and location. There are some methods for improving the security level of microgrids.
Shielding
Electromagnetic pulses are fields of energy which may cause damage to electrical and electronic circuits by voltage induction, hazard, noise or any change in digital information. Unpredicted electromagnetic fields cause high current flow in the network elements and consequently they interfere with the operation of sensitive devices via voltage induction in control, protection and communication cables [28]. By moving the strong electromagnetic weapon in the microgrids, the attacker would be able to disrupt the operation of a variety of devices [29]. Therefore, shielding is the best and the least expensive methods in control and communication cables of microgrids.
Software
There are numerous security software solutions in automation systems of microgrids to increase cyber defense levels (e.g., Antivirus, Firmware, Intrusion Detection, Anomaly Detection, Firewall and Router software, Coding, Cryptography, Authentication, etc.).
Hardware
The hardware tools in the automation of microgrid systems are firewalls, Virtual Private Network (VPN) router, Ethernet switch and gateway to protect network from illegal communication. Generally, firewalls limit digital networks and control traffics. Firewalls both prevent illegal communication and enable certified traffic based on determining rules and configurations. VPN uses encrypted secured connection. To ensure security of network, a VPN should be combined with firewalls [30].
Optimum route selection of communication cables
The route selection in microgrids is the process of finding an optimum route based on some priorities like avoiding electromagnetic interference fields, cost, voltage drop and electromagnetic compatibility [28]. According to the practical conditions of cyber defense structure, the mathematical relations are concluded. Total defense budget for each target (i.e., microgrids) is a function of several variables as Equation (13):
Sh: Shielding (i.e. Communication cable shielding) St: Software(i.e. cd: coding, cry: cryptography and aut: authentication) HE: Hardware equipment (i.e. firewall, VPN switch, router, gateway) RS: Route selection
Defense budget values of the above schemes are indicated by D
Sh
i
, D
St
i
, D
HE
i
and D
RS
i
respectively. These factors are extracted by the approaches such as hierarchical fuzzy analysis. Total defense budget or
The attack techniques to smart grid consisting of microgrids with renewable resources isolated from the main grid are shown in Fig. 1. It is assumed that the attack on the microgrids happens at the lack of wind or sunshine radiation.
Attack paths on smart grid.
Control Panel of each generator in microgrid includes a monitoring and control unit with display screen and operation keys. The configuration operation of each generator can be done through a control panel, as well as access to the instantaneous operation and measuring values. It is assumed that the attacker will be able to reach directly to the control panel by bypassing the cyber defense like firewalls.
Attack on local control LAN of a microgrid
The attacker tries to intrude to the microgrid workstation in the control room. When the attacker successfully penetrates to the control room with the bypassing of default cyber defense program, the application and communication server could be cracked. Then the attacker sends fake trip commands to generators of microgrids.
Attack on the communication link of microgrids
The communication link between the LAN of control center and LAN of local control of microgrids as well as the links between generators are good opportunities for attackers. The attacker may inject false command to the communication link. Traffic patterns are detected by traffic monitoring and communication link analysis.
Attack on the control center LAN of microgrids
The attacker may penetrate to the user interface with the highest access and would be able to use the console to discover the network data. Similar to other scenarios, the attacker will be able to send commands to open the breakers [31].
Access to Intelligent Electronic Device (IED) of each microgrid
A successful crack of password and access to IEDs in any microgrid enables the attacker to have access to the microgrid configuration, such as single line diagrams, communication network and IED schemes.
Modeling of microgrids coalition using game theory
In this section, the models of non-cooperative and coalitional games has been discussed.
Non-cooperative model
A weighted directed graph, G (N
M
, ɛ
M
) is considered where N
M
is the nodes quantity and ɛ
M
is the edge of the graph. Each node shows a microgrid and any connection between microgrids represents a type of dependency. Impact of i node on j node is given with e
ij
. For each edge, there is a weight y
ij
∈ R which shows the link strength between the mentioned nodes. These weights are defined by the matrix W
M
∈ RN×N in Equation (15).
Which 0 < y
ij
< 1 is the impact degree of microgrid i on microgrid j and the e
ij
is the edge between microgrids. Therefore, the investigated distribution network is connected to the main grid via a substation and also is connected to a grid of N renewable microgrids [32]. Figure 2 shows the method that the cyber intruders use to attack lead to blackout a part of a microgrid.
Cyber-attack on microgrids.
The important points for microgrid security are:
The placement of each microgrid in geostrategic areas such as borders, islands, regions far from urban centers and areas with critical loads make them prone to cyber-attacks. Any microgrid with lower generation capacity and critical loads could be depended to microgrids with higher generation capacity. Any microgrid has security resources with a defense budget BD
i
> 0. Any microgrid is under a threat with a budget BA
i
> 0 which cyber attacker has provided to attack. There is no mutual vulnerability for set of studied microgrids. Linear dependencies are assumed for resources. Such dependencies are represented with the linear influence graphs.
The security resource vector of all the microgrids is D : = [BD1, BD2, …, BD
N
] which could be used for defense against security threats and A : = [BA1, BA2, …, BA
N
] is the threat vector of microgrids. Therefore, effective security resources of each microgrid i ∈ N are ((W
M
)
T
. D))
i
. For any microgrid i ∈ N with its own threat and effective security, utility of that microgrid could be expressed by Equation (16).
The functions p (.) and c (.) are profit of resources and threat cost in each microgrid i respectively.
Usually, coalitional game theory is utilized to investigate microgrid cooperative behaviors [33]. A coalitional game is defined as (N, v) in which N is the set of players and v : 2
N
→ R is a function for any coalition S ⊆ N. v represents the total benefit which is obtained by any coalition. In order to construct a coalitional game between MGs for any coalition S ⊆ N, it should be defined the value function v (S). A simple scenario for attack on the microgrids when coalition of microgrids is surveyed can be considered. This approach is applied to achieve appropriate utility and optimized defense budget [33]. Microgrids can be make cooperative groups (i.e. coalition) to improve the security resources (i.e. optimal defense budget) and to reduce effective threats. The matrix W
M
is defined in Equation (17) for a coalition S ⊆ N and two section i, j ∈ N.
A cost function e (F, S) is defined based on friction matrix F and the degree of coalition S. By implementation this concept in the prospective of microgrids, there are microgrids with a suitable organization in comparison with the microgrids that do not have such an infrastructure thus strong microgrid should consider more cost for the coalition. While the organization is grown up, friction is normally increased. Therefore due to variety of idea, possibility of members’ cooperation will be reduced. It causes a coalition formed with few members. In most of real situations, the cost function of coalition S could be specified as a linear function of total friction and size of the coalition which is expressed in Equation (19) [35].
The total amount of demand which should be removed can be represented by LD index (in per unit) in Equation (21). For maximum value of L, LD keeps the frequency in an acceptable limit [37].
Parameter d is a load reduction factor, f is the minimum allowable frequency and f
n
is the rated system frequency. A new algorithm for elements identification of matrix F is presented in Fig. 3. According to this algorithm, it is assumed that in an attack scenario to a microgrid, the largest generation unit loses the supply in the worst case.
Algorithm for extracting the elements of matrix F.
In this condition, if microgrid i try to compensate part of lost load of microgrid j, the total amount of load shedding will be defined according to Equations 20 and 21. The values of F
ij
are calculated based on the load ratio of each microgrid and load reduction factor. The cost is an incremental function of the total friction of graph F (N, ɛ
F
) and the size of the coalition |S|. Therefore, for any coalition S ⊆ N the value of characteristic function in coalitional game theory is stated byEquation (22):
The overall cooperation effective security resources can be written as Equation (23):
The overall vulnerabilities and threats for coalition S is derived from Equation (24).
To simplify the analysis, it is supposed in the rest of the paper that profit function p (.) and threat cost function c (.) are linear that
The value function in Equation (25) is the maximum total utilities by each coalition S ⊂ N. In coalitional game, it is essential to introduce a rule which extracts the value of Equation (25) with the vector ∅ (S). The ∅
i
(S) is the utility of player i ∈ S or the share of MG i ∈ S in the total value v (S). Since the Equation (25) shows the paid cost by a coalition, i.e., a definite amount of money, can be arbitrarily divided between members that it introduce a game with Transferable Utility (TU). There are some fairness criteria (e.g. egalitarian fair, Shapley, nucleolus, proportional fairness and etc.) for sharing the utilities. In this paper proportional fairness (PF) is used for modeling of microgrid utility from Equation (26) [38–40].
As a conclusion, a new structural method for microgrids cooperation in accordance with the coalition game during a cyber - attack is suggested as shown in Fig. 4.
Proposed algorithm.
According to the proposed algorithm, steps to determine the optimal coalition are as follows.
Based on practical approaches of cyber defense and Equations (13 and 14), the defense budget is calculated in each micro grid. It should be noted that the defense budget can be always considered more than the attack budget. Therefore, the attack budget also is estimated. The connection matrix between micro grids (W
ij
)
M
is determined. The utility of each micro grid is calculated in non-coalition state by using the Equation (16). A micro grid is selected randomly. It be checked whether cyber-attack occurs in the selected micro grid or not? Components of the Friction matrix are calculated based on the algorithm which is presented in Fig. 3. The possible coalitions with infected microgrid are formed, and their utilities are determined. Using PF criteria, the optimal coalition of these combinations in stage 6 is extracted. For this purpose, it should also be a total maximum of utility and each member of the coalition have the maximum utility than the othercoalitions. Based on the previous stage, the optimal coalition is determined and the total utility and the utility of its members are also calculated.
For a coalitional game with characteristic form and TU, the summation relationship for two coalition S1 and S2 is as Equation (27) [35].
When merging of two coalitions in a network (or its microgrids) is beneficial, the Equation (27) expresses a quantified criterion.
Besides the great benefits of renewable energy resources, there is actually uncertainty in them. According to studies, the coalition and the combination of microgrids with renewable resources have the least uncertainty. Employing more microgrids with a combination of different types can result in minimum uncertainty. Basically, in the grand type of coalition, there is no any uncertainty [41]. However, according to using microgrids with limited size in our study, the terms of uncertainty has been investigated.
For this aim, in the case of using wind turbine power, it is essential to study the uncertainty of the wind speed. According to the Equations (1 and 2), the wind turbine output power can be determined based on the percentage of its rated power. Also in case of solar PV, the radiation characteristics of the sun can be obtained from a multimode probability model, and the output of the PV modules will be calculated. The PV output power can be attained according to the relation (3) and (4) which is based on the conditions of temperature and radiation of the sun. According to past studies and scenarios about uncertainties of renewable resources, it has been estimated that the deviation of the yearly mean power output from one 20-year period to the next has a standard deviation of 10% or less. Therefore, over the lifetime of a wind turbine, the uncertainty of the wind resource is not considerable [42]. In [43] uncertainty of the wind is considered about (8–10%). Also, different amounts of uncertainty have been estimated for PV resources. For example, the considered value for uncertainty in [44] is about (5% –17%).
Accordingly, the maximum uncertainty for the wind and solar resources is considered 20 percent in this paper. The average output power is considered equal to 0.8 of rated power. Consequently, the proposed coalition game theory method is analyzed with 20 percent as a maximum of uncertainty. Despite of the fact that uncertainty will be reduced in composition of microgrids, but the same value for uncertainty is also considered in the coalitionalgorithm.
Results and discussions
Figure 5(a) demonstrates a sample network with four smart microgrids including renewable resources. Each microgrid supplies a group of consumers. There are different type of renewable energy resources and various loads.
The communication of local control centers and main control center is shown in Fig. 5(b). Cyber defense equipment is considered for studied network. It is observed that microgrids may cooperate and create coalitions according to the importance of location, generation and loads. The proposed model of the coalitional game will be formed to investigate possible cooperation between microgrids based on the resources, threat effects and friction. According to proposed scenario, N represents sets of all microgrids, i.e. N = {MG01, MG02, MG03, MG04}. Table 1 clarifies cyber defense and attack budget in each microgrid.

Investigated smart network.
Cyber defense and attack budget in the sample grid
It should be noted that, generally, the cyber attackers with less resources in comparison with the defenders have more ability. Thus, defenders should provide more defense resources or consider more costs.
The values of mutual effectiveness in the positive influence matrix are selected according to the interaction of microgrids and importance of loads and generating power in the smart distribution grid. For example, since microgrid MG04 has lower generation related to microgrid MG01, positive influence level of
To obtain the optimal coalition, two scenarios are examined in our simulation; one is for without considering any uncertainties and the other is considering uncertainty about 20%. The results of the calculations will be as following.
The results create matrix F that stands for different level of friction between microgrids.
Table 2 summarizes PF criteria results for different microgrid combinations.
PF criteria results in coalition game without uncertainty
This table is arranged for unit price (μ1= 500, μ2= 100). The best dual coalition is the coalition between MG02 and MG03 which has more utility over other arrangements. In other word, the combinations with other microgrids do not obtain more utilities. It is observed that the combination of optimum state, i.e. S = {MG02, MG03} with the other microgrids e.g. {MG02, MG03} and {MG01, MG04} do not lead to significant increase of PF criteria. Triple combination of microgrids, also, does not bring about any increase. Therefore, the best coalition of the microgrids in case of the cyber-attack, is the coalition of microgrids {MG02, MG03}. It can be concluded to achieve more utility, two microgrids MG02 and MG03 should be formed coalition and there is no need for the coalition of MG01 and MG04. In this situation, the ability of the network against cyber-attacks will be increased. As shown in Table 2, coalition {MG02, MG03} represents the highest utility.
Figure 6 illustrates the total utility of optimal coalition in comparison with grand coalition and non-coalition state in relation to friction variation. This graph implies when the friction rate (μ1) is increased, the maximum total utility and size of coalition will be decreased. For example, for μ1 < 631, the formed grand coalition is optimal, it maximizes the total utility for the network. It is essential to emphasise that lower value for friction is not practical value, so formation of grand coalition rarely happens. For 631 ≤ μ1 < 2860, desired coalition is set of MG02 and MG03. It is so crucial to understand that for the grand coalition of μ1= 1500, the utility is only 24015 $ while optimized coalition has the utility of 36685$ which has 53% improvement of utility in comparison with grand coalition.
Optimum coalition in comparison with grand coalition and non-coalition state.
In the values of μ1 above 2860, optimal case is the situation that all microgrids remain non-cooperative.
The results of the calculations according to the considering uncertainties will be as follows. The calculated Friction matrix (F) is resultedbelow.
Coalition payoffs and PF criteria result with considering uncertainty are shown in Table 3. As it can be observed, despite the change in the optimal amount of the coalition utility, the optimal coalition is {MG02, MG03}.
PF criteria results in coalition game with uncertainty
To validate investigated results, probability of attack simulation on optimal coalition microgrids {MG02, MG03} based on Equations (6–12) is carried out. This simulation is performed via given defense budget for each microgrids, by changing of the attack resource to a maximum resource level. The results for two states of non-coalition and coalition are illustrated in Fig. 7.
The probability of attack on microgrids MG02 and MG03 before coalition (a, b) and after coalition (c, d).
Figure 7(a) depicts that in non-coalitional state, the attack probability to the micro grids 2 and 3 would be 0.13 and 0.34 respectively while the maximum assigned budget by the attacker is 2000$.
According to Fig. 7(b), and considering the same situation, the attack probability would be 0.13 and 0.37 with a budget of 4000$. Figure 7(c) and (d) illustrate that the attack probability in coalitional state yields a maximum of 0.15 and 0.19 for the budget of 2000$ and 4000$ respectively. Finally, comparing the results of simulation in Fig. 7 reveals that forming the optimal coalition would affect the enemy cyber-attack probability and wouldlimit it.
One of the other approaches to validate investigated results is using the LOLP reliability index. It has been prepared the method of Monte Carlo simulation (MCS). Simulation has been implemented for the optimal coalition of MG02and MG03.
Figures 8, 9 illustrate the LOLP for MG02 and MG03 before the coalition while Fig. 10 shows the LOLP of the coalition of MG02 and MG03. Figure 10 shows a significant reduction in LOLP in the optimal coalition mode.
LOLP of MG02 in Non-Coalitional mode. LOLP of MG03 in Non-Coalitional mode. LOLP of MG02 and MG03 in Coalitional mode.


This paper presents a structure of cyber security for the smart microgrids with renewable resources in presence of cyber-attacks. Utilizing the coalitional game theory, an algorithm is proposed which defines the most optimal coalition of microgrids. It is also proved that such algorithm minimizes the impact of attacks in case of cyber intrusions. This paper shows that the significant improvement is in the performance of micro grids coalition. In order to model the coalition costs between microgrids in the case of cyber-attacks, load shedding criterion is considered. Also, the uncertainty in the coalition and cooperation of microgrids with renewable resources is applied. It has been shown that the proposed algorithm can be successfully implemented in case of uncertainty. The correctness of the proposed algorithm is confirmed by the simulation of cyber-attack probability and LOLP calculation in coalition of microgrids.
