In this paper, we elaborate a new strategy based on cooperative game theory models to encourage and manage the interactions in a MicroGrid network. The proposed strategy optimizes the cooperation and the energy exchange in a distributed μGrid network. The strategy consists of a two stage algorithm: Coalition formation algorithm which was specifically created to approximate the optimal set of coalitions that return considerable savings. And the Matching game to manage the energy exchange inside each coalition. The performance of our strategy was verified through simulations. These latter show that the losses can be considerably decreased by the use of the proposed strategy: the rate of the loss reduction can reach up to 20% if the two stages are applied on the network. Moreover, the strategy proved to have a fast convergence which makes it operational for real implemented networks.

1 Introduction

The smart grid [1] is considered as the innovation that will bring new philosophies and concepts to the electric grid by enabling the two-way communication between the utility, the components of the grid (transmission network and distribution network) and the end user. The projection of the communication network on the electric grid seems promoting, and gives the chance to countless possibilities to arise.

Among these enthusiastic opportunities driven either by future environmental concerns or by high-tech evolution ambition, we find the smart microgrid (μGrid) system. The US Department of Energy (DOE) defines the μGrid as "A group of interconnected loads and distributed energy resources (DER) with clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid [and can] connect and disconnect from the grid to enable it to operate in both grid-connected or island mode".

The μGrid emerges to be the solution that will ensure the transition of the electric grid from the centralized to the distributed fashion by encouraging the use of the DERs. Besides, the implementation of μGrids can help reduce the human intervention and automate various grid functions, thus, tackling the complexity of the massive deployment of the control strategies required in the future electric grid. Therefore, each μGrid can be considered as node of a larger network, and the smart grid can see the light through the peer-to-peer interconnection of these different nodes, i.e μGrids, that compose the network.

Yet, μGrids implementation faces major challenges, from the installation and testing, passing through protection and stability, monitoring and communication, and finally energy management.

Releasing benefits to consumers in the form of productivity gains and cost reduction will trigger the incentive to implement such systems. To this end, the researchers and government policies must handle the problem of the optimal and efficient exploitation of the heterogeneous resources of energy. Works on this area focus on the internal energy management of the μGrid system, i.e, they consider the μGrid as an integral system and aim to ensure the energy balance between the demand and the supply. Optimal energy management strategies of μGrids include: deterministic optimization, load shifting, stochastic optimization, or a combination of those last.

Optimizing energy usage inside every node proves to be crucial but not sufficient to exploit the full capabilities of the future electric grid. Indeed, one major aspect of the μGrid network is the bidirectional exchange of energy between its components. If the energy is exchanged with the utility, i.e, the μGrid even sell/buy energy to/from the utility. This will undergo a power loss due to the transmission/distribution lines and the transformers. However, by allowing μGrids to collaborate, the costs resulting from the losses will be significantly reduced, especially with the integration of an efficient interactive distributed strategy.

In the last years, cooperative μGrids in distributed networks has become the focus of many contributions. The works suggest strategies that manage and optimize the energy exchange inside the μGrid distribution network. The strategy presented in [2] for example has the originality of managing the exchange among μGrids that are connected by both the alternating current (AC) and the direct current (DC). The strategy respects the operational constraints, and take benefit from the optimal power flow (OPF) relaxation method to deal with the non-convex power flow constraints. The split and merge rules of the coalition formation games were exploited in [3]. The authors calculate the stable partition that returns the optimal payoff. The same logic was slightly reproduced in [4]. To form the coalition, instead of using the split and merge that is NP-hard, the authors propose a hierarchical priority based strategy that is characterized by its high scalability in terms of number of μGrids.

1.1 Our contribution

The paper elaborates a new strategy based on the cooperative game theory models to encourage and to manage the interactions in a μGrid network composed by a certain number of μGrid elements. The proposed strategy optimizes the cooperation and the energy exchange in a distributed μGrid network in order to minimize the power losses. The novelty of the work lays in two points:

Coalition formation algorithm: The proposed algorithm to form the coalition which was specifically created to be adapted to our system model and to approximate the optimal set of coalitions that return considerable savings.

