Distributed Coordination Control Strategy for a Multi-Microgrid Based on a Consensus Algorithm

Microgrids (MGs) in which power generation and consumption occur locally have gained prominence, and MG demonstration tests have been widely carried out. In accordance with the increase in the number of MG installations, studies regarding the cooperative control of multiple MGs are proceeding in various forms. In this paper, the distributed control strategy of a multi-microgrid (MMG) is proposed. Distributed control is the method in which agents of the electric power facility autonomously control their facility through communication with the neighboring agents only. In this process, a consensus algorithm is utilized to obtain the global information required to control the overall system. In this distributed control strategy, a single MG is operated at an optimal economic point using the equality incremental cost constraints while maintaining the balance between the generation and demand. The control strategy of a MMG is that the flow of the point of common coupling (PCC) is maintained at a particular value needed by the utility and the internal change in power is distributed to the MGs according to their reserves. The proposed algorithm is verified in the MG level and the MMG level through a simulation model using PSCAD/EMTDC software in the C language.


Introduction
Difficulties in selecting locations for large-scale power plants, transmission facilities, and an increase in small-scale generating units such as rooftop photovoltaic generators and micro combined heat-and-power systems in close proximity to the electricity demand site, have caused a paradigm shift in power systems of late.Power systems have now switched from the conventional sequence of power generation, transmission, distribution, and consumption through large-scale plants to a new sequence of power generation, distribution, and consumption through generation facilities located in the demand area.In accordance with this trend, researches and demonstration tests of the microgrid (MG) have been conducted widely [1][2][3][4][5].
With the increase in MG installations, integrated operation strategies for multiple MGs have been presented in several studies [6][7][8][9][10][11].In community MGs, an optimal economic operating method is introduced through hierarchical optimization in [7].In reference [8], distributed economic optimization of the power transaction between the MGs is proposed by employing the game theory.Unlike the above literatures that consider economics, reference [11] focuses on the resilience of multiple MGs by power sharing between the MGs.
Owing to the increase in control elements such as distributed generators (DGs) and energy storage system (ESS) in the total system, the burden of the central control center that manages these elements also increases.To relieve the burden of the central control center, studies regarding the distributed method wherein each element controls itself through communication with the neighboring components have been proposed in many papers.Mainly, the distributed control strategy based on a consensus algorithm has been introduced in several studies [12][13][14][15][16][17][18].In previous studies, they manage the single level system using consensus algorithm.This paper suggests the dual level control strategy based on consensus algorithm, that is economic operation in microgrid level and output distribution according to output margin of microgrid in multi-microgrid level.In references [12,13], an optimal operating method for the distributed resources in the MG is proposed by applying a consensus algorithm to the equality incremental cost constraints.Reference [14] proposes a control strategy to distribute the output of the resources in the frequency control of the MG by a dispersive method.In this paper, the analysis of plug and play is carried out on the supposition that a random generator is connected or disconnected to or from a power system network.A control method to share current between the resources and to maintain the voltage at the point of common coupling (PCC) is introduced in the DC MG using a consensus algorithm in [15].
In this paper, a real-time control scheme for a multi-microgrid (MMG) based on a consensus algorithm is proposed.Droop control is the representative distributed control.Droop control is that supplies output power set by droop coefficient responding to frequency deviation.This control is useful to stabilize frequency, but it is difficult to manage the economic power distribution.In case of distributed control through consensus algorithm, economic operation is possible through equality incremental cost condition or output extra data of whole system are acquired under constrained communication condition.These characteristics are possible flexible system operation; therefore, it is utilized in this paper.When distributed control is performed, global information to control the system is shared by communicating only with the neighboring facilities and the necessary control is carried out autonomously in each facility by sharing information.Basically, the purpose of an MG and MMG is to maintain the power flow of each PCC at target values as scheduled.In the case of significant imbalances between the generation and demand, the operating point of the DGs is changed to a new optimal point according to the incremental cost constraints in tandem with maintaining the power flow of the PCC in the MG.The MMG has a control strategy that divides the unbalanced power of the MMG to each MG in accordance with the surplus or the current output of a single MG through the consensus algorithm.
The methods of selecting the weighted factor in the consensus algorithm proposed in existing studies are compared.Unlike the application of the consensus algorithm to the MG in previous studies, the distributed control scheme is extended and applied to the MMG.To verify the proposed control scheme, electric power facilities are modelled using PSCAD/EMTDC, and the agent module that directs the output reference and communicates with the neighboring agent is modelled in C language.The simulation is carried out in PSCAD/EMTDC using C language.In Section 2, the consensus algorithm is introduced for obtaining the convergence value.The distributed control strategy is described in Section 3, where hierarchical structure of a Multi-Microgrid is considered.The results of case study are verified in Section 4, based on distributed control strategy using consensus algorithms.

