# Inside TinyMPC

Our 2024 ICRA submission video provides a concise overview of the solver:

## Problem formulation

TinyMPC solves convex quadratic model-predictive control programs of the form

where \(x_k \in \mathbb{R}^n\), \(u_k \in \mathbb{R}^m\) are the state and control input at time step \(k\), \(N\) is the number of time steps (also referred to as the horizon), \(A \in \mathbb{R}^{n \times n}\) and \(B \in \mathbb{R}^{n \times m}\) define the system dynamics, \(Q \succeq 0\), \(R \succ 0\), and \(Q_f \succeq 0\) are symmetric cost weight matrices and \(\bar{x}_k\) and \(\bar{u}_k\) are state and input reference trajectories. Constrains include state and input lower and upper bounds and second-order cones \(\mathcal{K}\).

## Algorithm

Will be provided soon! Meanwhile, check out our papers or background for more details.

## Implementations

The TinyMPC library offers a C++ implementation of the algorithm mentioned above, along with interfaces to several high-level languages. This integration allows these languages to seamlessly solve optimal control problems using TinyMPC.

There are also several community-developed implementations of this algorithm: Rust

Numerical benchmarks against other solvers on microcontrollers are available at this repository.

Crazyflie firmware with TinyMPC is available at this repository.