Matching game: The use of matching game theory to manage the energy exchange inside the coalition. The matching strategy was selected due to its ability to match the buyers to their "preferred" sellers in order to manage a proper energy distribution among the μGrids within the same coalition.

The paper is an extension of a contribution published as a conference paper [5]. The conference paper presented the second stage of the strategy: the matching game, which although had significant reduction of the power losses, was not completely optimized. In this paper, we further improve the performance of our strategy by adding another stage: the coalition formation stage. The coalition formation allowed us to divide the network into subsets that return considerable savings. In the manuscript, we compared the results and demonstrated the effectiveness of the new strategy compared with the old one.

The paper outline is as follows. The system architecture is introduced in the next section, the section gives also the mathematical model of the losses and the energy exchange. Section 3 presents the clustering algorithm that was used to form the network coalitions. In Section 4, we propose a matching algorithm to manage the energy exchange inside each coalition. The validation of the proposed solution and the discussion of the output results are given in Section 5. The final section resumes the chapter and gives some relevant conclusions.

2 System model

A μGrid system is mainly composed of a demand load and heterogeneous energy resources (Renewable energy resource, energy storage system, distributed generation units). We consider a μGrid network composed of \(\mathcal {N} \mu \)Grids, and the utility grid as shown in Fig. 1.

At each time step t, each μG i produces a power G_{i}(t) and has a consumption load L_{i}(t) to cover.

Definition 1

We define D_{i}(t)=L_{i}(t)−G_{i}(t) as the net demand of the μG_{i}.

The value of D leads us to split the \(\mathcal {N} \mu \)Grids into two sets: the set of buyers B and the set of sellers S.

The sellers are defined as the set of μGs that have a power surplus, ∀s∈S:D_{s}<0.

The buyers are defined as the set of μGs that have a need, ∀b∈B:D_{b}>0.

The energy exchange is done per hour, thus, the terms energy and power will be used interchangeably (Energy(Wh)=Power(W)×1h=Power(W))

2.1 The losses

In conventional networks, and depending on the trader, the utility grid can be either a seller (if it provides energy to a buyer- μGrid) or a buyer (if it buy the surplus from a seller- μGrid). The energy transfer in an electrical circuit (in our particular case: between an element μG_{i} and the electrical grid) undergoes a loss due to two main reasons [6]:

1

The internal resistance of the distribution lines: The fundamental expression of the dissipated power by internal resistance is given as the squared current passing through the circuit multiplied by the internal resistance of the circuit.

2

The efficiency of the transformer: a transformer is never 100% efficient. Therefore, some of the electrical energy will be lost during the conversion of energy in the transformer.

In this paper, we will adopt the same formula of the losses as expressed in [3] and which take account of the two types of losses cited above:

dist(i,0): Geographical distance between the μG_{i} and the electrical grid.

U_{0}: The transmission voltage over the distribution circuit.

β: The rate of loss during conversion in the transformer.

If the μGrids choose to collaborate, the μGrid network will increase its efficiency. On one hand, each μGrid will choose a partner with which exchanging energy will yield to less losses than with the utility. On the other hand, they will avoid the second term of losses as expressed in the Eq. (1) since the electrical energy will not pass through the transformer.

The equation of losses, if the energy exchange takes place internally between two μGrids (one playing the role of buyer b, and the other as seller s) is as follow:

The dissipated energy, if the energy transfer occurs in the internal μGrid network circuit, is formulated as:

The system (3) is composed of two quadratic equations where E_{sb} and E_{i0} represent respectively the unknown. Solving the equations yield to two different cases. Following, we focus on the case where the seller and buyer are μGs. The case when the utility grid get involved can be treated similarly.

2.2.1 The equation admits real roots

If the equation admits real roots, we select the smallest solution, which in fact, incurs less power losses. Let’s note that solution E_{sb}. The seller will send E_{sb} and the buyer will receive D_{b}.

2.2.2 The equation admits no real root

