Power and Capacity Consensus Tracking of Distributed Battery Storage Systems in Modular Microgrids

: Conventional microgrids have a speciﬁc system conﬁguration and a complex hierarchical control structure, which has resulted in difﬁculties in their economic development. A modular microgrid based on distributed battery storage has been proposed to realize the rapid economic development of small-to-medium microgrids. Control of modular microgrids is simpliﬁed to voltage control within modules and exchange power control among modules. Battery power has great inﬂuence on battery performance. Space-time complementary power characteristics among modules help to alleviate power ﬂuctuations, prolong the service life and realize the uniﬁed maintenance of distributed batteries. Leader-following consensus theory of multi-agent systems is adopted to realize the power and capacity consensus tracking of distributed battery storage in a modular microgrid. Sufﬁcient and necessary conditions for continuous-time and sampled-data bounded power and capacity consensus tracking of distributed battery storages are deduced by a matrix analytical method. Steady regions of sampling period and sampling delay for sampled-data bounded power and capacity consensus tracking are determined by analytical or numerical solutions. Simulations and experiments on a modular microgrid demonstration project located on DongAo Island (China) show the effectiveness and robustness of the proposed power and capacity consensus tracking strategy for distributed storage systems. The power and capacity consensus tracking strategy determines the exchange power among modules and improves the control technology of modular microgrids.


Introduction
Microgrids are an effective way to realize the large-scale integrated utilization of renewable energy sources, such as wind and solar power. Microgrids can be integrated into the distribution network as a flexible and controllable part, or run as stand-alone power systems to provide energy supply for areas which are unreachable by the regular utility grid [1]. With the reform of the electricity market, the application of microgrids is booming [2], and a large number of microgrid projects have been built around the world. An off-grid microgrid with installed capacity 357 kW was developed on the Isle of Eigg in Scotland to provide a reliable 24-h electricity supply to the islanders [3]. A 400 kW microgrid comprising four 100 kW hybrid combined cooling heating and power (CCHP), uniquely able to seamlessly transition between grid-tie and island-mode operation, provides power, water and heat for the Brevoort building in New York [4]. A megawatt demonstration project located on Nanji Island in China was also developed to provide clean energy [5]. With the development of sustainable appropriate tool for analyzing and designing a distributed system [33]. Chow first proposed an incremental cost consensus algorithm to solve the conventional centralized economic dispatch problem in a smart grid [34] and the relationship between the convergence rate and network topology has been discussed in [35]. Yu put forward a virtual generation tribe-based consensus algorithm for dynamic generation dispatch of smart grids [32]. A fully distributed coordination control scheme including containment and consensus-based algorithm is proposed realizing a good coordination between reactive power sharing and voltage bound in an AC microgrid [36]. The abovementioned multi-agent consensus studies on smart grids or microgrids mainly concentrate on the design of consensus protocols, communication network topologies, and proof of convergence with continuous-time. The actual control system is a sampled-data control system based on a digital processor. The information is transmitted only at the sampling time. Sampling and communication delays always exist, which has a great influence on the stability and the convergence rate of multi-agent systems. We have carried out a series of theoretical researches on bounded consensus tracking of multi-agent systems with sampled-data [37,38], which lays a good foundation to design a power and capacity consensus tracking strategy for distributed battery storage in a modular microgrid.
The configuration and operation mode of a modular microgrid are introduced first. Then the power relationships of a modular microgrid are analyzed and a multi-agent power and capacity model of distributed battery storage with an undirected communication network can be established. The continuous-time and sampled-data control protocols are designed based on the leader-following consensus tracking theory. The sufficient and necessary conditions for bounded power and capacity consensus tracking of distributed batteries are derived by a matrix analytical method and the steady regions of sampling period and sampling delay can be determined by analytical or numerical solutions. Simulations and experiments are then conducted on the modular microgrid demonstration project on DongAo Island (China).
The main contribution of this paper is that power and capacity consensus tracking of distributed battery storage is chosen as an optimum control objective, which can make full use of the space-time complementary power characteristics among modules, to alleviate the power fluctuations and realize the unified maintenances of distributed battery storage systems. Leader-following consensus tracking theory of multi-agent systems is adopted to study the continuous-time and sampled-data control protocols and stabilization ranges of parameters. The power and capacity consensus tracking strategy of distributed battery storage determines the exchange power among modules and therefore the control problem of the modular microgrid is solved completely. The power and capacity consensus tracking strategy improves the control technology of a modular microgrid and promotes the economic application of small-to-middle modular microgrids.
The organization of this paper is as follows: Section 2 illustrates the modular microgrid. Section 3 introduces leader-following consensus tracking theory of multi-agent systems. Section 4 discusses our continuous-time power and capacity consensus tracking strategy of distributed battery storage systems. Section 5 discusses sampled-data power and capacity consensus tracking strategy of distributed battery storage. Section 6 presents simulations and experiments on the modular microgrid demonstration project on DongAo Island. Section 7 discusses the conclusions.

