Loss Models That Survive Topology Change: Invariant Surrogates for Conversion Loss in Hierarchical DC Microgrids

Microgrids are run by a stack of controllers. A slow planner at the top schedules power every few minutes using Model Predictive Control (MPC), meaning it repeatedly optimizes a short future horizon. A middle layer turns those power targets into voltage targets. Fast local controllers at the bottom hold voltages steady. To keep its optimization tractable, the top planner usually treats the heat lost in power converters and wires as zero or as a fixed fraction of load. A cheap fix is to learn a loss predictor from operating data. We argue that such a learned predictor will fail in the same way genetic risk models fail when moved from European cohorts to other ancestries. The variables it relies on are stand-ins for the real cause, and the link between stand-in and cause is a property of the population where the data were collected. In genetics, a marker variant predicts disease only because it travels with the causal variant in one ancestry. In a microgrid, total feeder load predicts conversion loss only because, under one topology and one mix of load types, total load tracks the branch currents and converter operating points that actually produce the heat. Switch a generation unit off, or shift the mix toward constant-power electronics, and that link breaks.

The proposal is to treat each microgrid configuration as a "population," find which loss predictors stay valid across populations using invariant causal search, and give the top-layer planner a loss surrogate built only from those predictors. The test is leave-one-configuration-out. A planner trained on some topologies and load mixes is deployed on an unseen one. We measure how much loss it actually incurs, how often the middle layer cannot meet its targets, and how much it costs relative to a planner that knows the exact physics.

Core Claim

Learned conversion-loss surrogates in tertiary (top-layer) planners have a transfer failure with the same structure as linkage-disequilibrium breakdown in Mendelian randomization. Restricting the surrogate to predictors whose relationship to loss is invariant across deliberately varied configurations should reduce three things on unseen configurations: realized loss, voltage-reference infeasibility at the secondary layer, and cost. Pooled flexible models and per-configuration models should not achieve the same, at a planner cost well below embedding full nonlinear power flow.

The direction-3 material plays two roles here. It is the diagnostic lens: tagging variables, weak-instrument-like loss of relevance, and pleiotropy-like effect shifts. It also supplies the method, invariant search. Directions 1 and 2 supply the physical problem and the test system.

Grounding in Prior Work

Three engineering results motivate the work. Sun et al. measure 15–30% efficiency drops from redundant conversion in centralized data-center power chains. Brewer et al. report conversion overhead that "can easily exceed a megawatt" at exascale. Görner et al. show that consumer converters are inefficient at low load. That low-load effect is the reason loss depends on each converter's operating point and not on aggregate demand.

The constraint and the test bed come from Nahata et al.. Their secondary layer converts planner power targets into voltage references by solving DC power-flow equations that include line and converter-filter losses. They prove the equations are solvable, handle generation units switching on and off, and note that planners which ignore losses push infeasibility down to lower layers. We reuse their architecture and their 16-bus system unchanged. What we add is a fast, transferable loss model at the planner level, where their scheme needs centralized global impedance knowledge. Two other planner-level papers show the abstraction we target. Wang and Huang assume lossless transfer in Nash-bargaining trades between microgrids. Li et al. use linearized conversion efficiencies.

The method comes from Invariant Ancestry Search (IAS). IAS takes the union of minimally invariant predictor sets across environments to find causal ancestors of a target. It avoids the frequently empty output of Invariant Causal Prediction (ICP), a method that keeps only predictors appearing in every invariant set. On yeast deletion data IAS found 23 invariant pairs with 7 confirmed, against ICP's 8 pairs with 6 confirmed. IAS has only been run on static graphs. We apply it at the quasi-static timescale of the planner.

The genetics papers sharpen the analogy and set the stratified baseline. Zhu et al. built GSMR, which uses its HEIDI-outlier step to discard instruments whose effects are heterogeneous. We borrow that idea as a deployment-time monitor. Jones et al. show that group-specific thresholds raised monogenic diabetes detection from 8.8% to 16%. That result is the strongest argument for the simpler alternative of stratifying, and we test that alternative directly.

Research Program

The setup works at the planner's 15-minute timescale. We treat the three layers in a quasi-static way: the setpoints the planner chooses are exogenous inputs, and steady-state losses are the response. This sidesteps the feedback cycles that would otherwise violate IAS's acyclicity assumption.

The target is total conversion plus line loss. The candidate predictors fall into three groups. The first are aggregate quantities such as total load, ambient temperature, and time of day. The second are per-unit quantities: power at each generation unit, battery charge and discharge rate, and bus voltages. The third are compositional quantities, namely the shares of constant-power, constant-current, and resistive load.

Environments are defined by varying topology (which units are active, which lines are in service), load-type composition, and converter efficiency curves. The efficiency-curve variation stands for fleets from different manufacturers. Because this is simulation, we can also randomize planner setpoints within safe bounds. These randomizations act as genuine interventions that give IAS the environment contrasts it needs, and they mirror small exploratory perturbations that could be used on a real system.

