0% found this document useful (0 votes)
67 views

Experiment # 09

The document describes implementing the Newton-Raphson power flow method in MATLAB to analyze a three bus power system. It provides the system details, formulas, MATLAB code, and results. The code constructs an admittance matrix, defines formulas to calculate active and reactive power, forms the Jacobian matrix, and iteratively solves for bus voltages and angles until power mismatches converge to within 0.00025 pu. The method converges after 3 iterations and outputs the final bus powers and losses.

Uploaded by

Hafeez Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Experiment # 09

The document describes implementing the Newton-Raphson power flow method in MATLAB to analyze a three bus power system. It provides the system details, formulas, MATLAB code, and results. The code constructs an admittance matrix, defines formulas to calculate active and reactive power, forms the Jacobian matrix, and iteratively solves for bus voltages and angles until power mismatches converge to within 0.00025 pu. The method converges after 3 iterations and outputs the final bus powers and losses.

Uploaded by

Hafeez Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment # 09

Objective: -
Implementation of Newton Raphson Method to perform power flow analysis on
MATLAB.

Implementation of Newton-Raphson Method Using MATLAB.

Given figure shows the one line diagram of a simple three bus system with generators at
buses-1 and 3. The magnitude of voltage at bus-1 is adjusted to 1.05pu. voltage magnitude
at bus-3 is fixed at 1.04 pu with a real power generation of 200MW. A load consisting of
400MW and 250MVAR is taken from bus-2. Line impedances are marked in per unit on a
100MVA base, and the line charging susceptances are neglected. Obtain the power flow
solution by the Newton-Raphson method including line flows and line losses.

Where,impedances are replaced by admittances as:

The bus impedance matrix can be constructed as:


YBUS= [20-j50 -10+j20 -10+j30
-10+j20 26-j52 -16+j32
-10+j30 -16+j32 26-j62];
Formulas

P1=V1^2*Y11*cos(Ѳ11)+V1*V2*Y12*cos(Ѳ12-d1+d2)+... V1*V3*Y13*cos(Ѳ13-d1+d3)

Q1=-V1^2*Y11*sin(Ѳ11)-V1*V2*Y12*sin(Ѳ12-d1+d2)-... V1*V3*Y13*sin(Ѳ13-d1+d3)

Q3=-V3*V1*Y31*sin(Ѳ31)-d3+d1)-V3*V2*Y32*... sin(Ѳ32-d3+d2)-V3^2*Y33*sinѲ33

MATLAB CODE

V=[1.05;1.0;1.04];
d=[0;0;0];
Ps=[-4;2.0];
Qs=-2.5;
YB=[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];
Y=abs(YB);
t=angle(YB);
iter=0;
pwracur=0.00025; %power accuracy
DC=10; %set the maximun power residue to a high value
while max(abs(DC))>pwracur
iter=iter+1
P=[V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+V(2)^2*Y(2,2)*cos(t(2,2))+...
V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
V(3)*V(1)*Y(3,1)*cos(t(3,1)-d(3)+d(1))+V(3)^2*Y(3,3)*cos(t(3,3))+...
V(3)*V(2)*Y(3,2)*cos(t(3,2)-d(3)+d(2))];
Q=-V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-V(2)^2*Y(2,2)*sin(t(2,2))-...
V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,1)=V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))+...
V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,2)=-V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,3)=V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+2*V(2)*Y(2,2)*cos(t(2,2))+...
V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(2,1)=-V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2));
J(2,2)=V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))+...
V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2));
J(2,3)=V(3)*Y(2,3)*cos(t(3,2)-d(3)+d(2));
J(3,1)=V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+...
V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(3,2)=-V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(3,3)=-V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-2*V(2)*Y(2,2) *sin(t(2,2)) ...
V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
DP=Ps-P;
DQ=Qs-Q;
DC=[DP;DQ]
J
DX=J\DC
d(2)=d(2)+DX(1);
d(3)=d(3)+DX(2);
V(2)=V(2)+DX(3);
V, d, delta=180/pi*d;
end
P1=V(1)^2*Y(1,1)*cos(t(1,1))+V(1)*V(2)*Y(1,2)*cos(t(1,2)-d(1)+d(2))+...
V(1)*V(3)*Y(1,3)*cos(t(1,3)-d(1)+d(3))
Q1=-V(1)^2*Y(1,1)*sin(t(1,1))-V(1)*V(2)*Y(1,2)*sin(t(1,2)d(1)+d(2))-...
V(1)*V(3)*Y(1,3)*sin(t(1,3)-d(1)+d(3))
Q3=-V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))-V(3)*V(2)*Y(3,2)*...
sin(t(3,2)-d(3)+d(2))-V(3)^2*Y(3,3)*sin(t(3,3))

MATLAB RESULTS

1st Iteration

DC =
-2.8600
1.4384
-0.2200
J=
54.2800 -33.2800 24.8600
-33.2800 66.0400 -16.6400
-27.1400 16.6400 49.7200
DX =
-0.0453
-0.0077
-0.0265
V=
1.0500
0.9735
1.0400
d= 0
-0.0453
-0.0077

2nd Iteration

DC = -0.0992 
0.0217
-0.0509
J=
51.7247 -31.7656 21.3026
-32.9816 65.6564 -15.3791
-28.5386 17.4028 48.1036
DX =
-0.0018
-0.0010
-0.0018
V=
1.0500
0.9717
1.0400
d=
0
-0.0471
-0.0087

3rd Iteration

DC =
1.0e-003 *
-0.2166
0.0382
-0.1430
J=
51.5967 -31.6939 21.1474
-32.9339 65.5976 -15.3516
-28.5482 17.3969 47.9549
DX =
1.0e-005 *
-0.3856
-0.2386
-0.4412
V=
1.0500
0.9717
1.0400
d= 0
-0.0471
-0.0087

FINAL RESULTS: 

P1 =
2.1842
Q1 =
1.4085
Q3 =
1.4618

COMMENTS:

In this experiment we learn how to apply this method using MATLAB. Newton Raphson
method is readily applied to nonlinear equations, and can use finite-difference estimates of the
derivatives to evaluate the gradients.

You might also like