RepositoryC++USUnited States
TI

TinyMPC/TinyMPC

Model-predictive control for microcontrollers, ICRA 2024 Best Paper Award

1.1kstars
140forks
12issues
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: admm-algorithm

#1 Repository of the week

2
TINIX TRENDING·Topic: model-predictive-control

#2 Repository of the week

3
TINIX TRENDING·Topic: solver

#3 Repository of the week

TinyMPC: Model-Predictive Control on Resource-Constrained Microcontrollers

If you have any questions related to the solver, visit the GitHub Discussions page. This guarantees accessibility for everyone.

The documentation is available at tinympc.org

High-level language interfaces with detailed examples and code generation are available in Python, Julia, and MATLAB.

Excited to hear your TinyMPC success stories, share them with us!

Building

For Windows - Enable wsl before following prompts below

  1. On terminal, clone this repo
git clone https://github.com/TinyMPC/TinyMPC.git
  1. Navigate to root directory and run
cd TinyMPC && mkdir build && cd build
  1. Run CMake configure step
cmake ..
  1. Build TinyMPC
cmake --build .

Examples

  • Run the quadrotor_hovering example
./examples/quadrotor_hovering
  • Run the codegen_cartpole example then follow the same building steps inside that directory
./examples/codegen_cartpole

Citing TinyMPC

If you are using TinyMPC, we encourage you to

  • Put a star ⭐ on this repository.

  • Cite the related papers:

@inproceedings{tinympc,
      title={TinyMPC: Model-Predictive Control on Resource-Constrained Microcontrollers}, 
      author={Khai Nguyen and Sam Schoedel and Anoushka Alavilli and Brian Plancher and Zachary Manchester},
      booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
      year={2024},
}
@inproceedings{tinympc-adaptive,
      title={Robust and Efficient Embedded Convex Optimization through First-Order Adaptive Caching}, 
      author={Ishaan Mahajan and Brian Plancher},
      booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
      year={2025},
}
@inproceedings{conic-tinympc,
      title={Code Generation and Conic Constraints for Model-Predictive Control on Microcontrollers with Conic-TinyMPC}, 
      author={Ishaan Mahajan and Khai Nguyen and Sam Schoedel and Elakhya Nedumaran and Moises Mata and Brian Plancher and Zachary Manchester},
      booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
      year={2026},
}

Bug reports and support

Please report any issues via the Github issue tracker. All types of issues are welcome including bug reports, documentation typos, feature requests and so on.

Running on MCUs

Numerical benchmarks against other solvers on MCUs are available here.

TinyMPC on the Crazyflie

TinyMPC-integrated firmware on the Crazyflie nano-quadrotor is available here.

TinyMPC-AL

An earlier version (not optimized) which can deal with nonlinear dynamics (e.g., bicycle models) is available here.

Notes

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
idea4good/GuiLite

✔️The smallest header-only GUI library(4 KLOC) for all platforms

7.8k
Oct 22, 2025
RepositoryC
micropython/micropython

MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems

22.2k
Nov 27, 2026
RepositoryC
zephyrproject-rtos/zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.

17.2k
Dec 2, 2026
Repository
nhivp/Awesome-Embedded

A curated list of awesome embedded programming.

9.4k
Oct 10, 2026
RepositoryC
Serial-Studio/Serial-Studio

Open-source telemetry dashboard. Supports UART, BLE, MQTT, Modbus, CAN Bus and more.

7.3k
Nov 29, 2026
RepositoryC
littlefs-project/littlefs

A little fail-safe filesystem designed for microcontrollers

7.0k
Nov 16, 2026
RepositoryRust
tock/tock

A secure embedded operating system for microcontrollers

6.5k
Dec 1, 2026
RepositoryC
alibaba/AliOS-Things

面向IoT领域的、高可伸缩的物联网操作系统,可去官网了解更多信息https://www.aliyun.com/product/aliosthings

4.6k
Jul 4, 2023
RepositoryC
apache/nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)

4.1k
Nov 30, 2026