Manuscript Offprint
arXiv:2611.04325Computing Invariant Reachable Sets through Sum-of-Squares Programming
Mohamed Khalid M Jaffar
Abstract—Funnels, time-varying invariant sets around nominal trajectories, certify that a closed-loop system tracks its plan, and can be composed into verified motion plans. Their computation by sum-of-squares (SOS) programming is well established in formulation but not in practice: the result depends on implementation choices such as the initial guess, Lyapunov function normalization, and termination rule, which the literature documents only briefly. This paper presents a self-contained treatment of SOS-based funnel computation, implemented in the open-source package computeSOSFunnels. We propose a minimum-volume formulation with inlet and outlet constraints under which funnels with coinciding nominal endpoints compose by construction. Numerical experiments on a unicycle, with timing studies on a cart-pole and a 12-state quadrotor, characterize the pipeline: infeasible initial guesses are partly decidable before solving, the certificate shows no violations among 39,000 boundary samples per funnel under the true dynamics, and constructing the semidefinite program, not solving it, dominates computation time.
I. INTRODUCTION
Autonomous systems that act near people and obstacles need more than a nominal motion plan: they need a guarantee that the closed-loop system stays near that plan despite deviations from it. Funnels provide such a guarantee. A funnel is a time-varying set around a nominal trajectory that every closed-loop trajectory starting in its inlet remains inside until it exits through its outlet. Because the guarantee is set-based, when funnels compose, that is, when the outlet of one funnel lies in the inlet of the next, the guarantees chain, and a sequence of funnels becomes a verified motion plan [1]. This composability makes funnels a natural primitive for feedback motion planning [2-4].
Computing funnels for a general dynamical system is the bottleneck. For nonlinear systems, a standard approach is to search for time-varying Lyapunov functions with sum-of-squares (SOS) programming, which turns invariance conditions into semidefinite programs (SDPs) [5-7]. The resulting problem is bilinear (non-convex) in the Lyapunov function and the SOS multipliers, so it is solved by alternating between convex subproblems, and its solution depends on design choices the formulation leaves open — the initial guess, termination rule, normalization that fixes the scale of the Lyapunov function, and the polynomial approximation of the dynamics. These choices decide whether the method returns a useful funnel or an infeasible program, yet the literature typically documents them only briefly, and the theory, which draws on real algebraic geometry and semidefinite optimization is
spread across several papers. This paper is written to be self-contained, so that a reader new to SOS programming can follow it from theory to formulation to implementation.
SOS funnels and their use in planning: Tedrake et al. [2] presented LQR-trees that grow a tree of trajectories, each stabilized by a time-varying linear quadratic regulator (TVLQR), and verify a funnel around each with SOS programming. Tobenkin et al. [7] developed the underlying funnel computation framework, including the time-sampled verification and the Riccati-based initial guess adopted in this work. Majumdar et al. [8] extended the search to the controller itself, maximizing the set of states driven into a goal region. Majumdar and Tedrake [3] reversed the objective, computing minimum-volume outer approximations of the states reachable from a given initial set; our formulation is closest to theirs. Funnels have since served as primitives for online replanning in dynamic environments [9].
Alternatives to SOS-based funnels: Funnel synthesis for systems with Lipschitz nonlinearities can be posed as a numerical optimal control problem with matrix inequality constraints [10]. Hamilton-Jacobi reachability analysis yields tracking-error bounds for planning with reduced-order models [11], and Bernstein polynomial bounds give fast funnel computation for polynomial systems [12]. Contraction metrics certify tracking tubes through differential conditions rather than Lyapunov sublevel sets [13]. These methods trade the generality of polynomial certificates for scalability or tighter structure. SOS methods face their own scalability limit, since the SDP size grows combinatorially with state dimension and polynomial degree; diagonally dominant relaxations [14] and related techniques [15] trade conservatism for tractability.
Gap: The SOS formulation for computing funnels is well established, but its practical implementation is not. Where reference implementations exist, the accompanying papers do not fully characterize how the computation behaves: which initial guesses yield feasible programs, when to stop the alternation procedure, how well a polynomial approximate certificate holds for the true dynamics, and where the computation time goes. This paper addresses that gap. Its contributions are:
-
computeSOSFunnels¹, an open-source, end-to-end implementation of the computation pipeline, from trajectory optimization and TVLQR synthesis to polynomial approximation and invariance certification. It automatically generates Taylor approximations of arbitrary user-specified degree from symbolic system dynamics.
-
An empirical characterization of the pipeline in practice: feasibility of initial guesses, part of which is decidable
*The author is with the Department of Aerospace Engineering, University of Maryland, College Park, USA. Email: khalid26@umd.edu. This work was not supported by any organization.
¹github.com/khalid2696/computeSOSFunnels
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2021
before any SDP is solved; validity of the certificate under the true dynamics; and computational cost, including a closed-form count of the SDP size.
- A minimum-volume funnel formulation with both inlet and outlet constraints. As in [3], the funnel contains a given inlet set; in addition, its outlet lies within a user-specified terminal set nested inside the inlet set. So funnels with coinciding nominal endpoints compose, avoiding runtime set-containment checks whose cost accumulates during motion planning.
Consider a system with dynamics given by
where is at least three times continuously differentiable and encodes actuator limits. Given a nominal state-input pair satisfying (1) at all and a tracking controller, the deviation evolves under closed-loop deviation dynamics with . Section III constructs explicitly.
Definition 1 (FUNNEL [9], Defn. 1). For closed-loop dynamics on , a set is a funnel if, for every , the solution with satisfies for all . Its cross-section at time is . We call as the inlet and the outlet.
Funnels become planning primitives through sequential composition [1]. Funnels and are sequentially composable if
so that system state gets handed off from the first funnel to the subsequent without leaving either. Condition (2) is stronger than planning requires. Let us partition the state into cyclic and non-cyclic coordinates, , where the dynamics do not depend on (e.g., the planar position of a unicycle). A funnel shifted along is then again a funnel, because its closed-loop deviation dynamics are unaffected by the shift [3].
Definition 2 (MOTION-PLAN COMPOSABILITY [9], Defn. 2). Funnel pair is motion-plan composable if
where is the orthogonal projection onto the non-cyclic coordinates.
Under (3), every state in the outlet of lies in the inlet of some shift of along . At planning run time, is shifted so that its inlet contains the actual hand-off state [4]. Since projection preserves containment, (2) implies (3).
A. Semi-algebraic sets and polynomial approximation
A basic (closed) semi-algebraic set is a set of the form
Every set in this paper is of this form. For instance, ellipsoids use and sublevel sets of a time-varying Lyapunov function, use for polynomial , . Certifying properties of such sets reduces to certifying nonnegativity of polynomials on them, which is the task SOS programming addresses [16].
This reduction requires polynomial functions. Robot dynamics are rarely polynomial; for example, a simple unicycle model itself contains cos and sin terms. Two remedies exist: (i) Recasting introduces auxiliary states and equality constraints that represent non-polynomial terms exactly [17], at the cost of a larger state dimension. (ii) Taylor approximation replaces with a truncated expansion about the nominal trajectory [3, 7]; it preserves the state dimension but certifies the approximate dynamics only. In this work we adopt Taylor approximation and empirically verify the obtained certificates a posteriori against the true dynamics (Section IV-D).
B. SOS optimization framework
Definition 3 (SOS POLYNOMIAL). A polynomial is a sum of squares if for some .
Every SOS polynomial is nonnegative, but the converse is not true in general. By Hilbert's classical result, nonnegativity and SOS coincide only for univariate polynomials, quadratics, and bivariate quartics. The Motzkin polynomial is a counterexample: it is nonnegative but not SOS [16]. This restriction is the price for tractability: checking nonnegativity is NP-hard already for fourth-degree polynomials, whereas SOS-based analysis reduces it to a semidefinite feasibility problem, which is solvable to any fixed accuracy in polynomial time.
Let be the vector of all monomials in of degree at most ; its size is . Then with if and only if there exists a Gram matrix such that
[5, 18]. Matching coefficients of p on both sides of (5) yields linear equality constraints on the entries of G. Consequently, an SOS program, which minimizes a linear function of the decision variables subject to the constraint that polynomials with coefficients affine in those variables are SOS, is a semidefinite program (SDP) solvable by interior-point methods. Searching for Lyapunov functions this way originated from the seminal works of Parrilo [5] and Papachristodoulou and Prajna [6].
The Gram matrix size drives computation cost and grows combinatorially in state dimension n and the degree d. This is the principal obstacle to scaling SOS methods. It motivates restricting G to diagonally dominant or scaled diagonally dominant matrices (DSOS/SDSOS), which replaces the SDP with a linear or second-order cone program, respectively [14, 15].
C. Polynomial S-procedure
SOS constraints certify global nonnegativity. Funnel invariance conditions instead require nonnegativity on sets or implications between polynomial inequalities. The polynomial S-procedure, a generalization of the classical S-procedure [19], converts both into SOS constraints using polynomial multipliers [18].
Lemma 1 (POLYNOMIAL S-PROCEDURE). Let .
(a) If there exists such that , then , equivalently for all .
(b) If there exists such that , then , equivalently for all .
Proof. (a) If , then , since . (b) If , then ; no sign condition on is needed because the multiplier term vanishes.
Statement (a) certifies an implication on (a set containment), and statement (b) certifies an implication on a level set ; Section III uses both. Lemma 1 is sufficient only. In practice, the multiplier degrees are fixed a priori, so infeasibility of the resulting SOS program does not imply that the containment or implication fails.
D. Funnel invariance condition
Funnels can be certified through a boundary condition on a Lyapunov function . If V increases no more quickly than the level wherever a trajectory touches the funnel boundary, no trajectory can exit. This is the time-varying form of Nagumo's condition for set invariance [20, 21].
Lemma 2 (FINITE-TIME INVARIANCE). Let the deviation dynamics be locally Lipschitz on , and let and be continuously differentiable, with sublevel sets compact and whenever . If, for all ,
then is a funnel in the sense of Definition 1. Its cross-sections are .
Proof. Augment the state with time, , so that has unique solutions, and let . The (Bouligand) tangent cone to at a point is the set of directions that point into the set or along its boundary [21]. Since on , the tangent cone at a boundary point is the half-space of directions that do not increase . Along the dynamics, , and (6) implies that lies in this tangent cone at every boundary point. Nagumo's theorem [20] then gives forward invariance of , i.e., of on , which is the claim.
Remark 1 (APPLICABILITY). For quadratic with continuously differentiable and , each is an ellipsoid, hence compact, and vanishes only at , which lies inside . If is only piecewise continuous in , as under zero-order-hold inputs, Lemma 2 applies on each interval, and invariance chains across switching times since trajectories, , and are continuous.
E. Problem statement
Problem 1 (MINIMUM-VOLUME CERTIFIED FUNNEL). Given dynamics (1), boundary states , , and inlet and outlet shape matrices with , compute a nominal trajectory from to , a tracking feedback control law, and a funnel certified by Lemma 2, such that
while minimizing the funnel volume .
An optimal solution to Problem 1 thus yields the tightest (in volume) outer approximation of the reachable tube of among those certified by Lemma 2.
Remark 2 (COMPOSABILITY BY CONSTRUCTION). Since is equivalent to , two funnels , that solve Problem 1 with common and whose nominal trajectories meet, , satisfy ; translating by the common endpoint gives , so the pair is sequentially composable (2). A library of such funnels is therefore composable wherever nominal endpoints coincide, with no pairwise checks needed.
Problem 1 is non-convex and infinite-dimensional. Our method (Section III) makes it tractable by fixing the nominal trajectory and feedback law before certification, and by restricting V to polynomials in with sampled at discrete times (knot points), which turns certification into a single bilinear SOS program, solved as a sequence of SDPs.
III. METHOD
Following an approach similar to [9], we solve Problem 1 in four sequential steps (see Fig. 1), parameterizing the funnel by sublevel sets of polynomial Lyapunov functions at knot points. The steps for computing these funnels are outlined below.
A. Optimization-based nominal trajectory generation
We solve a nonlinear program (NLP) to compute nominal trajectory and feedforward input tape that drive the system from a specified initial state to final state . We implement a direct collocation-based approach with trapezoidal integration constraints to solve the optimization problem [22]. Let denote the time at knot point
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2021
where is user-specified, so that and . Let the input be held constant over each interval, for . The nominal trajectory is obtained by solving
where and in (8b), and characterizes input limits. penalizes control effort, weight coefficient trades off control effort against trajectory duration . Since is fixed and is a decision variable, (8) is a free final-time problem. The solution to (8) yields the nominal trajectory and the feedforward input tape . The trapezoidal constraints enforce the dynamics only approximately; we neglect this collocation defect and treat as an exact solution of (1).
B. Feedback controller design via TVLQR
To reject deviations from the nominal trajectory, we augment the feedforward input with a time-varying linear quadratic regulator (TVLQR). We linearize (1) at each knot point , and evaluated at , and interpolate linearly in time to obtain and on . With state and input weights , and terminal weight , the cost-to-go matrix solves the Riccati differential equation
which we integrate backward with a stiff solver (MATLAB ode15s); the continuous-time formulation avoids sensitivity of the Riccati equation solution to the sampling time. The feedback gain is , and we extract the matrix values at the knot points: and . The closed-loop control law is
with so that the control law is defined at every knot. Note that (8d) bounds , but the feedback term can exceed inside the funnel certificate (rare in practice).
C. Deviation dynamics and polynomialization
Substituting (10) into (1) and subtracting the nominal dynamics yields the closed-loop deviation dynamics. At each knot point ,
(11)
Recall state deviation, . Since SOS programming requires polynomial functions, we replace with its third-order Taylor polynomial about , following Majumdar and Tedrake [3], Tobenkin et al. [7]:

