Certified Regions of Attraction for Nonlinear Plants Under Encrypted, Bootstrapped Control

Encrypted control runs a feedback controller on a cloud server that never sees the plant's data in the clear. It relies on homomorphic encryption, which lets the server add and multiply encrypted numbers. The catch is that every encrypted number carries a small random error, and multiplication makes that error grow. A dynamic controller, meaning one with internal memory updated at every step, multiplies its encrypted state forever, so the error eventually destroys the result. The standard remedy is bootstrapping: the server periodically "refreshes" the ciphertext by evaluating a polynomial approximation of the decryption procedure. In the approximate-arithmetic scheme CKKS, that refresh is itself inexact, so it injects a small error back into the controller state. For linear plants, recent work proves the loop stays stable despite these injections. For nonlinear plants, which only return to equilibrium from a bounded set of starting states (the region of attraction), there is currently no guarantee at all. Encryption errors can push the state out of that region and the loop then diverges.

We propose to compute, automatically, a certified inner estimate of the region of attraction for a nonlinear polynomial plant in closed loop with an encrypted dynamic output-feedback controller. The certificate accounts for three encryption effects: per-step quantization, periodic bootstrapping error, and the requirement that encrypted values stay inside the input range where the bootstrapping polynomial is accurate. The tool is a sum-of-squares (SOS) program. SOS is a convex search for a polynomial Lyapunov function, an "energy" function that provably decreases along trajectories. Its key feature is a Lyapunov condition that is allowed to increase at bootstrap instants as long as it decreases enough over each bootstrapping period. Because the certificate is a function of the cryptographic parameters (bootstrap period, scaling factor, bootstrap error level), sweeping it produces something the field lacks: a certified curve trading region-of-attraction size against encryption cost. That curve can then be used to choose those parameters.

Core Claim

The closest work treats bootstrapping error as a sector-bounded uncertainty and certifies stability and $\ell_2$-gain with linear matrix inequalities. A sector bound here is a constraint saying the error is at most a fixed fraction of the signal. One paper uses a lifted model to exploit the fact that refreshes happen periodically (Bootstrapping Guarantees). A second compares bootstrapping against resets, FIR truncation and integer reformulation on the chemical batch reactor (Comparison and performance analysis of dynamic encrypted control approaches). Both are explicitly restricted to linear time-invariant plants, and the first names nonlinear Lyapunov techniques as the missing step.

Going nonlinear is not merely "LMI to SOS." Three things change.

First, the relative bootstrap error bound is only meaningful on a bounded set. CKKS bootstrapping approximates modular reduction accurately only when the message lies in a known range, so the sector bound holds locally, not globally.

Second, the certificate must therefore prove invariance of a set on which its own error model is valid. Linear analyses get this for free by homogeneity; here it must be imposed.

Third, the controller's internal state must be included in the region. A reset or a large bootstrap error moves the joint plant–controller state, and whether the loop survives depends on where that moved state lands relative to the plant's region of attraction.

Our claim is that all three can be encoded in one SOS program, solved offline. The program yields a sublevel set of a polynomial Lyapunov function that is invariant under encrypted execution. That set is a certified region of attraction, and every trajectory starting in it converges to a computable ultimate bound around the equilibrium.

Mechanism

Let $x=(x_p,x_c)$ stack the plant state and the controller's encrypted state. Let $F(x,e)$ be one closed-loop step with quantization error $e$, $|e|\le\varepsilon$. At every $T$-th step the controller state receives a bootstrap error $\delta$, $|\delta|\le\gamma|x_c|$, valid only while $|x_c|\le r$, the bootstrapping input range. We search for a polynomial $V$ and constants $\rho<1$, $\mu\ge1$, $c\ge 0$ satisfying the following on the set $\Omega=\{V\le1\}$:

