DeePC-Hunt: Data-enabled Predictive Control Hyperparameter Tuning via Differentiable Optimization

Michael Cummins, Alberto Padoan, Keith Moffat, Florian Dörfler, John Lygeros

TL;DR

This paper introduces DeePC-Hunt, a novel method for automatically tuning hyperparameters of Data-enabled Predictive Control (DeePC) using differentiable optimization. By treating DeePC as a policy and leveraging an approximate system model, DeePC-Hunt optimizes hyperparameters offline to achieve robust closed-loop performance, outperforming traditional methods, especially when system models are imperfect.

What Problem Does This Paper Address?

Data-enabled Predictive Control (DeePC) is a powerful direct data-driven control technique that, similar to Model Predictive Control (MPC), computes control actions based on historical data rather than explicit system models. However, DeePC's performance is highly sensitive to its regularization parameters. Traditional methods for tuning these parameters include optimizing open-loop performance (which can lead to poor closed-loop behavior) or manual guess-and-check (which is time-consuming and potentially unsafe for real-world systems). This paper addresses the need for an automated, safe, and effective method to tune DeePC hyperparameters that directly optimizes for closed-loop performance without requiring extensive real-world experimentation or highly accurate system models.

Methods

The core innovation is DeePC-Hunt, a backpropagation-based hyperparameter tuning method. It frames the DeePC controller as a policy and its regularization parameters as policy parameters. The key steps involve:

  • DeePC-as-Policy Interpretation: Viewing the DeePC optimization problem's solution as a control policy parameterized by the regularization terms.
  • Approximate System Model: Using a simplified or inaccurate model of the system dynamics. This is crucial because it allows for offline computation and is more robust to model errors than traditional MPC.
  • Differentiable Optimization: Leveraging automatic differentiation tools (specifically, CvxpyLayers integrated with PyTorch) to compute gradients of the closed-loop performance with respect to the DeePC regularization parameters.
  • Projected Resilient Backpropagation: Employing a variant of the resilient backpropagation algorithm, which is known for its effectiveness in handling parameters that can span orders of magnitude. This variant incorporates a projection step to enforce non-negativity constraints on the regularization parameters.

This approach allows for direct optimization of closed-loop performance on the approximate model, aiming to find hyperparameters that generalize well to the true system.

Datasets

The paper uses a simulated dataset generated from a Vertical Takeoff and Vertical Landing (VTVL) rocket landing environment. This environment is based on OpenAI's Gym Library and uses a nonlinear model of the rocket's dynamics. The training data for DeePC-Hunt is generated by applying a persistently exciting input trajectory to this environment and recording the corresponding output.

Key Insights and Ideas

  • Offline Tuning for Robustness: DeePC-Hunt demonstrates that optimizing hyperparameters offline using an approximate system model can lead to robust closed-loop performance on the true system, even with significant model inaccuracies. This is a key advantage over traditional MPC, which is highly sensitive to model accuracy.
  • Differentiable DeePC: By treating DeePC as a differentiable policy, the paper unlocks the power of gradient-based optimization for hyperparameter tuning, a significant advancement over manual tuning or open-loop optimization.
  • Resilient Backpropagation for Hyperparameters: The use of resilient backpropagation is well-suited for tuning DeePC hyperparameters, which can vary significantly in magnitude, ensuring effective convergence.
  • Sim-to-Real Gap Mitigation: The method effectively bridges the sim-to-real gap by optimizing for closed-loop performance on a surrogate model, reducing the need for costly and potentially unsafe real-world experiments.

Key Results

  • Outperforms MPC with Model Mismatch: In a VTVL rocket landing task, DeePC-Hunt significantly outperformed model-mismatched MPC in terms of success rate.
  • High Success Rate: DeePC-Hunt achieved a 66% success rate with model B (inaccurate model) compared to 22% for MPC with the same model. Even with model A (accurate model), DeePC-Hunt achieved a 56% success rate compared to 46% for MPC.
  • Robust Performance: The paper highlights that DeePC-Hunt policies show nearly identical trajectories and performance even when trained on different approximate models (model A vs. model B), demonstrating robustness to model inaccuracies.
  • Trade-off in Cost: While DeePC-Hunt excels in success rate and robustness, MPC achieved lower closed-loop costs upon successful landings. This is attributed to DeePC's regularization prioritizing robustness over minimizing immediate cost.

Limitations and Future Work

  • Approximate Model Quality: The performance of DeePC-Hunt is still dependent on the quality of the approximate system model. While it's more robust to inaccuracies than MPC, a severely inaccurate model could still lead to suboptimal hyperparameters.
  • Computational Cost: While offline tuning is generally more efficient than online tuning, computing gradients for complex systems or long horizons can still be computationally intensive. The paper mentions that computing the expectation in the optimization problem can be "prohibitively expensive" and relies on Monte Carlo sampling.
  • Local Optimality: The optimization process finds locally optimal hyperparameters. The paper doesn't guarantee global optimality.

Future work could explore:

  • More sophisticated methods for generating approximate models.
  • Investigating techniques to further reduce the computational burden of the optimization process.
  • Exploring the theoretical guarantees of DeePC-Hunt for global optimality.
  • Applying DeePC-Hunt to a wider range of complex nonlinear systems and control tasks.

Summary updated

BibTeX
@inproceedings{cummins2024deepc,
  author = {Michael Cummins and Alberto Padoan and Keith Moffat and Florian Dörfler and John Lygeros},
  title = {{DeePC-Hunt: Data-enabled Predictive Control Hyperparameter Tuning via Differentiable Optimization}},
  booktitle = {L4DC},
  year = {2024},
  doi = {10.48550/arxiv.2412.06481},
}
Figure