Skip to content

AC Power Flow by Newton-Raphson, and a Matched Check of the Radial DER Screen

Research question

How far is the first-order radial voltage-drop screen from a full AC power-flow solution on the same feeder, and does that difference ever change the hosting-capacity answer?

This lab closes the gap named at the end of the radial DER screen: it solves the nonlinear balanced AC equations on a deliberately matched network rather than on a different benchmark feeder. It is an educational positive-sequence model, not a utility planning tool or an interconnection study.

Model

Bus types. One slack bus fixes |V| and angle. PV buses fix P and |V|. PQ buses fix P and Q. Injections are generation minus load in per unit on one MVA base.

Network. Each branch is a pi-equivalent with series impedance (z = r + jx) and total charging (b) split equally between its ends. The bus admittance matrix is

[ Y_{ii} = \sum_{k} \left(\tfrac{1}{z_{ik}} + j\tfrac{b_{ik}}{2}\right),\qquad Y_{ik} = -\tfrac{1}{z_{ik}}. ]

Power-flow equations. With (V_i = |V_i| e^{j\theta_i}), the complex injection is (S_i = V_i \,\overline{(YV)_i}). Newton-Raphson solves the real mismatch for every non-slack bus and the reactive mismatch for every PQ bus:

[ \begin{bmatrix}\Delta P\ \Delta Q\end{bmatrix} = \begin{bmatrix} \partial P/\partial\theta & \partial P/\partial|V| \ \partial Q/\partial\theta & \partial Q/\partial|V|\end{bmatrix} \begin{bmatrix}\Delta\theta\ \Delta|V|\end{bmatrix} ]

using the analytic polar Jacobian. A Gauss-Seidel solver that shares only the admittance matrix is kept as an independent check.

Data

  • data/buses.csv, data/branches.csv: a synthetic three-bus transmission case on a 100 MVA base. Reactances match the three-bus DC lab; resistance, line charging, a PV bus and a reactive load are added so AC effects exist. Not calibrated to any real system.
  • Part B reads the synthetic feeder in ../radial-der-hosting-capacity/data/ directly and imports that project's screen, so the two are guaranteed to use the same network. The feeder is converted to per unit on 1 MVA and the chosen line-to-line kV base.

Run

python -m pip install -r requirements.txt
python run.py                                  # both parts, 12.47 kV feeder
python run.py --v-base-kv 4.16 --step-kw 10    # a feeder where voltage binds
python run.py --der-kvar-per-kw -0.3           # DER absorbing reactive power
python -m unittest discover -s . -p "test_*.py" -v

Outputs go to outputs/ (part_a_buses.csv, part_b_feeder_sweep.csv).

Results this code produces

Part A, transmission case. Newton converges in 3 iterations with mismatch 4.7e-1, 6.6e-3, 2.2e-6, 2.4e-13 pu, which is the quadratic signature. Gauss-Seidel needs 18 sweeps and agrees to 4.5e-11 pu. Real losses are 0.169 MW. The lossless DC angles differ from AC by at most 0.114 degrees.

Part B, matched feeder, DER at bus 4, 10 kW steps.

Case First violation, screen First violation, AC What binds
12.47 kV, unity power factor 900 kW 900 kW Thermal, branch 2-4 (0.8 MVA)
12.47 kV, DER absorbing 0.3 kvar/kW 900 kW (screen has no DER kvar) 850 kW Thermal; absorbed vars add MVA
4.16 kV, unity power factor 720 kW 760 kW Overvoltage at bus 4
4.16 kV, DER absorbing 0.3 kvar/kW 720 kW (screen has no DER kvar) 850 kW Voltage relieved, then thermal

At 12.47 kV the feeder is short enough that the screen's largest max-voltage error over a 0 to 3 MW sweep is 0.0013 pu and the hosting answer is identical. At 4.16 kV the same impedances matter about nine times more, the screen overstates voltage rise (it holds |V| at 1.0 in the denominator and ignores losses), and it under-reports hosting capacity by 40 kW, about 5%. Reactive absorption cuts thermal headroom on the 12.47 kV feeder but adds 90 kW on the 4.16 kV one, which a screen without a DER reactive term cannot see at all.

Required interpretation

  1. Show the convergence order from the mismatch history and explain why Gauss-Seidel is slower.
  2. Explain where the DC approximation's angle error comes from in Part A.
  3. For each Part B row, state which criterion binds and whether the screen is conservative or optimistic.
  4. Explain why the screen's error grows as voltage base falls and why it is conservative for overvoltage here.
  5. Explain why reactive absorption can raise voltage-limited hosting capacity yet lower thermal-limited hosting capacity.

Limitations

Balanced positive-sequence only; no unbalance, no transformers or off-nominal taps, no regulator or capacitor controls, no Q limits on PV buses, constant-power loads, a single snapshot with no time-series coincidence, and no protection, fault-current, or anti-islanding screens. Ratings are apparent-power limits, not conductor ampacity. A real interconnection study uses a utility's validated model and criteria; neither model here substitutes for one.