Anda di halaman 1dari 6

LOAD FLOW ANALYSIS USING NEWTON RAPHSON METHOD

AIM:
To write a Matlab Program to determine
1. The phasor value of voltage at the load bus 2 & 3 using Newton Raphson method.
2. The power flow including line flow and line losses for the given power system.

SAMPLE DATA:

1 2
0.02+j0.04
400 MW

250 Mvar
0.01+j0.03 0.0125+j0.025
Slack Bus
V1 = 1.050o

V3 1.04

200 MW

Line impedances are in per unit with 100MVA base, line charging susceptances are neglected

ALGORITHM:
1. Start.
2. Obtain Ybus from the given line impedances.
3. For PQ buses calculate the real and reactive power and for PV buses calculate real power.
4. Compute the power mismatches given by p=Pspecified-Pcalculated and q=Qspecified-Qcalculated
For PQ buses and p=Pspecified-Pcalculated for PV buses and form the matrix DEL
5. Compute Jacobian matrix J.
6. Compute the the matrix X= J-1*DEL and get v and .
7. Update values of v and using vnew=vold+ v and new= old + .
8. With new calculated values repeat step 3 for fixed number of iterations.
9. Compute slack bus real and reactive power.
10. Determine the line flows and losses.
11. Stop.

PROGRAM
clc
clear all
% BASE MVA=100;
% Type 1=slack bus;
% Type 2=load bus;
% Type 3=PV bus;
% BUSDATA
% busno type |V| Vang genMW genMVAR loadMW loadMVAR Qmin Qmax
BUSDATA=[1 1 1.05 0 0 0 0 0 0 0
2 2 1 0 0 0 4 2.5 0 0
3 3 1.04 0 2 0 0 0 0 0 ];
nload=input('enter the no. of load bus:')
ngen=input('enter the no. of gen bus:')
% LINEDATA
% fb tb R X
LINEDATA=[1 2 0.02 0.04
2 3 0.0125 0.025
3 1 0.01 0.03];
% ybus
YBUS=[20-j*50 -10+j*20 -10+j*30
-10+j*20 26-j*52 -16+j*32
-10+j*30 -16+j*32 26-j*62];
Y1=abs(YBUS);
Y2=(180/pi)*angle(YBUS);
nbus=max(BUSDATA(:,1));
type=BUSDATA(:,2);
V=BUSDATA(:,3);
DEL=(180/pi)*BUSDATA(:,4);
GENMW=BUSDATA(:,5);
GENMVAR=BUSDATA(:,6);
LOADMW=BUSDATA(:,7);
LOADMVAR=BUSDATA(:,8);
Qmin=BUSDATA(:,9);
Qmax=BUSDATA(:,10);
Psp=GENMW-LOADMW
Qsp=GENMVAR-LOADMVAR
for i=2:nbus
Pcal(i)=0;
for k=1:nbus
Pcal(i)=Pcal(i)+(V(i)*V(k)*Y1(i,k)*cosd(Y2(i,k)+DEL(k)-DEL(i)));
end
delp(i)=Psp(i)-Pcal(i)
if (type(i)==2)
delq=zeros(1,3);
Qcal(i)=0;
for k=1:nbus
Qcal(i)=Qcal(i)-(V(i)*V(k)*Y1(i,k)*sind(Y2(i,k)+DEL(k)-DEL(i)));
end
delq(i)=Qsp(i)-Qcal(i)
end
end
J=zeros(nbus,nbus);
for k=2:3
if type(k)==2
jsum1=0;
jsum2=0;
jsum3=0;
jsum7=0;
jsum9=0;
jsum8=0;
for l=1:3
if (k~=l)
jsum1=jsum1+(V(k)*V(l)*Y1(k,l)*sind(Y2(k,l)+DEL(l)-DEL(k)));
J(1,1)=jsum1;
jsum7=jsum7+(V(k)*V(l)*Y1(k,l)*cosd(Y2(k,l)+DEL(l)-DEL(k)));
J(3,1)=jsum7;
jsum3=jsum3+(V(l)*Y1(k,l)*cosd(Y2(k,l)+DEL(l)-DEL(k)));
s=(2*V(k)*Y1(k,k)*cosd(Y2(k,k)));
jsum3=s+jsum3;
J(1,3)=jsum3;
jsum9=jsum9-(V(l)*Y1(k,l)*sind(Y2(k,l)+DEL(l)-DEL(k)));
t=-(2*V(k)*Y1(k,k)*sind(Y2(k,k)));
jsum9=t+jsum9;
J(3,3)=jsum9;
if (k~=l)&&(l~=1)
jsum2=jsum2-(V(k)*V(l)*Y1(k,l)*sind(Y2(k,l)+DEL(l)-DEL(k)));
J(1,2)=jsum2;
jsum8=jsum8-(V(k)*V(l)*Y1(k,l)*cosd(Y2(k,l)+DEL(l)-DEL(k)));
J(3,2)=jsum8;
end
end
end
else type(k)=3;
jsum4=0;
jsum5=0;
jsum6=0;
for l=1:3
if (k~=l)
jsum5=jsum5+(V(k)*V(l)*Y1(k,l)*sind(Y2(k,l)+DEL(l)-DEL(k)));
J(2,2)=jsum5;
if (k~=l)&&(l~=1)
jsum4=jsum4-(V(k)*V(l)*Y1(k,l)*sind(Y2(k,l)+DEL(l)-DEL(k)));
J(2,1)=jsum4;
jsum6=jsum6+(V(k)*Y1(k,l)*cosd(Y2(k,l)+DEL(l)-DEL(k)));
J(2,3)=jsum6;
end
end
end
end
end
disp(J)
M=[delp'
delq'];
DEL1=zeros(3,1)
DEL1(1)=M(2,1);
DEL1(2)=M(3,1);
DEL1(3)=M(5,1);
X=zeros(3,1);
X=inv(J)*DEL1
delth2=X(1);
delth3=X(2);
delV2=X(3);
DEL(2)=DEL(2)+(delth2*180/pi)
DEL(3)=DEL(3)+(delth3*180/pi)
V(2)=V(2)+delV2
P1=0;
Q1=0;
Q3=0;
for l=1:3
P1=P1+(V(1)*V(l)*Y1(1,l)*cosd(Y2(1,l)+DEL(l)-DEL(1)))
Q1=Q1-(V(1)*V(l)*Y1(1,l)*sind(Y2(1,l)+DEL(l)-DEL(1)))
Q3=Q3-(V(3)*V(l)*Y1(3,l)*sind(Y2(3,l)+DEL(l)-DEL(3)))
end
for k=1:3
for l=1:3
if(k==l)
i(k,k)=0;i(l,l)=0;s(k,k)=0;s(l,l)=0;
else
i(k,l)=(V(k)-V(l))*(-1*YBUS(k,l))
i(l,k)=(V(l)-V(k))*(-1*YBUS(l,k))
s(k,l)=(V(k)*(conj(i(k,l))))*100;
s(l,k)=(V(l)*(conj(i(l,k))))*100;
sline(k,l)=(s(k,l)+s(l,k))
end
end
end
Sloss=sline(1,2)+sline(2,3)+sline(3,1)
POWER FLOW SOLUTION USING FAST DECOUPLED METHOD

PROGRAM :
clc
clear all;
V1= 1.05; V2 = 1.0; V3 = 1.04;
d1 = 0; d2 = 0; d3=0;
Ps2=-4; Ps3 =2.0;
Qs2= -2.5;
YB = [ 20-1i*50 -10+1i*20 -10+1i*30
-10+1i*20 26-1i*52 -16+1i*32
-10+1i*30 -16+1i*32 26-1i*62];
Y = abs(YB); t=angle(YB);
B =[-52 32; 32 -62];
Binv = inv(B);
iter=0;
pwracur = 0.0003;
DC = 10;
while max(abs(DC)) > pwracur
iter = iter +1;
P2= V2*V1*Y(2,1)*cos(t(2,1)-d2+d1)+V2^2*Y(2,2)*cos(t(2,2))+ ...
V2*V3*Y(2,3)*cos(t(2,3)-d2+d3);
P3= V3*V1*Y(3,1)*cos(t(3,1)-d3+d1)+V3^2*Y(3,3)*cos(t(3,3))+ ...
V3*V2*Y(3,2)*cos(t(3,2)-d3+d2);
Q2=-V2*V1*Y(2,1)*sin(t(2,1)-d2+d1)-V2^2*Y(2,2)*sin(t(2,2))- ...
V2*V3*Y(2,3)*sin(t(2,3)-d2+d3);
DP2 = Ps2 - P2; DP2V = DP2/V2;
DP3 = Ps3 - P3; DP3V = DP3/V3;
DQ2 = Qs2 - Q2; DQ2V = DQ2/V2;
DC =[DP2; DP3; DQ2];
Dd = -Binv*[DP2V;DP3V];
DV = -1/B(1,1)*DQ2V;
d2 =d2+Dd(1);
d3 =d3+Dd(2);
V2= V2+DV;
angle2 =180/pi*d2;
angle3 =180/pi*d3;
R = [iter d2 d3 V2 DP2 DP3 DQ2]

end
Q3=-V3*V1*Y(3,1)*sin(t(3,1)-d3+d1)-V3^2*Y(3,3)*sin(t(3,3))- ...
V3*V2*Y(3,2)*sin(t(3,2)-d3+d2);
P1= V1^2*Y(1,1)*cos(t(1,1))+V1*V2*Y(1,2)*cos(t(1,2)-d1+d2)+ ...
V1*V3*Y(1,3)*cos(t(1,3)-d1+d3);
Q1=-V1^2*Y(1,1)*sin(t(1,1))-V1*V2*Y(1,2)*sin(t(1,2)-d1+d2)- ...
V1*V3*Y(1,3)*sin(t(1,3)-d1+d3);
S1=P1+1i*Q1
Q3

Anda mungkin juga menyukai