## 4 Experiment Environment
### Case 1: Frequency Control of the IEEE 14-Bus Testing System under Different DoS Attack Intensities
At this time, the ADES controller starts and generates \(u_{i}\) (as shown in Figure 8b). BESS is introduced to participate in the power grid frequency control process. The power deviation curve of BESS is shown in Figure 8c, and the power change curve of the generator is shown in Figure 8d. In the simulation process, the maximum frequency deviation is 0.12 Hz, buses 1, 5, 9, and 14 become stable at 3.4, 3.8, 3.4, and 4.5 s, respectively. Under the influence of load disturbances, the frequency deviation eventually fluctuates in the stable interval. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter Name** & **Description** & **Value** \\ \hline \(\beta\) & learning rate of critic networks & 0.001 \\ \(\gamma\) & learning rate of actor networks & 0.009 \\ \(N\) & number of input neurons & 14 \\ \(\xi\) & sum of attack threshold & 6 \\ \(Q_{N}\) & number of network layers & 16 \\ \(\left|\lambda_{max}(\mathbf{L}_{i})\right|\) & the maximum absolute value of \(\mathbf{L}_{i}\) & 0.4 \\ \(\left\|B_{i,max}\right\|^{2}\) & the maximum value of \(\left\|B_{i}\right\|^{2}\) & 0.015 \\ \(L_{i}^{\prime}\) & Lipschitz constant & 1 \\ \(a_{1}\) & the weight of \(x_{i}(k)\) & 0.7 \\ \(a_{2}\) & the weight of \(u_{i}(k)\) & 0.3 \\ \(\alpha\) & damping factor & 0.8 \\ \(S\) & long-term evaluation time windows & 10 \\ \(u_{lim}\) & the maximum constraint of \(u_{i}\) & 2.0 \\ \(\Delta P_{B_{j},lim}\) & the maximum constraint of \(\Delta P_{B_{j}}\) & 25 MW \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Learning parameters of the IEEE14 bus testing system. As shown in Figure 9a,b, the frequency deviations of buses 1, 5, 9, and 14 exceed the frequency deviation threshold Hz at 0.4 s, 0.7 s, 0.3 s, and 0.4 s, respectively. At this time, the ADES controller starts and generates \(u_{i}\) (shown in Figure 9b) to adjust the active power output of BESS. The power deviation curves of BESS are shown in Figure 9c, and the power change curves of the generator are shown in Figure 9d. During the simulation process, the maximum frequency deviation is 0.11 Hz, bus 1 tends to be stable at 3.7 s, and buses 5, 9, 14 tend to be stable at 4 s. Due to the load disturbances, the frequency deviation eventually fluctuates in the stable interval. As shown in Figure 10a,b, the frequency deviations of buses 1, 5, 9, and 14 exceed the frequency deviation threshold Hz at 0.3, 0.3, and 0.4 s, respectively. At this time, the frequency deviation of BESS is 0.11 Hz, bus 1 tends to be stable at 3.7 s, and buses 5, 9, 14 tend to be stable at 4 s. Due to the load disturbances, the frequency deviation eventually fluctuates in the stable interval. As shown in Figure 10a,b, the frequency deviations of buses 1, 5, 9, and 14 exceed the frequency deviation threshold Hz at 0.3, 0.3, and 0.4 s, respectively. At this time, the frequency deviation of BESS is 0.1 Hz, bus 1, bus 1, bus 1, bus 1, bus 1 bus 1, bus 1, bus 1 bus 1, bus 1 the ADES controller starts, and the output \(u_{i}\) (shown in Figure 10b) is used to adjust the active power output of BESS. The power change curves of BESS are shown in Figure 10c, and the power change curves of the generator are shown in Figure 10d. The increase in the intensity of DoS attacks results in the adaptive increase or decrease of the change range of \(u_{i}\), thereby suppressing the interference caused by DoS attacks to the frequency control process of power grids. During the simulation process, the maximum frequency deviation is 0.09 Hz, the stabilization time of buses 1, 5, 9, and 14 is 3.4, 3.5, 3.2, and 4 s, respectively. The frequency deviation of each bus eventually fluctuates in the stable interval. Figure 10: Frequency deviation, control output, BESS and power output deviation of the generator in IEEE14 bus testing system, \(\eta_{ji}=0.4\). (**a**) Frequency deviation. (**b**) Control output \(u_{i}\). (**c**) Power deviation of BESS. (**d**) Power deviation of generators.