From IAS's invariant ancestor set we fit a small surrogate, either a quadratic or a monotone network. The quadratic form follows from losses scaling roughly with the square of current through a resistance. The surrogate enters the MPC objective as a convex term, and the secondary layer of Nahata et al. executes the resulting setpoints. Alongside it runs a HEIDI-style monitor. It tests whether per-predictor effects in recent operation differ from their training-time estimates, and flags configurations where the invariance assumption appears to fail.

Baselines

The naive reference point is the lossless tertiary MPC used in most of the planner literature, including Wang and Huang. Losses are left to the secondary layer to absorb. A second naive point applies a constant efficiency factor, in the spirit of the linearized efficiencies of Li et al.. Beating these is necessary but not interesting.

The strongest learned competitor is a pooled flexible model. It is a neural network trained on all predictors and all training configurations, with the online error-autocorrelation correction and retraining that Bünning et al. found effective for demand forecasting. It gets the same data, the same feature set (a superset of ours), and the same hyperparameter search budget. It retrains online on the held-out configuration at the same rate the invariant surrogate's monitor is allowed to refit.

The strongest physics competitor is a tertiary MPC with a linearized DC power-flow loss model built from known line impedances and converter curves. This is the "just use the physics" planner. It is given exact impedances, which is an advantage our method does not have.

The oracle is MPC with the full nonlinear loss model of Nahata et al.. It defines the cost floor and the upper end of solve time.

The stratified baseline fits a separate surrogate per known configuration class, in the manner of Jones et al.. On a new configuration it uses the nearest class. Two ablations isolate the key ingredient. The first uses ICP's intersection set in place of IAS's union, which tests whether union-versus-intersection matters here. The second uses IAS without randomized setpoints, which tests whether deliberate interventions matter.

No reported result found on Lacuna for loss-aware tertiary MPC on the modified 16-bus DC system. Nahata et al. report stability and solvability, not loss percentages, so all baseline numbers will be produced here. Beating the pooled model means lower realized loss and fewer secondary-layer infeasibility events on held-out configurations, with confidence intervals across seeds that do not overlap, at equal training data. Beating linearized physics means coming within its cost on held-out configurations without being given impedances, and doing so at lower solve time once mixed-integer switching is included.

Why not just…?

Why not just embed the physical loss model in the planner? This is the most serious threat. If impedances and converter curves are known and current, linearized power flow may be enough, and learning adds nothing. The open problem identified by Nahata et al. is that this route is centralized and scales poorly with mixed-integer switching. The physics is also only as good as the parameter records, which drift with aging and replacement. We include the linearized-physics planner with exact parameters, and a version with perturbed parameters. If the exact-parameter physics planner dominates and the perturbed version does too, the contribution reduces to the case where no impedance model exists, and we will say so.

Why not just pool all data into a flexible model with online retraining? Bünning et al. show that ANNs with online correction work. Their reported figure is 13.4% of consumption offered as flexible reserve. However, that was one building with a buffer tank absorbing forecast error. Our hypothesis is that pooling over many configurations still learns the aggregate-load shortcut whenever that shortcut holds in most training configurations. Online retraining then repairs it only after costly infeasibilities. The held-out experiment settles this. If the pooled model matches ours in both the first hours and steady state, the invariance claim is wrong.

Why not just stratify by configuration, as Jones et al. did for ethnicity? Stratification works when target groups are known in advance and well sampled. That is the case in the clinical setting, where it doubled detection rates. Microgrid topologies combine combinatorially, so the deployed configuration is often one never seen in training. The stratified baseline on held-out configurations tests whether nearest-class transfer is enough. If it is, the simpler method wins.

Why not just use ICP? Invariant Ancestry Search shows that ICP often returns empty sets under weak interventions. An empty set here means a constant-loss planner. The ICP ablation measures whether that happens in this setting.

Proposed Experiments

The main experiment uses the modified 16-bus DC system of Nahata et al.. We generate about 40 configurations from combinations of active generation units, line outages, three load-composition regimes, and two converter efficiency families. Load and PV profiles are taken from the public sources used by Wang and Huang: ISO New England prices and Hong Kong Observatory weather. Evaluation is leave-one-configuration-out. Results are reported separately for held-out configurations inside the training range and for those that reverse the aggregate-load–current relationship, which is the analogue of an ancestry with different linkage structure.

Metrics are realized loss as a percentage of delivered energy, the count of secondary-layer infeasible or voltage-limit-violating references, operating cost gap relative to the oracle, and planner solve time.

The decisive check is a predicted pattern. The invariant surrogate and the pooled model should tie on in-range configurations. They should diverge only on reversed configurations. The HEIDI-style monitor should fire on exactly the configurations where the invariant set itself fails, for example new converter families whose loss curve changes shape. If the advantage appears everywhere or nowhere, the tagging-variable explanation is not what is driving the result.

A secondary experiment repeats the evaluation inside a two-microgrid bargaining market with losses accounted for. It asks how much of the up-to-22% trading gain reported by Wang and Huang remains once losses are counted, under each loss model.