Event-Based Distributed Secondary Control for AC Islanded Microgrid With Semi-Markov Switched Topology Under Cyber-Attacks

The operation of a microgrid (MG) is easily affected by the environment, which leads to the change of communication topology among distributed generations (DGs). Most of the existing results on secondary control of MG consider that the topology connection is fixed, or just simply switched by arbitrary form. In this article, a more general semi-Markov process is introduced to describe such switching, i.e., the switching of communication topology is regarded as a random change process of system mode under general probability distribution. Then, out of the comprehensive consideration of inevitable network constraints, this article proposes distributed resilient secondary control method for AC islanded MG. In our control strategy, the network security, communication burden, and transmission delay are all considered in the controller design. An event detection mechanism is used as the transmission protocol for information interaction among DGs, reducing the communication burden effectively. And a cyber-attack model is introduced to follow the Bernoulli distribution, and the neighbors' information of each DG may be attacked with possible probability. Based on feedback linearization, the studied secondary control problem is cast into distributed tracking synchronization of first-order multiagent systems. The Lyapunov functional method is used to prove the proposed strategy theoretically, and its effectiveness is verified by a modified IEEE 34 bus test system. The result shows that the proposed method can reduce the communication numbers by over 80% under the premise of realizing frequency restoration and accurate real power sharing of AC islanded MG, and the transmission rate is also reduced by about 40% compared with the existing general method.

The sets of nodes, edges of graph.

A, D, L
The adjacency, degree, Laplacian matrices. a ij The weighted coefficient of node i, j. b i The pinning gain of DG i .
The frequency amplitude and nominal value of The voltage amplitude and voltage nominal value of DG i . The secondary auxiliary controllers.
The load demand and maximum generated power of DG i . P loss Total active power losses. ξ The rate of total load power. K w , K γ Secondary controller gains. h, kh Sampling period and sampling time.
The kth triggering instants of DG i . Ω w , Ω γ Event-triggered weight matrices.
The bound of delay function d w (t), d λ (t).

I. INTRODUCTION
A. Writing Motivation important applications in the current power grid with its advantages of flexibility, economy, and security [6], [7]. In general, there are two operation patterns of an MG system, gridconnected, and islanded. When running in the pattern of gridconnected, the MG can be regarded as a controlled unit for the large power grid, realizing mutual communication and support. When the large power grid fails, the MG will break away the power grid and continue to maintain the electricity demand of key loads under the islanded pattern to ensure the reliability of the power supply.
In islanded MG control schemes, hierarchical control is shown in Fig. 1 is a frequently used method. Under this control scheme, the control unit of the MG is divided into three layers, including primary, secondary, and tertiary control. For the primary control layer, the droop control is generally used to accomplish the preliminary regulation of voltage and frequency, and the reasonable distribution of power output [8]. The secondary control plays a crucial role in improving the control accuracy, which mainly compensates for the deviations caused by the primary control [9]. The tertiary control is mainly for further optimizing information and reducing the operating cost of MGs and improving economic benefits [10]. For the secondary control layer, compared with traditional centralized control, distributed control method has higher flexibility and security. Specifically speaking, each distributed unit only needs to collect information about itself and neighbor units, and calculate the control signal locally and timely. Especially, the consensus problem based on multiagent systems (MASs) has made a great breakthrough recently, which provides a theoretical framework for solving this kind of problem.
At present, the following two tasks are considered to be the mainstream research direction of secondary control of MG systems: 1) use the networking technology as a communication tool for distributed generation (DG) groups and consider its problem caused by information interaction; 2) analysis of the impact of the external environment and finding the solution to enhance the controller's robustness. In this work, we devote ourselves to these problems and try to give some new solutions.

