Approximate Robust NMPC using Reinforcement Learning

Hossein Nejatbakhsh Esfahani, Arash Bahari Kordabad, Sébastien GrosECC 2021

Introduction

In the deployment of autonomous systems, such as unmanned aerial vehicles or self-driving cars, Nonlinear Model Predictive Control (NMPC) has emerged as a standard for managing complex physics and strict safety constraints. However, NMPC typically relies on a high-fidelity model of the environment. In real-world scenarios, disturbances and model-plant mismatches are inevitable, often leading to suboptimal performance or safety violations. While Robust NMPC (RNMPC) was developed to mitigate these issues, it frequently faces a trade-off: formal RNMPC is often too computationally intensive for real-time applications on low-power hardware, while approximate RNMPC—which uses simplified geometries like ellipsoids to represent uncertainty—relies on static, "coarse" guesses about noise levels. This paper introduces RL-RNMPC, a framework that uses Reinforcement Learning (RL) to automatically tune these approximations, providing a computationally efficient yet adaptive control solution.

The RL-RNMPC Framework

The authors propose a two-layered architecture that marries the rigorous constraint-handling of control theory with the adaptive learning capabilities of machine learning. The core innovation lies in using the MPC scheme itself as the function approximator for the RL agent, ensuring that the system respects fundamental physical constraints even as it learns from environmental data.

1. The Ellipsoidal RNMPC Controller

To maintain computational efficiency, the controller models uncertainty as an "ellipsoidal tube" surrounding a nominal trajectory. By utilizing linearized dynamics and a Gaussian noise model, the framework avoids the massive overhead of calculating every possible future path. Instead, it focuses on maintaining the system state within these calculated safety margins.

2. Learning via LSTDQ

The learning layer utilizes a second-order Least Square Temporal Difference Q-learning (LSTDQ) algorithm. Rather than employing a black-box neural network, the RL agent tunes four specific parameters within the MPC formulation:

  • $\sigma_k$: The Mahalanobis distance, which effectively scales the radius of the uncertainty ellipsoids (the safety margin).
  • $\bar{d}_k$: The expected value of process noise, allowing the system to compensate for constant drifts.
  • $\Lambda$: The process noise covariance matrix.
  • $M$: A weighting matrix that modifies the cost function to account for uncertainty.

To ensure that the learning process remains physically consistent—for example, preventing the generation of negative covariance matrices—the RL update steps are formulated as a Semi-Definite Program (SDP).

Experimental Validation

The framework was evaluated using a simulated Wheeled Mobile Robot (WMR) tasked with tracking an "eight-shaped" trajectory while navigating around three elliptical static obstacles. The simulation environment introduced stochastic uncertainties in orientation and velocity to mimic the drifting and sensor errors common in real-world robotics.

The RL agent was trained over 8,000 transitions, with parameter updates occurring every 100 samples. This allowed the system to iteratively refine its understanding of the environment's noise profile and the proximity of obstacles.

Key Insights and Results

  • Adaptive Safety Margins: The RL agent successfully learned to adjust the safety parameter $\sigma_k$ dynamically. In open areas, the system could prioritize performance, while in "tight" spots near obstacles, it learned to expand the uncertainty ellipsoids to provide a larger safety buffer.
  • Superior Performance: Over a 25-lap comparison, RL-RNMPC consistently achieved a lower average cost than both standard NMPC and non-tuned Robust NMPC. This demonstrates that the RL-tuned parameters allow for a more precise balance between aggressiveness and caution.
  • Systematic Drift Compensation: By tuning $\bar{d}_k$, the system effectively compensated for systematic biases in the robot's motion that were not present in the original nominal model.
  • Physics-Informed Learning: By using the MPC structure as the value function, the authors ensured that the RL agent's "decisions" were always grounded in the feasible control space of the robot.

Limitations and Future Directions

While RL-RNMPC shows significant promise, the authors identify several areas for further development. Currently, the linear feedback gain ($K_k$) used to keep the robot within its uncertainty tube is fixed based on standard LQR; learning this gain dynamically could further optimize performance. Additionally, while the framework proved effective for a 3-state mobile robot, further research is required to determine how well the second-order LSTDQ scales to high-dimensional systems. Finally, the reliance on Gaussian noise models remains a constraint; future iterations may explore how RL can better handle highly non-Gaussian or intermittent disturbances.

Summary updated

BibTeX
@inproceedings{esfahani2021approximate,
  author = {Hossein Nejatbakhsh Esfahani and Arash Bahari Kordabad and Sébastien Gros},
  title = {{Approximate Robust NMPC using Reinforcement Learning}},
  booktitle = {ECC},
  year = {2021},
  doi = {10.23919/ecc54610.2021.9655129},
}
Figure