Source-linked AI summary

Large Scale Model Predictive Control with Neural Networks and Primal Active Sets

Steven W. Chen, Tianyu Wang, Nikolay Atanasov, Vijay Kumar, Manfred Morari

arXiv:1910.10835v2cs.LGcs.SYeess.SYmath.OCstat.ML

TL;DR

Explicit MPC had not been demonstrated at the problem sizes handled by implicit MPC, a gap made pressing by robotics’ millisecond computation budgets. The paper combines an offline neural network with online primal active-set correction and reports a 2× online inference-time reduction against the best benchmark method on a system with thousands of optimization variables.

  • Problem

    Explicit MPC had not been shown to scale to problem sizes handled by implicit MPC, while robotics reduces available computation time from hours to milliseconds.

    Source: §1 · pp. 1–2
  • Method

    An offline-trained neural network approximates the explicit MPC law, and an online primal active-set solver corrects its output using a primal-dual training approach.

    Source: §1 · p. 2, §7 · p. 9
  • Results

    2× reduction in online inference time versus the best benchmark method is reported on a system with thousands of optimization variables.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Neural-network approximations of MPC control laws are demonstrated at scales with thousands of optimization variables, alongside deterministic guarantees on recursive feasibility and asymptotic stability.

    Source: §1 · p. 2

    The guarantees assume a stabilizable system and, in the theorem, a control-invariant terminal set and a terminal cost that is a control Lyapunov function over it.

    Source: §2 · p. 2, §4 · p. 4

Abstract

from arXiv · show

This work presents an explicit-implicit procedure to compute a model predictive control (MPC) law with guarantees on recursive feasibility and asymptotic stability. The approach combines an offline-trained fully-connected neural network with an online primal active set solver. The neural network provides a control input initialization while the primal active set method ensures recursive feasibility and asymptotic stability. The neural network is trained with a primal-dual loss function, aiming to generate control sequences that are primal feasible and meet a desired level of suboptimality. Since the neural network alone does not guarantee constraint satisfaction, its output is used to warm start the primal active set method online. We demonstrate that this approach scales to large problems with thousands of optimization variables, which are challenging for current approaches. Our method achieves a 2x reduction in online inference time compared to the best method in a benchmark suite of different solver and initialization strategies.

1 Introduction

The paper addresses the scaling gap between explicit MPC and implicit methods, especially as robotics reduces available computation time. It combines a neural-network approximation with online optimization and introduces high-dimensional training-data generation.

  • Explicit MPC had not been shown to scale to problem sizes handled by implicit MPC, while robotics cuts available computation time from hours to milliseconds.Source: §1 · pp. 1–2
  • A ReLU fully connected network approximates the piecewise-affine explicit MPC law, with online QP corrections providing deterministic recursive-feasibility and asymptotic-stability guarantees.Source: §1 · p. 2
  • Geometric random walks generate feasible training data in high dimensions, where rejection sampling success diminishes as constraints and dimensions grow.The paper notes that existing gridding and random-sampling methods do not scale to high dimensions.Source: §1 · p. 2
  • 2× reduction in online inference time versus the best benchmark method is reported on a system with thousands of optimization variables.Source: §1 · p. 2

2 Preliminaries

The preliminaries formulate receding-horizon control as a constrained finite-horizon optimization problem, then connect its batch QP, feasibility and duality, and closed-loop guarantees.

2 Preliminaries

  • For a stabilizable discrete-time LTI system with state and input constraints, RHC repeatedly solves constrained finite-horizon control and applies only the first input.Source: §2 · p. 2

2.1 Batch Formulation

  • The fixed-state batch problem is a QP in decision vector z; a common terminal cost is Riccati P∞, with a maximal positively invariant LQR set as Xf, computable even for large systems.Source: §2.1 · p. 3

2.2 Feasibility and Duality

  • With Q and P positive definite, the QP is strictly convex; X0 is the feasible parameter set, and strong duality gives a suboptimality upper bound for feasible primal-dual pairs.Source: §2.2 · p. 3