B. Literature Review
In view of the research on distributed secondary control for islanded MG, Bidram et al. [9] first presented a strategy based on the multiagent distributed cooperative idea. In this regard, the nonlinear heterogeneous dynamic differential equation is transformed into linear dynamics by using feedback linearization, and then the secondary control problem can be further transformed into a first-order tracking synchronization problem. Henceforth, much-related work follows this idea. The work of Dehkordi et al. [11] studied the voltage and frequency recovery of island MG in the presence of a noise environment. In [12], the secondary control problem of island MG with uncertain communication links is studied. And, the developed method is extended to the adaptive controller design [13]. Xu et al. [14], presented a distributed control method based on an optimization idea in a finite-time frame for island MG. Then, Shrivastava and Subudhi [15], studied the related problem within a fixedtime framework. The above-mentioned literature studied the secondary control of island MG from the perspective of a more complex environment or enhanced control strategy. However, with the continuous expansion of the network scale of MG, the use of networking technology and the control constraint caused by network communication has gradually become an important issue to be considered in the distributed control of MG at present.
Recently, the event-triggered mechanism (ETM) has replaced the time-triggered mechanism (TTM), and it has been proven to be successful in solving the communication burden in the secondary control problem of the island MG. List some representative works. The Xie and Lin [16] solved voltage recovery of islanded MG by using ETM. The frequency restoration and accurate real power sharing were studied in [17]. Wang et al. [18], proposed the cyber-physical design and implementation of distributed event-triggered secondary control for islanded MG. In [19], the centralized and distributed control for islanded MG was proposed and compared under the ETM updating method. Wang et al. [20], designed a distributed eventtriggered fixed-time secondary control method for islanded MG by considering faults and communication constraints. However, the above-mentioned literature all adopt the ETM with a fixed threshold. Although it has the effect of reducing the amount of communication, it is difficult to give an appropriate threshold parameter in practice. This classical ETM is also called static ETM. As the research goes further, the enhanced transmitted protocol named dynamic ETM was used in [21], [22], and achieved a lower communication burden. The dynamic ETM method used in [21], [22] enhances the dynamic characteristics of the triggered conditions by introducing a dynamic variable, but it increases the complexity of calculation. In this regard, how to improve the triggered mechanism itself to reflect its dynamic characteristics? Chen et al. [23] proposed a distributed event-triggered control for MASs, where the triggered condition can adjust timely according to the fluctuation of the current system state, which gives us a new perspective.
In addition, network security is another key problem that needs to be considered in information transmission. Cyberattacks can make the communication information stolen or tampered with, which may lead to the degradation of system performance or even system crashes [24], [25], [26]. At present, some scholars try to consider the impact of cyber-attacks when studying the secondary control of MG. Chen et al. [27], proposed a resilient distributed secondary control strategy for islanded MG under false-data injection attack. Lian et al. [28], addressed the distributed resilient optimal current sharing control problem under denial-of-service attacks. In [29], the distributed control problem for energy storage systems in MG systems was solved under unknown faults and cyber-attacks. Furthermore, the time delay is also a problem that cannot be ignored in the MG system, which has been given priority consideration in this literature [30], [31], [32]. But taken together, there are few kinds of literature about the related work under the multiple constraints of time delay, communication burden, and cyber-attack at present. We hope to further solve these problems and design a more resilient control method with higher robustness.
Although the distributed control has the ability to tolerate the various faults, the frequent occurrence of such faults will still impact the performance of the MG systems. The literature [31] considered the switching topologies of MG, but there is no explanation of the form of this switching. In other words, it is an arbitrary switching case. Wang et al. [20] also considered a similar problem, but it just used a set of switch signals to indicate the occurrence of switching, and there was no further information about this switch signal. It should be pointed out that the proposed Markov process (MP) can be used to describe the abrupt changes in system structure, which has been widely used in theoretical analysis and practical applications [33], [34], [35]. Soliman and Shafiq [36], used the discrete-time MP to model transient and permanent faults of power lines, and the results were generalized to discrete-time hidden Markov jump power systems [37]. Zhao et al. [30], proposed a distributed secondary control for islanded MG, and adopted the MP to describe the switching between multiple time delays. Bani-Ahmed et al. [38] studied the importance degree of a single controller in centralized and decentralized architectures by Markov models. Furthermore, as an important modeling object of distributed secondary control, the leader-following consensus problem of MASs was studied in [39]. By employing semi-MP, a more general stochastic process than MP, to remove the limitation of the sojourn-time obeying exponential distribution in MP. Despite the superiority of the semi-MP in describing random switching, as far as the authors know, there are still blank secondary control problem of islanded MGs subject to semi-Markov switched topology, let alone considering practical factors in communication networks, which prompts us to make further research. For the literature review section, the comparative result between our work and the listed main existing work is shown in Table I.

