Distributed control strategy for DC microgrids based on average consensus and fractional ‐ order local controllers

A novel distributed secondary layer control strategy based on average consensus and fractional ‐ order proportional ‐ integral (FOPI) local controllers is proposed for the regulation of the bus voltages and energy level balancing of the energy storage systems (ESSs) in DC microgrids. The distributed consensus protocol works based on an undirected sparse communication network. Fractional ‐ order local controllers increase the degree of freedom in the tuning of closed ‐ loop controllers, which is required for DC microgrids with high order dynamics. Therefore, here, FOPI local controllers are proposed for enhanced energy balancing of ESSs and improved regulation of the bus voltages across the microgrid. The proposed control strategy operates in both islanded and grid ‐ connected modes of a DC microgrid. In both modes, the average voltage of the microgrid converges to the microgrid desired reference voltage. The charging/dis-charging of ESSs is controlled independent of the microgrid operating mode to maintain a balanced energy level. The performance of the proposed distributed control strategy is validated in a 38 ‐ V DC microgrid case study, simulated by Simulink real ‐ time desktop, consisting of 10 buses and a photovoltaic renewable energy source.

In recent years, DC microgrids have found more applications and faster growth in power distribution networks. This is because of their advantages compared to their AC microgrid alternatives, such as the elimination of AC-DC conversion steps as well as the removal of reactive power. These advantages lead to energy loss reduction and economic component savings [4,5]. The mainly used control strategies employed in microgrids can be categorised into the following three architectures [6][7][8]: � Centralised control architecture � Decentralised control architecture � Distributed control architecture In a centralised control system, there is a central controller that collects all the required data and processes it. Therefore, in this strategy, the computation burden is on a single component, and the flexibility of the system is degraded, which makes it susceptible to a single point of failure [9,10].
In a decentralised control system, controllers operate based on their local information. There are several controlling units in a decentralised control system such as converter controllers, load controllers, and DG controllers, among which there is no communication. The main disadvantages of this strategy are insufficient response time for load profile changes and steadystate voltage offsets. These shortages ultimately might lead to instability of the microgrid in certain scenarios [11][12][13]. In the distributed control strategies [14], the local information and the information from the neighbours over a sparse communication network are used by autonomous agents to achieve cooperative objectives.
Compared to centralised and decentralised control strategies, distributed control strategies provide better control performance with the cost of communication links. Some of the advantages of this strategy are scalability, robustness, reduction in computational complexity, high flexibility, no single point of failure, and task distribution among the local controllers in the microgrids [15,16]. Therefore, distributed control algorithms based on a communication network can provide a higher resiliency for microgrids [17][18][19][20].
Commonly proportional-integral-derivative (PID) controllers are used to regulate and control the local voltage in microgrids [21]. PID controllers are simple and have a better practical feasibility [22]. However, PID controllers pose low degrees of bandwidth, robustness, and freedom in tuneable parameters.
In recent years, with the introduction of the fractional calculus, fractional-order models have replaced traditional integer-order models. In this regard, the number of fractional-order models and their applications have rapidly grown [23,24].
Fractional-order PID (FOPID) controllers have a higher degree of freedom in tuneable parameters because of the two extra adjustable parameters (λ, μ). A particular type of FOPID controller is the fractional-order PI (FOPI) controller discussed in [25,26]. The FOPI controller has been introduced by Compared to the traditional PI controllers, due to the introduction of the λ parameter, FOPI has one more degree of freedom [27][28][29]. Trial and error method is used to set the controller parameters in the majority of microgrid applications. For the new adjustable parameters of fractional controllers such as the FOPI controller, this method is also used to provide a lower steady-state error and higher bandwidth. In recent years, the number of fractional-order controllers used in microgrids has grown. In [29], a robust FOPID controller is used to control AC microgrid frequency. It was shown that a robust FOPID reduces the effects of PV and wind turbine output power fluctuations, load variations, and the parametric uncertainties of the islanded microgrid frequency. In [30], learning-based FOPID controllers are introduced and a decentralised demand response programming was proposed to mitigate the frequency deviation of a stand-alone microgrid because of parametric uncertainties as well as changes in climatic patterns. In [31], FOPID controllers were used in an islanded microgrid with a single power source to control the fluctuations of the output voltage. The controllers' performance was evaluated under specific load settings and it was shown that the proposed controller reduces the system voltage fluctuation. Fractional-order controllers have the advantage of possessing more adjustable parameters, which allows fine-tuning of the control system to achieve better control performance and easier controller design due to higher degrees of freedom. This results in higher bandwidth for the supported frequency and mode adjustable response time in the closed-loop system. For example, the traditional PI controller has two adjustable parameters, but the FOPI controller has three adjustable parameters. Here, we have followed a trial-and-error approach to tune the controller parameters which is a common approach for complex applications such as microgrids. Furthermore, due to the extra adjustable parameter of the FOPI controller used here, controller tuning has become easier. In summary, the fractional-order controller has the following advantages: � Achieves better performance, flexibility, and a higher degree of freedom in the controller design. � Provides adjustable frequency and time responses and achieves robust performance as well as reduces highfrequency oscillations or chattering in the closed-loop system.
Several works have been reported regarding the use of distributed controllers for microgrids. In [32], distributed controllers were used to provide proportional current sharing for DC microgrids. In [33], a secondary layer controller was presented for accurate load sharing and voltage regulation in low voltage islanded microgrids. A hierarchical and distributed co-operative control strategy was presented in [34] for a networked microgrid. In [35], the authors have proposed a distributed resilience control strategy for multiple ESSs under fault and attack of secondary controllers. The proposed strategy gained to voltage and frequency restoration and state-ofcharge (SoC) balancing under various faults. A semi consensus strategy has been proposed in [36] for multifunctional hybrid energy storage systems (HESSs) for DC microgrid. Conventional V-P droops are used to regulate the batteries in a HESS, and integral droops (IDs) are used to regulate the supercapacitors. With the semi-consensus approach, a generic mathematical modelling of HESS is developed.
To address the aforementioned issues, this study proposes a novel distributed secondary layer control strategy for DC microgrids, based on average consensus protocol and FOPI local controllers. The energy level of the ES systems is balanced in the distributed strategy over a sparse communication network. Then, the FOPI controllers are used in the feedback path of converter controllers. The performance of the proposed controller is verified by the simulation of a 10bus case study 380 V DC microgrid using a Simulink realtime desktop.
The study is structured as follows: In Section 2, the DC microgrid configuration and its consisting components are discussed. In Section 3, an introduction to fractional-order PI controllers with the fractional calculus is provided. Then, in Section 4, the distributed average consensus protocol is discussed. The proposed distributed control framework is demonstrated in Section 5. In Section 6, the case study DC microgrid configuration is detailed along with the simulation results in Section 7. Finally, in Section 8, the conclusion of the study is provided.