The fact that the equation has no real root can be explained technically by two reasons. Whether the energy needed by the buyer exceeds the seller capacity, or the seller has the total needed amount but the medium (the cable) can not transfer it all. In this case, the seller will transmit the minimum between the amount \(\frac {U_{1}^{2}}{2R_{sb}}\), which is the maximum power that the cable can transfer and the maximum available surplus |D_{s}|: \(E_{sb}=min\left (\frac {U_{1}^{2}}{2R_{sb}}, |D_{s}|\right)\). The buyer will receive: \(E_{sb} - \frac {R_{sb}}{U_{1}^{2}} \times E_{sb}^{2}\)

3 First stage of the game: coalition formation

Cooperative game theory is related primarily with coalitions, that is, groups of agents, who coordinate with each other to increase their payoffs. The clustering algorithms are one of the famous methods to set optimal coalitions. Clustering is the unsupervised classification of patterns into groups (clusters). Clustering algorithms divide a dataset \(\mathcal {N}\) into several disjoint subsets (clusters), so that the characteristics in each subset shares some common feature - which is often measured by the proximity level according to some defined distance measure. Examples of distance measures include: Hamming distance, Manhattan distance, and Euclidean distance. The last will be utilised in the paper.

The general aim of the most commonly used clustering strategies is to obtain a partition which minimizes the square error. We define the error error_{c} inside a cluster as the sum of the distances of its elements from its center basing on a distance measure function.

The total error of a partition error_{p} is then the sum of all the errors of the clusters included.

$$ error_{p} (C) = \sum_{\forall c \in C} error_{c}(c) $$

(5)

The optimum C^{∗} is defined by \(error_{p}(C^{*})= \{min(error_{p}(C)), \forall C \in \mathcal {C}\}\), with \(\mathcal {C}\) is the set of all possible partitions of the set \(\mathcal {N}\). Testing all possible configurations C is too expensive. In fact, the number of partitions of an n-element set is the bell number B_{n}. Figure 2 shows how exponentially the number of partitions increase with each n increment. Thus, finding the optimum C^{∗} is an optimization task itself. Clustering algorithms are algorithms which approximate good C with a less computing effort.

In the following, we propose a hierarchical clustering algorithm, which was inspired from the famous cluster leader algorithm. Initially, each μG form its own cluster. Depending on their energy status, the clusters are split into two groups: sellers and buyers. The two groups are then sorted in a descendant order in terms of energy need/surplus. The first cluster C_{b} of the buyer group is extracted, and its centroid^{Footnote 1} is compared to the centroids of the seller group. C_{b} is then merged to the first C_{s} in the seller group that verifies the following condition:

$$ loss(C_{b}, C_{s}) < loss(C_{b}, Utility) $$

(6)

The condition (6) ensures that the cluster of the buyer group is merged with a cluster of a seller group only if the energy loss during the exchange between the two clusters will be less than the energy loss during the energy exchange between the buyer cluster and the utility. Therefore, the energy exchange among clusters is neglected since it will undergo more losses than if the energy is exchanged between each cluster and the utility. We adopt the expressions of losses defined in the Eqs. (1) and (2), the energy to be exchanged as the minimum between D(C_{b}) and D(C_{s}), and the distance to be used is the distance between the two centroids. The centroid of the resulting cluster is then updated, and its energy status too: \(\phantom {\dot {i}\!}D_{new} = D_{C_{s}} + D_{C_{b}}\). And depending on whether D_{new} is positive or negative, the new cluster joins the group of buyers or sellers. The sorting of the updated group is redone, and the process continues until no cluster wants to be paired up. The characteristics of the hierarchical clustering algorithm are resumed in three main points:

The sorting of the elements in a hierarchical way,

The comparison of the centroids of the clusters and not the leaders of the clusters,

Instead of comparing the distance, we compare the power loss of the energy exchange.

The Algorithm 1 highlights the main steps of the adjusted clustering algorithm.

Once the resulting set of coalitions is formed, every coalition will need to manage the energy exchange of the μGs within it. For this end we propose in the next section an algorithm that optimizes the energy exchange by reducing the power losses in a coalition.

4 Second stage of the game: matching game

The matching is another branch of the cooperative game theory. It is a process during which we establish correspondences, according to a preference function, between the elements b of a group B and elements s of a group S (Cf. Fig. 3).

The objective of the matching consists in returning a stable set M of ordered pairs (b,s) in which each s and b appear in at most one pair. The matching is said to be unstable, if there exists one unstable pair (b,s). A seller s and a buyer b form an unstable pair in the matching if there exists a second pair (b^{′},s^{′}) in the matching with the following properties:

