Вы находитесь на странице: 1из 209

# 22 July 2011 1

A. J. Conejo
Univ. Castilla La Mancha
2011
22 July 2011 2
0. References
1. Introduction
2. Problem formulation
Two-bus case
Matrix
General equations
Bus classification
Variable types and
limits
BUS Y
22 July 2011 3
3. The Gauss-Seidel solution technique
Introduction
Algorithm initialization
PQ Buses
PV Buses
Stopping criterion
22 July 2011 4
4. The Newton-Raphson solution technique
Introduction
General fomulation
Jacobian matrix
Solution outline
22 July 2011 5
5. Fast decoupled AC load flow
8. Comparison of load flow solution methods
22 July 2011 6
References
1. A. Gmez Expsito, A. J. Conejo, C.
Caizares. Electric Energy Systems.
Analysis and Operation. CRC Press, Boca
Raton, Florida, 2008.
2. A. R. Bergen, V. Vittal. Power Systems
Analysis. Second Edition. Prentice Hall,
Upper Saddle River, New Jersey, 1999.
22 July 2011 7
1. Introduction
22 July 2011 8
Introduction
A snapshot of the system
Most used tool in steady state power system
analysis
Knowning the demand and/or generation of
power in each bus, find out:
buses voltages
load flow in lines and transformers
22 July 2011 9
Introduction
The problem is described throught a non-
lineal system of equations
Need of iterative solution techniques
Solution technique: accuracy vs. computing
time
22 July 2011 10
Introduction
Applications:
1. On-line analyses
State estimation
Security
Economic analyses
22 July 2011 11
Introduction
2. Off-line analyses
Operation analyses
Plannig analyses
Network expansion planning
Power exchange planning
- Faults
- Stability
22 July 2011 12
2. Problem formulation
22 July 2011 13
Problem formulation
Two-bus case
We want to find out the relationship between
and in all buses of the power
system
i i i
jQ P S + =
i
j
i i
e V V
o
=

2
V
G
Y
S
Y
1
V
2
I
G
Y
1
I
Transmission line model
22 July 2011 14
Problem formulation
Two-bus case
| | | | | |
BUS BUS BUS
2
1
22 21
12 11
2
1
S G S
S S G
2
1
S
1 2 G 2 2
S
2 1 G 1 1
V Y I
V
V
Y Y
Y Y
V
V
Y Y Y
Y Y Y
I
I
Y ) V V ( Y V I
Y ) V V ( Y V I
=
(

=
(

+
+
=
(

+ =
+ =
Using Kirchhoff laws:
Matrix notation:
22 July 2011 15
Problem formulation
Two-bus case
Complex power injected in each bus:
) V Y V Y ( V I V S
) V Y V Y ( V I V S
I V jQ P S S S
I V jQ P S S S
*
2
*
22
*
1
*
21 2
*
2 2 2
*
2
*
12
*
1
*
11 1
*
1 1 1
*
2 2 2 2 2 D 2 G 2
*
1 1 1 1 1 D 1 G 1
+ = =
+ = =
= + = =
= + = =
22 July 2011 16
Problem formulation
Two-bus case continuation
Notation:
Replacing:
) ( j
2
1 k
k k 2 2 2 2
) ( j
2
1 k
k k 1 1 1 1
j
i i
j
ik ik
k 2 k 2
k 1 k 1
i
ik
e V Y V jQ P
e V Y V jQ P
e V V
e Y Y
u o o
=
u o o
=
o
u

= +
= +
=
=
22 July 2011 17
Problem formulation
Two-bus case continuation
Therefore, the no lineal equations for the 2
buses network are:
2 , 1 i
) ( sin V Y V Q
) ( cos V Y V P
ik k i
2
1 k
k ik i i
ik k i
2
1 k
k ik i i
=
u o o =
u o o =

=
=
22 July 2011 18
Problem formulation
Matrix Y
bus
Two bus case
(

+
+
=
(

=
S G S
S S G
22 21
12 11
BUS
Y Y Y
Y Y Y
Y Y
Y Y
Y
22 July 2011 19
General building rules
Matrix Y
bus
1. Self admittance of node i, ,equals the
algebraic sum of all the admittances
connected to node i
2. Mutual admittance between nodes i and
k, ,equals the negative of the sum of
all admittances connecting nodes i and k
3.
ii
Y
ik
Y
ki
Y
ik
Y =
22 July 2011 20
Problem formulation
Matrix Y
bus
Caracteristics of
1. is symmetric
2. is very sparse
(>90% for more than 100 buses)
BUS
Y
BUS
Y
BUS
Y
22 July 2011 21
Y
bus
example
Shunt element
Series element
line) per (two 01 . 0 j Y
G
=
1 . 0 j Z
S
=

(
(
(

=
98 . 19 j 10 j 10 j
10 j 98 . 19 j 10 j
10 j 10 j 98 . 19 j
Y
BUS
22 July 2011 22
Problem formulation
General equations
2n equations (static load flow equations)
| |
| |
system bus n
n ,..., 1 i
2 ) ( sin V Y V Q Q Q
1 ) ( cos V Y V P P P
ik k i
n
1 k
k ik i Di Gi i
ik k i
n
1 k
k ik i Di Gi i

=
u o o = =
u o o = =

=
=
22 July 2011 23
Problem formulation
General equations
k i ik
ik ik
ik
ik ik ik ik
n
1 k
k i i
ik ik ik ik
n
1 k
k i i
B j G Y
where
] 2 [ ) cos B sen G ( V V Q
] 1 [ ) sen B cos G ( V V P
o o = o
+ =
o o =
o + o =

=
=
Polar representation for voltages and rectangular
22 July 2011 24
Problem formulation
General equations
4n variables
If 2n variables are specified, the other 2n are
determined by equations [1] and [2]
n ,..., 1 i ; Q , P , , V
i i i i
= o
22 July 2011 25
Problem formulation
BUS Classification
1. PQ buses
known ( known, zero)
known ( known, zero)
unknown
unknown
i
P
i
Q
i
V
i
o
Di
P
Gi
P
Di
Q
Gi
Q
22 July 2011 26
Problem formulation
BUS Classification
2. PV buses
known
unknown
known ( specified, known)
known (specified)
unknown ( unknown, known)
unknown
i
V
i
P
i
Q
i
P
i
Q
Di
P
Gi
Q
Gi
P
Di
Q
i
o
22 July 2011 27
Problem formulation
BUS Classification
3. Slack bus, generator with large capacity.
known (specified)
known (specified, typically
reference)
unknown ( known, unknown)
unknown ( known, unknown)
1
V
1
o
1
Q
1
P
1 D
P
1 D
Q
1 G
Q
1 G
P
= o 0
1
22 July 2011 28
Problem formulation
Variable types and limits
Power balance

= =
= =
+ =
+ =
n
1 i
n
1 i
LOSS Di Gi
n
1 i
n
1 i
LOSS Di Gi
Q Q Q
P P P
22 July 2011 29
Problem formulation
Variable types and limits
Variable types
Control variables
(excepting slack bus)
Non-control variables
State variables
Gi
P
i i
V o
i
Gi
V or Q
Di Di
Q P
22 July 2011 30
Problem formulation
Variable types and limits
Variable limits
Voltage magnitude
Power angle (every existing line)
Power limits
max
i i
min
i
V V V s s
max
k i k i
o o s o o
max , Gi Gi min , Gi
max , Gi Gi min , Gi
Q Q Q
P P P
s s
s s
31
3.The Gauss-Seidel solution
technique
22 July 2011
22 July 2011 32
Gauss-Seidel solution technique
c <
=
= =
+
+
) r ( ) 1 r (
) r ( ) 1 r (
x x
) x ( F x
) x ( F x 0 ) x ( f
No lineal system:
Iteration
Stoping rule
22 July 2011 33
Gauss-Seidel solution technique
Example
Many iterations!
0000 . 1 x , 12 r
0000 . 1 x , 11 r
0001 . 1 x , 10 r
...
0042 . 1 x , 6 r
0103 . 1 x , 5 r
...
1442 . 1 8 . 0 312 . 1 2 . 0 x , 2 r
312 . 1 8 . 0 6 . 1 2 . 0 x , 1 r
6 . 1 8 . 0 2 2 . 0 x , 0 r
2 x ; 8 . 0 ) x ( 2 . 0 x
8 . 0 x 2 . 0 x
0 4 x 5 x ) x ( f
) 13 (
) 12 (
) 11 (
) 7 (
) 6 (
2 ) 3 (
2 ) 2 (
2 ) 1 (
) 0 ( 2 ) r ( ) 1 r (
2
2
= =
= =
= =
= =
= =
= + = =
= + = =
= + = =
= + =
+ =
= + =
+
22 July 2011 34
Gauss-Seidel solution technique
Algorithm beginning
1) Known
) Buses PV ( m ,..., 2 i Q , Q
) Buses PQ ( n ,..., 1 m i V , V
bus slack V
) Buses PV ( m ,..., 2 i V
) Buses PQ ( n ,..., 1 m i Q
) Buses PQ & PV ( n ,..., 2 i P
max , Gi min , Gi
max
i
min
i
1
i
i
i
=
+ =
=
+ =
=
22 July 2011 35
Gauss-Seidel solution technique
Algorithm beginning
2) Build
3) Initialize voltages
n ,..., 2 i
n ,..., 1 m i V V
0
i i
0
i i
= o = o
+ = =
BUS
Y
22 July 2011 36
Gauss-Seidel solution technique
PQ buses
4) PQ buses
i k ; n ,..., 1 k ; n ,..., 1 m i
Y
Y
B
n ,..., 1 m i
Y
jQ P
A
V Y
V
jQ P
Y
1
V
V Y V V Y V I V jQ P S
ii
ik
ik
ii
i i
i
n
i k
1 k
k ik
*
i
i i
ii
i
n
i k
1 k
k ik
*
i i ii
*
i
i
*
i
i i
*
i
= = + = =
+ =

=
(
(
(

=
+ = = =

=
=
=
=
22 July 2011 37
Gauss-Seidel solution technique
PQ buses
At iteration (r+1) and bus i, the available values of
voltages at previous buses are used:
) r (
k
n
1 i k
ik
) 1 r (
k
1 i
1 k
ik
*
) r (
i
i ) 1 r (
i
V B V B
) V (
A
V

+ =
+

=
+
=
22 July 2011 38
Gauss-Seidel solution technique
PV buses
5) PV buses
)
`

=
= = =

=
=
n
1 k
k ik
*
i
i
n
1 k
k ik
*
i i
*
i
i i
*
i
V Y V Q
V Y V I V jQ P S
22 July 2011 39
Gauss-Seidel solution technique
PV buses
At iteration (r+1):
| |

= o

= = o
)
`

+ =

= + =
+
+
+
+
+
=

=
+
+
1 i
1 k
n
1 i k
) r (
k
ik
) 1 r (
k
ik
*
) r (
i
) 1 r (
i
) 1 r (
i
ii
) 1 r (
i
i
) 1 r (
i
i
i
n
i k
) r (
k
ik
1 i
1 k
*
) r (
i
) 1 r (
k
ik
*
) r (
i
) 1 r (
i
V B V B
) V (
A
angle
Y
jQ P
A V angle
V Y ) V ( V Y ) V ( Q
22 July 2011 40
Gauss-Seidel solution technique
PV buses
Beware of limits!
(more on this below)
PQ becomes i & Q Q Q Q
PQ becomes i & Q Q Q Q
max , i
) 1 r (
i max , i
) 1 r (
i
min , i
) 1 r (
i min , i
) 1 r (
i
= >
= s
+ +
+ +
22 July 2011 41
Gauss-Seidel solution technique
PV buses
6.1) Slack bus power (after convergence)

=
+
=
= c <
n
1 k
k k 1
*
1
1 1
) r (
i
) 1 r (
i
V Y V jQ P
n ,..., 2 i ; V V
6) Stop criterion
22 July 2011 42
Gauss-Seidel solution technique
Algorith final calculations
6.2) Compute line currents (after convergence)

i V
i
k V
k
ik
S
ik
S
0 ik Y
Lik
Y
0 ik
I
Lik
I
Lki
I
0 ki Y
0 ki
I
0 ki k 0 ki Lik i k Lki
0 ik i 0 ik Lik k i Lik
Y V I ; Y ) V V ( I
Y V I ; Y ) V V ( I
= =
= =
22 July 2011 43
Gauss-Seidel solution technique
Algorith final calculations
6.2) Compute line complex power (after convergence)
; Y V V Y ) V V ( V S
; Y V V Y ) V V ( V S
*
0 ik
*
i i
*
Lik
*
k
*
i i ik
*
0 ki
*
k k
*
Lik
*
i
*
k k ki
+ =
+ =

i V
i
k V
k
ik
S
ik
S
0 ik Y
Lik
Y
0 ik
I
Lik
I
Lki
I
0 ki Y
0 ki
I
22 July 2011 44
Gauss-Seidel solution technique
Algorith final calculations
6.3) Compute losses (after convergence)
7) If no convergence, go to step 4.