| DC MICROGRID
The general configuration and structure of a DC microgrid are shown in Figure 1. Generally, there are four main components in a DC microgrid. These components are (1) DGs, (2) ESSs, (3) power electronic converters, and (4) DC loads [37]. These items are detailed as follows: DC microgrids operate in two modes: grid-connected mode and islanded mode. Here, the proposed controller works independently of the microgrid operating mode, which is evaluated in the simulation results. To guarantee maximum power absorption of the distributed energy resources such as PV panels, it is assumed that their converters work according to the maximum power point tracking scheme.
Here, the concept of virtual ESSs is used to integrate both DGs and ESSs in a single bus. This means that ESS acts as a buffer between the DG and the microgrid bus. Therefore, it is assumed that all the DGs have an internal ESS and have a series connection to the coupling bus. This removes the control complexity for the parallel operation of DGs and ESSs and provides a straightforward abstraction for the control system design.

| Introduction of fractional-order calculus
The integrodifferential operator in continuous time with order α ∈ R þ is denoted in Equation (1). Fractional calculus is developed as an extension of ordinary integration/differentiation for non-integer order operators a D α t , where a and t exhibit the operation bund.
The Euler's Gamma function is one of the primary and basic functions in fractional calculus and is defined as the following: The existing integral on the right side of Equation (2) converges to the values of the variable z for z > 0.
There are several integrodifferential operator definitions. The three well-known and common definitions are as follows: The Riemann-Liouville integrodifferential is commonly defined as follows: where m − 1 < α < m, m ∈ N, and Γ(.) is Euler's gamma function.
Likewise, the Grünwald-Letnikov is defined as follows:  The Caputo definitions with a fractional-order of derivative α for a function f : R + → R is defined as the following [38]: where m is the first integer greater than α.
With the lower boundary a = 0 and assuming zero initial condition, the Laplace transform of the α-th derivative of f(t) is defined as follows: (α ∈ R þ ): where s = j is the Laplace transform parameter.

