L36 / Power-flow analysis
Power Flow V
Connect tangent intercepts, coupled corrections and the selected power-flow Jacobian.
01 / UNDERSTAND & PREDICT
Understand the model, then predict the result
- Explain a correction and check the nonlinear residual.
- Select and differentiate the same power balance equations.
Scalar Newton
For f=x²−1, x0=1.5 gives f=1.25 and slope=3. The correction is −0.4166667; x1=1.0833333 still has f=0.1736111. Four corrections first pass 1e−8.
Coupled corrections
For f1=u²+v²−5 and f2=u−v−1, start (1.5,.5). J=[[3,1],[1,−1]], so both corrections are .625. At (2.125,1.125), f1=.78125 and f2=0: one linear solve is not convergence.
Residual sign and selection
Use calculated minus specified: fP=P+PD−PG and fQ=Q+QD−QG. In the three-bus companion x=[theta2,theta3,v3], f=[P2−.55,P3+.90,Q3+.30]. This is the negative of L35 mismatch; J is its derivative, so solve J dx=−f.
Jacobian rows and columns
Rows are P2,P3,Q3; columns are theta2,theta3,v3. Slack phasors and PV magnitudes have no correction columns. H,N,M,L collect P/angle, P/magnitude, Q/angle and Q/magnitude derivatives.
Self terms and angle units
Diagonal identities use CURRENT CALCULATED P and Q, including self terms: Hii=−Qi−Bii vi², Mii=Pi−Gii vi², Nii=Pi/vi+Gii vi, Lii=Qi/vi−Bii vi. Angles in state, derivatives and corrections are radians; display degrees only. A degree derivative needs pi/180.
Equation solution versus operating checks
Recompute original balances after updating. The inner solve holds bus types fixed. After convergence recover slack P/Q and PV Q, then check capability. At a Q limit, release PV magnitude, fix net Q=QGlim−QL and rebuild as PQ. This companion shows a single Newton correction, not an outer Q-limit solver.
Baseline example: check each step
- For f=x²−1, x0=1.5 gives f=1.25 and slope=3. The correction is −0.4166667; x1=1.0833333 still has f=0.1736111. Four corrections first pass 1e−8.
- For f1=u²+v²−5 and f2=u−v−1, start (1.5,.5). J=[[3,1],[1,−1]], so both corrections are .625. At (2.125,1.125), f1=.78125 and f2=0: one linear solve is not convergence.
- Use calculated minus specified: fP=P+PD−PG and fQ=Q+QD−QG. In the three-bus companion x=[theta2,theta3,v3], f=[P2−.55,P3+.90,Q3+.30]. This is the negative of L35 mismatch; J is its derivative, so solve J dx=−f.
Cross-check the original slides
02 / EXPLORE
Change one input and explain the response
Inspect scalar corrections 0 through 4. Change the trial bus angles or magnitude and inspect J, dx and the new nonlinear residual. Explain why radians and the residual sign must be consistent.
Advanced parameters / test readings
Preparing the model.
Original curve and selected tangent
Original scalar residual after corrections
Current intermediate values and numerical checks
Separate scalar and power examples. Fixed slack/PV/PQ classification; this experiment evaluates one undamped power correction, not a complete operating-feasibility solve or Q-limit switching. The full numerical worked iteration is subsequent material. Python independently checks derivatives by central differences. Newton is local and need not converge from every start.
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
Scalar f=x²−1, x0=1.5, iteration=0. Coupled example: f1=u²+v²−5, f2=u−v−1 at (1.5,.5). Separate three-bus companion: 100 MVA; z12=.018+j.060, z13=.070+j.210, z23=.045+j.135 pu; slack1.03∠0, PV2 P=.55 and magnitude1.01, PQ3 P=−.90,Q=−.30. No shunts, unity taps. Power controls are trial inputs; one full Newton correction is evaluated.
Practice uses fixed baseline inputs independently of the controls. Each field displays its tolerance.
See the worked solution
- For f=x²−1, x0=1.5 gives f=1.25 and slope=3. The correction is −0.4166667; x1=1.0833333 still has f=0.1736111. Four corrections first pass 1e−8.
- For f1=u²+v²−5 and f2=u−v−1, start (1.5,.5). J=[[3,1],[1,−1]], so both corrections are .625. At (2.125,1.125), f1=.78125 and f2=0: one linear solve is not convergence.
- Use calculated minus specified: fP=P+PD−PG and fQ=Q+QD−QG. In the three-bus companion x=[theta2,theta3,v3], f=[P2−.55,P3+.90,Q3+.30]. This is the negative of L35 mismatch; J is its derivative, so solve J dx=−f.
Finally, explain in your own words
- What are the inputs, references, and main assumptions?
- Inspect scalar corrections 0 through 4. Change the trial bus angles or magnitude and inspect J, dx and the new nonlinear residual. Explain why radians and the residual sign must be consistent.
- 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.”
