Recurrent Neural Network Controllers Synthesis with Stability Guarantees for Partially Observed Systems

Fangda Gu, He Yin, Laurent El Ghaoui, Murat Arcak, Peter J. Seiler, Ming Jin

Abstract

Training Recurrent Neural Networks (RNNs) to control systems with partial observations is challenging because small parameter updates can lead to system instability. This paper introduces a Projected Policy Gradient method that employs "sequential convexification" to guarantee exponential stability during the learning process. By ensuring the controller remains within a mathematically defined "safe zone," the method prevents system crashes while effectively maximizing rewards.

Introduction

In many engineering applications, such as autonomous flight or power grid management, the full state of the system is not directly accessible. Instead, controllers must rely on noisy, partial observations. Recurrent Neural Networks (RNNs) are well-suited for these partially observed systems because their internal memory allows them to integrate information over time.

However, the "black box" nature of RNNs poses a significant risk in safety-critical environments. Traditional Reinforcement Learning (RL) methods prioritize reward maximization, often treating stability as an afterthought. For physical hardware, a mathematical guarantee of stability is essential. This paper addresses the non-convex nature of the stable parameter space by deriving a convex inner approximation that can be used during optimization.

Methodology

RNN Parameterization

The authors model the RNN controller ($\pi_\theta$) as an interconnection between a Linear Time-Invariant (LTI) system ($P_\pi$) and a static nonlinear activation function ($\phi$), such as tanh or ReLU. This structure allows the application of robust control tools to a deep learning architecture.

Internal structure of the RNN controller $\pi_\theta$, showing the feedback loop between the linear part $P_\pi$ and the nonlinearity $\phi$.

Stability via Quadratic Constraints

To provide formal guarantees, the behavior of the neural network's activation functions is "bounded" using Integral Quadratic Constraints (IQCs). These constraints define a mathematical "envelope" or sector bound that the nonlinearity must reside within. By treating the nonlinearities and any system uncertainties as perturbations within these known bounds, the authors can guarantee the stability of the entire closed-loop system.

Sector bounds for common activation functions like tanh and leaky ReLU, used to define the safe operating envelope for the controller.

Sequential Convexification and Projected Policy Gradient

The core innovation lies in sequential convexification. While the true set of stable RNN parameters is non-convex, the authors derive a Linear Matrix Inequality (LMI) that represents a convex "inner approximation" of this safe zone.

During training, the algorithm follows a two-step process:

  1. Policy Gradient Step: A standard gradient update is performed to increase the expected reward.
  2. Projection Step: The updated parameters are immediately projected back into the convex "safe zone" defined by the LMI.

This ensures that every iteration of the controller is mathematically guaranteed to be stable, preventing the chaotic behavior often seen in standard RL training.

Experimental Results

The method was rigorously tested on several complex control benchmarks, including the Cartpole, Pendubot, and a high-dimensional IEEE 39-bus Power System.

  • Guaranteed Stability: Unlike standard Policy Gradient (PG) methods, which frequently resulted in diverging trajectories, the proposed method maintained stability throughout training across all tasks.
  • Enhanced Sample Efficiency: By restricting the search to a "sane" parameter space, the agent avoids exploring unstable regions. This led to significantly faster convergence; for instance, in Vehicle Lateral Control, the method reached near-optimal performance much earlier than standard PG.
  • Superior Performance in Complex Tasks: In the Pendubot and 39-bus power system benchmarks, the stable RNN controller achieved higher final rewards than standard RL, which often struggled with the constraints of partial observability.

Conclusion

By integrating stability as a hard constraint within the optimization process rather than a soft goal in the reward function, this work bridges the gap between deep learning and classical control theory. While the computational cost of solving the projection step (a Semidefinite Program) increases with network size, the gains in safety and learning efficiency make it a powerful approach for controlling real-world, partially observed systems.

Summary updated

BibTeX
@inproceedings{gu2022recurrent,
  author = {Fangda Gu and He Yin and Laurent El Ghaoui and Murat Arcak and Peter J. Seiler and Ming Jin},
  title = {{Recurrent Neural Network Controllers Synthesis with Stability Guarantees for Partially Observed Systems}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i5.20476},
}
Figure