| Fractional-order PI controller
The proposed FOPI controller structure is shown in Figure 2.
The control law of the FOPI controller PI λ À � in the time domain is as follows: where λ component is the integral order and e(t) is the error signal. The fractional-order signal is described as In the Laplace domain, the transfer function of the PI λ controller is as follows: It is quite clear that the FOPI controller has three adjustable parameters K p , K i , λ while the classical PI controller intrinsically has solely two tuneable parameters K p , K i . Therefore, it can be easily understood that the FOPI controller has an additional degree of freedom that can be tuned for optimised performance.
Considering Equation (8), if we put the lambda value equal to 1, the FOPI controller turns into a traditional PI controller. Hence, the classical PI controllers are special cases of the FOPI controllers.

| DISTRIBUTED CONSENSUS-BASED CONTROLLER
Here, every ES system has a consensus-based controller that uses its local measurements and the shared information from the neighbouring ES controllers to update its energy level (in per-unit)e i and the average voltage of the microgrid v i . Tracking the dynamic signals is the aim of this controller which is achieved by the following distributed average consensus protocol: The distributed ES controllers are connected through a network communication graph GðV; EÞ, where V ¼ f1; …; Ng represents the nodes and E represents the edges of the graph. Each node represents an ES controller and the edges represent the communication link between them. If there is a communication link between the nodes, they share information. The set of nodes connected to node i is called the neighbourhood of node i and is denoted by N i . Each node has a nodal degree which is equal to the number of its neighbours and is denoted by Every graph has a degree matrix D formed by d i and an adjacency matrix A which is defined by a ij = 1 if and only if ði; jÞ ∈ E, and a ij = 0 otherwise. L = D − A is the Laplacian matrix of the graph. In undirected graphs, the Laplacian matrix has an eigenvalue equal to zero, and the remaining eigenvalues have a value greater than zero 0 = λ g1 (L) < λ g2 (L) ≤ … λ gN (L).
The i-th ES controller will receive the average estimated state from its neighbours. Thereafter, the controller estimator uses the following average consensus protocol: in out Ki Kp + + F I G U R E 2 The structure of the fractional PI controller. λ defines the fractional-order of the PI controller. PI, proportional-integral where x i is a local state variable, and x i is a local average estimate of the shared value for the microgrid ES systems. The distributed average consensus protocol has the following vector form dynamics: where By taking the Laplace transform from Equation (10), the transfer matrix of the distributed consensus protocol yields as follows [39]: where X and X are the Laplace transforms of x and x respectively. For the average consensus protocol, the steady-state gain of a balanced communication graph with a sparse communication link is obtained by the following averaging operation: For a vector of constant inputs, it can be shown by the final value theorem that the x converges to the steady-state average values x ss as follows:

