section 5: power flow - college of engineering
TRANSCRIPT
ESE 470 โ Energy Distribution Systems
SECTION 5: POWER FLOW
K. Webb ESE 470
Introduction2
K. Webb ESE 470
Nodal Analysis
Consider the following circuit
Three voltage sources ๐๐๐ ๐ ๐ , ๐๐๐ ๐ ๐ , ๐๐๐ ๐ ๐
Generic branch impedances Could be any combination of R, L, and C
Three unknown node voltages ๐๐๐ , ๐๐๐ , and ๐๐๐
Would like to analyze the circuit Determine unknown node voltages
One possible analysis technique is nodal analysis
3
K. Webb ESE 470
Nodal Analysis
Nodal analysis Systematic application of KCL at each unknown node Apply Ohmโs law to express branch currents in terms of node
voltages Sum currents at each unknown node
Weโll sum currents leaving each node and set equal to zero
At node ๐๐๐ , we have๐๐๐ โ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐
+๐๐๐ โ ๐๐๐ ๐๐๐
= 0
Every current term includes division by an impedance Easier to work with admittances instead
4
K. Webb ESE 470
Nodal Analysis
Now our first nodal equation becomes๐๐๐ โ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ + ๐๐๐ โ ๐๐๐ ๐๐๐ = 0
where๐๐๐ ๐ ๐ = 1/๐๐๐ ๐ ๐ and ๐๐๐ = 1/๐๐๐
Rearranging to place all unknown node voltages on the left and all source terms on the right
๐๐๐ ๐ ๐ + ๐๐๐ ๐๐๐ โ ๐๐๐ ๐๐๐ = ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ Applying KCL at node ๐๐๐
๐๐๐ โ ๐๐๐ ๐๐๐ + ๐๐๐ ๐๐๐ + ๐๐๐ โ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ + ๐๐๐ โ ๐๐๐ ๐๐๐ = 0
5
K. Webb ESE 470
Nodal Analysis
Rearrangingโ๐๐๐ ๐๐๐ + ๐๐๐ + ๐๐๐ + ๐๐๐ ๐ ๐ + ๐๐๐ ๐๐๐ โ ๐๐๐ ๐๐๐ = ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐
Finally, applying KCL at node ๐๐๐ , gives๐๐๐ โ ๐๐๐ ๐๐๐ + ๐๐๐ โ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ = 0
โ๐๐๐ ๐๐๐ + ๐๐๐ + ๐๐๐ ๐ ๐ ๐๐๐ = ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐
Note that the source terms are the Norton equivalent current sources (short-circuit currents) associated with each voltage source
6
K. Webb ESE 470
Nodal Analysis
Putting the nodal equations into matrix form
๐๐๐ ๐ ๐ + ๐๐๐ โ๐๐๐ 0โ๐๐๐ ๐๐๐ + ๐๐๐ + ๐๐๐ ๐ ๐ + ๐๐๐ โ๐๐๐
0 โ๐๐๐ ๐๐๐ + ๐๐๐ ๐ ๐
๐๐๐ ๐๐๐ ๐๐๐
=๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐ ๐๐๐ ๐ ๐
or๐๐๐๐ = ๐ฐ๐ฐ
where ๐๐ is the ๐๐ ร ๐๐ admittance matrix ๐ฐ๐ฐ is an ๐๐ ร 1 vector of known source currents ๐๐ is an ๐๐ ร 1 vector of unknown node voltages
This is a system of ๐๐ (here, three) linear equations with ๐๐unknowns
We can solve for the vector of unknown voltages as๐๐ = ๐๐โ๐ ๐ฐ๐ฐ
7
K. Webb ESE 470
The Admittance Matrix, ๐๐
Take a closer look at the form of the admittance matrix, ๐๐๐๐๐ ๐ ๐ + ๐๐๐ โ๐๐๐ 0โ๐๐๐ ๐๐๐ + ๐๐๐ + ๐๐๐ ๐ ๐ + ๐๐๐ โ๐๐๐
0 โ๐๐๐ ๐๐๐ + ๐๐๐ ๐ ๐ =
๐๐๐ ๐ ๐๐๐ ๐ ๐๐๐ ๐ ๐๐๐ ๐ ๐๐๐ ๐ ๐ฆ๐ฆ๐ ๐ ๐๐๐ ๐ ๐๐๐ ๐ ๐๐๐ ๐
The elements of ๐๐ are Diagonal elements, ๐๐๐๐๐๐: ๐๐๐๐๐๐ = sum of all admittances connected to node ๐๐ Self admittance or driving-point admittance
Off-diagonal elements, ๐๐๐๐๐๐ (๐๐ โ ๐๐): ๐๐๐๐๐๐ = โ(total admittance between nodes ๐๐ and ๐๐) Mutual admittance or transfer admittance
Note that, because the network is reciprocal, ๐๐ is symmetric
8
K. Webb ESE 470
Nodal Analysis
Nodal analysis allows us to solve for unknown voltages given circuit admittances and current (Norton equivalent) inputs An application of Ohmโs law
๐๐๐๐ = ๐ฐ๐ฐ
A linear equation Simple, algebraic solution
For power-flow analysis, things get a bit more complicated
9
K. Webb ESE 470
Power-Flow Analysis10
K. Webb ESE 470
The Power-Flow Problem
A typical power system is not entirely unlike the simple circuit we just looked at Sources are generators Nodes are the system buses Buses are interconnected by impedances of transmission
lines and transformers Inputs and outputs now include power (P and Q)
System equations are now nonlinear Canโt simply solve ๐๐๐๐ = ๐ฐ๐ฐ Must employ numerical, iterative solution methods
Power system analysis to determine bus voltages and power flows is called power-flow analysis or load-flow analysis
11
K. Webb ESE 470
System One-Line Diagram
Consider the one-line diagram for a simple power system
System includes: Generators Buses Transformers Treated as equivalent circuit impedances in per-unit
Transmission lines Equivalent circuit impedances
Loads
12
K. Webb ESE 470
Bus Variables
The buses are the system nodes Four variables associated with each bus, ๐๐
Voltage magnitude, ๐๐๐๐ Voltage phase angle, ๐ฟ๐ฟ๐๐ Real power delivered to the bus, ๐๐๐๐ Reactive power delivered to the bus, ๐๐๐๐
13
K. Webb ESE 470
Bus Power
Net power delivered to bus ๐๐ is the difference between power flowing from generators to bus ๐๐ and power flowing from bus ๐๐ to loads
๐๐๐๐ = ๐๐๐บ๐บ๐๐ โ ๐๐๐ฟ๐ฟ๐๐๐๐๐๐ = ๐๐๐บ๐บ๐๐ โ ๐๐๐ฟ๐ฟ๐๐
Even though weโve introduced power flow into the analysis, we can still write nodal equations for the system
Voltage and current related by the bus admittance matrix, ๐๐๐๐๐๐๐ ๐ ๐๐ = ๐๐๐๐๐๐๐ ๐ ๐๐
๐๐๐๐๐๐๐ ๐ contains the bus mutual and self admittances associated with transmission lines and transformers
For an ๐๐ bus system, ๐๐ is an ๐๐ ร 1 vector of bus voltages ๐๐ is an ๐๐ ร 1 vector of source currents flowing into each bus
From generators and loads
14
K. Webb ESE 470
Types of Buses
There are four variables associated with each bus ๐๐๐๐ = ๐๐๐๐ ๐ฟ๐ฟ๐๐ = โ ๐๐๐๐ ๐๐๐๐ ๐๐๐๐
Two variables are inputs to the power-flow problem Known
Two are outputs To be calculated
Buses are categorized into three types depending on which quantities are inputs and which are outputs Slack bus (swing bus) Load bus (PQ bus) Voltage-controlled bus (PV bus)
15
K. Webb ESE 470
Bus Types
Slack bus (swing bus): Reference bus Typically bus 1 Inputs are voltage magnitude, ๐๐๐ , and phase angle, ๐ฟ๐ฟ๐ Typically 1.0โ 0ยฐ
Power, ๐๐๐ and ๐๐๐ , is computed
Load bus (๐ท๐ท๐ท๐ท bus): Buses to which only loads are connected Real power, ๐๐๐๐, and reactive power, ๐๐๐๐, are the knowns ๐๐๐๐ and ๐ฟ๐ฟ๐๐ are calculated Majority of power system buses are load buses
16
K. Webb ESE 470
Bus Types
Voltage-controlled bus (๐ท๐ท๐๐ bus): Buses connected to generators Buses with shunt reactive compensation Real power, ๐๐๐๐, and voltage magnitude, ๐๐๐๐, are known
inputs Reactive power, ๐๐๐๐, and voltage phase angle, ๐ฟ๐ฟ๐๐, are
calculated
17
K. Webb ESE 470
Solving the Power-Flow Problem
The power-flow solution involves determining: ๐๐๐๐, ๐ฟ๐ฟ๐๐, ๐๐๐๐, and ๐๐๐๐
There are ๐๐ buses Each with two unknown quantities
There are 2๐๐ unknown quantities in total Need 2๐๐ equations
๐๐ of these equations are the nodal equations๐ฐ๐ฐ = ๐๐๐๐ (1)
The other ๐๐ equations are the power-balance equations๐บ๐บ๐๐ = ๐๐๐๐ + ๐๐๐๐๐๐ = ๐๐๐๐๐ฐ๐ฐ๐๐โ (2)
From (1), the nodal equation for the ๐๐๐ก๐ก๐ก bus is๐ฐ๐ฐ๐๐ = โ๐๐=๐ ๐๐ ๐๐๐๐๐๐๐๐๐๐ (3)
18
K. Webb ESE 470
Solving the Power-Flow Problem
Substituting (3) into (2) gives
๐๐๐๐ + ๐๐๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐๐๐๐๐ โ (4)
The bus voltages in (3) and (4) are phasors, which we can represent as
๐๐๐๐ = ๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐ and ๐๐๐๐ = ๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐ (5)
The admittances can also be written in polar form
๐๐๐๐๐๐ = ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐ (6)
Using (5) and (6) in (4) gives
๐๐๐๐ + ๐๐๐๐๐๐ = ๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐โ
๐๐๐๐ + ๐๐๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐ ๐ฟ๐ฟ๐๐โ๐ฟ๐ฟ๐๐โ๐๐๐๐๐๐ (7)
19
K. Webb ESE 470
Solving the Power-Flow Problem
In Cartesian form, (7) becomes
๐๐๐๐ + ๐๐๐๐๐๐ =๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐ [cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
+๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐ ] (8)
From (8), active power is
๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐ (9)
And, reactive power is
๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐ (10)
20
K. Webb ESE 470
Solving the Power-Flow Problem
๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐ (9)
๐๐๐๐ = ๐๐๐๐ โ๐๐=๐ ๐๐ ๐๐๐๐๐๐ ๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐ (10)
Solving the power-flow problem amounts to finding a solution to a system of nonlinear equations, (9) and (10)
Must be solved using numerical, iterative algorithms Typically Newton-Raphson
In practice, commercial software packages are available for power-flow analysis E.g. PowerWorld, CYME, ETAP
Weโll now learn to solve the power-flow problem Numerical, iterative algorithm Newton-Raphson
21
K. Webb ESE 470
Solving the Power-Flow Problem
First, weโll introduce a variety of numerical algorithms for solving equations and systems of equations Linear system of equations Direct solution
Gaussian elimination Iterative solution
Jacobi Gauss-Seidel
Nonlinear equations Iterative solution
Newton-Raphson
Nonlinear system of equations Iterative solution
Newton-Raphson
22
K. Webb ESE 470
Linear Systems of Equations โDirect Solution
23
K. Webb ESE 470
Solving Linear Systems of Equations
Gaussian elimination Direct (i.e. non-iterative) solution Two parts to the algorithm: Forward elimination Back substitution
24
K. Webb ESE 470
Gaussian Elimination
Consider a system of equations
โ4๐ฅ๐ฅ๐ + 7๐ฅ๐ฅ๐ = โ52๐ฅ๐ฅ๐ โ 3๐ฅ๐ฅ๐ + 5๐ฅ๐ฅ๐ = โ12๐ฅ๐ฅ๐ โ 3๐ฅ๐ฅ๐ = 3
This can be expressed in matrix form:
โ4 0 72 โ3 50 1 โ3
๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
=โ5โ12
3 In general
๐๐ โ ๐ฑ๐ฑ = ๐ฒ๐ฒ
For a system of three equations with three unknowns:
๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐
๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
=๐ฆ๐ฆ๐ ๐ฆ๐ฆ๐ ๐ฆ๐ฆ๐
25
K. Webb ESE 470
Gaussian Elimination
Weโll use a 3ร3 system as an example to develop the Gaussian elimination algorithm
๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐
๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
=๐ฆ๐ฆ๐ ๐ฆ๐ฆ๐ ๐ฆ๐ฆ๐
First, create the augmented system matrix
๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ โฎ ๐ฆ๐ฆ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ โฎ ๐ฆ๐ฆ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ โฎ ๐ฆ๐ฆ๐
Each row represents and equation ๐๐ rows for ๐๐ equations
Row operations do not affect the system Multiply a row by a constant Add or subtract rows from one another and replace row with the result
26
K. Webb ESE 470
Gaussian Elimination โ Forward Elimination
Perform row operations to reduce the augmented matrix to upper triangular Only zeros below the main diagonal Eliminate ๐ฅ๐ฅ๐๐ from the ๐๐ + 1 st through the ๐๐th equations for ๐๐ = 1 โฆ๐๐
Forward elimination
After forward elimination, we have๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ โฎ ๐ฆ๐ฆ๐
0 ๐ด๐ด๐ ๐ โฒ ๐ด๐ด๐ ๐ โฒ โฎ ๐ฆ๐ฆ๐ โฒ
0 0 ๐ด๐ด๐ ๐ โฒ โฎ ๐ฆ๐ฆ๐ โฒ
Where the prime notation (e.g. ๐ด๐ด๐ ๐ โฒ ) indicates that the value has been changed from its original value
27
K. Webb ESE 470
Gaussian Elimination โ Back Substitution
๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ ๐ด๐ด๐ ๐ โฎ ๐ฆ๐ฆ๐ 0 ๐ด๐ด๐ ๐ โฒ ๐ด๐ด๐ ๐ โฒ โฎ ๐ฆ๐ฆ๐ โฒ
0 0 ๐ด๐ด๐ ๐ โฒ โฎ ๐ฆ๐ฆ๐ โฒ
The last row represents an equation with only a single unknown๐ด๐ด๐ ๐ โฒ โ ๐ฅ๐ฅ๐ = ๐ฆ๐ฆ๐ โฒ
Solve for ๐ฅ๐ฅ๐
๐ฅ๐ฅ๐ =๐ฆ๐ฆ๐ โฒ
๐ด๐ด๐ ๐ โฒ
The second-to-last row represents an equation with two unknowns๐ด๐ด๐ ๐ โฒ โ ๐ฅ๐ฅ๐ + ๐ด๐ด๐ ๐ โฒ โ ๐ฅ๐ฅ๐ = ๐ฆ๐ฆ๐ โฒ
Substitute in newly-found value of ๐ฅ๐ฅ๐ Solve for ๐ฅ๐ฅ๐
Substitute values for ๐ฅ๐ฅ๐ and ๐ฅ๐ฅ๐ into the first-row equation Solve for ๐ฅ๐ฅ๐
This process is back substitution
28
K. Webb ESE 470
Gaussian elimination
Gaussian elimination summary Create the augmented system matrix Forward elimination Reduce to an upper-triangular matrix
Back substitution Starting with ๐ฅ๐ฅ๐๐, solve for ๐ฅ๐ฅ๐๐ for ๐๐ = ๐๐โฆ 1
A direct solution algorithm Exact value for each ๐ฅ๐ฅ๐๐ arrived at with a single execution of
the algorithm Alternatively, we can use an iterative algorithm
The Jacobi method
29
K. Webb ESE 470
Linear Systems of Equations โIterative Solution โ Jacobi Method
30
K. Webb ESE 470
Jacobi Method
Consider a system of ๐๐ linear equations๐๐ โ ๐ฑ๐ฑ = ๐ฒ๐ฒ
๐ด๐ด๐ ,๐ โฏ ๐ด๐ด๐ ,๐๐โฎ โฑ โฎ
๐ด๐ด๐๐,๐ โฏ ๐ด๐ด๐๐,๐๐
๐ฅ๐ฅ๐ โฎ๐ฅ๐ฅ๐๐
=๐ฆ๐ฆ๐ โฎ๐ฆ๐ฆ๐๐
The ๐๐th equation (๐๐th row) is๐ด๐ด๐๐,๐ ๐ฅ๐ฅ๐ + ๐ด๐ด๐๐,๐ ๐ฅ๐ฅ๐ + โฏ+ ๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐ + โฏ+ ๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐ = ๐ฆ๐ฆ๐๐ (11)
Solve (11) for ๐ฅ๐ฅ๐๐๐ฅ๐ฅ๐๐ = ๐
๐ด๐ด๐๐,๐๐[๐ฆ๐ฆ๐๐ โ (๐ด๐ด๐๐,๐ ๐ฅ๐ฅ๐ + ๐ด๐ด๐๐,๐ ๐ฅ๐ฅ๐ + โฏ+ ๐ด๐ด๐๐,๐๐โ๐ ๐ฅ๐ฅ๐๐โ๐ + (12)
+๐ด๐ด๐๐,๐๐+๐ ๐ฅ๐ฅ๐๐+๐ + โฏ+ ๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐)]
31
K. Webb ESE 470
Jacobi Method
Simplify (12) using summing notation
๐ฅ๐ฅ๐๐ =1๐ด๐ด๐๐,๐๐
๐ฆ๐ฆ๐๐ โ๏ฟฝ๐๐=๐
๐๐โ๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐ โ ๏ฟฝ๐๐=๐๐+๐
๐๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐ , ๐๐ = 1 โฆ๐๐
An equation for ๐ฅ๐ฅ๐๐ But, of course, we donโt yet know all other ๐ฅ๐ฅ๐๐ values
Use (13) as an iterative expression
๐ฅ๐ฅ๐๐,๐๐+๐ =1๐ด๐ด๐๐,๐๐
๐ฆ๐ฆ๐๐ โ๏ฟฝ๐๐=๐
๐๐โ๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ โ ๏ฟฝ๐๐=๐๐+๐
๐๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ , ๐๐ = 1 โฆ๐๐
The ๐๐ subscript indicates iteration number ๐ฅ๐ฅ๐๐,๐๐+๐ is the updated value from the current iteration ๐ฅ๐ฅ๐๐,๐๐ is a value from the previous iteration
(13)
(14)
32
K. Webb ESE 470
Jacobi Method
๐ฅ๐ฅ๐๐,๐๐+๐ =1๐ด๐ด๐๐,๐๐
๐ฆ๐ฆ๐๐ โ๏ฟฝ๐๐=๐
๐๐โ๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ โ ๏ฟฝ๐๐=๐๐+๐
๐๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ , ๐๐ = 1 โฆ๐๐
Old values of ๐ฅ๐ฅ๐๐, on the right-hand side, are used to update ๐ฅ๐ฅ๐๐ on the left-hand side
Start with an initial guess for all unknowns, ๐ฑ๐ฑ0 Iterate until adequate convergence is achieved
Until a specified stopping criterion is satisfied Convergence is not guaranteed
(14)
33
K. Webb ESE 470
Convergence
An approximation of ๐ฑ๐ฑ is refined on each iteration Continue to iterate until weโre close to the right answer
for the vector of unknowns, ๐ฑ๐ฑ Assume weโve converged to the right answer when ๐ฑ๐ฑ
changes very little from iteration to iteration On each iteration, calculate a relative error quantity
๐๐๐๐ = max๐ฅ๐ฅ๐๐,๐๐+๐ โ ๐ฅ๐ฅ๐๐,๐๐
๐ฅ๐ฅ๐๐,๐๐, ๐๐ = 1 โฆ๐๐
Iterate until ๐๐๐๐ โค ๐๐๐ ๐
where ๐๐๐ ๐ is a chosen stopping criterion
34
K. Webb ESE 470
Jacobi Method โ Matrix Form
The Jacobi method iterative formula, (14), can be rewritten in matrix form:๐ฑ๐ฑ๐๐+๐ = ๐๐๐ฑ๐ฑ๐๐ + ๐๐โ๐ ๐ฒ๐ฒ
where ๐๐ is the diagonal elements of A
๐๐ =
๐ด๐ด๐ ,๐ 0 โฏ 00 ๐ด๐ด๐ ,๐ 0 โฎโฎ 0 โฑ 00 โฏ 0 ๐ด๐ด๐๐,๐๐
and ๐๐ = ๐๐โ๐ ๐๐ โ ๐๐
Recall that the inverse of a diagonal matrix is given by inverting each diagonal element
๐๐โ๐๐ =
1/๐ด๐ด๐ ,๐ 0 โฏ 00 1/๐ด๐ด๐ ,๐ 0 โฎโฎ 0 โฑ 00 โฏ 0 1/๐ด๐ด๐๐,๐๐
(15)
(16)
35
K. Webb ESE 470
Jacobi Method โ Example
Consider the following system of equationsโ4๐ฅ๐ฅ๐ + 7๐ฅ๐ฅ๐ = โ52๐ฅ๐ฅ๐ โ 3๐ฅ๐ฅ๐ + 5๐ฅ๐ฅ๐ = โ12๐ฅ๐ฅ๐ โ 3๐ฅ๐ฅ๐ = 3
In matrix form:โ4 0 72 โ3 50 1 โ3
๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
=โ5โ12
3
Solve using the Jacobi method
36
K. Webb ESE 470
Jacobi Method โ Example
The iteration formula is
๐ฑ๐ฑ๐๐+๐ = ๐๐๐ฑ๐ฑ๐๐ + ๐๐โ๐ ๐ฒ๐ฒwhere
๐๐ =โ4 0 00 โ3 00 0 โ3
๐๐โ๐ =โ0.25 0 0
0 โ0.333 00 0 โ0.333
๐๐ = ๐๐โ๐ ๐๐ โ ๐๐ =0 0 1.75
0.667 0 1.6670 0.333 0
To begin iteration, we need a starting point Initial guess for unknown values, ๐ฑ๐ฑ Often, we have some idea of the answer Here, arbitrarily choose
๐ฑ๐ฑ0 = 10 25 10 ๐๐
37
K. Webb ESE 470
Jacobi Method โ Example
At each iteration, calculate
๐ฑ๐ฑ๐๐+๐ = ๐๐๐ฑ๐ฑ๐๐ + ๐๐โ๐ ๐ฒ๐ฒ๐ฅ๐ฅ๐ ,๐๐+๐ ๐ฅ๐ฅ๐ ,๐๐+๐ ๐ฅ๐ฅ๐ ,๐๐+๐
=0 0 1.75
0.667 0 1.6670 0.333 0
๐ฅ๐ฅ๐ ,๐๐๐ฅ๐ฅ๐ ,๐๐๐ฅ๐ฅ๐ ,๐๐
+1.25
4โ1
For ๐๐ = 1:
๐ฑ๐ฑ๐ =๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐
=0 0 1.75
0.667 0 1.6670 0.333 0
102510
+1.25
4โ1
๐ฑ๐ฑ๐ = 18.75 27.33 7.33 ๐๐
The relative error is
๐๐๐ = max๐ฅ๐ฅ๐๐,๐ โ ๐ฅ๐ฅ๐๐,0
๐ฅ๐ฅ๐๐,0= 0.875
38
K. Webb ESE 470
Jacobi Method โ Example
For ๐๐ = 2:
๐ฑ๐ฑ๐ =๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐
=0 0 1.75
0.667 0 1.6670 0.333 0
18.7527.337.33
+1.25
4โ1
๐ฑ๐ฑ๐ = 14.08 28.72 8.11 ๐๐
The relative error is
๐๐๐ = max๐ฅ๐ฅ๐๐,๐ โ ๐ฅ๐ฅ๐๐,๐
๐ฅ๐ฅ๐๐,๐ = 0.249
Continue to iterate until relative error falls below a specified stopping condition
39
K. Webb ESE 470
Jacobi Method โ Example
Automate with computer code, e.g. MATLAB Setup the system of equations
Initialize matrices and parameters for iteration
40
K. Webb ESE 470
Jacobi Method โ Example
Loop to continue iteration as long as: Stopping criterion is not satisfied Maximum number of iterations is not exceeded
On each iteration Use previous ๐ฑ๐ฑ values to update ๐ฑ๐ฑ Calculate relative error Increment the number of iterations
41
K. Webb ESE 470
Jacobi Method โ Example
Set ๐๐๐ ๐ = 1 ร 10โ6 and iterate:๐๐ ๐ฑ๐ฑ๐๐ ๐บ๐บ๐๐0 10 25 10 ๐๐ -
1 18.75 27.33 7.33 ๐๐ 0.875
2 14.08 28.72 8.11 ๐๐ 0.249
3 15.44 26.91 8.57 ๐๐ 0.097
4 16.25 28.59 7.97 ๐๐ 0.071
5 15.20 28.12 8.53 ๐๐ 0.070
6 16.18 28.35 8.37 ๐๐ 0.065
โฎ โฎ โฎ371 20.50 36.00 11.00 ๐๐ 0.995ร10-6
Convergence achieved in 371 iterations
42
K. Webb ESE 470
Linear Systems of Equations โIterative Solution โ Gauss-Seidel
43
K. Webb ESE 470
Gauss-Seidel Method
The iterative formula for the Jacobi method is
๐ฅ๐ฅ๐๐,๐๐+๐ =1๐ด๐ด๐๐,๐๐
๐ฆ๐ฆ๐๐ โ๏ฟฝ๐๐=๐
๐๐โ๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ โ ๏ฟฝ๐๐=๐๐+๐
๐๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ , ๐๐ = 1 โฆ๐๐
Note that only old values of ๐ฅ๐ฅ๐๐ (i.e. ๐ฅ๐ฅ๐๐,๐๐) are used to update the value of ๐ฅ๐ฅ๐๐
Assume the ๐ฅ๐ฅ๐๐,๐๐+๐ values are determined in order of increasing ๐๐ When updating ๐ฅ๐ฅ๐๐,๐๐+๐ , all ๐ฅ๐ฅ๐๐,๐๐+๐ values are already known
for ๐๐ < ๐๐ We can use those updated values to calculate ๐ฅ๐ฅ๐๐,๐๐+๐ The Gauss-Seidel method
(14)
44
K. Webb ESE 470
Gauss-Seidel Method
Now use the ๐ฅ๐ฅ๐๐ values already updated on the current iteration to update ๐ฅ๐ฅ๐๐ That is, ๐ฅ๐ฅ๐๐,๐๐+๐ for ๐๐ < ๐๐
Gauss-Seidel iterative formula
๐ฅ๐ฅ๐๐,๐๐+๐ =1๐ด๐ด๐๐,๐๐
๐ฆ๐ฆ๐๐ โ๏ฟฝ๐๐=๐
๐๐โ๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐+๐ โ ๏ฟฝ๐๐=๐๐+๐
๐๐
๐ด๐ด๐๐,๐๐๐ฅ๐ฅ๐๐,๐๐ , ๐๐ = 1 โฆ๐๐
Note that only the first summation has changed For already updated ๐ฅ๐ฅ values ๐ฅ๐ฅ๐๐ for ๐๐ < ๐๐ Number of already-updated values used depends on ๐๐
(17)
45
K. Webb ESE 470
Gauss-Seidel โ Matrix Form
In matrix form the iterative formula is the same as for the Jacobi method
๐ฑ๐ฑ๐๐+๐ = ๐๐๐ฑ๐ฑ๐๐ + ๐๐โ๐ ๐ฒ๐ฒ
where, again
๐๐ = ๐๐โ๐ ๐๐ โ ๐๐
but now ๐๐ is the lower triangular part of ๐๐
๐๐ =
๐ด๐ด๐ ,๐ 0 โฏ 0๐ด๐ด๐ ,๐ ๐ด๐ด๐ ,๐ 0 โฎโฎ โฎ โฑ 0
๐ด๐ด๐๐,๐ ๐ด๐ด๐๐,๐ โฏ ๐ด๐ด๐๐,๐๐
Otherwise, the algorithm and computer code is identical to that of the Jacobi method
(15)
(16)
46
K. Webb ESE 470
Gauss-Seidel โ Example
Apply Gauss-Seidel to our previous example ๐ฅ๐ฅ0 = 10 25 10 ๐๐
๐๐๐ ๐ = 1 ร 10โ6
๐๐ ๐ฑ๐ฑ๐๐ ๐บ๐บ๐๐0 10 25 10 ๐๐ -
1 18.75 33.17 10.06 ๐๐ 0.875
2 18.85 33.32 10.11 ๐๐ 0.005
3 18.94 33.47 10.16 ๐๐ 0.005
4 19.03 33.61 10.20 ๐๐ 0.005
โฎ โฎ โฎ151 20.50 36.00 11.00 ๐๐ 0.995ร10-6
Convergence achieved in 151 iterations Compared to 371 for the Jacobi method
47
K. Webb ESE 470
Nonlinear Equations48
K. Webb ESE 470
Nonlinear Equations
Solution methods weโve seen so far work only for linear equations
Now, we introduce an iterative method for solving a single nonlinear equation Newton-Raphson method
Next, weโll apply the Newton-Raphson method to a system of nonlinear equations
Finally, weโll use Newton-Raphson to solve the power-flow problem
49
K. Webb ESE 470
Newton-Raphson Method
Want to solve๐ฆ๐ฆ = ๐๐(๐ฅ๐ฅ)
where ๐๐ ๐ฅ๐ฅ is a nonlinear function That is, we want to find ๐ฅ๐ฅ, given a known nonlinear
function, ๐๐, and a known output, ๐ฆ๐ฆ
Newton-Raphson method Based on a first-order Taylor series approximation to ๐๐ ๐ฅ๐ฅ
The nonlinear ๐๐ ๐ฅ๐ฅ is approximated as linear to update our approximation to the solution, ๐ฅ๐ฅ, on each iteration
50
K. Webb ESE 470
Taylor Series Approximation
Taylor series approximation Given: A function, ๐๐ ๐ฅ๐ฅ Value of the function at some value of ๐ฅ๐ฅ, ๐๐ ๐ฅ๐ฅ0
Approximate: Value of the function at some other value of ๐ฅ๐ฅ
First-order Taylor series approximation Approximate ๐๐ ๐ฅ๐ฅ using only its first derivative ๐๐ ๐ฅ๐ฅ approximated as linear โ constant slope
๐ฆ๐ฆ = ๐๐ ๐ฅ๐ฅ โ ๐๐ ๐ฅ๐ฅ0 +๐๐๐๐๐๐๐ฅ๐ฅ
๏ฟฝ๐ฅ๐ฅ=๐ฅ๐ฅ0
๐ฅ๐ฅ โ ๐ฅ๐ฅ0 = ๏ฟฝ๐ฆ๐ฆ
51
K. Webb ESE 470
First-Order Taylor Series Approximation
Approximate value of the function at ๐ฅ๐ฅ
๐๐ ๐ฅ๐ฅ โ ๏ฟฝ๐ฆ๐ฆ = ๐๐ ๐ฅ๐ฅ0 + ๐๐โฒ ๐ฅ๐ฅ0 ๐ฅ๐ฅ โ ๐ฅ๐ฅ0
52
K. Webb ESE 470
Newton-Raphson Method
First order Taylor series approximation is
๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ0 + ๐๐โฒ ๐ฅ๐ฅ0 ๐ฅ๐ฅ โ ๐ฅ๐ฅ0
Letting this be an equality and rearranging gives an iterative formula for updating an approximation to ๐ฅ๐ฅ
๐ฆ๐ฆ = ๐๐ ๐ฅ๐ฅ๐๐ + ๐๐โฒ ๐ฅ๐ฅ๐๐ ๐ฅ๐ฅ๐๐+๐ โ ๐ฅ๐ฅ๐๐
๐๐โฒ ๐ฅ๐ฅ๐๐ ๐ฅ๐ฅ๐๐+๐ โ ๐ฅ๐ฅ๐๐ = ๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ๐๐
๐ฅ๐ฅ๐๐+๐ = ๐ฅ๐ฅ๐๐ +1
๐๐โฒ ๐ฅ๐ฅ๐๐๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ๐๐
Initialize with a best guess at ๐ฅ๐ฅ, ๐ฅ๐ฅ0 Iterate (18) until
A stopping criterion is satisfied, or The maximum number of iterations is reached
(18)
53
K. Webb ESE 470
First-Order Taylor Series Approximation
Now using the Taylor series approximation in a different way Not approximating
the value of y = f(x) at x, but, instead
Approximating the value of x where f(x) = y
๐ฅ๐ฅ๐๐+๐ = ๐ฅ๐ฅ๐๐ +1
๐๐โฒ ๐ฅ๐ฅ๐๐๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ๐๐
54
K. Webb ESE 470
Newton-Raphson โ Example
Consider the following nonlinear equation๐ฆ๐ฆ = ๐๐ ๐ฅ๐ฅ = ๐ฅ๐ฅ๐ + 10 = 20
Apply Newton-Raphson to solve Find ๐ฅ๐ฅ, such that ๐ฆ๐ฆ = ๐๐ ๐ฅ๐ฅ = 20
The derivative function is๐๐โฒ ๐ฅ๐ฅ = 3๐ฅ๐ฅ๐
Initial guess for ๐ฅ๐ฅ๐ฅ๐ฅ0 = 1
Iterate using the formula given by (18)
55
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 1:
๐ฅ๐ฅ๐ = ๐ฅ๐ฅ0 + ๐๐โฒ ๐ฅ๐ฅ0 โ๐ ๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ0
๐ฅ๐ฅ๐ = 1 + 3 โ 1๐ โ๐ 20 โ 1๐ + 10
๐ฅ๐ฅ๐ = 4
๐๐๐ =๐ฅ๐ฅ๐ โ ๐ฅ๐ฅ0๐ฅ๐ฅ0
๐๐๐ =4 โ 1
1= 3
๐ฅ๐ฅ๐ = 4, ๐๐๐ = 3
56
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 2:
๐ฅ๐ฅ๐ = ๐ฅ๐ฅ๐ + ๐๐โฒ ๐ฅ๐ฅ๐ โ๐ ๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ = 4 + 3 โ 4๐ โ๐ 20 โ 4๐ + 10
๐ฅ๐ฅ๐ = 2.875
๐๐๐ =๐ฅ๐ฅ๐ โ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
๐๐๐ =2.875 โ 4
4
๐๐๐ = 0.281
๐ฅ๐ฅ๐ = 2.875, ๐๐๐ = 0.281
57
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 3:
๐ฅ๐ฅ๐ = ๐ฅ๐ฅ๐ + ๐๐โฒ ๐ฅ๐ฅ๐ โ๐ ๐ฆ๐ฆ โ ๐๐ ๐ฅ๐ฅ๐
๐ฅ๐ฅ๐ = 2.875 + 3 โ 2.875๐ โ๐ 20 โ 2.875๐ + 10
๐ฅ๐ฅ๐ = 2.32
๐๐๐ =๐ฅ๐ฅ๐ โ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
๐๐๐ =2.32 โ 2.875
2.875
๐๐๐ = 0.193
๐ฅ๐ฅ๐ = 2.32, ๐๐๐ = 0.193
58
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 4:๐ฅ๐ฅ4 = 2.166, ๐๐4 = 0.066
๐๐ = 5:๐ฅ๐ฅ5 = 2.155, ๐๐5 = 0.005
๐๐ = 6:๐ฅ๐ฅ6 = 2.154, ๐๐6 = 28.4 ร 10โ6
๐๐ = 7:๐ฅ๐ฅ7 = 2.154, ๐๐7 = 0.808 ร 10โ9
Convergence achieved very quickly Next, weโll see how to apply Newton-Raphson to a system
of nonlinear equations
59
K. Webb ESE 470
Example Problems60
K. Webb ESE 470
Perform three iterations toward the solution of the following system of equations using the Jacobi method. Let ๐ฑ๐ฑ0 = 0, 0 ๐๐.
2๐ฅ๐ฅ๐ + ๐ฅ๐ฅ๐ = 122๐ฅ๐ฅ๐ + 3๐ฅ๐ฅ๐ = 5
61
K. Webb ESE 47062
K. Webb ESE 47063
K. Webb ESE 47064
K. Webb ESE 470
Perform three iterations toward the solution of the following system of equations using the Gauss-Seidel method. Let ๐ฑ๐ฑ0 = 0, 0 ๐๐.
2๐ฅ๐ฅ๐ + ๐ฅ๐ฅ๐ = 122๐ฅ๐ฅ๐ + 3๐ฅ๐ฅ๐ = 5
65
K. Webb ESE 47066
K. Webb ESE 47067
K. Webb ESE 47068
K. Webb ESE 470
Perform three iterations toward the solution of the following equation using the Newton-Raphson method. Let ๐ฑ๐ฑ0 = 0.
๐๐ ๐ฅ๐ฅ = cos ๐ฅ๐ฅ + 3๐ฅ๐ฅ = 10
69
K. Webb ESE 47070
K. Webb ESE 470
Nonlinear Systems of Equations71
K. Webb ESE 470
Nonlinear Systems of Equations
Now, consider a system of nonlinear equations Can be represented as a vector of ๐๐ functions Each is a function of an ๐๐-vector of unknown variables
๐ฒ๐ฒ =
๐ฆ๐ฆ๐ ๐ฆ๐ฆ๐ โฎ๐ฆ๐ฆ๐๐
= ๐๐ ๐ฑ๐ฑ =
๐๐๐ ๐ฅ๐ฅ๐ , ๐ฅ๐ฅ๐ ,โฏ , ๐ฅ๐ฅ๐๐๐๐๐ ๐ฅ๐ฅ๐ , ๐ฅ๐ฅ๐ ,โฏ , ๐ฅ๐ฅ๐๐
โฎ๐๐๐๐ ๐ฅ๐ฅ๐ , ๐ฅ๐ฅ๐ ,โฏ , ๐ฅ๐ฅ๐๐
We can again approximate this function using a first-order Taylor series
๐ฒ๐ฒ = ๐๐ ๐ฑ๐ฑ โ ๐๐ ๐ฑ๐ฑ0 + ๐๐โฒ ๐ฑ๐ฑ0 ๐ฑ๐ฑ โ ๐ฑ๐ฑ0
Note that all variables are ๐๐-vectors ๐๐ is an ๐๐-vector of known, nonlinear functions ๐ฑ๐ฑ is an ๐๐-vector of unknown values โ this is what we want to solve for ๐ฒ๐ฒ is an ๐๐-vector of known values ๐ฑ๐ฑ๐๐ is an ๐๐-vector of ๐ฑ๐ฑ values for which ๐๐ ๐ฑ๐ฑ0 is known
(19)
72
K. Webb ESE 470
Newton-Raphson Method
Equation (19) is the basis for our Newton-Raphson iterative formula Again, let it be an equality and solve for ๐ฑ๐ฑ
๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ0 = ๐๐โฒ ๐ฑ๐ฑ0 ๐ฑ๐ฑ โ ๐ฑ๐ฑ0๐๐โฒ ๐ฑ๐ฑ0 โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ0 = ๐ฑ๐ฑ โ ๐ฑ๐ฑ0๐ฑ๐ฑ = ๐ฑ๐ฑ0 + ๐๐โฒ ๐ฑ๐ฑ0 โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ0
This last expression can be used as an iterative formula
๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ๐๐โฒ ๐ฑ๐ฑ๐๐ โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐
The derivative term on the right-hand side of (20) is an ๐๐ ร ๐๐ matrix The Jacobian matrix, ๐๐
๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ๐๐๐๐โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐ (20)
73
K. Webb ESE 470
The Jacobian Matrix
๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ๐๐๐๐โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐
Jacobian matrix ๐๐ ร ๐๐ matrix of partial derivatives for ๐๐ ๐ฑ๐ฑ Evaluated at the current value of ๐ฑ๐ฑ, ๐ฑ๐ฑ๐๐
๐๐๐๐ =
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
โฏ๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
โฏ๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐๐
โฎ โฎ โฑ โฎ๐๐๐๐๐๐๐๐๐ฅ๐ฅ๐
๐๐๐๐๐๐๐๐๐ฅ๐ฅ๐
โฏ๐๐๐๐๐๐๐๐๐ฅ๐ฅ๐๐ ๐ฑ๐ฑ=๐ฑ๐ฑ๐๐
(20)
74
K. Webb ESE 470
Newton-Raphson Method
๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ๐๐๐๐โ๐๐ ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐
We could iterate (20) until convergence or a maximum number of iterations is reached Requires inversion of the Jacobian matrix Computationally expensive and error prone
Instead, go back to the Taylor series approximation๐ฒ๐ฒ = ๐๐ ๐ฑ๐ฑ๐๐ + ๐๐๐๐ ๐ฑ๐ฑ๐๐+๐ โ ๐ฑ๐ฑ๐๐๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐ = ๐๐๐๐ ๐ฑ๐ฑ๐๐+๐ โ ๐ฑ๐ฑ๐๐
Left side of (21) represents a difference between the known and approximated outputs
Right side represents an increment of the approximation for ๐ฑ๐ฑ
ฮ๐ฒ๐ฒ๐๐ = ๐๐๐๐ฮ๐ฑ๐ฑ๐๐
(20)
(21)
(22)
75
K. Webb ESE 470
Newton-Raphson Method
ฮ๐ฒ๐ฒ๐๐ = ๐๐๐๐ฮ๐ฑ๐ฑ๐๐
On each iteration: Compute ฮ๐ฒ๐ฒ๐๐ and ๐๐๐๐ Solve for ฮ๐ฑ๐ฑ๐๐ using Gaussian eliminationMatrix inversion not required Computationally robust
Update ๐ฑ๐ฑ๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ฮ๐ฑ๐ฑ๐๐
(22)
(23)
76
K. Webb ESE 470
Newton-Raphson โ Example
Apply Newton-Raphson to solve the following system of nonlinear equations
๐๐ ๐ฑ๐ฑ = ๐ฒ๐ฒ
๐ฅ๐ฅ๐ ๐ + 3๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐ ๐ฅ๐ฅ๐
= 2112
Initial condition: ๐ฑ๐ฑ0 = 1 2 ๐๐
Stopping criterion: ๐๐๐ ๐ = 1 ร 10โ6
Jacobian matrix
๐๐๐๐ =
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐
๐๐๐๐๐ ๐๐๐ฅ๐ฅ๐ ๐ฑ๐ฑ=๐ฑ๐ฑ๐๐
=2๐ฅ๐ฅ๐ ,๐๐ 3๐ฅ๐ฅ๐ ,๐๐ ๐ฅ๐ฅ๐ ,๐๐
77
K. Webb ESE 470
Newton-Raphson โ Example
ฮ๐ฒ๐ฒ๐๐ = ๐๐๐๐ฮ๐ฑ๐ฑ๐๐๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ฮ๐ฑ๐ฑ๐๐
Adjusting the indexing, we can equivalently write (22) and (23) as:
ฮ๐ฒ๐ฒ๐๐โ๐ = ๐๐๐๐โ๐ ฮ๐ฑ๐ฑ๐๐โ๐ ๐ฑ๐ฑ๐๐ = ๐ฑ๐ฑ๐๐โ๐ + ฮ๐ฑ๐ฑ๐๐โ๐
For iteration ๐๐: Compute ฮ๐ฒ๐ฒ๐๐โ๐ and ๐๐๐๐โ๐ Solve (22) for ฮ๐ฑ๐ฑ๐๐โ๐ Update ๐ฑ๐ฑ using (23)
(22)(23)
(22)(23)
78
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 1:ฮ๐ฆ๐ฆ0 = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ0 = 21
12 โ 72 = 14
10
๐๐0 =2๐ฅ๐ฅ๐ ,0 3๐ฅ๐ฅ๐ ,0 ๐ฅ๐ฅ๐ ,0
= 2 32 1
ฮ๐ฑ๐ฑ0 = 42
๐ฑ๐ฑ๐ = ๐ฑ๐ฑ0 + ฮ๐ฑ๐ฑ0 = 12 + 4
2 = 54
๐๐๐ = max๐ฅ๐ฅ๐๐,๐ โ ๐ฅ๐ฅ๐๐,0
๐ฅ๐ฅ๐๐,0, ๐๐ = 1 โฆ๐๐
๐ฅ๐ฅ๐ = 54 , ๐๐๐ = 4
79
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 2:ฮ๐ฆ๐ฆ๐ = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐ = 21
12 โ 3720 = โ16
โ8
๐๐๐ =2๐ฅ๐ฅ๐ ,๐ 3๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐
= 10 34 5
ฮ๐ฑ๐ฑ๐ = โ1.474โ0.421
๐ฑ๐ฑ๐ = ๐ฑ๐ฑ๐ + ฮ๐ฑ๐ฑ๐ = 54 + โ1.474
โ0.421 = 3.5263.579
๐๐๐ = max๐ฅ๐ฅ๐๐,๐ โ ๐ฅ๐ฅ๐๐,๐
๐ฅ๐ฅ๐๐,๐ , ๐๐ = 1 โฆ๐๐
๐ฅ๐ฅ๐ = 3.5263.579 , ๐๐๐ = 0.295
80
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 3:ฮ๐ฆ๐ฆ๐ = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐ = 21
12 โ 23.17212.621 = โ2.172
โ0.621
๐๐๐ =2๐ฅ๐ฅ๐ ,๐ 3๐ฅ๐ฅ๐ ,๐ ๐ฅ๐ฅ๐ ,๐
= 7.053 33.579 3.526
ฮ๐ฑ๐ฑ๐ = โ0.4100.240
๐ฑ๐ฑ๐ = ๐ฑ๐ฑ๐ + ฮ๐ฑ๐ฑ๐ = 3.5263.579 + โ0.410
0.240 = 3.1163.819
๐๐๐ = max๐ฅ๐ฅ๐๐,๐ โ ๐ฅ๐ฅ๐๐,๐
๐ฅ๐ฅ๐๐,๐ , ๐๐ = 1 โฆ๐๐
๐ฅ๐ฅ๐ = 3.1163.819 , ๐๐๐ = 0.116
81
K. Webb ESE 470
Newton-Raphson โ Example
๐๐ = 7:ฮ๐ฆ๐ฆ6 = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ6 = 21
12 โ 21.00012.000 = โ0.527 ร 10โ7
0.926 ร 10โ7
๐๐6 =2๐ฅ๐ฅ๐ ,6 3๐ฅ๐ฅ๐ ,6 ๐ฅ๐ฅ๐ ,6
= 6.000 34.000 3.000
ฮ๐ฑ๐ฑ6 = โ0.073 ร 10โ60.128 ร 10โ6
๐ฑ๐ฑ7 = ๐ฑ๐ฑ6 + ฮ๐ฑ๐ฑ6 = 3.0004.000 + โ0.073 ร 10โ6
0.128 ร 10โ6= 3.000
4.000
๐๐7 = max๐ฅ๐ฅ๐๐,7 โ ๐ฅ๐ฅ๐๐,6
๐ฅ๐ฅ๐๐,6, ๐๐ = 1 โฆ๐๐
๐ฅ๐ฅ7 = 3.0004.000 , ๐๐7 = 31.9 ร 10โ9
82
K. Webb ESE 470
Newton-Raphson โ MATLAB Code
Define the system of equations
Initialize ๐ฑ๐ฑ
Set up solution parameters
83
K. Webb ESE 470
Newton-Raphson โ MATLAB Code
Iterate: Compute ฮ๐ฒ๐ฒ๐๐โ๐ and ๐๐๐๐โ๐ Solve for ฮ๐ฑ๐ฑ๐๐โ๐ Update ๐ฑ๐ฑ
84
K. Webb ESE 470
Example Problems85
K. Webb ESE 470
Perform three iterations toward the solution of the following system of equations using the Newton-Raphson method. Let ๐ฑ๐ฑ0 = 1, 1 ๐๐.
10๐ฅ๐ฅ๐ ๐ + ๐ฅ๐ฅ๐ = 20๐๐๐ฅ๐ฅ1 โ ๐ฅ๐ฅ๐ = 10
86
K. Webb ESE 47087
K. Webb ESE 47088
K. Webb ESE 47089
K. Webb ESE 470
Power-Flow Solution โ Overview90
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
Consider an ๐๐-bus power-flow problem 1 slack bus ๐๐๐๐๐๐ PV buses ๐๐๐๐๐๐ PQ buses
๐๐ = ๐๐๐๐๐๐ + ๐๐๐๐๐๐ + 1
Each bus has two unknown quantities Two of ๐๐๐๐, ๐ฟ๐ฟ๐๐, ๐๐๐๐, and ๐๐๐๐
For the N-R power-flow problem, ๐๐๐๐ and ๐ฟ๐ฟ๐๐ are the unknown quantities These are the inputs to the nonlinear system of equations โ the ๐๐๐๐ and ๐๐๐๐ equations โ of (9) and (10)
Finding unknown ๐๐๐๐ and ๐ฟ๐ฟ๐๐ values allows us to determine unknown ๐๐๐๐ and ๐๐๐๐ values
91
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
The nonlinear system of equations is๐ฒ๐ฒ = ๐๐(๐ฑ๐ฑ)
The unknowns , ๐ฑ๐ฑ, are bus voltages Unknown phase angles from PV and PQ buses Unknown magnitudes from PQ bus
๐ฑ๐ฑ = ๐ ๐ ๐๐ =
๐ฟ๐ฟ๐ โฎ
๐ฟ๐ฟ๐๐๐๐๐๐+๐๐๐๐๐๐+๐
๐๐๐๐๐๐๐๐+๐ โฎ
๐๐๐๐๐๐๐๐+๐๐๐๐๐๐+๐
๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐๐๐๐๐
(24)
92
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
๐ฒ๐ฒ = ๐๐(๐ฑ๐ฑ)
The knowns , ๐ฒ๐ฒ, are bus powers Known real power from PV and PQ buses Known reactive power from PQ bus
๐ฒ๐ฒ = ๐๐๐๐ =
๐๐๐ โฎ
๐๐๐๐๐๐๐๐+๐๐๐๐๐๐+๐
๐๐๐๐๐๐๐๐+๐ โฎ
๐๐๐๐๐๐๐๐+๐๐๐๐๐๐+๐
๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐๐๐๐๐
(25)
93
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
๐ฒ๐ฒ = ๐๐(๐ฑ๐ฑ)
The system of equations , ๐๐, consists of the nonlinear functions for ๐๐ and ๐๐ Nonlinear functions of ๐๐ and ๐ ๐
๐๐(๐ฑ๐ฑ) = ๐๐(๐ฑ๐ฑ)๐๐(๐ฑ๐ฑ) =
๐๐๐ ๐ฑ๐ฑโฎโฎ
๐๐๐๐๐๐๐๐+๐ ๐ฑ๐ฑโฎโฎ
๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐๐๐๐๐
(26)
94
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
๐๐๐๐ ๐ฑ๐ฑ and ๐๐๐๐ ๐ฑ๐ฑ are given by
๐๐๐๐ = ๐๐๐๐ ๏ฟฝ๐๐=๐
๐๐
๐๐๐๐๐๐ ๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐๐๐ = ๐๐๐๐ ๏ฟฝ๐๐=๐
๐๐
๐๐๐๐๐๐ ๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
Admittance matrix terms are
๐๐๐๐๐๐ = ๐๐๐๐๐๐ โ ๐๐๐๐๐๐
(9)
(10)
95
K. Webb ESE 470
Solving the Power-Flow Problem - Overview
The iterative N-R formula is๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ฮ๐ฑ๐ฑ๐๐
The increment term, ฮ๐ฑ๐ฑ๐๐, is computed through Gaussian elimination of
ฮ๐ฒ๐ฒ๐๐ = ๐๐๐๐ฮ๐ฑ๐ฑ๐๐ The Jacobian, ๐ฝ๐ฝ๐๐, is computed on each iteration The power mismatch vector is
ฮ๐ฒ๐ฒ๐๐ = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐ ๐ฒ๐ฒ is the vector of known powers, as given in (25) ๐๐ ๐ฑ๐ฑ๐๐ are the ๐๐ and ๐๐ equations given by (9) and (10)
96
K. Webb ESE 470
Power-Flow Solution โ Procedure 97
K. Webb ESE 470
Solving the Power-Flow Problem - Procedure
The following procedure shows how to set up and solve the power-flow problem using the N-R algorithm
1. Order and number buses Slack bus is #1 Group all PV buses together next Group all PQ buses together last
2. Generate the bus admittance matrix, ๐๐ And magnitude, Y = ๐๐ , and angle, ฮธ = โ ๐๐, matrices
98
K. Webb ESE 470
Solving the Power-Flow Problem - Procedure
3. Initialize known quantities Slack bus: ๐๐๐ and ๐ฟ๐ฟ๐ PV buses: ๐๐๐๐ and ๐๐๐๐ PQ buses: ๐๐๐๐ and ๐๐๐๐ Output vector:
๐ฒ๐ฒ = ๐๐๐๐
4. Initialize unknown quantities
๐ฑ๐ฑ๐๐ = ๐ ๐ ๐๐๐๐๐๐
=
0โฎ0
1.0โฎ
1.0
๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐๐๐๐๐
(24)
99
K. Webb ESE 470
Solving the Power-Flow Problem - Procedure
5. Set up Newton-Raphson parameters Tolerance for convergence, reltol Maximum # of iterations, max_iter Initialize relative error: ๐๐0 > reltol, e.g. ๐๐0 = 10 Initialize iteration counter: ๐๐ = 0
6. while (๐๐ > reltol) && (๐๐ < max_iter) Update bus voltage phasor vector, ๐๐๐๐, using magnitude
and phase values from ๐ฑ๐ฑ๐๐ and from knowns Calculate the current injected into each bus, a vector of
phasors๐๐๐๐ = ๐๐ โ ๐๐๐๐
100
K. Webb ESE 470
Solving the Power-Flow Problem - Procedure
6. while (๐๐ > reltol) && (๐๐ < max_iter) โ contโd Calculate complex, real, and reactive power injected into each bus This can be done using ๐๐๐๐ and ๐๐๐๐ vectors and element-by-element
multiplication (the .* operator in MATLAB)
๐๐๐๐,๐๐ = ๐๐๐๐,๐๐ โ ๐๐๐๐,๐๐โ
๐๐๐๐,๐๐ = ๐ ๐ ๐๐ ๐๐๐๐,๐๐
๐๐๐๐,๐๐ = ๐ผ๐ผ๐ผ๐ผ ๐๐๐๐,๐๐
Create ๐๐ ๐ฅ๐ฅ๐๐ from ๐๐๐๐ and ๐๐๐๐ vectors Calculate power mismatch, ฮ๐ฒ๐ฒ๐๐
ฮ๐ฒ๐ฒ๐๐ = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ๐๐ Compute the Jacobian, ๐๐๐๐, using voltage magnitudes and phase
angles from ๐๐๐๐
101
K. Webb ESE 470
Solving the Power-Flow Problem - Procedure
6. while (๐๐ > reltol) && (๐๐ < max_iter) โ contโd Solve for ฮ๐ฑ๐ฑ๐๐ using Gaussian elimination
ฮ๐ฒ๐ฒ๐๐ = ๐๐๐๐ฮ๐ฑ๐ฑ๐๐ Use the mldivide (\, backslash) operator in MATLAB: ฮ๐ฑ๐ฑ๐๐ = ๐๐๐๐\ฮ๐ฒ๐ฒ๐๐
Update ๐ฑ๐ฑ
๐ฑ๐ฑ๐๐+๐ = ๐ฑ๐ฑ๐๐ + ฮ๐ฑ๐ฑ๐๐ Check for convergence using power mismatch
๐๐๐๐+๐ = max๐ฆ๐ฆ๐๐ โ ๐๐๐๐ ๐ฑ๐ฑ
๐ฆ๐ฆ๐๐ Update the number of iterations
๐๐ = ๐๐ + 1
102
K. Webb ESE 470
The Jacobian Matrix
The Jacobian matrix has four quadrants of varying dimension depending on the number of different types of buses:
๐๐ =
๐๐๐๐๐๐๐ ๐
๐๐๐๐๐๐๐๐
๐๐๐๐๐๐๐ ๐
๐๐๐๐๐๐๐๐
๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐๐๐๐๐
๐๐๐๐๐๐๐๐๐๐๐๐ + ๐๐๐๐๐๐
๐๐1 ๐๐2
๐๐3 ๐๐4
103
K. Webb ESE 470
The Jacobian Matrix
Jacobian elements are partial derivatives of (9) and (10) with respect to ๐ฟ๐ฟ or ๐๐
Formulas for the Jacobian elements: ๐๐ โ ๐๐
๐๐1๐๐๐๐ =๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐
= ๐๐๐๐๐๐๐๐๐๐๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐2๐๐๐๐ =๐๐๐๐๐๐๐๐๐๐๐๐
= ๐๐๐๐๐๐๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐3๐๐๐๐ =๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐
= โ๐๐๐๐๐๐๐๐๐๐๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐4๐๐๐๐ =๐๐๐๐๐๐๐๐๐๐๐๐
= ๐๐๐๐๐๐๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
(29)
(27)
(28)
(30)
104
K. Webb ESE 470
The Jacobian Matrix
Formulas for the Jacobian elements, contโd: ๐๐ = ๐๐
๐๐1๐๐๐๐ =๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐
= โ๐๐๐๐ ๏ฟฝ๐๐=๐ ๐๐โ ๐๐
๐๐
๐๐๐๐๐๐๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐2๐๐๐๐ =๐๐๐๐๐๐๐๐๐๐๐๐
= ๐๐๐๐๐๐๐๐๐๐ cos ๐๐๐๐๐๐ + ๏ฟฝ๐๐=๐
๐๐
๐๐๐๐๐๐๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐3๐๐๐๐ =๐๐๐๐๐๐๐๐๐ฟ๐ฟ๐๐
= ๐๐๐๐ ๏ฟฝ๐๐=๐ ๐๐โ ๐๐
๐๐
๐๐๐๐๐๐๐๐๐๐ cos ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
๐๐4๐๐๐๐ =๐๐๐๐๐๐๐๐๐๐๐๐
= โ๐๐๐๐๐๐๐๐๐๐ sin ๐๐๐๐๐๐ + ๏ฟฝ๐๐=๐
๐๐
๐๐๐๐๐๐๐๐๐๐ sin ๐ฟ๐ฟ๐๐ โ ๐ฟ๐ฟ๐๐ โ ๐๐๐๐๐๐
(33)
(31)
(32)
(34)
105
K. Webb ESE 470
Power-Flow Solution โ Example 106
K. Webb ESE 470
Power-Flow Solution โ Buses
Determine all bus voltages and power flows for the following three-bus power system
Three buses, ๐๐๐๐๐๐ = 1, ๐๐๐๐๐๐ = 1, ordered PV first, then PQ: Bus 1: slack bus
๐๐๐ and ๐ฟ๐ฟ๐ are known, find ๐๐๐ and ๐๐๐
Bus 2: PV bus ๐๐๐ and ๐๐๐ are known, find ๐ฟ๐ฟ๐ and ๐๐๐
Bus 3: PQ bus ๐๐๐ and ๐๐๐ are known, find ๐๐๐ and ๐ฟ๐ฟ๐
107
K. Webb ESE 470
Per-unit, per-length impedance of all transmission lines:
๐ง๐ง = 31.1 + ๐๐3๐๐ ร 10โ6 ๐๐๐๐/๐๐๐ผ๐ผ
Admittance of each line:
๐๐๐ ๐ = ๐๐๐ ๐ =1
๐ง๐ง โ 150 ๐๐๐ผ๐ผ= 2.06 โ ๐๐20.9 ๐๐๐๐
๐๐๐ ๐ =1
๐ง๐ง โ 200 ๐๐๐ผ๐ผ= 1.54 โ ๐๐15.7 ๐๐๐๐
Power-Flow Solution โ Admittance Matrix108
K. Webb ESE 470
The admittance matrix (see p. 8):
๐๐ =๐๐๐ ๐ โ๐๐๐ ๐ โ๐๐๐ ๐ โ๐๐๐ ๐ ๐๐๐ ๐ โ๐๐๐ ๐ โ๐๐๐ ๐ โ๐๐๐ ๐ ๐๐๐ ๐
=3.6 โ ๐๐3๐.6 โ2.06 + ๐๐20.9 โ1.5 + ๐๐๐๐.7
โ2.06 + ๐๐20.9 4.1 โ ๐๐๐๐.8 โ2.06 + ๐๐20.9โ1.5 + ๐๐๐๐.7 โ2.06 + ๐๐20.9 3.6 โ ๐๐3๐.6
Admittance magnitude and angle matrices:
Y = ๐๐ =36.8 21.0 15.821.0 42.0 21.015.8 21.0 36.8
, ๐๐ =โ84.๐ยฐ 95.๐ยฐ 95.๐ยฐ95.๐ยฐ โ84.๐ยฐ 95.๐ยฐ95.๐ยฐ 95.๐ยฐ โ84.๐ยฐ
Power-Flow Solution โ Admittance Matrix109
K. Webb ESE 470
Power-Flow Solution โ Initialize Knowns
Known quantities Slack bus: ๐๐๐ = 1.0 ๐๐๐๐, ๐ฟ๐ฟ๐ = 0ยฐ PV bus: ๐๐๐ = 1.05 ๐๐๐๐, ๐๐๐ = 2.0 ๐๐๐๐ PQ bus: ๐๐๐ = โ5.0 ๐๐๐๐, ๐๐๐ = โ1.0 ๐๐๐๐ Output vector
๐ฒ๐ฒ = ๐๐๐๐ =
๐๐๐ ๐๐๐ ๐๐๐
=2.0โ5.0โ1.0
110
K. Webb ESE 470
Power-Flow Solution โ Initialize Unknowns
The vector of unknown quantities to be solved for is
๐ฑ๐ฑ = ๐ ๐ ๐๐ =
๐ฟ๐ฟ๐ ๐ฟ๐ฟ๐ ๐๐๐
Initialize all unknown bus voltage phasors to ๐๐๐๐ = 1.0โ 0ยฐ ๐๐๐๐
๐ฑ๐ฑ0 = ๐ ๐ 0๐๐0
=๐ฟ๐ฟ๐ ,0๐ฟ๐ฟ๐ ,0๐๐๐ ,0
=00
1.0
The complete vector of bus voltage phasors โ partly known, partly unknown โ is
๐๐ =๐๐๐ โ ๐ฟ๐ฟ๐ ๐๐๐ โ ๐ฟ๐ฟ๐ ๐๐๐ โ ๐ฟ๐ฟ๐
=1.0โ 0ยฐ
1.0๐โ ๐ฟ๐ฟ๐ ,0๐๐๐ ,0โ ๐ฟ๐ฟ๐ ,0
=1.0โ 0ยฐ
1.0๐โ 0ยฐ1.0โ 0ยฐ
111
K. Webb ESE 470
Power-Flow Solution โ Jacobian Matrix
The Jacobian matrix for this system is
๐๐ =
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐
This matrix will be computed on each iteration using the current approximation to the vector of unknowns, ๐ฑ๐ฑ๐๐
112
K. Webb ESE 470
Power-Flow Solution โ Set Up and Iterate
Set up N-R iteration parameters reltol = 1e-6 max_iter = 1e3 ๐๐0 = 10 ๐๐ = 0
Iteratively update the approximation to the vector of unknowns as long as Stopping criterion is not satisfied
๐๐๐๐ > ๐๐๐ ๐
Maximum number of iterations is not exceeded
๐๐ โค ๐ผ๐ผ๐๐๐ฅ๐ฅ _๐๐๐๐๐๐๐๐
113
K. Webb ESE 470
Power-Flow Solution โ Iterate ๐๐ = 0:
Vector of bus voltage phasors
๐๐0 =๐๐๐ โ ๐ฟ๐ฟ๐ ๐๐๐ โ ๐ฟ๐ฟ๐ ,0๐๐๐ ,0โ ๐ฟ๐ฟ๐ ,0
=1.0โ 0ยฐ
1.0๐โ 0ยฐ1.0โ 0ยฐ
Current injected into each bus
๐๐0 = ๐๐ โ ๐๐0
๐๐0 =3.6 โ ๐๐3๐.6 โ2.1 + ๐๐20.9 โ1.5 + ๐๐๐๐.7โ2.1 + ๐๐20.9 4.1 โ ๐๐๐๐.8 โ2.1 + ๐๐20.9โ1.5 + ๐๐๐๐.7 โ2.1 + ๐๐20.9 3.6 โ ๐๐3๐.6
1.0โ 0ยฐ1.0๐โ 0ยฐ1.0โ 0ยฐ
๐๐0 =1.0๐โ 9๐.๐ยฐ
2.๐0โ โ 84.๐ยฐ1.0๐โ 9๐.๐ยฐ
114
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Complex power injected into each bus
๐๐0 = ๐๐0 .โ ๐๐0โ
๐๐0 =1.0โ 0ยฐ
1.0๐โ 0ยฐ1.0โ 0ยฐ
.โ1.0๐โ 9๐.๐ยฐ
2.๐0โ โ 84.๐ยฐ1.0๐โ 9๐.๐ยฐ
โ
๐๐0 =โ0.103 โ ๐๐๐.0450.216 + ๐๐2.195โ0.103 โ ๐๐๐.045
Real and reactive power
๐๐0 =โ0.1030.216โ0.103
, ๐๐0 =โ1.0452.195โ1.045
115
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Power mismatch
ฮ๐ฒ๐ฒ0 = ๐ฒ๐ฒ โ ๐๐ ๐ฑ๐ฑ0
ฮ๐ฒ๐ฒ0 =2.0โ5.0โ1.0
โ0.216โ0.103โ1.045
=1.784โ4.8970.045
Next, compute the Jacobian matrix
๐๐0 =
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
๐๐๐๐๐ ๐๐๐๐๐ ๐ฑ๐ฑ=๐ฑ๐ฑ0
116
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Elements of the Jacobian matrix are computed using ๐๐
and ๐ฟ๐ฟ values from ๐๐0 and ๐๐ and ๐๐ values from ๐๐:
๐๐0 =1.0
1.051.0
๐ฟ๐ฟ0 =0ยฐ0ยฐ0ยฐ
๐๐ =36.8 21.0 15.821.0 42.0 21.015.8 21.0 36.8
๐๐ =โ84.๐ยฐ 95.๐ยฐ 95.๐ยฐ95.๐ยฐ โ84.๐ยฐ 95.๐ยฐ95.๐ยฐ 95.๐ยฐ โ84.๐ยฐ
117
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Jacobian, ๐๐1
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= โ๐๐๐ ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐ + ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= โ๐๐๐ ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐ + ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= ๐๐๐ ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= ๐๐๐ ๐๐๐ ๐ ๐๐๐ sin ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
118
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Jacobian, ๐๐2
๐๐๐๐๐ ๐๐๐๐๐
= ๐๐๐ ๐๐๐ ๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
๐๐๐๐๐ ๐๐๐๐๐
= 2 โ ๐๐๐ ๐๐๐ ๐ cos ๐๐๐ ๐ +
๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐ + ๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
Jacobian, ๐๐3๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= โ๐๐๐ ๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
๐๐๐๐๐ ๐๐๐ฟ๐ฟ๐
= ๐๐๐ ๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐ + ๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
119
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Jacobian, ๐๐4
๐๐๐๐๐ ๐๐๐๐๐
= ๐๐๐ ๐๐๐ ๐ cos ๐๐๐ ๐ +
๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐ + ๐๐๐ ๐ ๐๐๐ cos ๐ฟ๐ฟ๐ โ ๐ฟ๐ฟ๐ โ ๐๐๐ ๐
Evaluating the Jacobian expressions using ๐๐ and ๐ฟ๐ฟvalues from ๐๐0 and ๐๐ and ๐๐ values from ๐๐, gives
๐๐0 =43.89 โ21.95 โ2.160โ21.95 37.62 3.4972.160 โ3.702 35.53
120
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0:Use Gaussian elimination to solve for ฮ๐ฑ๐ฑ0
ฮ๐ฒ๐ฒ0 = ๐๐0ฮ๐ฑ๐ฑ0 =43.89 โ21.95 โ2.160โ21.95 37.62 3.4972.160 โ3.702 35.53
ฮ๐ฅ๐ฅ๐ ,0ฮ๐ฅ๐ฅ๐ ,0ฮ๐ฅ๐ฅ๐ ,0
=1.784โ4.8970.045
ฮ๐ฑ๐ฑ0 =โ0.0345โ0.1492โ0.0122
Update the vector of unknowns, ๐ฑ๐ฑ
๐ฑ๐ฑ๐ = ๐ฑ๐ฑ0 + ฮ๐ฑ๐ฑ0 =00
1.0+
โ0.0345โ0.1492โ0.0122
=โ0.0345โ0.14920.9878
121
K. Webb ESE 470
Power-Flow Solution โ Iterate
๐๐ = 0: Use power mismatch to check for convergence
๐๐0 = max๐ฆ๐ฆ๐๐ โ ๐๐๐๐ ๐ฅ๐ฅ
๐ฆ๐ฆ๐๐= 0.9794
Move on to the next iteration, ๐๐ = 1 Create ๐๐๐ using ๐ฑ๐ฑ๐ values Calculate ๐๐๐ Calculate ๐๐๐ , ๐๐๐ , ๐๐๐ Create ๐๐ ๐ฑ๐ฑ๐ from ๐๐๐ and ๐๐๐ Calculate ฮ๐ฒ๐ฒ๐ , ๐๐๐ , ฮ๐ฑ๐ฑ๐ Update ๐ฑ๐ฑ to ๐ฑ๐ฑ๐ Check for convergence โฆ
122
K. Webb ESE 470
Power-Flow Solution
Convergence is achieved after four iterations
๐๐4 =1.0โ 0ยฐ
1.1โ โ 2.๐ยฐ0.97โ โ 8.8ยฐ
, ๐๐4 =3.08 โ ๐๐0.822.0 + ๐๐2.67โ5.0 โ ๐๐๐.0
๐๐4 = 0.41 ร 10โ6
123
K. Webb ESE 470
Example Problems124
K. Webb ESE 470
For the power system shown, determine
a) The type of each busb) The first row of the admittance matrix, ๐๐c) The vector of unknowns, ๐ฑ๐ฑd) The vector of knowns, ๐ฒ๐ฒe) The Jacobian matrix, ๐๐, in symbolic form
125
K. Webb ESE 470126
K. Webb ESE 470127
K. Webb ESE 470128