Modular Microgrid
DongAo Island is a classic tourist island, located in Zhuhai City, Guangdong Province of Southern China, with an area of 4.66 square kilometers and a permanent population of more than 600 people. The original diesel generator power supply system on the island had a series of drawbacks such as poor power quality, high electricity price and no guarantee of uninterruptible power supply. There are abundant wind and solar resources and so the original diesel generator power system should be converted to a renewable energy microgrid.

System Configuration
In order to realize power generation and consumption on the spot reducing the power transmission loss, photovoltaic (PV) arrays and wind turbines are installed in the concentrated load zones. Figure 1 shows the battery storage system, rooftop PV, terrestrial PV and wind turbines installed on DongAo Island. The structure of the modular microgrid on DongAo Island is shown in Figure 2. There are three concentrated load zones on DongAo Island and three modules are established. Module 1 is the power plant zone. Module 2 is the comprehensive building zone and module 3 is the cultural center zone. Each module is an autonomous energy system and has the same configuration, which is composed of wind and solar generation, battery storage, load and power electronic converter. Modules are interconnected through the 10 kV transmission network by transformers. Each module can freely access or separate from the grid. Module 0 is composed of three-porter converter, battery storage and diesel generator. Module 0 works as V/F voltage source establishing the 10 kV voltage of the transmission network. The diesel generator in Module 0 is a backup source and works only when the renewable energy is not enough. power supply. There are abundant wind and solar resources and so the original diesel generator power system should be converted to a renewable energy microgrid.

System Configuration
In order to realize power generation and consumption on the spot reducing the power transmission loss, photovoltaic (PV) arrays and wind turbines are installed in the concentrated load zones. Figure 1 shows the battery storage system, rooftop PV, terrestrial PV and wind turbines installed on DongAo Island. The structure of the modular microgrid on DongAo Island is shown in Figure 2. There are three concentrated load zones on DongAo Island and three modules are established. Module 1 is the power plant zone. Module 2 is the comprehensive building zone and module 3 is the cultural center zone. Each module is an autonomous energy system and has the same configuration, which is composed of wind and solar generation, battery storage, load and power electronic converter. Modules are interconnected through the 10 kV transmission network by transformers. Each module can freely access or separate from the grid. Module 0 is composed of three-porter converter, battery storage and diesel generator. Module 0 works as V/F voltage source establishing the 10 kV voltage of the transmission network. The diesel generator in Module 0 is a backup source and works only when the renewable energy is not enough. A three-port converter is the key equipment for the configuration and control of a modular microgrid. It has AC-DC-AC topology. The 480 V battery pack composed of 240 2-Volt cells in series is connected to the DC port. The AC-DC part connected to the transformer works as a rectifier in active power and reactive power (PQ) control mode and realizes the three-phase balanced bidirectional power flow between module and microgrid. When the module has surplus energy, it releases energy to the microgrid. When the energy is insufficient, the module absorbs energy from the microgrid. The other DC-AC inverter part is only responsible for establishing the A three-port converter is the key equipment for the configuration and control of a modular microgrid. It has AC-DC-AC topology. The 480 V battery pack composed of 240 2-Volt cells in series is connected to the DC port. The AC-DC part connected to the transformer works as a rectifier in active power and reactive power (PQ) control mode and realizes the three-phase balanced bidirectional power flow between module and microgrid. When the module has surplus energy, it releases energy to the microgrid. When the energy is insufficient, the module absorbs energy from the microgrid. The other DC-AC inverter part is only responsible for establishing the voltage reference within the module. Because of the isolation of three-port converter, the AC bus of the modular microgrid is segmental, so control of the modular microgrid is simplified to the voltage control within modules and exchange power control among modules. The adopted topology of three-port converter is shown in Figure 3. The inverter with three-phase four-wire structure can realize three-phase balanced output voltage even under nonlinear or unbalanced load conditions and has been discussed in detail in [25]. voltage reference within the module. Because of the isolation of three-port converter, the AC bus of the modular microgrid is segmental, so control of the modular microgrid is simplified to the voltage control within modules and exchange power control among modules. The adopted topology of three-port converter is shown in Figure 3. The inverter with three-phase four-wire structure can realize three-phase balanced output voltage even under nonlinear or unbalanced load conditions and has been discussed in detail in [25].