2.3 Receding Horizon Control

  • A planner maps x to z, while its RHC applies z’s first input; open-loop primal feasibility alone does not ensure recursive feasibility, which is necessary but insufficient for asymptotic stability.Source: §2.3 · p. 3

3 Explicit Control Policy Approximation

The section trains a ReLU network to approximate the full primal prediction over the planning horizon, then uses a primal-dual-informed loss to learn an explicit MPC approximation. The network prediction can be refined online to obtain guarantees.

3 Explicit Control Policy Approximation

  • The network approximates the full primal prediction over the planning horizon, rather than only the control law, so its additional predicted variables can support online guarantees.The prediction has N(n + m) variables rather than m.Source: §3 · p. 3
  • A ReLU network is used because piecewise-affine functions on polyhedra, including mp-QP solutions, can be represented exactly by a sufficiently expressive ReLU network.Source: §3 · p. 4
  • Training uses optimal primal and dual variables, stochastic gradient descent, mini-batches, and backpropagation to update the network parameters.Source: §3 · p. 4
  • The proposed loss measures Lagrangian-value discrepancy using optimal primal and dual variables, unlike least-squares loss, which does not explicitly account for constraints.Source: §3 · p. 4

4 Primal Active Set Method for Guarantees

The controller begins with a neural-network primal prediction and uses an online primal active-set solver to meet feasibility and suboptimality conditions. Under the stated theorem assumptions, the resulting receding-horizon controller is recursively feasible and asymptotically stable.

4 Primal Active Set Method for Guarantees

  • Under the theorem's assumptions, a primal-feasible planner satisfying the stated suboptimality condition yields a recursively feasible, asymptotically stable controller with domain of attraction X0.The assumptions include a control-invariant terminal set and a terminal cost that is a control Lyapunov function over that set.Source: §4 · p. 4

4.1 Obtaining a Suboptimality Certificate

  • The certificate uses a feasible duality gap as γ(x), checking whether it is no greater than x^TQx once the prediction is primal feasible.Source: §4.1 · p. 4
  • The method derives dual variables from active constraints using KKT conditions, then enforces dual feasibility by replacing negative inequality multipliers with zero.Source: §4.1 · pp. 4–5

4.2 Ensuring Feasibility and Bounded Suboptimality with an Online Primal Active Set Solver

  • The online solver uses Phase I to obtain primal feasibility, then Phase II preserves feasibility while updating the solution until the suboptimality certificate is met.Phase II can stop before optimality; the network prediction provides a warm start, and early termination reduces final iterations.Source: §4.2 · p. 5
  • The planner terminates in finite time for strictly convex QPs, and Theorem 4 supplies recursive-feasibility and asymptotic-stability guarantees for its receding-horizon controller.Source: §4.2 · p. 5

5 Scaling to Large Systems

The section addresses the difficulty of sampling feasible initial states for large systems and long planning horizons. It proposes a geometric random walk to generate feasible training data and separates generated data into training, buffer, and test sets.

5 Scaling to Large Systems

  • Poor network approximation may require many online Phase I and Phase II iterations, while training data pair feasible initial states with QP-optimal solutions.Source: §5 · p. 5
  • The feasible initial-state set cannot be represented explicitly, making sampling difficult for high-dimensional systems with long planning horizons.Source: §5 · p. 5
  • Uniform rejection sampling becomes impractical as dimension and constraint counts grow because the probability of drawing a feasible state decreases quickly.Source: §5 · p. 5
  • A geometric random walk generates new feasible samples from previously successful states by stepping along random chords and checking QP feasibility at each candidate state.Random goal states are selected using a Sobol sequence.Source: §5 · p. 5
  • The generated data set is divided into training, buffer, and test sets; the buffer prevents overlap in seed and goal points between the training and test sets.Source: §5 · p. 6