C. Main Contributions
According to the above-mentioned discussions, this work is devoted to presenting a distributed resilient secondary control method for islanded MG with the semi-Markov switched topology under a complex network environment. The main contributions can be presented as follows.
1) The MG communication topology is prone to change under the constraints of the actual environment, while most of the existing works consider that the communication topology is fixed or switched by arbitrary form. In this article, a more general stochastic process called semi-MP is introduced to describe the switched topology of islanded MG system, which is an innovative attempt. Combining with the advantages of distributed control idea, the adverse impact caused by the disconnection of communication, links can be reduced under the construction of switched communication topology model in advance.
2) The common but not negligible actual situations in a communication network, such as heavy communication burden, transmission time delay, and cyber-attacks, are fully considered in the designing of the distributed secondary controllers, which is not considered in most literature at present. Synthesizing these adverse factors, an event-based distributed secondary frequency control method is developed, which can reduce communication pressure and ensure ideal control performance while considering the impact of deception attacks. 3) By means of the time-delay-dependent Lyapunov functional method, some stability criteria are given in the form of linear matrix inequality (LMI) that is easy to implement. Strict mathematical proof and sufficient simulation results verify the effectiveness of the proposed method. It is worth mentioning that the ETM used in our paper is more effective in relieving the communication burden of each DG than the traditional static one employed in [16], [17], [18], according to simulation results.

D. Organization Structure
The rest sections of this article can be summarized as follows. First, an event-based mode-independent distributed secondary resilient controller is designed in Section II. Second, the proposed control algorithm is verified theoretically in Section III. Then, a simulation example is given in Section IV to demonstrate the validity of the proposed method. Finally, the conclusion of the whole paper and the prospect for the future are provided in Section V.

A. Preparatory Theories
Before introducing the related work of this article, the following preparatory theories are introduced.
L= D − A denotes the Laplacian matrix of graphḠ. A path is a sequence of connected edges, and graph G is connected and there is at least one path between any two nodes.
in which π mm (l) = − n∈S, m =n π mn (l) is the transfer rate from mode m at time t to mode n at time t + Λ; Λ > 0 and lim Λ>0 (o(Λ)/Λ) = 0. To visually describe the semi-MP, a reasonable mode evolution is given in Fig. 2, where θ r ∈ S, t r > 0, and l r+1 = t r+1 − t r > 0 is the system mode in the rth transition, the rth transition moment and the sojourn time of θ r , respectively. Denote π mn E{π mn (l)} ∞ 0 π mn (l)ϑ m (l)dl, where ϑ m (l) is the probability density function of sojourn time which at mode m.

