A Novel Hierarchical Control Strategy for Low-Voltage Islanded Microgrids Based on the Concept of Cyber Physical System

: Based on the concept of cyber physical system (CPS), a novel hierarchical control strategy for islanded microgrids is proposed in this paper. The control structure consists of physical and cyber layers. It’s used to improve the control effect on the output voltages and frequency by droop control of distributed energy resources (DERs), share the reactive power among DERs more reasonably and solve the problem of circumﬂuence in microgrids. The speciﬁc designs are as follows: to improve the control effect on voltages and frequency of DERs, an event-trigger mechanism is designed in the physical layer. When the trigger conditions in the mechanism aren’t met, only the droop control (i.e., primary control) is used in the controlled system. Otherwise, a virtual leader-following consensus control method is used in the cyber layer to accomplish the secondary control on DERs; to share the reactive power reasonably, a method of double virtual impedance is designed in the physical layer to adjust the output reactive power of DERs; to suppress circumﬂuence, a method combined with consensus control without leader and sliding mode control (SMC) is used in the cyber layer. Finally, the effectiveness of the proposed hierarchical control strategy is conﬁrmed by simulation results.


Introduction
With the deterioration of the global environment and the shortage of energy, the distributed generation technologies using clean and renewable energy in power system have been used widely [1,2]. Currently, the distributed energy resources (DERs) include photovoltaic, wind turbine, micro turbines, fuel cells, etc. In general, these energy resources can provide energy for the normal operation of the load. However, after these sources are connected to the main grid, DERs acquire quasi-load characteristics. IEEE 1547 has set rules of the connection standard between DERs and large power systems. It requires operation withdrawal of each DER when a fault occurs in the large power system. This has greatly limited of full deployment of DERs. For the sake of coordinating the conflict between the main grid and DERs, fully exploiting the potential of DERs and promoting larger scale of application of DER technology, the notion of "micro-grid" has been advocated [3,4]. There are two kinds of operation modes that can be applied in a micro-grid. These modes include the grid-connected mode and the islanded mode [5,6]. In grid-connected mode, the micro-grid can absorb (inject) power from (into) the main-grid. Meanwhile, the voltages and the frequency of DERs are determined by the main grid. When the main grid fails, the microgrid will be disconnected from the main grid. At this time, the microgrid will be turned into the islanded operation mode. In this mode, the microgrid needs to maintain the stability of voltage and frequency through its own corresponding control, and to support (1) Design an event-triggered secondary control strategy to control the output voltage and frequency of each DER. The event-trigger mechanism is designed in physical layer at first. When the trigger conditions in mechanism are not met, only the droop control (i.e., the primary control) is used to control the voltage and frequency. Otherwise, a virtual leader-following consensus control method will be designed in cyber layer to accomplish the secondary control on DERs. (2) Design the method of double virtual impedance in physical layer to decouple the system and share the reactive power among DERs reasonably (i.e., share the reactive power among DERs according to the capacity ration of DERs). The first virtual impedance is used to ensure the output voltage which through the DER's output impedance and the first virtual impedance to be the same value. The second virtual impedance is used to decouple the control system in dq coordinate system (to make sure the droop control can be applied in a low-voltage microgrid) and share the reactive power of DERs proportionally. (3) Design the method combined with sliding mode control (SMC) and the consensus control without leader to suppress circumfluence. The specific design process is as below: first, Kirchhoff's voltage law and Kirchhoff's current law are used to construct the model of the physical layer. Then, the SMC is used to eliminate the disturbance caused by double virtual impedance and parameter perturbation. Afterwards, the consensus control method is used to design the coordinate controller. Finally, the effectiveness of the proposed controller is proved by using Lyapunov theory, and the circumfluence can be suppressed by using this controller.
This paper is organized as follows: the novel hierarchical control structure of micro-grid is established in Section 2. In Section 3, the secondary control strategy of DER is proposed in detail. In Section 4, the double virtual impedance for DERs is designed. In Section 5, the SMC and coordinated controller is designed to suppress circumfluence. The corresponding simulation studies are provided in Section 6. The overall conclusions of the paper are collected in Section 7.

