  This paper proposes a reinforcement learning-based approach for optimal
transient frequency control in power systems with stability and safety
guarantees. Building on Lyapunov stability theory and safety-critical control,
we derive sufficient conditions on the distributed controller design that
ensure the stability and transient frequency safety of the closed-loop system.
Our idea of distributed dynamic budget assignment makes these conditions less
conservative than those in recent literature, so that they can impose less
stringent restrictions on the search space of control policies. We construct
neural network controllers that parameterize such control policies and use
reinforcement learning to train an optimal one. Simulations on the IEEE 39-bus
network illustrate the guaranteed stability and safety properties of the
controller along with its significantly improved optimality.