B. Hierarchical Control
In the primary control layer, a common droop control strategy is described as in which i represents the ith DG; w i and w oi are the frequency amplitude and nominal value, respectively; V i and V oi are the voltage amplitude and nominal value, respectively; x i and y i are the droop coefficients, respectively; P i and Q i are the active and reactive power outputs, respectively. Note that droop control is a deviating regulation control method, in order to eliminate the undesired deviations, a secondary control scheme is introduced.
Here, frequency regulation is taken as an example to explain secondary control. In Fig. 3(a) and (b), point A is the initial stable operation point of MG. When P i increased, w ref will decrease to w 1 along the droop curve correspondingly, maintaining the preliminary balance running of MG in point B. Then, the applied secondary controller will compensate for frequency and power deviations. By calculating the deviations, w o will be corrected asw o , so as to pull the stable operation from point A to point C, realizing the frequency restoration and power allocation.
Using feedback linearization [9], letẇ i =ẇ oi − x iṖi = u wi , where the u wi is an auxiliary control input of secondary frequency controller. Then, the frequency nominal value can be determined by In addition, the active power sharing method in [17] is used in this article. The power balance equation of an islanded MG can be described as where N i=1 P i is the total real power output of all DGs; N i=1 P L i is the total load demand; P loss is the total active power losses, which can be expressed as with ξ being the known and small value called the rate of the total load power. In practice, each DG needs to distribute the corresponding real power according to the maximum generated power and the actual load demand. The reference power value P ref i of DG i can be set as where P max i is maximum generated power of DG i , and γ ref is the desired power distribution level. Introducing a local variable γ i = P i (1+ξ)P max i and defining the auxiliary control input u γi =γ i of secondary power controller, then the new frequency nominal value can be determined by Whereafter, define the frequency reference value w ref , the objective of this work is to design a secondary controller to realize Authorized licensed use limited to the terms of the applicable license agreement with IEEE. Restrictions apply.
Remark 1: In practice, the information transmission of MG relied on wireless communication technology. In most cases, the wireless transmission technology is easily affected by the external environment to produce a channel fading phenomenon, it can be regarded as a type of link fault between each unit in MG. Research shows that most communication link faults may be removed by their own fault repair devices (but the repair process may take time). Therefore, it is necessary to design a robust controller to meet the constraints of a complex external environment and still have good stability and performance. For the kind of situation with constant switching between normal and fault modes, Bernoulli distribution and Markov chain both can describe it as suitable, but the Markov chain has a broader description obviously, as shown in Fig. 4 . Fig. 4 describes a possible evolution process of fault/normal modes in communication links based on a discrete Markov chain. Specifically speaking, communication link has a certain probability of failure in MG. In a period of time after the occurrence of the fault, the corresponding fault detection devices will take action to eliminate the fault. p and q represent the probabilities of switching between normal mode and fault mode, respectively; 1 − p and 1 − q represent the probabilities of staying in their own states, respectively. Table II shows the specific representation of transition probabilities.
Compared with the traditional MP, the transition rate of the semi-MP is time-varying, which has more strong universality and practicability to describe the random topology of MG. Based on this idea, the semi-MP introduced in Concept 2 is used in this article to describe the switching topology in MG. Considering the real-time information of system mode is difficult to obtain accurately in practice, the following mode-independent distributed secondary controllers with the following form is designed: where K w and K γ are the mode-independent gains, and b i is used to express whether the reference signal can be obtained, i.e, b i = 1; otherwise, b i = 0. Remark 2: Combined with published literature, the distributed control method is fault-tolerant to the disconnection and failure of each unit in the communication topology. Because the characteristic of distributed control is that when one unit cannot communicate with another, it can be switched to communicating with other units or even exit the entire communication topology. However, the following conditions are required to achieve this performance: First, the faulty node unit cannot be a critical node, such as a leader, in other words, when the topology fails, the global information exchange is not affected; Second, the controller may need to apply large gains to offset such failures, but large gains tend to consume more resources. Therefore, if the switching topology can be described by introducing the switched model, and the targeted controller is designed at the same time, these problems can be better solved. It is feasible to design this switching model in practice. For Markov or semi-Markov models, it can be constructed according to certain probability statistics. When such probability information is difficult to obtain, the hidden Markov model is a better solution. In the future, we will devote ourselves to conducting further research on this problem.
Remark 3: The mode-dependent controller has less conservatism than the mode-independent one, but obtaining accurate real-time mode information is often challenging and with high costs in practice, which is particularly reflected in the systems under the network control framework. In this article, the ETM and cyber-attacks model will be introduced in the following analysis. Therefore, we designed the mode-independent controllers (8)-(9) rather than the mode-dependent forms u wi (θ(t))(t) and u γi (θ(t))(t).