Basic Concepts of the Consensus Algorithm
The consensus algorithm is a method to obtain the convergence value of the information of each agent by communication with the adjacent agent only.The consensus algorithm has advantages in the absence of a central control mechanism and unreliable communication capabilities.It is possible to acquire global information in a distributed communication network using the consensus algorithm; therefore, it can be utilized as such in a distributed control scheme.
For n agents, the formula to update information in a consensus algorithm is as follows [16,17]. (1) where x i [t]: shared information of agent i at iteration t; w ij : weighting factor between agent i and agent j; X[t]: matrix of agent information at iteration t; W: matrix of weighting factors.Equation ( 2) is the matrix form of Equation (1).The convergence characteristic is altered according to the weighted factor of the consensus algorithm.The method to select the weighted factor is introduced in [12,14,15].

Weighted Factor of the Consensus Algorithm
Prior to the introduction of the weighted factor, the Laplacian matrix that is used to mathematically express the connection state between the agents in graph theory is explained.In a non-directional graph, the degree of each agent is the number of connected agents, and adjacency represents the connection status between the agents.The components of the degree matrix and the adjacency matrix are defined as follows: where d ij : row i, column j component of the degree matrix; adj ij : row i, column j component of the adjacency matrix; N i : agent set connected with agent i.The Laplacian matrix is decided through the degree matrix and the adjacency matrix.
where L: Laplacian matrix; D: degree matrix; A: adjacency matrix.
In this paper, we introduce three methods to choose the weighted factor: Fast Linear Iterations, Local Adjacency, and Metropolis.
First, the weighted factor of the Fast Linear Iteration is as follows [15]: where I: identity matrix; α: convergence constant in the Fast Linear Iteration method; λ m (L): m largest eigenvalue of the Laplacian matrix.Through Equations ( 2) and ( 6), the information x of each agent is converged to the average of all agents' information after several iterations.Fast Linear Iteration can find the optimal weighted factor analytically through the calculation of α, but to calculate α, the Laplacian matrix is known in advance, implying that the connection status of the total network system is recognized.Therefore, central settlement is needed in the first design of the weighted factor.
Next, Equation (8) shows the weighted factor of the Local Adjacency [12]: where l ij : row i, column j component of the Laplacian matrix.The components of the weighted factor to update agent i, are the row i components of the weighted factor matrix; the row i components of the weighted factor matrix are in turn calculated by the row i components of the Laplacian matrix.In other words, information needed to find the weighted factor of agent i through Local Adjacency is the degree of agent i and the information of adjacency with the neighbouring agents.Therefore, in Local Adjacency, the weighted factor can be calculated locally by the connection information that each agent has.
Finally, the weighted factor in Metropolis is as follows [14]: In order to calculate the weighted factor using Metropolis, the necessary information is the degree of agent i and agent j connected with agent i.Therefore, by sharing the degree information between agents the weighted factor can be calculated in the distributed method similar to Local Adjacency.

Convergence Analysis
In this section, the convergence characteristics of the consensus algorithm are analysed by considering the three weighted factor selection methods and the network topology of the agents.The network topology is classified into three cases as seen in Figure 1, and the initial value of each agent is 8, 7, 6, and 11.
Energies 2017, 10, 1017 4 of 16 the row i components of the Laplacian matrix.In other words, information needed to find the weighted factor of agent i through Local Adjacency is the degree of agent i and the information of adjacency with the neighbouring agents.Therefore, in Local Adjacency, the weighted factor can be calculated locally by the connection information that each agent has.Finally, the weighted factor in Metropolis is as follows [14]: In order to calculate the weighted factor using Metropolis, the necessary information is the degree of agent i and agent j connected with agent i.Therefore, by sharing the degree information between agents the weighted factor can be calculated in the distributed method similar to Local Adjacency.

Convergence Analysis
In this section, the convergence characteristics of the consensus algorithm are analysed by considering the three weighted factor selection methods and the network topology of the agents.The network topology is classified into three cases as seen in Figure 1, and the initial value of each agent is 8, 7, 6, and 11.It is a remarkable characteristic that complex communication with the agents results in a fast convergence speed as seen Figure 1.In the case of line topology, the Local Adjacency method has the fastest convergence.However, the Local Adjacency method has a convergence value of 7.67 while the other methods have a convergence value of 8 that is the average of the initial values.It indicates that the information of the convergence value in the Local Adjacency method can be unclear and unsuitable for usage in various areas.In comparison with the Fast Linear Iteration and the Metropolis method, the Metropolis method has a low convergence speed than the Fast Linear Iteration in line topology.However, the Metropolis method has a similar convergence speed in the ring and full topology.It is a remarkable characteristic that complex communication with the agents results in a fast convergence speed as seen Figure 1.In the case of line topology, the Local Adjacency method has the fastest convergence.However, the Local Adjacency method has a convergence value of 7.67 while the other methods have a convergence value of 8 that is the average of the initial values.It indicates that the information of the convergence value in the Local Adjacency method can be unclear and unsuitable for usage in various areas.In comparison with the Fast Linear Iteration and the Metropolis method, the Metropolis method has a low convergence speed than the Fast Linear Iteration in line topology.However, the Metropolis method has a similar convergence speed in the ring and full topology.
Fast Linear Iteration needs to know the connection of the total network to select the weighted factor as mentioned, and responding flexibly to a network topology change is difficult.Therefore, the Local Adjacency and the Metropolis method that calculate the weighted factor in a distributed form are suitable in order to facilitate plug and play or as robust algorithms for communication faults.Local Adjacency is the most dispersive method to select the weighted factor because the Local Adjacency method calculates the weighted factor only through the information with each agent.However, the application area is limited because uncertainty in the convergence value exists.In order to calculate the weighted factor through the Metropolis, the connection information owned by each agent and the degree information from the adjacency agents is required, which can be obtained through a single communication with the neighboring agents.Though the Metropolis method requires an additional communication to calculate the weighted factor in comparison with Local Adjacency, it has an advantage that the convergence value is the accurate average of the initial values and the Metropolis method has a similar convergence speed when the network topology becomes complicated.