6 Evaluation

The evaluation tests the approach on four systems of increasing complexity, including a high-dimensional oscillating-masses system. It reports faster inference with neural-network warm starts and early termination, alongside efficient generation of large feasible-state datasets.

6.1 System Descriptions

  • The experiments cover four systems of increasing complexity, including a quadrotor, oscillating masses, and a scaled high-dimensional oscillating-masses system.The problem specifications include state, control, and horizon dimensions, constraint counts, and primal and dual variable dimensions.Source: §6 · p. 6, §6.1 · p. 7, Figure 3 · p. 7

6 Evaluation

  • The evaluation uses MPT3 for terminal costs and constraints, TensorFlow for network training and evaluation, and SQOPT for primal active-set iterations.Online inference speed is evaluated on an i7-7700K CPU and a GeForce GTX 1080 Ti GPU.Source: §6 · p. 6
  • The neural networks are trained for 100 epochs with the Lagrangian loss and Adam; validation samples evaluate training loss but do not update network weights.Network depths were chosen using prior techniques and widths by trial and error; the validation split uses 2.5–10% of training samples, depending on the system.Source: §6 · p. 6

6.2 Data Generation

  • The geometric random walk generated 1.7 million feasible Sys. 4 states in 5.2 hours, while rejection sampling would take 2.5 years for 1 million.Rejection-sampling success rates fall from 98.6% for Sys. 1 to 0.4% for Sys. 4.Source: §6.2 · p. 7

6.3 Open-loop Metrics

  • On Sys. 4, NN open-loop suboptimality is 4.9% with p.f. alone and 3.5% with p.f. + sub., versus 192.9% and 6.3% for Cold starts.For the NN warm start, online iterations mainly satisfy primal feasibility; the network prediction is already a good guess of the optimal solution.Source: §6.3 · p. 7
  • On Sys. 4, NN p.f. + sub. reduces required iterations 58× versus Cold optimal; early termination reduces iterations 14.4× with NN starts versus 1.3× with Cold starts.The open-loop comparisons use independent test states, and baseline methods are initialized from Cold starts.Source: §6.3 · p. 7, Figure 5 · p. 8

6.4 Closed-loop Metrics

  • On Sys. 4, NN warm starts achieve a 2× speedup over Hot p.f. + sub. and a 3.6× speedup over Hot optimal across closed-loop trajectories.NN early termination reduces inference time 12.9× versus optimal, compared with 2.2× for Hot starts.Source: Figure 6 · p. 8, §6.4 · p. 9
  • Closed-loop σcl is 8.8% for NN p.f. + sub. versus 0.6% for Hot p.f. + sub.; the authors frame the method around fast inference with feasibility and stability guarantees, not optimality.The experiments use 128 initial states sampled from the test set and apply each method's first control at each step.Source: §6.4 · p. 9

7 Conclusion

The paper combines an offline neural network with an online primal active-set solver and introduces geometric random-walk data generation for large problems. The resulting receding-horizon controller retains recursive-feasibility and asymptotic-stability guarantees while achieving a 2× speedup over the best benchmark on a system with thousands of optimization variables.

7 Conclusion

  • The hybrid receding-horizon controller combines an offline-trained neural network with an online primal active-set solver and achieves a 2× speedup over the best benchmark on a system with thousands of optimization variables.The reported controller retains guarantees on recursive feasibility and asymptotic stability.Source: §7 · p. 9
  • A primal-dual Lagrangian loss trains the network, while primal-variable predictions support certificates of primal feasibility and suboptimality.Those criteria are used to guarantee recursive feasibility and asymptotic stability.Source: §7 · p. 9
  • A geometric random-walk algorithm efficiently generates large datasets for high-dimensional problems by selecting training points in a convex set defined by a membership oracle.The paper identifies this data-generation challenge as important to obtaining a scalable solution.Source: §7 · p. 9
Loading 1910.10835v2…