Safe Controller Optimization for Quadrotors with Gaussian Processes

Felix Berkenkamp, Angela P. Schoellig, Andreas Krause · DOI

Introduction

Tuning controller gains on real hardware is one of the most nerve-wracking tasks in robotics. While mathematical models provide a starting point, real-world variables—such as battery sag, wind, and sensor noise—necessitate fine-tuning on the actual robot. Traditionally, this is a manual, expert-driven process. While automated methods like Bayesian Optimization (BO) exist, they are often too "curious" for physical systems; a single exploratory measurement with aggressive parameters can lead to a catastrophic crash. This paper presents a practical framework that combines Gaussian Processes (GPs) with a "safety-first" optimization strategy, allowing a quadrotor to autonomously optimize its performance while guaranteeing it never enters an unstable state.

The Challenge: Safe Global Optimization

In control theory, the goal of tuning is to find the optimal parameters (e.g., PID gains) that yield the best performance. Standard Bayesian Optimization treats this as a black-box problem, sampling points to minimize uncertainty or maximize expected improvement. However, in robotics, the search space contains "cliffs"—regions of instability where the robot will crash.

The authors address the challenge of Safe Global Optimization: finding the global optimum of an unknown function without ever evaluating a point that falls below a critical safety threshold. This requires a method that is not just efficient, but strictly cautious about its exploration boundaries.

Methodology: Modified SAFEOPT

The researchers utilize a modified version of SAFEOPT, a Bayesian optimization algorithm designed for safety-critical applications. The framework relies on several core components:

Gaussian Processes (GP)

The algorithm models the unknown performance function as a GP. Unlike simple regression, a GP provides a predicted performance value for any given gain setting along with a formal measure of uncertainty (confidence intervals). This uncertainty is the key to maintaining safety.

The Safe Set ($S_n$)

The algorithm defines a "safe" performance threshold—for instance, the minimum performance required to keep the quadrotor airborne and stable. It only evaluates new parameters if the lower bound of the GP's confidence interval is above this threshold. This ensures that, with high probability, the next flight will not result in a crash.

Expanders and Maximizers

To navigate the search space, the algorithm identifies two types of points:

  1. Maximizers: Points that, based on current data, are likely to be the global optimum.
  2. Expanders: Points near the edge of the known safe region that, if measured, are likely to reduce uncertainty and "expand" the safe set, potentially revealing better maximizers.

Practical Modifications

A significant contribution of this paper is the simplification of the SAFEOPT algorithm. Original versions required a "Lipschitz constant"—a mathematical limit on how fast the performance function can change—which is extremely difficult to estimate in real-world robotics. This paper modifies the algorithm to estimate the safe region directly from the GP's posterior, making it significantly more accessible for practical engineering.

Experimental Results

The framework was tested using a Parrot AR.Drone 2.0 quadrotor. The task was to optimize two controller gains ($k_1, k_2$) for a 1-meter reference position change. The search space consisted of a grid of 10,000 possible combinations.

Key Findings

  • Zero Failures: Throughout the entire optimization process, the quadrotor never crashed or entered an unstable state. The algorithm successfully "walled off" unstable regions of the parameter space.
  • Efficiency: The algorithm identified the global optimum within just 30 flights.
  • Learning Phases: The authors observed that the robot naturally progressed through three stages: local exploration (understanding the starting point), expansion (coarsely sampling the edges of the safe zone), and finally, optimization (fine-tuning the peak).
  • Performance Improvement: The final controller demonstrated a significantly faster and smoother response compared to the initial "safe" but sluggish seed parameters.

Discussion and Limitations

While the results are promising, the authors highlight several areas for future work:

  • The Seed Problem: The algorithm requires an initial set of safe parameters to begin exploration. If the starting guess is already unstable, the algorithm cannot function.
  • Dimensionality: This study focused on a 2D parameter space. Scaling to high-dimensional systems (e.g., tuning dozens of gains simultaneously) remains a challenge due to the cubic scaling of Gaussian Processes.
  • Hyperparameter Sensitivity: The safety guarantee relies on the choice of the GP's "length-scales." If these are set too aggressively, the algorithm might overestimate the safety of an unexplored region.

Conclusion

This research demonstrates that it is possible to automate the tuning of complex robotic systems without the risk of hardware failure. By using Gaussian Processes to rigorously define the boundaries of safety, the modified SAFEOPT algorithm provides a bridge between high-performance machine learning and the strict reliability requirements of real-world robotics.

Summary updated

BibTeX
@inproceedings{berkenkamp2015safe,
  author = {Felix Berkenkamp and Angela P. Schoellig and Andreas Krause},
  title = {{Safe Controller Optimization for Quadrotors with Gaussian Processes}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2015},
  doi = {10.1109/icra.2016.7487170},
}
Figure