Power system single-line diagram and AC state estimator

Load an IEEE Common Data Format (CDF) case to draw its network as an interactive single-line diagram, or add a measurement file and run a full AC weighted-least-squares state estimator. Everything runs in the browser — no file is uploaded anywhere.

Single-line diagram

The network file is parsed into buses and branches, then laid out with a Fruchterman–Reingold force-directed algorithm. Buses are coloured by nominal voltage level, the slack bus is ringed, transformer branches are drawn in orange and labelled with their off-nominal tap ratio, and transmission lines are labelled with their series reactance. The diagram pans and zooms.

AC-WLS state estimation

State estimation finds the voltage magnitudes and angles that best fit a redundant set of noisy measurements. The state vector is x = [θ₂ … θₙ | V₁ … Vₙ] — the slack bus angle is the reference, so an n-bus network has 2n−1 states. The pipeline runs:

  1. Parse the IEEE CDF network file and the eight-block measurement file.
  2. Build the bus admittance matrix Y = G + jB, including off-nominal transformer taps, phase shift and line charging.
  3. Assemble the measurement vector z and the weight matrix W = diag(1/σ²).
  4. Observability analysis — the system is observable when the measurement Jacobian H has rank 2n−1, tested by singular value decomposition. When rank-deficient, observable islands are identified by union-find over measured branches and the unobservable branches are listed.
  5. Gauss–Newton iteration: Δx = (HᵀWH)⁻¹HᵀW[z − h(x)], repeated until max|Δx| falls below tolerance.
  6. Bad-data detection: a chi-squared test on the objective J(x̂) = rᵀWr, then the largest-normalised-residual test with r_N,i = |r_i| / √Ω_ii.
  7. Iterative removal: the worst measurement above r_N = 3 is removed and the estimate re-run, stopping when the solution is clean or when the next removal would make the system unobservable.

Measurement types

The measurement file carries eight blocks in fixed order: voltage magnitude and voltage angle (angle records mark PMU buses), active and reactive power injection, active and reactive branch flow, and branch current magnitude and angle. Each record gives the bus index (or bus pair), the measured value, its standard deviation σ and a status flag. Missing blocks are detected and skipped.

Quantities computed

SymbolQuantityNotes
Y = G + jBBus admittance matrixπ-model with tap and phase shift
HMeasurement Jacobian ∂h/∂xrank gives observability
G_m = HᵀWHGain matrixsingular when unobservable
J(x̂) = rᵀWrWLS objectivechi-squared bad-data test
r_NNormalised residualthreshold 3.0 for bad data
|V|, θEstimated bus voltages and anglescompared against the CDF load-flow solution

Induction motor design calculator · SMPS filter design calculators · Electronic circuits library