s prefers the buyer b^{′} over b,

b prefers the seller s^{′} over s

In 1962, David Gale and Lloyd Shapley proved that it is possible to solve the problem of stable marriages. They also presented an algorithm that returns the solution [7]. In this section, we will use the Gale-Shapley algorithm to create a stable matching between the elements s of the sellers’ group and the elements b of the buyers’ group. The process works in a loop. At each iteration, each member b proposes to it preferred seller among the sellers to which it has not yet proposed (without considering whether the seller is already paired-up). Each seller then considers all the received proposals, then retains the buyer it prefers from the proposals (but defers from accepting it) and rejects all the others. The process stops when no b wants to make any further proposals. Each seller then accepts the last proposal it retained and this constitutes the set of the stable matching. Gale and Shapley proved mathematically that this algorithm always converges and returns a stable matching. The matching algorithm assumes that the number of elements in group B is equal to the number of elements in group S. Nonetheless, in our case study, each coalition may have unequal number of buyers and sellers. Therefore, we have adjusted the matching algorithm to meet our case requirements.

The steps bellow describes the entire process of the matching adapted to be applied to our particular case study.

The μGrid coalition is separated into two disjoint sets: a set B of buyers and a set S of sellers.

The list of preferences of every μG is established based on the relation of preferences.

The matching algorithm is applied.

The exchange of energy is performed on every pair of the resulting matching M.

The list of the game participants is updated.

The last three steps (stage 2, 3 and 4) are repeated in rounds until either the set of buyers or sellers becomes empty.

At stage 1, the preference list of the network elements (sellers and buyers) is be established based on the losses. For instance, we say that b prefers s_{3} over s_{1} and we write s_{3}>_{b}s_{1} if the energy lost during the exchange between b and s_{3} is lower than the energy lost if the exchange happens between b and s_{1}: \(E_{s_{3}b}^{loss} < E_{s_{1}b}^{loss}\). The preference list of b is Pref_{b} ={ s_{3},s_{1},…,s_{2}} if \(E_{s_{3}b}^{loss} < E_{s_{1}b}^{loss}< \dots <E_{s_{2}b}^{loss}\).

The stage 2 applies the classical matching algorithm on the coalition. In most cases, the number of buyers and sellers involved in the matching is unequal. Therefore, at every round, some elements won’t be matched and should wait until the next round to enter the game again. For example, if C={b_{1},b_{2},s_{1},s_{2},s_{3}} and b_{1} (resp. b_{2}) pairs up with s_{3} (resp. s_{1}) then s_{2} will be neglected and will enter the game in the next round.

At stage 3, we calculate the energy E_{sb} to be exchanged between each pair (b,s) following the Eq. (3).

According to the resulting E_{sb}, stage 4 updates the energy status of the participants. Each μG having its net demand updated to zero is declined from the next rounds of the game.

The process that includes the matching, the energy exchange and the energy status update is executed repeatedly as long as there is at least two elements each in different group in the coalition. The process ends if the remaining elements are all buyers or all sellers.

The Algorithm 2 explains step by step the matching strategy. The strategy requires as inputs, the distance matrix dist(i,j) that stores the distance between every two elements of the coalition, the energy status vector D and the grid technical parameters. The algorithm returns a matrix that stores in every (b,s) position the energy that will be exchanged between the two elements b and s.

5 Simulation results: analysis and discussion

We consider for the simulations a network for which the technical parameters are described in the Table 1. The net demand D is composed of two stochastic terms. On one hand, there is the term G related to the renewable energy generation which is intermittent. On the other hand, the consumer behaviour is unpredictable and impacted by several factors such as his/her consumption preferences and priorities and the life style. Therefore, the net demand D of each μGrid is considered to be a Gaussian random variable with zero mean and a standard deviation that is uniformly distributed between 3.16 MW and 10 MW. The number \(\mathcal {N}\) of μGrids in the network varies from 3 to 30 elements, and are distributed randomly in a square of a length L, and the utility grid is located in the center of the square.

The Table 2 summarizes the initial state of a μG network of 15 elements.