| DISTRIBUTED CONTROL STRATEGY
For the regulation of the converter voltage, a droop control is used to adjust the output reference voltage of v * i as follows: It is clear that the droop control works based on the locally measured output currents i i and microgrid voltage reference v mg . Two additional regulation signals are added to the main droop control equation. One of them is u v i , which is the voltage offset removal control signal and the other one is u e i , the energy balancing control signal. u v i is designed to control the average bus voltage of the microgrid and u e i is designed to balance the energy level of ES systems as well as to maintain an accurate load sharing. Also, r i in the droop control formula is the virtual resistance. Generally, virtual resistance is designed for the ES systems to use all their maximum capacities P max i , which causes the microgrid voltage to be maintained with minimum deviation Δv from the microgrid reference voltage v mg .
In a droop control system, the load power is eventually shared between the ES systems in inverse proportion to their virtual resistances r i .
DC microgrids expose high-order harmonics due to the converters' switching. In order to remove the harmonics, a low-pass filter is commonly installed with a cancellation frequency of ω c i : Current regulation is then achieved in two stages [40]. In the first stage, a proportional-integral (PI) controller G v i is used in Equation (17) to adjust the converter internal current reference to regulate the output voltage: Then in the next stage, the current controller sets the pulse width modulation switching duty cycle to control the switching components of the converter for the output current regulation.
For the energy balancing regulation signal u e i , a PI controller with fractional-order in Equation (18) is applied to set the energy level value e i to the average energy level estimate of ES systems. Because ES systems have different capacities, the energy level in per-unit is used in the computations: Also, for the voltage offset removal control signal u v i , a fractional PI controller in Equation (19) is used, in which the local average bus voltage estimate is regulated to the microgrid reference voltage.
The block diagram of the control strategy is shown in Figure 3. The voltage dynamics of the system is then derived as a multiple-input multiple-output (MIMO) system. If V mg is the Laplace transform of the microgrid voltage reference, the distributed control dynamics can be expressed as follows: Now the DC-DC converters remained to be modelled, which operate with a switching interval (Ts) in the current control model (CCM). To model and control the DC-DC converters, it is assumed that they are operating with a control strategy, shown in Figure 4.
The closed-loop dynamic of voltage regulation in the DC-DC converter between the reference voltage of the ES and the bus voltage is summarised in the transfer function as follows [41]: The input-output model of the local bus voltage of the microgrid will be derived as follows: The output current of the ES systems and bus voltages are related to the admittance matrix which is computed based on the microgrid lines and load impedances.
A first-order linear model is also used for the energy level dynamics of the batteries [42].
where e max i is the highest capacity of the i-th ES system. Then, the global energy dynamics is derived as follows: Finally, the total closed-loop dynamics of the voltage regulation can be described by the following MIMO linear system:

| CASE STUDY MICROGRID
The 10-bus microgrid for the case study of this study is shown in Figure 5. A PV generation is connected to bus 1 as a DG with the interfacing DC-DC converter. Bus 1 is connected to the main grid with a 150 kW rated rectifier interfacing the connection. Each bus has a battery as the ES systems and is connected with a DC-DC converter to its corresponding bus. Each bus has a load with a different value. The connection impedances between the buses are designed by the analysis of wiring configurations in DC powered data centres, which are shown as Z in Figure 5.
The values of the loads in the buses and energy storage capacities are provided in Table 1. Buses 1-5 have 15 kW load and buses 6-10 have 5 kW load. Also, buses 1-7 have 25 kWh batteries and buses 8-10 have 12.5 kWh batteries. The PV generation was modelled based on the simulation approach from [43], using irradiance data from 2 PM to 4 PM on June 1, 2014, from the NREL Solar Radiation Research Laboratory (SRRL), Baseline Measurement System (BMS) in Colorado. The irradiance data of the PV panel is shown in Figure 6.
Virtual resistance is used in the droop control for powersharing purpose; therefore, the power rating of ESSs is important for the calculation of resistance, not their energy capacity. In the scenario, we consider the maximum Δv to be equal to 3% for each bus. On the other hand, the voltage reference of the bus is equal to 380 V and v mg = 380v. Therefore, Δv = 0.03 � 380 = 11.4 V. P max i is the maximum power of the batteries that are equal to the maximum power of the loads connected to each bus. The maximum loads' powers are shown in Table 1. Therefore, r i is obtained as follows: For better demonstration, the communication link between the agents in the proposed control strategy is shown in Figure 7.
Also, the Laplacian matrix and their eigenvalue according to Figure 7 for the case study are as follows: with the eigenvalues as By definition, the sum of every row in the Laplacian matrix is zero. Therefore, the Laplacian matrix always has zero eigenvalue. This means that rank(L) ≤ n − 1. For more explanation, the readers can refer to [44].

