Spending the Stability Margin on Encryption: Low-Precision Homomorphic Feedback Optimization for Distribution Grids

Feedback controllers for distribution grids have a useful property: they do not need an accurate model. Online feedback optimization measures the grid, nudges inverter setpoints in a direction suggested by a rough linear "sensitivity" model (how much each bus voltage moves per unit of injected power), and repeats. The real grid does the hard nonlinear physics on every cycle, and the measurements correct whatever the model got wrong. We propose to use that tolerance for model error to pay for encryption. The controller runs on an untrusted server over homomorphically encrypted data, meaning encryption that allows arithmetic on ciphertexts without decrypting them. In the lattice schemes that support multiplication, every operation adds a little random noise to the hidden value, and the noise must be kept below a decoding threshold. Our claim is that this noise looks to the controller like extra error in the sensitivity model. The same feedback loop that absorbs linearization error can therefore absorb deliberately coarse encryption parameters. The loop also refreshes ciphertexts as a side effect of actuating, so no expensive refresh procedure is ever run.

This matters because the controllers that are robust enough to deploy also need privacy. They adapt their sensitivity model online, and that model reveals the feeder topology, while the measurements reveal customer load profiles. Adapting the model requires multiplying encrypted quantities together, which rules out the cheap additive encryption schemes used in every prior privacy-preserving power-dispatch paper in our file. Multiplication-capable schemes are slow when sized conservatively. We want to show they can be sized from a physics-derived error budget instead.

Core Claim

Consider the CKKS scheme, an approximate-arithmetic lattice encryption scheme whose decrypted outputs carry small numerical errors. When adaptive feedback optimization runs under CKKS, those errors enter the closed loop only through the encrypted sensitivity estimate and the encrypted gradient step. Closed-loop convergence depends on a single combined error, not on each error source separately. Let $H$ be the true voltage-to-injection sensitivity at the current operating point, $\hat H$ the plaintext estimate, and $\tilde H$ what the encrypted controller effectively applies. The quantity that must stay inside the controller's stability margin $\rho$ is

$$ \|\tilde H - H\| \;\le\; \underbrace{\|\hat H - H\|}_{\text{linearization and estimation error}} \;+\; \underbrace{\|\tilde H - \hat H\|}_{\text{encryption noise}} \;<\; \rho . $$

The encryption term grows with the number of chained multiplications since the ciphertext was last freshly encrypted, and it shrinks as the encoding scale grows. Both are design choices. Two things are new. First, we choose cryptographic parameters (scale, modulus, refresh interval) by allocating whatever share of $\rho$ the physical error leaves unused, rather than by targeting a fixed numerical precision. Second, the physical error is known to grow with electrical distance from the substation, as shown by Scalable Optimization Methods for Distribution Networks With High PV Integration. So the budget is spatially uneven, and precision should be allocated per feeder segment, not uniformly.

The refresh mechanism is the physics-informed part. Every cycle, the field side must decrypt setpoints in order to actuate. It then re-encrypts fresh voltage measurements and its own known setpoints. These quantities therefore never accumulate noise across cycles, and the grid's response to the new setpoints acts as the next iteration of the algorithm. Only the persistent encrypted state, the recursively updated sensitivity estimate, accumulates multiplicative depth. We bound that depth with a windowed update that is re-anchored every $K$ cycles, with $K$ derived from the budget above.

Relation to Prior Work

Three papers motivate the gap. Deployment of an Online Feedback Optimization Controller for Reactive Power Flow Optimization in a Distribution Grid ran a controller with a constant approximate sensitivity on a live Swiss feeder. It showed that feedback tolerates model mismatch, but it used plaintext SCADA links. Adaptive Real-Time Grid Operation via Online Feedback Optimization with Sensitivity Estimation updated the sensitivity by recursive least squares and stayed stable under a 20% admittance error, where the static controller diverged. Its updates multiply measurement-dependent quantities together, so they cannot be run under additive encryption. Reverse and Forward Engineering of Local Voltage Control in Distribution Networks supplies the analytical template. Its incremental controllers separate convergence conditions from regulation targets, and that separation lets us state the margin $\rho$ explicitly on radial feeders.

Two papers constrain the design. Encrypted Accelerated Least Squares Regression showed that accelerated gradient methods burn encryption depth twice as fast as plain gradient descent, so we use plain gradient steps. A polynomial-based QCQP solver for encrypted optimization enforces constraints with high-degree polynomial penalties, and those penalties exhaust depth quickly. We avoid encrypted constraint handling entirely: inverter capacity limits are enforced by the field-side projection at actuation, which is plaintext and local.

Two papers are the closest prior art, and our proposal departs from both. Privacy-Preserving Distributed Optimal Power Flow with Partially Homomorphic Encryption and Privacy preserving distributed optimization using homomorphic encryption both use additive Paillier encryption for offline iterative dispatch. Neither involves noise accumulation or a physical loop. Implementing homomorphic encryption based secure feedback control ran encrypted feedback on a pendulum and controlled ciphertext growth by resetting controller memory. Resetting would erase a learned sensitivity, so we replace resetting with a margin-budgeted re-anchoring.

Research Program

Threat model. The field side holds the decryption key: the utility's sensors and inverter gateways. An honest-but-curious optimization server holds only ciphertexts and the evaluation keys. The motivating case is a third-party aggregator serving many feeders, where the utility does not want to expose its topology-derived sensitivities or customer measurements.