The Design of the Hierarchical Control Strategy
In the past, hierarchical control often refers to two levels of control: secondary control and primary control, but in this paper, according to the concept of CPS (the CPS consists of the communication system and the physical system. It is a complex system which includes the computing part, communication network and physical entities [24]), the hierarchical control refers to the cyber layer and physical layer. The communication data in the cyber layer is not only used to accomplish the secondary control, but also to suppress the circulation. It is our innovation to combine the concepts Energies 2018, 11,1835 4 of 24 of CPS and hierarchical control into the control structure of an islanded microgrid at the same time. In this paper, the related data of neighbor DERs is needed to design the distributed coordinated secondary controller for each DER. This caters to the concept of CPS. Meanwhile, if the secondary control is designed without the relevant data of neighbor DER, the effect of cooperative control cannot be accomplished. This will lead to the control process of each DER being out of sync, so based on the concept of CPS, the hierarchical control structure of the i-th DER is constructed as shown in Figure 1. Meanwhile, if the secondary control is designed without the relevant data of neighbor DER, the effect of cooperative control cannot be accomplished. This will lead to the control process of each DER being out of sync, so based on the concept of CPS, the hierarchical control structure of the i-th DER is constructed as shown in Figure 1.
Judge whether or not to use The control structure of each DER consists of the physical layer and the cyber layer. In the physical layer, all DERs in the microgrid are connected by an AC-bus (alternating current bus). Through the bus, the DERs can be connected to drive the load operation. In Figure 1, many parts (e.g., inverter and double impedances, etc.) of the neighbor DER have been omitted. The specific structures of the omitted parts are similar to that of the corresponding parts of the i-th DER. In the cyber layer, each DER is connected to the neighbour DERs by sensors. All the DERs and sensors constitute the communications network. For the i-th DER, the output voltage and frequency of the neighbour DER will be transmitted to the i-th consensus controller through the sensor at first. Then, the consensus control will be accomplished by using the consensus controller.
There is a consensus controller, virtual leader-following consensus controller and communication network in the cyber layer. In the physical layer, there are a PQ (active power and reactive power) calculation part, droop controller, voltage synthesis part, secondary control part, event-trigger mechanism, double virtual impedance and double closed loop (including voltage loop and current loop), etc. Each DER can be regarded as an agent which has two functions: "consistency calculation" and "data communication", so the secondary control can be accomplished by using the communication data in the cyber layer. The roles of the components and the control process of secondary control are explained as follows: At first, the output data (e.g., voltage) of the i-th DER and the neighbour DERs are controlled by droop control (primary control). Then, the output voltage data and frequency data of the droop control will be transmitted to the communication network as the communication data. Each controlled DER has a virtual leader-following consensus controller. The consensus controller is used to accomplish the virtual leader-following consensus control. Meanwhile, the secondary control on voltage and frequency will be accomplished by adding feedback values. The feedback values are obtained by using the virtual leader-following consensus The control structure of each DER consists of the physical layer and the cyber layer. In the physical layer, all DERs in the microgrid are connected by an AC-bus (alternating current bus). Through the bus, the DERs can be connected to drive the load operation. In Figure 1, many parts (e.g., inverter and double impedances, etc.) of the neighbor DER have been omitted. The specific structures of the omitted parts are similar to that of the corresponding parts of the i-th DER. In the cyber layer, each DER is connected to the neighbour DERs by sensors. All the DERs and sensors constitute the communications network. For the i-th DER, the output voltage and frequency of the neighbour DER will be transmitted to the i-th consensus controller through the sensor at first. Then, the consensus control will be accomplished by using the consensus controller.
There is a consensus controller, virtual leader-following consensus controller and communication network in the cyber layer. In the physical layer, there are a PQ (active power and reactive power) calculation part, droop controller, voltage synthesis part, secondary control part, event-trigger mechanism, double virtual impedance and double closed loop (including voltage loop and current loop), etc. Each DER can be regarded as an agent which has two functions: "consistency calculation" and "data communication", so the secondary control can be accomplished by using the communication data in the cyber layer. The roles of the components and the control process of secondary control are explained as follows: At first, the output data (e.g., voltage) of the i-th DER and the neighbour DERs are controlled by droop control (primary control). Then, the output voltage data and frequency data of the droop control will be transmitted to the communication network as the communication data. Each controlled DER has a virtual leader-following consensus controller. The consensus controller is used to accomplish the virtual leader-following consensus control. Meanwhile, the secondary control on voltage and frequency will be accomplished by adding feedback values. The feedback values are obtained by using the virtual leader-following consensus control. Afterwards, the obtained voltage and frequency will be transmitted to the voltage synthesis part. The voltage synthesized by this part will be transmitted to the double closed loop. In this double closed loop, the output of the voltage loop will be set as the reference values of the current loop. At last, the output of the current loop will be used to generate the pulse-width modulation (PWM) signal to control the operation of DER through the inverter. The direct current (DC)-link output from the DER will be converted into AC-link through inverter. The output AC-link of the inverter will flow through the double virtual impedance and line impedance, thus driving the load operation.
In the control process, "consistency calculation" refers to the ability to accomplish the corresponding consensus control by designing the consensus controller. Consistency control is accomplished by iterative computation, so the corresponding ability is called as "consistent calculation"; "voltage synthesis" refers to the synthesis of a voltage vector by voltage amplitude and phase angle output from droop control and secondary control; "PQ calculation" refers to calculating the output active and reactive power of DER by using voltage and current of line impedance; voltage and current double closed loop is a kind of control strategy in PWM rectifier, the purpose of the double closed loop is to realize constant voltage control and constant current control.
In order to suppress the circumfluence among DERs, a method combined with consensus control without leader and SMC is proposed in this paper. The SMC is used to eliminate disturbance at first, and then the consensus controller is used to adjust the output node injection voltage from each DER to the same value. The control signals can be obtained by using the error between the voltage of the controlled DER and its neighbour DER.

