pith. sign in

arxiv: 2403.18149 · v3 · submitted 2024-03-26 · 💻 cs.RO · cs.SY· eess.SY· math.OC

Code Generation and Conic Constraints for Model-Predictive Control on Microcontrollers with Conic-TinyMPC

Pith reviewed 2026-05-24 02:43 UTC · model grok-4.3

classification 💻 cs.RO cs.SYeess.SYmath.OC
keywords model predictive controlsecond-order conesADMMembedded solverscode generationmicrocontrollersconic constraintsrobotics
0
0 comments X

The pith

Conic-TinyMPC extends an ADMM solver to second-order cones and code generation, delivering 10.6x to 142.7x speedups on embedded QP and SOCP problems while fitting larger instances in microcontroller memory.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

Model-predictive control with conic constraints gives robots more expressive ways to handle limits like friction and thrust, but the added computation has kept it off small hardware. The paper extends the structure-exploiting ADMM method from TinyMPC to second-order cones and adds code generation from Python, MATLAB, and Julia. Benchmarks on microcontrollers show the new solver runs between 10.6 and 142.7 times faster than prior embedded solvers on both quadratic and conic problems. The same memory footprint now holds problems an order of magnitude larger. Hardware tests confirm the solver runs in real time on a 27-gram quadrotor performing trajectory tracking under conic constraints.

Core claim

The central claim is that extending the cached, structure-exploiting ADMM solver to second-order cones, together with automatic C++ code generation, produces an embedded MPC solver whose run time and memory use remain close to the original linear version while supporting the richer constraint class.

What carries the argument

The structure-exploiting ADMM iteration extended to second-order cone constraints, with pre-cached factorizations and cross-language code generation that produces microcontroller-ready C++.

Load-bearing premise

The extension of the structure-exploiting ADMM solver to second-order cones preserves the computational advantages of caching and warm-starting that were key to the original TinyMPC performance on linear problems.

What would settle it

A timing measurement on the target microcontroller for a representative SOCP problem that falls outside the reported 10.6x–142.7x speedup band relative to the same state-of-the-art embedded solvers would falsify the performance claim.

Figures

Figures reproduced from arXiv: 2403.18149 by Brian Plancher, Elakhya Nedumaran, Ishaan Mahajan, Khai Nguyen, Moises Mata, Sam Schoedel, Zachary Manchester.