Power Relationship of Modular Microgrid
Because the diesel generator acts only as a backup source, diesel generator power is not considered in this paper. Power transmission loss and power conversion loss are neglected and the power flow chart of modular microgrid is shown in Figure 4 according to (1) voltage reference within the module. Because of the isolation of three-port converter, the AC bus of the modular microgrid is segmental, so control of the modular microgrid is simplified to the voltage control within modules and exchange power control among modules. The adopted topology of three-port converter is shown in Figure 3. The inverter with three-phase four-wire structure can realize three-phase balanced output voltage even under nonlinear or unbalanced load conditions and has been discussed in detail in [25].

Power Relationship of Modular Microgrid
Because the diesel generator acts only as a backup source, diesel generator power is not considered in this paper. Power transmission loss and power conversion loss are neglected and the power flow chart of modular microgrid is shown in Figure 4 according to (1) Figure 3. Topology of the three-port converter.

Power Relationship of Modular Microgrid
Because the diesel generator acts only as a backup source, diesel generator power is not considered in this paper. Power transmission loss and power conversion loss are neglected and the power flow chart of modular microgrid is shown in Figure 4 according to Figure 2. where P Bati is positive for charging power and negative for discharging power of battery, P PVi is the solar power, P WTi is the wind power, P LDi is the load power, and P Ei is the exchange power between module i and microgrid. The dynamics of battery power are:

Power Balance in the Module
where P PVi , P WTi and P LDi are uncontrollable random perturbation variables, so P Ei is chosen as the control variable and P Bati can be regulated by P Ei . The unit of battery power is kW and the unit of battery capacity is kWh. The relationship between battery capacity and battery power can be expressed as:

Power Balance among Modules
Because Module 0 works as a voltage source, P E0 is a power slack node and is determined by the exchanged powers of other modules. where is positive for charging power and negative for discharging power of battery, is the solar power, is the wind power, is the load power, and is the exchange power between module i and microgrid. The dynamics of battery power are: WTi LDi dP (t) / dt dP (t) / dt dP (t) / dt dP (t) / dt dP / dt , i , , 1 2 3 (2) where , and LDi P are uncontrollable random perturbation variables, so is chosen as the control variable and can be regulated by . The unit of battery power is kW and the unit of battery capacity is kWh. The relationship between battery capacity and battery power can be expressed as: 2.2.2. Power balance among modules: Because Module 0 works as a voltage source, E P 0 is a power slack node and is determined by the exchanged powers of other modules.  Figure 5 shows the undirected communication network of leader-following multi-agent system [39]. Node set V = {1, 2,…, n} represents independent agents. Weighted adjacent matri   Figure 5 shows the undirected communication network of leader-following multi-agent system [39]. Node set V = {1, 2, . . . , n} represents independent agents. Weighted adjacent matri A = a ij describes the relationship between nodes. If there exists information communication between agent i and j, a i j > 0, otherwise a i j = 0. For an undirected network, its adjacent matrix A is a symmetric matrix and a ij = a ji . Laplacian matrix L = [l ij ] is another matrix describing the network topology and the element is:

Leader-Following Consensus Tracking Theory of Multi-Agent Systems
If there is a leader in a multi-agent system, agent 0 presents the leader. The leader adjacent matrix is defined as B = diag (b 1 , b 2 , . . . , b n ). If there exists information communication between agent i and the leader, the leader adjacent element b i > 0, otherwise b i = 0. The dynamic characteristics of first-order multi-agent system can be described as [40]: where x i is the state of the agent and u i is the control variable. To ensure that all the agents can follow the leader's reference state, Wei presented a typical continuous-time consensus tracking protocol [40]: where x 0 , x i , x j are states of the leader agent, agent i and agent j individually.
Through the periodic sampling technique, the sampled-data control model of Equation (6) is: where T is the sampling period and k is the discrete time index. When time delay is not considered, the control input can be expressed as: Energies 2018, 11, x FOR PEER REVIEW 8 of 26