The Design of the Event-Trigger Mechanism on Voltage
In the past, the secondary control is directly added to the islanded microgrid system, which will cause communication loss, but actually, droop control has a certain control effect. The data obtained from droop control can be directly used in the voltage synthesis part to a certain extent, and then accomplish the subsequent control. Therefore, in order to make better use of the secondary control method, an event-triggered secondary control strategy is proposed in this paper. Only when the effectiveness of droop control is not ideal (meet the trigger conditions), the secondary control is adopted. This can effectively reduce the loss of the communication network. The specific design process is as the follows. For the i-th DER, the equation of droop control is shown as below: where P i and Q i are the active power and reactive power respectively; m i and n i are the droop coefficients; ω re f and U re f are the frequency reference value and the voltage reference value respectively. Meanwhile, it can be found that droop control produces errors between the output values and the reference values. First of all, a voltage deviation index must be constructed in this mechanism to evaluate whether the secondary controller is operating. In this paper, this index is constructed based on the deviation between the actual output reactive power and the ideal output value (the so-called "ideal output value" refers to the allocated value according to the output power capacity ratio of each controlled DER) of the DER. The specific design process is as follows: how much reactive power of each DER needs to Energies 2018, 11, 1835 6 of 24 output is determined by the total reactive power demand and the proportion of this DER in it. Define there are n DERs, and the output reactive power of the i-th DER can be expressed as below: where ( n ∑ i=1 k i = 1), n i and n j are the coefficients; Q L is the demand for total reactive power; Q i is the ideal output reactive power. For the i-th DER, it is defined that the deviation between the actual output reactive power and the ideal output value should not exceed the a percent of the maximum reactive power. For the i-th DER, the floating range of output power allowed by the system is: where Q i and Q imax are the reactive power of actual output and maximum reactive power of allowable output of the i-th DER, respectively. Take Equations (2) and (3) into Equation (1), and the allowable range of output voltage for the i-th DER is as below: and there are: where U i−low and U i−low are the upper and lower bounds of the allowable range. The specific event-trigger mechanism is shown in Figure 2. For the i-th DER, it is defined that the deviation between the actual output reactive power and the ideal output value should not exceed the a percent of the maximum reactive power. For the i-th DER, the floating range of output power allowed by the system is: where i Q and max i Q are the reactive power of actual output and maximum reactive power of allowable output of the i-th DER, respectively. Take Equations (2) and (3) into Equation (1), and the allowable range of output voltage for the i-th DER is as below: and there are: where i low U − and i low U − are the upper and lower bounds of the allowable range.
The specific event-trigger mechanism is shown in Figure 2. As shown in Figure 2, the primary control strategy (droop control) is used to control the output voltage of the i-th DER when the change of voltage is within the allowable range. When the floating range of the output voltage exceeds the allowable range, the secondary control strategy will be implemented to maintain the stability of the output voltage.
It's similar to the design process of event-trigger mechanism on voltage, the event-trigger mechanism on frequency can be also obtained (omit it in this paper to avoid repeating). And the range which is from i low ω − to i up ω − is marked as the scope of the allowable range for frequency deviation.

The Design of the Secondary Control on Voltage
Based on the Equation (1), the amplitude of the output voltage can be expressed in the dq coordinate system as below: As shown in Figure 2, the primary control strategy (droop control) is used to control the output voltage of the i-th DER when the change of voltage is within the allowable range. When the floating range of the output voltage exceeds the allowable range, the secondary control strategy will be implemented to maintain the stability of the output voltage.
It's similar to the design process of event-trigger mechanism on voltage, the event-trigger mechanism on frequency can be also obtained (omit it in this paper to avoid repeating). And the range which is from ω i−low to ω i−up is marked as the scope of the allowable range for frequency deviation.

The Design of the Secondary Control on Voltage
Based on the Equation (1), the amplitude of the output voltage can be expressed in the dq coordinate system as below: Therefore, the droop control on voltage can also be written as the following equation: The goal of secondary control on voltage is to design the appropriate control method to adjust U di to U re f . Based on the differential of Equation (8) and set u vi as an auxiliary variable, there is: In fact, each DER in the microgrid system can be regarded as an agent. Each one can transmit its state to other DERs and receive the state of others. If each DER is treated as a follower and the corresponding state of leader is set to a reference value, the secondary control can be achieved through the leader-following consensus theory (see Appendix A). The corresponding consensus controller can be designed as below: where U i and U j represent the voltage of the i-th DER and the j-th DER respectively; U L is the voltage of the virtual leader; K vi is the gain in the protocol. The feedback on voltage is as below: Based on the differential of Equation (1) and set an auxiliary variable u ωi in this subsection, there is: .
Similar to the consensus controller on voltage, the consensus controller on frequency can be designed as below: where ω i and ω j are the frequency of the i-th DER and the j-th DER respectively; ω L is the voltage of the virtual leader; k ωi is the gain in the protocol. The feedback on frequency can be designed as below: Remark 1. The premise of leader-following consensus control is to ensure the existence of a directed spanning tree in the communication network. In the directed tree, to make the leader as the source node and contain the entire controlled DER, it is necessary to ensure that the leader can deliver the data to the controlled DER (i.e., keep contact to any controlled DER). But in the actual power system, it's not convenient to select a leader in the power system. So, a virtual leader is used in this paper. The so-called "virtual leader" means that the values of U re f and ω re f are set in advance (fixed value) in the consensus controller corresponding to each DER. This ensures the completion of the leader-following consensus control. But there is no real leader, so it's called "virtual leader". In this strategy, the state of each controlled DER in the network will be consistent to the corresponding state of virtual leader eventually.

