Equivalency of Optimality Criteria of Markov Decision Process and Model Predictive Control

Arash Bahari Kordabad, Mario Zanon, Sebastien Gros · DOI

Abstract

This research provides a mathematical bridge between Reinforcement Learning (RL) and Model Predictive Control (MPC). It proves that a finite-horizon, undiscounted MPC scheme—even one utilizing an inexact model—can perfectly capture the optimal policy and value function of a discounted Markov Decision Process (MDP) by appropriately adjusting its cost functions. This allows researchers to use MPC as a "structured" function approximator for RL, combining the safety and constraint-handling of control theory with the learning power of RL.

Introduction: Bridging Control and Learning

In the development of autonomous systems, engineers often face a fundamental trade-off. Markov Decision Processes (MDPs) provide a rigorous framework for handling stochastic environments, but they are computationally intensive and typically require a perfect model of the environment. To solve MDPs, the RL community frequently employs Deep Neural Networks (DNNs). While powerful, DNNs are "black boxes," making it difficult to guarantee stability or safety constraints.

Conversely, Model Predictive Control (MPC) is the industry standard for handling constraints and ensuring stability. However, it usually requires a highly accurate deterministic model and does not naturally align with the discounted reward structures common in RL. This paper addresses this gap: Can we use the structured, safe framework of MPC to solve the complex, stochastic problems of MDPs?

Methodology: MPC as a Function Approximator

The authors provide a theoretical proof showing that for any MDP (discounted or undiscounted), there exists an equivalent undiscounted, finite-horizon Optimal Control Problem (OCP). The key technical contributions include:

  1. Cost Modification Theorem: The authors derive a specific method to modify the "stage cost" and "terminal cost" of an MPC scheme. They demonstrate that if these costs are chosen correctly, the MPC will produce the exact same optimal actions as the original MDP, even if the MPC uses a simplified or "wrong" model of the system physics.
  2. Parameterized MPC: Instead of using a DNN to estimate the best action, the authors propose a parameterized MPC scheme where parameters ($\theta$) represent cost weights or model coefficients.
  3. RL Integration: Since the "correct" modified costs are typically unknown, standard RL algorithms (such as Q-learning or Policy Gradient) can be used to tune the MPC parameters. This allows the system to learn how to compensate for model inaccuracies through its cost function.
Error surfaces showing the difference between the learned MPC value/policy and the true MDP optimal values across the state space for various parameterizations.

Key Insights

  • Model Mismatch as a Feature: A surprising insight is that the MPC model does not need to be perfect. The modified cost function acts as a buffer, absorbing model errors. If the model is slightly inaccurate, the RL agent learns a cost function that steers the system back to the true optimal path.
  • Stability via Undiscounted Math: Discounted RL can sometimes lead to stability issues. By solving these problems using undiscounted MPC, engineers can leverage established control theory tools to guarantee system stability.
  • Structural Efficiency: Unlike DNNs, which learn from scratch, parameterized MPC incorporates "physics." This often results in fewer parameters and greater data efficiency.

Experimental Results

The theory was validated using several benchmarks, including the Linear Quadratic Regulator (LQR), an Optimal Investment Problem, and a Stochastic Inverted Pendulum.

  • Perfect Matching: In the LQR and Investment examples, the tuned MPC policy matched the ground truth optimal policy perfectly. As shown in the comparison plots, the MPC-derived value function and policy overlap exactly with the MDP optima.
  • Learning Convergence: In the inverted pendulum simulation, an RL-tuned MPC successfully learned to balance the pole despite starting with an incorrect model of the pendulum's length. After 500 learning steps, the difference between the MPC's performance and the true optimal solution dropped to near zero.
  • Constraint Handling: The system learned to respect state constraints that were initially violated before the learning process began.
Comparison of the optimal value function $V^*(s)$ and policy $\pi^*(s)$ with their MPC-based approximations $\hat{V}_N^*(s)$ and $\hat{\pi}_N^*(s)$, demonstrating perfect matching.

Limitations and Future Work

While promising, the approach has limitations. Solving an MPC optimization problem at every time step is computationally more expensive than a neural network forward pass, which may limit its use in high-speed systems. Additionally, while the theory guarantees a proper cost function exists, it may not always be representable by a simple (e.g., quadratic) function. Future work will explore robust MPC formulations and scaling to higher-dimensional systems.

Summary updated

BibTeX
@article{kordabad2024equivalency,
  author = {Arash Bahari Kordabad and Mario Zanon and Sebastien Gros},
  title = {{Equivalency of Optimality Criteria of Markov Decision Process and Model Predictive Control}},
  journal = {IEEE Trans. Automatic Control},
  year = {2024},
  doi = {10.1109/tac.2023.3277309},
}
Figure