Continuous-Time Power and Capacity Consensus Tracking Strategy of Distributed Battery Storages
In order to develop a universal model, n following modules are considered. According to Equations (2), (6) and (7), the continuous-time power and capacity consensus tracking protocol of battery storage is: where bi and aij are adjacent coefficients of battery power network, ki and kij are the adjacent coefficients of battery capacity network:   Lemma 3. Suppose matrix P = A B C D is m + n order matrix, where A is m-order square matrix and D is n-order square matrix, B is m × n matrix and C is n × m matrix. The determinant of block matrix P.

Continuous-Time Power and Capacity Consensus Tracking Strategy of Distributed Battery Storages
In order to develop a universal model, n following modules are considered. According to Equations (2), (6) and (7), the continuous-time power and capacity consensus tracking protocol of battery storage is: (10) where b i and a ij are adjacent coefficients of battery power network, k i and k ij are the adjacent coefficients of battery capacity network: The dynamics of consensus variables P Bati and S Bati are: where: The characteristic polynomials of matrix G is H 1 is the Hermitian matrix of multi-agent battery power network. H 2 is the Hermitian matrix of multi-agent battery capacity network. The dynamics characteristics of battery power and battery capacity have different time constants. Battery capacity is the integral of battery power and so battery capacity has large time constant. In order to simplify analyses, let H 2 = cH 1 and c is the proportional coefficient. Then, Equation (19) is simplified as: where Bounded consistency tracking can be achieved if and only if all characteristic roots of Equation (21) have negative real parts: Because H 1 is a real symmetric matrix, so eigenvalues λ i (H 1 ) of matrix H 1 is real number. The characteristic roots of Equation (21) have negative real parts when λ i (H 1 ) and c are both positive real numbers.

Sampled-Data Power and Capacity Consensus Tracking Strategy of Distributed Battery Storages
According to Equations (8) and (10), the sampled-data control variable P Ei is: Let sampling delay be: where τ > 0, which includes communication delay. m is non-negative integer and ε ∈ (0, T). The sampled-data power and capacity consensus tracking protocol of battery storage is designed as: ., Then: Substituting Equations (22) and (24) into Equation (1) leads to: Defining the tracking error vector: Then the difference equation about error vector can be obtained as: Then the error vector can be expressed as: where E(0) is the initial state of the error vector. The characteristic polynomial of matrix G 1 is:  According to Lemma 3, by using block matrix to calculate, we can get: Therefore, the battery power can realize bounded consensus tracking only when all eigenvalues of Equation (34) are located within the unit circle, that is, the spectral radius of G 1 is less than 1.
Specially, when the time delay is less than one period, in other words, m = 0, Equation (34) can be simplified as follows: According to Lemma 2, all roots of Equation (35) Further analysis, the roots can meet the requirements when parameters satisfy the inequality (37): Therefore, the necessary and sufficient condition for sampled-data power consensus tracking of distributed storages can be obtained as Equation (38) by simplification: Similarly, the necessary and sufficient condition for sampled-data power consensus tracking of distributed storages can be obtained when m = 1:

Case B: c > 0
Sampled-data power and capacity consensus tracking is considered when c > 0. According to Lemma 3, by using block matrix to calculate, we can get: Therefore, power and capacity of battery storages can achieve bounded consensus tracking only when all the eigenvalues of the Equation (40) are within the unit circle, that is, the spectral radius of matrix G 1 is less than 1. Equation (40) shows that it is a higher-order equation. It is impossible to determine the analytic solutions and only the numerical solutions can be obtained.

Simulations and Experiments
To verify the performances of power and capacity consensus tracking strategy of distributed storages in modular microgrid, simulations and experiments are carried out on the modular microgrid demonstration project as shown in Figure 2. Figure 6 shows the undirected communication network topology of modular microgrid and the adjacent elements are 0.3. Agent 1, 2, 3 represents module 1, 2, 3, respectively and Agent 0 presents module 0. When battery capacity consensus tracking is considered, let c = 0.1 and H 2 = 0.1H 1 . According to Figure 6 Energies 2018, 11, x FOR PEER REVIEW 13 of 26 microgrid demonstration project as shown in Figure 2. Figure 6 shows the undirected communication network topology of modular microgrid and the adjacent elements are 0.3. Agent 1, 2, 3 represents module 1, 2, 3, respectively and Agent 0 presents module 0. When battery capacity consensus tracking is considered, let c = 0.1 and = 0.1 . According to Figure 6, we can get the weighted adjacent matrix . . .