The Design of the Method of Double Virtual Impedance
The structure in Figure 3 is set as the example to explain the method of designing the double virtual impedance. is the load impedance.
1. The design of the first virtual impedance: The first virtual impedance is used to ensure that ' i U and ' j U can be modified as the same value. Take the structure in Figure 3 as the example, there are: so, the first virtual impedance can be obtained by solving the solution of the Equation (15).
2. The design of the second virtual impedance: In this paper, the control system in dq coordinate system can be decoupled by adding the second virtual impedance. In addition, the reactive power of each DER can also be shared proportionally by using this virtual impedance.
The droop control of the i-th DER is shown as Equation (1). It is only applicable to the case of high inductance of the line impedance, but in fact, the microgrid is usually as the low-voltage power grid, so the lines of microgrids usually have a large resistance. To solve this problem, the second virtual impedance is designed as a negative value. By using the negative virtual reactance to counteract with the line reactance, thus achieving the purpose of power decoupling [8], so there is: Meanwhile, for the i-th DER, the drop of voltage on this virtual impedance and line impedance In the figure above: U i ∠ϕ i and U j ∠ϕ j are the output voltages of the i-th DER and the j-th DER, respectively; U i and U j are the output voltages through the DER's equivalent output impedance and the first virtual impedance; I i and I j are the currents of the i-th DER and the j-th DER, respectively; U s is the voltage of the load; Z io and Z jo are the outputs impedance voltages of the i-th DER and the j-th DER respectively; Z ξi1 and Z ξ j1 are the first virtual impedance designed; Z ξi2 and Z ξ j2 are the designed second virtual impedance; R i + jX i and R j + jX j are line impedance; R L + jX L is the load impedance.
1. The design of the first virtual impedance: The first virtual impedance is used to ensure that U i and U j can be modified as the same value. Take the structure in Figure 3 as the example, there are: so, the first virtual impedance can be obtained by solving the solution of the Equation (15).

The design of the second virtual impedance:
In this paper, the control system in dq coordinate system can be decoupled by adding the second virtual impedance. In addition, the reactive power of each DER can also be shared proportionally by using this virtual impedance.
The droop control of the i-th DER is shown as Equation (1). It is only applicable to the case of high inductance of the line impedance, but in fact, the microgrid is usually as the low-voltage power grid, so the lines of microgrids usually have a large resistance. To solve this problem, the second virtual impedance is designed as a negative value. By using the negative virtual reactance to counteract with the line reactance, thus achieving the purpose of power decoupling [8], so there is: Meanwhile, for the i-th DER, the drop of voltage on this virtual impedance and line impedance can be expressed as below [25]: As the structure shown in Figure 3, there is: Taking Equation (19) into Equation (1), there is the following equation can be obtained: To share the reactive power among DERs according to the capacity ration of DERs, the second virtual inductor must meet the following condition: If Equation (21) is met, the output voltage from droop control of the two DERs can be adjusted to the same value. We have: Based on the above analysis, the Equations (15), (16) and (21) must be met for designing the double virtual impedance.

The Design of the Coordinated Controller to Suppress Circumfluence
The circumfluence usually exists in the common connected node of the parallel DERs and it will affect the stable operation of the microgrid. The circumfluence refers to the phenomenon that the current flows from the high voltage source to the low voltage source because the injected node voltage by each DER is not equal, so the problem of suppressing circumfluence can be viewed as a synchronization problem of node injection voltage. In this subsection, if the node-injected voltage is set as the communication data in this section, the consensus control method without leader can be used to design the coordinated controller, so the control signals can be calculated by using the error between the node-injected voltage of the local DER and the neighbor DER.

Construct the Circuit Model of Connected Distributed Energy Resources (DERs)
Without losing of generality, the structure in Figure 4 is taken as the example to construct the circuit model of connected DERs. The load in Figure 4 includes resistive load, inductive load and capacitive load. between the node-injected voltage of the local DER and the neighbor DER.

Construct the Circuit Model of Connected Distributed Energy Resources (DERs)
Without losing of generality, the structure in Figure 4 is taken as the example to construct the circuit model of connected DERs. The load in Figure 4 includes resistive load, inductive load and capacitive load.
Load 2  After applying Kirchhoff's voltage law and Kirchhoff's current law to the electrical structure in Figure 4, we have: where U o1 and U o2 represent the output voltage of the two DERs through the inverters, respectively; U b1dq and U b2dq represent the output connected node voltage of the two DERs respectively. The subscript represent the d-axis or the q-axis components, and the definitions of other variables are similar to that; R t1 + jL t1 , R t2 + jL t2 and R t3 + jL t3 are line impedance; i t1dq and i t2dq represent the current flowing through the line impedance; R 2 and R 4 are resistive loads; R 1 + jL 1 and R 3 + jL 2 are inductive loads; C 1 and C 2 are capacitive loads.
The system model can be described as below: . where T is the input matrix, T is the output matrix of the system. All matrices in Equation (27) are given in the following matrices.  Due to the parameter perturbation and the addition of double virtual impedance, disturbance data will appear in Equation (24). At present, there are many methods to maintain the stability of the system, such as robust control and SMC. Among them, the SMC has a strong robustness. It is composed of a sliding mode surface and a sliding mode controller. The function of the sliding mode controller is to make the controlled object reach the sliding mode surface and make it stable along the sliding mode surface. Once the controlled object reaches the sliding mode surface, the controlled system will no longer be affected by the external disturbance [26], so the appropriate sliding mode controller is used in this paper to eliminate the disturbance.
The situation that external disturbance occurs in U b1d of Equation (24) is set as an example to explain the method of designing SMC. And the disturbance model can be expressed as below: where ∆U b1d is the obtained disturbance data; ∆U b1d , ∆i t1d , ∆i l1d and ∆i t2d are parameter perturbations.
For the DER1, the sliding mode controller can be designed as below: where u 1 is the sliding mode controller; u 11 and u 12 are the components.
And then add Equation (26) into Equation (25), it can be obtained that: The sliding mode surface can be designed as below: where k P(∆U b1d ) and k I(∆U b1d ) are the coefficients of the sliding mode surface. And there are: At this point, solve u 11 at first. Thus, make u 1 = u 11 and .
S ∆U b1d = 0, there are: Afterwards, solve u 12 . According to the properties of the sliding mode surface, it is necessary to make . S ∆U b1d · S ∆U b1d < 0. After making u 1 = u 11 + u 12 and substitute Equation (29) into u 1 , there is: S ∆U b1d . The reaching time is set as t 1 .

