Power System Analysis II: Instructor: E-Mail: Office Phone
Power System Analysis II: Instructor: E-Mail: Office Phone
Instructor: E-mail: Office phone: Yrd. Doc. Dr. Bunyamin Tamyurek [email protected] 0(222) 239-3750 extension 3252
Text book: Power System Analysis and Design, by Glover and Sarma. Midterm I = 30% Midterm II = 30% Final = 40%
Electrical and Electronics Eng. Dept. Osmangazi University February 28, 2005
Power Flows
Successful power system operation under normal balanced three-phase steady-state conditions require the following:
Generation supplies the demand (load) plus losses. Bus voltage magnitudes remain close to rated values. Generators operate within specified real and reactive power limits. Transmission lines and transformers are not overloaded.
The power-flow computer program (commonly called load flow) is the basic tool for investigating these requirements.
(6.1.1)
Ax=y
(6.1.2)
Given A and y, we want to solve for x. We assume the det(A) is nonzero, so a unique solution to (6.1.1) exits. An easy solution is obtained when A is an upper triangular matrix with nonzero diagonal elements.
(6.1.3)
yN xN = ANN
(6.1.4)
x N1 =
(6.1.5)
In general, with xN, xN-1,., xk+1 already computed, the k th equation can solved
yk xk =
n = k +1
Ax
kn
k=N, N-1,.,1
(6.1.6)
Akk
If A is not upper triangular, (6.1.1) can be transformed to an equivalent equation with an upper triangular matrix. The transformation is called Gauss elimination and described by (N-1) steps. During step 1, we use the first equation in (6.1.1) to eliminate X1 from the remaining equations. That is, equation 1 is multiplied by An1/A11 and then subtracted from equation n, for n=2,3,.,N. After completing step 1,we have
A12 A11 0 (A22 A21 A12) A11 A31 0 (A22 A12) A11 M M 0 (AN2 AN1 A12) A11
K L L
y1 A21 A21 (A2 N A1N) x1 y2 y1 A11 x 2 A11 A31 A31 y1 (A32 A1N) x3 = y3 A11 M A11 M xN AN1 yN AN1 y1 (ANN A1N) A11 A11 A1N
(6.1.7)
A (1) 11 0 0 M 0
A (1) 12 L A (1) 22 A
(1)
32
M A (1)N2
L L
(6.18)
(6.1.9)
EAMPLE 6.1 Gauss elimination and back substitution: direct solution to linear algebraic equations
Solve
10 5 x1 6 2 9 x2 = 3
Using Gauss elimination and back substitution. SOLUTION: Since N=2 for this example, there is (N-1)=1 Gauss elimination step. Multiplying the first equation by A21/A11=2/10 and then subtracting from the second,
5 6 10 x1 = 2 2 0 9 (5) x 2 3 (6) 10 10
9
or
10 5 x1 6 0 8 x 2 = 1.8
Which has the form A(1)x=y(1), where A(1) is upper triangular. Now, using back substitution (6.1.6) gives, for k=2:
2 3 1 x1 5 4 6 8 x = 7 2 10 12 14 x 3 9
10
SOLUTION: There are (N-1)=2 Gauss elimination steps. During step 1, we subtract A21/A11=-4/2=-2 times equation 1 from equation 2, and we subtract A31/A11=10/2=5 times equation 1 from equation 3, to give
2 3 1 x1 5 0 12 6 x = 7 2 0 3 19 x3 16
Which is A(1)x=y(1). During step 2, we subtract A(1)32/A(1)22=-3/12=-0.25 times equation 2 from equation 3, to give
11
1 5 2 3 x1 0 12 x = 6 17 2 0 0 19 (0.25)(6) x 3 16 (0.25)(17)
or
2 3 1 x1 5 0 12 6 x = 17 2 0 0 20.5 x3 11.75
Which is triangularized. The solution x can now be easily obtained via back substitution.
12
x(i+1) = g[x(i)]
i = 0,1,2,3.
Where x(i) is the ith guess and g is an N vector of functions that specify the iteration method. Continue the procedure until the following stopping condition is satisfied:
(6.2.2)
Where xk(i) is the kth component of x(i) and is a specified tolerance level.
13
The following questions are important: 1. Will the iteration procedure converge to the unique solution? 2. What is the convergence rate (how many iterations are required)? 3. When using a digital computer, what are the computer storage and time requirements? These questions are addressed for two specific iteration methods: Jacobi and Gauss-Seidel.
The Jacobi method is obtained by considering the kth equation of (6.1.1), as follows:
yk=Ak1x1+Ak2x2+.+Akkxk+.+AkNxN
Solving for xk ,
(6.2.3)
(6.2.4)
14
The Jacobi method uses the old values of x(i) at iteration i on the right side of (6.2.4) to generate the new value xk(i+1) on the left side of (6.2.4). That is,
k 1 N 1 xk (i + 1) = yk Aknxn (i) Aknxn (i) Akk n =1 n = k +1
K=1,2,.,N
(6.2.5)
The Jacobi method given by (6.2.5) can also be written in the following matrix format: x(i+1)=Mx(i)+D-1y Where M=D-1(D-A) and (6.2.7) (6.2.6)
A 11 0 D= M 0
0 L A 22 L M 0 O 0
0 0 M A NN
15
10 5 x1 6 2 9 x 2 = 3
1 10 10 0 1 D = = 0 9 0
1
0 1 9
16
1 10 M= 0
0 0 0 5 = 1 2 0 2 9 9
5 10 0
The above two formulations are identical. Starting with x1(0)=x2(0)=0, the iterative solutions is given in the following table: JACOBI
i x1(i) x2(i) 0 0 0 1 0.60000 0.33333 2 0.43334 0.20000 3 0.50000 0.23704 4 0.48148 0.22222 5 0.48889 0.22634 6 0.48683 0.22469 7 0.48766 0.22515 8 0.48743 0.22496 9 0.48752 0.22502 10 0.48749 0.22500
As shown, the Jacobi method converges to the unique solution obtained in Example 6.1. The convergence criterion is satisfied at the 10th iteration, since
17
1 xk (i +1) = Akk
(6.2.9)
Gauss-Siedel is similar to Jacobi except that during each iteration, the new values, xn(i+1), for n<k are used on the right side of (6.2.9) to generate the new value xk(i+1) on the left side.
18
The Gauss-Seidel method of (6.2.9) can also be written in the matrix format. Where
A11 A D = 21 M A N1
0 A 22
0 0
L L
M AN2 L
0 0 M A NN
(6.2.10)
For Gauss-Seidel, D in (6.2.10) is the lower triangular portion of A, whereas for Jacobi, D in (6.2.8) is the diagonal portion of A.
EXAMPLE 6.4 Gauss-Seidel method: iterative solution to linear algebraic equations Rework Example 6.3 using the Gauss-Seidel method. SOLUTION From (6.2.9)
19
k=1 x1(i+1) = 1/A11 [y1-A12x2(i)] = 0.1[6-5x2(i)] k=2 x2(i+1) = 1/A22 [y2-A21x1(i+1)] = 1/9 [3-2x1(i+1)]
Using the equation for x1(i+1), x2(i+1) can also be written as
x2(i+1) = 1/9{3-0.2[6-5x2(i)]}
Alternatively, in matrix format: 1 1 0 10 10 0 1 D = = 2 1 2 9 90 9
1 1 0 0 10 0 5 2 M= = 2 1 0 0 0 1 90 9 9
0 6 1 3 9
20
1 1 0 x1 (i + 1) 2 x1 (i) 10 x (i + 1) = + 2 2 0 1 x 2 (i) 90 9
These two formations are identical. Starting with x1(0)=x2(0)=0, the solution is given in the following table: i x1(i) x2(i) 0 0 0 1 0.60000 0.20000 2 0.50000 0.22222 3 0.48889 0.22469 4 0.48765 0.22497 5 0.48752 0.22497 6 0.48750 0.22500
For this example, Gauss-Seidel converges in 6 iterations, compared to 10 iterations with Jacobi. The convergence rate is faster with Gauss-Seidel for some A matrices, but faster with Jacobi for other A matrices. In some cases, one method diverges while the other converges.
21
(6.3.1)
Where y and x are N vectors and f(x) is an N vector of functions. Given y and f(x), we want to solve for x. The iterative methods described in Section 6.2 can be extended to nonlinear equations as follows. Rewriting (6.3.1),
0 = y - f(x) Dx=Dx+y-f(x)
Premultiplying by D-1,
(6.3.2)
Adding Dx to both sides of (6.3.2), where D is a square NxN invertible matrix, (6.3.3)
22
x=x+D-1[y-f(x)] x(i+1)=x(i)+D-1{y-f[x(i)]}
for linear equations, f(x)=Ax and (6.3.5) reduces to
(6.3.4)
The old values x(i) are used on the right side of (6.3.4) to generate the new values x(i+1) on the left side. That is, (6.3.5) (6.3.6)
x(i+1)=x(i)+D-1[y-Ax(i)]=D-1(D-A)x(i)+D-1y
Which is identical to the Jacobi an Gauss-Seidel methods of (6.2.6). For nonlinear equations, the matrix D in (6.3.5) must be specified.
One method for specifying D, called Newton-Rapson, is based on the following Taylor series expansion of f(x) about an operating point x0.
df y = f (x0 ) + (x x0 )L dx x=x0
Neglecting the higher order terms in (6.3.7) and solving for x,
(6.3.7)
23
df x = x0 + dx
x = x0
[ y f (x 0 )]
(6.3.8)
The Newton-Rapson method replaces x0 by the old value x(i) and x by the new value x(i+1) in (6.3.8). Thus,
x(i+1)=x(i)+J-1(i){y-f[x(i)]}
where
(6.3.9)
J(i) =
df dx
x = x (i)
df1 dx 2 df 2 dx 2 M df N dx 2
df1 dx N df 2 L dx N M df N L dx N x = x (i) L
(6.3.10)
24
The NxN matrix J(i), whose elements are the partial derivatives shown in (6.3.10) is called the Jacobian matrix. The Newton-Rapson method is similar to extended Gauss-Seidel, except that D in (6.3.5) is replaced by J(i) in (6.3.9).
J(i) =
x(i+1)=x(i)+(1/3)[9-x2(i)]
The corresponding Gauss-Seidel calculations are as follows: GaussSeidel
i x1(i)
0 1
1 3,66667
2 2,18519
3 3,59351
4 2,28908
5 3,54245
6 2,35945
26
x1 + x2 15 x x = 50 1 2
4 x(0) = 9
Use the Newton-Rapson method starting with the above x(0) and continue until =10-4. SOLUTION Using (6.3.10) to find the Jacobian matrix with f1=(x1+x2) and f2=x1x2
f1 x 1 1 J(i) = f 2 x 1
27
x(i+1)=x(i)+J-1(i){y-f[x(i)]}
x1 (i) 1 x1 (i + 1) x1 (i) x 2 (i) 1 15 x1 (i) x 2 (i) x (i + 1) = x (i) + x (i) x (i) 50 x (i)x (i) 1 2 2 2 1 2
Writing the preceding equation as two separate equations,
x1 (i + 1) = x1 (i) +
x 2 (i + 1) = x 2 (i) +
28
i x1(i) x2(i)
0 4 9
1 5,20000 9,80000
2 4,99130 10,00870
3 4,99998 10,00002
4 5,00000 10,00000
Newton-Rapson converges in 4 iterations for this example. Equation (6.3.9) contains the matrix inverse J-1. Instead of computing J-1. (6.3.9) can be rewritten as follows:
J(i) x(i)=y(i)
Where
(6.3.11)
x(i)=x(i+1)-x(i)
And
(6.3.12)
y(i)=y-f[x(i)]
STEP 1 Compute y(i) from (6.3.13). STEP 2 Compute J(i) from (6.3.10).
(6.3.13)
Then, during each iteration, the following four steps are completed:
29
STEP 3 Using Gauss elimination and back substitution, solve (6.3.11) for x(i). STEP 4 Compute x(i+1) from (6.3.12).
EXAMPLE 6.8
Complete the above four steps for the first iteration of Example 6.7 SOLUTION: STEP 1
4 x(0) = 9
STEP 2
1 1 x1 (0) 2 9 4 x (0) = 14 2
Using Gauss elimination, subtract J21/J11=9/1=9 times the first equation from the second equation, giving
1 1 x1 (0) 2 0 5 x (0) = 4 2
Solving by back substitution. x2(0)=-4/-5=0.8 x1(0)=2-0.8=1.2
STEP 4
At each bus, two of these variables are specified as input data, and the other two are unknowns to be computed by the power-flow program.
Vk = Vk k
Gen
Load
33
Each bus k categorized into one of the following three bus types: Swing bus There is only one swing bus and numbered as bus 1. Swing bus is a reference bus for which V , typically 1.00 per unit, 1 1 is input data. The power-flow program computes P1 and Q1. Load bus Pk and Qk are input data. Vk and k are computed. Most buses in a typical power-flow program are load buses. Voltage controlled bus Pk and Vk are input data. Qk and k are computed.
Examples are buses to which generators, switched shunt capacitors, or static var systems, and tap-changing transformer are connected. Maximum and minimum var limits QGkmax and QGkmin that this equipment can supply are also input data. Power-flow program computes the tap setting of the tap-changing transformer.
34
The power delivered to bus k is separated into generator and load terms.
(6.4.1)
When bus k is a load bus with no generation, Pk=-PLk. When the load is inductive, Qk=-QLk is negative. Transmission lines are represented by the equivalent circuit. Transformers are represented by equivalent circuits.
35
Input data for each transmission line include: Series impedance Z' and shunt admittance Y' of per-unit equivalent circuit The two buses to which line is connected Maximum MVA rating Input data for each transformer include: Per-unit winding impedances Z Per-unit exciting branch admittance Y The buses to which the windings are connected Maximum MVA rating Maximum tap settings for tap-changing transformers.
36
The bus admittance matrix Ybus can be constructed from the line and transformer input data. The elements of Ybus are: Diagonal elements: Ykk=sum of admittances connected to bus k Off-diagonal elements: Ykn=-(sum of admittances connected between buses k and n) k n EXAMPLE 6.9 Power-flow input data and Ybus
Figure shows a single-line diagram of a five-bus power system. Input data are given in Tables 6.1, 6.2, and 6.3. Bus 1, to which a generator is connected, is the swing bus. Bus 3, to which a generator and a load are connected, is a voltagecontrolled bus. Buses 2, 4, and 5 are load buses. The loads at buses 2 and 3 are inductive.
37
For each bus k, determine which of the variables Vk , k , Pk , and Qk are input data and which are unknowns. Also, compute the elements of the second row of Ybus.
1
B1
T1
B51
Line 3 345 kV 50 mi
B41
520 MW
3 G
G
400 MVA 15 kV B52 Line 2 345 kV 100 mi
800 MVA 15 kV
40 Mvar
80 MW
B21
B22
280 Mvar
800 MW
38
V
Bus Type per unit 1.0 1.05 -
degrees 0 -
PG
per unit 0 5.2 0 0
QG
per unit 0 0 0
PL
per unit 0 8.0 0.8 0 0
QL
per unit 0 2.8 0.4 0 0
QGmax
per unit 4 -
QGmin
per unit -2.8 -
1 2 3 4 5
39
SOLUTION: The input data and unknowns are listed in Table 6.4
40
Y21 = Y23 = 0
1 1 Y24 = = = 0.89276 + j9.91964 per-unit R + jX 0.009 + j0.1 24 24 Y24 = 9.95972 95.143 per-unit
41
1 1 = = 1.78552 + j19.83932 per-unit Y25 = R + jX 0.0045 + j0.05 25 25 Y25 = 19.9195 95.143 per-unit B B 1 1 24 + +j + j 25 Y22 = R + jX R + jX 2 2 24 24 25 25 1.72 0.88 +j Y22 = ( 0.89276 j9.91964) + (1.78552 j19.83932) + j 2 2 Y22 = 2.67828 j28.4590 = 28.5847 84.624 per-unit
Where half of the shunt admittance of each line connected to bus 2 is included in Y22 the other half is located at the other ends of these lines.
42
I = Ybus V
where I is N vector of source currents injected into each bus and V is the N vector of bus voltages. For bus k, the kth equation in (6.4.3) is
N
(6.4.3)
I k = Ykn Vn
n=1
(6.4.4)
Sk=Pk+jQk=VkI*k
(6.4.5)
Power-flow solutions by Gauss-Seidel are based on nodal equations, (6.4.4), where each current source Ik is calculated from (6.4.5). Using (6.4.4) in (6.4.5),
k=1,2,.,N
(6.4.6)
43
Vn = Vn e
(6.4.6) becomes
j n
k,n=1,2,,N
Pk + jQ k = Vk Ykn Vn e j( k n kn )
n =1
(6.4.9)
Pk = Vk Ykn Vn cos(k n kn )
n =1
N
(6.4.10)
Q k = Vk Ykn Vn sin ( k n kn )
n =1
k=1,2,.,N
(6.4.11)
Power-flow solutions by Newton-Rapson are based on the nonlinear equations given by (6.4.10) and (6.4.11).
44
Note: The current source vector I is unknown For each load bus, Ik can be calculated from (6.4.5), giving
Pk jQ k Ik = * Vk
Applying the Gauss-Seidel method:
(6.5.1)
1 Vk (i + 1) = Ykk
(6.5.2)
45
For the load bus: (6.5.2) can be applied twice during each iteration First using V*k(i), then replacing V*k(i) by V*k(i+1) on the right side. For the voltage-controlled bus: Qk is unknown Find Qk using
QGk = Q k + Q Lk
If calculated value of QGk is within its limits, Use this Qk in (6.5.2) to calculate Vk(i+1)=Vk(i+1)k(i+1). Change the magnitude Vk(i+1) to Vk , which is input data for the voltage-controlled bus. Thus we use (6.5.2) to compute only the angle k(i+1) for voltage-controlled buses.
46
If calculated value exceeds its limit QGkmax or QGkmin during any iteration Change the bus type from a voltage-controlled bus to a load bus, with QGk set to its limit value. Under this condition, the voltage controlling device is not capable of maintaining Vk as specified by the input data. The power-flow program then calculates a new value of Vk. For the swing bus:
V1 and 1 are input data. As such, no iterations are required for bus 1. P1 and Q1 can be computed using 6.4.10 and 6.4.11.
47
1 P2 jQ 2 V2 (1) = [ Y21V1 (1) + Y23 V3 (0) + Y24 V4 (0) + Y25 V5 (0) ] * Y22 V2 (0)
V2 (1) = 8 j(2.8) 1 [ (1.78552 + j19.83932)(1.0) + (0.89276 + j9.91964)(1.0)] 28.5847 84.624 1.0 0 (8 + j2.8) (2.67828 + j29.7589) = 0.96132 16.543 28.5847 84.624 per unit
V2 (1) =
48
V2 (1) =
1 28.5847 84.624
V2 (1) =
49
Q k = Vk Ykn Vn sin ( k n kn )
n =1
Above equations are analogous to the nonlinear equation y=f(x), solved in Section 6.3 by Newton-Raphson. Define x, y, and f vectors for the power-flow problem as
2 M N x= = V V2 M VN
P2 M P PN y= = Q Q2 M Q N
All V, P, and Q terms are in per-unit and terms are in radians. The swing bus variables 1 and V1 are omitted from equations since they are already known. Power-flow equations for Newton-Raphson have the following form:
(6.6.2)
(6.6.3)
k=2,3,.,N
51
P2 2 M PN 2 J= Q 2 2 M Q 2 2
P2 N PN N Q 2 N Q N N
P2 V2 PN V2 Q 2 V2 M Q 2 V2 M
J1
L L
J2
L L
J3
L
J4
L
P2 VN PN Vn Q 2 VN Q N VN
(6.6.4)
J is partitioned into four blocks. The partial derivatives in each block are given in Table 6.5.
52
n=k
J1 k k
N Pk = = V k Y k n V n sin ( k n k n ) n n =1 nk
J 2 kk =
Pk = V k Y k n co s k k + Vk
N
Y
n =1
kn
V n co s( k n k n )
J 3 kk = J 4 kk =
Q k = V k Y k n V n co s( k n k n ) k n =1
nk
Q k = V k Y k k sin k k + Vk
Y
n =1
kn
V n sin ( k n k n )
k, n = 2,3,.,N
53
Apply the four Newton-Raphson steps to the power-flow problem start with
STEP 1
(6.6.5)
STEP 2 STEP 3
Use the equations in the Table 6.5 to calculate the Jacobian matrix. Use Gauss elimination and back substitution to solve
(6.6.6)
(6.6.7)
54
Convergence criteria are often based on y(i) (called power mismatches) rather than on x(i) (phase angle and voltage magnitude mismatches). For each voltage-controlled bus
Vk is already known, and Function Qk(x) is not needed Omit Vk from x vector Qk from y vector Also omit the column and the row from Jacobian matrix that includes Partial derivates with respect to Vk and Partial derivatives of Qk(x).
At the end of each iteration Qk(x) and QGk are calculated, and necessary checks are performed.
55
EXAMPLE 6.10
Determine the dimension of the Jacobian matrix for the power system in Example 6.9. Also calculate P2(0) in step 1 and J124(0) is Step 2 of the first NewtonRaphson iteration. Assume zero initial phase angles and 1.0 per-unit initial voltage magnitudes (except V3=1.05).
SOLUTION Since N=5, (6.6.2) and (6.6.3) constitute 2(N-1)=8 equations, for which J(i) has dimension 8x8. However, there is one voltage-controlled bus, bus 3. Therefore, V3 and the equation for Q3(x) could be eliminated, with J(i) reduced to a 7x7 matrix. From Step 1 and (6.6.2), P2(0)=P2-P2(x)=P2-V2(0){Y21V1cos[2(0)- 1(0)-21] +Y22V2cos[-22]+Y23V3cos[2(0)- 3(0)-23] +Y24V4cos [2(0)- 4(0)-24] +Y25V5cos[2(0)- 5(0)-25]}
56
P2(0)=-8.0-1.0{28.5847(1.0) cos(84.624) +9.95972(1.0) cos(-95.143)+ +19.9159(1.0) cos(-95.143)} =-8.0-(-2.89x10-4)=-7.99972 per unit From Step 2 and J1 given in the Table 6.5 J124(0)=V2(0)Y24V4(0) sin[2(0)- 4(0)-24] =(1.0)(9.95972)(1.0) sin(-95.143) =-9.91964 per unit
57
58
Vt = Vt 0o
59
Vt is the generator terminal voltage, Eg is the excitation voltage, is the power angle, and Xg is the positivesequence synchronous reactance.
I=
E g e j Vt jX g
(6.7.1)
S = P + jQ = Vt I = Vt (
E g e j Vt jX g
S=
(6.7.2)
60
P = Re S =
Vt E g Xg
sin
(6.7.3)
Q = ImS =
Vt (Eg cos Vt ) Xg
(6.7.4)
Eg
P Q
61
SW
IC ETh
Vt
IC
ETh
jX Th IC
R Th IC
Vt
62
(6.8.1)
One method for compact storage of S consists of the following four vectors:
DIAG = [1.0 2.0 3.0 4.0]
(6.8.2) (6.8.3) (6.8.4) (6.8.5)
63
COL = [ 2 3 4 1 4 1 1]
ROW = [3 2 1 1]
40N instead of 8N2 For a 1000-bus power system this means 40 kilobytes instead of 8000 kilobytes
Reordering the buses is another sparsity technique The S matrix after one Gauss elimination step
2.1 3.1 1.0 1.1 0 2.51 8.61 7.61 S(1) = 0 6.71 9.81 18.91 0 7.81 14.91 18.01
Original degree of sparsity is lost
(6.8.6)
64
Reorder the buses to start with those buses having the fewest connected branches and to end with those having the most connected branches. Reorder buses 4, 3, 2, 1 instead of 1, 2, 3, 4.
1.0 1.1 2.1 3.1 4.1 2.0 5.1 0 S= 6.1 0 3.0 0 0 4.0 7.1 0
Sreordered
0 0 7.1 4.0 0 3.0 0 6.1 = 5.1 0 2.0 4.1 3.1 2.1 1.1 1.0
(6.8.7)
S(1) reordered
(6.8.8)
65
J2(i) 0 J3(i) 0
(6.9.1)
(6.9.2)
66