← All courses KANSAS STATE UNIVERSITY / ECE 685

L33 / Power-flow analysis

Power Flow II

Collect KCL coefficients into Y-bus, then calculate currents and powers at a trial voltage vector.

Available40 slides
Y-bus assembly and equipment updates

01 / UNDERSTAND & PREDICT

Understand the model, then predict the result

Finalized lecture slides

Open / download original PDF ↗

Follow the original explanations, diagrams, derivations, and examples in slide order, then use the companion experiment below.

L33 original slide 1 of 40
L33 · 1 / 40
Slide text
Loading slide text.

Figures and page order follow the student PDF for this lecture.

A branch connects buses 1 and 2. Which four matrix entries change? Assemble the original three-bus network, then add the charging, shunt and optional tap from the revised lecture.
  • Read diagonal and off-diagonal entries directly from KCL voltage coefficients.
  • Evaluate I=Ybus V and S=diag(V)I*, keeping each bus distinct.
  • Update only the contributions of the changed equipment and verify the result against port currents.
Y-bus assembly and equipment updates: baseline circuit or quantitative model illustration
Model illustration at baseline inputs. Change the parameters in the next section to explore the live diagram.

Each KCL equation becomes one matrix row

\mathbf I=\mathbf Y_{\rm bus}\mathbf V

Fix the same bus ordering for rows, columns and vectors. Yik is the coefficient of Vk in the equation for Ii. Bus powers are evaluated only after the current vector is known.

Series branches contribute four entries

\begin{gathered}Y_{ii}=\sum_{k\in\mathcal N_i}y_{ik},\quad Y_{ik}=-y_{ik}\\\Delta\mathbf Y_{ik}=y_{ik}\begin{bmatrix}1&-1\\-1&1\end{bmatrix}\end{gathered}

For a unity-tap series branch, add y to both endpoint diagonals and −y to both mutual entries. Parallel branches add their admittances. A path through another bus is not a direct off-diagonal connection. Opening a branch removes its entire contribution.

Current and complex power are different operations

\mathbf S=\operatorname{diag}(\mathbf V)(\mathbf Y_{\rm bus}\mathbf V)^{*}

Matrix multiplication sums voltage contributions for each current. For power, conjugate each current and multiply by that same bus voltage. Do not sum powers across buses during this elementwise operation. With three-phase per-unit bases, no extra factor of three is needed.

Charging and bus shunts change the diagonals

\Delta\mathbf Y_{\rm sh}=\operatorname{diag}(0,j0.02,j0.14)

The example adds total line 2–3 charging bc23=0.04 pu: j0.02 goes to each of Y22 and Y33. A separate bus 3 capacitive shunt j0.12 adds only to Y33. Together the changes are j0.02 and j0.14; do not add charging again when using the assembled matrix.

Optional real tap: replace this branch only

\Delta Y_{11}=y_{12}(t^{-2}-1),\quad\Delta Y_{12}=\Delta Y_{21}=y_{12}(1-t^{-1})

Place a real tap t on the bus 1 side of branch 1–2. Replace its bus 1 self contribution by y12/t² and both mutual contributions by −y12/t. The bus 2 self contribution stays y12. Keep all other branch and shunt contributions. The example uses t=1.05.

Backup: complex tap needs the correct conjugate

\begin{gathered}Y_{ii}^{(ik)}=y/|t|^2,\quad Y_{kk}^{(ik)}=y\\Y_{ik}^{(ik)}=-y/t^{*},\quad Y_{ki}^{(ik)}=-y/t\end{gathered}

For t=τ exp(jθt) on the from side, the internal voltage is Vi/t and the external current is the internal current divided by t*. The mutual entries generally differ for phase shifting. The internal point adds no network bus. Ordinary reciprocal series networks are complex symmetric, not generally Hermitian.

Use structural checks with their assumptions

\sum_i P_i=\sum_{(i,k)}R_{ik}|I_{\rm series,ik}|^2

Without shunts or non-unity taps, each row sum is zero and Ybus is singular before imposing a reference. Shunts or taps can make row sums nonzero; a phase shift can break symmetry. These are expected model changes. In every case compare Ybus V with independently summed physical port currents and reconcile total complex power.

Baseline example: check each step

  1. Keep the original reciprocals: y12=4.587155963−j15.290519878, y13=1.428571429−j4.285714286, y23=2.222222222−j6.666666667 pu.
  2. Add incident admittances: Y11=6.015727392−j19.576234163; use −y12 for Y12 and Y21.
  3. With trial V=(1.02,1.00,0.98−j0.02), I=(0.234600262−j0.448667540, 0.086034659+j0.216921509, −0.320634921+j0.231746032) pu.
  4. Multiply each voltage by its conjugated current: S=(0.239292267+j0.457640891, 0.086034659−j0.216921509, −0.318857143−j0.220698413) pu. These are calculated injections, not a solved load schedule.
  5. To reproduce Example 2, set bc23=0.04, Bsh3=0.12, t12=1.05 and phase angle 0°. Only Y22 and Y33 get shunt additions; replace the three affected tap contributions.
  6. The updated Y11≈5.589257109−j18.154666556, Y12=Y21≈−4.368719965+j14.562399884, Y22≈6.809378186−j21.937186544 and Y33≈3.650793651−j10.812380952 pu.
