Globally Optimal Policy Gradient Algorithms for Reinforcement Learning with PID Control Policies

Vipul Kumar Sharma, Wesley A. Suttle, S SivaranjaniNeurIPS 2025

Introduction

Proportional-Integral-Derivative (PID) controllers are the workhorses of modern industry, governing over 90% of automated systems—from factory manufacturing lines to consumer thermostats. Despite their ubiquity, tuning the three core parameters ($K_P, K_I, K_D$) remains largely a heuristic "black art" reliant on trial-and-error.

While Reinforcement Learning (RL) has shown immense promise in automating control systems, it typically relies on generic deep neural networks or Linear Quadratic Regulators (LQR). These standard RL approaches often lack the specific structural advantages of PID—such as the integral term's ability to eliminate persistent steady-state errors—and frequently fail to provide global optimality guarantees, meaning the algorithm might settle for a sub-optimal solution.

This paper bridges classical control theory and modern machine learning by introducing the first policy gradient algorithms for PID control that come with rigorous proofs of global optimality. By embedding the PID structure directly into the RL agent, the authors provide a method to automatically tune controllers with guaranteed convergence and superior robustness.

Formulating PID for Reinforcement Learning

To integrate PID control into a standard RL framework, the researchers transformed the PID control problem into a state-space optimization problem. By augmenting the system state to include the history of errors, they successfully mapped the "Integral" and "Derivative" components of the PID architecture into a format RL algorithms can process.

A major theoretical breakthrough in this work is the mathematical proof of gradient dominance. In many optimization landscapes, algorithms can get trapped in "local minima"—valleys that are not the true lowest point. The authors prove that for PID policies, any point where the gradient is zero is guaranteed to be the global optimum. This ensures that the learning process will not get stuck in sub-optimal configurations.

Algorithmic Approaches

The authors developed two distinct policy gradient algorithms to handle different levels of system knowledge:

  1. PG4PID (Model-Based): This approach utilizes "System Identification" to estimate the underlying physics of the system (the $A$ and $B$ matrices) and solves a Riccati equation to compute exact gradients. It achieves linear convergence, meaning it rapidly zeroes in on the optimal solution.
  2. PG4PI (Model-Free): For scenarios where system dynamics are entirely unknown, the authors employ a stochastic policy by injecting Gaussian noise during training to encourage exploration. Using the classic Policy Gradient Theorem, this algorithm learns the optimal Proportional ($K_P$) and Integral ($K_I$) parameters purely from data interactions. The researchers established a sample complexity formula ($NT \approx \epsilon^{-3}$) detailing exactly how many environment interactions are required to reach within $\epsilon$ of the perfect controller.

Insight on the "D" Term: The authors discovered that while the Proportional and Integral terms can be learned in a truly model-free way, the Derivative ($D$) term inherently depends on internal system matrices. Consequently, the purely model-free approach focuses on PI control, while the model-based approach handles the full PID spectrum.

Experimental Validation and Key Insights

The algorithms were benchmarked using the controlgym suite, testing against an 8-dimensional Chemical Reactor and a highly complex 48-dimensional LA University Hospital climate control environment.

  • Zero Steady-State Error: Standard LQR (a common RL benchmark) often leaves a persistent gap between the target and the actual state. Because the proposed algorithms embed the PID structure, they successfully achieve zero steady-state error.
  • Robustness to Model Mismatch: When the system's physics were intentionally altered to simulate model error, standard LQR controllers became unstable and failed. In contrast, the learned PI/PID policies maintained stability, proving that PID's structural robustness persists even when parameters are learned via RL.
  • Superior Efficiency: Compared to Proximal Policy Optimization (PPO), a state-of-the-art general RL algorithm, the PID-specific algorithms converged significantly faster and achieved higher total rewards (lower operational costs).

Limitations and Future Directions

While groundbreaking, the research highlights a few open challenges. Extending the model-free algorithm to include the Derivative term ($K_D$) remains a mathematical hurdle due to the matrix dependencies identified.

Furthermore, real-world systems have strict physical limits (e.g., maximum motor speeds). Because this paper focuses on unconstrained optimization, future work will need to incorporate "safety filters" to prevent hardware damage during the exploratory learning phase. Finally, expanding the framework to handle multi-objective control—such as balancing energy efficiency with response speed—will further align these algorithms with complex industrial needs.

Summary updated

BibTeX
@inproceedings{sharma2025globally,
  author = {Vipul Kumar Sharma and Wesley A. Suttle and S Sivaranjani},
  title = {{Globally Optimal Policy Gradient Algorithms for Reinforcement Learning with PID Control Policies}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=wW2qRfhT9d},
}
Figure