Simulations of Continuous-Time Power and Capacity Consensus Tracking Strategy
In the following Figure 7 to Figure 25, the cyan line, blue line, orange line and green line represent variables of module 0, 1, 2, 3 respectively. Only power consensus tracking is considered first. Load power is 0, 10, 20 and 30 kW in module 0, 1, 2 and 3 individually. Exchange power between each module and microgrid is shown in Figure 7. When the system is stable, Module 0 outputs 15 kW to microgrid, Module 1 outputs 5 kW to microgrid, Module 2 inputs 5 kW from microgrid and Module 3 inputs 15 kW from microgrid. The distributed battery power in modules in Figure 8 shows that it tends to be consistent and the discharging power converge to 15 kW after 7 s. The cyan dotted line is the power of the leader agent, that is, the distributed energy storage power realizes the bounded consensus tracking.

Simulations of Continuous-Time Power and Capacity Consensus Tracking Strategy
In the following Figures 7 to 25, the cyan line, blue line, orange line and green line represent variables of module 0, 1, 2, 3 respectively. Only power consensus tracking is considered first. Load power is 0, 10, 20 and 30 kW in module 0, 1, 2 and 3 individually. Exchange power between each module and microgrid is shown in Figure 7. When the system is stable, Module 0 outputs 15 kW to microgrid, Module 1 outputs 5 kW to microgrid, Module 2 inputs 5 kW from microgrid and Module 3 inputs 15 kW from microgrid. The distributed battery power in modules in Figure 8 shows that it tends to be consistent and the discharging power converge to 15 kW after 7 s. The cyan dotted line is the power of the leader agent, that is, the distributed energy storage power realizes the bounded consensus tracking.   Then power and capacity consensus tracking are both considered. The initial battery storage capacity is S Bat0 = 120 kWH, S Bat1 = 150 kWH, S Bat2 = 180 kWH, S Bat3 = 210 kWH. When the system is stable, Figure 9 shows that Module 0 outputs 10.5 kW to microgrid, Module 1 outputs 3.5 kW to microgrid, Module 2 inputs 3.5 kW from microgrid and Module 3 inputs 10.5 kW from microgrid. The distributed battery power in modules is different and P Bat0 = −10.5 kW, P Bat1 = −13.5 kW, P Bat2 = −16.5 kW, P Bat3 = −19.5 kW as shown in Figure 10. Because the time constant of battery storage capacity is very large, the time to reach power consensus is very long. The difference power among batteries is to eliminate the capacity differences among batteries.
Simulations results show that continuous-time power and capacity consensus tracking is reachable and the leader-following power and capacity consensus tracking model of distributed battery storages in modular microgrid is effective.

Simulations of Sampled-Data Power Consensus Tracking Strategy
When m = 0, according to Equation (38), the range of the sampling period and sampling delay for system stabilization is: T . Exchange power between each module and microgrid is shown in Figure 11. When the system is stable, module 0 outputs 15 kW to microgrid, module 1 outputs 5 kW to microgrid, module 2 inputs 5 kW from microgrid and module 3 inputs 15 kW from microgrid. The battery power in modules in Figure 12 shows that it tends to be consistent and the discharging power converge to 15 kW after 8 s. Results show that the stabilization range is effective as shown in Equation (41). When m = 1, according to Equation (39), the range of the sampling period and sampling delay for system stabilization are:

Simulations of Sampled-Data Power Consensus Tracking Strategy
When m = 0, according to Equation (38), the range of the sampling period and sampling delay for system stabilization is: T . Exchange power between each module and microgrid is shown in Figure 11. When the system is stable, module 0 outputs 15 kW to microgrid, module 1 outputs 5 kW to microgrid, module 2 inputs 5 kW from microgrid and module 3 inputs 15 kW from microgrid. The battery power in modules in Figure 12 shows that it tends to be consistent and the discharging power converge to 15 kW after 8 s. Results show that the stabilization range is effective as shown in Equation (41). When m = 1, according to Equation (39), the range of the sampling period and sampling delay for system stabilization are:

