Skip to main content

Module se

Module se 

Source
Expand description

State estimation: recovering the most likely grid state from noisy, redundant, partial measurements.

Power flow answers “given the injections, what are the voltages”. State estimation answers the operational question instead: given a set of measurements that disagree with each other, none of them exact and not enough of them to determine the state directly, what state best explains them.

This module holds the pieces both planned estimator methods share. The measurement set comes from crate::measurement; what lives here is the measurement model — the functions h(x) that say what each measurement would read in a given state.

§Why h(x) is not just “read it off the network”

Three of power-grid-model’s sensor types describe quantities that gridoxide models structurally rather than as appliances, so their measurement functions are not the bus injection despite PGM presenting them that way:

PGM sensorPGM’s modelgridoxide’s modelh(x) here
sourceappliance at the nodevirtual slack bus behind an impedance branchthat branch’s flow
shuntappliance at the nodeY-bus diagonal entry`-
nodesum of all appliances—bus injection plus the two above

Treating any of them as the plain bus injection is wrong by construction, not by a sign: gridoxide’s power_injections at a source node is zero by KCL, because the source’s power arrives through a branch that is part of the network. tests/measurement_residual_test.rs is what established this — it reported a 63-sigma disagreement on exactly that quantity.

Modules§

bad_data
Detecting and identifying measurements that disagree with the rest.
batch
Batched state estimation: one topology and one measurement structure, many readings, estimated across cores.
case
A network, a starting state and a measurement set that agree with each other — what an estimate is run on.
constraints
Zero-injection buses as hard equality constraints.
functional
Every quantity the estimator measures, as one shape.
iterative
Iterative-linear state estimation: power-grid-model’s default method.
jacobian
The measurement Jacobian H and the gain matrix G = HᵀWH.
nr
Weighted-least-squares state estimation by Gauss-Newton.
observability
Observability analysis: which parts of the state the measurements actually determine.

Structs§

MeasurementModel
One resolved CurrentFunctional per measurement, in input order.
SeNetwork
Everything h(x) needs about the network, beyond the state itself.

Functions§

measurement_functions
Evaluates h(x) for every measurement in measurements, in order.
measurement_functions_with
measurement_functions against an already-resolved model.