wikillm

Paper · 2025-10-17 · cs.RO

Real-Time QP Solvers: A Concise Review and Practical Guide Towards Legged Robots

Review and selection guide for real-time convex QP solvers in legged-robot MPC and whole-body control. Compares four solver families (active-set, interior-point, operator-splitting, augmented Lagrangian) and code generation, mapped to problem structure. No new experiments; benchmark results are relayed. Guidance: structured IPM (HPIPM) for long-horizon MPC, dense active-set or ProxQP for WBC.

Quadratic programmingActive-set methodInterior-point methodModel predictive control (MPC)optimizationquadratic-programminglegged-robotsmodel-predictive-controlwhole-body-control

arXivPDFMarkdown10 min read

AI-compiled by claude-haiku-5-5 on 2026-10-25, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Legged robots solve many small optimisation problems every second to decide how to move: where to step, how hard to push on each joint, and how to stay within limits such as friction and motor torque. A common type of problem for this is called a quadratic program (QP). Several software libraries solve QPs, and they work in very different ways.

This paper is a guide to those libraries. It explains the main ways a QP solver can work, sorts the popular solvers into those families, and collects published timing comparisons. Its practical message is that no single solver wins everywhere. A solver that suits a long, structured planning problem can be a poor fit for a short, dense, high-frequency control loop. The paper also points out that energy use on battery-powered robots matters as much as speed.

TL;DR

  • A review of convex QP solvers for real-time legged-robot control, covering four algorithm families and code generation §2.
  • It runs no new experiments of its own. Benchmark claims come from prior work and from its own figure §3.
  • Guidance: a structure-exploiting interior-point solver (HPIPM) for long-horizon MPC; dense active-set solvers or ProxQP for high-rate whole-body control §4.
  • Its selection tables are qualitative judgements by the authors, not measurements tab. 1 tab. 2.
  • Use the paper as a map of solver families, then check the cited benchmarks before choosing.

Problem

Model Predictive Control (MPC) and Whole-Body Control (WBC) on legged robots both reduce to QPs that must be solved within tight time and energy budgets §1. MPC yields sparse QPs with optimal-control structure, often over long horizons. WBC yields small-to-medium dense QPs solved at high rates, which the paper gives as 100 to 1000 Hz §1. Solver speed, memory, numerical robustness and warm-starting decide whether the control loop stays feasible §1.

The paper's concern is that most earlier comparisons report solve time and accuracy, but not energy per solve §1. It proposes the metric Solve Frequency per Watt (SFPW) for this, attributing it to prior work §1.

Assumptions: the paper treats the QP as convex, with a positive semi-definite quadratic term §2. It does not treat nonconvex or mixed-integer problems.

Method

The paper is a review, so this section restates its formulations and its solver taxonomy. Notation: n decision variables, n_e equality constraints, n_i inequality constraints §2.

1. Standard convex QP. The paper writes the target form as \min \tfrac12 x^\top H x + q^\top x subject to Ax = b and Cx \le u §2. It uses q for the linear term so that g(\cdot) keeps its meaning as the nonlinear inequality function §2.

2. SQP subproblem. Sequential Quadratic Programming (SQP) solves a nonlinear program by repeatedly solving a QP built around the current iterate x_k §2. The mapping is H = B_k, q = \nabla f(x_k), A = J_h(x_k), b = -h(x_k), C = J_g(x_k), u = -g(x_k), with decision variable x \equiv d §2. B_k approximates the Hessian of the Lagrangian §2. The paper does not say how B_k is formed.

Pseudocode
# SQP subproblem as a standard convex QP  [§2]
# Input:  B_k (n, n); grad_f (n,); jac_h (n_e, n); h (n_e,);
#         jac_g (n_i, n); g (n_i,)
# Output: H, q, A, b, C, u for min 1/2 x'Hx + q'x, Ax = b, Cx <= u

def sqp_to_qp(B_k, grad_f, jac_h, h, jac_g, g):
    # Quadratic term: approximate Hessian of the Lagrangian  [§2]
    H = B_k
    # Linear term: objective gradient at the current iterate  [§2]
    q = grad_f
    # Equality rows: constraint Jacobian, negated residual  [§2]
    A = jac_h
    b = -h
    # Inequality rows: constraint Jacobian, negated residual  [§2]
    C = jac_g
    u = -g
    return H, q, A, b, C, u

3. Equality-only case. With only equalities, the paper solves the KKT linear system for x^* and the multipliers \lambda^* §2, eq. 1:

