## 3 Self-Triggered Control for Islanded Microgrids under DoS Attacks
### Stability Analysis  
The convergence of the proposed improved ternary self-triggered control law under DoS attacks is analyzed in this subsection. **Theorem 1. **_For the system described as Equation (9), if topology \(G\) is undirected and connected, and DoS attack sequence that satisfies Equation (8), \(x_{i}^{AVE}\) converges in finite-time to a point \(x^{*}\in\left\{\left|x_{j}^{AVE}(t)-x_{i}^{AVE}(t)\right|<(N-1)\varepsilon, \ \forall(i,j)\in V\times V\right\}\) regardless the frequency of DoS attacks, for all \(i=1,\ \ldots,N\)._  
**Proof of Theorem 1. ** The Lyapunov function \(V(t)\) can be defined as  
\[V(t)=\frac{1}{2}\Big{[}x^{AVE}(t)\Big{]}^{T}x^{AVE}(t)>0 \tag{16}\]  
where \(x^{AVE}(t)=\left[x_{1}^{AVE}(t),\ldots,x_{N}^{AVE}(t)\right]^{T}\). Note that \(V(t)\geq 0\) and we consider the evolution of \(\dot{V}(t)\). Let \(t_{l}^{ij}\) denotes the latest triggering time instant. Firstly, we prove that there must exist a finite-time \(T^{*}\) such that, for every \((i,j)\in\Xi\) and every \(l\) with \(t_{l}^{ij}\geq T^{*}\), the control input \(u^{ij}(t)\) is set equal to 0 and stops to update. Using Equations (12)-(14), the derivative of \(V(t)\) can be expressed as  
\[ \begin{array}{rl}\dot{V}(t)&=\sum\limits_{i=1}^{N}x_{i}^{AVE}(t)\dot{x}_{i} ^{AVE}(t)=\sum\limits_{i=1}^{N}[x_{i}^{AVE}(t)\sum\limits_{j\in N_{i}}u^{ij}( t)]\\ &=\sum\limits_{i=1}^{N}[x_{i}^{AVE}(t)\sum\limits_{j\in N_{i}}\delta^{ij}(t) sign_{e}\big{(}dev^{ij}(t)\big{)}]\\ &=-Y\sum\limits_{C(\delta^{ij}Adv^{ij})}dev^{ij}(t)sign_{e}\big{(}dev^{ij} \big{(}t_{l}^{ij}\big{)}\big{)}\end{array}  \tag{17}\]  
where \(C\big{(}\delta^{ij},dev^{ij}\big{)}=\left\{\delta^{ij}\big{(}t_{l}^{ij}\big{)} =1\ and\ \Big{|}dev^{ij}\big{(}t_{l}^{ij}\big{)}\right|\geq\varepsilon,\ (i,\ j)\in\Xi\right\}\) represents the summation condition. \(\Big{|}dev^{ij}\big{(}t_{l}^{ij}\big{)}\Big{|}\geq\varepsilon\) means that the agents \(i\) and \(j\) are not \(\varepsilon\)-close while \(\delta^{ij}\big{(}t_{l}^{ij}\big{)}=1\) means that the communication is allowed on link \((i,j)\in\Xi\) at the triggering time instant \(t_{l}^{ij}\). This summation condition follows from the fact that for any \((i,j)\in\Xi\), if \(\Big{|}dev^{ij}\big{(}t_{l}^{ij}\big{)}\Big{|}\leq\varepsilon\) or \(\delta^{ij}\big{(}t_{l}^{ij}\big{)}=0\), we have \(u^{ij}(t)=0\) for \(t\in\big{[}t_{l}^{ij},t_{l+1}^{ij}\big{)}\). In other cases, \(u^{ij}(t)\) is not equal to 0. \(\Box\)  
Using Equation (14), it can be observed that for \(t\in\big{[}t_{l}^{ij},t_{l+1}^{ij}\big{)}\), if \(dev^{ij}\big{(}t_{l}^{ij}\big{)}\geq\varepsilon\), then we have  
\[ \begin{array}{rl}x_{j}^{AVE}(t)-x_{j}^{AVE}(t)&\geq x_{j}^{AVE}\big{(}t_{l}^{ij} \big{)}-x_{j}^{AVE}\big{(}t_{l}^{ij}\big{)}-Y\big{(}d_{i}+d_{j}\big{)}\big{(}t -t_{l}^{ij}\big{)}\\ &\geq\frac{dev^{ij}\big{(}t_{l}^{ij}\big{)}}{2}\end{array}  \tag{18}\]Similarly, if \(dev^{ij}\big{(}t_{l}^{ij}\big{)}\leq-\varepsilon\), then we have  
\[x_{j}^{AVE}(t)-x_{j}^{AVE}(t)\leq-\frac{dev^{ij}\big{(}t_{l}^{ij}\big{)}}{2} \tag{19}\]  
The above inequalities imply that if \(\left|dev^{ij}\big{(}t_{l}^{ij}\big{)}\right|\geq\varepsilon\), then \((x_{j}^{AVE}(t)-x_{j}^{AVE}(t))\) preserves the sign during continuous evolution, and consequently we have \(sign_{\varepsilon}(dev^{ij}(t))=sign_{\varepsilon}\big{(}dev^{ij}\big{(}t_{ l}^{ij}\big{)}\big{)}\). According to this fact, the following inequality can be obtained  
\[\dot{V}(t)\leq-Y\sum_{C(\beta^{ij},dev^{ij})}\frac{\left|dev^{ij}\big{(}t_{l}^ {ij}\big{)}\right|}{2}\leq-Y\sum_{C(\beta^{ij},dev^{ij})}\frac{\varepsilon}{2} \tag{20}\]  
Since \(\Upsilon\) is a positive scalar, it can be concluded that \(V(t)\) will decrease under the summation condition. However, there must exist a finite-time \(T^{*}\) such that for every \((i,j)\in\Xi\) and every \(l\) with \(t_{l}^{ij}\geq T^{*}\), \(\left|dev^{ij}\big{(}t_{l}^{ij}\big{)}\right|<\varepsilon\) or \(\delta^{ij}\big{(}t_{l}^{ij}\big{)}=0\) holds true.