Simulations of Sampled-Data Power Consensus Tracking Strategy
When m = 0, according to Equation (38), the range of the sampling period and sampling delay for system stabilization is: Let the sampling delay τ = 0.2 s and sampling period T = 0.5 s. Loads are unchanged. Exchange power between each module and microgrid is shown in Figure 11. When the system is stable, module 0 outputs 15 kW to microgrid, module 1 outputs 5 kW to microgrid, module 2 inputs 5 kW from microgrid and module 3 inputs 15 kW from microgrid. The battery power in modules in Figure 12 shows that it tends to be consistent and the discharging power converge to 15 kW after 8 s. Results show that the stabilization range is effective as shown in Equation (41).
When m = 1, according to Equation (39), the range of the sampling period and sampling delay for system stabilization are: Let the sampling period T = 0.2 s and the sampling delay τ = 0.3 s. Loads are unchanged. Figure 13 shows the exchange power of modules. The battery power in Figure 14 shows that it also realizes the power consensus tracking. But the convergence rate is slower with the decrease of the sampling period. According to Equations (41) and (42), the system is unstable when T = 2.4 s and τ = 0.2 s. Figure 15 shows that the battery power is divergent.
. T T min T,T . 0 08 Let the sampling period T = 0.2 s and the sampling delay τ = 0.3 s. Loads are unchanged. Figure 13 shows the exchange power of modules. The battery power in Figure 14 shows that it also realizes the power consensus tracking. But the convergence rate is slower with the decrease of the sampling period. According to Equations (41) and (42), the system is unstable when T = 2.4 s and τ = 0.2 s. Figure 15 shows that the battery power is divergent. Simulation results verify the effectiveness of the stable domain of sampling period and sampling delay with sampled-data according to Equation (34).
. T T min T,T . 0 08 Let the sampling period T = 0.2 s and the sampling delay τ = 0.3 s. Loads are unchanged. Figure 13 shows the exchange power of modules. The battery power in Figure 14 shows that it also realizes the power consensus tracking. But the convergence rate is slower with the decrease of the sampling period. According to Equations (41) and (42), the system is unstable when T = 2.4 s and τ = 0.2 s. Figure 15 shows that the battery power is divergent. Simulation results verify the effectiveness of the stable domain of sampling period and sampling delay with sampled-data according to Equation (34).    Simulation results verify the effectiveness of the stable domain of sampling period and sampling delay with sampled-data according to Equation (34).

Simulations of Sampled-Data Power and Capacity Consensus Tracking Strategy
When sampled-data power and capacity consensus tracking is considered, it is difficult to have the analytical solutions, but easy to have numerical solutions for Equation (40).
Equation (40) is simplified as: Figure 16 shows the stabilization range of sampling period and sampling delay when m = 0. The stabilization range of sampling period is from 0.1 to 3.2 s. Figure 17 shows the stabilization ranges of sampling period and sampling delay when m = 1. The stabilization range of sampling period is from 0-0.5 s. Figure 18 shows the stabilization ranges of sampling period and sampling delay when m = 2. The stabilization range of sampling period is from 0 to 0.5 s.

Simulations of Sampled-Data Power and Capacity Consensus Tracking Strategy
When sampled-data power and capacity consensus tracking is considered, it is difficult to have the analytical solutions, but easy to have numerical solutions for Equation (40).
Equation (40) is simplified as: Figure 16 shows the stabilization range of sampling period and sampling delay when m = 0. The stabilization range of sampling period is from 0.1 to 3.2 s. Figure 17 shows the stabilization ranges of sampling period and sampling delay when m = 1. The stabilization range of sampling period is from 0-0.5 s. Figure 18 shows the stabilization ranges of sampling period and sampling delay when m = 2. The stabilization range of sampling period is from 0 to 0.5 s.