Sliding Time
The sliding time is set as t 2 (∆U b1d (t 1 ) = 0, ∆U b1d (t 1 + t 2 ) = 0). And in this stage, there is S ∆U b1d = 0. When the disturbance is positive, there are: so, the parameters in the sliding mode surface can be obtained by solving the following optimization problem: In the same way, the corresponding equations can be obtained when the perturbation is negative.

The Design of Coordinated Controller
The problem of suppressing the circumfluence can be classified as a consistency problem, i.e., the output node injection voltage (controlled state) of each DER is needed to be modified as the same value. The corresponding state error between the i-th DER and the j-th DER is defined as: where x i and x j are the states of the i-th DER and the i-jth DER, respectively. In this paper, the two elements are node injection voltages.
The overall neighbour error is equal toê = (L ⊗ I N )z, whereê = ê 1ê2 T , z = [x 1 x 2 ] T . Set u(t) = −cHê, where c is the feedback gain; H is the feedback matrix. We have: so, the dynamic model of the overall controlled system can be shown as below: .
Theorem 1. The system (38) is asymptotically stable, if and only if exists matrix P 1 (whereP 1 = P T 1 ≥ 0) and P 2 (whereP 2 = P T 2 > 0) satisfying the following conditions: represents the maximal singular values, σ >0min L T R 1 L ⊗ H T R 2 H denotes the minimal nonzero singular value. The proof of the theory and the selection of related parameters are given in Appendix B.

Simulation Study
In this subsection, the microgrid system shown in Figure 5 is used as the example to carry out the simulation experiment.

