SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Controller performances. We compare the performance of 1) Neural-PI: the learned structured Neural-PI controllers parametrized by (7) with three layers and 20 neurons in each hidden layer. The neural networks are updated using Adam with learning rate initializes at 0.05 and decays every 50 steps with a base of 0.7. 2) DenseNN-PI: The proportional and integral terms are parameterized by dense neural networks (5) with three layers, 20 neurons in each hidden layer, and unconstrained weights. The neural networks are updated using Adam with learning rate initializes at 0.035 and decays every 50 steps with a base of 0.7. 3) Linear-PI: linear PI control where  $\pmb{p}(\bar{\pmb{y}} -\pmb {y})\coloneqq \pmb{K}_{P}(\bar{\pmb{y}} -\pmb {y})$ ,  $\pmb {r}(\pmb {s})\coloneqq \pmb{K}_I(\pmb {s})$  with  $\pmb{K}_{P}$  and  $\pmb{K}_{I}$  being the trainable proportional and integral coefficients. The coefficients are updated using Adam with learning rate initializes at 0.03 and decays every 50 steps with a base of 0.7. All of them have no communication constraints. All of the controllers are trained using 5 random seeds. The training time is shown in Table 1.
Table 1: Training time for vehicle platoon control
Method	Average Training time (s)	Standard Deviation (s)
Neural-PI	5232.36	30.55
DenseNN-PI	3567.01	16.28
Linear-PI	1836.93	10.09
The average batch loss during epochs of training with 5 seeds is shown in Figure 7(a). All of the three methods converge, with the Neural-PI achieves the lowest cost. Figure 7(b) shows the transient
(b) Average transient and steady cost
Figure 7: (a) The average batch loss during epochs of training with 5 seeds. All converge, with the Neural-PI achieving the lowest cost. (b) The average transient cost and steady-state cost with error bar on 100 testing trajectories starting from randomly generated initial states. Neural-PI achieves a transient cost that is much lower than others. DenseNN without structured design has both high costs in transient and steady-state performances.
and steady-state cost on 100 testing trajectories starting from randomly generated initial states. The steady-state cost is  $C(\pmb{y}, \pmb{u}) = ||\pmb{y}(15) - \bar{\pmb{y}}||_1 + \hat{c}||\pmb{u}(15)||_2^2$ , where we use the variables at the time  $t = 15s$  since the dynamics approximately enter the steady state after  $t = 15s$  as we will show later in simulation. Neural-PI and Linear-PI have the lowest steady-state cost, and the output reaches  $\bar{\pmb{y}}$  as guaranteed by Theorem 2. Neural-PI also achieves a transient cost that is much lower than others. By contrast, DenseNN-PI without structured design has both high costs in transient and steady-state performances.
(a) Neural-PI
(b) Linear-PI
(c) DenseNN-PI
Figure 8: Dynamics of velocity  $\mathbf{y}$  and control action  $\mathbf{u}$  with  $\bar{y} = 5\mathrm{m / s}$ . (a) Neural-PI stabilizes to  $\bar{y}$  quickly. (b) Linear-PI achieves output tracking with high control effort. (c) DenseNN leads to unstable behavior.
Given  $\bar{y} = 5\mathrm{m / s}$ , Figure 8 shows the dynamics of velocity  $\pmb{y}$  and control action  $\pmb{u}$  on 8 nodes under the three methods. As guaranteed by Theorem 2, Neural-PI in Figure 8(a) and Linear-PI in Figure 8(b) reaches the required speed  $\bar{y} = 5\mathrm{m / s}$ . However, Linear-PI has slower convergence and much larger control efforts compared with Neural-PI. Even though DenseNN-PI achieves finite loss both in training and testing, Figure 8(c) actually exhibits unstable behaviors. In particular, DenseNN-PI appears to be stable until about 10s, but states blows up quickly after that. Therefore, enforcing stabilizing structures is essential.
B.2 Power systems frequency control
B.2.1 Problem statement
The second experiment is the power system frequency control on the IEEE 39-bus New England system [52] shown in Figure 9, where  $\pmb{u} \in \mathbb{R}^{m}$  is the control signal to adjust the power injection from generators and the output  $\pmb{y} \in \mathbb{R}^{m}$  is the rotating speed (i.e., frequency) of generators. The objective is to stabilize generators at the required frequency  $\bar{\pmb{y}} = 60\mathrm{Hz}$  at the steady state while minimizing the transient control cost. The state is  $\pmb{x} = (\delta, \pmb{y})$ , where  $\delta \in \mathbb{R}^{m}$  is the rotating angle of generators in the center-of-inertia coordinates with  $\delta(0) \perp Im(\mathbb{1}_m)$  [54]. The model of power systems reflects the transmission of electricity from generators to loads through power transmission lines and is represented as follows:
$$
\dot {\delta} = \Gamma y,
$$
$$
\hat {M} \dot {\boldsymbol {y}} = - \hat {D} (\boldsymbol {y} - \bar {\boldsymbol {y}}) - \boldsymbol {d} + \boldsymbol {u} - E \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta}\right), \tag {20}
$$
where  $\hat{M} = \mathrm{diag}(M_1,\dots ,M_m)$ ,  $\hat{D} = \mathrm{diag}(D_1,\dots ,D_m)$  with  $M_j > 0$  and  $D_{j} > 0$  being the inertia and damping constant of generator  $j$ , respectively. The vector  $\pmb{d}$  is the net load of the system. The matrix  $\pmb {E}\in \mathbb{R}^{m\times e}$  is the incidence matrix corresponding to the topology of the power network with  $e$  transmission lines and satisfying  $\ker (\pmb {E}^{\top}) = Im(\mathbb{1}_m)$ . The matrix  $\Gamma \coloneqq I_m - \frac{1}{m}\mathbb{1}_m\mathbb{1}_m^\top$  extracts the relative rotating speed of generators by  $\Gamma y$ . The diagonal matrix  $\hat{\pmb{b}} = \mathrm{diag}(b_1,\dots ,b_e)\in \mathbb{R}^{e\times e}$  with  $b_{j} > 0$  being the susceptance of the  $j$ -th transmission line.
Figure 9: IEEE 39-bus test system [52]
We adopt a common assumption in literature that the power system operates with  $\delta$  satisfying  $\mathcal{H} = \{\delta | [\pmb{E}^\top \pmb{\delta}]_j \in (-\pi/2, \pi/2) \forall j = 1, \dots, e\}$ , where  $[\pmb{E}^\top \pmb{\delta}]_j$  is the angle difference between the generators in head and tail of the  $j$ -th transmission line [55-57]. This range is sufficiently large to include almost all practical scenarios [55-57].
B.2.2 Verification of Assumption 2
At the equilibrium, the right side of (17) equals zero gives
$$
- \hat {\boldsymbol {D}} (\boldsymbol {y} ^ {*} - \bar {\boldsymbol {y}}) - \boldsymbol {d} + \boldsymbol {u} ^ {*} - \boldsymbol {E} \hat {\boldsymbol {b}} \sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta} ^ {*}) = \mathbb {0} _ {m} \text {a n d} \boldsymbol {\Gamma} \boldsymbol {y} ^ {*} = \mathbb {0} _ {m}. \tag {21}
$$
We start by verifying the uniqueness of  $\pmb{x}^*$  for any  $\pmb{u}^* \in \mathcal{U}$  where (21) has a feasible solution such that  $\delta \in \mathcal{H}$ . For a given  $\pmb{u}^* \in \mathcal{U}$ , suppose there exists  $\pmb{x}_a^* = (\pmb{\delta}_a^*, \pmb{y}_a^*)$  and  $\pmb{x}_b^* = (\pmb{\delta}_b^*, \pmb{y}_b^*)$ ,  $\pmb{x}_a^* \neq \pmb{x}_b^*$  such that (21) holds. Plugging in (21) gives
$$
\hat {\boldsymbol {D}} \left(\boldsymbol {y} _ {a} ^ {*} - \boldsymbol {y} _ {b} ^ {*}\right) + \boldsymbol {E} \hat {\boldsymbol {b}} \left(\sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {a} ^ {*}\right) - \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {b} ^ {*}\right)\right) = \mathbb {0} _ {m} \tag {22a}
$$
$$
\boldsymbol {\Gamma} \left(\boldsymbol {y} _ {a} ^ {*} - \boldsymbol {y} _ {b} ^ {*}\right) = \mathbb {0} _ {m}. \tag {22b}
$$
Note that  $\Gamma E = E$ . Left multiplying (22a) with  $(E\hat{b}\left(\sin(E^{\top} \delta_{a}^{*}) - \sin(E^{\top} \delta_{b}^{*})\right))^{\top} \Gamma \hat{D}^{-1}$  yields  $(E\hat{b}\left(\sin(E^{\top} \delta_{a}^{*}) - \sin(E^{\top} \delta_{b}^{*})\right))^{\top} \hat{D}^{-1}(E\hat{b}\left(\sin(E^{\top} \delta_{a}^{*}) - \sin(E^{\top} \delta_{b}^{*})\right)) = 0$ , which holds if and only if  $(E\hat{b}\left(\sin(E^{\top} \delta_{a}^{*}) - \sin(E^{\top} \delta_{b}^{*})\right)) = \mathbb{0}_{m}$  since  $\hat{D}^{-1} > 0$ . Plugging in (22a) gives  $\hat{D}(\pmb{y}_a^* - \pmb{y}_b^*) = \mathbb{0}_m$ , which holds if and only if  $\pmb{y}_a^* = \pmb{y}_b^*$  since  $D_i > 0$  for all  $i = 1, \dots, m$ .
Left multiplying  $\left(\pmb{E}\hat{\pmb{b}}\left(\sin (\pmb{E}^{\top}\pmb{\delta}_{a}^{*}) - \sin (\pmb{E}^{\top}\pmb{\delta}_{b}^{*})\right)\right) = \mathbb{0}_{m}$  with  $(\delta_{a}^{*} - \delta_{b}^{*}))^{\top}$  yields
$$
\begin{array}{l} 0 = \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {a} ^ {*} - \boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {b} ^ {*}\right) ^ {\top} \hat {\boldsymbol {b}} \left(\sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {a} ^ {*}) - \sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {b} ^ {*})\right) \\ = \sum_ {j = 1} ^ {e} b _ {j} \left(\left[ \boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {a} ^ {*} \right] _ {j} - \left[ \boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {b} ^ {*} \right] _ {j}\right) \left(\sin \left(\left[ \boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {a} ^ {*} \right] _ {j}\right) - \sin \left(\left[ \boldsymbol {E} ^ {\top} \boldsymbol {\delta} _ {b} ^ {*} \right] _ {j}\right)\right). \tag {23} \\ \end{array}
$$
Since  $b_{j} > 0$  and  $\sin (\cdot)$  is strictly increasing in  $(- \pi /2, \pi /2)$ , (23) holds if and only if  $\pmb{E}^{\top}(\pmb{\delta}_{a}^{*} - \pmb{\delta}_{a}^{*}) = 0_{e}$ . Note that  $Im(\Gamma) \perp Im(\mathbb{1}_m)$ , thus  $(\delta_a^* -\delta_b^*)\perp Im(\mathbb{1}_m)$ . Hence, (23) holds if and only if  $\delta_{a}^{*} = \delta_{b}^{*}$ . Therefore, for every equilibrium  $\pmb{u}^{*}\in \mathcal{U}$ , there is a unique  $\pmb{x}^{*} = (\pmb{\delta}^{*},\pmb{y}^{*})\in \mathbb{R}^{n}$  such that  $\pmb {f}(\pmb{x}^{*},\pmb{u}^{*}) = \mathbb{0}_{n}$ .
Let the storage function be  $S(\pmb{x},\pmb{x}^{*}) = \frac{1}{2} (\pmb{y} - \pmb{y}^{*})^{\top}\hat{\pmb{M}} (\pmb{y} - \pmb{y}^{*}) - \mathbb{1}_{e}^{\top}\hat{\pmb{b}} (\cos (\pmb{E}^{\top}\pmb {\delta}) - \cos (\pmb{E}^{\top}\pmb{\delta}^{*})) - (\pmb{E}\hat{\pmb{b}}\sin (\pmb{E}^{\top}\pmb{\delta}^{*}))^{\top}(\pmb {\delta} - \pmb{\delta}^{*}))$ . Note that  $-\mathbb{1}_{e}^{\top}\hat{\pmb{b}} (\cos (\pmb{E}^{\top}\pmb {\delta})$  is strictly convex in  $\mathcal{H}$ , thus the Bregman distance  $-\mathbb{1}_{e}^{\top}\hat{\pmb{b}} (\cos (\pmb{E}^{\top}\pmb {\delta}) - \cos (\pmb{E}^{\top}\pmb{\delta}^{*})) - (\pmb{E}\hat{\pmb{b}}\sin (\pmb{E}^{\top}\pmb{\delta}^{*}))^{\top}(\pmb {\delta}-\pmb{\delta}^{*}))\geq 0$  with equality holds only when  $\delta = \delta^{*}$
The time derivative is
$$
\dot {S} (\boldsymbol {x}, \boldsymbol {x} ^ {*}) = (\boldsymbol {y} - \boldsymbol {y} ^ {*}) ^ {\top} \hat {M} \dot {\boldsymbol {y}} + (\boldsymbol {E} \hat {\boldsymbol {b}} \sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta}) - \boldsymbol {E} \hat {\boldsymbol {b}} \sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta} ^ {*})) ^ {\top} \dot {\boldsymbol {\delta}}
$$
$$
\begin{array}{l} = (\boldsymbol {y} - \boldsymbol {y} ^ {*}) ^ {\top} (- \hat {\boldsymbol {D}} (\boldsymbol {y} - \bar {\boldsymbol {y}}) - \boldsymbol {d} + \boldsymbol {u} - \boldsymbol {E} \hat {\boldsymbol {b}} \sin (\boldsymbol {E} ^ {\top} \boldsymbol {\delta})) \\ + \left(\boldsymbol {E} \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta}\right) - \boldsymbol {E} \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} ^ {*}\right)\right) ^ {\top} \boldsymbol {\Gamma} \boldsymbol {y} \\ - \left(\boldsymbol {y} - \boldsymbol {y} ^ {*}\right) ^ {\top} \underbrace {\left(- \hat {\boldsymbol {D}} \left(\boldsymbol {y} ^ {*} - \bar {\boldsymbol {y}}\right) - \boldsymbol {d} + \boldsymbol {u} ^ {*} - \boldsymbol {E} \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} ^ {*}\right)\right)} _ {= 0 _ {m}} \\ \end{array}
$$
$$
\begin{array}{l} \stackrel {\text {①}} {=} - \left(\boldsymbol {y} - \boldsymbol {y} ^ {*}\right) ^ {\top} \hat {\boldsymbol {D}} \left(\boldsymbol {y} - \boldsymbol {y} ^ {*}\right) + \left(\boldsymbol {y} - \boldsymbol {y} ^ {*}\right) ^ {\top} \left(\boldsymbol {u} - \boldsymbol {u} ^ {*}\right) \\ - \left(\boldsymbol {y} ^ {*}\right) ^ {\top} \left(\boldsymbol {E} \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta}\right) - \boldsymbol {E} \hat {\boldsymbol {b}} \sin \left(\boldsymbol {E} ^ {\top} \boldsymbol {\delta} ^ {*}\right)\right) \\ \end{array}
$$
$$
\stackrel {2} {\leq} - \left(\min  _ {i} D _ {i}\right) | | \boldsymbol {y} - \boldsymbol {y} ^ {*} | | _ {2} ^ {2} + \left(\boldsymbol {y} - \boldsymbol {y} ^ {*}\right) ^ {\top} \left(\boldsymbol {u} - \boldsymbol {u} ^ {*}\right)
$$
where ① follows from  $(-\hat{D} (\pmb {y}^{*} - \bar{\pmb{y}}) - \pmb {d} + \pmb{u}^{*} - \pmb {E}\hat{\pmb{b}}\sin (\pmb{E}^{\top}\pmb{\delta}^{*})) = \mathbb{0}_{m}$  by definition of equilibrium. The relation ② follows from  $E^{\top}y^{*} = E^{\top}\Gamma y^{*} = \mathbb{0}_{e}$  and  $D_{i} > 0$  for all  $i = 1,\dots ,m$ . Therefore, the dynamics (20) of the power system frequency control satisfies conditions in Assumption 2.
B.2.3 Simulation and Visualization
Simulation Setup We conduct experiments on the IEEE New England 10-machine 39-bus (NE39) power network with parameters given in [52, 8]. We implement control law for power output  $\mathbf{u}$  of generators to realize the track of frequency at  $60\mathrm{Hz}$  and reduce the power generation cost. The state  $\delta$  is initialized as the solution of power flow at the nominal frequency and  $s$  is initialized as 0.
The number of epochs and batch size are 400 and 300, respectively. The step-size in time is set as  $\Delta t = 0.01s$  and the number of time stages in a trajectory for training is  $K = 400$ .
Apart from the accumulated frequency deviation, an important metric for the frequency control problem is the maximum frequency deviation (also known as the frequency nadir) after a disturbance [8]. Hence, the transient cost is set to be  $J(\pmb{y}, \pmb{u}) = \sum_{i=1}^{n} \left( \max_{k=1,\dots,K} |y_i(k\Delta t) - \bar{y}| + 0.05 \sum_{k=1}^{K} |y_i(k\Delta t) - \bar{y}| + 0.005 \sum_{k=1}^{K} (u_i(k\Delta t))^2 \right)$ . The loss function in training is  $J(\pmb{y}, \pmb{u})$ , such that neural networks are optimized to reduce transient cost. The neural PI controller can be trained by most model-based or model-free algorithms, and we use the model-based framework in [8, 53] by embedding the system dynamic model in the computation graph shown in Figure 4 and training Neural-PI by gradient descent through  $J(\pmb{y}, \pmb{u})$ .
Two major goals of this experiment is
1) Verifies the robustness of the controller under parameter changes. Note that the load  $d$  is a parameter in the dynamics (20). In particular, power system operator emphasizes on the ability of the system to withstand a big disturbance such as a step load change. To this end, we train and test controllers by randomly picking at most three generators to have a step load change uniformly distributed in uniform[-1, 1] p.u., where 1p.u. = 100 MW is the base unit of power for the IEEE-NE39 test system.
2) Verifies the performances under communication constraints. Most systems do not have fully connected real-time communication capabilities, so the controller needs to respect the communication constraints and we show the flexibility of Neural-PI control under different communication structures.
Controller Performances. We compare the performance of Neural-PI controller where 1) all the nodes can communicate 2) half of the nodes can communicate and 3) none of the nodes can communicate (thus the controller is decentralized), respectively. All neural-PI controllers are parameterized by (7) and (8) where each SCNN has three layers and 20 neurons in each hidden layer. The neural networks are updated using Adam with the learning rate initializes at 0.05 and decays every 50 steps with a base of 0.7. We compare against the following two benchmarks where all the nodes can communicate: 4) DenseNN-PI-Full: Dense neural networks (5) with three layers, 20 neurons in each hidden layer, and unconstrained weights. The neural networks are updated using Adam with a learning rate initializes at 0.01 and decays every 50 steps with a base of 0.7. Note that DenseNN needs such a small learning rate to let the training converge, the reason is that DenseNN may lead to unstable behaviors that we will see later. 5) Linear-PI-Full: linear PI control where  $\pmb{p}(\bar{\pmb{y}} -\pmb {y})\coloneqq \pmb{K}_P(\bar{\pmb{y}} -\pmb {y}),\pmb {r}(\pmb {s})\coloneqq \pmb{K}_I(\pmb {s})$  with  $K_{P}$  and  $K_{I}$  being the trainable proportional and integral coefficients. The coefficients are updated using Adam with the learning rate initializes at 0.08 and decays every 50 steps with a base of 0.7. All of the controllers are trained using 5 random seeds. The training time is shown in Table 2.
Table 2: Training time for power system frequency control
Method	Average Training time (s)	Standard Deviation (s)
Neural-PI-Full	4373.52	64.58
Neural-PI-Half	8034.92	115.26
Neural-PI-Dec	23549.34	300.95
DenseNN-PI-Full	2193.84	21.22
Linear-PI-Full	981.65	11.19
The average batch loss during epochs of training with 5 seeds is shown in Figure 10(a). All converge, with the Neural-PI-Full achieving the lowest cost. Figure 10(b) shows the average transient cost and steady-state cost with error bar on 100 testing trajectories subject to random step load changes. The steady-state cost is  $C(\pmb{y}, \pmb{u}) = 0.05||\pmb{y}(15) - \bar{\pmb{y}}||_1 + 0.005||\pmb{u}(15)||_2^2$ , where we use the variables at the time  $t = 15s$  since the dynamics approximately enter the steady state after  $t = 15s$  as we will show later in simulation. Neural-PI-Full achieves the lowest transient and steady-state cost. Notably, the steady-state cost significantly decreases with increased communication capability. The reason is that communication serves to better allocated control efforts such that they can maintain output
(b) Transient and steady cost
Figure 10: (a) Average batch loss during epochs of training with 5 seeds. All converge, with the Neural-PI achieving the lowest cost. (b) The average transient cost and steady-state cost with error bar on 100 testing trajectories subject to random step load changes. Neural-PI achieves a transient cost that is much lower than others. The steady-state cost significantly decreases with increased communication capability. DenseNN without structured design has both high costs in transient and steady-state performances.
Table 3: The average transient cost on 100 testing trajectories starting from randomly generated initial states
Number of training trajectories	Neural-PI	Linear-PI	DenseNN
5	0.1328	0.1915	1.0
10	0.1300	0.1865	0.9833
50	0.1257	0.1838	0.9624
100	0.1234	0.1816	0.9214
300	0.1233	0.1815	0.5347
tracking with smaller control costs. Again, DenseNN without structured design has high costs both in transient and in steady state.
With a step load change at 0.5s, Figure 11 shows the dynamics of frequency  $\mathbf{y}$  and control action  $\mathbf{u}$  on 7 nodes under the five methods. Again, DenseNN-PI-Full in Figure 11(e) exhibits unstable behavior with large oscillations. As guaranteed by Theorem 2, Neural-PI in Figure 11(a-c) reaches the required frequency  $\bar{y} = 60\mathrm{Hz}$ , but the speed of convergence is lower for reduced communication capabilities. Hence, the guarantees provided by the structured Neural-PI controllers are robust to parameter changes and communication constraints, which have significant practical importance.
Performance with different numbers of training trajectories. Table 3 compares the transient cost attained by different controllers trained with different numbers of trajectories. For both Linear-PI and Neural-PI, training with 5 trajectories for each epoch has already achieved a similar cost as training with 300 trajectories. By contrast, unstructured DenseNN requires a much larger amount of training data to reduce transient costs on testing trajectories. Therefore, the stabilizing structure significantly reduces the requirement for the number of samples to learn well.
The impact of disturbances and noises. The satisfaction of the Lyapunov condition is robust to disturbances in the system parameters and does not need to know how large the disturbances are, as shown in the proof Theorem 2 and Remark 2. Therefore, if there is a sudden change in the load levels, the proposed controller design still stabilizes the system and tracks the required frequency at  $60\mathrm{Hz}$ . In Figure 12(a), we demonstrate the system dynamics after two disturbances in load. In Figure 12(b)-(c), we add noises in both data measurement and dynamics with the signal-to-noise ratio being 5 dB (much larger than typical measurement noises). The results show that the systems are input-to-state stable, i.e., that bounded noise will lead to bounded states. Incorporating noise in rigorous theoretical analysis is an important future direction for us.
(a) NeuralPI-Full
(b) NeuralPI-Half
(c) NeuralPI-Dec
(d) Linear-PI-Full
(e) DenseNN-Full
Figure 11: Dynamics of frequency  $y$ , control action  $u$  and accumulated cost on 7 nodes with  $\bar{y} = 60\mathrm{Hz}$  and a step load change at 0.5s. (a) Neural-PI when all nodes can communicate (b) Neural-PI when half of nodes can communicate, (c) Neural-PI when none nodes can communicate. The control with different communication capability all stabilize the system to the required  $\bar{y} = 60\mathrm{Hz}$ . (d) Linear-PI-Full is stable but has slower convergence. (e) DenseNN-PI-Full leads to large frequency deviations and oscillations.
(a) There is a step increase of load on 0.5s and a step decrease of load on 3.5s.
(b) Neural-PI with noise on data measurement
(c) Neural-PI with noise on system dynamics
Figure 12: Frequency restoration to  $60\mathrm{Hz}$  after the disturbances/noises are all maintained.