\begin{bmatrix} H & A^\top \\ A & 0 \end{bmatrix} \begin{bmatrix} x^* \\ \lambda^* \end{bmatrix} = \begin{bmatrix} -q \\ b \end{bmatrix} §2, eq. 1

4. Active-set methods. These guess the set of tight inequalities \mathcal{A} and solve an equality-constrained subproblem on that set [§2, eq. 2]. They warm-start well when the active set changes slowly, and their timing can jitter when it switches §2 tab. 1. Solvers named: qpOASES, Eiquadprog, qpmad, DAQP §2.

5. Interior-point methods. A logarithmic barrier keeps iterates strictly inside Cx < u. The paper writes the barrier problem with parameter \mu > 0 §2, eq. 3:

\min_x \tfrac12 x^\top H x + q^\top x - \mu \sum_{i=1}^{n_i} \log\!\bigl(u_i - (Cx)_i\bigr) \quad \text{s.t.} \quad Ax = b §2, eq. 3

Named solvers: HPIPM (structure-exploiting), qpSWIFT, PIQP §2.

6. Operator splitting (ADMM). Inequalities are turned into equalities with a slack s \ge 0, so that Cx + s = u §2, eq. 4. The paper gives only this reformulation, not the ADMM iterations §2. OSQP is named as the representative §2.

\min_{x,\, s \ge 0} \tfrac12 x^\top H x + q^\top x \quad \text{s.t.} \quad Ax = b,\; Cx + s = u §2, eq. 4

7. Augmented Lagrangian and proximal methods. The paper gives a Powell–Hestenes–Rockafellar style penalised Lagrangian with multipliers \lambda \in \mathbb{R}^{n_e}, \mu \in \mathbb{R}^{n_i} and penalties \rho_e, \rho_i > 0 §2, eq. 5. Its dual updates are §2, eq. 6 and §2, eq. 7:

\lambda^{k+1} = \lambda^k + \rho_e\,(Ax^{k+1} - b) \qquad \mu^{k+1} = \max\!\bigl(0,\; \mu^k + \rho_i\,(Cx^{k+1} - u)\bigr) §2, eq. 6 §2, eq. 7

ProxQP is the representative solver in this family §2.

8. Code generation and conic solvers. For fixed-structure problems where only parameters change, code generators (CVXGEN, CVXPYgen, FORCESPRO) emit specialised C code §2. When conic constraints or certificates are needed, Clarabel is proposed as a general route that includes QPs as a special case §2.

9. Overview tables. tab. 1 gives, per family and per representative solver, flags for warm-start (WS), high accuracy (Acc), early termination (Early) and practical real-time suitability (RT), with a "best scenario" column. The caption calls RT "scenario-dependent" tab. 1. tab. 2 lists dense/sparse matrix support, warm-start, hot-start, early termination, dual-gap reporting and an "I-H" column tab. 2.

Table 1 tab. 1. Columns: WS, Acc, Early, RT. ✓ = yes, ✗ = no, N/A = not applicable.

Family / solverMethodWSAccEarlyRTBest scenario
Direct (equality only)KKT linear solveN/A✓✗✓Equality-only QPs with fixed structure
ASActive set (primal/dual)✓✓✗✓Small–medium dense QPs (WBC, condensed MPC)
IP (generic)Primal-dual IPM✗✓✓✗Offline or high-accuracy checks; general sparse QPs
IP (structured)Structure-exploiting IPM✓✓✓✓Sparse OCP/MPC QPs (block-banded or tree)
AL / proximalAL / proximal Newton✓✓✓✓Contact-rich WBC/MPC; occasional infeasibility
OSADMM / splitting✓✗✓✓Large sparse QPs, repeated solves, moderate accuracy
HPIPMIP, structure-exploiting✓✓✓✓MPC/OCP QPs, tree-structured dynamics
OSQPADMM / OS✓✗✓✓Large sparse QPs, repeated solves with warm-start
ProxQPAL / proximal✓✓✓✓WBC, inverse dynamics, small–medium QPs
qpOASESParametric active set✓✓✗✓Small/medium dense MPC/WBC with stable active sets
qpmadDual active set (Goldfarb–Idnani)✓✓✓✓Dense WBC; condensed dense MPC
DAQPDual active set✓✓✓✓Fully condensed dense MPC
PIQPProximal IP✓✓✓✓Ill-conditioned sparse QPs; embedded constraints
qpSWIFTSparse primal-dual IPM✓✓✓✓Embedded sparse robotics QPs
FORCESPROCode generation, IPM/fast QP modes✓✓✓✓Hard real-time embedded MPC with tooling
CVXGEN / CVXPYgenGenerated C from a fixed templateN/A✓✗✓Tiny QPs whose layout never changes
ClarabelConic IP (QP-capable)✓✓✓✓Conic constraints or certificates needed

