Documentos de Académico
Documentos de Profesional
Documentos de Cultura
A. J. Conejo
&
several
distinguished students
07/09/2009 1
The load flow problem
0. References
1. Introduction
2. Problem formulation
Two-bus case
Matrix YBUS
General equations
Bus classification
Variable types and
limits
07/09/2009 2
The load flow problem
07/09/2009 3
The load flow problem
07/09/2009 4
The load flow problem
07/09/2009 5
The load flow problem
References
07/09/2009 6
1. Introduction
07/09/2009 7
Introduction
• A snapshot of the system
07/09/2009 9
Introduction
• Applications:
1. On-line analyses
• State estimation
• Security
• Economic analyses
07/09/2009 10
Introduction
2. Off-line analyses
• Operation analyses
• Plannig analyses
Network expansion planning
Power exchange planning
Security and adecuacy analyses
- Faults
- Stability
07/09/2009 11
2. Problem formulation
07/09/2009 12
Problem formulation
Two-bus case
V1 YG V2
YG
07/09/2009 13
Transmission line π model
Problem formulation
Two-bus case
Matrix notation:
I1 Y G Y S Y S V1 Y11 Y12 V1
I V V
2 YS Y G Y S 2 Y 21 Y 22 2
IBUS YBUS VBUS
07/09/2009 14
Problem formulation
Two-bus case
S1 V1 I1* V1 ( Y11
*
V1* Y12
*
V2* )
S2 V2 I2* V2 ( Y21
*
V1* Y22
*
V2* )
07/09/2009 15
Problem formulation
Two-bus case continuation
Notation:
Yik Yik e j ik
Vi Vi e j i
Replacing:
2
P1 jQ1 V1 Y1k Vk e j( 1 k 1k )
k 1
2
P2 jQ2 V2 Y2k Vk e j( 2 k 2k )
k 1
07/09/2009 16
Problem formulation
Two-bus case continuation
i 1, 2
07/09/2009 17
Problem formulation
Matrix Ybus
Y11 Y12 YG YS YS
YBUS
Y21 Y22 YS YG YS
07/09/2009 18
General building rules
Matrix Ybus
1. Self admittance of node i, Yii ,equals the
algebraic sum of all the admittances
connected to node i
3. Yik Yki
07/09/2009 19
Problem formulation
Matrix Ybus
• Caracteristics of YBUS
1. YBUS is symmetric
is very sparse
2. YBUS
07/09/2009 20
Ybus example
07/09/2009 21
Problem formulation
General equations
i 1,..., n
n bus system
07/09/2009 22
Problem formulation
General equations
Polar representation for voltages and rectangular
for admittances
n
Pi Vi Vk (Gik cos ik Bik senik ) [1]
k 1
n
Qi Vi Vk (Gik senik Bik cos ik ) [2]
k 1
where
Y ik Gik j Bik
ik i k
07/09/2009 23
Problem formulation
General equations
• 4n variables
07/09/2009 24
Problem formulation
BUS Classification
1. PQ buses
Vi unknown
i unknown
07/09/2009 25
Problem formulation
BUS Classification
2. PV buses
Pi known
Qi unknown
07/09/2009 26
Problem formulation
BUS Classification
07/09/2009 27
Problem formulation
Variable types and limits
• Power balance
n n
PGi PDi PLOSS
i1 i1
n n
QGi QDi QLOSS
i1 i1
07/09/2009 28
Problem formulation
Variable types and limits
• Variable types
Control variables
PGi (excepting slack bus)
QGi or V i
Non-control variables
PDi QDi
State variables
Vi i
07/09/2009 29
Problem formulation
Variable types and limits
• Variable limits
Power limits
07/09/2009 30
3.The Gauss-Seidel solution
technique
31
Gauss-Seidel solution technique
No lineal system:
f (x) 0 x F( x )
Iteration
x (r 1) F( x (r ) )
Stoping rule
x (r 1) x (r )
07/09/2009 32
Gauss-Seidel solution technique
Example f ( x) x 2 5x 4 0
x 0 . 2 x 2 0 .8
x (r 1) 0.2( x (r ) )2 0.8 ; x ( 0 ) 2
r 0, x (1) 0.2 22 0.8 1.6
r 1, x ( 2 ) 0.2 1.6 2 0.8 1.312
r 2, x ( 3 ) 0.2 1.312 2 0.8 1.1442
...
r 5, x ( 6 ) 1.0103
r 6, x ( 7 ) 1.0042
...
r 10, x (11) 1.0001
r 11, x (12 )
1.0000
Many iterations!
r 12, x (13 ) 1.0000
07/09/2009 33
Gauss-Seidel solution technique
Algorithm beginning
1) Known
Pi i 2,...,n (PV & PQ Buses)
Qi i m 1,...,n (PQ Buses)
Vi i 2,...,m (PV Buses)
V1 slack bus
V i min , V i max i m 1,...,n (PQ Buses)
QGi,min , QGi,max i 2,...,m (PV Buses)
07/09/2009 34
Gauss-Seidel solution technique
Algorithm beginning
2) Build YBUS
3) Initialize voltages
0
Vi Vi i m 1,...,n
0
i i i 2,...,n
07/09/2009 35
Gauss-Seidel solution technique
PQ buses
4) PQ buses
* * * * n
Si Pi jQi V i Ii Vi Y ii V i
V i Y ik Vk
k 1
k i
1 Pi jQi n
Vi
Y ii V i*
Y ik V k
k 1
k i
P jQi
Ai i i m 1,...,n
Y ii
Y ik
Bik i m 1,...,n ; k 1,...,n ; k i
Y ii
07/09/2009 36
Gauss-Seidel solution technique
PQ buses
Ai i1 n
(r 1) (r 1)
Bik V k Bik V k
(r )
Vi (r ) *
(Vi ) k 1 k i1
07/09/2009 37
Gauss-Seidel solution technique
PV buses
5) PV buses
* * * n
Si Pi jQi V i Ii
V i Y ik V k
k 1
* n
Qi V i Y ik V k
k 1
07/09/2009 38
Gauss-Seidel solution technique
PV buses
At iteration (r+1):
(r ) * i1 (r 1) (r ) * n (r )
Q(ir 1) ( V i ) Y ik V k ( V i ) Y ik V k
k 1 k i
Pi jQ(ir 1)
i angleV i
(r 1)
Ai
Y ii
Beware of limits!
Q(ir 1) Qi,min Q(ir 1) Qi,min & i becomes PQ
Q(ir 1) Qi,max Q(ir 1) Qi,max & i becomes PQ
07/09/2009 40
Gauss-Seidel solution technique
PV buses
6) Stop criterion
07/09/2009 41
Gauss-Seidel solution technique
Algorith final calculations
Vi Vk
i ILik YLik ILki k
Y ik 0 Y ki0
07/09/2009 42
Gauss-Seidel solution technique
Algorith final calculations
6.2) Compute line complex power (after convergence)
* * * * *
Ski V k ( V k V i )YLik V k V k Y ki 0 ;
* * * * *
Sik V i ( V i V k )YLik V i V i Y ik 0 ;
Vi Vk
i ILik YLik ILki k
Y ik 0 Y ki0
07/09/2009 43
Gauss-Seidel solution technique
Algorith final calculations
7) If no convergence, go to step 4.
07/09/2009 44
Gauss-Seidel solution technique
Algorithm improvement
07/09/2009 45
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 m´etodo de Gauss-Seidel
%-donde:
%-2...m nudos PV; (m=1 cuando no hay nudos PV)
%-n nudos totales
%-Ybus matriz de admitancias
%-Vmodini tensiones iniciales modulo
%-Angini angulos iniciales RADIANES
%-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 n´umero de iteraciones
%-Vfinal vector con todas las potencias para cada iteraci´on
%-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
07/09/2009 46
Gauss-Seidel
Matlab code 2
%calculos los valores en coordenadas cuadrangulares de la tension
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
07/09/2009 47
%calculo las A para todos los nudos:
for a=1:n
A(a)=(P(a)-i*Q(a))/Ybus(a,a);
end Gauss-Seidel
%calculo los angulos nudos PV:
for l=2:m
Matlab code 3
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);
angfinal(:,nite)=ang*180/pi; %paso a grados
07/09/2009 end 48
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 iteraci´on:
%------------------------------------------------------------%
% %
% Realizado por Carlos Ruiz Mora octubre 2006 %
% %
%------------------------------------------------------------%
07/09/2009 49
Ejemplo de aplicación del
método de Gauss-Seidel
50
Ejemplo de aplicación de G-S
Para la red de la figura siguiente, se resuelve el
problema de flujo de cargas mediante Gauss-Seidel
con un error máximo de 0.1 MVA.
ONE TWO
THREE
07/09/2009 51
Ejemplo de aplicación de G-S
(nudo slack)
1 1.02 1-2 0.02+0.04j
07/09/2009 52
Resolución del problema
1. Se especifican datos e incógnitas:
2 PV V2=1.02 P2=0.5 δ 2 Q2
3 PQ P3=-1.0 Q2=-0.6 δ3 V3
07/09/2009 53
Resolución del problema
2. Construimos YBUS
- Yii suma algebraica de las admitancias que terminan en ese nudo;
- Yiknegativo de la suma de todas las admitancias que conectan los
nudos i y k ;
ONE TWO
15 35 j 10 20 j 5 15 j
YBUS 10 20 j 30 60 j 20 40 j
5 15 j 20 40 j 25 55 j
THREE
07/09/2009 54
Resolución del problema
En forma de vectores:
1.02 0
V 0 1.02 0 0
1 0
07/09/2009 55
Resolución del problema
- Criterio de parada:
a) convergencia Sslack y flujos;
b) no converge volvemos a iterar
07/09/2009 56
Resolución del problema
Q(2r 1) ( V2(r ) )* Y21V1( r 1) ( V2(r ) )* Y22 V2( r ) ( V2(r ) )* Y23 V3( r )
P2 jQ(2r 1)
2 angle [ V2 ] A (2r 1)
Y22
07/09/2009 57
Resolución del problema
A (2r 1) (r )
(2r 1) ( r 1)
angle (r 1) * B21V1 B23 V3
( V2 )
donde
Yik
Bik constante para cada iteración
Yii
07/09/2009 58
Resolución del problema
5. Nudo(s) PQ en la iteración (r+1) :
nudo 3:
A3
V3(r 1) (r ) * B31V1(r 1) B32 V2(r 1)
( V3 )
donde
P3 jQ3
A3
Y33
constantes en nudos PQ
Yik
Bik
Yii
07/09/2009 59
Resolución del problema
07/09/2009 60
Resolución del problema
Si el sistema converge:
*
Sslack P1 jQ1 V1* ( Y11V1 Y12 V2 Y13 V3 )
Sik Vi ( Vi - V *k )YLik
* *
07/09/2009 61
Resolución del problema
6.3) Calculamos pérdidas en las líneas:
07/09/2009 62
Implementación
07/09/2009 63
Implementación
Esquema de programa:
- Construcción de YBUS
- Cálculo de coeficientes A i , Bik
07/09/2009 64
Implementación
07/09/2009 65
Solución
Alcanzamos solución correcta tras 11 iteraciones
07/09/2009 66
Solución
Iteración 1 2 3 ... 10 11
V1 1.02 1.02 1.02 ... 1.02 1.02
1 (º ) 0 0 0 ... 0 0
V2 1.02 1.02 1.02 ... 1.02 1.02
07/09/2009 67
Solución
Iteración 1 2 3 ... 10 11
07/09/2009 68
Solución Final
Los resultados obtenidos son (magnitudes reales):
07/09/2009 69
Comprobación
ONE TWO
THREE
07/09/2009 70
Comprobación
Extrayendo los resultados de la simulación del
sistema y comparando con los obtenidos con G-S:
07/09/2009 71
Comprobación
Magnitud V δ P Q
07/09/2009 72
4. The Newton-Raphson solution
technique
73
The Newton-Raphson solution technique
Introduction
• One variable
f ( x ) 0, f ( x ( 0 ) ) 0, f ( x (0 ) x ( 0 ) ) 0
(0)
( 0 ) df
f ( x x ) 0 f ( x ) x
(0) (0) (0)
...
dx
f ( x(0) )
x ( 0 ) (0)
; x (1) x ( 0 ) x ( 0 )
df
dx
f ( x (r ) )
x (r 1) x (r ) (r )
df
dx
07/09/2009 74
The Newton-Raphson solution technique
Introduction
• Example
df ( x )
f ( x ) x 2 5 x 4 0; 2x 5
dx
( r 1) ( x ( r ) )2 5 x ( r ) 4 ( 0 )
x x (r )
; x 0 .5
2x 5
(r )
0 .5 2 5 0 . 5 4
x (1)
0 .5 0.9375
2 0 .5 5
0.9375 2 5 0.9375 4
x ( 2)
0.9375 0.9988
2 0.9375 5
0.9988 2 5 0.9988 4
x (3)
0.9988 1.0000
2 0.9988 5
Fast!
07/09/2009 75
The Newton-Raphson solution technique
General formulation
• General case
f ( x ) 0 : Rn Rn f ( x ( 0 ) ) 0, f ( x ( 0 ) x ( 0 ) ) 0
f ( x ( 0 ) x ) f ( x ( 0 ) ) J( 0 ) x ( 0 ) 0
x (0)
J ( 0 ) 1
f ( x(0) )
x (1) x ( 0 ) x ( 0 )
x (r 1)
x (r )
J(r ) 1
f ( x (r ) )
07/09/2009 76
The Newton-Raphson solution technique
General formulation
07/09/2009 77
The Newton-Raphson solution technique
Load flow case
(2r )
( r )
3
n
(r ) fiP () Vi Vk (Gik cos ik Bik sinik )
x (r )
(r )
n
Vm1
k 1
n
Vn(r )1
(r )
Vn
Pi () fiP, Pi Pi,sp
Qi () fiQ, Qi Qi,sp
2 ,..., n ; Vm1,..., Vn
07/09/2009 78
The Newton-Raphson solution technique
Load flow case
Using Taylor:
(r ) (r ) (r ) (r )
f f f f
Pi,sp fiP(r ) iP (2r ) ... iP (nr ) iP Vm(r)1 ... iP Vn(r )
2 n Vm1 Vn
(r ) (r ) (r ) (r )
f f f f
Qi,sp fiQ(r ) iQ (2r ) ... iQ (nr ) iQ Vm(r)1 ... iQ Vn(r )
2 n Vm1 Vn
07/09/2009 79
The Newton-Raphson solution technique
Load flow case
Matrix notation:
P2(r ) f (r ) f2P
(r )
(r )
2
2P ... ...
2 Vn
P2(r ) ... ... ... ... (r )
(r ) (r )
n
Qm1 ... (r ) ... ... ... Vm1
fnQ fnQ
(r )
... ... (r )
Qn 2
(r ) n Vn
07/09/2009 80
The Newton-Raphson solution technique
Jacobian matrix
07/09/2009 81
The Newton-Raphson solution technique
Jacobian elements
• Jacobian dimension
2 NPQ NPV
NPQ Number of PQ buses
NPV Number of PV buses
07/09/2009 82
The Newton-Raphson solution technique
Jacobian elements
• Jacobian dimension
07/09/2009 83
The Newton-Raphson solution technique
Jacobian elements
m k
Pk
Hkm Vk Vm (Gkm sinkm Bkm cos km )
m
Pk
Nkm Vm Vk Vm (Gkm cos km Bkm sinkm )
Vm
Qk
Jkm Vk Vm (Gkm cos km Bkm sinkm )
m
Qk
Lkm Vm Vk Vm (Gkm sinkm Bkm cos km )
Vm
07/09/2009 84
The Newton-Raphson solution technique
Jacobian elements
k m
Pk
Hkk Qk Bkk Vk2 Note :
k
Pk
Nkk Vk Pk Gkk Vk2 km k m
Vk
Qk
Jkk Pk Gkk Vk2 Y km Gkm jBkm
k
Qk
Lkk Vk Qk Bkk Vk2
Vk
07/09/2009 85
The Newton-Raphson solution technique
Solution outline
1. Build YBUS
2. Specify 1 0
Pi i 2,...,n
Qi i m 1,...,n
Vi i 2,...,m
V1
i , i 2,...,n
3. Initialize
V i , i m 1,...,n
07/09/2009 86
The Newton-Raphson solution technique
Solution outline
8. Update
(r 1) (r ) (r 1) PV & PQ Buses
V (r 1) V (r ) V (r 1) PV Buses
9. Go to step 4
07/09/2009 88
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;
% Valores iniciales
V_modulo= V_modulo_ini';
V_fase = V_fase_ini';
P = P_ini';
Q = Q_ini';
j=sqrt(-1);
07/09/2009 89
The Newton-Raphson, Matlab Code
tic;
while (Error_p > Tol) % Bucle principal (Se permiten 50 iteraciones como mucho).
if (N_iter >50)
error('Demasiadas iteraciones');
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
07/09/2009 90
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)
07/09/2009 91
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
07/09/2009 92
Ejemplo resuelto por el método
de Newton-Raphson
07/09/2009 93
Ejemplo por Newton-Raphson
07/09/2009 94
Ejemplo por Newton-Raphson
siguiente:
2 1.02 PG=50 MW
3 - PC= 100 MW
QC=60 MVAr
07/09/2009 95
Ejemplo por Newton-Raphson
Datos:
07/09/2009 96
Ejemplo por Newton-Raphson
• Se puede observar que se tienen 3 nudos, que se
pueden catalogar como:
• Nudo 1: Nudo slack
• Nudo 2: Nudo PV
• Nudo 3: Nudo PQ
07/09/2009 97
Ejemplo por Newton-Raphson
07/09/2009 98
Ejemplo por Newton-Raphson
3
Qi Qiesp - Vi ∑Vj (Gijsenij - Bij cos(ij )) i 3
j1
07/09/2009 99
Ejemplo por Newton-Raphson
cal cal 1
P
3 0 P
3 1 P3
Q3 7.2475·10
cal 15
Q3 0.6 Q3 0.6
cal
07/09/2009 100
Ejemplo por Newton-Raphson
07/09/2009 101
Ejemplo por Newton-Raphson
Primera iteración:
2 - 0.4557 1.0200 0
3 - 0.9406
V 1.0200 ; - 0.4557
V
1.0046 - 0.9406
3 - 0.0154
V3
07/09/2009 102
Ejemplo por Newton-Raphson
07/09/2009 103
Ejemplo por Newton-Raphson
07/09/2009 104
Ejemplo por Newton-Raphson
1.0200 0
2 - 0.0154
3 - 0.0206 V 1.0200 ; - 0.4710
V 1.0043 - 0.9612
3 - 3.0024·10
-4
V3
07/09/2009 105
Ejemplo por Newton-Raphson
cal 5
P3 1.0000 P3 1 ( 1.0000) 0.5454·10
Qcal 0.6000
Q
0.6 ( 0.6000)
4.9698·10 6
3 3
07/09/2009 106
Ejemplo por Newton-Raphson
El Jacobiano de la tercera iteración es:
2
- 0.6458·10-5
1.0200 0
3 - 0.7534·10-5 V 1.0200 ; - 0.4710
V
1.0043 - 0.96810
- 1.1106·10-7
3
V3
07/09/2009 107
Ejemplo por Newton-Raphson
07/09/2009 108
Ejemplo por Newton-Raphson
convegencia
07/09/2009 109
Ejemplo por Newton-Raphson
convegencia
07/09/2009 110
Ejemplo por Newton-Raphson
convegencia
07/09/2009 111
Ejemplo por Newton-Raphson
convegencia
07/09/2009 112
Power World
5 0 ,9 7 7 M W 5 0 ,0 0 0 M W
7 ,0 9 5 M var 5 5 ,1 2 6 M var
UNO
C ERO
1 ,0 2 0 pu
1 ,0 2 0 pu
0 ,0 0 0 Deg
-0 ,4 7 1 Deg
DO S
1 ,0 0 4 3 pu
-0 ,9 6 1 Deg
100 MW
6 0 M var
07/09/2009 113
Ejemplo por Newton-Raphson
Nudo 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
07/09/2009 114
Ejemplo por Newton-Raphson
07/09/2009 115
Including tap-changing transformers
07/09/2009 116
Tap-Changing transformer
07/09/2009 117
Admitance matrix
Equivalent circuit:
t:1 Ycc
Ycc i t j
i j
1 t t 1
Ycc 2 Ycc
t t
t 1
07/09/2009 118
Admitance matrix
07/09/2009 119
Tap-changing
Example
07/09/2009 120
Tap-changing
Example
1 Z13 3 Z 23 2
Ycc
t 4
The tap-changing
transformer
controls voltage 1 t t 1
Ycc 2 Ycc
of bus 4 t t
07/09/2009 121
Tap-changing
Example
1
Y11 Yshunt 13 ; Y12 0 ;...
Z13
1 1 1 t Ycc
... Y33 Yshunt 13 Yshunt 23 Ycc 2
Z13 Z 23 t t
Ycc
Y34
t
Ycc t 1
Y44 Ycc Ycc
t t
07/09/2009 123
Tap-changing transformer
n
Qi Vi Vk Gik sin ik Bik cos ik
k 1
07/09/2009 124
Tap-changing transformer
Taylor Expansion:
(r ) (r ) (r )
fiP fiP fiP
Pi dato
f(r )
(r )
... (r )
Vm 1 ...
(r )
2 n Vm1
iP 2 n
(r )
fiP
(r )
fiP
... V (r )
t t (r )
n
n
V
(r ) (r ) (r )
f f f
Qidato fiQ(r ) iQ (2r ) ... iQ (nr ) iQ Vm(r)1 ...
2 n Vm1
(r ) (r )
fiQ fiQ
... V (r )
t t (r )
n
n
V
07/09/2009 125
Tap-changing transformer
07/09/2009 126
Tap-changing transformer
07/09/2009 127
Tap-changing transformer
07/09/2009 128
Tap-changing transformer
fiQ n
Gik Bik
Di t t Vi ∑Vk sinik cos ik
t k 1 t t
C & D multiplied by t!
07/09/2009 129
Tap-changing transformer
07/09/2009 130
Tap-changing
Example
1.- Slack
2.- PV
3.- PQ
4.- PQ
5.- PQV
07/09/2009 131
Tap-changing
Example
Data:
07/09/2009 132
Tap-changing
Example
Bus Voltage (pu). Power
1 1.00 Slack
2 1.00 Pg=150MW
3 -- Pc=50MW, Qc=10MVAr
4 -- Pc=0MW, Qc=0MVAr
5 1.00 Pc=100MW,Qc=50MVAr
07/09/2009 133
Tap-changing
Example
Ylínea Ylínea Ylínea
1 2 4 3
1 t t 1
Ycc 2 Ycc
t t
07/09/2009 134
Tap-changing
Example
Admitance matrix:
Yl Ys Yl 0 0 0
Y 2Yl 2Ys 0 Yl 0
l
0 0 Yl Ys Yl 0
YBUS Ycc (1 t ) Ycc
0 Yl Yl 2Yl 2Ys Ycc 2
t t t
0 Ycc
0 0 Ycc
t
07/09/2009 135
Tap-changing
Example
0.3998 j19.942 0.3998 j19.992 0 0 0
0.3998 j19.992 0.7997 j39.884 0 0 .3998 j19 .992 0
Ybus 0 0 0.3998 j19.942 0.3998 j19.992 0
0 0 .3998 j19.992 0 .3998 j19. 992 0 .7997 j49 . 884 j10
0 0 0 j10 j10
07/09/2009 137
Tap-changing
Example
Jacobian
07/09/2009 138
Tap-changing
Example
First iteration:
2
3
0
4 0.0993 1 0
0 . 0744 1 0
5
V3 0.1744 V 0.9623 ; 0.0993 ; t 0.918
V3
0.968 0.0744
V 0 . 0377
4
0.032 1 0.1744
V4
t 0.082
t
07/09/2009 139
Tap-changing
Example
Admitance matrix:
07/09/2009 140
Tap-changing
Example
Power computation:
P1 0 Q1 0.05
P 1.4521 Q 0.5647
2 2
P3 0.4657 Q3 0.1407
P Q
4 0 . 069 4 0 . 1027
P5 1.0527 Q5 0.492
07/09/2009 141
Tap-changing
Example
Power increments:
P2 1.5 1.4521 0.0479
P 0.5 0.4657 0.0343
3
P4 0.069 0.069
P 0.0527
5 1 1 . 0527
Q3 0.1 0.1407 0.0407
Q 4 0.1027 0.1027
Q5 0.5 0.492 0.008
07/09/2009 142
Tap-changing
Example
Jacobian matrix:
07/09/2009 143
Tap-changing
Example
Second iteration
2
0.0002
3
4 0.005 1 0
0 . 003 1 0.0002
5
3 0.0021 V 0.9607 ; 0.1043 ; t 0.9144
V
V3
0.9644 0.0744
V 0 . 0016
4
0.0037 1 0.1723
V4
t 0.0039
t
07/09/2009 144
Tap-changing
Example
Admitance matrix:
07/09/2009 145
Tap-changing
Example
Power calculations:
P1 0.0031 Q1 0.0501
P 1.4998 Q 0.6391
2 2
P3 0.4998 Q3 0.1000
P Q
4 0 . 000 4 0 . 0006
P5 1.0000 Q5 0.4999
07/09/2009 146
Tap-changing
Example
Power increments:
P2 1.5 1.4998 0.2065
P 0.5 0.4998 0.1969
3
P4 0.000 0.0057
P 0.0258 10 3
5 1 1 . 0000
Q3 0.1 0.1000 0.0339
Q
4 0 . 0006 0 . 6375
Q5 0.5 0.4999 0.1218
07/09/2009 147
Tap-changing
Example
Tap to the closest feasible value:
t 0.9144 t 0.915
Admitance matrix:
0.3998 j19.942 0.3998 j19.992 0 0 0
0.3998 j19.992 0.7997 j 39.884 0 0.3998 j19.992 0
Ybus 0 0 0.3998 j19.942 0.3998 j19.992 0
0 0.3998 j19.992 0.3998 j19.992 0.7997 j51.8282 j10.929
0 0 0 j10.929 j10
07/09/2009 148
Tap-changing
Example
Power calculation:
P1 0.0031 Q1 0.0501
P 1.4998 Q 0.6391
2 2
P3 0.4998 Q3 0.1000
P Q
4 0 . 0007 4 0 . 0075
P5 0.9993 Q5 0.4926
07/09/2009 149
Tap-changing
Example
Power increment calculations:
2
P2 1.5 1.4998 0.0002 3
P 0.5 0.4998 0.0002
3 4
P4 0.0007 0.0007 5
P 0.0007 ; V3
5 1 0 . 9993 V
Q3 0.1 0.1000 0.0000 3
V4
Q 4 0.0075 0.0075 V4
Q5 0.5 0.4926 0.0074 V
5
V
5
07/09/2009 150
Tap-changing
Example
Jacobian:
07/09/2009 151
Tap-changing
Example
Final values
2
3 0.0007
4 0.0289 1 0
0 . 0152 1 0.0002
5
V
3 0.1699 10 V 0.9607 ; 0.1043
3
V3
0.9644 0.0744
V 0 . 0552
4
0.0558 0.9991 0.1725
4
V
V5 0.8522
V
5
07/09/2009 152
Tap-changing
Example
P1 0.0031 Q1 0.0501
P 1.5000 Q 0.6402
2 2
P3 0.5000 Q3 0.1000
P Q
4 0 . 0000 4 0 . 000
P5 1.0000 Q5 0.5000
07/09/2009 153
Power World
07/09/2009 154
5. Fast decoupled AC load flow
07/09/2009 155
Fast decoupled AC load flow
Two simplifications:
– Do not build Jacobian at each iteration (small error
introduced, then, the procedure needs more
iterations to reach the solution)
07/09/2009 156
Fast decoupled AC load flow
(r ) (r ) (r 1)
( r ) V
Q J L V (r )
Assume:
i) V i 1 .0 i
ii) Gik Bik i, k
iii) cos(i k ) 1.0
sin(i k ) 0.0
iv) Qk Bkk
07/09/2009 157
Fast decoupled AC load flow
We have:
~
ik Bik
~ ~
B1 , B2 ~
B
Elements of YBUS
Bii Bii
07/09/2009 158
Fast decoupled AC load flow
P(r ) B~ ( r 1)
0
(r )
1
~ (r 1)
Q 0 B 2 V
~
P(r ) B1 (r 1) (1)
~
Q(r ) B 2 V (r 1) ( 2)
( r 1) ~ 1
B1 P(r )
V
( r 1) ~ 1
B 2 Q(r )
Calculate Delta P
NO NO
Solve (1) and update angles
Calculate Delta Q
NO
NO NO
OUTPUT RESULTS
07/09/2009 160
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';
07/09/2009 161
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)
error('Demasiadas iteraciones');
break
end
Dfase = H\DP;
Dmodulo = L\DQ;
PQ = [DP ; DQ];
Error_p = norm(PQ,2); % Error en esa iteracion
07/09/2009 162
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)
07/09/2009 163
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
07/09/2009 164
Desacoplado Rápido
Ejemplo
• Se resuelve el problema del reparto de cargas mediante el
método desacoplado rápido con un error máximo de 0.1
MVA.
ONE TWO
THREE
07/09/2009 165
Desacoplado Rápido
Ejemplo
• Red de tres nudos con potencia base SB = 100MVA
Nudo Tensiones en p.u. Potencias
1 1.02 -
2 1.02 PG=50 MW
3 - PC=100 MW
QC=60 MVAr
07/09/2009 166
Desacoplado Rápido
Ejemplo
• Matriz de Admitancias
15 35 j 10 20 j 5 15 j
Ybus 10 20 j 30 60 j 20 40 j
5 15 j 20 40 j 25 55 j
07/09/2009 167
Desacoplado Rápido
Ejemplo
07/09/2009 168
Desacoplado Rápido
Ejemplo
• Diagrama de flujo
Vi(0) , δi(0), Piesp, Qiesp Calcular: Delta P
Calcular: Delta Q
SI SI
¿Converge Delta Q? ¿Converge Delta P?
NO
NO
Resolver Suproblema 2 y Actualizar Tensiones
Resultados Finales
07/09/2009 169
Desacoplado Rápido
Ejemplo
• Matlab:
- se ha hecho uso de un bucle while con el que se itera
hasta conseguir que los resultados los residuos de
potencia activa y reactiva cumplan el criterio de
convergencia, siguiendo con la misma filosofía.
07/09/2009 170
Desacoplado Rápido
Ejemplo
60 40
Se Obtienen las componentes H ; L 55
40 55
Se calculan los primeros valores de P y Q y se comparan
con los iniciales:
cal cal 1
P
3 0 P
3 1 P3
Q3 7.2475·10
cal 15
Q3 0.6 Q3 0.6
cal
• Primera iteración:
2 - 0.4213 1.0200 0
3 - 1.3481
V 1.0200 ; - 0.4213
V
3 - 0.0109 1.0091 - 1.3481
V3
07/09/2009 172
Desacoplado Rápido
Ejemplo
Con el nuevo estado del sistema, se calculan
los residuos:
07/09/2009 173
Desacoplado Rápido
Ejemplo
07/09/2009 174
Desacoplado Rápido
Ejemplo
07/09/2009 176
Desacoplado Rápido
Ejemplo
07/09/2009 177
Desacoplado Rápido
Ejemplo
2
- 0.1592·10-3
1.0200 0
3 0.6141·10-3
V V 1.0200 ; - 0.4710
- 1.5154·10-5
1.0043 - 0.9614
3
V3
07/09/2009 178
Desacoplado Rápido
Ejemplo
cal cal 3
P3 1.0004 P3 1 P3 0.3516·10
Qcal cal 4
3 0. 6003 3
Q 0.6 Q 3 3.3349·10
0.5098 0.0711
P 0.5003 Q 0.5515
1.0004 0.6003
07/09/2009 180
Desacoplado Rápido
convergencia
07/09/2009 181
Desacoplado Rápido
convergencia
07/09/2009 182
Desacoplado Rápido
convergencia
07/09/2009 183
Desacoplado Rápido
convergencia
07/09/2009 184
6. Variable limits
07/09/2009 185
Variable limits
Physical considerations
v min
i v i v max
i
07/09/2009 186
Variable limits
Physical Considerations
07/09/2009 187
Variable limits
Computational Considerations
Changing PV to PQ
no yes
Q hits
limit?
no Yes Change to
Q=Qmax ? QG>Qmax? P-Q
Q=Qmax
Yes No
yes
Change to P-V Yes Change to
V >Vdato? V=Vdato P-Q
QG<Qmin?
Q=Qmin
No No
Stay as
P-Q Stay as
P-V
Yes Change to P-V
V <Vdato? V=Vdato
No
Stay as
P-Q
07/09/2009 188
7. DC load flow
07/09/2009 189
DC load flow
• Approximate solution.
• Two simplifications:
– In network model: do not consider series
resistences and shunt admittances
– Assume Vi=1 at all buses
07/09/2009 190
DC load flow
Approximate analytical solution
V V
i j
P sin
ij X ij
ij
2
V V V
i i j
Q - cos
ij X X ij
ij ij
Assume
i) Vi ≈ 1.0 ∀i
ii) sinij ≈ ij
iii) cos ij ≈ 1.0
07/09/2009 191
DC load flow
Approximate analytical solution
ij
Pij Bijij Biji Bij j
Xij
n
n
n
Pi Pij Bij i Bij j
j1 j1 j1
j i
ji j i
P B´
where n
Bii' Bij
j1
ji
07/09/2009
Bij' Bij 192
DC load flow
Continuation
Vi V j
Qij Bij ( V i V j ) Bij V i Bij V j
Xij
n
n n
Qi Qij Bij V i Bij V j
j1
j1 j1
ji
ji ji
07/09/2009 193
DC load flow
Continuation
Solution
P B' PQ & PV Buses
Q B' V PQ Buses
1 V1 P2 Qm1
; V ; P ; Q
n Vn Pn Qn
' n
ii ij
B B
B
' j1
ji ; B ij
1
Xij
'
Bij Bij
07/09/2009 194
Ejemplos
Método Aproximado DC
07/09/2009 195
Ejemplo
Método aproximado DC
Resolución por el método en DC
ONE TWO
THREE
07/09/2009 196
Ejemplo
Método aproximado DC
Los datos del sistema son los siguientes:
0 1.02 -
1 1.02 PG=50MW
2 - PC=100MW, QC=60MVAr
07/09/2009 197
Ejemplo
Método aproximado DC
41.67 25 16.67
B 25 75 50
16.67 50 66.67
P0 41.67 25 16.67 0
0.5 25 75 50 1
1.0 16.67 50 66.67 2
Q0 41.67 25 16.67 1.02
Q 25 75 50 1.02
1
0.6 16.67 50 66.67 V2
07/09/2009 198
Ejemplo
Método aproximado DC
De estas ecuaciones nos quedamos con la parte
que nos interesa, eliminando lo correspondiente
al SLACK que es conocido:
07/09/2009 199
Ejemplo
Método aproximado DC
07/09/2009 200
Ejemplo
Método aproximado DC
Las soluciones son las siguientes:
P0 0.5p.u.=50MW
Q0 0.15p.u.=15MVAr
Q1 0.45p.u.=45MVAr
δ1 -1.1459º
δ2 -0.3819º
V2 1.011p.u.
07/09/2009 201
Ejemplo
Método aproximado DC
Si comparamos estas soluciones con las obtenidas
mediante PowerWorld:
07/09/2009 202
Ejemplo 2
Método aproximado DC
Resolver el siguiente sistema por el método en DC
0,00 MW 50,00 MW
0,00 Mvar 0,00 Mvar
CERO
UNO
DOS
TRES
100,00 MW
07/09/2009 60,00 Mvar 203
Ejemplo 3
Método aproximado DC
Los datos del sistema son los siguientes:
Nudos Tensiones p.u. Potencias
0 1.02 -
1 1.02 PG=50MW
2 - PC=0MW, QC=0MVAr
3 - PC=100MW, QC=60MVAr
07/09/2009 204
Ejemplo 3
Método aproximado DC
41.67 25 16.67 0
25 75 50 0
B
16.67 50 76.67 10
0
0 10 10
P0 41.67 25 16.67 0 0
0.5 25 75 50 0 1
0.0 16.67 50 76.67 10 2
1 .0 0
0 10 10 3
Q0 41.67 25 16.67 0 1.02
Q 25 75 50 0 1.02
1
0.0 16.67 50 76.67 10 V2
0 .6 0
0 10 10 V3
07/09/2009 205
Ejemplo 3
Método aproximado DC
Y las ecuaciones a resolver que se desprenden
de estas matrices son:
P0 = -25δ1 -16.67δ2-0*δ3
0.5 = 75δ1 - 50δ2-0*δ3
0.0 = -50δ1 + 76.67δ2-10δ3
-1.0 = -0*δ1 - 10δ2+10δ3
07/09/2009 206
Ejemplo 3
Método aproximado DC
Si comparamos estas soluciones con las obtenidas mediante
PowerWorld:
07/09/2009 208
Comparison of load flow methods
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
07/09/2009 209
Comparison of load flow methods
(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
07/09/2009 210
Comparison of load flow methods
(Continuation)
3. AC decoupled
07/09/2009 211
Comparison of load flow methods
(Continuation)
4. DC Decoupled
07/09/2009 212