Papers
Topics
Authors
Recent
Search
2000 character limit reached

TinySDP: Real-Time SDP for Embedded Robotics

Updated 4 July 2026
  • TinySDP is a semidefinite programming solver for embedded systems that integrates cached-Riccati ADMM methods to solve MPC problems with nonconvex obstacle constraints.
  • It employs semidefinite lifting and efficient 3×3 PSD projections to handle geometric constraints in real time on resource-constrained microcontrollers.
  • An a posteriori rank-1 certification ensures collision-free trajectories, validated through benchmarks including agile quadrotor maneuvers and dynamic obstacle avoidance.

Searching arXiv for TinySDP and directly related papers to ground the article with current citations. arxiv_search(query="TinySDP Real Time Semidefinite Optimization for Certifiable and Agile Edge Robotics", max_results=5, sort_by="relevance") arxiv_search(query="TinyMPC codegen Riccati cached steady-state matrices embedded microcontroller arXiv", max_results=10, sort_by="relevance") arxiv_search(query="site:arxiv.org TinyMPC model predictive control microcontroller", max_results=10, sort_by="relevance") TinySDP is a semidefinite programming solver for embedded systems that targets real-time, certifiable model-predictive control under nonconvex obstacle constraints. It is presented as the first semidefinite programming solver designed for embedded systems, with a formulation that integrates positive-semidefinite cone projections into a cached-Riccati-based ADMM solver and couples the relaxed solution to an a posteriori rank-1 certificate for explicit geometric guarantees at each timestep. The system is evaluated on cul-de-sac and dynamic obstacle avoidance benchmarks and on a Crazyflie quadrotor, where semidefinite constraints are enforced at real-time rates for agile embedded robotics (Mahajan et al., 13 May 2026).

1. Problem class and control formulation

TinySDP is built around a standard finite-horizon linear-MPC problem for a discrete-time LTI system,

xk+1=Axk+Buk,xkRnx,  ukRnu,x_{k+1} = A\,x_k + B\,u_k, \quad x_k\in\mathbb{R}^{n_x},\;u_k\in\mathbb{R}^{n_u},

with quadratic stage and terminal costs,

(xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,

together with box-constraints on the inputs and admissible sets U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\} and X\mathcal X (Mahajan et al., 13 May 2026).

The distinctive difficulty arises from obstacle avoidance. In the planar setting, the controlled position is pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^2, and each obstacle is modeled as a disk with center cjc_j and radius rjr_j. Avoidance is imposed through the quadratic constraint

pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.

These constraints are quadratic but nonconvex. The paper’s central premise is that semidefinite programming provides a principled framework for convex relaxations of such nonconvex geometric constraints, but that conventional solvers are too computationally expensive for real-time control on resource-constrained embedded systems. TinySDP is designed to close that gap by making an SDP relaxation compatible with embedded MPC timing and memory budgets (Mahajan et al., 13 May 2026).

This framing places TinySDP at the intersection of geometric motion planning, convex relaxation, and embedded optimal control. A plausible implication is that the method is intended not merely as an offline planner, but as a receding-horizon controller whose relaxation must be solved repeatedly under severe latency constraints.

2. Semidefinite lifting and convex relaxation

TinySDP introduces lifted moment variables such as

Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,

and defines lifted state and input vectors

xˉk:=[xk vec(Xk)],uˉk:=[uk vec(XUk) vec(UXk) vec(UUk)].\bar x_k := \begin{bmatrix} x_k\ \mathrm{vec}(X_k) \end{bmatrix}, \qquad \bar u_k := \begin{bmatrix} u_k\ \mathrm{vec}(XU_k)\ \mathrm{vec}(UX_k)\ \mathrm{vec}(UU_k) \end{bmatrix}.

Under this construction, the lifted dynamics remain linear,

(xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,0

where (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,1 are built from (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,2, (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,3, and related terms. The quadratic cost also lifts into quadratic form,

(xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,4

with (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,5 and (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,6 (Mahajan et al., 13 May 2026).

A key technical step is that disk-avoidance constraints become affine in the lifted moments:

(xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,7

Consistency between first-order and second-order quantities is relaxed through a per-stage moment matrix,

(xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,8

The resulting optimization problem is an SDP-relaxed MPC problem with linear lifted dynamics, box constraints in the original input coordinates, affine obstacle inequalities in the lifted variables, and PSD constraints on each stage moment matrix (Mahajan et al., 13 May 2026).

The significance of this lifting is structural rather than purely formal. It preserves a stagewise decomposition amenable to MPC-style backward-forward recursions. This suggests that the relaxation was selected not only for convexity, but also for compatibility with solver structure that survives embedding.

3. ADMM solver architecture and Riccati structure

TinySDP solves the relaxed problem with an ADMM decomposition that preserves the stage-wise Riccati structure. The method introduces per-stage slack variables (xk,uk)=xkQxk+ukRuk,f(xN)=xNQfxN,\ell(x_k,u_k)=x_k^\top Q\,x_k+u_k^\top R\,u_k, \qquad \ell_f(x_N)=x_N^\top Q_f\,x_N,9 and scaled dual variables U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}0 for the coupling

U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}1

together with a penalty U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}2 and optional under-relaxation U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}3 (Mahajan et al., 13 May 2026).

The primal update solves

U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}4

subject to the lifted dynamics. Because the augmented term is a convex quadratic in U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}5, the subproblem remains a standard linear-quadratic problem over lifted variables. It is solved by a backward-forward Riccati recursion using cached steady-state matrices U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}6, as in TinyMPC, with

U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}7

where

U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}8

