TinySDP: Real-Time SDP for Embedded Robotics
- 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,
with quadratic stage and terminal costs,
together with box-constraints on the inputs and admissible sets and (Mahajan et al., 13 May 2026).
The distinctive difficulty arises from obstacle avoidance. In the planar setting, the controlled position is , and each obstacle is modeled as a disk with center and radius . Avoidance is imposed through the quadratic constraint
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
and defines lifted state and input vectors
Under this construction, the lifted dynamics remain linear,
0
where 1 are built from 2, 3, and related terms. The quadratic cost also lifts into quadratic form,
4
with 5 and 6 (Mahajan et al., 13 May 2026).
A key technical step is that disk-avoidance constraints become affine in the lifted moments:
7
Consistency between first-order and second-order quantities is relaxed through a per-stage moment matrix,
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 9 and scaled dual variables 0 for the coupling
1
together with a penalty 2 and optional under-relaxation 3 (Mahajan et al., 13 May 2026).
The primal update solves
4
subject to the lifted dynamics. Because the augmented term is a convex quadratic in 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 6, as in TinyMPC, with
7
where
8
The PSD slack update is a projection onto the positive-semidefinite cone,
9
with
0
The dual update is
1
The paper emphasizes that each ADMM iteration therefore requires one Riccati solve, consisting of a backward and forward sweep, plus 2 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 3, so the relevant moment matrix 4 is 5. The solver exploits this fixed size to implement a dedicated 6 eigen-decomposition, or an analytic closed-form cubic solver, with on-chip stack storage via the 7 packing. Eigenvalues 8 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 9, 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
0
If 1, the lifted second moment exactly matches the true physical moment. For obstacle 2, the lifted margin is
3
Since the true squared clearance is
4
the paper gives the certificate:
5
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 6, and ADMM is capped at 7 iterations per control step. The onboard solve time for all 8 iterations is 9 ms, leaving a margin in a 0 ms control slot and yielding a 1 Hz update. Flash usage is 2 KB total, of which PSD routines add 3 KB; RAM usage is 4 KB (main+CCM), and PSD projection uses 5 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 6 (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 7 m, Goal 8 m, Safe | RPCBF: 9 m, 0 m, Safe; TinyMPC-LIN tuned 1 m margin: 2 m, 3 m, Safe; TinyMPC-LIN 4 m5: collision; TinyMPC-HOCBF: collision |
| Dynamic moving-gap benchmark | 6 m, 7 m, Safe | RPCBF: 8 m, 9 m, Safe; TinyMPC-LIN 0 m margin1: 2 m, 3 m, Safe; TinyMPC-LIN 4 m5: collision; TinyMPC-HOCBF 6 m7: 8 m, 9 m, Safe; TinyMPC-HOCBF 0 m1: 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 2 cm of the goal. The paper reports that TinySDP’s paths are 3–4 % shorter than RPCBF and 5–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 7 % shorter than RPCBF and 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 9 to a 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 1 Hz, a Crazyflie avoids a horizontally sweeping robotic arm; the rank-1 certificate 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 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).