C. ETM Under Deception Attacks
In this article, it is assumed that the frequency and power measurements are transmitted by the sampler after sampling. The sampler is considered time-driven with the sampling period h, and the sampling time can be expressed as kh (k = 1, 2, · · · ). For the problem of frequency transmission, the triggering instant for the DG i is given as means the frequency measured error between the current sampled-data h) being the latest transmitted frequency data of the DG i 's neighbor that satisfies denotes the dynamic threshold function; λ i > 0 means a basic threshold parameter; δ i > 0 represents the evolution degree of λ i ; tanh(·) determines the variation trend of the parameters λ i and η i > 0. Then, we derive the following frequency ETM condition of the DG Here, deception attacks are considered to occur randomly, and a Bernoulli distribution σ(t) ∈ {0, 1} is introduced to describe whether deception attacks occur during the network transmission, and σ(t) satisfies When the deception attack occurs, it can obtain the transmitted signal information from neighbors DG j to DG i , and change the data by a nonlinear function g w (·). The transmission signals of the neighbors DG j are described aŝ Therefore, the frequency controller (9) is redescribed as Time delay is also a common factor in network transmission. For further analysis, we divide the triggering interval into Whereafter, the error e w i (δ w h) can be defined as [23], define an artificial time delay of frequency as On the other hand, for the problem of active power transmission, using a similar method as above-mentioned, we get the following power ETM condition: , and the following active power controller of the DG i : wherê Then, the time delay of the active power level is defined as where 0 ≤ d γ (t) < d γ . Based on the above-mentioned analysis, the basic control framework of the proposed event-based distributed secondary control under deception attacks is given in Fig. 5. Remark 4: For the above ETM, tanh(·) function is introduced to accommodate fluctuations of system states. According to the characteristic of tanh (·), when e T i (·)e i (·) ≥ η i , it means that the current system states fluctuate largely, ρ i (t) should be reduced accordingly, and more data need to be transmitted into the controller. On the contrary, when the system states fluctuate gently, ρ i (t) needs to be increased to save network resources. Note that when δ i = 0, above ETM is transformed into the traditional ETM [16], [17]; when λ i = 0, above ETM is transformed into a time-triggered one. These indicate that the ETM used in this article is more general.
Remark 5: It is noted that the proposed control strategy contains two ETMs, i.e., frequency and power event detectors screen their measured signals through their own mechanism. Generally speaking, when the measured signals w i and γ i meet the preset triggered conditions, there are two options for transferring data to ZOH. One is to package the two data and transmit them through a commonly shared network channel and the other is to transmit the two data through two completely independent network channels. In this article, considering the measured frequency and power satisfy the same sampling time t = kh, we adopt the first transmission scheme in the simulation example. Technically speaking, both options are convenient to implement in the actual, and the selection should be according to the actual demand.
Remark 6: From Remark 4, it can be known that the frequency and power sampled signals are triggered at the same moment under ETM, i.e., δ w h = δ γ h. Therefore, the transmission of frequency and power can be regarded as having the same delay function d w (t) = d γ (t). In addition, Lian et al. [21] pointed out that the frequency and power signals are acquired through a first-order low-pass filter, which means the stability of frequency and power can be analyzed, separately.
Define the frequency error vector asw i (t) w i (t) − w ref , according to (3) and (13)-(17), the following frequency error systems can be obtained: Similar to the construction of frequency error systems, defining the power level error vector asγ i (t) γ i (t) − γ ref , we get the following power level error system: where the symbol definition is similar to frequency error systems. To simplify, we denote Ψ(θ(t)) Ψ m , and the other expressions are similar. At this point, the control objective (7) is transformed into the tracking synchronization problems, i.e., under the action of the designed controller K w and K γ , error systems (22)-(23) are asymptotically stable, respectively.
Remark 7: So far, the description of our proposed control strategy has been completed. The following is a detailed explanation of the proposed control method based on Fig. 5. The proposed control method mainly focuses on the design of the secondary control layer. For the primary control layer, droop control is adopted to realize the initial stability of the islanded MG, and then the frequency and power information of DG i are transmitted to the ac bus after LC filtering. Then, after the digital computer sampling process for the transmitted values, the sampled values are transferred to the designed ETM unit, to filter meaningless data. At this point, the neighbor's sampling information of the DG j is also transmitted to ETM units by the same method. Here, it is assumed that the neighbor information will be affected by deception attacks during the information transmitted process. In the ETM unit, the values from the DG i and its neighbors DG j will be calculated, and the transmission conditions are judged under the preset ETM conditions. The values that meet the transmission conditions are transmitted to the designed PI controller and the corresponding values are output by the ZOH to achieve the secondary control adjustment.