Simulations of Sampled-Data Power and Capacity Consensus Tracking Strategy
When sampled-data power and capacity consensus tracking is considered, it is difficult to have the analytical solutions, but easy to have numerical solutions for Equation (40).
Equation (40) is simplified as:  Figure 16 shows the stabilization range of sampling period and sampling delay when m = 0. The stabilization range of sampling period is from 0.1 to 3.2 s. Figure 17 shows the stabilization ranges of sampling period and sampling delay when m = 1. The stabilization range of sampling period is from 0-0.5 s. Figure 18 shows the stabilization ranges of sampling period and sampling delay when m = 2. The stabilization range of sampling period is from 0 to 0.5 s.  The stabilization range of sampling delay varies corresponding to the same sampling period when m is different. The numerical solutions of Equation (43) give a guidance for selection of sampling period and sampling delay to realize the sampled-data bounded power and capacity consensus tracking of distributed battery storages.  Figure 19 shows the operation mode of module 3. Grid-connected mode and standalone mode are indicated by 1 and 0 individually. Module 3 is connected to the microgrid from 1 s to 10 s, separated from 10 s to 20 s, and reconnected to the microgrid again from 20 s. Loads in modules remain unchanged. When module 3 is in grid-connected mode, the consensus power is −15 kW. When Module 3 is in standalone mode, the consensus power is −10 kW. The stabilization range of sampling delay varies corresponding to the same sampling period when m is different. The numerical solutions of Equation (43) give a guidance for selection of sampling period and sampling delay to realize the sampled-data bounded power and capacity consensus tracking of distributed battery storages.  Figure 19 shows the operation mode of module 3. Grid-connected mode and standalone mode are indicated by 1 and 0 individually. Module 3 is connected to the microgrid from 1 s to 10 s, separated from 10 s to 20 s, and reconnected to the microgrid again from 20 s. Loads in modules remain unchanged. When module 3 is in grid-connected mode, the consensus power is −15 kW. When Module 3 is in standalone mode, the consensus power is −10 kW.  Figure 19 shows the operation mode of module 3. Grid-connected mode and standalone mode are indicated by 1 and 0 individually. Module 3 is connected to the microgrid from 1 s to 10 s, separated from 10 s to 20 s, and reconnected to the microgrid again from 20 s. Loads in modules remain unchanged. When module 3 is in grid-connected mode, the consensus power is −15 kW. When Module 3 is in standalone mode, the consensus power is −10 kW.  Figure 20 show that all the battery power of modules can realize consensus during the whole process. When Module 3 is off the microgrid, the load of Module 3 is self-supplied and the battery power of Module 3 is −30 kW. Meanwhile, Module 0 outputs 10 kW to microgrid and Module 2 input 10 kW from microgrid as shown in Figure 21.

Simulations of Topology Reconfiguration
Simulation results show that the power and capacity consensus tracking strategy of distributed storages is robust under system reconfiguration, which is beneficial to capacity expansion or unexpected exit, and increases the reliability of the system.     Figure 20 show that all the battery power of modules can realize consensus during the whole process. When Module 3 is off the microgrid, the load of Module 3 is self-supplied and the battery power of Module 3 is −30 kW. Meanwhile, Module 0 outputs 10 kW to microgrid and Module 2 input 10 kW from microgrid as shown in Figure 21.
Simulation results show that the power and capacity consensus tracking strategy of distributed storages is robust under system reconfiguration, which is beneficial to capacity expansion or unexpected exit, and increases the reliability of the system.  Simulation results show that the power and capacity consensus tracking strategy of distributed storages is robust under system reconfiguration, which is beneficial to capacity expansion or unexpected exit, and increases the reliability of the system.  Figure 22 shows wind power in modules 1, 2 and 3. Wind power varies greatly in the different modules. The average power is 10.08, 12.28, and 12.98 kW, individually. Figure 23 shows solar power in modules 1, 2 and 3. The average power is 5.28, 5.12 and 4.11 kW, individually. The solar power has similar distribution characteristics but there are occasional drops because of partial shadows. Figure 24 shows the load power in different modules. The average power is 19.10, 21.39 and 5.51 kW individually. The load characteristics are also different Because of different electrical uses. If each module runs in standalone mode, the difference between power generation and power consumption is only compensated by the local battery of each module. The battery power is shown as the dotted line A, B, C in Figure 25 and the battery power varies greatly in different module. The drastic fluctuation of battery power damages and reduces the service life of battery, which leads to difficult maintenance of battery. When modules are interconnected and the power and capacity consensus tracking is applied, the consensus battery power is shown as the blue line in Figure 25, which make full use of the space-time complementary power characteristics among modules and greatly decreases the fluctuation of battery power. It shows the consensus power is smoother than stand-alone individual battery power, which can not only prolong the lifespan of batteries, but also realize the unified maintenance of batteries.   Figure 23 shows solar power in modules 1, 2 and 3. The average power is 5.28, 5.12 and 4.11 kW, individually. The solar power has similar distribution characteristics but there are occasional drops because of partial shadows. Figure 24 shows the load power in different modules. The average power is 19.10, 21.39 and 5.51 kW individually. The load characteristics are also different Because of different electrical uses. If each module runs in standalone mode, the difference between power generation and power consumption is only compensated by the local battery of each module. The battery power is shown as the dotted line A, B, C in Figure 25 and the battery power varies greatly in different module. The drastic fluctuation of battery power damages and reduces the service life of battery, which leads to difficult maintenance of battery. When modules are interconnected and the power and capacity consensus tracking is applied, the consensus battery power is shown as the blue line in Figure 25, which make full use of the space-time complementary power characteristics among modules and greatly decreases the fluctuation of battery power. It shows the consensus power is smoother than stand-alone individual battery power, which can not only prolong the lifespan of batteries, but also realize the unified maintenance of batteries.