The PSD slack update is a projection onto the positive-semidefinite cone,

U={uminuumax}\mathcal U=\{u_{\min}\le u\le u_{\max}\}9

with

X\mathcal X0

The dual update is

X\mathcal X1

The paper emphasizes that each ADMM iteration therefore requires one Riccati solve, consisting of a backward and forward sweep, plus X\mathcal X2 small PSD projections (Mahajan et al., 13 May 2026). In practical terms, this is the mechanism by which TinySDP differs from general-purpose SDP engines: it exploits repeated MPC structure rather than treating each iterate as a dense cone program.

4. PSD projection routines and embedded tractability

For embedded operation, TinySDP only lifts the 2D position X\mathcal X3, so the relevant moment matrix X\mathcal X4 is X\mathcal X5. The solver exploits this fixed size to implement a dedicated X\mathcal X6 eigen-decomposition, or an analytic closed-form cubic solver, with on-chip stack storage via the X\mathcal X7 packing. Eigenvalues X\mathcal X8 are clamped at zero, the matrix is reassembled, and the result is vectorized in place using only a few dozen floating-point operations and a few hundred bytes of stack (Mahajan et al., 13 May 2026).

The paper states that this specialized routine runs in a few microseconds per projection and is an order of magnitude faster than a general SDP engine. This is one of the principal reasons TinySDP can enforce semidefinite constraints at real-time rates on a microcontroller rather than on a workstation-class processor (Mahajan et al., 13 May 2026).

This implementation detail is central to the system’s identity. A common misconception in discussions of semidefinite optimization for robotics is that the cone projection is intrinsically too expensive for embedded control. TinySDP addresses that concern not by removing the cone constraint, but by restricting the lifted geometry so that the PSD projection becomes extremely small and predictable in cost.

5. A posteriori rank-1 certification and safety guarantees

TinySDP enforces only the PSD condition X\mathcal X9, not an explicit rank-1 constraint. The paper therefore introduces an a posteriori runtime certificate based on the “trace gap” and the “lifted margin” (Mahajan et al., 13 May 2026).

The trace gap is

pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^20

If pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^21, the lifted second moment exactly matches the true physical moment. For obstacle pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^22, the lifted margin is

pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^23

Since the true squared clearance is

pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^24

the paper gives the certificate:

pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^25

Under this condition, collision freedom is guaranteed. If the condition fails, the prescribed fallback is “hover-and-stop” (Mahajan et al., 13 May 2026).

This certification mechanism is important for interpreting the relaxation. The solver’s output is not treated as automatically exact; instead, safety is derived from a runtime test that checks whether the relaxed moments are sufficiently consistent with a rank-1 interpretation. In that sense, TinySDP combines convex relaxation with online verification rather than assuming exactness a priori.

6. Embedded implementation, benchmarks, and demonstrated scope

The embedded implementation is reported on a Crazyflie 2.1 with an STM32F405, 168 MHz processor, and 192 KB SRAM. The MPC horizon is pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^26, and ADMM is capped at pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^27 iterations per control step. The onboard solve time for all pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^28 iterations is pk=CpxkR2p_k=C_p\,x_k\in\mathbb{R}^29 ms, leaving a margin in a cjc_j0 ms control slot and yielding a cjc_j1 Hz update. Flash usage is cjc_j2 KB total, of which PSD routines add cjc_j3 KB; RAM usage is cjc_j4 KB (main+CCM), and PSD projection uses cjc_j5 B of stack. The software stack is based on TinyMPC codegen: offline, it computes and caches Riccati quantities; online, it lifts the state and obstacle parameters, runs the ADMM loop consisting of Riccati updates and projections, and extracts the first cjc_j6 (Mahajan et al., 13 May 2026).

The experimental program includes static, dynamic, three-dimensional, and hardware demonstrations.