Fig. 1. Funnel computation pipeline. The TVLQR cost-to-go matrices warm-start the bilinear alternation of SOS program solve.
Note that invariance is checked on the funnel boundary, away from the origin, where polynomial approximation errors are large and grow with funnel size. The invariance certificates obtained from SOS programming (Section III-D) holds for only. Section IV empirically verifies the certificates against on states sampled from funnel boundary.
D. Invariance certification via SOS programming
We parametrize the funnel at the knot points by , , with polynomial and scalar , so that . Replacing the time derivatives in (6) by backward differences and by , and omitting the argument in for brevity, yields the sampled invariance condition:
(13)
By Lemma 1(b) with and , condition (13) holds if there exist polynomials such that
The multiplier is sign-free because the implication is required only on the level set . As remarked earlier in Section II-C, condition (14) is sufficient but not necessary, bringing in conservativeness to our proposed method.
With (cone of SOS polynomials), the minimum-volume certified funnel (Problem 1) is computed by the following SOS program.
Constraint (15b) enforces positive definiteness of each for a small , and hence compactness of . By Lemma 1(a), (15e) certifies and (15f) certifies ; their multipliers must be SOS because they certify containment of sets. Together with (15d), the program enforces the inlet and outlet conditions (7) and a sampled-time approximation of invariance (Lemma 2) for the approximate dynamics .
In our implementation is quadratic and are nonnegative scalars, so the polynomials in (15e)–(15f) are quadratic, for which nonnegativity and SOS coincide (Section II-B). Since the origin lies in the interior of and of , the S-lemma [19] makes both certificates necessary as well as sufficient. The conservatism of the SOS relaxation therefore resides entirely in the invariance constraint (15d).
Condition (6) is invariant to time-varying rescaling , which leaves every unchanged but alters the objective (15a). The normalization (15g) fixes this scale at each knot. Even so, does not determine , which also depends on the shape of ; (15a) is therefore a heuristic proxy for funnel volume, and we report the exact volume in all results (Section IV).
SOS program (15) is bilinear (non-convex) in the decision variables through the products , and . We solve it by bilinear alternation (Algorithm 1), which alternates between two SDPs:
-
L-Step (Feasibility): Fix and search for certifying multipliers and , subject to (15d)–(15f).
-
V-Step (Optimization): Fix multipliers obtained from L-step to minimize (15a) over , subject to all constraints (15b)–(15g).
Algorithm 1 terminates when the relative decrease in the objective falls below a tolerance , or after iterations. The SDP at each V-step is feasible, since the preceding L-step certifies it, so the objective is non-increasing and, being bounded below, converges. For the same reason, L-step can fail only at the first iteration, which makes feasibility of the initial guess the critical input. Convergence is of the objective value only, with no guarantee of global or local optimality.
a) Funnel volume: With quadratic , , each is an ellipsoid of volume [19]
where is the volume of the unit ball in . We measure funnel volume by
which approximates the objective of Problem 1.
Remark 3 (INITIAL GUESS FOR AND ). To initialize the bilinear alternation procedure, we must specify an initial guess for the Lyapunov candidate function and the level set
Algorithm 1 BILINEARALTERNATION ()
1: initial guess (18) 2: for do 3: find s.t. (15d)–(15f) L-step 4: if L-step infeasible then 5: return failure 6: end if 7: solve (15) for V-step 8: 9: if and then 10: break converged 11: end if 12: end for 13: return
value at all . Similar to [7], we use the following guesses:
At the exponent vanishes, so sets the outlet level, and the ratio . yields a guess whose level decreases with time.
is the cost-to-go matrix obtained by solving the Riccati differential equation (9) in TVLQR synthesis, while and are tunable hyperparameters. To ensure the guesses are good for initial feasibility, we prioritize obtaining numerically well-conditioned . We use Bryson's rule for coarse-tuning and matrices [23], followed by trial-and-error fine-tuning based on condition number of (we target , an empirical ideal threshold).
Remark 4 (CONVERGENT FUNNELS). To make the computed funnels composable, we choose , i.e., (see Remark 2), and warm-start Algorithm 1 with a convergent guess , selecting in (18) by a sweep over initial feasibility. A decreasing does not by itself imply decreasing volume, since also varies along the trajectory; the containment constraints (15e)–(15f) are what enforce shrinking volume behavior.
IV. NUMERICAL RESULTS
All results in this section use a unicycle system with state , input , and dynamics , , . Additional systems, cart-pole () and quadrotor () are considered only for computation timing study (Section IV-D). The implementation scripts are available as part of our computeSOSFunnels package.
A. Setup
Table I lists all problem and solver parameters. The nominal trajectory from to uses intervals (40 knots). The user-specified inlet and outlet sets are derived from the
github.com/khalid2696/computeSOSFunnels/tree/unicycle
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2021
TABLE I UNCYCLE PROBLEM AND SOLVER PARAMETERS
| Parameter | Value |
|---|---|
| Dynamics | |
| 0.25 s, 40 | |
| diag([0.1, 0.1]), 1 | |
| diag([1, 1, 0.1]), diag([1, 0.5]) | |
| see (19) | |
| 2, 3, 6, 0 | |
| 20, 0.05, | |
| Solver | SOSTOOLS v4.00 + MOSEK v10.2.8, MATLAB R2023a |
| Hardware and OS | Intel Core i7-10750H (6 cores, 2.6GHz), 32 GB RAM, Ubuntu 20.04 |
TVLQR cost-to-go matrices and the default initial guess hyperparameters ,
and held fixed in all experiments. They satisfy (i.e., ), so every computed funnel is sequentially composable by construction (Remark 2). We implement Algorithm 1 in SOSTOOLS [24] with MOSEK [25] as the SDP solver. All funnel volume metrics follow (16)–(17).
B. Representative funnel
Fig. 2 illustrates the funnel output by Algorithm 1 on the default problem (Table I), which terminates at iter = 4 (convergence criterion met). The inlet constraint is active: the computed inlet matches in volume to within , as expected, since (15a) penalizes and (15e) bounds it from below. The outlet constraint is far from active: occupies 0.11% of the volume of . The resulting inlet-to-outlet volume ratio is 2205, nearly three orders of magnitude above the floor of 2.47 that alone enforces. The funnel thus contracts well beyond what composability requires, leaving a wide margin for hand-off to a successor funnel.
C. Hyperparameter sweep
Table II sweeps the initial-guess hyperparameters in (18) with fixed and and a fixed budget of 4 iterations for Algorithm 1 termination. Of the considered 16 initial guesses in this problem, seven violate inlet or outlet containment (denoted by 'C'). Since shares the shapes of and , these failures are decidable even before solving the SOS program (15). Of the remaining nine, the four that fail feasibility check in the initial L-step (marked as '-') are those with the largest guessed inlet level, , whereas all guesses with succeed — a funnel guess that is too wide at the inlet cannot be certified locally. Among the five feasible guesses, the funnel volume varies by 4.6% and the inlet-to-outlet ratio by 26%. So the warm start has little effect on funnel volume but a noticeable effect on how strongly the funnel contracts.
TABLE II SWEEP OVER THE INITIAL GUESS HYPERPARAMETERS WITH FIXED , AND . EACH CELL ENTRY: FUNNEL VOLUME (17) | INLET-TO-OUTLET VOLUME RATIO . '-': THE INITIAL GUESS FAILS, I.E., L-STEP (LINE 3, ALGORITHM 1) IS INFEASIBLE. 'C': THE INITIAL GUESS VIOLATES INLET OR OUTLET CONTAINMENT.
| 1 | 1.5 | 2 | 3 | |
|---|---|---|---|---|
| 0.02 | C | C | 0.152 | 2355 |
| 0.035 | C | 0.159 | 2407 | 0.153 |
| 0.05 | 0.155 | 2205 | 0.157 | 2400 |
| 0.0625 | C | C | C | C |
D. Discussion
-
Alternation procedure: Fig. 3 shows objective function value (15a) and funnel volume over 20 iterations of Algorithm 1 on the default problem (Table I). The objective decreases monotonically, as guaranteed, but with a long tail: the stopping criterion (via convergence tolerance ) is met at iter = 4, which already captures 89.9% of the decrease obtained after 20 iterations. The funnel volume falls by 82.5% from the initial guess to termination and then plateaus without decreasing monotonically: its minimum over 20 iterations (iter = 16) is 4.4% below the value at termination. The funnel volume does not follow the objective in this tail; this decoupling is a practical consequence of objective (15a) being a volume proxy. Once the objective value's tail is reached (iter > 4), further iterations reshape the funnel without reliably shrinking it, and an early termination of Algorithm 1 results in significant computation gains, albeit forgoing some optimality gains.
-
Polynomial approximation validity: The SOS-based invariance certificate holds for the Taylor-approximated dynamics . To test it against the true deviation dynamics , we sample 1000 points on the boundary of each (directions sampled uniformly) and evaluate the sampled invariance condition (13) with in place of . Test funnels are computed with scaled inlets and correspondingly scaled initial guesses. For , none of the 39,000 boundary samples per funnel violated the condition. The worst-case normalized excess over all knot points and boundary samples , , with evaluated under , is negative in all three funnels (i.e., satisfying (13), ), ranging from to . These results are empirical evidence over the tested range, not a guarantee, and do not address behavior between knot points.