Figure 1
Figure 1. Figure 1: We demonstrate our solver using a 27 gram nano quadrotor, the [PITH_FULL_IMAGE:figures/full_fig_p001_1.png] view at source ↗
Figure 2
Figure 2. Figure 2: The tree structure of the generated code. The main program is stored [PITH_FULL_IMAGE:figures/full_fig_p004_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: (a) Predictive safety filtering performance comparison between Conic-TinyMPC and OSQP on an STM32F405 Feather board. Top row shows [PITH_FULL_IMAGE:figures/full_fig_p006_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Attitude/thrust vector regulating performance of different controllers [PITH_FULL_IMAGE:figures/full_fig_p007_4.png] view at source ↗
read the original abstract

Model-predictive control (MPC) is a state-of-the-art control method for constrained robotic systems, yet deployment on resource-limited hardware remains difficult. This challenge is magnified by expressive conic constraints, which offer greater modeling power but require significantly more computation than linear alternatives. To address this challenge, we extend recent work developing fast, structure-exploiting, cached solvers for embedded applications based on the Alternating Direction Method of Multipliers (ADMM) to provide support for second-order cones, as well as C++ code generation from Python, MATLAB, and Julia. Microcontroller benchmarks show that our solver provides up to a two-order-of-magnitude speedup, ranging from 10.6x to 142.7x, over state-of-the-art embedded solvers on QP and SOCP problems, and enables us to fit order-of-magnitude larger problems in memory. We validate our solver's deployed performance through simulation and hardware experiments, including trajectory tracking with conic constraints on a 27g Crazyflie quadrotor. Our open-source code is available at https://tinympc.org.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

Summary. The paper extends TinyMPC, a structure-exploiting ADMM solver for embedded MPC, to support second-order cone (SOC) constraints in addition to QP, adds multi-language code generation, and reports microcontroller benchmarks showing 10.6x–142.7x speedups over state-of-the-art embedded solvers on QP/SOCP problems plus the ability to fit larger problems in memory; it includes simulation and hardware validation on a Crazyflie quadrotor with conic constraints.

Significance. If the speedup and memory claims hold after the SOC extension, the result would be significant for enabling more expressive constrained MPC on resource-limited microcontrollers, with direct benefits for small-robot control. Explicit strengths include the open-source release, hardware experiments, and reproducible benchmarks grounded in new QP/SOCP comparisons rather than fitted parameters.

major comments (2)
  1. [Abstract and solver-extension description] The central speedup claim for SOCP instances rests on the ADMM extension preserving caching and warm-starting efficiencies; the manuscript does not isolate the contribution of the SOC projection step versus other factors (baseline solver, scaling), which is load-bearing for the attribution in the abstract.
  2. [Implementation and benchmarks sections] The abstract states the conic extension was performed and benchmarks were run, but provides no details on how the SOC projection is integrated into the cached factorization or warm-start mechanism, leaving the preservation of TinyMPC's original advantages unverified.
minor comments (2)
  1. [Abstract and results] The experimental-setup description is high-level; adding microcontroller model, memory figures, and exact problem dimensions for the SOCP cases would improve reproducibility.
  2. [Results figures/tables] Figure captions and table headers could more explicitly distinguish QP versus SOCP rows to aid quick comparison of the reported speedups.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for the constructive review and recommendation of minor revision. We address the major comments point by point below, agreeing to strengthen the manuscript with additional details and analysis where the comments identify gaps.

read point-by-point responses
  1. Referee: [Abstract and solver-extension description] The central speedup claim for SOCP instances rests on the ADMM extension preserving caching and warm-starting efficiencies; the manuscript does not isolate the contribution of the SOC projection step versus other factors (baseline solver, scaling), which is load-bearing for the attribution in the abstract.

    Authors: We agree that an explicit isolation of the SOC projection's contribution would strengthen the attribution of speedups. The reported speedups (10.6x–142.7x) are measured via direct end-to-end comparisons of the full Conic-TinyMPC solver against state-of-the-art embedded QP/SOCP solvers on identical problem instances, with the structure-exploiting ADMM framework (including caching and warm-starting) extended to cones. However, we will add an ablation or targeted discussion in the revised benchmarks section to separate the projection step's overhead from other factors such as baseline solver choice and problem scaling. revision: yes

  2. Referee: [Implementation and benchmarks sections] The abstract states the conic extension was performed and benchmarks were run, but provides no details on how the SOC projection is integrated into the cached factorization or warm-start mechanism, leaving the preservation of TinyMPC's original advantages unverified.

    Authors: We acknowledge the need for greater implementation transparency. The SOC projection is substituted directly into the existing ADMM residual and update steps without modifying the precomputed factorizations or warm-start vectors from the original TinyMPC QP formulation; this preserves the caching and warm-start efficiencies by design. We will expand the implementation section with a description (including pseudocode) of the integration to explicitly verify this preservation, and we will reference the relevant code in the open-source release. revision: yes

Circularity Check

0 steps flagged

Minor self-citation to prior TinyMPC work; central performance claims from independent benchmarks

full rationale

The paper's core claims rest on new microcontroller benchmarks that directly measure speedups (10.6x–142.7x) and memory usage against state-of-the-art solvers for both QP and SOCP instances. The extension of the ADMM solver to second-order cones is presented as an engineering contribution whose advantages are validated empirically rather than derived from any fitted parameters or self-referential definitions. While the abstract references extending 'recent work' on structure-exploiting ADMM solvers (likely overlapping with prior TinyMPC publications by co-authors), this citation is not load-bearing: the reported performance numbers and code-generation features are grounded in fresh experiments and do not reduce to the prior results by construction. No self-definitional, fitted-input, or uniqueness-theorem patterns appear in the provided text.

Axiom & Free-Parameter Ledger

1 free parameters · 1 axioms · 0 invented entities

The central claim rests on the standard properties of ADMM for convex optimization and the structure of the prior TinyMPC implementation.

free parameters (1)
  • ADMM penalty parameter
    Typical in ADMM implementations, may be tuned for performance but not specified in abstract.
axioms (1)
  • domain assumption The optimization problems are convex and suitable for ADMM
    Required for the convergence and efficiency of the ADMM solver.

pith-pipeline@v0.9.0 · 5761 in / 1173 out tokens · 30833 ms · 2026-05-24T02:43:02.771185+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

51 extracted references · 51 canonical work pages

  1. [1]

    Optimization-based control for dynamic legged robots,

    P. M. Wensing, M. Posa, Y . Hu, A. Escande, N. Mansard, and A. D. Prete, “Optimization-based control for dynamic legged robots,”IEEE Transactions on Robotics, 2024

  2. [2]

    Consensus complementarity control for multicontact mpc,

    A. Aydinoglu, A. Wei, W.-C. Huang, and M. Posa, “Consensus complementarity control for multicontact mpc,”IEEE Transactions on Robotics, vol. 40, pp. 3879–3896, 2024

  3. [3]

    Fast contact-implicit model pre- dictive control,

    S. Le Cleac’h, T. A. Howell, S. Yang, C.-Y . Lee, J. Zhang, A. Bishop, M. Schwager, and Z. Manchester, “Fast contact-implicit model pre- dictive control,”IEEE Transactions on Robotics, 2024

  4. [4]

    Tinympc: Model-predictive control on resource-constrained microcontrollers,

    K. Nguyen, S. Schoedel, A. Alavilli, B. Plancher, and Z. Manch- ester, “Tinympc: Model-predictive control on resource-constrained microcontrollers,” inIEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, May. 2024

  5. [5]

    Tiny robot learning: challenges and directions for machine learning in resource-constrained robots,

    S. M. Neuman, B. Plancher, B. P. Duisterhof, S. Krishnan, C. Banbury, M. Mazumder, S. Prakash, J. Jabbour, A. Faust, G. C. de Croon, and V . Janapa Reddi, “Tiny robot learning: challenges and directions for machine learning in resource-constrained robots,” inIEEE Inter- national Conference on Artificial Intelligence Circuits and Systems (AICAS), 2022

  6. [6]

    Visual-inertial odometry on chip: An algorithm-and-hardware co- design approach,

    Z. Zhang, A. A. Suleiman, L. Carlone, V . Sze, and S. Karaman, “Visual-inertial odometry on chip: An algorithm-and-hardware co- design approach,” 2017

  7. [7]

    Low-level control of a quadrotor with deep model-based reinforcement learning,

    N. O. Lambert, D. S. Drew, J. Yaconelli, S. Levine, R. Calandra, and K. S. Pister, “Low-level control of a quadrotor with deep model-based reinforcement learning,”IEEE Robotics and Automation Letters, 2019

  8. [8]

    Online trajectory generation with distributed model predictive control for multi-robot motion planning,

    C. E. Luis, M. Vukosavljev, and A. P. Schoellig, “Online trajectory generation with distributed model predictive control for multi-robot motion planning,”IEEE Robotics and Automation Letters, 2020

  9. [9]

    Data-driven mpc for quadrotors,

    G. Torrente, E. Kaufmann, P. F ¨ohn, and D. Scaramuzza, “Data-driven mpc for quadrotors,”IEEE Robotics and Automation Letters, 2021

  10. [10]

    Gto- mpc-based target chasing using a quadrotor in cluttered environments,

    L. Xi, X. Wang, L. Jiao, S. Lai, Z. Peng, and B. M. Chen, “Gto- mpc-based target chasing using a quadrotor in cluttered environments,” IEEE Transactions on Industrial Electronics, vol. 69, no. 6, pp. 6026– 6035, 2021

  11. [11]

    Knode-mpc: A knowledge- based data-driven predictive control framework for aerial robots,

    K. Y . Chee, T. Z. Jiahao, and M. A. Hsieh, “Knode-mpc: A knowledge- based data-driven predictive control framework for aerial robots,” IEEE Robotics and Automation Letters, 2022

  12. [12]

    Amswarm: An alter- nating minimization approach for safe motion planning of quadrotor swarms in cluttered environments,

    V . Adajania, S. Zhou, S. Arun, and A. Schoellig, “Amswarm: An alter- nating minimization approach for safe motion planning of quadrotor swarms in cluttered environments,” inIEEE International Conference on Robotics and Automation (ICRA), 2023

  13. [13]

    Warm start of mixed-integer programs for model predictive control of hybrid systems,

    T. Marcucci and R. Tedrake, “Warm start of mixed-integer programs for model predictive control of hybrid systems,”IEEE Transactions on Automatic Control, vol. 66, no. 6, pp. 2433–2448, 2020

  14. [14]

    Mpcgpu: Real-time nonlinear model predictive control through preconditioned conjugate gradient on the gpu,

    E. Adabag, M. Atal, W. Gerard, and B. Plancher, “Mpcgpu: Real-time nonlinear model predictive control through preconditioned conjugate gradient on the gpu,” inIEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, May. 2024

  15. [15]

    Altro-c: A fast solver for conic model-predictive con- trol,

    B. E. Jackson, T. Punnoose, D. Neamati, K. Tracy, R. Jitosho, and Z. Manchester, “Altro-c: A fast solver for conic model-predictive con- trol,” inIEEE International Conference on Robotics and Automation (ICRA), Xi’an, China, May 2021

  16. [16]

    Relu-qp: A gpu-accelerated quadratic programming solver for model-predictive control,

    A. L. Bishop, J. Z. Zhang, S. Gurumurthy, K. Tracy, and Z. Manch- ester, “Relu-qp: A gpu-accelerated quadratic programming solver for model-predictive control,” inIEEE International Conference on Robotics and Automation (ICRA), Yokohama, Japan, May. 2024

  17. [17]

    Applications of second-order cone programming,

    M. S. Lobo, L. Vandenberghe, S. Boyd, and H. Lebret, “Applications of second-order cone programming,”Linear algebra and its applica- tions, vol. 284, no. 1-3, pp. 193–228, 1998

  18. [18]

    Entry trajectory optimization by second- order cone programming,

    X. Liu, Z. Shen, and P. Lu, “Entry trajectory optimization by second- order cone programming,”Journal of Guidance, Control, and Dynam- ics, vol. 39, no. 2, pp. 227–241, 2016

  19. [19]

    Optimal force distribution for the legs of a walking machine with friction cone constraints,

    C. A. Klein and S. Kittivatcharapong, “Optimal force distribution for the legs of a walking machine with friction cone constraints,”IEEE Transactions on Robotics and Automation, 1990

  20. [20]

    Goulart and Y

    P. Goulart and Y . Chen. (2022) Clarabel. [Online]. Available: https://oxfordcontrol.github.io/ClarabelDocs/stable/

  21. [21]

    Cosmo: A conic operator splitting method for large convex problems,

    M. Garstka, M. Cannon, and P. Goulart, “Cosmo: A conic operator splitting method for large convex problems,” inIEEE European Control Conference (ECC), 2019

  22. [22]

    ECOS: An SOCP solver for embedded systems,

    A. Domahidi, E. Chu, and S. Boyd, “ECOS: An SOCP solver for embedded systems,” inIEEE European Control Conference (ECC), 2013

  23. [23]

    ApS,Introducing the MOSEK Optimization Suite 10.1.28, 2024

    M. ApS,Introducing the MOSEK Optimization Suite 10.1.28, 2024. [Online]. Available: https://docs.mosek.com/latest/intro/index.html

  24. [24]

    Osqp: An operator splitting solver for quadratic programs,

    B. Stellato, G. Banjac, P. Goulart, A. Bemporad, and S. Boyd, “Osqp: An operator splitting solver for quadratic programs,”Mathematical Programming Computation, vol. 12, no. 4, pp. 637–672, 2020

  25. [25]

    Conic optimization via operator splitting and homogeneous self-dual embedding,

    B. O’Donoghue, E. Chu, N. Parikh, and S. Boyd, “Conic optimization via operator splitting and homogeneous self-dual embedding,”Journal of Optimization Theory and Applications, vol. 169, no. 3, pp. 1042– 1068, June 2016

  26. [26]

    Forcespro,

    E. AG, “Forcespro,” 2014–2023. [Online]. Available: https://forces. embotech.com/

  27. [27]

    acados – a modular open-source framework for fast embedded optimal control,

    R. Verschueren, G. Frison, D. Kouzoupis, J. Frey, N. van Duijkeren, A. Zanelli, B. Novoselnik, T. Albin, R. Quirynen, and M. Diehl, “acados – a modular open-source framework for fast embedded optimal control,”Mathematical Programming Computation, 2021

  28. [28]

    Hpipm: a high-performance quadratic programming framework for model predictive control,

    G. Frison and M. Diehl, “Hpipm: a high-performance quadratic programming framework for model predictive control,”IFAC- PapersOnLine, vol. 53, no. 2, pp. 6563–6569, 2020

  29. [29]

    Embedded online optimization for model predictive control at megahertz rates,

    J. L. Jerez, P. J. Goulart, S. Richter, G. A. Constantinides, E. C. Kerrigan, and M. Morari, “Embedded online optimization for model predictive control at megahertz rates,”IEEE Transactions on Automatic Control, vol. 59, no. 12, pp. 3238–3251, 2014

  30. [30]

    A splitting method for optimal control,

    B. O’Donoghue, G. Stathopoulos, and S. Boyd, “A splitting method for optimal control,”IEEE Transactions on Control Systems Technology, vol. 21, pp. 2432–2442, 11 2013

  31. [31]

    CVXGEN: A code generator for embed- ded convex optimization,

    J. Mattingley and S. Boyd, “CVXGEN: A code generator for embed- ded convex optimization,” inOptimization Engineering, pp. 1–27

  32. [32]

    Optimal Control,

    F. L. Lewis, D. Vrabie, and V . Syrmos, “Optimal Control,” 1 2012

  33. [33]

    Lossless convexi- fication of nonconvex control bound and pointing constraints of the soft landing optimal control problem,

    B. Ac ¸ıkmes ¸e, J. M. Carson, and L. Blackmore, “Lossless convexi- fication of nonconvex control bound and pointing constraints of the soft landing optimal control problem,”IEEE Transactions on Control Systems Technology, vol. 21, no. 6, pp. 2104–2113, 2013

  34. [34]

    Dynamic locomotion in the mit cheetah 3 through convex model-predictive control,

    J. Di Carlo, P. M. Wensing, B. Katz, G. Bledt, and S. Kim, “Dynamic locomotion in the mit cheetah 3 through convex model-predictive control,” in2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2018, pp. 1–9

  35. [35]

    Model predictive control for autonomous driving based on time scaled collision cone,

    M. Babu, Y . Oza, A. K. Singh, K. M. Krishna, and S. Medasani, “Model predictive control for autonomous driving based on time scaled collision cone,” inIEEE European Control Conference (ECC), 2018

  36. [36]

    Stability and feasibility of state constrained mpc without stabilizing terminal constraints,

    A. Boccia, L. Gr ¨une, and K. Worthmann, “Stability and feasibility of state constrained mpc without stabilizing terminal constraints,” Systems and Control Letters, vol. 72, pp. 14–21, 2014

  37. [37]

    Optimizing model predictive control horizons using genetic algorithm for motion cueing algorithm,

    A. Mohammadi, H. Asadi, S. Mohamed, K. Nelson, and S. Nahavandi, “Optimizing model predictive control horizons using genetic algorithm for motion cueing algorithm,”Expert Systems with Applications, vol. 92, pp. 73–81, 2018

  38. [38]

    Dis- tributed optimization and statistical learning via the alternating di- rection method of multipliers,

    S. Boyd, N. Parikh, E. Chu, B. Peleato, J. Eckstein,et al., “Dis- tributed optimization and statistical learning via the alternating di- rection method of multipliers,”Foundations and Trends® in Machine learning, vol. 3, no. 1, pp. 1–122, 2011

  39. [39]

    Distributed optimization and statistical learning via the alter- nating direction method of multipliers,

    ——, “Distributed optimization and statistical learning via the alter- nating direction method of multipliers,”Foundations and Trends® in Machine learning, vol. 3, no. 1, pp. 1–122, 2011

  40. [40]

    Robust and efficient embedded convex optimization through first-order adaptive caching,

    I. Mahajan and B. Plancher, “Robust and efficient embedded convex optimization through first-order adaptive caching,” inIEEE/RSJ Inter- national Conference on Intelligent Robots and Systems (IROS), 2025

  41. [41]

    Boyd and L

    S. Boyd and L. Vandenberghe,Convex Optimization. Cambridge University Press

  42. [42]

    Crazyflie 2.1,

    Bitcraze, “Crazyflie 2.1,” 2023. [Online]. Available: https://www. bitcraze.io/products/crazyflie-2-1/

  43. [43]

    The safety filter: A unified view of safety-critical control in autonomous systems,

    K.-C. Hsu, H. Hu, and J. F. Fisac, “The safety filter: A unified view of safety-critical control in autonomous systems,”Annual Review of Control, Robotics, and Autonomous Systems, vol. 7, 2023

  44. [44]

    Multi-step model pre- dictive safety filters: Reducing chattering by increasing the prediction horizon,

    F. P. Bejarano, L. Brunke, and A. P. Schoellig, “Multi-step model pre- dictive safety filters: Reducing chattering by increasing the prediction horizon,” inIEEE Conference on Decision and Control (CDC), 2023

  45. [45]

    Embedded code generation with cvxpy,

    M. Schaller, G. Banjac, S. Diamond, A. Agrawal, B. Stellato, and S. Boyd, “Embedded code generation with cvxpy,”IEEE Control Systems Letters, vol. 6, pp. 2653–2658, 2022

  46. [46]

    Teensy® 4.1

    “Teensy® 4.1.” [Online]. Available: https://www.pjrc.com/store/ teensy41.html

  47. [47]

    Nonlinear quadrocopter attitude control,

    D. Brescianini, M. Hehn, and R. D’Andrea, “Nonlinear quadrocopter attitude control,” 2013

  48. [48]

    Minimum snap trajectory generation and control for quadrotors,

    D. Mellinger and V . Kumar, “Minimum snap trajectory generation and control for quadrotors,” inIEEE International Conference on Robotics and Automation (ICRA), 2011

  49. [49]

    Planning with attitude,

    B. E. Jackson, K. Tracy, and Z. Manchester, “Planning with attitude,” IEEE Robotics and Automation Letters, 2021

  50. [50]

    Convex optimization for trajectory generation,

    D. Malyuta, T. P. Reynolds, M. Szmuk, T. Lew, R. Bonalli, M. Pavone, and B. Ac ¸ıkmes ¸e, “Convex optimization for trajectory generation,” IEEE Control Systems Magazine, vol. 42, no. 5, pp. 40–113, 2022

  51. [51]

    State-augmented lin- ear games with antagonistic error for high-dimensional, nonlinear hamilton-jacobi reachability,

    W. Sharpless, Y . T. Chow, and S. Herbert, “State-augmented lin- ear games with antagonistic error for high-dimensional, nonlinear hamilton-jacobi reachability,” inIEEE Conference on Decision and Control (CDC), 2024