Distributed Control Strategy for a Multi-Microgrid
In the operating process of a power system, it is optimal if the system is operated as per the fixed schedule through a complete prediction of the generation of the renewable energy sources such as solar, wind, and the demand.However, a prediction always has an uncertainty, and therefore, a proper change of the operating status is needed in real-time operation.In this paper, we propose a control strategy that can operate flexibly according to the variable system status in real-time.It is possible to economically operate the individual microgrid, and when an unexpected event occurs in the microgrid, the entire MMG shares it, so that MMG can be regarded as a controllable element for the entire system operator.Removing uncertainty from the utility's point of view is the biggest advantage of this system.And one of the contributions is that the system is composed of a decentralized control structure.The concept of distributed control for a MMG is represented in Figure 2.
Fast Linear Iteration needs to know the connection of the total network to select the weighted factor as mentioned, and responding flexibly to a network topology change is difficult.Therefore, the Local Adjacency and the Metropolis method that calculate the weighted factor in a distributed form are suitable in order to facilitate plug and play or as robust algorithms for communication faults.Local Adjacency is the most dispersive method to select the weighted factor because the Local Adjacency method calculates the weighted factor only through the information with each agent.However, the application area is limited because uncertainty in the convergence value exists.In order to calculate the weighted factor through the Metropolis, the connection information owned by each agent and the degree information from the adjacency agents is required, which can be obtained through a single communication with the neighboring agents.Though the Metropolis method requires an additional communication to calculate the weighted factor in comparison with Local Adjacency, it has an advantage that the convergence value is the accurate average of the initial values and the Metropolis method has a similar convergence speed when the network topology becomes complicated.

Distributed Control Strategy for a Multi-Microgrid
In the operating process of a power system, it is optimal if the system is operated as per the fixed schedule through a complete prediction of the generation of the renewable energy sources such as solar, wind, and the demand.However, a prediction always has an uncertainty, and therefore, a proper change of the operating status is needed in real-time operation.In this paper, we propose a control strategy that can operate flexibly according to the variable system status in real-time.It is possible to economically operate the individual microgrid, and when an unexpected event occurs in the microgrid, the entire MMG shares it, so that MMG can be regarded as a controllable element for the entire system operator.Removing uncertainty from the utility's point of view is the biggest advantage of this system.And one of the contributions is that the system is composed of a decentralized control structure.The concept of distributed control for a MMG is represented in Figure 2. In the MG level, the battery energy storage system (BESS) conducts the flow control of the MG responding to internal changes, and each DG operates at the economic optimal point depending upon In the MG level, the battery energy storage system (BESS) conducts the flow control of the MG responding to internal changes, and each DG operates at the economic optimal point depending upon the equality incremental cost constraints that is the convergence value obtained by the consensus algorithm.Considering the state of charge (SOC) of the BESS, the control strategy to distribute the BESS output to each DG is proposed in the case of significant internal disturbances.Finally, information about the current output and the output margin of the DG is shared through the consensus algorithm for use in the control strategy in the MMG level.
Similar to the MG operation strategy, the main BESS in the MMG level controls the flow of the MMG PCC responding to the internal change in the MMG and the external change in the target flow requested by the utility.The output of the main BESS is distributed to the MGs according to the output status of each MG.

Control Strategy in the Microgrid Level
The main control strategy in the MG level is to maintain the flow of the MG PCC using the rapid operation characteristics of the BESS and to distribute the large output change of the BESS that is due to drastic variations in load or failure of facilities, to each DG at an optimal operation point.The control block of the BESS for managing the flow of the MG PCC is represented in Figure 3.
Energies 2017, 10, 1017 6 of 16 the equality incremental cost constraints that is the convergence value obtained by the consensus algorithm.Considering the state of charge (SOC) of the BESS, the control strategy to distribute the BESS output to each DG is proposed in the case of significant internal disturbances.Finally, information about the current output and the output margin of the DG is shared through the consensus algorithm for use in the control strategy in the MMG level.Similar to the MG operation strategy, the main BESS in the MMG level controls the flow of the MMG PCC responding to the internal change in the MMG and the external change in the target flow requested by the utility.The output of the main BESS is distributed to the MGs according to the output status of each MG.

