run_comparison#

popo.estimation.run_comparison(master, load_shapes, steps, smartmeter_frac, forecast_error, base_kw=1.3, power_factor=0.95, seed=20260904, noise=None, transformer_index=0)#

Compare state estimation from coherent versus incoherent substation input.

For each time step, the true demand is drawn from load_shapes and solved for the true network state. Three substation measurement sets are then built around that truth – truth itself, a coherent perturbation propagated through a re-solve, and an incoherent perturbation of each quantity on its own – and each is fed to the same weighted-least-squares estimator, with the same smart-meter coverage, so the only thing that differs between the three rows is whether the measurement triple was ever a state the network could be in.

Parameters:
  • master (Path) – Master .dss file of the circuit to convert.

  • load_shapes (ndarray) – Per-unit household demand shapes, shape (steps_available, pool_size), with steps_available >= steps. One column is drawn per customer and held fixed across the whole run, as the original study did.

  • steps (int) – Number of time steps to run.

  • smartmeter_frac (float) – Fraction of customers whose meters are available as pseudo-measurements, identical across all three labels so the comparison isolates the effect of coherence rather than coverage.

  • forecast_error (float) – Standard deviation of the measurement perturbation, as a fraction of the reading.

  • base_kw (float) – Nominal per-customer active-power scale; the load shapes carry the time variation, this carries the magnitude.

  • power_factor (float) – Assumed customer power factor, used to derive reactive demand from the active-power shape.

  • seed (int) – Seed for customer-shape assignment and for the perturbations drawn during the run.

  • noise (MeasurementNoise | None) – Measurement deviations passed to the estimator; None uses MeasurementNoise’s defaults.

  • transformer_index (int) – Which transformer’s secondary is the measured busbar, passed through to to_pandapower().

Return type:

ComparisonResult

Returns:

A ComparisonResult with one row per step and label.

Raises:

ValueError – If load_shapes has fewer rows than steps.