Recurrent Model Predictive Control: Learning an Explicit Recurrent Controller for Nonlinear Systems

Zhengyu Liu, Jingliang Duan, Wenxuan Wang, Shengbo Eben Li, Yuming Yin, Ziyu Lin, Bo Cheng

Abstract Model Predictive Control (MPC) is a cornerstone of modern control theory, offering optimal decision-making by predicting future system states. However, its high computational demand often limits its application in real-time nonlinear systems. This paper introduces Recurrent Model Predictive Control (RMPC), an offline learning framework that approximates the optimal control policy using a recurrent neural network. By linking the network's recurrent cycles directly to the prediction horizon, RMPC facilitates adaptive computation, enabling robots to adjust their "foresight" based on available processing power. Evaluated on high-fidelity simulations and real-world robotic platforms, RMPC achieves a 5.5x speedup over industry-standard solvers while delivering superior tracking performance.

Introduction

The control of complex nonlinear systems typically relies on Model Predictive Control (MPC), which solves an optimization problem at each time step to determine the best sequence of actions. Despite its efficacy, MPC faces a significant hurdle: the online computational cost. Engineers are often forced to choose between slow, high-accuracy online solvers that risk missing real-time deadlines, and explicit MPC, which pre-calculates solutions but struggles to scale beyond simple linear models. Furthermore, traditional MPC uses a fixed prediction horizon, lacking the flexibility to adapt to varying computational resources or battery levels.

Methodology

RMPC addresses these challenges by employing a Recurrent Neural Network (RNN), specifically a Gated Recurrent Unit (GRU) variant, to learn an explicit control policy offline. The fundamental innovation lies in the design of the recurrence: the output of the network after $N$ cycles is trained to correspond to the solution of an $N$-step MPC problem. This creates a direct mapping between computation time and the controller's prediction horizon.

Figure 4: The RMPC framework unrolls recurrent cycles to match the prediction horizon, where each cycle contributes to a more refined predictive trajectory.

The training process utilizes a Bellman-based loss function. Rather than simple imitation learning, the authors decompose the MPC cost function using Bellman’s principle of optimality and minimize it directly via policy gradient methods. This allows the network to learn the underlying structure of the optimal control problem.

Results and Discussion

The framework was validated using the CarSim simulator for vehicle dynamics and an IDRIVERPLUS four-wheeled robot for real-world verification. A key advantage of RMPC is its capacity for adaptive computation. As illustrated in Figure 3, the controller can terminate at any recurrent cycle $k$. If computing resources are constrained, the system can utilize a shorter horizon for a quick response; when resources are abundant, it can run more cycles for a more optimal, long-range plan.

Figure 3: Adaptive computation in RMPC allows the number of recurrent cycles (k) to scale with available computing resources within a fixed time interval T.

Performance benchmarks show that for a 15-step horizon, RMPC requires only 4.7ms per step, compared to 26.2ms for the IPOPT solver—a 5.5x improvement in speed. Accuracy remains high, with policy errors dropping below 2% for horizons greater than five steps. Remarkably, in real-world tests, RMPC outperformed traditional solvers in tracking accuracy, reducing error by 56.2% in short-horizon (3-step) scenarios.

Conclusion

RMPC provides a robust, high-speed alternative to traditional MPC for nonlinear systems. While current iterations do not explicitly handle state constraints (e.g., obstacle avoidance), future work aims to integrate constrained policy optimization and establish formal stability guarantees. The success of RMPC on physical hardware suggests it is a viable path forward for resource-constrained robotic applications.

Summary updated

BibTeX
@article{liu2022recurrent,
  author = {Zhengyu Liu and Jingliang Duan and Wenxuan Wang and Shengbo Eben Li and Yuming Yin and Ziyu Lin and Bo Cheng},
  title = {{Recurrent Model Predictive Control: Learning an Explicit Recurrent Controller for Nonlinear Systems}},
  journal = {IEEE Trans. Industrial Electronics},
  year = {2022},
  doi = {10.1109/tie.2022.3153800},
}
Figure