Control Strategy in the Microgrid Level
The main control strategy in the MG level is to maintain the flow of the MG PCC using the rapid operation characteristics of the BESS and to distribute the large output change of the BESS that is due to drastic variations in load or failure of facilities, to each DG at an optimal operation point.The control block of the BESS for managing the flow of the MG PCC is represented in Figure 3. Proportional and Integral (PI) control is used to generate the feeder flow control reference needed to maintain the flow of the MG; the sum of the generated feeder flow control reference and the basepoint of the BESS is the final output reference of the BESS.The basepoint of the BESS is the point set to restore the SOC of the BESS when it is out of operating range.
In order to operate the DG at an economic optimal point, we utilize the equality incremental cost constraints.When the cost function of the generator is expressed as a quadric equation, the economic optimal output of the DG is determined at a point where the incremental cost of the generation cost function of the DGs is equalized and the generation and consumption match up [18,19].where k C : generation cost of generator k; k P : output power of generator k;  : incremental cost of the generator; demand P : total power demand.The diagram of Equation ( 11) is represented in Figure 4. Proportional and Integral (PI) control is used to generate the feeder flow control reference needed to maintain the flow of the MG; the sum of the generated feeder flow control reference and the basepoint of the BESS is the final output reference of the BESS.The basepoint of the BESS is the point set to restore the SOC of the BESS when it is out of operating range.
In order to operate the DG at an economic optimal point, we utilize the equality incremental cost constraints.When the cost function of the generator is expressed as a quadric equation, the economic optimal output of the DG is determined at a point where the incremental cost of the generation cost function of the DGs is equalized and the generation and consumption match up [18,19].
where C k : generation cost of generator k; P k : output power of generator k; λ: incremental cost of the generator; P demand : total power demand.The diagram of Equation ( 11) is represented in Figure 4.In distributed control, the equation to find the equality incremental cost constraints based on the consensus algorithm is as follows: where : convergence information about the incremental cost of the DG i at iteration t. i a , i b : coefficient of the incremental cost function; init DGi output P : initial value of the output power of DG i.
If the convergence of λ is found only through the initial power of the DGs, the total generation does not match up with the consumption.Therefore, it is necessary to add a correction term to adjust the convergence of λ for the generation and consumption to be identical.
where  : convergence constant that determines the convergence speed of λ; M G FFC P : output power used in maintaining the flow of the MG; _ MG BESS P : measured value of the MG BESS output.In case of deficiency in generation, λ is increased by the correction term until the generation and consumption have the same values and in case of excess in generation, λ is decreased.
If each agent has the same λ, the output reference of the DG is generated as follows: where DGi It is possible to operate at an economic optimal point by setting the output reference of each DG according to the equality incremental cost constraints.
In the MMG level, if excess quantity is to be shared or if there is a deficiency of power in an MG, information about the power margin and the current power of the MG is needed to decide the amount of power allocation.The MG output information is generated by sharing the output information of the DGs.In distributed control, the equation to find the equality incremental cost constraints based on the consensus algorithm is as follows: where λ DGi [t]: convergence information about the incremental cost of the DG i at iteration t. a i , b i : coefficient of the incremental cost function; P DGi output init : initial value of the output power of DG i.If the convergence of λ is found only through the initial power of the DGs, the total generation does not match up with the consumption.Therefore, it is necessary to add a correction term to adjust the convergence of λ for the generation and consumption to be identical.
where ε: convergence constant that determines the convergence speed of λ; P MG FFC : output power used in maintaining the flow of the MG; P MG_BESS : measured value of the MG BESS output.
In case of deficiency in generation, λ is increased by the correction term until the generation and consumption have the same values and in case of excess in generation, λ is decreased.
If each agent has the same λ, the output reference of the DG is generated as follows: where P DGi re f : output reference of DG I; λ DG * : convergence value of the incremental cost of the DGs.P DGi min : minimum output power of DG I; P DGi max : maximum output power of DG i.It is possible to operate at an economic optimal point by setting the output reference of each DG according to the equality incremental cost constraints.
In the MMG level, if excess quantity is to be shared or if there is a deficiency of power in an MG, information about the power margin and the current power of the MG is needed to decide the amount of power allocation.The MG output information is generated by sharing the output information of the DGs.: initial value of the power margin of DG I; P DGi output init : initial value of the output power of DG I; c init : initial value needed to count the number of agents; c DG * : convergence value of the information needed to count the number of agents; S: set of agents connected to the MG BESS; n: the number of agents; P MG margin : power margin of the MG; P DG * margin : convergence value of the power margin of the DGs; P MG output : current output of the MG; P DG * output : convergence value of the current output of the DGs.
Equations ( 18) and ( 19) are about sharing the output information and Equation ( 20) is needed to distinguish the number of the DG agent.The convergence values of each equation are used in (24)-(26) to calculate the number of the DG agents and the power output information of the MG.

