L33 / Power-flow analysis
Power Flow II
Collect KCL coefficients into Y-bus, then calculate currents and powers at a trial voltage vector.
01 / UNDERSTAND & PREDICT
Understand the model, then predict the result
- 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.
Each KCL equation becomes one matrix row
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
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
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
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
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
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
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
- Keep the original reciprocals: y12=4.587155963−j15.290519878, y13=1.428571429−j4.285714286, y23=2.222222222−j6.666666667 pu.
- Add incident admittances: Y11=6.015727392−j19.576234163; use −y12 for Y12 and Y21.
- 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.
- 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.
- 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.
- 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.
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.
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.
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.
Last Python run and current control reference
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
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.
See the worked solution
- Keep the original reciprocals: y12=4.587155963−j15.290519878, y13=1.428571429−j4.285714286, y23=2.222222222−j6.666666667 pu.
- Add incident admittances: Y11=6.015727392−j19.576234163; use −y12 for Y12 and Y21.
- 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.
- 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.
- 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.
- 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.
Finally, explain in your own words
- What are the inputs, references, and main assumptions?
- 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.
- 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.”