III. MAIN RESULTS
In this section, the stability criterion of the considered system by using the proposed secondary control will be given.
Theorem 1: Considering an MG system with semi-Markov switched topology is regarded as a directed graph. For given positive parameters ξ, σ, d w , λ i , δ i and matrices K w , G w , the designed event-based frequency controller can achieve the frequency amplitudes of each DG recover to the reference value under any initial conditions, if there exists positive definite matrix matrices P 1m , Q 11 , Q 12 , Z 1 , Ω w and any matrix M 1 such that the following inequalities hold for any i ∈V and m ∈ S: where the elements of the matrix Θ 1 are defined as follows: Proof: Select the following Lyapunov functional as: Calculating the weak infinitesimal operator of V (t), it yields Notice Besides, considering the bound condition of −1 < tanh(·) < 1, for all i = 1, 2, . . . , N, we have λ i (1 − δ i tanh(·)) < λ i (1 + δ i ). Then, (11) can be further rewritten as Then, similar to [41], the deception attacks considered in this article satisfies the following constraint: where G w is a given matrix. Defining the state vector as Using Schur complement lemma and the inequality of −Z −1 1 ≤ ρ 2 Z 1 − 2ρ(ρ > 0) for Θ 1 , the positive and negative judgment ofΘ 1 is equivalent to Θ 1 . Based on the Lyapunov stability theory, condition (24) can ensure E{LV (t)} < 0. That is to say, under the effect of the designed frequency controller, the initial frequency values can asymptotically track the given frequency reference value. To sum up, the proof of Theorem 1 has finished.
Similar to the frequency control problem, the stability proof of the power level error system is given as follows.
Theorem 2: Considering an MG system with semi-Markov switched topology is regarded as a directed graph. For given positive parameters ξ, σ, d γ , λ i , δ i and matrices K γ , G γ , the designed event-based power controller can achieve the active power sharing accuracy of each DG under any initial conditions, if there exists positive definite matrix P 2m , Q 21 , Q 22 , Z 2 , Ω γ and any matrix M 2 such that the following inequalities hold for any i ∈V and m ∈ S: where the elements of the matrix Θ 2 are defined as follows: Proof: The proof of Theorem 2 can be easily obtained by using the method similar to Theorem 1, so it is omitted here.
Based on the above-mentioned stability theorems, we give an algorithm design (Algorithm 1) of the proposed control strategy.

