## 2 Load Frequency Control and DoS Attack Models Based on ADES
### Load Frequency Control Model of Multi-Machine Power Grids  
Suppose power grids are divided into sub-systems. In order to simplify both the system analysis and related applications, a linear dynamic model [48] is used to approximate the physical reference model of subsystems. The dynamic frequency control model of the subsystem \(i(i=1,\ldots,N)\) can be expressed by the following discrete difference equations [49]. \[\mathbf{x}_{i}(k+1)=\mathbf{A}_{i}\mathbf{x}_{i}(k)+\mathbf{B}_{i}u_{i}(k)+\mathbf{E}_{i}\varpi_{i }(k)+\sum_{j\in\mathcal{N}(i)}\mathbf{B}_{ji}\mathbf{x}_{j}(k) \tag{1}\]  
\[\mathbf{B}_{i}=\left( \begin{array}{cccccc}0&\Delta t/M_{i}&0&0&0&1-\Delta t/T_{ Bi}\end{array} \right)^{\mathsf{T}}\mathbf{E}_{i}=\left( \begin{array}{cccccc}- \Delta t/M_{i}&0&0&0&0&0\end{array} \right)^{\mathsf{T}} \tag{2}\]  
\[\mathbf{B}_{ji}=\left( \begin{array}{cccccc}0&0&0&0&0\\ \frac{\Delta tT_{ij}}{M_{i}\sum\limits_{k\in\mathcal{D}(i)}T_{hi}}&0&0&0&0&0\\ 0&0&0&0&0&0\\ 0&0&0&0&0&0\\ 0&0&0&0&0&0\\ 0&0&0&0&0&0\end{array} \right),\mathbf{x}_{i}=\left(\Delta f_{i}&\Delta P_{mi}& \Delta P_{pi}&\Delta P_{ji}\quad\int ACE_{i}\quad\Delta P_{Bi}\right)^{\mathsf{T}} \tag{3}\]  
\[\mathbf{A}_{i}=\left( \begin{array}{cccccc}0&1-\Delta t\sum_{j\in D(i)}T_{ji}&0&0 &0&0\\ 1+\frac{\Delta t}{M_{i}}&1-\frac{\Delta t}{M_{i}}&1+\frac{\Delta t}{M_{i}}&0&0&0 \\ 0&0&1-\frac{\Delta t}{M_{i}}&\frac{\Delta t}{M_{i}}&0&0\\ 0&1-\frac{\Delta t}{T_{gi}}&0&1-\frac{\Delta t}{T_{gi}}&1-\frac{\Delta tK_{i}} {T_{gi}}&0\\ 1&1-\Delta tb_{i}&0&0&0&0\\ 0&0&0&0&0&1-\frac{\Delta t}{T_{Bi}}\end{array} \right) \tag{4}\]  
where \(i=1,\ldots,N\) is the subsystem number; \(\mathcal{N}(i)\) is the collection of physically connected subsystems (power transmission line connection); \(\Delta f_{i}\) is the frequency deviation of the subsystem \(i\); \(\Delta T_{mi}\) is the mechanical power deviation of the generator; \(\Delta P_{pi}\) is the power deviation of the steam turbine; \(\Delta P_{ji}\) is the power deviation of the tie line; \(ACE_{i}\) is the area control error signal of system \(i\); \(ACE_{i}=a_{i}\Delta f_{i}+\Delta P_{pi}\), \(\mathbf{A}_{i}\), \(\mathbf{B}_{i}\) are the state matrix of subsystem \(i\) and gain of the control input, respectively; \(k\) is the discrete sampling time; \(\mathbf{B}_{ji}\) is the gain matrix of the state information of the subsystem \(j\); \(\varpi_{i}(k)\) is the load change disturbances of the subsystem \(i\); \(\mathbf{E}_{i}\) is the disturbance gain; \(T_{gi}\) is the inertia time constant of the turbine governor; \(D_{i}\) is the damping coefficient; \(T_{di}\) is the governor constant; \(M_{i}\) is the constant of inertia; \(R_{gi}\) is the inertia time coefficient of turbine adjustment; \(T_{ji}\) is the synchronous inertia time constant between area connections; \(b_{i}\) is the frequency deviation gain; \(K_{i}\) is the deviation control gain of the tie line; and \(\Delta t\) is the discrete sampling period. Considering the BESS in the P-Q working mode, it assumes the dynamic model of the battery energy storage system as a first-order inertia link. \(T_{Bi}\) in model (1) is the inertia time constant of the battery energy storage system. According to the P-Q droop control method, when the power grid load changes rapidly, active power needs to be injected to maintain the power balance of power grids. The power injection of the BESS also changes all the time. Therefore, the active power deviation of the BESS also needs to be considered as the state information. \(\Delta P_{Bi}\) is the active power deviation of the BESS. \(u_{i}\) is the injected controllable active power provided by the BESS of the subsystem \(i\) as follows. \[u_{i}(k)=\varphi(\mathbf{x}_{i},\mathbf{x}_{N^{\prime}(i)}) \tag{5}\]  
where \(\varphi(. )\) is the control strategy, \(\mathbf{x}_{i}\), \(\mathbf{x}_{N^{\prime}(i)}\) are the state information of the subsystem \(i\) and the remote network connection subsystem set \(\mathcal{N}^{\prime}(i)\), respectively.