Original slide headings for this lecture40
  1. 1Power Flow II
  2. 2Lecture outline
  3. 3PART 1: Building Y-bus from the network
  4. 4Why use matrix form?
  5. 5Current equations at the three buses
  6. 6Collect the voltage coefficients
  7. 7Arrange the equations in matrix form
  8. 8Self and mutual admittances
  9. 9The matrix for a general network
  10. 10Diagonal entries in a general network
  11. 11Off-diagonal entries in a general network
  12. 12Construct Y-bus: diagonal, then off-diagonal
  13. 13Calculate the bus current vector
  14. 14Calculate the bus power vector
  15. 15PART 2: Extending an existing Y-bus
  16. 16Add one shunt at bus 2
  17. 17Add shunts to a general network
  18. 18Transformer tap: matrix coefficients (optional)
  19. 19Extended Y-bus (optional)
  20. 20Updating an existing Y-bus
  21. 21PART 3: Numerical example and extension
  22. 22Example 1: original network
  23. 23Example 1: branch admittances
  24. 24Example 1: diagonal entries
  25. 25Example 1: off-diagonal entries
  26. 26Example 1: complete Y-bus
  27. 27Example 1: calculate the current vector
  28. 28Example 1: power injections in matrix form
  29. 29Example 2: equipment additions
  30. 30Example 2: charging and bus shunt
  31. 31Example 2: tap diagonal entries (optional)
  32. 32Example 2: tap mutual entries (optional)
  33. 33Example 2: updated Y-bus (optional)
  34. 34Summary
  35. 35Backup slides
  36. 36Backup: complex tap and port relations
  37. 37Backup: diagonal coefficients
  38. 38Backup: off-diagonal coefficients
  39. 39Backup: general diagonal update
  40. 40Backup: general off-diagonal update
Cross-check the original slides

02 / EXPLORE

Change one input and explain the response

First reproduce the original matrix. Add bc23=0.04 and Bsh3=0.12, then the optional t12=1.05. Observe which entries change. Open branch 2–3 and verify its charging also disappears. Use the backup phase control to test why Y12 and Y21 then differ. The two curves evaluate trial voltages; crossing one specified-power line does not solve both P and Q.

Advanced parameters / test readings

Preparing the model.

Re(Y11)—
Im(Y11)—
Re(Y12)—
Im(Y12)—
Calculated P3—
Calculated Q3—
Largest row-sum magnitude—
Largest transpose difference—

Trial voltage angle: calculated and specified P3

Trial voltage magnitude: calculated and specified Q3

Current intermediate values and numerical checks

Balanced positive-sequence steady-state model on the fixed common 100 MVA base. Voltages are trial inputs, not a nonlinear power-flow solution. Generator operating controls, PV/PQ/slack assignments, limits and voltage iteration belong to later lectures. The series exercise has no charging or bus shunts; L33 adds these explicitly. The optional tap is on the bus 1 side of branch 1–2, neglecting excitation. Every terminal current points into its passive branch.

03 / EDIT & COMPUTE

Edit code to reproduce the model independently

Reproduce the baseline, then modify the parameter scan. The source contains reusable independent model functions; edit the current function and inspect numerical checks.

case is a snapshot of the controls when you press Run. Call solve(case) and assign the final solution to result to plot it.

Download teaching models

The first run needs internet access to download Python. Computation stays in your browser; the solver uses only the standard library.

Ready to run.

Output appears here.
Inspect and edit the model source (advanced)

Edit this module's function and run again. case.module selects the module; solve(case) returns values, plots, and checks. The parameter experiment keeps the original JavaScript reference for comparison.

04 / CHECK & EXPLAIN

Companion experiment practice and feedback

Fixed practice inputs

Common 100 MVA base; z12=0.018+j0.060, z13=0.070+j0.210, z23=0.045+j0.135 pu. Unity taps; no charging or shunts; all three branches in service. Trial V=(1.02, 1.00, 0.98−j0.02) pu is borrowed from L33 for numerical evaluation. The L32 bus 3 load target is 90 MW + j30 Mvar; it is not satisfied by these trial voltages.

Practice uses fixed baseline inputs independently of the controls. Each field displays its tolerance.

±1e-05 pu
±1e-05 pu
±1e-05 pu

Add total charging bc23=0.04 pu and bus shunt j0.12 at bus 3. Which matrix changes occur before adding a tap?

Finally, explain in your own words

  1. What are the inputs, references, and main assumptions?
  2. First reproduce the original matrix. Add bc23=0.04 and Bsh3=0.12, then the optional t12=1.05. Observe which entries change. Open branch 2–3 and verify its charging also disappears. Use the backup phase control to test why Y12 and Y21 then differ. The two curves evaluate trial voltages; crossing one specified-power line does not solve both P and Q.
  3. Did your code edit change physical parameters, the method, or representation bases? Which check helps identify that?

Passing numerical and understanding checks records this lecture’s companion practice as “practice checks passed.”

ECE 685 · L33

Course learning assistant

Ask about course material, request an explanation, or follow up.

Choose a context, then ask “What does this mean?”