(a)
(b)
(c)
Fig. 2. Funnel computed by Algorithm 1 for a unicycle system, terminated at iter = 4. (a) Projections of the cross-sections onto xy-plane, with the inlet set and the outlet set . (b) Projection onto -space over time; vertical bars mark the -extent of and . (c) Funnel cross-sections in .
- Computation times: Let denote the number of free entries of an symmetric Gram matrix. With quadratic and Taylor degree , the invariance constraint (14) is a polynomial of degree
so invariance constraint at each knot point contributes one Gram block of size . The blocks corresponding to remaining constraints are: one of size for each positive-definiteness constraint (15b), a homogeneous quadratic; one of size for each containment constraint (15e)–(15f), a quadratic with a constant term; and blocks for the scalar SOS variables. The number of scalarized PSD entries (SDP decision variables) corresponding to the invariance constraints at all knot points alone is: , which grows combinatorially in and and dominates other PSD entries (decision variables).
Table III reports the cost per alternation iteration, averaged over three iterations, for the unicycle , a cart-pole , and a quadrotor . We observe that compute time is dominated by SOSTOOLS constructing the SDP rather than in solving it: MOSEK accounts for at most 6.4% of the wall time for , rising to 9–20% for the quadrotor. Since the structure of both SDPs (L-step & V-step) is identical across iterations and only their coefficients change, this overhead could be paid once per problem rather than once per step.
Raising deg from 2 to 6 multiplies the wall time by (unicycle) and (cart-pole), but shrinks the funnel volume after three iterations by only 3.8% and 9.4%, respectively. At , moving from unicycle to quadrotor increases the PSD entries per knot by about , wall time per knot by , and MOSEK time per knot by — solver's share of the compute cost quickly grows with , and a single iteration (L-step + V-step) for the quadrotor system takes minutes. At , the quadrotor SDP grows to PSD entries, 24 times the degree-2 problem, and the run did not complete on our hardware.
- Limitations: Funnel invariance certificate obtained using our proposed formulation is approximate in three ways. First, it only holds for the Taylor-approximated dynamics: truncation