Simulation Study
In this subsection, the microgrid system shown in Figure 5 is used as the example to carry out the simulation experiment. In this experimental case, the following settings are used: the three DERs are parallel; the microgrid system is set to operate in the islanded mode; the power capacity ratio of four DERs is set as 4:3:2:1; The original load (Load1) is set as 6 kW/3 kvar. The other specific parameters are shown in Table 1.  In this experimental case, the following settings are used: the three DERs are parallel; the microgrid system is set to operate in the islanded mode; the power capacity ratio of four DERs is set as 4:3:2:1; The original load (Load1) is set as 6 kW/3 kvar. The other specific parameters are shown in Table 1.  In this experiment, to better reflect the effectiveness of secondary control, the droop control is used as a comparison. Furthermore, to verify the effect of the event-trigger mechanism, there are: In the begin, the range from U i−low to U i−up is designed from 310 V to 312 V; At t = 1 s, the range from f i−low to f i−up is designed from 49.5 Hz to 50.5 Hz, so the variation of voltage and frequency should not exceed 1 V and 0.5 Hz, respectively. At the same time, in order to better illustrate the effectiveness of the secondary control strategy, we design four kinds of external disturbances in the control process: (1) Load1 is always running on the system, and the Load2 is added to the system at t = 2 s; (2) The Load1 and Load2 are working at begin. Then, the Load2 is cut off at t = 2 s; (3) The DER4 is added to the system at t = 2 s; (4) The DER4 is working in the system at the beginning. Then, it's cut off at t = 2 s. The corresponding simulation results are as Figures 6 and 7. used as a comparison. Furthermore, to verify the effect of the event-trigger mechanism, there are: In the begin, the range from i low U − to i up U − is designed from 310 V to 312 V; At t = 1 s, the range from i low f − to i up f − is designed from 49.5 Hz to 50.5 Hz, so the variation of voltage and frequency should not exceed 1 V and 0.5 Hz, respectively. At the same time, in order to better illustrate the effectiveness of the secondary control strategy, we design four kinds of external disturbances in the control process: (1) Load1 is always running on the system, and the Load2 is added to the system at t = 2 s; (2) The Load1 and Load2 are working at begin. Then, the Load2 is cut off at t = 2 s; (3) The DER4 is added to the system at t = 2 s; (4) The DER4 is working in the system at the beginning. Then, it's cut off at t = 2 s. The corresponding simulation results are as Figures 6 and 7.   The analysis is as below: As shown in Figure 6a,c, the voltage of the three DERs are among 309.3-309.6 V. After adding Load2 at t = 2 s, the voltage of each DER has dropped. There are errors between the voltages and the corresponding reference value (U re f ). The droop control adjusts the frequency to 49.3 Hz. After adding Load2 at t = 2 s, the frequency of each DERs will decline to 49.25 Hz. There are errors between the frequency and the corresponding reference value (ω re f ). Take the deviation in frequency as the example, the cause of deviation can be explained as follows: The formula for frequency droop control is ω i = ω re f − m i p i , so the formula shows that the deviation between ω i and ω re f is m i p i . Due to ω i and f i have the following relation: ω i = 2π f i , so f i will be not equal to f re f , and the deviation is m i p i 2π . As shown in Figure 6b,d, the event-trigger mechanism is triggered at t = 1 s. Meanwhile, the secondary control method is also used in the system. At last, the voltage and frequency of every DER are adjusted their respective reference values.
As shown in Figure 7a,c, the voltages of all DERs are among 309.2-309.4 V. When the Load2 is cut off at t = 2 s, the voltages of DERs will be raised. It has errors between the voltages and the corresponding reference value (U re f ). The output frequency by droop control is 49.25 Hz. When the Load2 is cut off at t = 2 s, the frequency of DER will be raised to almost 49.3 Hz. There are also errors between the actual value and ω re f . By analyzing the variations in Figure 7b,d, it has been found that the controlled values of each DER can be adjusted to their respective reference values by using the secondary control (the trigger conditions are met at t = 1 s). After comparing, it can be found that the control effect of voltages and frequency can be effectively enhanced by the event-triggered secondary control method. In the case of DER changes, the corresponding simulation results are as Figures 8  and 9.  The analysis is as below: In Figure 8a, the droop control adjusts the frequency of DERs to almost 49.3 Hz in steady state. The frequency of DER4 is 50 Hz before it is added in the system. The analysis is as below: In Figure 8a, the droop control adjusts the frequency of DERs to almost 49.3 Hz in steady state. The frequency of DER4 is 50 Hz before it is added in the system. After adding DER4 at t = 2 s, there is a transition between t = 2 s and t = 2.65 s in the control process. Finally, the frequency of the four DERs has been controlled to almost 49.4 Hz. There are errors between the output actual value and ω re f . In Figure 8b, the secondary control method is used at t = 1 s. The frequency of each DER will reach 50 Hz at t = 1.3 s (there is a transition between t = 1 s and t = 1.3 s). After adding DER4 at t = 2 s, there is also a transition between t = 2 s and t = 4.5 s. Finally, the frequency of each DER can be adjusted to 50 Hz. In Figure 8c, the droop control makes the voltage tend to almost 309 V. The voltage of DER4 is 311 V before it is added in the system. When the Load2 is added at t = 2 s, the voltages of the first three DERs have dropped. This is because when the DER4 is added at the beginning, the system regards the DER4 as a Load. There is a transition before DER4 works normally in the system. And there are errors between the output actual value and U re f . In Figure 8d, the output voltage of the four DERs by droop control are different before t = 1 s. Meanwhile, the secondary control is added in the system. The voltage of each DER will be adjusted to 311 V at t = 1.3 s (there is a transition between t = 1 s and t = 1.3 s). After adding DER4 at t = 2 s, there is also a transition between t = 2 s and t = 4 s. Finally, the voltage of the four DERs will achieve to 311 V.
In Figure 9a, the frequency of DERs is adjusted by droop control to 49.45 Hz before t = 1 s. When the DER4 is cut off at t = 2 s, the frequency of the first three DERs has drooped to almost 49.3 Hz. There are errors between the output actual value and ω re f . In Figure 9b, the secondary control is added in the system at t = 1 s. The frequency of each DER can be adjusted to 50 Hz at t = 1.3 s (there is a transition between t = 1 s and t = 1.3 s). Even if the DER4 is cut off at t = 2 s, it has no obvious effect on frequency. In Figure 9c, the output voltages of DERs by droop control are not consistent and the voltages are between 309.6-309.8 V. After cutting off Load2 at t = 2 s, the voltages of DERs have dropped. There are errors between the output actual value and the reference value. In Figure 9d, the secondary strategy can be added in the system at t = 1 s and the voltages of DERs can be adjusted to 311 V at t = 1.3 s (there is a transition between t = 1 s and t = 1.3 s). There is also no obvious effect on voltage after cutting off DER4 at t = 2 s.