The partition set resulting from the application of the proposed clustering algorithm is summarized as shown in Table 3.

The matching algorithm is applied to each of the clusters. In the following, we give the procedure and the numerical result of the application of the matching on the cluster C_{1}=[1,2,4,10,15].

Stage 5: Sellers 4 and 10 sell respectively a net amount of 9.312 and 79.044 to the utility grid(Cf. Fig. 4)

Figure 4 draws a summary of the energy that was exchanged in the given example. b_{1} will buy from s_{4} all of the energy it needs, b_{2} and b_{15} will buy all of their energy from s_{10}, while both sellers will need to transfer the rest of the energy they still have after the exchange to the utility. The matching algorithm has a has a fast convergence, and it is efficient enough to be implemented in real scenarios. In fact, Fig. 5 shows that it took only 9 iterations in the average for a coalition of 30 μgrids to converge.

To have a more precise idea, the simulation was run repeatedly and the results were averaged over the total number of runs. This will help us avoid the impact of the uncertainty of demand vector or the randomness of the μGrids location on the results.

For comparison purposes, we used an adjusted leader cluster algorithm which instructions are listed in Algorithm 3. The algorithm begins with the first element stored in a cluster. We extract step by step the elements n from the set \(\mathcal {N}\) subject to clustering. The distance between the element n and every cluster, formed so far, is then calculated. The distance can be calculated in different ways: We can calculate the distance between n and the nearest/farthest element of the cluster or the distance between n and the first element that constituted the cluster (the leader). If a cluster l exists with dist(n,l) smaller than a specified maximum distance D_{M}, then n is added to this cluster. Otherwise, n creates another cluster and becomes the first element of this cluster. The clustering algorithm was adjusted to be adapted to our case study, and the adjustment lays in two major points:

Instead of comparing the element n to the leader list, the element n is compared to the centroids of each cluster, which omit the concept of the leader list,

Instead of comparing the distance, we compare the power loss of the energy exchange, and the threshold is the loss that the power transmission will undergo if the energy is to be exchanged with the utility.

The figures give the plot of 4 different methods:

The hierarchical leader cluster: The matching is applied on every cluster of the coalition.

The adjusted leader cluster: The matching is applied on every cluster of the coalition.

The grand coalition: The matching is applied on the whole network, no clustering algorithm is performed to form clusters.

The optimal set: The matching is applied on all the set of partitions, and the partition that return the optimal solution is returned. Due to the computational complexity of this method, only the results of the networks having few nodes (5, 7 and 10 μGs) were calculated.

The classical model: The energy is exchanged between each node and the utility.

Figures 6 and 7 draw the average power loss per μGrid resulting from the scenarios cited above as the number of μGs \(\mathcal {N}\) in the network varies.

The Fig. 6 shows the results of the power losses for the four scenarios cited above. For smaller networks, we notice that the performance of a non-cooperative scenario is better than the grand coalition scenario, and this is explained by the fact that in smaller networks, nodes are far from each other. Therefore, the exchange of energy in a cooperative way is more likely to engender additional losses. By forming coalitions, we avoid this problem and we can see through the figure that the performance of the system is significant even for low density networks. However, the more elements we have in the network, the less is the distance between them, the more beneficial is the cooperation, and this is why the curve of the grand coalition scenario diverge from the curve of the non-cooperative for high density networks. Adjusted leader cluster and hierarchical leader cluster have approximate performance: the adjusted leader cluster is better for low density networks (\(\mathcal {N} < 13 \)) while the hierarchical leader cluster outperforms for higher density networks.

In terms of computational complexity, the hierarchical leader cluster proved to be more efficient that the classical algorithm (Cf. Fig. 8). Although starting approximately at the same value, the number of iterations needed by the adjusted leader cluster to converge increases and reaches almost 4 times the number of iterations the hierarchical leader cluster needs for convergence.

6 Conclusion