Encrypted controller. The server computes a projected-gradient-style setpoint step. It also performs a windowed sensitivity update (a least-squares update over the last $K$ cycles) whose multiplicative depth is fixed by $K$. All of this is in CKKS, with no bootstrapping, the homomorphic re-encryption procedure that is the standard expensive refresh.

Analysis. We will extend the convergence argument for incremental voltage control to inexact sensitivities. The goal is to obtain $\rho$ as a function of feeder impedances and step size, and to obtain how far the operating point stays from the optimum as a function of the combined error. The spatial structure of the linearization error then becomes a per-segment budget.

Parameter-selection procedure. Given a feeder model and a target latency, the procedure outputs the encoding scale, the modulus chain length, and $K$.

Stress test. We will test where the margin vanishes. PF∆: A Benchmark Dataset for Power Flow under Load, Generation, and Topology Variations documents near-singular power flow Jacobians close to voltage collapse. There $\rho$ should shrink toward zero, and any encryption noise should become destabilizing. We expect this regime to define the method's limits.

Baselines

Plaintext adaptive controller. This is the recursive-least-squares controller of Adaptive Real-Time Grid Operation via Online Feedback Optimization with Sensitivity Estimation, run unencrypted. It is the strongest competitor because it is exactly what we encrypt, so it is an upper bound on control quality. It will be run on the identical IEEE 123-bus setup with the same load and solar traces, the same 20% initial admittance error, the same step size and excitation signal, and the same tuning budget. Beating it is not the goal. Success means staying within a small, pre-registered gap in cumulative voltage-violation and cost-to-optimum metrics while meeting the cycle deadline. The file reports this controller's robustness only qualitatively; no reported result found on Lacuna for its numeric tracking error on the 123-bus feeder, so we will regenerate it.

Static-sensitivity controller. This is the plaintext controller of Deployment of an Online Feedback Optimization Controller for Reactive Power Flow Optimization in a Distribution Grid. It can be encrypted cheaply with additive Paillier, because it multiplies ciphertexts only by plaintext constants. We will run it both in plaintext and under Paillier with matched key sizes. This tests whether adaptation is worth multiplicative encryption at all.

Naive reference points. One is no control. The other is local droop, which Stability Constrained Voltage Control in Distribution Grids with Arbitrary Communication Infrastructure outperforms on the UCSD 49-bus microgrid. That paper reports a 70.6% voltage-deviation-cost reduction under full communication against an 80.8% OPF limit. On that microgrid, our encrypted controller should approach the communicating controller's 70.6%, not the local-only figure.

Conventionally sized CKKS. This is the same controller under CKKS parameters chosen the standard way: generous precision and either bootstrapping or field-side refresh every cycle. It isolates the value of margin-based sizing, which should show up as lower latency and smaller ciphertexts at equal control quality.

Ablations. Three ablations isolate the key ingredient. The first replaces distance-aware precision allocation with uniform precision. The second sweeps $K$. The third replaces CKKS noise with injected Gaussian noise of matched magnitude in a plaintext controller, which tests whether encryption error behaves like generic sensitivity error, as the core claim requires.

Why not just…?

Why not just use Paillier, which never accumulates noise? This is the serious threat. If a static sensitivity suffices, Paillier is simpler and our method is unnecessary. The evidence against it as a general answer is that static sensitivities diverge under a 20% admittance error (Adaptive Real-Time Grid Operation via Online Feedback Optimization with Sensitivity Estimation). Paillier cannot multiply two ciphertexts, and Privacy preserving distributed optimization using homomorphic encryption states that its Paillier scheme is limited to affine functions. The static-Paillier baseline settles this directly. If it matches our method across the mismatch sweep, we will report that adaptation is not worth the cost.

Why not just add differential-privacy noise? On an 85-bus feeder, Privacy-Preserving Distributed Optimal Power Flow with Partially Homomorphic Encryption reports 35 iterations and a 0.8754% optimality gap with encryption, against 79 to 576 iterations for differential-privacy baselines. In real-time control, such slowdowns translate into longer voltage excursions. Our Gaussian-noise ablation also measures how much injected perturbation the loop tolerates. If differential-privacy noise at a meaningful privacy level fits inside $\rho$, that is a real result, and we will report it.

Why not just do the adaptation locally and skip the server? If the field side has enough compute, it should do this, and our method addresses only the outsourced setting. We will report field-side compute requirements for local recursive least squares alongside our encryption and decryption costs, so readers can see where outsourcing pays.

Proposed Experiments

Primary experiment. We use the IEEE 123-bus feeder with the ECO 1-second load data and HelioClim-3/MERRA-2 renewable traces, following Picallo et al. We sweep the initial admittance error from 0 to 30%, and we test one-minute control cycles (the deployed cadence) as well as faster ones. Metrics are cumulative voltage-limit violation, cost gap to a per-snapshot AC-OPF optimum, cycle latency, ciphertext bytes per cycle, and count of decryption failures.

Transfer experiment. We repeat on the UCSD 49-bus model against the reported 70.6% figure.

Decisive checks. The core claim fails if any of the following holds. First, margin-sized CKKS fails to close most of the latency gap to Paillier while matching the plaintext adaptive controller's quality. Second, matched Gaussian noise and CKKS noise produce materially different closed-loop behavior, which would mean encryption noise is not equivalent to model error. Third, distance-aware allocation does no better than uniform allocation. Separately, on PF∆ near-infeasible IEEE-118 cases, we will plot the sensitivity-error tolerance against Jacobian conditioning. We predict a collapse of $\rho$ near the stability boundary. If that holds, the method should be paired with a fallback to conservative local control in that regime, and we will document where this happens.