Model-Based Policy Search for Automatic Tuning of Multivariate PID Controllers

Andreas Doerr, Duy Nguyen-Tuong, Alonso Marco, Stefan Schaal, Sebastian Trimpe

Introduction

Proportional-Integral-Derivative (PID) controllers are the cornerstone of industrial automation and robotics due to their simplicity and interpretability. However, tuning PID gains for complex, Multiple-Input Multiple-Output (MIMO) systems—such as a robotic arm balancing a pole—is traditionally a manual and tedious process. Standard tuning rules often rely on linear approximations or require decoupling control loops, which are insufficient for highly nonlinear robotic systems. This paper introduces a data-driven "auto-tuner" that leverages model-based reinforcement learning to find optimal PID parameters without requiring a pre-existing mathematical model of the system physics.

Methodology

The proposed method builds upon the Probabilistic Inference for Learning COntrol (PILCO) framework, a model-based policy search approach known for its data efficiency. PILCO typically employs Gaussian Processes (GPs) to learn system dynamics and optimize static state feedback policies.

To adapt PILCO for PID tuning, the authors introduce two critical innovations:

  1. PID as State Feedback: PID controllers are inherently dynamic as they depend on the history of errors. To treat them as memoryless policies within PILCO, the authors augment the system state to include the error, the accumulated integral of the error, and the error derivative. This allows the PID controller to be represented as a simple linear gain matrix.
  2. NARX Modeling: Real-world robotic systems often involve latent dynamics such as sensor delays and friction. To capture these effects, the researchers use a Nonlinear AutoRegressive eXogenous (NARX) model. By incorporating a window of past states and inputs into the GP model, the system can more accurately predict future states.
The PILCO framework augmented with NARX modeling for policy search.

The policy optimization is performed by minimizing an expected cost function over a finite time horizon using gradient-based methods, utilizing the analytic gradients provided by the GP dynamics model.

Experimental Evaluation

The effectiveness of the auto-tuner was evaluated on the Apollo robot, a humanoid upper-body platform featuring a seven-degree-of-freedom (7-DOF) arm. The experimental task involved balancing an inverted pendulum (a pole) in an upright position.

The Apollo humanoid robot balancing an inverted pendulum.

The learning process is highly efficient, starting with only four random "rollouts" to gather baseline dynamics data.

Results and Discussion

The system demonstrated extreme data efficiency, learning to balance the pole perfectly with only 106 seconds of total interaction time with the physical robot. This model-based approach proved significantly faster than previous model-free Bayesian Optimization methods applied to the same platform.

Key results include:

  • Robustness: Once tuned, the PID controller successfully rejected manual disturbances and followed moving trajectories.
  • Automation: The entire tuning process occurred automatically, requiring no human intervention or prior knowledge of the pole's physical properties (e.g., length or weight).
  • Interpretability: By focusing on PID structures rather than "black box" neural networks, the resulting controllers remain predictable and easy to implement on standard hardware.

However, the method's success depends on the GP's ability to make accurate long-term predictions. Additionally, while PID gains are automated, the NARX model's own hyperparameters currently require separate optimization.

Conclusion

This work presents a robust framework for the automatic tuning of multivariate PID controllers. By reframing PID control as state feedback and utilizing data-efficient model-based RL, the authors bridge the gap between advanced machine learning and practical industrial control. Future work may extend this approach to cascaded PID structures and more complex, time-varying tasks.

Summary updated

BibTeX
@inproceedings{doerr2017model,
  author = {Andreas Doerr and Duy Nguyen-Tuong and Alonso Marco and Stefan Schaal and Sebastian Trimpe},
  title = {{Model-Based Policy Search for Automatic Tuning of Multivariate PID Controllers}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2017},
  doi = {10.1109/icra.2017.7989622},
}
Figure