=
+ =
i , k
ik , loss loss
ki ik ik , loss
S S
i , k ; S S S
22 July 2011 45
Gauss-Seidel solution technique
Algorithm improvement
Acceleration factor (in order to decrease
the number of iterations):
| |
) r (
i
) 1 r (
i
) r (
i
) 1 r (
i
V V V V
~
o + =
+
+
o = 1.6 (generally recommended)
22 July 2011 46
Gauss-Seidel
Matlab code
function [Vfinal,angfinal,nite,P,Q,errorplot,tiempo]=Gaussgen(m,n,Ybus,Vmodini,Angini,P,Q,tol,Vmax,Vmin,Qmax,Qmin)
%--------------------------------------------------------------------------------------------------------------------------------------------------
%-function [Vmod,ang,nite,P,Qerrorplot,tiempo]=Gaussgen(m,n,Ybus,Vmodini,Angini,P,Q,tol,Vmax,Vmin,Qmax,Qmin)
%-Resuelve de forma general problema de carga por el metodo de Gauss-Seidel
%-donde:
%-2...m nudos PV; (m=1 cuando no hay nudos PV)
%-n nudos totales
%-Vmodini tensiones iniciales modulo
%-P potencia activa inicial
%-Q potencia reactiva inicial
%-tol tolerancia para error en tension y potencia reactiva
%-Vmax Vmin valores limites aceptables para las tensiones
%-Qmax Qmin valores limites aceptables para las potencias reactivas
%-nite numero de iteraciones
%-Vfinal vector con todas las potencias para cada iteracion
%-angfinal igual pero con los angulos
%-tiempo, tiempo invertido en hacer las operaciones
%---------------------------------------------------------------------------------------------------------------------------------------------------
%calculo de la matriz B
B=zeros(n,n);
for t=1:n
for k=1:n
B(t,k)=Ybus(t,k)/Ybus(t,t);
end
end
22 July 2011 47
Gauss-Seidel
Matlab code 2
V=zeros(n,1);
for a=1:n
V(a)=Vmodini(a)*exp(i*Angini(a));
end
ang=Angini;
%empieza el bucle:
error=1; %valores iniciales para poder entrar en el bucle
errorQ=1;
nite=0;
tic;
while max(abs(error))>tol | max(abs(errorQ))>tol
nite=nite+1;
Vmod=abs(V);
Vini=V;
ang=angle(V);
Qini=Q;
%calculo las reactivas para los nudos PV
if m>1
for l=2:m
AQ=0;
for k=1:n
AQ=AQ+Ybus(l,k)*V(k);
end
Q(l)=-imag((V(l)')*AQ);
end
22 July 2011 48
Gauss-Seidel
Matlab code 3
%calculo las A para todos los nudos:
for a=1:n
A(a)=(P(a)-i*Q(a))/Ybus(a,a);
end
%calculo los angulos nudos PV:
for l=2:m
Aang=0;
for k=1:n
Aang=Aang+B(l,k)*V(k);
end
ang(l)=angle(A(l)/((V(2))')-Aang+B(l,l)*V(l));
end
end
for a=1:n
A(a)=(P(a)-i*Q(a))/Ybus(a,a);
end
%ahora actualizo los voltajes otra vez:
for a=1:n
V(a)=Vmod(a)*exp(i*ang(a));
end
%ahora calculo los nudos PQ
AV=zeros(n,1);
for p=m+1:n
for k=1:n
AV(p)=AV(p)+B(p,k)*V(k);
end
V(p)=A(p)/((V(p))')-AV(p)+B(p,p)*V(p);
end
error=Vini-V;
errorQ=Qini-Q;
errorplot(1,nite)=norm(abs(error));
Vfinal(:,nite)=abs(V);
end
22 July 2011 49
Gauss-Seidel
Matlab code 4
%calculos los valores de potencia para el nudo slack:
S1=0;
for t=1:n
S1=S1+(V(1)')*(Ybus(1,t)*V(t));
end
P(1)=real(S1);
Q(1)=-imag(S1);
tiempo=toc;
%alerta por si se sobrepasan valores aceptables:
if max(Vmod)>Vmax | min(Vmod)<Vmin
disp('SE SOBREPASAN LIMITES TENSIONES!!')
end
if max(Q)>Qmax | min(Q)<Qmin
disp('SE SOBREPASAN LIMITES REACTIVA!!')
end
ang=(180/pi)*angle(V);
Vmo=abs(V);
%represento los errores por iteracion:
plot(1:nite,errorplot,'o');grid on;xlabel('iteracion');ylabel('error por iteracion');title('evolucion error tesion');
%------------------------------------------------------------%
% %
% Realizado por Carlos Ruiz Mora octubre 2006 %
% %
%------------------------------------------------------------%
50
Gauss-Seidel example
22 July 2011
22 July 2011 51
G-S Example
Solution tolerance is set to 0.1 MVA.
ONE TWO
THREE
22 July 2011 52
G-S Example
Data below. Base power is S
B
=100 MVA:
Bus Voltage (p.u.) Power
1 1.02
(slack)
2 1.02 P
G
=50 MW
3 - P
C
=100 MW
Q
C
=60 MVAr
Lin Impedance (p.u.)
1-2 0.02+0.04j
1-3 0.02+0.06j
2-3 0.02+0.04j
(each)
22 July 2011 53
Solution procedure
1. Data and unknown:
Bus Type Data Unknown
1 Slack V
1
=1.02 o
1
=0.0 P
1
Q
1
2 PV V
2
=1.02 P
2
=0.5
2
Q
2
3 PQ P
3
=-1.0 Q
2
=-0.6
3
V
3
22 July 2011 54
Solution procedure
(
(
(

+ +
+ +
+ +
=
j 55 25 j 40 20 j 15 5
j 40 20 j 60 30 j 20 10
j 15 5 j 20 10 j 35 15
Y
BUS
BUS
Y
ONE TWO
THREE
22 July 2011 55
Solution procedure
3. Voltage magnitude initialization (iteration 0):
1 V V
0
3 3
= =
PQ bus
0
0
0
3 3
0
2 2
= o = o
= o = o
All buses but the reference one
Vector form:
(
(
(

= o
(
(
(

=
0
0
0
1
02 . 1
02 . 1
V
0 0
22 July 2011 56
Solution procedure
Per iteration:
- PV buses (Q, ) i=2,...,m (bus 2)
- PQ buses (V, ) i=m+1,...,n (bus 3)
- Stopping criterios:
a) convergence S
slack
and power flows;
b) no converge new iteration
22 July 2011 57
Solution procedure
4. PV buses: iteration (r+1) :
bus 2:
{ }
22
) 1 r (
2 2
) 1 r (
2 2 2
) r (
3 23
* ) r (
2
) r (
2 22
* ) r (
2
) 1 r (
1 21
* ) r (
2
) 1 r (
2
Y
jQ P
A ] V [ angle
V Y ) V ( V Y ) V ( V Y ) V ( Q
+
+
+ +

= = o
+ + =
22 July 2011 58
Solution procedure
)
`

= o
+
+
+
+ ) r (
3 23
) 1 r (
1 21
* ) 1 r (
2
) 1 r (
2
) 1 r (
2
V B V B
) V (
A
angle
where
ii
ik
ik
Y
Y
B =
is a constant
22 July 2011 59
Solution procedure
5. Buses PQ iteration (r+1):
bus 3:
) 1 r (
2
32
) 1 r (
1
31
* ) r (
3
3
) 1 r (
3
V B V B
) V (
A
V
+ + +
=
where
ii
ik
ik
33
3
3
3
Y
Y
B
Y
jQ P
A
=

=
Are constants for PQ buses
22 July 2011 60
Solution procedure
6. Stopping criterion:
3
10

= c
| Q Q |
&
| V V |
) r (
j
) 1 r (
j
) r (
i
) 1 r (
i

+
+
c < 2 j ; 3 , 2 i = =
22 July 2011 61
Solution procedure
If convergence:
6.1) Slack power
6.2) Power flows
) V Y V Y V Y ( V jQ P S
3
13
2
12
1
11
*
1 1 1
*
slack
+ + = =
*
Lik
k
*
i
i ik
Y ) V V ( V S -
*
=
32 31 23 13 21 12
S , S , S , S , S , S
22 July 2011 62
Solution procedure
6.3) Line losses:
23 , loss 13 , loss 12 , loss loss
ki ik ik , losss
S S S S
3 , 2 , 1 i , k S S S
+ + =
= + =
7. If no coveergence, the procedure continues in Step 4.
22 July 2011 63
Implementation
MATLAB:
22 July 2011 64
Solution
11 iterations needed to attain the solution
Iteration (pu) 1 2 3 ... 10 11
P
1
,Q
1
(slack) - - - ... -
0.5083
0.0716
P
2
0.5 0.5 0.5 ... 0.5 0.5
Q
2
0.81 0.4084 0.4696 ... 0.5493 0.5501
P
3
-1.0 -1.0 -1.0 ... -1.0 -1.0
Q
3
-0.6 -0.6 -0.6 ... -0.6 -0.6
22 July 2011 65
Solution
Iteration 1 2 3 ... 10 11
1.02 1.02 1.02 ... 1.02 1.02
0 0 0 ... 0 0
1.02 1.02 1.02 ... 1.02 1.02
0.0675 -0.1596 -0.2885 ... -0.4667 -0.4685
1.0041 1.0042 1.0043 ... 1.0043 1.0043
-0.5746 -0.7336 -0.8278 ... -0.9580 -0.9593
1
V
2
V
3
V
) (
1
o
) (
2
o
) (
3
o
22 July 2011 66
Solution
Iteration 1 2 3 ... 10 11
Max. Error V 0.0041 9.6810
-5
5.0510
-5
... 1.1510
-6
6.7410
-7
Max. Error Q 0.8160 0.4076 0.0612 ... 0.0014 8.1110
-4
Errors for |V| & |Q|:
22 July 2011 67
Final Solution
Bus P (MW) Q (MVAr ) (pu)
1 50.83 7.16 1.02 0
2 50.00 55.01 1.02 -0.4685
3 -100 -60.00 1.0043 -0.9593
V
Z
Z
Z
22 July 2011 68
Checking
Checking using Power-World:
ONE TWO
THREE
22 July 2011 69
Checking
Bus 1 Bus 2 Bus 3
Solution
G-S PW G-S PW G-S PW
V (pu) 1.02 1.02 1.02 1.02 1.0043 1.0043
() 0 0 -0.4685 -0.4710 -0.9593 -0.9612
P (MW) 50.83 50.98 50.00 50.00 -100 -100
Q (MVAr) 7.16 7.10 55.01 55.12 -60 -60
22 July 2011 70
Checking
Variable V P Q
Error Max. (%) 0 % 0.53 % 0.29% 0.84 %
71
4. The Newton-Raphson solution
technique
22 July 2011
22 July 2011 72
The Newton-Raphson solution technique
Introduction
One variable
) r (
) r (
) r ( ) 1 r (
) 0 ( ) 0 ( ) 1 (
) 0 (
) 0 (
) 0 (
) 0 (
) 0 ( ) 0 ( ) 0 ( ) 0 (
) 0 ( ) 0 ( ) 0 (
dx
df
) x ( f
x x
x x x ;
dx
df
) x ( f
x
...
dx
df
x ) x ( f 0 ) x x ( f
0 ) x x ( f , 0 ) x ( f , 0 ) x ( f
|
.
|

\
|
=
A + =
|
.
|

\
|
= A
+
|
.
|

\
|
A + = = A +
= A + = =
+
22 July 2011 73
The Newton-Raphson solution technique
Introduction
Example
! Fast
0000 . 1
5 9988 . 0 2
4 9988 . 0 5 9988 . 0
9988 . 0 x
9988 . 0
5 9375 . 0 2
4 9375 . 0 5 9375 . 0
9375 . 0 x
9375 . 0
5 5 . 0 2
4 5 . 0 5 5 . 0
5 . 0 x
5 . 0 x ;
5 x 2
4 x 5 ) x (
x x
5 x 2
dx
) x ( df
; 0 4 x 5 x ) x ( f
2
) 3 (
2
) 2 (
2
) 1 (
) 0 (
) r (
) r ( 2 ) r (
) r ( ) 1 r (
2
=

+
=
=

+
=
=

+
=
=

+
=
= = + =
+
22 July 2011 74
The Newton-Raphson solution technique
General formulation
General case
| |
| | ) x ( f J x x
x x x
) x ( f J x
0 x J ) x ( f ) x x ( f
0 ) x x ( f , 0 ) x ( f R R : 0 ) x ( f
) r (
1
) r ( ) r ( ) 1 r (
) 0 ( ) 0 ( ) 1 (
) 0 (
1
) 0 ( ) 0 (
) 0 ( ) 0 ( ) 0 ( ) 0 (
) 0 ( ) 0 ( ) 0 ( n n

=
A + =
= A
= A + = A +
= A + = =
22 July 2011 75
The Newton-Raphson solution technique
General formulation
(
(
(
(
(
(
(

c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
=
(
(
(
(

=
(
(
(
(

=
n
n
2
n
1
n
n
2
2
2
1
2
n
1
2
1
1
1
n
2
1
n
2
1
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x
f
x
f
J
f
f
f
f
x
x
x
x

22 July 2011 76
The Newton-Raphson solution technique
| |
n 1 m n 2
sp , i i iQ i
sp , i i iP i
n
1 k
ik ik ik ik k i iQ
n
1 k
ik ik ik ik k i iP
) r (
n
) r (
1 n
) r (
1 m
) r (
n
) r (
3
) r (
2
) r (
V ,..., V ; ,...,
Q Q , f ) ( Q
P P , f ) ( P
) cos B sin G ( V V ) ( f
) sin B cos G ( V V ) ( f
V
V
V
x
+
=
=

+
o o
=
=
o o -
o + o -
(
(
(
(
(
(
(
(
(
(
(

o
o
o
=

22 July 2011 77
The Newton-Raphson solution technique
) r (
iQ sp , i
) r (
i
) r (
iP sp , i
) r (
i
) r (
n
) r (
n
iQ ) r (
1 m
) r (
1 m
iQ ) r (
n
) r (
n
iQ ) r (
2
) r (
2
iQ ) r (
iQ sp , i
) r (
n
) r (
n
iP
) r (
1 m
) r (
1 m
iP
) r (
n
) r (
n
iP
) r (
2
) r (
2
iP
) r (
iP sp , i
f Q Q ; f P P
V
V
f
... V
V
f f
...
f
f Q
V
V
f
... V
V
f f
...
f
f P
= A = A
A
(

c
c
+ + A
(

c
c
+ o A
(

o c
c
+ + o A
(

o c
c
+ ~
A
(

c
c
+ + A
(

c
c
+ o A
(

o c
c
+ + o A
(

o c
c
+ ~
+
+
+
+
Using Taylor:
The increments below should be 0:
22 July 2011 78
The Newton-Raphson solution technique
(
(
(
(
(
(
(
(

A
A
o A
o A
(
(
(
(
(
(
(

o c
c
(

o c
c
(

c
c
(

o c
c
=
(
(
(
(
(
(
(
(

A
A
A
A
+ +
) r (
n
) r (
1 m
) r (
n
) r (
2
) r (
n
nQ
) r (
2
nQ
) r (
n
P 2
) r (
2
P 2
) r (
n
) r (
1 m
) r (
2
) r (
2
V
V
f
... ...
f
... ... ... ...
... ... ... ...
V
f
... ...
f
Q
Q
P
P

Matrix notation:
22 July 2011 79
The Newton-Raphson solution technique
Jacobian matrix
PQ buses generate 2 Jacobian rows
corresponding to P and Q
PV buses generate 1 Jacobian row
corresponding to P
22 July 2011 80
The Newton-Raphson solution technique
Jacobian elements
Jacobian dimension
buses PV of Number N
buses PQ of Number N
N N 2
PV
PQ
PV PQ
+
22 July 2011 81
The Newton-Raphson solution technique
Jacobian elements
Jacobian dimension
efficiency nal computatio improving for
V
V
V
V
L J
N H
Q
P
) 1 r (
) r (
) 1 r (
) r (
) 1 r (
) 1 r (
) r ( ) r (
) r ( ) r (
) r (
) r (
+
+
+
+
A
A
(
(

A
o A

=
(
(

A
A
22 July 2011 82
The Newton-Raphson solution technique
Jacobian elements
) cos B sin G ( V V
V
Q
V L
) sin B cos G ( V V
Q
J
) sin B cos G ( V V
V
P
V N
) cos B sin G ( V V
P
H
k m
km km km km m k
m
k
m km
km km km km m k
m
k
km
km km km km m k
m
k
m km
km km km km m k
m
k
km
o o =
c
c
=
o + o =
o c
c
=
o + o =
c
c
=
o o =
o c
c
=
= -
22 July 2011 83
The Newton-Raphson solution technique
Jacobian elements
2
k kk k
k
k
k kk
km km
km
2
k kk k
k
k
kk
m k km
2
k kk k
k
k
k kk
2
k kk k
k
k
kk
V B Q
V
Q
V L
jB G Y V G P
Q
J
V G P
V
P
V N
: Note V B Q
P
H
m k
=
c
c
=
+ =
o c
c
=
o o o + =
c
c
=
- =
o A
A
=
= -
22 July 2011 84
The Newton-Raphson solution technique
Solution outline
1. Build
2. Specify
3. Initialize
1
i
i
i
1
V
m ,..., 2 i V
n ,..., 1 m i Q
n ,..., 2 i P
0
=
+ =
=
= o

+ =
= o
n ,..., 1 m i , V
n ,..., 2 i ,
i
i
BUS
Y
22 July 2011 85
The Newton-Raphson solution technique
Solution outline
4. Compute
5. If
6. Compute submatrices
on go else
Stop ) 3
flows line ) 2
jQ P ) 1
compute then
Q & P
1 1
Q
) r (
i
P
) r (
i

+
c s A c s A
) r ( ) r ( ) r ( ) r (
L , J , N , H
) Buses PQ for ( Q ), Buses PQ & PV for ( P
) r (
i
) r (
i
A A
22 July 2011 86
The Newton-Raphson solution technique
Solution outline
7. Solve
8. Update
9. Go to step 4
(

A
A
(

=
(
(

A
o A

+
+
) r (
) r (
1
) r ( ) r (
) r ( ) r (
) r (
) 1 r (
) 1 r (
Q
P
L J
N H
V
V
Buses PV V V V
Buses PQ & PV
) 1 r ( ) r ( ) 1 r (
) 1 r ( ) r ( ) 1 r (
+ +
+ +
A + =
o A + o = o
22 July 2011 87
The Newton-Raphson, Matlab Code
function [V_modulo, V_fase, P, Q, N_iter, T_calculo, Error_p] = nraphson(V_modulo_ini, V_fase_ini, P_ini, Q_ini, Y, npv)
%
% [V_modulo, V_fase, P, Q, N_iter, T_calculo, Error_p] = nraphson(V_modulo_ini, V_fase_ini, P_ini, Q_ini, Y, npv)
%
% Obtencion de indices de nodos: 1 -> SLACK;
% 2,...,M -> PV;
% M+1,...,N -> PQ
n = length(V_modulo_ini);
m = npv + 1;
% Parametros del Metodo
Tol = 0.0001; % Tolerancia del metodo (Perdida de potencia).
Error_p = 1; % Error inicial (A un valor mayor que Tol).
N_iter = 0; % Numero de iteraciones.
% Valores iniciales
V_modulo= V_modulo_ini';
V_fase = V_fase_ini';
P = P_ini';
Q = Q_ini';
j=sqrt(-1);
22 July 2011 88
The Newton-Raphson, Matlab Code
tic;
while (Error_p > Tol) % Bucle principal (Se permiten 50 iteraciones como mucho).
if (N_iter >50)
break
end
V = V_modulo.*exp(j*V_fase); % Expresion compleja de la tension
S = V.*conj(Y*V); % Expresion compleja de la potencia
DP = P(2:n)-real(S(2:n)); % Incremento de potencia activa (nudos PV y PQ)
DQ = Q(m+1:n)-imag(S(m+1:n)); % Incremento de potencia reactiva (nudos PQ)
PQ = [DP ; DQ];
Error_p = norm(PQ,2); % Error en esa iteracion
DS_DA = diag(V)*conj(Y*j*diag(V)) + diag(conj(Y*V))*j*diag(V);
DS_DV = diag(V)*conj(Y*diag(V./V_modulo)) + diag(conj(Y*V))*diag(V./V_modulo);
% Construccion del Jacobiano
J = [real(DS_DA(2:n , 2:n)) real(DS_DV(2:n , m+1:n))
imag(DS_DA(m+1:n , 2:n)) imag(DS_DV(m+1:n , m+1:n))]
dx=J\PQ; % indices: 1...n-1 = fases en PV y PQ; n...final = modulos en PQ
22 July 2011 89
The Newton-Raphson, Matlab Code
V_fase (2:n) = V_fase(2:n) + dx(1:n-1); % Actualizamos la fase de las tensiones (nudos PV y PQ)
V_modulo (m+1:n)= V_modulo(m+1:n) + dx(n:end); % Actualizamos el modulo de las tensiones (nudos PQ)
N_iter = N_iter + 1; % Incremento el numero de iteraciones
disp('Pulse una tecla para continuar')
pause
end
P=real(S); % Calculo de la potencia activa
Q=imag(S); % Calculo de la potencia reactiva
T_calculo=toc;
%
% V_modulo_ini = Modulo de la tension para comenzar a iterar (conocidos en SLACK y PV).
% V_fase_ini = Fase de la tension para comenzar a iterar (conocido en SLACK).
% P_ini = Potencia activa en los nodos (conocido en PV y PQ).
% Q_ini = Potencia reactica en los nodos (conocido en PQ).
% Y = Matriz de admitancias nodales.
22 July 2011 90
The Newton-Raphson, Matlab Code
% **** SALIDAS ****
%
% V_modulo = Modulo de la tension en todos los nodos.
% V_fase = Fase de la tension en todos los nodos.
% P = Potencia activa en todos los nodos.
% Q = Potencia reactiva en todos los nodos.
% N_iter = Numero de iteraciones.
% T_calculo = Tiempo de calculo.
% Error_p = Error.
%
%
% **** OBSERVACIONES ****
%
% Los nodos deben estar ordenador asi:
%
% * 1 : SLACK.
% * 2...m : PV.
% * m+1...n : PQ.
%
%
% **** FECHA Y AUTOR ****
%
% Laura Laguna - Octubre de 2005
22 July 2011 91
Ejemplo resuelto por el mtodo
de Newton-Raphson
22 July 2011 92
Newton-Raphson Example
Checking with Matlab and PowerWorld
22 July 2011 93
Newton-Raphson Example
Bus Voltage p.u Power
1 1.02 -
2 1.02
P
G
=50 MW
3 -
P
C
= 100 MW
Q
C
=60 MVAr
ONE TWO
THREE
22 July 2011 94
Newton-Raphson Example
Data:
Line Impedance p.u.
1-2 0.02+0.04j
1-3 0.02+0.06j
2-3 0.02+0.04j each
22 July 2011 95
Newton-Raphson Example
3 buses:
Bus1: Slack
Bus 2: PV
Bus 3: PQ
Voltage magnitude at bus 3 initialized at 1.02.
Angles intitialized to zero.
22 July 2011 96
Newton-Raphson Example
Y bus:
|
|
|
.
|

\
|
=
55.0000j - 25.0000 40.0000j + 20.0000 - 15.0000j + 5.0000 -
40.0000j + 20.0000 - 60.0000j - 30.0000 20.0000j + 10.0000 -
15.0000j + 5.0000 - 20.0000j + 10.0000 - 35.0000j - 15.0000
Y
Intitialization:
02 . 1 V
0
3
3 2
=
= o = o
22 July 2011 97
Newton-Raphson Example
Residuals:
3 i )) cos( B sen G ( V V Q Q
3 , 2 i )) ( sen B cos G ( V V P P
3
1 j
ij ij ij ij j i
esp
i i
3
1 j
ij ij ij ij j i
esp
i i
= o o = A
= o + o = A
=
=

- -
-
22 July 2011 98
Newton-Raphson Example
Checking:
No tolerance satisfied: the process continues.
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

6 . 0
1
5 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
10 2475 . 7
0
10 3624 . 0
Q
P
P
cal
3
cal
3
cal
2
3
3
2
15
14
cal
3
cal
3
cal
2
22 July 2011 99
Newton-Raphson Example
Jacobian:
|
|
|
.
|

\
|
=
33 33 32
33 33 32
23 23 22
L M M
N H H
N H H
J
|
|
|
.
|

\
|

=
1000 . 56 0100 . 26 8080 . 20
5000 . 25 2220 . 57 6160 . 41
4000 . 20 6160 . 41 4240 . 62
J
22 July 2011 100
Newton-Raphson Example
First iteration:
(
(
(

=
(
(
(
(

A
o A
o A
0.0154 -
0.9406 -
0.4557 -
V
V
3
3
3
2
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.9406 -
0.4557 -
0
;
0046 . 1
0200 . 1
0200 . 1
V
22 July 2011 101
Ejemplo por Newton-Raphson
Residuals:
No convergence.
(
(
(

=
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

0126 . 0
0165 . 0
0042 . 0
) 5874 . 0 ( 6 . 0
) 9835 . 0 ( 1
4958 . 0 5 . 0
Q
P
P
5874 . 0
9835 . 0
4958 . 0
Q
P
P
3
3
2
cal
3
cal
3
cal
2
22 July 2011 102
Newton-Raphson Example
Jacobian for iteration 2:
|
|
|
.
|

\
|

=
6707 . 54 2162 . 26 8409 . 20
1371 . 24 0994 . 56 8145 . 40
0540 . 20 1614 . 41 8860 . 61
J
22 July 2011 103
Newton-Raphson Example
State variables at iteration 2
(
(
(

=
(
(
(
(

A
o A
o A
4 -
3
3
3
2
3.002410 -
0.0206 -
0.0154 -
V
V
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.9612 -
0.4710 -
0
;
0043 . 1
0200 . 1
0200 . 1
V
22 July 2011 104
Newton-Raphson Example
Residuals:
Tolerance OK.
(
(
(

=
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

6
5
5
3
3
2
cal
3
cal
3
cal
2
10 9698 . 4
10 5454 . 0
10 0664 . 0
) 6000 . 0 ( 6 . 0
) 0000 . 1 ( 1
5000 . 0 5 . 0
Q
P
P
6000 . 0
0000 . 1
5000 . 0
Q
P
P
22 July 2011 105
Newton-Raphson Example
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.96810 -
0.4710 -
0
;
0043 . 1
0200 . 1
0200 . 1
V
(
(
(

=
(
(
(
(

A
o A
o A
7 -
5 -
5 -
3
3
3
2
1.110610 -
0.753410 -
0.645810 -
V
V
Jacobian iteration 3:
|
|
|
.
|

\
|

=
6707 . 54 2162 . 26 8409 . 20
1371 . 24 0994 . 56 8145 . 40
0540 . 20 1614 . 41 8860 . 61
J
22 July 2011 106
Newton-Raphson Example
Final power values:
(
(
(

=
(
(
(

(
(
(

=
(
(
(

6000 . 0
5513 . 0
0710 . 0
Q
Q
Q
0000 . 1
5000 . 0
5098 . 0
P
P
P
3
2
1
3
2
1
22 July 2011 107
Newton-Raphson Example
convergence
22 July 2011 108
Newton-Raphson Example
convergence
22 July 2011 109
Newton-Raphson Example
convergence
22 July 2011 110
Newton-Raphson Example
convergence
22 July 2011 111
Power World
CERO
UNO
DOS
50,977 MW
7,095 Mvar
50,000 MW
55,126 Mvar
100 MW
60 Mvar
1,020 pu
0,000 Deg
1,020 pu
-0,471 Deg
1,0043 pu
-0,961 Deg
22 July 2011 112
Newton-Raphson Example
Bus V(p.u) P Q
0 (PW) 1.02 0 50.9763 7.0955
0 1.02 0 50.9755 7.0954
1 (PW) 1.02 -0.4710 50 55.1256
1 1.02 -0.4710 50.0006 55.1228
2 (PW) 1.0043 -0.9612 -100 -60
2 1.0043 -0.9612 -99.9989 -59.9970
22 July 2011 113
Newton-Raphson Example
Largest error below 0.1 MVA.
More effective technique than Gauss Seidel.
Convergence is fast (if adequate initialization).
22 July 2011 114
Including tap-changing transformers
22 July 2011 115
Tap-Changing transformer
A tap changing transformer makes the
transformer parameter t.
The Jacobian matrix also depends on t.
22 July 2011 116
Equivalent circuit:
i j
t:1
cc
Y
t
Y
cc
2
cc
t
t 1
Y

t
1 t
Y
cc

j
i
1
~
t
22 July 2011 117
General building rules
1. Self admittance of node i, , equals the
algebraic sum of all the admittances
connected to node i
2. Mutual admittance between nodes i and
k, , equals the negative of the sum of
all admittances connecting nodes i and k
3.
ii
Y
ii
Y
ki ik
Y Y =
22 July 2011 118
Tap-changing
Example
22 July 2011 119
Tap-changing
Example
t
Y
cc
2
cc
t
t 1
Y

t
1 t
Y
cc

1 3
2
4
13
Z
23
Z
13
shunt
Y
23
shunt
Y
13
shunt
Y
23
shunt
Y
The tap-changing
transformer
controls voltage
of bus 4
22 July 2011 120
Tap-changing
Example
cc cc
cc
44
cc
34
cc
2
cc
23
shunt
23
13
shunt
13
33
12
13
shunt
13
11
Y
t
1 t
Y
t
Y
Y
t
Y
Y
t
Y
t
t 1
Y Y
Z
1
Y
Z
1
Y ...
... ; 0 Y ; Y
Z
1
Y
=

+ =
=
+

+ + + + =
= + =
It does not depend
on t!
22 July 2011 121
Tap-changing
Example
(
(
(
(

=
44 43 42 41
34 33 32 31
24 23 22 21
14 13 12 11
Y ) t ( Y Y Y
) t ( Y ) t ( Y Y Y
Y Y Y Y
Y Y Y Y
Y
22 July 2011 122
Tap-changing transformer
| |
| |

=
=
o o =
o + o =
n
1 k
ik ik ik ik k i i
n
1 k
ik ik ik ik k i i
cos B sin G V V Q
sin B cos G V V P
22 July 2011 123
Tap-changing transformer
Taylor Expansion:
) r (
) r (
iQ ) r (
n
) r (
n
iQ
) r (
1 m
) r (
1 m
iQ ) r (
n
) r (
n
iQ ) r (
2
) r (
2
iQ ) r (
iQ
dato
i
) r (
) r (
iP
) r (
n
) r (
n
iP
) r (
1 m
) r (
1 m
iP
) r (
n
) r (
n
iP
) r (
2
) r (
2
iP
) r (
iP
dato
i
t
t
f
V
V
f
...
... V
V
f f
...
f
f Q
t
t
f
V
V
f
...
... V
V
f f
...
f
f P
A
(

c
c
+ A
(

c
c
+
+ A
(

c
c
+ o A
(

o c
c
+ + o A
(

o c
c
+ ~
A
(

c
c
+ A
(

c
c
+
+ A
(

c
c
+ o A
(

o c
c
+ + o A
(

o c
c
+ ~
+
+
+
+
22 July 2011 124
Tap-changing transformer
The admitance matrix depend on t.
The Jacobian matrix has a new column.
The new variable (t) replace the voltage value
at the corresponding PQ bus.
22 July 2011 125
Tap-changing transformer
Increment t is divided by t to improve
computational efficiency.
The Jacobian matrix maintains its # of column
& rows.
The variable t is considered in the last place.
22 July 2011 126
Tap-changing transformer
The Jacobian matrix blocks are:
H, N, M & L are the standard blocks.
Submatrix C & D have as many columns as
the # of tap-changing transformers.
(

=
) r ( ) r ( ) r (
) r ( ) r ( ) r (
D L M
C N H
J
22 July 2011 127
Tap-changing transformer
Derivatives with respect to t:

n
1 k
ik
ik
ik
ik
k i
iQ
i
n
1 k
ik
ik
ik
ik
k i
iP
i
cos
t
B
sin
t
G
V V t
t
f
t D
sin
t
B
cos
t
G
V V t
t
f
t C
=
=
|
.
|

\
|
o
c
c
o
c
c
=
c
c
=
|
.
|

\
|
o
c
c
+ o
c
c
=
c
c
=
C & D multiplied by t!
22 July 2011 128
Tap-changing transformer
Iterative procedure analogous, but:
If t hit any of its limit, it is fixed to the limit &
the corresponding bus becomes PQ.
If the procedure converge, fix t at its closest
integer value & continues the iteration with
that t fixed.
22 July 2011 129
Tap-changing
Example
1.- Slack
2.- PV
3.- PQ
4.- PQ
5.- PQV
22 July 2011 130
Tap-changing
Example
Data:
Line impedances: 0.001+j0.05 p.u.
Shunt admitances: j0.05 p.u. (2 per line).
Transformer: 0.9<t<1.1, steps of 0.005; Z
cc
=j0.1.
22 July 2011 131
Tap-changing
Example
Bus Voltage (pu). Power
1 1.00 Slack
2 1.00 P
g
=150MW
3 -- P
c
=50MW, Q
c
=10MVAr
4 -- P
c
=0MW, Q
c
=0MVAr
5 1.00 P
c
=100MW,Q
c
=50MVAr
22 July 2011 132
Tap-changing
Example
1 3 2 4
5
shunt
Y
shunt
Y
shunt
Y
shunt
Y
shunt
Y
shunt
Y
lnea
Y
lnea
Y
lnea
Y
t
Y
cc
2
cc
t
t 1
Y

t
1 t
Y
cc

## 22 July 2011 133

Tap-changing
Example
(
(
(
(
(
(
(
(

+ + +
+
+
+
=
cc
cc
cc
2
cc
cc
s l l l
l s l
l s l l
l s l
BUS
Y
t
Y
0 0 0
t
Y
t
) t 1 (
Y
t
Y
Y 2 Y 2 Y Y 0
0 Y Y Y 0 0
0 Y 0 Y 2 Y 2 Y
0 0 0 Y Y Y
Y
22 July 2011 134
Tap-changing
Example
(
(
(
(
(
(

+ +
+
+ +
+
=
10 j 10 j 0 0 0
10 j 884 . 49 j 7997 . 0 992 . 19 j 3998 . 0 992 . 19 j 3998 . 0 0
0 992 . 19 j 3998 . 0 942 . 19 j 3998 . 0 0 0
0 992 . 19 j 3998 . 0 0 884 . 39 j 7997 . 0 992 . 19 j 3998 . 0
0 0 0 992 . 19 j 3998 . 0 942 . 19 j 3998 . 0
Y
bus
Variable initial values:
; 1 t
; 1 V V
; 0
4 3
5 4 3 2
=
= =
= o = o = o = o
22 July 2011 135
Tap-changing
Example
Increment calculations:
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

A
A
A
A
A
A
A
=
(
(
(
(
(
(
(
(
(

A
A
A
A
A
A
A
5 . 0
0
1 . 0
1
0
5 . 0
5 . 1
Q 5 . 0
Q
Q 1 . 0
P 1
P
P 5 . 0
P 5 . 1
Q
Q
Q
P
P
P
P
cal
5
cal
4
cal
3
cal
5
cal
4
cal
3
cal
2
5
4
3
5
4
3
2
22 July 2011 136
Tap-changing
Example
(
(
(
(
(
(
(
(
(

=
10 10 0 0 0 0 0
10 754 . 49 992 . 19 0 7997 . 0 3998 . 0 3998 . 0
0 992 . 19 892 . 19 0 3998 . 0 3998 . 0 0
0 0 0 10 10 0 0
0 7997 . 0 3998 . 0 10 984 . 49 992 . 19 992 . 19
0 3998 . 0 3998 . 0 0 992 . 19 992 . 19 0
0 3998 . 0 0 0 992 . 19 0 984 . 39
J
Jacobian
22 July 2011 137
Tap-changing
Example
First iteration:
918 . 0 t ;
1744 . 0
0744 . 0
0993 . 0
0
0
;
1
968 . 0
9623 . 0
1
1
V
082 . 0
032 . 0
0377 . 0
1744 . 0
0744 . 0
0993 . 0
0
t
t
V
V
V
V
4
4
3
3
5
4
3
2
=
(
(
(
(
(
(

= o
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(
(
(
(

A
A
A
o A
o A
o A
o A
22 July 2011 138
Tap-changing
Example
(
(
(
(
(
(

+ +
+
+ +
+
=
10 j 893 . 10 j 0 0 0
8933 . 10 j 750 . 51 j 7997 . 0 99 . 19 j 399 . 0 992 . 19 j 3998 . 0 0
0 992 . 19 j 3998 . 0 94 . 19 j 3998 . 0 0 0
0 992 . 19 j 3998 . 0 0 884 . 39 j 7997 . 0 992 . 19 j 3998 . 0
0 0 0 99 . 19 j 3998 . 0 942 . 19 j 3998 . 0
Y
bus
22 July 2011 139
Tap-changing
Example
Power computation:
(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

=
(
(
(
(
(
(

492 . 0
1027 . 0
1407 . 0
5647 . 0
05 . 0
Q
Q
Q
Q
Q
0527 . 1
069 . 0
4657 . 0
4521 . 1
0
P
P
P
P
P
5
4
3
2
1
5
4
3
2
1
22 July 2011 140
Tap-changing
Example
Power increments:
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

+

+
+

+

=
(
(
(
(
(
(
(
(
(

A
A
A
A
A
A
A
008 . 0
1027 . 0
0407 . 0
0527 . 0
069 . 0
0343 . 0
0479 . 0
492 . 0 5 . 0
1027 . 0
1407 . 0 1 . 0
0527 . 1 1
069 . 0
4657 . 0 5 . 0
4521 . 1 5 . 1
Q
Q
Q
P
P
P
P
5
4
3
5
4
3
2
22 July 2011 141
Tap-changing
Example
Jacobian matrix:
(
(
(
(
(
(
(
(
(

=
492 . 10 492 . 10 0 0527 . 1 0527 . 1 0 0
746 . 11 5934 . 48 6261 . 18 0527 . 1 6803 . 0 0912 . 0 8242 . 1
0 6075 . 18 3261 . 18 0 8359 . 0 8359 . 0 0
0527 . 1 0527 . 1 0 492 . 10 492 . 10 0 0
0527 . 1 8183 . 0 0912 . 0 492 . 10 3879 . 48 6261 . 18 2698 . 19
0 8359 . 0 0954 . 0 0 6075 . 18 6075 . 18 0
0 0523 . 1 0 0 3273 . 19 0 9193 . 39
J
22 July 2011 142
Tap-changing
Example
Second iteration
9144 . 0 t ;
1723 . 0
0744 . 0
1043 . 0
0002 . 0
0
;
1
9644 . 0
9607 . 0
1
1
V
0039 . 0
0037 . 0
0016 . 0
0021 . 0
003 . 0
005 . 0
0002 . 0
t
t
V
V
V
V
4
4
3
3
5
4
3
2
=
(
(
(
(
(
(

= o
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(
(
(
(

A
A
A
o A
o A
o A
o A
22 July 2011 143
Tap-changing
Example
(
(
(
(
(
(

+ +
+
+ +
+
=
10 j 9365 . 10 j 0 0 0
9365 . 10 j 8447 . 51 j 7997 . 0 992 . 19 j 3998 . 0 992 . 19 j 3998 . 0 0
0 992 . 19 j 3998 . 0 942 . 19 j 3998 . 0 0 0
0 992 . 19 j 3998 . 0 0 884 . 39 j 7997 . 0 992 . 19 j 3998 . 0
0 0 0 992 . 19 j 3998 . 0 942 . 19 j 3998 . 0
Y
bus
22 July 2011 144
Tap-changing
Example
Power calculations:
(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

=
(
(
(
(
(
(

4999 . 0
0006 . 0
1000 . 0
6391 . 0
0501 . 0
Q
Q
Q
Q
Q
0000 . 1
000 . 0
4998 . 0
4998 . 1
0031 . 0
P
P
P
P
P
5
4
3
2
1
5
4
3
2
1
22 July 2011 145
Tap-changing
Example
Power increments:
3
5
4
3
5
4
3
2
10
1218 . 0
6375 . 0
0339 . 0
0258 . 0
0057 . 0
1969 . 0
2065 . 0
4999 . 0 5 . 0
0006 . 0
1000 . 0 1 . 0
0000 . 1 1
000 . 0
4998 . 0 5 . 0
4998 . 1 5 . 1
Q
Q
Q
P
P
P
P

(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

+

+
+
+

=
(
(
(
(
(
(
(
(
(

A
A
A
A
A
A
A
22 July 2011 146
Tap-changing
Example
Tap to the closest feasible value:
915 . 0 t 9144 . 0 t = =
(
(
(
(
(
(

+ +
+
+ +
+
=
10 929 . 10 0 0 0
929 . 10 8282 . 51 7997 . 0 992 . 19 3998 . 0 992 . 19 3998 . 0 0
0 992 . 19 3998 . 0 942 . 19 3998 . 0 0 0
0 992 . 19 3998 . 0 0 884 . 39 7997 . 0 992 . 19 3998 . 0
0 0 0 992 . 19 3998 . 0 942 . 19 3998 . 0
j j
j j j j
j j
j j j
j j
Y
bus
22 July 2011 147
Tap-changing
Example
Power calculation:
(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

=
(
(
(
(
(
(

4926 . 0
0075 . 0
1000 . 0
6391 . 0
0501 . 0
Q
Q
Q
Q
Q
9993 . 0
0007 . 0
4998 . 0
4998 . 1
0031 . 0
P
P
P
P
P
5
4
3
2
1
5
4
3
2
1
22 July 2011 148
Tap-changing
Example
Power increment calculations:
(
(
(
(
(
(
(
(
(
(
(
(

A
A
A
o A
o A
o A
o A
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

+
+
+

+

=
(
(
(
(
(
(
(
(
(

A
A
A
A
A
A
A
5
5
4
4
3
3
5
4
3
2
5
4
3
5
4
3
2
V
V
V
V
V
V
;
0074 . 0
0075 . 0
0000 . 0
0007 . 0
0007 . 0
0002 . 0
0002 . 0
4926 . 0 5 . 0
0075 . 0
1000 . 0 1 . 0
9993 . 0 1
0007 . 0
4998 . 0 5 . 0
4998 . 1 5 . 1
Q
Q
Q
P
P
P
P
22 July 2011 149
Tap-changing
Example
Jacobian:
(
(
(
(
(
(
(
(
(

=
5074 . 9 4926 . 10 0 9993 . 0 9993 . 0 0 0
4926 . 10 1983 . 48 5271 . 18 9993 . 0 7445 . 0 1282 . 0 872 . 1
0 5072 . 18 3071 . 18 0 8689 . 0 8689 . 0 0
9993 . 0 9993 . 0 0 4926 . 10 4926 . 10 0 0
9993 . 0 7431 . 0 1282 . 0 4926 . 10 2132 . 48 5271 . 18 1935 . 19
0 8689 . 0 1307 . 0 0 5072 . 18 5072 . 18 0
0 103 . 1 0 0 253 . 19 0 2449 . 39
J
22 July 2011 150
Tap-changing
Example
Final values
(
(
(
(
(
(

= o
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(

=
(
(
(
(
(
(
(
(
(
(
(
(

A
A
A
o A
o A
o A
o A

1725 . 0
0744 . 0
1043 . 0
0002 . 0
0
;
9991 . 0
9644 . 0
9607 . 0
1
1
V 10
8522 . 0
0558 . 0
0552 . 0
1699 . 0
0152 . 0
0289 . 0
0007 . 0
V
V
V
V
V
V 3
5
5
4
4
3
3
5
4
3
2
22 July 2011 151
Tap-changing
Example
Final power values:
(
(
(
(
(
(

=
(
(
(
(
(
(

(
(
(
(
(
(

=
(
(
(
(
(
(

5000 . 0
000 . 0
1000 . 0
6402 . 0
0501 . 0
Q
Q
Q
Q
Q
0000 . 1
0000 . 0
5000 . 0
5000 . 1
0031 . 0
P
P
P
P
P
5
4
3
2
1
5
4
3
2
1
22 July 2011 152
Power World
22 July 2011 153
5. Fast decoupled AC load flow
22 July 2011 154
Two simplifications:
Do not build Jacobian at each iteration (small error
introduced, then, the procedure needs more
iterations to reach the solution)
Decoupling between P- and Q-V (not
recommended in system highly loaded and/or with
low voltage levels)
22 July 2011 155
Assume:
kk k
k i
k i
ik ik
i
) r (
) 1 r (
) 1 r (
) r ( ) r (
) r ( ) r (
) r (
) r (
B Q ) iv
0 . 0 ) sin(
0 . 1 ) cos( ) iii
k , i B G ) ii
i 0 . 1 V ) i
V
V
L J
N H
Q
P
<<
~ o o
~ o o
<<
~
(
(

A
o A
(

=
(

A
A
+
+
22 July 2011 156
We have:
| | | | | | | | | | | | | | | |
| | | |
BUS
ii ii
ik ik
2 1
2 1
Y of Elements
B B
~
B B
~
B
~
, B
~
0 J , 0 N , B
~
L , B
~
H

=
=
=
= = = =
22 July 2011 157
| || |
| || |
| | | | | |
| | | | | |
) r (
1
2
) 1 r (
) r (
1
1
) 1 r (
) 1 r (
2
) r (
) 1 r (
1
) r (
) 1 r (
) 1 r (
2
1
) r (
) r (
Q B
~
V
P B
~
) 2 ( V B
~
Q
) 1 ( B
~
P
V B
~
0
0 B
~
Q
P
A = A
A = o A
A = A
o A = A
(

A
o A
(

=
(

A
A

+
+
+
+
+
Use Newton-Raphson Iteration
22 July 2011 158
Fast decoupled load flow. Flow diagram

DATA INPUT
Solve (1) and update angles
Solve (2) and update V
OUTPUT RESULTS
YES
YES
YES YES
NO
NO
NO
Reactive
power
coverged
?
Reactive
power
coverged
?
Real
power
coverged
?
Real
power
coverged
?
Calculate Delta P
NO
NO
Calculate Delta Q
22 July 2011 159
Fast decoupled load flow. Matlab Code
function [V_modulo, V_fase, P, Q, N_iter, T_calculo, Error_p] = desacoplado(V_modulo_ini, V_fase_ini, P_ini, Q_ini, Y,
npv)
%
% [V_modulo, V_fase, P, Q, N_iter, T_calculo, Error_p] = desacoplado(V_modulo_ini, V_fase_ini, P_ini, Q_ini, Y, npv)
%
% Obtencion de indices de nodos: 1 -> SLACK;
% 2,...,M -> PV;
% M+1,...,N -> PQ
n = length(V_modulo_ini);
m = npv + 1;
% Parametros del Metodo
Tol = 0.0001; % Tolerancia del metodo (Perdida de potencia).
Error_p = 1; % Error inicial (A un valor mayor que Tol).
N_iter = 0; % Numero de iteraciones.
% Valores iniciales
V_modulo= V_modulo_ini';
V_fase = V_fase_ini';
V = V_modulo.*exp(j*V_fase); % Expresion compleja de la tension
P = P_ini';
Q = Q_ini';
DS_DA = diag(V)*conj(Y*j*diag(V)) + diag(conj(Y*V))*j*diag(V);
DS_DV = diag(V)*conj(Y*diag(V./V_modulo)) + diag(conj(Y*V))*diag(V./V_modulo);
22 July 2011 160
Fast decoupled load flow. Matlab Code
%J = [real(DS_DA(2:n , 2:n)) real(DS_DV(2:n , m+1:n)) % Construccion del Jacobiano
% imag(DS_DA(m+1:n , 2:n)) imag(DS_DV(m+1:n , m+1:n))];
H = imag(-Y(2:end , 2:end))
L = imag(-Y(m+1:end,m+1:end))
j=sqrt(-1);
tic;
while (Error_p > Tol) % Bucle principal (Se permiten 50 iteraciones como mucho).
if (N_iter >50)
break
end
V = V_modulo.*exp(j*V_fase); % Expresion compleja de la tension
S = V.*conj(Y*V); % Expresion compleja de la potencia
DP = P(2:n)-real(S(2:n)); % Incremento de potencia activa (nudos PV y PQ)
DQ = Q(m+1:n)-imag(S(m+1:n)); % Incremento de potencia reactiva (nudos PQ)
Dfase = H\DP;
Dmodulo = L\DQ;
PQ = [DP ; DQ];
Error_p = norm(PQ,2); % Error en esa iteracion
22 July 2011 161
Fast decoupled load flow. Matlab Code
V_fase (2:n) = V_fase(2:n) + Dfase; % Actualizamos la fase de las tensiones (nudos PV y PQ)
V_modulo (m+1:n)= V_modulo(m+1:n) + Dmodulo; % Actualizamos el modulo de las tensiones (nudos PQ)
N_iter = N_iter + 1; % Incremento el numero de iteraciones
% disp('Pulse una tecla para continuar')
% pause
end
P=real(S); % Calculo de la potencia activa
Q=imag(S); % Calculo de la potencia reactiva
T_calculo=toc;
%
% V_modulo_ini = Modulo de la tension para comenzar a iterar (conocidos en SLACK y PV).
% V_fase_ini = Fase de la tension para comenzar a iterar (conocido en SLACK).
% P_ini = Potencia activa en los nodos (conocido en PV y PQ).
% Q_ini = Potencia reactica en los nodos (conocido en PQ).
% Y = Matriz de admitancias nodales.
22 July 2011 162
Fast decoupled load flow. Matlab Code
% **** SALIDAS ****
%
% V_modulo = Modulo de la tension en todos los nodos.
% V_fase = Fase de la tension en todos los nodos.
% P = Potencia activa en todos los nodos.
% Q = Potencia reactiva en todos los nodos.
% N_iter = Numero de iteraciones.
% T_calculo = Tiempo de calculo.
% Error_p = Error.
%
%
% **** OBSERVACIONES ****
%
% Los nodos deben estar ordenador asi:
%
% * 1 : SLACK.
% * 2...m : PV.
% * m+1...n : PQ.
%
%
% **** FECHA Y AUTOR ****
%
% Laura Laguna - Nobiembre de 2005
22 July 2011 163
Tolerance 0.1 MVA.
ONE TWO
THREE
22 July 2011 164
Power base S
B
= 100MVA
Bus Voltage p.u. Power
1 1.02 -
2 1.02 P
G
=50 MW
3 - P
C
=100 MW
Q
C
=60 MVAr
Line Impedance p.u.
1-2 0.02+0.04j
1-3 0.02+0.06j
2-3 0.02+0.04j
22 July 2011 165
(
(
(

+ +
+ +
+ +
=
j 55 25 j 40 20 j 15 5
j 40 20 j 60 30 j 20 10
j 15 5 j 20 10 j 35 15
bus
Y

22 July 2011 166
Data and unknown:
Bus Type Data Unknown
1
Slack and
reference
V
1
= 1.02

1
=0.0
P
1
, Q
1
2 PV
P
2
=0.5
V
2
= 1.02

2
, Q
2
3 PQ
P
3
= -1.0
Q
3
= -0.6

3
, V
3
Inicialization:

2
=
3
= 0.0 ; V
3
= 1.02 p.u.
22 July 2011 167
Flow diagram
V
i
(0)
,
i
(0)
, P
i
esp
, Q
i
esp
Compute: P
i
cal
, Q
i
cal
Compute: Delta Q
Convergence P?
Compute: Delta P
Solve subproblem 1 and update angles
Final results
Convergence Q?
Solve subproblem 2 and update voltages
Convergence P? Convergence Q?
NO
NO
Yes
Yes
Yes
Yes
NO
NO
22 July 2011 168
Compute
Calculate P and Q:
No convergence
( ) 55 L ;
55 40
40 60
H = |
.
|

\
|

=
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

6 . 0
1
5 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
10 2475 . 7
0
10 3624 . 0
Q
P
P
cal
3
cal
3
cal
2
3
3
2
15
14
cal
3
cal
3
cal
2
22 July 2011 169
First iteration:
(
(
(

=
(
(
(
(

A
o A
o A
0.0109 -
1.3481 -
0.4213 -
V
V
3
3
3
2
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
1.3481 -
0.4213 -
0
;
0091 . 1
0200 . 1
0200 . 1
V
22 July 2011 170
Residuals:
Error = 0.5976 no convergence
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

4583 . 0
3003 . 0
2385 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
1417 . 0
3003 . 1
7385 . 0
Q
P
P
cal
3
cal
3
cal
2
3
3
2
cal
3
cal
3
cal
2
22 July 2011 171
System state (second iteration)
(
(
(

=
(
(
(
(

A
o A
o A
0.0083 -
0.2857
0.0372 -
V
V
3
3
3
2
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
1.0264 -
0.4585 -
0
;
0008 . 1
0200 . 1
0200 . 1
V
22 July 2011 172
Residuals:
Error = 0.2885 no convergence
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

1444 . 0
1936 . 0
1578 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
7444 . 0
1936 . 1
6578 . 0
Q
P
P
cal
3
cal
3
cal
2
3
3
2
cal
3
cal
3
cal
2
22 July 2011 173
System state (third iteration):
The process continues.
(
(
(

=
(
(
(
(

A
o A
o A
0.0026
0.1788
0.0315 -
V
V
3
3
3
2
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.8836 -
0.4900 -
0
;
0034 . 1
0200 . 1
0200 . 1
V
22 July 2011 174
After 9 iterations:
Error = 0.0012 convergence attained
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

3
3
3
cal
3
cal
3
cal
2
3
3
2
cal
3
cal
3
cal
2
10 3346 . 8
10 7006 . 0
10 5954 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
5992 . 0
0007 . 1
5006 . 0
Q
P
P
22 July 2011 175
System state at iteration 10:
(
(
(

=
(
(
(
(

A
o A
o A
5 -
3 -
3 -
3
3
3
2
1.515410 -
0.614110
0.159210 -
V
V
|
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.9614 -
0.4710 -
0
;
0043 . 1
0200 . 1
0200 . 1
V
22 July 2011 176
Residuals:
Error = 5.628510
-4
convergence attained
(
(
(

~
(
(
(

=
(
(
(

A
A
A

(
(
(

=
(
(
(

4
3
3
cal
3
cal
3
cal
2
3
3
2
cal
3
cal
3
cal
2
10 3349 . 3
10 3516 . 0
10 2863 . 0
Q 6 . 0
P 1
P 5 . 0
Q
P
P
6003 . 0
0004 . 1
5003 . 0
Q
P
P
22 July 2011 177
State at iteration 11:
(
(
(

=
(
(
(
(

A
o A
o A
6 -
3 -
3 -
3
3
3
2
6.063410
0.325110
0.056710 -
V
V |
|
|
.
|

\
|
= o
|
|
|
.
|

\
|
=
0.9611 -
0.4711 -
0
;
0043 . 1
0200 . 1
0200 . 1
V
|
|
|
.
|

\
|

=
|
|
|
.
|

\
|

=
6003 . 0
5515 . 0
0711 . 0
Q
0004 . 1
5003 . 0
5098 . 0
P
22 July 2011 178
convergence
22 July 2011 179
convergence
22 July 2011 180
convergence
22 July 2011 181
convergence
22 July 2011 182
6. Variable limits
22 July 2011 183
Variable limits
Physical considerations
1. Voltage magnitudes out of limits
a PQ BUS does not meet
Action: Warning! voltage problem
2. Flow magnitudes out of limits
A line does not meet
max
ij
S
ij
S
max
ij
S -
max
i i
min
i
v v v s s
22 July 2011 184
Variable limits
Physical Considerations
3. Reactive Power out of limits
A PV BUS does not meet
Action: Wrong Formulation!
Specified voltage cannot be attained
Formulate the problem properly
max
i i
min
i
Q Q Q s s
22 July 2011 185
Q hits
limit?
yes
Q
G
>Qmax?
Yes
Change to
P-Q
Q=Qmax
Q
G
<Qmin?
Yes
No
Change to
P-Q
Q=Qmin
Stay as
P-V
No
no
Q=Qmax ?
yes
V >V
dato
?
Change to P-V
V=V
dato
Stay as
P-Q
no
Yes
V <V
dato
?
Change to P-V
V=V
dato
No
Stay as
P-Q
Variable limits
Computational Considerations
Changing PV to PQ
Yes
No
22 July 2011 186
22 July 2011 187
Approximate solution.
Two simplifications:
In network model: do not consider series
Assume V
i
=1 at all buses
22 July 2011 188
Approximate analytical solution
Assume
0 . 1 cos ) iii
sin ) ii
i 0 . 1 V ) i
ij
cos
ij
X
j
V
i
V
ij
X
2
i
V
ij
Q
ij
sin
ij
X
j
V
i
V
ij
P
ij
ij ij
i

-
o
o o
o =
o =
22 July 2011 189
Approximate analytical solution
where
| | | | | |
ij
'
ij
n
i j
1 j
ij
'
ii
n
i j
1 j
j ij i
n
i j
1 j
n
i j
1 j
ij ij i
j ij i ij ij ij
ij
ij
ij
B B
B B
B P
B B P P
B B B
X
P
=
=
o =
o o
(
(
(

= =
o o = o =
o
~

=
=
=
=
=
=
=
=
22 July 2011 190
Continuation
| | | || | V B Q
V B V B Q Q
V B V B ) V V ( B
X
V V
Q
'
j
n
i j
1 j
ij
i
n
i j
1 j
ij
n
i j
1 j
ij i
j
ij
i
ij
j i
ij
ij
j i
ij
=

(
(
(

= =
= =

~

=
=
=
=
=
=
22 July 2011 191
Continuation
Solution
| | | || |
| | | || |
| | | | | | | |
| |
ij
ij
ij
'
ij
n
i j
1 j
ij
'
ii
'
n
1 m
n
2
n
1
n
1
'
'
X
1
B ;
B B
B B
B
Q
Q
Q ;
P
P
P ;
V
V
V ;
Buses PQ V B Q
Buses PV & PQ B P
=

=
=
=
(
(
(

=
(
(
(

=
(
(
(

=
(
(
(

o
o
= o
=
o =

=
=
+

22 July 2011 192
DC Power flow: example
22 July 2011 193
DC Power flow: example
ONE TWO
THREE
22 July 2011 194
Data
Bus Voltage p.u. Power
0 1.02 -
1 1.02 PG=50MW
2 - PC=100MW, QC=60MVAr
Line Impedance p.u.
0-1 0.02+0.04j
0-2 0.02+0.06j
1-2 0.02+0.04j (both)
DC Power flow: example
22 July 2011 195
DC Power flow: example
(
(
(

(
(
(

=
(
(
(

(
(
(

o
o
(
(
(

=
(
(
(

(
(
(

=
2
1
0
2
1
0
V
02 . 1
02 . 1
67 . 66 50 67 . 16
50 75 25
67 . 16 25 67 . 41
6 . 0
Q
Q
0
67 . 66 50 67 . 16
50 75 25
67 . 16 25 67 . 41
0 . 1
5 . 0
P
67 . 66 50 67 . 16
50 75 25
67 . 16 25 67 . 41
B
22 July 2011 196
DC Power flow: example
|
|
|
.
|

\
|
o
o
|
|
|
.
|

\
|

=
|
|
|
.
|

\
|

2
1
0
0

67 . 66 50 67 . 16
50 75 25
67 . 16 25 67 . 41
0 . 1
5 . 0
P
22 July 2011 197
Po= -25
1
- 16.67
2
0.5= +75
1
- 50
2
-1.0= -50
1
+ 66.67
2
Q
0
= 41.67*1.02 - 25*1.02 - 16.67V
2
Q
1
= -25*1.02 + 75*1.02 - 50V
2
-0.6= -16.67*1.02 - 50*1.02 + 66.67V
2
DC Power flow: example
22 July 2011 198
Solution:
P
0
0.5p.u.=50MW
Q
0
0.15p.u.=15MVAr
Q
1
0.45p.u.=45MVAr

1
-1.1459

2
-0.3819
V
2
1.011p.u.
DC Power flow: example
22 July 2011 199
PowerWorld comparison:
Var DC PowerWorld DC PowerWorld G-S
P
0
0.50p.u. 0.50p.u. 0.509p.u.
Q
0
0.15p.u. 0.00p.u. 0.07p.u.
Q
1
0.45p.u. 0.00p.u. 0.55p.u.

1
-0.3819 -0.3820 -0.47

2
-1.1459 -1.1459 -0.96
V
2
1.0056p.u. 1.0000p.u. 1.0043p.u.
DC Power flow: example
22 July 2011 200
DC Power flow: example
UNO
DOS
CERO
0,00 MW
0,00 Mvar
50,00 MW
0,00 Mvar
TRES
100,00 MW
60,00 Mvar
22 July 2011 201
Data.
Bus Voltage p.u. Power
0 1.02 -
1 1.02 PG=50MW
2 - PC=0MW, QC=0MVAr
3 - PC=100MW, QC=60MVAr
Line Impedance p.u.
0-1 0.02+0.04j
0-2 0.02+0.06j
1-2 0.02+0.04 (both)
2-3 0.1j
DC Power flow: example
22 July 2011 202
DC Power flow: example
(
(
(
(

(
(
(
(

=
(
(
(
(

(
(
(
(

o
o
o
(
(
(
(

=
(
(
(
(

(
(
(
(

=
3
2
1
0
3
2
1
0
V
V
02 . 1
02 . 1
10 10 0 0
10 67 . 76 50 67 . 16
0 50 75 25
0 67 . 16 25 67 . 41
6 . 0
0 . 0
Q
Q
0
10 10 0 0
10 67 . 76 50 67 . 16
0 50 75 25
0 67 . 16 25 67 . 41
0 . 1
0 . 0
5 . 0
P
10 10 0 0
10 67 . 76 50 67 . 16
0 50 75 25
0 67 . 16 25 67 . 41
B
22 July 2011 203
P
0
= -25
1
-16.672-0*
3
0.5 = 75
1
- 502-0*
3
0.0 = -50
1
+ 76.67
2
-10
3
-1.0 = -0*
1
- 10
2
+10
3
Q
0
= 41.67*1.02 - 25*1.02 - 16.67V
2
+ 0*V
3
Q
1
= -25*1.02 + 75*1.02 - 50V2 + 0*V
3
0.0 = -16.67*1.02 - 50*1.02 + 76.67V
2
-10*V
3
-0.6 = 0*1.02-0*1.02 - 10*V
2
+ 10*V
3
DC Power flow: example
22 July 2011 204
PowerWorld comparison:
Var DC PowerWorld G-S PowerWorld DC
P
0
0.50p.u. 0.51p.u. 0.50p.u.
Q
0
0.00p.u. 0.11p.u. 0.00p.u.
Q
1
0.00p.u. 0.67p.u. 0.00p.u.

1
-0.3819 -0.48 -0.382

2
-1.1459 -0.91 -1.1459

3
-6.8755 -7.05 -6.8755
V
2
1.011p.u. 1.002p.u. 1.000p.u.
V
3
0.951p.u. 0.932p.u. 1.000p.u.
DC Power flow: example
22 July 2011 205
solution methods
22 July 2011 206
1. Gauss-Seidel (G-S)
Simple technique
Iteration time increases linearly with the
number of buses. Lower iteration time than N-
R. Seven times faster in large systems
Linear rate of convergence. Many iterations
required for getting close to the solution
Number of iteration increases with the
number of buses
22 July 2011 207
(Continuation)
2. Newton-Raphson (N-R)
Widely used
Iteration-time increases linearly with the number of
buses
Quadratic rate of convergency. A few iterations for
getting close to the solution
Number of iterations independent of the number of
buses of the system
The Jacobian is a very sparse matrix
Method non-sensitive to slack bus choice and the
presence of series capacitors
Sensitive to initial solution
22 July 2011 208
(Continuation)
3. AC decoupled
has to be computed and factorized only once
It requires more iterations than Newton-
Raphson method
Iteration time is 5 times lower than Newton-
Raphsons iteration time
Useful for analyzing topology changes because
can be easily modified
Used in planning and contigency analyses
| | B
~
| | B
~
22 July 2011 209