$$V(F(x,e))\le\rho V(x)+c,\qquad V(F(x,e)+(0,\delta))\le\mu V(x)+c,\qquad \rho^{T-1}\mu<1,\quad \Omega\subseteq\{|x_c|\le r\}.$$

The first inequality covers ordinary steps. The second covers bootstrap steps. The product condition says that the energy gained at a refresh is paid back over the period. The last condition is the range constraint.

Together these imply that $\Omega$ is invariant and trajectories converge to a smaller level set. The size of that level set is fixed by $c$, which comes from $\varepsilon$ and $\gamma$. Each inequality is polynomial in $(x,e,\delta)$. The bounds on $e$, $\delta$ and $\Omega$ are handled with standard SOS multipliers, which certify an inequality only on the region where those bounds hold.

The amortized form matters. Composing the polynomial map $T$ times to build a lifted model would raise the polynomial degree like $q^T$, where $q$ is the degree of the closed-loop map. That is hopeless for SOS, and the same kind of degree explosion is what makes the converse degree bound in A Converse Sum of Squares Lyapunov Result with a Degree Bound impractical. Per-step conditions linked only through the scalar product $\rho^{T-1}\mu$ keep the degree fixed.

For fixed $\rho$ and $\mu$, maximizing the volume of $\Omega$ is a bilinear search. We handle it with the alternating iterations standard in region-of-attraction tools. Non-polynomial terms are handled with the auxiliary-variable trick used by SOStab, which replaces $\sin$ and $\cos$ with variables $s$ and $c$ constrained by $s^2+c^2=1$.

Research Program

The method components come from established work. The SOS region-of-attraction machinery and the trigonometric lifting come from SOStab. Deviation coordinates, which handle equilibria that shift under uncertainty, come from the equilibrium-independent formulation. The encryption error model comes from the two linear papers above, whose sector bound we keep but localize.

Toward nonlinear dynamic control over encrypted data for infinite time horizon plays a different role: it motivates the work. It avoids accumulated noise with a non-recursive input–output window, but only for plants in observable canonical form, and it gives no closed-loop region certificate. Its claim that quantization error can be made arbitrarily small by tuning scaling parameters is exactly the trade-off we want to quantify. Larger scaling consumes multiplicative levels and forces more frequent bootstrapping.

The work proceeds in three steps. The first validates the error model empirically. We run a real CKKS implementation, accelerated where useful with cuHE, and measure the bootstrap error against the controller-state magnitude. We use the degree-25 bootstrapping polynomial setting studied in Bootstrapping Guarantees to obtain $\gamma$, $r$ and $\varepsilon$ with margins. The second step implements the certificate program and the parameter sweep over $(T,\gamma,\varepsilon)$, including periodic resets as a special jump map $x_c\mapsto0$. The third step uses the swept curve to select the cryptographic parameters that maximize certified region volume under a per-step latency budget, and validates the selected parameters in encrypted simulation.

Baselines

The naive reference point is the plaintext region of attraction computed by the same SOS code with $\varepsilon=\gamma=0$, as SOStab-style tools would report it. This is an upper envelope. Our certified region must lie inside it, and the gap between the two measures what encryption costs. A second naive point is leveled CKKS without bootstrapping. It must fail after its depth budget, mirroring the reported overflow "in just 1.2 seconds" without resets on the batch reactor in Murguia et al..

The strongest existing competitor is the linear-matrix-inequality certificate of Bootstrapping Guarantees, including its lifted Theorem 2. We apply it to the Jacobian linearization at the equilibrium and shrink the resulting quadratic ellipsoid until the linearization remainder is dominated, which is the standard way to localize a linear certificate. To keep the comparison fair, it receives the same plant, controller, measured $\gamma$, $\varepsilon$ and $T$, the same SDP solver, and the same range constraint. Beating it means two things. First, the certified volume must be strictly larger at every swept parameter setting. Second, no encrypted trajectory started inside our region may leave it.