| SIMULATION RESULTS
We have considered the following scenario for the simulation of the proposed control strategy. In this scenario, the PV generation in specific periods is less than the power consumption of the microgrid, which is equal to 100 kW. In Figure 8, the PV generation power is shown. It is clear from  Figure 9 that from 3100 to 3200 s, 5000 to 5100 s, and 6000 to 6100 s, the value of PV injected power is lower than 100 kW. Therefore, the PV cannot supply the excess microgrid load power. In this mode, the microgrid gets connected to the main grid. The main grid injects power to the microgrid, as shown in Figure 10. The value of main grid injected power is shown in Figure 10. In Figure 9, the voltage of buses under the proposed strategy is shown. Bus voltages reach the nominal voltage, 380 V, in less than 20 s.
During the operation, when the power of PV is less than load power (100 kW) in the highlighted periods, there is a transient variation in the voltage of buses. After the shortterm variations, the bus voltages converge to 380 V very fast. This variation in the voltage is about 0.5 V, which is very low compared to the acceptable deviation in the literature, and it shows the proposed secondary control strategy provides acceptable performance. The simulation parameters are shown in Table 2.
The proposed controls strategy and the microgrid are simulated in MATLAB/Simulink using the real-time desktop toolbox and the Simscape toolbox.
The initial energy level of the ES systems per-unit are shown in Table 3. The energy level of ES systems per-unit during the simulation is also shown in Figure 11. As shown in Figure 11, every ES system starts from its initial value and charges completely in a very short time. When the PV power supply is less than the microgrid load (100 kW), the ES systems supply the excess load power as well as regulate the buses voltages. Also, the convergence of the energy level of each ES system can be seen clearly in the simulation, and it shows that the proposed secondary control strategy provides acceptable performance.
Here, the ESSs are used both as backup energy sources and also for stabilisation purposes. To fulfil both objectives at the same time, the ESSs need to be operated close to 1 p.u., which increases the microgrid reliability in the event of faults or disconnections in the microgrid. With this strategy, the microgrid can supply loads longer due to the fully charged backup ESSs. In Figure 12, the bus voltages' deviation from 380 V reference is shown. It is observable that the buses deviated voltage in different microgrid operation mode does not exceed 1 V. We set the allowed voltage deviation value of 3% of 380 V that equals to 11.4 V. It is clear that 0.5 V is a really small deviation compared to 11.4 V. Therefore, the deviation of voltage for each bus is less than the allowed value of the voltage deviation to maintain an acceptable power quality. This confirms the performance of the proposed distributed control strategy.

| CONCLUSION AND FUTURE WORK
This study proposed a novel distributed control strategy based on the average consensus protocol and FOPI local controllers for DC microgrids. The main objectives of this strategy are to stabilise the bus voltages and energy level balancing of the storage systems in a microgrid. This is realised by regulating the output voltage of the DC-DC converters. This strategy is able to control and regulate the microgrid output voltage and balance the energy level of the ES systems. The convergence speed of the energy levels as well as the convergence speed of the voltages has shown an acceptable performance in both islanded and gridconnected modes of the microgrid operation. The existence of a fractional-order controller in the system causes the closed-loop system dynamics to become the fractional-order and the stability region of the fractional-order systems is larger than that of the integer order systems. Microgrid voltage stabilisation and low voltage offsets during mode transitions are the advantages of this strategy. For the future study, it is planned to use eventtriggered distributed control strategies based on machine learning approaches to reduce the number of messages sent in the communications network. F I G U R E 1 1 Per-unit energy level of ES systems during the simulation with the proposed distributed secondary layer control strategy. It can be seen that the energy level of the ES systems is balanced around 1 p.u. during the charging/discharging events. ES, energy storage