tab. 1 Source: the paper's unified overview. The "best scenario" column is condensed from the table's own text.

Table 2 tab. 2. Columns as printed. ✓ = yes, ✗ = no.

Solver (family)Matrix typeWarm startHot startEarly stopReports dual gap"I-H" (undefined)
qpOASES (AS)Dense / sparse✓✓✗✓✗
Quadprog (AS)Dense✗✗✗✓✗
Eiquadprog (AS)Dense✓✗✗✓✗
qpmad (AS)Both✓✓✓✓✗
DAQP (AS)Both✓✓✓✓✗
Gurobi (IP)Sparse✗✗✓✓✗
MOSEK (IP)Sparse✗✗✓✓✗
HPIPM (IP)Sparse (OCP form)✓✓✓✓✗
OSQP (OS)Sparse✓✓✓✗ (no explicit gap)✗
SCS (OS)Sparse✓✓✓✗✗
ProxQP (AL)Both✓✓✓✓✓

tab. 2 Hot-S, Dual-gap and I-H are not defined in the paper.

The selection guidance in §3 and §4 can be condensed to this sketch. It is the paper's own advice, not an algorithm the paper states §3 §4.

Pseudocode
# Candidate solvers by problem shape  [§3] [§4]
# Input:  shape, one of 'ocp', 'dense_wbc', 'large_sparse', 'fixed',
#         'conic', 'ill_conditioned', 'condensed_mpc'
# Output: list of candidate solver names (suggestions, not a ranking)

def candidate_solvers(shape):
    # Sparse optimal-control structure, long horizon  [§4]
    if shape == 'ocp':
        return ['HPIPM']
    # Small dense whole-body control problems  [§3] [§4]
    if shape == 'dense_wbc':
        return ['qpmad', 'Eiquadprog', 'qpOASES', 'ProxQP']
    # Large generic sparse QPs, moderate accuracy  [§3]
    if shape == 'large_sparse':
        return ['OSQP']
    # Fully condensed dense MPC, fixed structure  [§3]
    if shape == 'condensed_mpc':
        return ['DAQP']
    # Fixed structure with strong tooling needs  [§3]
    if shape == 'fixed':
        return ['FORCESPRO', 'CVXGEN', 'CVXPYgen']
    # Conic constraints or certificates  [§3]
    if shape == 'conic':
        return ['Clarabel']
    # Ill-conditioned sparse QPs  [§3]
    if shape == 'ill_conditioned':
        return ['PIQP', 'ProxQP']
    return []

Hyperparameters

The paper specifies no solver settings for its own experiments beyond the problem size and simulation length of its one figure. Everything else is not stated.

NameValueWhereNotes
decision variables n≈ 216fig. 1 §3representative MPC instance
constraints n_e + n_i≈ 392fig. 1 §3same instance
simulation length100 stepsfig. 1 §3solve times reported per step
solver tolerancestwo values, not statedfig. 1 §3the two tolerances are not given numerically
WBC control rate100–1000 Hz§1typical rate cited for WBC, not a configured setting
penalties \rho_e, \rho_inot stated§2, eq. 5symbols only
barrier parameter \mu schedulenot stated§2, eq. 3no update rule
B_k construction in SQPnot stated§2exact Hessian or approximation not given
termination criteria, iteration capsnot stated—
hardwarenot stated for Fig. 1fig. 1the cited benchmark used desktop x86, LattePanda Alpha and Jetson Orin NX §3

Results

Author-reported, and mostly relayed from other papers. The paper runs no new benchmark with reported numbers. Setups as stated in the text.