Fig. 3. Objective and funnel volume (17) over 20 iterations of Algorithm 1 on the default problem, each normalized by its value at the initial guess (iter = 0). The dotted line at iter = 4 marks termination under convergence tolerance . The objective J is monotone by construction (the funnel volume need not be).
error is bounded only locally, and is largest on the funnel boundary where invariance is checked. We empirically found no violations over the certified funnel (Section IV-D), but a guarantee requires bounding the remainder term (truncation error) over the funnel and treating it as a bounded disturbance in the SOS program. Second, invariance is certified at discrete knot points only, with no inter-sample guarantee. Third, collocation residual of the nominal trajectory is neglected.
Beyond the shortcomings of discrete-time numerical SOS analysis, bilinear alternation solves a non-convex problem via sequential convex steps: it converges in objective value only, offers no guarantee of global optimality, and its result depends on the warm start (Table II). Moreover, the proxy objective (15a) may not track funnel volume monotonically (Fig. 3), which a log-determinant volume objective would address [26]. Finally, the Gram matrix dimension grows combinatorially in state dimensionality — DSOS/SDSOS relaxations [14, 15] could improve scalability at the cost of conservatism.
V. SUMMARY
This paper presented an end-to-end pipeline for computing invariant funnels with SOS programming, its open-source implementation computeSOSFunnels, and an empirical char-
JOURNAL OF LATEX CLASS FILES, VOL. 14, NO. 8, AUGUST 2021
TABLE III
COST PER ALTERNATION ITERATION OF ALGORITHM 1, AVERAGED OVER THREE ITERATIONS. GRAM SIZE , WITH GIVEN BY (20). PSD ENTRIES: SCALARIZED ENTRIES OF ALL PSD BLOCKS AS FORMULATED (L-STEP / V-STEP). TIMES: WALL-CLOCK SECONDS, WITH MOSEK SOLVER TIME IN PARENTHESES. ANALYTIC COUNT (THE RUN DID NOT COMPLETE ON THE TEST MACHINE).
| System | n | K+1 | deg | Gram size | PSD entries | L-step [s] | V-step [s] |
|---|---|---|---|---|---|---|---|
| Unicycle | 3 | 40 | 2 | 10 | 2401 / 2446 | 3.11 (0.029) | 4.73 (0.078) |
| Unicycle | 3 | 40 | 4 | 20 | 8446 / 8491 | 6.43 (0.078) | 9.11 (0.21) |
| Unicycle | 3 | 40 | 6 | 35 | 24826 / 24871 | 13.3 (0.26) | 17.7 (0.61) |
| Cart-pole | 4 | 25 | 2 | 15 | 3152 / 3186 | 2.87 (0.039) | 4.19 (0.11) |
| Cart-pole | 4 | 25 | 4 | 35 | 15392 / 15426 | 8.72 (0.26) | 12.1 (0.6) |
| Cart-pole | 4 | 25 | 6 | 70 | 59912 / 59946 | 29.5 (0.96) | 36.3 (2.3) |
| Quadrotor | 12 | 25 | 2 | 91 | 102520 / 102622 | 119.3 (10.8) | 157.3 (32.0) |
| Quadrotor | 12 | 25 | 4 | 455 | 2491816 / 2491918 | - | - |
acterization of its behavior in practice. Bounding the outlet by a terminal set nested inside the inlet set makes funnels with coinciding nominal endpoints composable by construction. Numerical experiments show that infeasible initial guesses are partly decidable before solving, the alternation procedure can be stopped after a few iterations with little loss in funnel volume, and the certificate computed for the Taylor-approximated dynamics held under the true dynamics at every tested boundary sample. Low polynomial multiplier degrees are the economical choice: raising the degree from 2 to 6 costs the compute wall-time for only a 4–10% reduction in funnel volume. Most of the computation time is spent constructing the SDP rather than solving it. Future work will bound the Taylor remainder to certify the true dynamics, adopt a log-determinant volume objective, and reuse the SDP structure across iterations to reduce the computational overhead.
ACKNOWLEDGMENTS
The author thanks his advisor, Prof. Michael Otte, for his guidance throughout this work, and is extremely grateful to Sandeep Kumar, Abraham Vinod, and Purnanand Elango for the insightful discussions on numerical optimization.
REFERENCES
[1] R. R. Burridge, A. A. Rizzi, and D. E. Koditschek, “Sequential composition of dynamically dexterous robot behaviors,” The International Journal of Robotics Research, vol. 18, no. 6, pp. 534–555, 1999.
[2] R. Tedrake, I. R. Manchester, M. Tobenkin, and J. W. Roberts, “LQR-trees: Feedback motion planning via sums-of-squares verification,” The International Journal of Robotics Research, vol. 29, no. 8, pp. 1038–1052, 2010.
[3] A. Majumdar and R. Tedrake, “Funnel libraries for real-time robust feedback motion planning,” The International Journal of Robotics Research, vol. 36, no. 8, pp. 947–982, 2017.
[4] M. K. M. Jaffar and M. Otte, “PiP-X: Funnel-based online feedback motion planning/replanning in dynamic environments,” in International Workshop on the Algorithmic Foundations of Robotics. Springer, 2023, pp. 132–148.
[5] P. A. Parrilo, “Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization,” Ph.D. dissertation, California Institute of Technology, 2000.
[6] A. Papachristodoulou and S. Prajna, “On the construction of Lyapunov functions using the sum of squares decomposition,” in Proceedings of the 41st IEEE Conference on Decision and Control, vol. 3, 2002, pp. 3482–3487.
[7] M. M. Tobenkin, I. R. Manchester, and R. Tedrake, “Invariant funnels around trajectories using sum-of-squares programming,” IFAC Proceedings Volumes, vol. 44, no. 1, pp. 9218–9223, 2011.
[8] A. Majumdar, A. A. Ahmadi, and R. Tedrake, “Control design along trajectories with sums of squares programming,” in Proceedings of the
IEEE International Conference on Robotics and Automation, 2013, pp. 4054–4061.
[9] M. K. M. Jaffar and M. Otte, “PiP-X: Online feedback motion planning/replanning in dynamic environments using invariant funnels,” arXiv preprint arXiv:2202.00772, 2022.
[10] T. Kim, P. Elango, T. P. Reynolds, B. Açıkmeşe, and M. Mesbahi, “Optimization-based constrained funnel synthesis for systems with Lipschitz nonlinearities via numerical optimal control,” IEEE Control Systems Letters, vol. 7, pp. 2875–2880, 2023.
[11] S. L. Herbert, M. Chen, S. Han, S. Bansal, J. F. Fisac, and C. J. Tomlin, “FaTrack: A modular framework for fast and guaranteed safe motion planning,” in Proceedings of the IEEE Conference on Decision and Control, 2017, pp. 1517–1522.
[12] H. Seo, C. Y. Son, and H. J. Kim, “Fast funnel computation using multivariate Bernstein polynomial,” IEEE Robotics and Automation Letters, vol. 6, no. 2, pp. 1351–1358, 2021.
[13] S. Singh, B. Landry, A. Majumdar, J.-J. Slotine, and M. Pavone, “Robust feedback motion planning via contraction theory,” The International Journal of Robotics Research, vol. 42, no. 9, pp. 655–688, 2023.
[14] A. A. Ahmadi and A. Majumdar, “DSOS and SDSOS optimization: More tractable alternatives to sum of squares and semidefinite optimization,” SIAM Journal on Applied Algebra and Geometry, vol. 3, no. 2, pp. 193–230, 2019.
[15] A. Majumdar, G. Hall, and A. A. Ahmadi, “Recent scalability improvements for semidefinite programming with applications in machine learning, control, and robotics,” Annual Review of Control, Robotics, and Autonomous Systems, vol. 3, pp. 331–360, 2020.
[16] G. Blekherman, P. A. Parrilo, and R. R. Thomas, Eds., Semidefinite Optimization and Convex Algebraic Geometry, ser. MOS-SIAM Series on Optimization. SIAM, 2012, vol. 13.
[17] A. Papachristodoulou and S. Prajna, “Analysis of non-polynomial systems using the sum of squares decomposition,” in Positive Polynomials in Control, ser. Lecture Notes in Control and Information Sciences. Springer, 2005, vol. 312, pp. 23–43.
[18] P. A. Parrilo, “Semidefinite programming relaxations for semialgebraic problems,” Mathematical programming, vol. 96, no. 2, pp. 293–320, 2003.
[19] S. Boyd, L. El Ghaoui, E. Feron, and V. Balakrishnan, Linear Matrix Inequalities in System and Control Theory, ser. Studies in Applied Mathematics. SIAM, 1994, vol. 15.
[20] M. Nagumo, “Über die Lage der Integralkurven gewöhnlicher Differentialgleichungen,” Proceedings of the Physico-Mathematical Society of Japan, 3rd Series, vol. 24, pp. 551–559, 1942.
[21] F. Blanchini, “Set invariance in control,” Automatica, vol. 35, no. 11, pp. 1747–1767, 1999.
[22] M. Kelly, “An introduction to trajectory optimization: How to do your own direct collocation,” SIAM Review, vol. 59, no. 4, pp. 849–904, 2017.
[23] A. E. Bryson and Y.-C. Ho, Applied Optimal Control: Optimization, Estimation, and Control. Routledge, 2018.
[24] A. Papachristodoulou, J. Anderson, G. Valmorbida, S. Prajna, P. Seiler, P. A. Parrilo, M. M. Peet, and D. Jagt, SOSTOOLS: Sum of Squares Optimization Toolbox for MATLAB, 2021, version 4.00. Available from https://github.com/oxfordcontrol/SOSTOOLS; arXiv:1310.4716.
[25] MOSEK ApS, The MOSEK Optimization Toolbox for MATLAB Manual. Version 10.2, 2024. [Online]. Available: https://docs.mosek.com/10.2/toolbox/index.html
[26] L. Vandenberghe, S. Boyd, and S. P. Wu, “Determinant maximization with linear matrix inequality constraints,” SIAM Journal on Matrix Analysis and Applications, vol. 19, no. 2, pp. 499–533, 1998.