← All courses KANSAS STATE UNIVERSITY / ECE 685

L36 / Power-flow analysis

Power Flow V

Connect tangent intercepts, coupled corrections and the selected power-flow Jacobian.

Available43 slides
Newton corrections and the power-flow Jacobian

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.

L36 original slide 1 of 43
L36 · 1 / 43
Slide text
Loading slide text.

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

A tangent predicts a zero. Check the original equation before accepting it, then apply the same correction system to power balance.
  • Explain a correction and check the nonlinear residual.
  • Select and differentiate the same power balance equations.
Newton corrections and the power-flow Jacobian: baseline circuit or quantitative model illustration
Model illustration at baseline inputs. Change the parameters in the next section to explore the live diagram.

Scalar Newton

x^{r+1}=x^r-f(x^r)/f\prime(x^r)

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

J\Delta x=-f,\quad x^{r+1}=x^r+\Delta x

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

x=(\theta_2,\theta_3,v_3)^T

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

J=\begin{bmatrix}H&N\\M&L\end{bmatrix}

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

\partial P/\partial d=(\pi/180)\partial P/\partial\theta

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

\|f(x^{r+1})\|_\infty\le\varepsilon

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

  1. 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.
  2. 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.
  3. 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.
Original slide headings for this lecture43
  1. 1Power Flow V
  2. 2Lecture outline
  3. 3PART 1: General Newton–Raphson method
  4. 4Gradient descent on a quadratic
  5. 5Solving an equation means finding a zero
  6. 6Use one tangent to predict the zero
  7. 7The correction is a horizontal distance
  8. 8The scalar Newton update
  9. 9Calculate the first correction
  10. 10Check the original curve
  11. 11Repeat the tangent construction
  12. 12Track the original residual
  13. 13Two coupled nonlinear equations
  14. 14Stack the correction equations
  15. 15Newton–Raphson in vector form
  16. 16Coupled example: Evaluate the current point
  17. 17Coupled example: Solve and update
  18. 18Coupled example: Check both equations
  19. 19The general Newton iteration
  20. 20PART 2: Newton–Raphson power flow
  21. 21Apply the same Newton method
  22. 22Voltage determines the network injections
  23. 23Move the power balance to one side
  24. 24Select equations that match the unknowns
  25. 25The power flow problem is a zero-residual system
  26. 26Apply the local model to P and Q separately
  27. 27Collect the scalar equations into two vector equations
  28. 28Stack them into the Newton matrix equation
  29. 29Add the correction and check the original equations
  30. 30What a Jacobian entry means
  31. 31Jacobian blocks
  32. 32The power terms to differentiate
  33. 33Neighbor angle derivatives
  34. 34Neighbor magnitude derivatives
  35. 35Local angle derivative of real power
  36. 36Local angle derivative of reactive power
  37. 37Local magnitude derivative of real power
  38. 38Local magnitude derivative of reactive power
  39. 39Relationships among the Jacobian blocks
  40. 40The complete Newton power flow iteration
  41. 41Recover the powers that were not specified
  42. 42Angle units in the Newton system
  43. 43Summary
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.

Selected scalar x—
Original scalar residual—
Tangent intercept (next x)—
Original residual at next x—
Power correction delta theta2—
Power correction delta v3—
Current power residual norm—
After one power correction—

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.

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

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.

±1e-06
±1e-06
±1e-06
±1e-06

The linear model reaches zero after one correction. Is the original problem solved?

Finally, explain in your own words

  1. What are the inputs, references, and main assumptions?
  2. 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.
  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 · L36

Course learning assistant

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

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