Scenario Reported TinySDP outcome Comparator outcomes
Static U-shape cul-de-sac Path cjc_j7 m, Goal cjc_j8 m, Safe RPCBF: cjc_j9 m, rjr_j0 m, Safe; TinyMPC-LIN tuned rjr_j1 m margin: rjr_j2 m, rjr_j3 m, Safe; TinyMPC-LIN rjr_j4 mrjr_j5: collision; TinyMPC-HOCBF: collision
Dynamic moving-gap benchmark rjr_j6 m, rjr_j7 m, Safe RPCBF: rjr_j8 m, rjr_j9 m, Safe; TinyMPC-LIN pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.0 m marginpkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.1: pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.2 m, pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.3 m, Safe; TinyMPC-LIN pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.4 mpkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.5: collision; TinyMPC-HOCBF pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.6 mpkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.7: pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.8 m, pkcj22rj2.\|p_k-c_j\|_2^2 \ge r_j^2.9 m, Safe; TinyMPC-HOCBF Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,0 mPk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,1: collision

In the static cul-de-sac benchmark, zero-margin TinyMPC-LIN and TinyMPC-HOCBF always collide, whereas RPCBF is safe but conservative. TinySDP yields the shortest safe paths and reaches within Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,2 cm of the goal. The paper reports that TinySDP’s paths are Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,3–Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,4 % shorter than RPCBF and Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,5–Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,6 % shorter than tuned TinyMPC-LIN, with near-zero final error (Mahajan et al., 13 May 2026).

In the dynamic moving-gap benchmark, two disks sweep a narrow gap while a static disk blocks the direct path. TinySDP is reported as Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,7 % shorter than RPCBF and Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,8 % shorter than TinyMPC-HOCBF, while achieving tighter terminal accuracy. The benchmark also shows that local methods can succeed or fail depending on margin tuning and timing, whereas TinySDP remains safe in the reported run (Mahajan et al., 13 May 2026).

The paper further extends the method to a 3D spherical setting by lifting Pk=pkpk,Xk=xkxk,XUk=xkuk,P_k = p_k\,p_k^\top,\quad X_k = x_k\,x_k^\top,\quad XU_k = x_k\,u_k^\top,9 to a xˉk:=[xk vec(Xk)],uˉk:=[uk vec(XUk) vec(UXk) vec(UUk)].\bar x_k := \begin{bmatrix} x_k\ \mathrm{vec}(X_k) \end{bmatrix}, \qquad \bar u_k := \begin{bmatrix} u_k\ \mathrm{vec}(XU_k)\ \mathrm{vec}(UX_k)\ \mathrm{vec}(UU_k) \end{bmatrix}.0 moment. Two dynamic 3D scenarios, “Sweeping Barrier” and “Vertical Gate,” are demonstrated in simulation, with certified clearance and nonplanar maneuvers. On hardware, in five independent flights at xˉk:=[xk vec(Xk)],uˉk:=[uk vec(XUk) vec(UXk) vec(UUk)].\bar x_k := \begin{bmatrix} x_k\ \mathrm{vec}(X_k) \end{bmatrix}, \qquad \bar u_k := \begin{bmatrix} u_k\ \mathrm{vec}(XU_k)\ \mathrm{vec}(UX_k)\ \mathrm{vec}(UU_k) \end{bmatrix}.1 Hz, a Crazyflie avoids a horizontally sweeping robotic arm; the rank-1 certificate xˉk:=[xk vec(Xk)],uˉk:=[uk vec(XUk) vec(UXk) vec(UUk)].\bar x_k := \begin{bmatrix} x_k\ \mathrm{vec}(X_k) \end{bmatrix}, \qquad \bar u_k := \begin{bmatrix} u_k\ \mathrm{vec}(XU_k)\ \mathrm{vec}(UX_k)\ \mathrm{vec}(UU_k) \end{bmatrix}.2 holds at every timestep, with no collisions and no fallback engaged (Mahajan et al., 13 May 2026).

Taken together, these results define TinySDP as a certifiable embedded MPC framework whose key innovations are a structured semidefinite lifting that preserves stagewise Riccati structure, an ADMM wrapper that reuses cached Riccati recursions for the primal update and exploits xˉk:=[xk vec(Xk)],uˉk:=[uk vec(XUk) vec(UXk) vec(UUk)].\bar x_k := \begin{bmatrix} x_k\ \mathrm{vec}(X_k) \end{bmatrix}, \qquad \bar u_k := \begin{bmatrix} u_k\ \mathrm{vec}(XU_k)\ \mathrm{vec}(UX_k)\ \mathrm{vec}(UU_k) \end{bmatrix}.3 PSD projections, and a simple trace-gap rank-1 certificate yielding per-timestep collision guarantees. The broader implication is that SDP relaxations, often treated as offline tools, can be specialized into real-time edge-robotics controllers when solver structure, projection size, and runtime certification are co-designed (Mahajan et al., 13 May 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to TinySDP.