Skip to main content

Module functional

Module functional 

Source
Expand description

Every quantity the estimator measures, as one shape.

A power measurement — a bus injection, a branch terminal flow, a source’s output, a shunt’s draw, power-grid-model’s node injection — is always the same thing written five ways: a current, linear in the complex bus voltages, evaluated against the voltage at one bus.

I = Σ c_k·V_k        S = V_at · conj(I)

c and at are all that distinguish the five. A bus injection’s c is its Y-bus row; a branch terminal’s is that branch’s own half-row; a shunt’s is a single negated admittance. Writing them once means the measurement model, its Jacobian and the iterative-linear method’s row builder stop being three independent statements of the same physics that can disagree — a disagreement that used to surface only as the_two_methods_agree failing, with nothing to say which side was wrong.

It is also what keeps three-phase tractable. A three-phase branch terminal flow depends on six phasors rather than two, which under a fixed-arity FlowDerivs means twenty-four named fields and a second finite-difference test; here it is a longer coefficient list and the same loop.

Structs§

CurrentFunctional
A terminal current as a sparse linear functional of the complex bus voltages, plus the bus whose voltage turns it into a power.
Partial
One bus’s contribution to a quantity’s derivative, as the pair of partials with respect to that bus’s polar state.

Functions§

current_partials_of
Partials of I itself, rather than of the power it forms.
local_current_of
S/|V_at|, the quantity a local-angle current sensor reads.
local_current_partials_of
Partials of S/|V_at|, the local-angle current frame.
power_partials_of
CurrentFunctional::power_partials against borrowed parts.