IV. SIMULATION EXAMPLE
In order to verify the effectiveness of the proposed eventbased distributed secondary control strategy, a modified IEEE 34 bus test system [17], [42], shown in Fig. 6, is considered as the modeling object in this article. It has five DGs and three loads connected in the MG at the beginning (DG 6 is added The values of line impedances can be obtained in [42], and the other parameters are given as follows. The frequency reference is f ref = 50 Hz, and the initial frequencies of each DG is f i (0) = 49.5 Hz (w = 2πf ); the power values of three connected loads are set as P L 1 = 2, P L 2 = 3, and P L 3 = 2.5 MW; the maximum active power outputs P max In this article, the information communication of each DG is regarded as switched topology, as shown in Fig. 7(a) and (b). Here, we illustrate the proposed method through an example with two modes, but the proposed method is by no means limited to two modes. Fig. 7(a) and (b) shows that the communication topology may exist in switching situations in practice (such as the transmission fault between DG 1 and DG 5 in Fig. 7(a) can be regarded as a disconnection, but after some time it could be fixed by a security device, this is a classical switched process). Based on the statistical information, it is entirely possible to anticipate this switching relationship. Here, we use semi-MP to discuss this point, where the transition rate matrix is given as According to [39], the transition rate function of semi-MP is considered to obey Weibull distribution, and the PDF of sojourn time is given as follows ϑ m (l) = (β/α β )l exp(−(l/α) β ). When l = 1, α = 2, and β = 2, it yields ϑ 1 (l) = 0.5l exp(−0.25l 2 ); when l = 2, α = 1, and β = 3, it yields ϑ 2 (l) = 3l 2 exp(−l 3 ). Computing the mathematical expectation E{π 12 (l)} = r Stage 3: verifying the plug-and-play ability of the proposed method, the DG 6 is connected to the Bus 826 of the MG system at t = 40 s. The corresponding known parameters are set as f 6 (0) = 49.5 Hz, P 6 (0) = 3 kW, P M 6 = 10 kW and γ 6 = 0.2857, and DG 6 is assumed that can be obtained as reference frequency and desired power distribution level, i.e., b 6 = 1. In order to show the effects of cyber-attacks, a set of Bernoulli distribution sequence σ(t) is used to simulate the generation of deception attacks, and the attack probability is set to 0.1, then "1" indicates an attack. The simulation result of the three stages is given in Fig. 8, and it is explained in the following. 1) First, at t = 0 s, for the given and unbalanced initial values, the frequency output w i of each DG is asymptotically restored to the given reference value w ref at t = 10 s. It is worth noting that in the initial stage 0 < t < 2s, when the controller is connected, the curve has obvious fluctuation, which is harmful to the system, and the intervention of safety devices is needed at this time, or, in practice, this fluctuation can be attenuated by gradually increasing the gain. And then the accurate real power sharing of five DGs is realized according to the desired power distribution level γ ref , which means the proposed distributed control scheme has the good ability to compensate for deviation. 2) Then, at t = 20 s, because the demand power of load 2 P L 2 is added to 6 MW, the frequency w i , power distribution level γ i , and active power output P i of each DG are all changed. But under the action of the designed secondary controller, the frequency amplitudes are still restored to the reference value within 5s, and active power outputs of five DGs and desired power distribution levels both converge to the new reference values within 5s, which shows the proposed control scheme has the well fault-tolerant ability.
3) Finally, at t = 40 s, adding a new DG into the whole communication topology has a great impact on the whole MG, which can also be seen from the simulation results. It can be seen that the connection of DG 6 causes fluctuation of frequency and power outputs. But soon the designed controller responded to these changes within 10s, and the frequency, desired power distribution level, and active power values all converge to their reference values, which indicates the proposed control scheme has a well plug-and-play ability. Furthermore, we set σ = 0, that is, there are without cyberattack occurs, and then carry out a simulation test in this case. Fig. 9 shows the simulation results. It can be seen that the expected control effect can be achieved in all three stages, and the curve is relatively flat compared with that in the case of a cyber-attack, which further shows that the proposed method is effective.
On the other hand, some simulation results are presented to illustrate the effectiveness of the proposed method in reducing    Fig. 10 shows the event-triggered transmission interval of DG 1 -DG 6 . Besides, for the dynamic threshold function ρ i (t) = λ i (1 − δ i tanh(·)), when δ i = 0, ETM used in this article can be transformed into common static ETM [16], [17], [18], and the TRs are, respectively, calculated as 371 1500 = 24.73%, 414 1500 = 27.6%, 361 1500 = 24.07%, 369 1500 = 24.6%, 367 1500 = 24.47%, 176 500 = 35.2%. The comparison results are visually shown in Fig. 11 and Table III, which show that our proposed method further reduces the number of communications by about 40% more than the static ETM method while ensuring sufficient control effect. Furthermore, Fig. 11. TRs of our ETM method and traditional ETM method.  Table IV, which indicates that the smaller sampling period brings a larger number of communications. In actual control, the parameters can be configured according to specific control requirements and resources.

V. CONCLUSION
This work has proposed a novel distributed resilient secondary control methodology for an islanded MG. Unlike most existing work that the topology connection is fixed, or simply switched by arbitrary form, the semi-Markov model has been used to describe the switching topology caused by an internal structural or external failure in islanded MG. To better solve the practical problems in network transmission, the ETM and cyber-attacks model have been introduced into the controller design to enhance operational resilience for islanded MG. Based on tracking synchronization of MASs, the Lyapunov functional method has been used to prove the proposed control scheme. Finally, the feasibility and correctness of the proposed method have been verified by the simulation example. The result has shown that our proposed method can reduce the communication numbers by over 80% under the premise of realizing frequency restoration and accurate real power sharing of AC islanded MG, and the transmission rate is also reduced by 40% compared with the existing general method. In the future, we will devote ourselves to studying the finite-time distributed secondary control for islanded MG by using sliding mode control or studying the switching topology of islanded MG under the hidden Markov model.