Case2: Verify the Control Effect on Power Distribution
In this section, the event-triggered secondary control and double virtual impedance has been used first. Meanwhile, the microgrid system is operated in the islanded mode. For verifying the effect of the power distribution by using the double virtual impedance obviously, the load power of Load2 is changed as P = 3000 W and Q = 300 Var (50% of Load1). There are four situations in this simulation: (1) The Load2 is added in the system at t = 2 s; (2) The Load2 is added in the system at begin. It will be cut off at t = 2 s; (3) Add DER4 into the system at t = 2 s; (4) The DER4 is added in the system at the beginning and it will be cut off at t = 2 s. The output active power and reactive power of each DER are shown in Figure 10.
During t = 1 s to t = 2 s, Figure 10a,b show that the output active power and reactive power of DERs can be shared according to the desired ratio of 4:3:2 during the islanded mode. After t = 2 s, the active power and reactive power of DERs are approximately 4 kW/2 kvar, 3 kW/1.5 kvar and 2 kW/1 kvar. This indicates that the active power and reactive power sharing is accurate.
As shown in Figure 10c,d, the Load decreases 50% when t = 2 s. It can be seen that during the micro-grid islanded mode, the output active power and reactive power of DER can be shared according to the desired ratio before t = 2 s. After t = 2 s, the output active power and reactive power of DERs are approximately 1.33 kW/0.67 kvar, 1 kW/0.5 kvar and 0.67 kW/0.33 kvar, which indicates that the active power and reactive power can be shared reasonably by using the novel hierarchical control when Load disturbance occurs in the microgrid system. When the DER4 is added (or cut off) in the microgrid system, the output active and reactive power of each DER is shown as Figure 11. When the DER4 is added (or cut off) in the microgrid system, the output active and reactive power of each DER is shown as Figure 11. When the DER4 is added (or cut off) in the microgrid system, the output active and reactive power of each DER is shown as Figure 11. The analysis is as below: During t = 1 s to t = 2 s, Figure 11a,b show that the output active power and reactive power of DER1, DER2 and DER3 can be shared according to the desired ratio of 4:3:2 during the islanded mode. After t = 2 s, the DER4 is added to the system. Through a transient process, the output active power and reactive power of four DERs are approximately 2.4 kW/1.2 The analysis is as below: During t = 1 s to t = 2 s, Figure 11a,b show that the output active power and reactive power of DER1, DER2 and DER3 can be shared according to the desired ratio of 4:3:2 during the islanded mode. After t = 2 s, the DER4 is added to the system. Through a transient process, the output active power and reactive power of four DERs are approximately 2.4 kW/1.2 kvar, 1.8 kW/0.9 kvar, 0.8 kW/0.4 kvar and 0.4 kW/0.2 kvar. It indicates that the active power and reactive power can be allocated in proportion to the capacity of DERs. As shown in Figure 11c,d, under the action of double virtual impedance, four DERs can output power according to capacity ratio before t = 2 s. When t = 2 s, the DER4 is cut off and the output active power and reactive power of DER1, DER2 and DER3 are approximately 2.7 kW/1.38 kvar, 2 kW/1 kvar and 1.33 kW/0.67 kvar, which indicate that the active power and reactive power can be shared more reasonably by the novel hierarchical control when Load disturbance occurs in the system.

Case3: Verify the Effect on Supressing Circumfluence
In this case, the connected node of three DERs is set as the study object. The proposed secondary control method and double virtual impedance have been used in the system before t = 1 s. To verify the effect of SMC, we set a step signal in the output data (voltage and frequency) of DER1 as the disturbance data. The amplitude of this signal is set as 3. For sliding mode controller, the time for accomplishing SMC is set as 0.5 s, and the parameters in controller are set as: k p = 1000; k I = −0.01. In order to better illustrate the practicability of the proposed coordinated method, we have designed two situations in this experiment: (1) Add Load2 into the system at t = 2 s; (2) The Load2 is added in the system at begin. It's cut off at t = 2 s. The simulation results are shown as Figure 12.
as the disturbance data. The amplitude of this signal is set as 3. For sliding mode controller, the time for accomplishing SMC is set as 0.5 s, and the parameters in controller are set as: 1000; p k = 0.01. I k = − In order to better illustrate the practicability of the proposed coordinated method, we have designed two situations in this experiment: (1) Add Load2 into the system at t = 2 s; (2) The Load2 is added in the system at begin. It's cut off at t = 2 s. The simulation results are shown as Figure 12. In Figure 12a, there are bias in the voltages of three DERs injected into the common node. Meanwhile, the node voltage outputted by DER1 will be greatly overshoot after adding disturbance at t = 0.5 s. Finally, the input node voltage of DER1 is still different from that of the other three DERs. As shown in Figure 12b,c, the disturbance occurs at t = 1.5 s. It can be eliminated in 0.5 s by using the designed SMC. According to the simulation results, regardless of the Load increase or decrease, the designed coordinated controller based on the consistency protocol without leader can ensure the output node voltage of each DER stably. At the same time, the output node voltages of the DERs can be also modified as consistency by using the consensus control method. By comparing with the circumfluence shown in the case without consensus control, it can be seen from Figure 12d that the circumfluence is eliminated obviously through the designed coordinated controller. In Figure 12a, there are bias in the voltages of three DERs injected into the common node. Meanwhile, the node voltage outputted by DER1 will be greatly overshoot after adding disturbance at t = 0.5 s. Finally, the input node voltage of DER1 is still different from that of the other three DERs. As shown in Figure 12b,c, the disturbance occurs at t = 1.5 s. It can be eliminated in 0.5 s by using the designed SMC. According to the simulation results, regardless of the Load increase or decrease, the designed coordinated controller based on the consistency protocol without leader can ensure the output node voltage of each DER stably. At the same time, the output node voltages of the DERs can be also modified as consistency by using the consensus control method. By comparing with the circumfluence shown in the case without consensus control, it can be seen from Figure 12d that the circumfluence is eliminated obviously through the designed coordinated controller.