Control Strategy in the Multi-Microgrid Level
The objective of the control strategy in the MMG level is to maintain the power flow targeted values in the MMG PCC that connects the MMG with the utility.Because the BESS has rapid control characteristics, it is suitable for controlling the flow fluctuation induced by frequent changes in load or in the renewable energy sources.The control block of the BESS for managing flow of the MMG PCC is represented in Figure 5.
Energies 2017, 10, 1017 8 of 16 arg arg [  convergence value of the current output of the DGs.Equations ( 18) and ( 19) are about sharing the output information and Equation ( 20) is needed to distinguish the number of the DG agent.The convergence values of each equation are used in (24)-(26) to calculate the number of the DG agents and the power output information of the MG.

Control Strategy in the Multi-Microgrid Level
The objective of the control strategy in the MMG level is to maintain the power flow targeted values in the MMG PCC that connects the MMG with the utility.Because the BESS has rapid control characteristics, it is suitable for controlling the flow fluctuation induced by frequent changes in load or in the renewable energy sources.The control block of the BESS for managing flow of the MMG PCC is represented in Figure 5. Similar to the BESS control in the MG level, the reference value for the flow control is generated by the PI control and the output reference of the MMG BESS is obtained by the sum of the flow control reference and the base point of the BESS.
When significant disturbances caused by the failure of the DG or the electrical line and drastic fluctuation in load or renewable energy sources occur, the BESS cannot continuously sustain the Similar to the BESS control in the MG level, the reference value for the flow control is generated by the PI control and the output reference of the MMG BESS is obtained by the sum of the flow control reference and the base point of the BESS.When significant disturbances caused by the failure of the DG or the electrical line and drastic fluctuation in load or renewable energy sources occur, the BESS cannot continuously sustain the output power induced by the disturbance because the BESS has energy limits.Therefore, the distribution of the BESS output to each MG is needed according to the output state of the MGs.
Information about the output margin, the current output of each MG and the MMG BESS output is shared based on the consensus algorithm.The equation for updating the information is as follows: where P MGi margin [t]: convergence value about the power margin of the MG i at iteration t; P MGi output [t]: convergence value about the current output of the MG i at iteration t; P MGi share [t]: convergence value about the shared power of the MG i at iteration t; P MGi margin init : initial value of the power margin of MG I; P MGi output init : initial value of the output power of MG I; P MMG_BESS : measured value of the MMG BESS output; S: set of agents connected to the MMG BESS.
Equations ( 27)-( 29) are to update the information and (30)-(32) are the initial values of each information.The initial values of the output margin and the current output are the measured value at each MG at the time of the algorithm operation and the initial information about the distribution amount is difference between the BESS actual output and the basepoint of the BESS that is output to restore the SOC of the BESS.In (32) a minus sign is present because the flow direction of the MG and the output direction of the BESS are opposite.
Information about the output state of the MG and the distribution amount is converged to an average of the initial values through the consensus algorithm and each MG calculates the amount to be shared through the convergence information.where ∆P MGi target_ f low : variation amount of the target flow of MG I; P MG * share : convergence value of the sharing power of the MGs; P MG * margin : convergence value of the power margin of the MGs; P MG * output : convergence value of the current output of the MGs.
If an output power increase is required, the sharing amount is decided as per the output margin of the MG and in the opposite case the current output of each MG determines the amount power to be shared.
Finally, the target flow of each MG is set by Equation (34) according to the amount to be shared, calculated in Equation (33).
where P MGi target_ f low : update value of the target flow of MG i.

Case Study
In this research, the MMG simulation model is constructed based on an IEEE 13 Node Test Feeder [20] and the parameters of the DGs in a single MG are utilized in [18].The Metropolis method is applied in the simulation to find the weighted factor of the consensus algorithm.
The MMG consists of four MGs, five loads, and a BESS; the capacities of the MG components are shown in Table 1.The communication networks between the MGs are ring shaped and MG 1 has an additional communication line with the BESS in the MMG level.
In order to verify the control strategy in the MG level, MG 1 is constructed with the parameters as per Table 2.The network topology between the DGs in MG 1 is line shaped and a communication line between DG 1 and the BESS is added.In this simulation, the consensus algorithm has a 2.5 s operation cycle and an 8.33 ms solution time.The consensus algorithm operates alternately at intervals of 1.25 s in the MMG and MG level.The performance of the proposed control strategy is confirmed through two simulation cases of step change that include a change of load and PCC flow in the MMG level and the MG level, respectively.The analysis of the control characteristic with respect to the time varying load is carried out through load data of 24 h downsized to 24 s data.

Simulation in the Microgrid Level
Case 1: Change of target flow in the MG PCC Case 1 confirms the operating characteristics when the target flow in the MG PCC is changed by virtue of power sharing in the MMG level.The target flow is set from 0 kW to −150 kW.Because the power inflow into the MG is a plus flow as indicated in Figure 6, the minus flow indicates a supply of power from the MG to the MMG.Initially, the DGs have an arbitrary output power and then the DGs change their output to operate in the equality incremental cost constraints during the first consensus algorithm operation.At about 2.75 s, the target flow of MG 1 is changed from 0 kW to −150 kW and the output power of the BESS is increased to adjust the changed target flow.The BESS output is then distributed to the DGs maintaining the equality incremental cost constraints at about 3.75 s.The outputs of DG 2 and DG 3 are restricted to 100 kW because of the generation limit.
In Figure 7b, the convergence of the incremental cost λ begins at about 1.25 s, and at 4.25 s, the incremental cost converges to a value higher than the former value to share the target flow.The convergence pattern of the incremental cost λ shows that the incremental cost of DG 1 leads to other incremental costs, in the second operation of the consensus algorithm.This is because DG 1 receives prior information regarding the output change to be shared.After the increase in the DG output, we can see that the power margin of the DGs decrease, in Figure 7b.Initially, the DGs have an arbitrary output power and then the DGs change their output to operate in the equality incremental cost constraints during the first consensus algorithm operation.At about 2.75 s, the target flow of MG 1 is changed from 0 kW to −150 kW and the output power of the BESS is increased to adjust the changed target flow.The BESS output is then distributed to the DGs maintaining the equality incremental cost constraints at about 3.75 s.The outputs of DG 2 and DG 3 are restricted to 100 kW because of the generation limit.
In Figure 7b, the convergence of the incremental cost λ begins at about 1.25 s, and at 4.25 s, the incremental cost converges to a value higher than the former value to share the target flow.The convergence pattern of the incremental cost λ shows that the incremental cost of DG 1 leads to other incremental costs, in the second operation of the consensus algorithm.This is because DG 1 receives prior information regarding the output change to be shared.After the increase in the DG output, we can see that the power margin of the DGs decrease, in Figure 7b.Initially, the DGs have an arbitrary output power and then the DGs change their output to operate in the equality incremental cost constraints during the first consensus algorithm operation.At about 2.75 s, the target flow of MG 1 is changed from 0 kW to −150 kW and the output power of the BESS is increased to adjust the changed target flow.The BESS output is then distributed to the DGs maintaining the equality incremental cost constraints at about 3.75 s.The outputs of DG 2 and DG 3 are restricted to 100 kW because of the generation limit.
In Figure 7b, the convergence of the incremental cost λ begins at about 1.25 s, and at 4.25 s, the incremental cost converges to a value higher than the former value to share the target flow.The convergence pattern of the incremental cost λ shows that the incremental cost of DG 1 leads to other incremental costs, in the second operation of the consensus algorithm.This is because DG 1 receives prior information regarding the output change to be shared.After the increase in the DG output, we can see that the power margin of the DGs decrease, in Figure 7b.

Simulation in the Multi-Microgrid Level
Case 2: Internal load change in the MMG Control of the MMG PCC flow and the distribution of power to each MG are confirmed when there is a change in the load connected to the feeder of the MMG directly.The total average load of the MMG is increased from 400 kW to 500 kW and the target flow of the MMG contracted for by the utility is 400 kW.Each MG has target flow of 0 kW initially.
The MMG BESS increases its output power to 100 kW to maintain the flow of the MMG PCC contracted for by the utility.The output power of the MMG BESS is then distributed to the MGs according to the power margin of each MG, and the average output of the BESS becomes 0 kW.
The convergence characteristic of the consensus algorithm with respect to the power margin and the sharing power of the MG is represented in Figure 8b.Information about the power margin of the MGs converges to an average value of the initial power margin of the MGs.The share information converges to 25 kW that is the average of the 100 kW output power covered by the BESS for four agents.The minus sign in the power share of the MGs results because of the opposing directions of flow between the MMG BESS and the MGs.In the second operation of the consensus algorithm, the convergence value of the power margin is slightly decreased because the information about the sharing power of the MGs converges to almost 0 kW. Figure 8c shows that the target flow of the MMG PCC is changed according to the margin of the MGs.

Simulation in the Multi-Microgrid Level
Case 2: Internal load change in the MMG Control of the MMG PCC flow and the distribution of power to each MG are confirmed when there is a change in the load connected to the feeder of the MMG directly.The total average load of the MMG is increased from 400 kW to 500 kW and the target flow of the MMG contracted for by the utility is 400 kW.Each MG has target flow of 0 kW initially.
The MMG BESS increases its output power to 100 kW to maintain the flow of the MMG PCC contracted for by the utility.The output power of the MMG BESS is then distributed to the MGs according to the power margin of each MG, and the average output of the BESS becomes 0 kW.
The convergence characteristic of the consensus algorithm with respect to the power margin and the sharing power of the MG is represented in Figure 8b.Information about the power margin of the MGs converges to an average value of the initial power margin of the MGs.The share information converges to 25 kW that is the average of the 100 kW output power covered by the BESS for four agents.The minus sign in the power share of the MGs results because of the opposing directions of flow between the MMG BESS and the MGs.In the second operation of the consensus algorithm, the convergence value of the power margin is slightly decreased because the information about the sharing power of the MGs converges to almost 0 kW. Figure 8c shows that the target flow of the MMG PCC is changed according to the margin of the MGs.

Simulation in the Multi-Microgrid Level
Case 2: Internal load change in the MMG Control of the MMG PCC flow and the distribution of power to each MG are confirmed when there is a change in the load connected to the feeder of the MMG directly.The total average load of the MMG is increased from 400 kW to 500 kW and the target flow of the MMG contracted for by the utility is 400 kW.Each MG has target flow of 0 kW initially.
The MMG BESS increases its output power to 100 kW to maintain the flow of the MMG PCC contracted for by the utility.The output power of the MMG BESS is then distributed to the MGs according to the power margin of each MG, and the average output of the BESS becomes 0 kW.
The convergence characteristic of the consensus algorithm with respect to the power margin and the sharing power of the MG is represented in Figure 8b.Information about the power margin of the MGs converges to an average value of the initial power margin of the MGs.The share information converges to 25 kW that is the average of the 100 kW output power covered by the BESS for four agents.The minus sign in the power share of the MGs results because of the opposing directions of flow between the MMG BESS and the MGs.In the second operation of the consensus algorithm, the convergence value of the power margin is slightly decreased because the information about the sharing power of the MGs converges to almost 0 kW. Figure 8c shows that the target flow of the MMG PCC is changed according to the margin of the MGs.

Integrated Simulation in the Microgrid Level and the Multi-Microgrid Level
Case 3: Integrated simulation with Time Varying Loads In Case 3, the operating characteristics of the proposed algorithm in the case that the MMG and the MG have time varying loads, is verified.Both the internal load of the MG and external load that is connected directly to the MMG have the same variation properties.
The output of the elements of the MMG is represented in Figure 9a.The target flow of the MMG PCC is set at 318 kW that is the average of the time-varying load.The MMG BESS responds to the load change first, after which the output of the MMG BESS is distributed to each MG according to the convergence values of the power margin or the current output power of the MGs.The convergence characteristic of the information needed to distribute the MMG BESS to the MGs is represented in Figure 9b.The convergence value in Figure 9b changes according to the output status of each MG and MMG BESS. Figure 9c shows the target flow of each MG calculated by Equation (33).The total power generation, the load and the BESS output power in each MG are depicted in Figure 9d.The total generation of each MG is varied according to the changed load and the target flow and the BESS of each MG has an output power to the maintain flow of the MG PCC at target flow.

Integrated Simulation in the Microgrid Level and the Multi-Microgrid Level
Case 3: Integrated simulation with Time Varying Loads In Case 3, the operating characteristics of the proposed algorithm in the case that the MMG and the MG have time varying loads, is verified.Both the internal load of the MG and external load that is connected directly to the MMG have the same variation properties.
The output of the elements of the MMG is represented in Figure 9a.The target flow of the MMG PCC is set at 318 kW that is the average of the time-varying load.The MMG BESS responds to the load change first, after which the output of the MMG BESS is distributed to each MG according to the convergence values of the power margin or the current output power of the MGs.The convergence characteristic of the information needed to distribute the MMG BESS to the MGs is represented in Figure 9b.The convergence value in Figure 9b changes according to the output status of each MG and MMG BESS. Figure 9c shows the target flow of each MG calculated by Equation (33).The total power generation, the load and the BESS output power in each MG are depicted in Figure 9d.The total generation of each MG is varied according to the changed load and the target flow and the BESS of each MG has an output power to the maintain flow of the MG PCC at target flow.Figure 10 shows the operating characteristics of MG 1.The MG 1 BESS first responds to a timevarying load after which the distribution of the output power of the MG BESS is carried out repeatedly.The incremental cost increases on a load increment and vice versa.Convergence information about the power margin and the current power of DGs is altered in accordance with the variation in the DG output.The output patterns of the MG 1 BESS before operation of the consensus algorithm are the sum of the load pattern and target flow.Figure 10 shows the operating characteristics of MG 1.The MG 1 BESS first responds to a time-varying load after which the distribution of the output power of the MG BESS is carried out repeatedly.The incremental cost increases on a load increment and vice versa.Convergence information about the power margin and the current power of DGs is altered in accordance with the variation in the DG output.The output patterns of the MG 1 BESS before operation of the consensus algorithm are the sum of the load pattern and target flow.

Conclusions
This paper investigates a distributed coordination control strategy between the DGs in the MG level and between the MGs in the MMG level based on the consensus algorithm.The rapid dynamic characteristic of the BESS is used for controlling the flow of the MG and the MG PCC, responding to a momentary change of power, and the output power of the BESS is distributed to the DGs and the MGs.The output distribution to the DG is carried out at optimal economic point by equalizing the incremental cost of each DG.The output distribution between the MGs is divided in proportion to the power margin or the current power of the MG according to the sign of the BESS output.The verification of the proposed algorithm is conducted through a PSCAD simulation model using C language.
As the flow of the PCC is controlled to accurate values, the utility recognizes the MMG as a controllable generation or consumption facility.Therefore, the utility has an advantage of decreasing the unforeseen variability of power in the whole system requesting additional generation or consumption as the need arises.Dependence of a high-ranking system can be decreased in case the system elements are controlled by the distributed control strategy.Moreover, in this distributed control, connection and disconnection of elements to and from the system are relatively free because the system is operated through communication only with the neighboring agents.
The proposed algorithm in this paper is a control strategy concerning real-time changes under a condition that the system scheduling was already decided.It may be possible in future to construct a completely distributed control system scheduling the distributed resources locally.

Conclusions
This paper investigates a distributed coordination control strategy between the DGs in the MG level and between the MGs in the MMG level based on the consensus algorithm.The rapid dynamic characteristic of the BESS is used for controlling the flow of the MG and the MG PCC, responding to a momentary change of power, and the output power of the BESS is distributed to the DGs and the MGs.The output distribution to the DG is carried out at optimal economic point by equalizing the incremental cost of each DG.The output distribution between the MGs is divided in proportion to the power margin or the current power of the MG according to the sign of the BESS output.The verification of the proposed algorithm is conducted through a PSCAD simulation model using C language.
As the flow of the PCC is controlled to accurate values, the utility recognizes the MMG as a controllable generation or consumption facility.Therefore, the utility has an advantage of decreasing the unforeseen variability of power in the whole system requesting additional generation or consumption as the need arises.Dependence of a high-ranking system can be decreased in case the system elements are controlled by the distributed control strategy.Moreover, in this distributed control, connection and disconnection of elements to and from the system are relatively free because the system is operated through communication only with the neighboring agents.
The proposed algorithm in this paper is a control strategy concerning real-time changes under a condition that the system scheduling was already decided.It may be possible in future to construct a completely distributed control system scheduling the distributed resources locally.

Figure 1 .
Figure 1.Convergence characteristic according to the weighted factor selection method and the network topology.

Figure 1 .
Figure 1.Convergence characteristic according to the weighted factor selection method and the network topology.

Figure 2 .
Figure 2. Concept of distributed control for a MMG.

Figure 2 .
Figure 2. Concept of distributed control for a MMG.

Figure 3 .
Figure 3.Control block of the BESS to manage flow of the MG PCC.M G P : measured value of the power flow from the MMG to the MG;

Figure 3 .
Figure 3.Control block of the BESS to manage flow of the MG PCC.P MG : measured value of the power flow from the MMG to the MG; P MG target_ f low : target flow of the MG; P MG FFC_ref : output reference needed to maintain the flow of the MG; P MG_BESS BP : base point of the MG BESS necessary to restore the SOC of the BESS; P MG_BESS re f

refP
: output reference of DG I; * DG  : convergence value of the incremental cost of the DGs.min DGi P : minimum output power of DG I; max DGi P : maximum output power of DG i.

:
initial value of the output power of DG I; init c : initial value needed to count the number of agents; * DG c : convergence value of the information needed to count the number of agents; S : set of agents connected to the MG BESS; n : the number of agents; MG margin P : power margin of the MG;

Figure 5 .
Figure 5.Control block of the BESS to manage flow of the MMG PCC.M MG P : measured value of the power flow from the utility to the MMG;

Figure 5 .
Figure 5.Control block of the BESS to manage flow of the MMG PCC.P MMG : measured value of the power flow from the utility to the MMG; P MMG target_ f low : target flow of the MMG; P MMG FFC_re f : output reference needed to maintain the flow of the MMG; P MMG_BESS BP : base point of the MMG BESS necessary to restore the SOC of the BESS; P MMG_BESS re f

Figure 7 .
Figure 7. Simulation result in the MG level (Case 1).(a) Power of the MG flow, the MG BESS, the DGs and load; (b) Convergence of the incremental cost and the power margin of DGs.

Figure 7 .
Figure 7. Simulation result in the MG level (Case 1).(a) Power of the MG flow, the MG BESS, the DGs and load; (b) Convergence of the incremental cost and the power margin of DGs.

Figure 7 .
Figure 7. Simulation result in the MG level (Case 1).(a) Power of the MG flow, the MG BESS, the DGs and load; (b) Convergence of the incremental cost and the power margin of DGs.

Figure 8 .
Figure 8. Simulation result in the MMG level (Case 2).(a) Power of the MMG flow, the MMG BESS, the MGs and load; (b) Convergence of the power margin and sharing power of the MGs; (c) Target flow of each MG PCC.

Figure 8 .
Figure 8. Simulation result in the MMG level (Case 2).(a) Power of the MMG flow, the MMG BESS, the MGs and load; (b) Convergence of the power margin and sharing power of the MGs; (c) Target flow of each MG PCC.

Figure 9 .
Figure 9. Simulation result in the MMG level (Case 3).(a) Power of the MMG flow, the MMG BESS, the MGs and load; (b) Convergence of the power margin, the current power, and sharing power of the MGs; (c) Target flow of each MG PCC; (d) Total generation power, load, and the MG BESS output of each MG.

Figure 9 .
Figure 9. Simulation result in the MMG level (Case 3).(a) Power of the MMG flow, the MMG BESS, the MGs and load; (b) Convergence of the power margin, the current power, and sharing power of the MGs; (c) Target flow of each MG PCC; (d) Total generation power, load, and the MG BESS output of each MG.

Figure 10 .
Figure 10.Simulation result in the MG level (Case 3).(a) Power of the MG flow, the MG BESS, the DGs, and load in the MG1; (b) Convergence of the incremental cost, the power margin, and the current power of the DGs in the MG1.

Figure 10 .
Figure 10.Simulation result in the MG level (Case 3).(a) Power of the MG flow, the MG BESS, the DGs, and load in the MG1; (b) Convergence of the incremental cost, the power margin, and the current power of the DGs in the MG1.
convergence value about the power margin of DG i at iteration t; P DGi output [t]: convergence value about the current output of DG i at iteration t; c DGi [t]: convergence value needed to count the number of agents at iteration t; P DGi margin init 1] [ ] DGi c t : convergence value needed to count the number of agents at iteration t; init DGi margin P: initial value of the power margin of DG I;

Table 1 .
Parameters of the MMG elements.

Table 2 .
Parameters of the DGs in the MG1.