Nonlinear time-optimal model predictive control (TOMPC) enables highly performant control of constrained systems, but its computational cost prohibits real-time use on fast dynamical systems. Neural network imitation of the TOMPC control law can reduce online computational costs, yet existing work mostly targets quadratic cost formulations in simulation and addresses the challenges of neural controllers in isolation. This work imitates a long-horizon nonconvex TOMPC with hard terminal constraints, whose high computational cost limits training-data generation. We present (i) self-informed sampling (SIFS), a data-efficient expert-sampling strategy that uses a learned time-to-go to query the expert only where the policy deviates from time-optimal behavior, (ii) a complete training and control architecture that jointly addresses dataset correlation, suboptimal expert labels, covariate shift, constraint satisfaction and model mismatch, and (iii) real-world validation on a Furuta pendulum. SIFS matches standard dataset aggregation performance in roughly one-third of the training time and with less than half the training data. The resulting controller matches the region of attraction of the expert TOMPC while raising the control frequency from 1.4Hz to 1kHz. On hardware, the controller swings up and stabilizes the pendulum along trajectories closely matching the expert TOMPC solution.
Figures & tables
Fig. 1: Schematic outline of the proposed integrated architecture. Roman numerals refer to the blocks as introduced in the text.
Fig. 2: Predicted time-to-go (T2G) along a rollout for the expert MPC (red) and a partially trained NNMPC (yellow). While the NNMPC prediction is noisy, it closely follows the expected trend except for the highlighted transition (dashed line), where it jumps to a different trajectory. This deviation indicates suboptimal behavior and identifies the states most informative for expert querying.
Fig. 3: Performance comparison of the expert MPC and NNMPC over 1000 randomly sampled initial states.
Computation time (ms)
Max. reliable
Mean
Std. dev.
Max
freq. (Hz)
MPC
114.165
150.132
732.676
1.36
NNMPC (CPU)
4.839
0.809
10.576
94.6
NNMPC (GPU)
0.409
0.094
0.998
1002
TABLE I: Per-iteration computation time during pendulum swing-up and the resulting maximum reliable control frequency.
Fig. 4: Evolution of the failed trajectory percentage over training iterations, with and without the proposed weighting strategy.
Fig. 5: Training progress of self-informed sampling (SIFS), DAgger, and MC-dropout.
Fig. 6: Each model parameter ( m2 , L1 , b2 , l2 , J^2 ; notation as in [ 30 ] ) was systematically perturbed via p←p⋅(1+δ/2) , where δ denotes the normalized deviation, varying between −1 and 1 . For every parameter setting, 200 rollouts were performed from randomly sampled initial states. Each cell reports the percentage of successful trajectories.
Fig. 7: State and control trajectories of the expert MPC solution, the NNMPC in simulation, and the NNMPC deployed on the physical pendulum. The solid hardware curves show one representative run. The shaded bands show the minimum-to-maximum envelope over four additional hardware reruns.
Fig. 8: Swing-up and stabilization starting from the downward equilibrium. Timestamps correspond to the final frame in each overlaid sequence.
Nonlinear Model Predictive Control requires solving a constrained nonlinear program (NLP) in real-time at every sampling instant, a computational bottleneck that limits deployment on resource-constrained hardware or at high sampling rates. We address this challenge for the broad class of input-affine nonlinear systems to show that the optimal control move can be approximated by a state-dependent quadratic program (QP) whose cost parameters depend on the current state and reference. We propose a single-network residual-corrector architecture: a state-dependent analytic baseline provides initial QP parameters, and the network learns only the corrections needed to match the full NLP solution; the QP is solved by a differentiable interior-point layer, guaranteeing constraint satisfaction for the first control action. The network is trained offline on data generated by an NLP solver using a hybrid loss that combines supervised imitation and KKT-residual penalties. We validate the approach on a three-link planar robotic arm with Cartesian end-effector tracking, demonstrating orders-of-magnitude speedup over the NLP solver while maintaining comparable tracking performance.
Nonlinear model predictive control (NMPC) can be applied to large nonlinear systems with complex objectives while enforcing constraints, but the cost of solving the underlying optimization problems limits real-time application for systems with fast dynamics or many states. Neural networks can reduce this online cost by approximating the control law, but may violate constraints and typically require many precomputed optimizer solutions for training. The learning-based iterative solver for constrained optimization (LISCO) instead learns to predict primal-dual steps toward satisfaction of the Karush-Kuhn-Tucker (KKT) conditions through self-supervised training without precomputed solutions, but its dense, monolithic architecture grows with the prediction horizon. We remove this horizon dependence by exploiting the temporal structure of the problem in the solver architecture, which makes the network size independent of the horizon while leaving the training loss and the solver iteration unchanged. A closed-loop resampling strategy further aligns the training distribution with closed-loop operation at no additional sampling cost. On an economic NMPC benchmark of a CSTR cascade, the proposed solver scales to larger problems than monolithic LISCO and achieves median speedups of up to a factor of four over IPOPT. In closed loop, it achieves comparable control performance to IPOPT with no observed constraint violations.
Lukas Lüken, Sergio Lucia
Chair of Process Automation Systems, TU Dortmund University, Emil-Figge Straße 70, Dortmund, 44227, North Rhine-Westphalia, Germany
Model predictive control is a high-performance control method, but it incurs comparatively high online computational costs across many control tasks and is challenging to realize in low-level hardware settings. To address this, we present a framework for generating neural network controllers that provably inherit the safety and stability guarantees of a robust model predictive policy. In contrast to approaches based on post-verification or additional online safety filters, our method provides constructive, a priori design conditions that ensure preservation of recursive feasibility and stability before deployment. We treat the approximation error as a bounded input disturbance, which is addressed in the MPC design. This allows the neural network controller to directly inherit robustness from the underlying model predictive controller, which enables the transfer of guarantees to the approximation. The design process is an offline, constructive synthesis pipeline and can be implemented once Lipschitz bounds are specified. We further demonstrate in simulation that the learned controller reproduces the closed-loop behavior of the original controller while reducing online computation.
Hendrik Alsmeier, Maik Pfefferkorn, Rolf Findeisen
Control and Cyber-Physical Systems Laboratory, Technical University of Darmstadt, Landgraf-Georg-Str. 4, 64283 Darmstadt, Germany