Conclusions
The power and capacity consensus tracking protocol of distributed battery storage systems in a modular microgrid is designed in this paper. The leader-following power and capacity consensus tracking model of distributed battery storage is established according to the modular microgrid demonstration project on DongAo Island (China). The sufficient and necessary conditions for continuous-time and sampled-data bounded power and capacity consensus tracking of distributed battery storages are deduced by matrix analytical method. The continuous-time power and capacity consensus tracking is stable when the Hermitian matrix of power communication network is positive definite and the ratio of capacity adjacent coefficient to power adjacent coefficient is positive real number. The steady regions of sampling period and sampling delay for sampled-data power and capacity consensus tracking is determined by analytical or numerical solutions. Especially two cases of m = 0 and m = 1 are discussed in detail. Simulation results verify the validation of the power and capacity consensus tracking strategy and the stabilization ranges of

Conclusions
The power and capacity consensus tracking protocol of distributed battery storage systems in a modular microgrid is designed in this paper. The leader-following power and capacity consensus tracking model of distributed battery storage is established according to the modular microgrid demonstration project on DongAo Island (China). The sufficient and necessary conditions for continuous-time and sampled-data bounded power and capacity consensus tracking of distributed battery storages are deduced by matrix analytical method. The continuous-time power and capacity consensus tracking is stable when the Hermitian matrix of power communication network is positive definite and the ratio of capacity adjacent coefficient to power adjacent coefficient is positive real number. The steady regions of sampling period and sampling delay for sampled-data power and capacity consensus tracking is determined by analytical or numerical solutions. Especially two cases of m = 0 and m = 1 are discussed in detail. Simulation results verify the validation of the power and capacity consensus tracking strategy and the stabilization ranges of

Conclusions
The power and capacity consensus tracking protocol of distributed battery storage systems in a modular microgrid is designed in this paper. The leader-following power and capacity consensus tracking model of distributed battery storage is established according to the modular microgrid demonstration project on DongAo Island (China). The sufficient and necessary conditions for continuous-time and sampled-data bounded power and capacity consensus tracking of distributed battery storages are deduced by matrix analytical method. The continuous-time power and capacity consensus tracking is stable when the Hermitian matrix of power communication network is positive definite and the ratio of capacity adjacent coefficient to power adjacent coefficient is positive real number. The steady regions of sampling period and sampling delay for sampled-data power and capacity consensus tracking is determined by analytical or numerical solutions. Especially two cases of m = 0 and m = 1 are discussed in detail. Simulation results verify the validation of the power and capacity consensus tracking strategy and the stabilization ranges of parameters. The power and capacity consensus tracking is robust under reconfiguration of the modular microgrid. Experiments on a wind-solar modular microgrid show that the power and capacity consensus tracking of distributed storages makes full use of the space-time complementary power characteristics among modules, improving the lifespan and realizing the unified maintenance of batteries. The power and capacity consensus tracking strategy determine the exchange power among modules. Therefore the control problem of modular microgrid is solved completely and the economic promotion of modular microgrids is realized.
Author Contributions: X.Z. and L.L. proposed the power and capacity consensus tracking strategy of distributed battery storages in modular microgrid. Y.H. did the simulation research. W.-C.Y. analyzed the data. X.Z. wrote the paper.