On the linear sanity check the paper reports concrete numbers on its second-order system: an $\ell_2$-gain bound of 5.13 for the basic test, 3.97 for the lifted test, and an empirical lower bound of 1.88. Run with a dissipation inequality in place of the decrease conditions, our amortized certificate should reach at most 3.97, and ideally lower. If it cannot match 3.97 there, the amortization is weaker than lifting, and we will say so. For periodic resets on the chemical batch reactor, Schlor & Allgöwer report bounds between 1.8869 and 1.9508 against 1.8030 nominal. We reproduce those as a calibration of our reset jump map.

Three ablations isolate what is new. The first restricts $V$ to be quadratic in our program, which tests whether polynomial Lyapunov functions are needed. The second forces per-step decrease, $\mu<1$, instead of amortization over the period. The third drops the range constraint, to show how often the unconstrained certificate covers states where the bootstrapping polynomial is invalid. The third is checked against encrypted simulation, where decryption failures are directly observable.

Why not just…?

Why not just linearize and reuse the linear LMI analysis? This is the main threat on mildly nonlinear plants, and the head-to-head comparison above is designed to settle it. A linearized ellipsoid is valid only where the Taylor remainder is small. The swing-equation and phase-locked-loop examples in SOStab have regions of attraction shaped by the trigonometric nonlinearity, which a single ellipsoid covers poorly. If the linearized certificate comes within a small fraction of our volume on all benchmarks, we will report that the polynomial machinery buys little. That would itself be a useful negative result.

Why not just use static polynomial state feedback so nothing accumulates? If every state is measured, this is the right answer. It needs no bootstrapping and no certificate beyond a plaintext one, as in PLYDS. We therefore restrict the benchmarks to output feedback with unmeasured states, where a dynamic observer is unavoidable. The PMSM case is the clearest example: the observer of the SOS PMSM observer paper reintroduces exactly the recursive encrypted state at issue.

Why not just simulate the encrypted loop many times instead of certifying it? Monte Carlo estimation of the empirical region of attraction is cheap and is our ground truth for checking soundness. However, it lower-bounds risk, not upper-bounds it. Worst-case bootstrap errors are adversarially aligned with the unstable direction only rarely, and random sampling over a 4–6-dimensional joint state undercovers boundary states. We report both, along with the fraction of the empirical region our certificate covers. A large gap would signal conservatism to be fixed by higher Lyapunov degree.

Why not just re-encrypt on the client or use a non-recursive window? Client round trips are exact but add per-step communication and abandon non-interactive cloud control, as both Schlor & Allgöwer and Murguia et al. note. The input–output window of Faris et al. requires observable canonical form and a smart actuator. We include it where applicable, on the phase-locked loop, and compare certified volume. Our method targets the plants where it does not apply.

Proposed Experiments

The benchmarks are the second-order phase-locked loop and a reduced swing-equation single-machine model from SOStab, each with a dynamic observer-based controller. We also use the 2D multistable system of Iannelli et al. and a reduced PMSM with its SOS observer. The chemical batch reactor and the second-order linear system serve as linear sanity checks. We keep joint dimension at six or below, given SOStab's reported two hours for a 5-state inner region.

The metrics are four:

  • certified region volume, estimated by sampling;
  • ultimate bound radius;
  • the fraction of the empirical encrypted region that the certificate covers;
  • SDP solve time.

For the linear sanity checks we additionally report the $\ell_2$ bound. On the nonlinear benchmarks no reported encrypted-control result was found on Lacuna, so our method and the linearized baseline are the first entries. Soundness is non-negotiable: one encrypted trajectory leaving the certified set falsifies the error model.

The decisive check is the trade-off curve. As the CKKS scaling factor increases, $\varepsilon$ falls, but the depth budget forces smaller $T$ and therefore more bootstrap injections. The certified volume should then peak at an interior setting. If encrypted simulation confirms that this certificate-selected setting outperforms both extremes, the certificate has shown it can serve as a design tool, not only a proof.