SettingMetricBaselineThis paper (as reported)Source
Convex MPC test instance (n \approx 216, n_e + n_i \approx 392), 100 steps, two tolerancesSolve time per step; residuals and duality gapnot statedProxQP: low residuals and duality gaps at tighter tolerance, stable solve times. OSQP: competitive at moderate accuracy, needs more iterations for high precisionfig. 1 §3
qpbenchmark MPC tests (cart-pole, humanoid walking)Qualitativenot statedSparse solvers suit large sparse MPC; no numbers given in the text§3 tab. 2
Relayed from [stark2025benchmarking] (arXiv:2502.01329): MPCSolve timenot statedHPIPM lowest on sparse QPs; OSQP robust but slower at high accuracy; qpOASES best on small horizons§3
Relayed from [stark2025benchmarking]: WBCSolve timenot statedEiquadprog sub-millisecond on all platforms; ProxQP stable; qpSWIFT weaker robustness§3
Relayed from [stark2025benchmarking]: energySFPWnot statedJetson Orin NX (ARM) highest, with OSQP for MPC and Eiquadprog or ProxQP for WBC§3
qpmad_benchmark: dense QPsSolve timeEiquadprogqpmad up to twofold faster on small–medium problems; qpOASES competitive with warm-starts§3

Figure description (not reproduced here): fig. 1 plots solve times over a 100-step simulation for selected solvers at two tolerances, with a ✗ marking a solver that did not reliably solve some instances at the required tolerance fig. 1. The text does not state the data source or hardware for this figure.

Paper vs code

No official code.

The paper names no code repository in the abstract, the body or the bibliography. Its own benchmark tools (qpbenchmark, qpmad_benchmark) belong to third-party projects and are cited, not implemented here. GitHub searches for "Van Nam Dinh" and for "QP solver legged robots" returned no matching repository, so no repo was cloned.

Pitfalls

  • Review, not a new benchmark. Most performance claims are relayed from [stark2025benchmarking] or [qpmad_benchmark], or from the paper's own qualitative judgements tab. 1. Check the original sources before relying on a number.
  • Figure 1 cannot be reproduced from the text. Solver versions, tolerances, hardware and the test set source are not stated fig. 1.
  • SFPW is not defined. The paper names "Solve Frequency per Watt" but gives no formula and no measurement method §1 §3.
  • Overloaded symbol. \mu is the barrier parameter in the IPM section §2, eq. 3 and the augmented-Lagrangian multiplier for inequalities in §2, eq. 5. Keep them apart in code.
  • SQP Hessian unspecified. B_k is described only as an approximation of the Lagrangian Hessian §2. The paper does not say whether it is exact, quasi-Newton or regularised.
  • Convexity assumption. The subproblem is convex only when B_k is positive semi-definite §2. The qpmad benchmark uses positive-definite QPs only §3. Check that the solver supports semi-definite H before using it.
  • ADMM and AL are not algorithms here. The paper gives the penalised form and the dual updates, but no iteration loop, no \rho adaptation rule and no termination test §2, eqs. 4–7.
  • Undefined table columns. "Hot-S", "Dual-gap" and "I-H" in tab. 2 are not explained tab. 2. "Matrix" entries also differ from tab. 1 for qpOASES: "Dense / Sparse" in tab. 2 against "small/medium dense" in tab. 1.
  • Citation mismatch. The claim that qpmad suits embedded pipelines cites a field-robotics paper on point cloud registration §3 [qpmad_app]. That reference does not support the claim and should not be used as evidence.
  • Timing claims lack units and setups. "Sub-millisecond" §3 and "up to twofold" §3 are given without hardware, sizes or variance.
  • RT and Acc columns are judgements. tab. 1 states these are scenario-dependent, not measured.
  • Version. This card follows arXiv v2 (updated 2025-12-12), as fetched.
  • Equation numbers. Numbers are counted from the source TeX (LNCS class, one global counter): the KKT system is eq. 1, the active-set problem eq. 2, the barrier problem eq. 3, the slack form eq. 4, the augmented Lagrangian eq. 5, and the two rows of the dual update eqs. 6 and 7. The three displays at the start of §2 (the SQP and convex QP forms) are unnumbered and are cited by section only.

Lineage

  • Builds on: [stark2025benchmarking] (arXiv:2502.01329), the MPC and WBC benchmark whose results the paper summarises §3. Also qpbenchmark and qpmad_benchmark, cited for benchmark evidence §3.
  • Compared against: the solver set itself. qpOASES, OSQP, HPIPM, ProxQP, qpmad, Eiquadprog, DAQP, PIQP, qpSWIFT, FORCESPRO, CVXGEN, CVXPYgen, Clarabel, Gurobi, MOSEK, SCS, quadprog tab. 1 tab. 2.
  • Superseded by: not known from the content of this wiki.

Source and license

Adapted from “Real-Time QP Solvers: A Concise Review and Practical Guide Towards Legged Robots” by Van Nam Dinh (arXiv:2510.21773), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.