Skip to main content
QUICK REVIEW

[Paper Review] On Training and Evaluation of Neural Network Approaches for Model Predictive Control

Rebecka Winqvist, Arun Venkitaraman|arXiv (Cornell University)|May 8, 2020
Advanced Control Systems OptimizationEngineering24 references5 citations
TL;DR

This paper proposes a systematic framework for training and evaluating neural network-based Model Predictive Control (MPC) using constrained deep networks with differentiable optimization layers. By integrating explicit MPC constraints via a differentiable projection layer and employing a hit-and-run sampler for efficient high-dimensional input sampling, the approach achieves stable, feasible control laws with improved generalization over black-box networks, as validated through NMSE and control cost metrics on 2D and 4D systems.

ABSTRACT

The contribution of this paper is a framework for training and evaluation of Model Predictive Control (MPC) implemented using constrained neural networks. Recent studies have proposed to use neural networks with differentiable convex optimization layers to implement model predictive controllers. The motivation is to replace real-time optimization in safety critical feedback control systems with learnt mappings in the form of neural networks with optimization layers. Such mappings take as the input the state vector and predict the control law as the output. The learning takes place using training data generated from off-line MPC simulations. However, a general framework for characterization of learning approaches in terms of both model validation and efficient training data generation is lacking in literature. In this paper, we take the first steps towards developing such a coherent framework. We discuss how the learning problem has similarities with system identification, in particular input design, model structure selection and model validation. We consider the study of neural network architectures in PyTorch with the explicit MPC constraints implemented as a differentiable optimization layer using CVXPY. We propose an efficient approach of generating MPC input samples subject to the MPC model constraints using a hit-and-run sampler. The corresponding true outputs are generated by solving the MPC offline using OSOP. We propose different metrics to validate the resulting approaches. Our study further aims to explore the advantages of incorporating domain knowledge into the network structure from a training and evaluation perspective. Different model structures are numerically tested using the proposed framework in order to obtain more insights in the properties of constrained neural networks based MPC.

Motivation & Objective

  • To develop a standardized, systematic framework for training and evaluating neural network-based MPC approaches.
  • To address the lack of consistent methods for data generation, model validation, and performance evaluation in learning-based MPC.
  • To explore how incorporating domain knowledge—specifically MPC constraints—into neural network architecture improves learning and control performance.
  • To compare structure-aware neural networks (with embedded constraints) against black-box architectures in terms of accuracy, stability, and generalization.
  • To enable efficient, scalable training data generation for high-dimensional state spaces using statistical sampling techniques.

Proposed method

  • Implement MPC constraints as a differentiable projection layer using CVXPY within a PyTorch-based neural network framework.
  • Use a hit-and-run sampler to efficiently generate training data from the invariant set 𝒞∞, enabling uniform coverage in high-dimensional state spaces.
  • Generate true optimal control inputs via off-line solution of the MPC problem using OSQP, ensuring ground-truth labels for training.
  • Train ReLU-based neural networks to map state (and optionally model parameters) to control inputs, with the projection layer enforcing recursive feasibility.
  • Evaluate performance using normalized mean squared error (NMSE) on test data and normalized control cost over closed-loop trajectories.
  • Apply gradient-based input design and analysis to improve data efficiency and model robustness.

Experimental results

Research questions

  • RQ1How can a consistent framework for training and evaluating neural network-based MPC be established, considering data generation, model structure, and validation?
  • RQ2What is the impact of embedding explicit MPC constraints (via a differentiable projection layer) on the generalization and stability of the learned control policy?
  • RQ3How does the performance of a structure-aware neural network (with constraint-aware architecture) compare to a black-box network in terms of NMSE and control cost?
  • RQ4What is the most efficient and statistically sound method for generating training data in high-dimensional state spaces for MPC?
  • RQ5Can gradient information from the MPC mapping be leveraged to improve input sampling and model training efficiency?

Key findings

  • The hit-and-run sampler enables efficient and uniform sampling of the invariant set 𝒞∞, even in high-dimensional systems, outperforming grid-based methods in scalability.
  • Neural networks with embedded differentiable projection layers achieve significantly lower NMSE (e.g., 10–20% reduction) compared to black-box networks, especially with limited training data.
  • Control laws learned with constraint-aware architectures exhibit lower normalized control costs (Jₙ) across 500–1000 trajectories, indicating better closed-loop performance.
  • The inclusion of MPC constraints in the network structure ensures recursive feasibility and asymptotic stability, which are not guaranteed in black-box models.
  • Training data generation is more computationally intensive than network training, highlighting the need for efficient sampling strategies like hit-and-run.
  • The framework demonstrates a clear trade-off between training data size and approximation accuracy, with performance saturating beyond ~7000 samples in the 4D example.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.