Conclusions
Based on the concept of CPS, a novel hierarchical control strategy is proposed in this paper. It's used to improve the control effect of DERs and solve the problem of circumfluence in microgrid. The main contributions of this paper are as below: (1) An event-triggered secondary control strategy is proposed to improve the control effect on voltages and frequency obtained by droop control of DERs. (2) A method of double virtual impedance is proposed to share the reactive power according to the capacity ration of DERs in microgrid system. (3) A method combined with SMC and the consensus control without leader is used to suppress the circumfluence in microgrid system.
Finally, the case1 confirms that the proposed secondary control method can improve the control effect on voltages and frequency obtained by droop control of DERs effectively. The case2 confirms that the output reactive power of each DER can be allocated according to the capacity ration of DERs. It confirms the effectiveness of the proposed double virtual impedance. The case3 confirms that the disturbance caused by virtual impedance and parameter perturbation can be effectively eliminated by the designed SMC. The output node injection voltage from each DER can be adjusted to the same value through the designed coordinated controller. Furthermore, the node circumfluence can be also decreased obviously by using the coordinated controller. Based on the analysis above, the simulation results clearly indicate that the proposed hierarchical control strategy has good performance in terms of validity and stability in islanded microgrids.
Author Contributions: This paper was a collaborative effort among all authors. All authors conceived the methodology, conducted the experiments and wrote the paper.
Acknowledgments: This work is supported by the National Natural Science Foundation of China under Grant 61573303, and Hebei Provincial Natural Science Foundation of China under Grant E2016203092.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Theory Basic
Graph theory: The topology of multi-agent system can be usually represented by a directed graph: G = (V, ε). Each agent can be represented as an agent. For a directed graph which consists a set of nodes (node1, · · · , noden) and a set of edges (ε ⊂ V × V, V = {1, 2 · · · , n}), the n nodes of the directed graph can be seen as n agents. If the i-th node is connected to the j-th node, there should be a line (i.e., communication path) from the i-th node to the j-th node. If any node is connected to any other nodes, the corresponding directed graph is called as "connected strongly". If there is a directed path which connects all nodes, the corresponding directed path is called as "a directed spanning tree". The corresponding adjacency matrix of the directed graph can be defined as A = a ij ∈ R n×n . If the j-th node is connected to the i-th node, a ij is positive and a ij = 0 otherwise. There are no repeated node, i.e., a ii = 0, ∀i ∈ N. The degree matrix of G is D = diag{d 1 , · · · , d N } ∈ R N×N , where d i = ∑ j∈N i a ij . The Laplacian matrix is defined as L = D − A.
Leader-following consistency theory [27]: In a directed graph (or communication network), it is assumed that there are n agents, and the state of the i-th agent is marked as x i (i = 1, 2, · · · , n). If there is only one agent could transfer its state to any other agents along a directed path, the only one agent is called as the leader. The corresponding state of the leader is defined as x L . The other agents are called as "followers" in the directed graph. For the multi-agent system, the leader-following consistency can be achieved if there is a distributed controller for the i-th agent to make that: The one order mathematical model can be used to represent the state of each agent. The corresponding equation can be expressed as below: .
x i (t) = u i where u i is the distributed controller for the i-th agent.
In summary, the state of each agent will be consistent to x L by a consistency protocol (it's also called as consensus controller). Without considering the problems of time-delay and topological switching, etc., the consistency protocol is as below [24]: where b i represents the relationship between the leader and the i-th agent. If the leader connects to the i-th follower, b i > 0 and b i = 0 otherwise; K i is the gain in protocol. The state of followers will follow the corresponding state of the leader when using the proper parameters in protocol.
Kronecker product theory: For a matrix M, σ max (M) represents the maximal singular value, and σ >0min (M) represents the minimal nonzero singular value.
Definition A1. Let M = m ij ∈ L m×n , N = n ij ∈ L p×q . Then the following block matrix is called Kronecker product of M and N, written M ⊗ N.

Appendix B. The Proof of the Theorem 1 Proposed in Section 5
Proof. The feedback matrix is as below: Suppose Q = c 2 L T R 1 L ⊗ H T R 2 H − c R 1 L ⊗ A T P 2 + P 2 A , from Equation (41), we can obtain The algebraic Riccati equation is written as: (I n ⊗ A) T P + P(I n ⊗ A) + Q−P(I n ⊗ BC)R −1 (I n ⊗BC) T P = 0 where P = P 1 ⊗ P 2 . So, Q can be represented as: Define the Lyapunov function as V(x) = x T Px, and there are: . V(x) = 2x T P . x = 2x T P(I N ⊗ A − cL ⊗ BCH)x = 2x T (P 1 ⊗ P 2 )(I n ⊗ A)x − 2cx T (P 1 ⊗ P 2 )(L ⊗ BCH)x = x T P 1 ⊗ A T P 2 + P 2 A − 2 P 1 R −1 1 P 1 ⊗ P 2 BCR −1 2 C T B T P 2 x = x T P 1 ⊗ A T P 2 + P 2 A − 2 P(I n ⊗ BC) ⊗ R −1 (I n ⊗ BC) T P x The proof is accomplished, so based on Equations (41) and (A1), the coupling gain c and the feedback gain matrix H can be chosen, respectively, to ensure the asymptotic stability of the controlled system.