In this paper, a novel cooperative strategy for μGrid networks was proposed. The fundamental aim of the strategy was the reduction of the losses during the energy exchange. The strategy consists of a two stage algorithm; a first stage that forms coalitions and divide the network into subsets that return considerable savings, and a second stage that manages optimally the energy exchange inside each coalition. Our proposed strategy was compared to numerous other scenarios, and simulations showed that the use of the strategy can reduce the power loss in the network. In fact, by applying only the second stage of the strategy, the losses can be reduced by 5%, this rate can reach up to 20% if the two stages are applied on the network. The strategy proved also to have a fast convergence which implies that it has a light computational complexity and this makes it operational for real implemented networks.

To make our strategy more adopted to real scenarios, some improvements have to be made. To this end, we aim at extending our model by considering different system operators rather than on unique utility supplier. The definition of the prices for the energy exchange is a crucial point that should be introduced since it express the energy market competitiveness. And last but not least, the strategy should be coupled with an electrical control strategy to make sure operational constraints are satisfied (e.g, voltage and frequency stability).

7 Methods

7.1 The characteristics of participants

The participants of the study are: the microgrids and the utility.

The utility grid is characterised by the following parameters:

:power loss rate in the transformer,

:voltage of the medium voltage lines,

:resistance of the lines,

: coordinates of the utility in the network.

Each microgrid is characterised by the following parameters:

: The net demand of a microgrid,

: voltage of the low voltage lines,

:resistance of the lines,

: coordinates of the microgrid in the network.

7.2 Aim, design and setting of the study

The objective of the study is to reduce power loss during energy exchange between the participants. To this end, we designed a model to achieve the goal following two steps:

1

coalition formation: we designed an algorithm that groups the microgrids that are nearer to each other than to the utility in the same cluster. Inside the cluster, the microgrids exchange energy internally, and any remaining excess/need will be then exchanged with the utility.

2

matching game: an algorithm designed to manage the internal energy exchange inside the cluster in order to further decrease the energy loss.

7.3 Methodologies

For the coalition formation, we took benefit of a famous coalition formation algorithm: the leader cluster and adjust it to fit with our study. The matching game also known as Gale-Shapley algorithm was applied as it was designed by its owners to each cluster in order to match every buyer with a seller. The two algorithms combined compose the contribution of our study.

Availability of data and materials

Not applicable.

Notes

centroid of a cluster is its center: \(centroid(c)= \frac {1}{|c|} \sum _{a \in c} a \)

Liu, T., Tan, X., Sun, B., Wu, Y., Tsang, D.H.K. (2018). Energy management of cooperative microgrids: A distributed optimization approach. International Journal of Electrical Power & Energy Systems, 96, 335–346.

Saad, W., Han, Z., Poor, H.V. (2011). Coalitional game theory for cooperative micro-grid distribution networks. In 2011 IEEE International Conference on Communications Workshops (ICC). https://doi.org/10.1109/iccw.2011.5963577. IEEE.

Chakraborty, S., Nakamura, S., Okabe, T. (2015). Real-time energy exchange strategy of optimally cooperative microgrids for scale-flexible distribution system. Expert Systems with Applications, 42(10), 4643–4652.

Essayeh, C., El-Fenni, M.R., Dahmouni, H. (2018). Optimal energy exchange in micro-grid networks: Cooperative game approach. In 2018 Renewable Energies, Power Systems Green Inclusive Economy (REPS-GIE). https: //doi.org/10.1109/repsgie.2018.8488865. IEEE.

Benedict, E., Collins, T., Gotham, D., Hoffman, S., Karipides, D., Pekarek, S., Ramabhadran, R. (1992). Losses in electric power systems. ECE Tech. Rep., Purdue University. http://docs.lib.purdue.edu/ecetr/226.

Gale, D., & Shapley, L.S. (1962). College Admissions and the Stability of Marriage, vol. 69, (pp. 9–15): The American Mathematical Monthly. https://doi.org/10.2307/2312726.

CE contributed to the conception and analysis of the study, manuscript preparation and manuscript submission as a corresponding author. MREF contributed significantly to the conception. HD helped perform the study with constructive remarks and senior advices. All authors read and approved the final manuscript.

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License(http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Essayeh, C., Fenni, M.R. & Dahmouni, H. Optimization of energy exchange in microgrid networks: a coalition formation approach.
Prot Control Mod Power Syst4, 24 (2019). https://doi.org/10.1186/s41601-019-0141-5