Parameter calibration API

The calibration example estimates selected line lengths and transformer taps from several operating points. It states the fixed network assumptions and the limits of parameter identification. See estimation methods for related problems.

PowerOptLab.CalibLine — Type
CalibLine(; id, bus_from, bus_to, r_per_length, x_per_length, ...)

An uncertain line whose length is a free parameter estimated by solve_parameter_estimation. The series impedance is (r_per_length + j·x_per_length)·length [Ω]; only length is estimated (the nominal per-length impedance is treated as known, following the construction-code model Z = Zⁿᵒᵐ·ℓ of Vanin et al.).

The uncertain lines must be omitted from the physics nets — they are the unknowns, stamped by this function. Single-phase: it connects (bus_from, terminal) to (bus_to, terminal). Separate CalibLine objects model independent conductor branches; they do not reconstruct mutual coupling or share one physical line length.

Keywords

  • id::String — label for reporting.
  • bus_from::String, bus_to::String, terminal::String="1" — the endpoints.
  • r_per_length::Float64, x_per_length::Float64 — per-unit-length series R/X [Ω].
  • length_init::Float64=1.0 — starting guess handed to the solver.
  • length_min::Float64=0.1, length_max::Float64=10.0 — bounds on the estimate.
source
PowerOptLab.CalibTap — Type
CalibTap(; id, tap_min=0.9, tap_max=1.1)

An uncertain transformer/regulator tap estimated by solve_parameter_estimation. Unlike CalibLine, the transformer stays in the physics nets: this just names the transformer id and the tap bounds. The function sets tap_min/tap_max on that transformer so the engine creates its native free-tap variable, then couples the tap equal across all snapshots and reports the estimate.

The reported estimate is the tap multiplier τ on the nominal ratio N₀ = v_nom_from / v_nom_to (so τ = 1 is nominal); the effective turns ratio is N = N₀·τ.

Keywords

  • id::String — transformer id present in every snapshot net.
  • tap_min::Float64=0.9, tap_max::Float64=1.1 — bounds on the multiplier τ.
source
PowerOptLab.solve_parameter_estimation — Function
solve_parameter_estimation(nets, measurements; lines, taps, kwargs...)
    -> ParameterEstimationResult

Calibrate uncertain line lengths and transformer tap ratios from smart-meter time series. The uncertain elements' parameters are shared, time-invariant unknowns; each snapshot supplies noisy (P, Q, |V|) meter readings that are fit in a weighted-least-squares (or robust weighted-least-absolute-value) sense across the whole horizon.

The meters' loads are not baked in as exact injections — each measured user gets a free injection current fit to its noisy P/Q readings (as in state estimation), and the phase-to-neutral voltage magnitude is fit to |V|. Buses with no injection measurement are zero-injection.

Arguments

  • nets::AbstractVector — T per-snapshot physics nets (parse_bmopf output): the known source, the known lines, and the transformers named by taps (kept, so the engine frees their taps). The uncertain lines are omitted — they are the unknowns. No load objects are needed; injections come from the measurements.
  • measurements::AbstractVector — parallel to nets; measurements[t] is a Vector{Measurement} of that snapshot's meter readings. :vmag (SI volts), :pinj, :qinj (SI W/var, injection into the network — negative for a load) are all treated as noisy, weighted by their sigma.

Keywords

  • lines::AbstractVector=CalibLine[], taps::AbstractVector=CalibTap[] — the uncertain elements to estimate (at least one required).
  • neutral="n" — return terminal for the phase-to-neutral projections; pass nothing if phase terminals are referenced directly to ground.
  • objective=:wls — :wls (weighted least squares, smooth) or :wlav (weighted least absolute value, less sensitive to isolated large residuals; the choice in Vanin et al.). WLAV does not automatically identify or remove bad data.
  • per_unit=true, s_base=1e6 — engine unit handling; measurements stay SI.
  • optimizer=Ipopt.Optimizer, verbose=false, solver_options=().

Returns

A ParameterEstimationResult with the estimated lengths and tap multipliers, the RMS voltage residual, and the per-snapshot fitted state.

source
PowerOptLab.ParameterEstimationResult — Type
ParameterEstimationResult

Result of solve_parameter_estimation.

Fields

  • termination_status::String, objective::Float64 — solver status and the optimal weighted-residual value.
  • line_length::Dict{String,Float64} — estimated length per CalibLine id.
  • tap::Dict{String,Float64} — estimated tap multiplier τ per CalibTap id.
  • residual_rms::Float64 — root-mean-square voltage-measurement residual [V], a quick goodness-of-fit / noise-floor check.
  • snapshots::Vector{Dict{String,Any}} — per-snapshot extract_result (SI), the fitted network state at the estimated parameters.
source