One line diagram of a
One line diagram of a five bus system :
five bus system :
INPUT :
INPUT :
%clear%clear
basemva = 100
basemva = 100; ; accuracy = 0.0accuracy = 0.0001; accel = 1.6; maxiter = 100;001; accel = 1.6; maxiter = 100; %
% Ybus Ybus ELEMENTS ELEMENTS CALCULATION, CALCULATION, 5 5 BUSES BUSES 7 7 LINES LINES USINGUSING
%
% GAUSS-SEIDEL GAUSS-SEIDEL METHODMETHOD
%
% Bus Bus Bus Bus Voltage Voltage Angle Angle ---Load--- ---Load--- ---Generator--- ---Generator--- Static Static MvarMvar
%
% No No code code Mag. Mag. Degree Degree MW MW Mvar Mvar MW MW Mvar Mvar Qmin Qmin Qmax Qmax +Qc/-Ql+Qc/-Ql
busdata=[1 busdata=[1 1 1 1.02 1.02 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 0 00 2 2 0 0 1.00 1.00 0.0 0.0 60.0 60.0 30.0 30.0 0.0 0.0 0.0 0.0 0 0 0 0 00 3 3 2 2 1.04 1.04 0.0 0.0 0.0 0.0 0.0 100.0 0.0 100.0 0.0 0.0 0 0 0 0 00 4 4 0 0 1.0 1.0 0.0 0.0 40.0 40.0 10.0 10.0 0.0 0.0 0.0 0.0 0 0 0 0 00 5 5 0 0 1.0 1.0 0.0 0.0 60.0 60.0 20.0 20.0 0.0 0.0 0.0 0.0 0 0 0 0 0];0]; %
% Line Line codecode
%
% Bus Bus bus bus R R X X 1/2 1/2 B B = = 1 1 for for lineslines
%
% nl nl nr nr p.u. p.u. p.u. p.u. p.u. p.u. > > 1 1 or or < < 1 1 tr. tr. tap tap at at bus bus nlnl
linedata=[1 linedata=[1 2 2 0.100 0.100 0.400 0.400 0.0 0.0 11 1 1 4 4 0.150 0.150 0.600 0.600 0.0 0.0 11 1 1 5 5 0.050 0.050 0.200 0.200 0.0 0.0 11 2 2 3 3 0.050 0.050 0.200 0.200 0.0 0.0 11 2 2 4 4 0.100 0.100 0.400 0.400 0.0 0.0 11 3 3 5 5 0.050 0.050 0.200 0.200 0.0 0.0 1 1 ];];
lfybus % form the bus admittance matrix %lfgauss % Load flow solution by Gauss-Seidel method %lfnewton % Load flow solution by Newton-Raphson method %decouple % Load flow solution by Fast Decoupled method %busout % Prints the power flow solution on the screen %lineflow % Computes and displays the line flow and losses
OUTPUT :
Ybus =Columns 1 through 4
2.1569 - 8.6275i -0.5882 + 2.3529i 0 -0.3922 + 1.5686i -0.5882 + 2.3529i 2.3529 - 9.4118i -1.1765 + 4.7059i -0.5882 + 2.3529i
0 -1.1765 + 4.7059i 2.3529 - 9.4118i 0
-0.3922 + 1.5686i -0.5882 + 2.3529i 0 0.9804 - 3.9216i -1.1765 + 4.7059i 0 -1.1765 + 4.7059i 0 Column 5 -1.1765 + 4.7059i 0 -1.1765 + 4.7059i 0 2.3529 - 9.4118i
INPUT :
%clearbasemva = 100; accuracy = 0.0001; accel = 1.6; maxiter = 100;
% POWER FLOW CALCULATION, 5 BUSES 7 LINES USING % GAUSS-SEIDEL METHOD
% Bus Bus Voltage Angle ---Load--- ---Generator--- Static Mvar % No code Mag. Degree MW Mvar MW Mvar Qmin Qmax +Qc/-Ql busdata=[1 1 1.02 0.0 0.0 0.0 0.0 0.0 0 0 0 2 0 1.00 0.0 60.0 30.0 0.0 0.0 0 0 0 3 2 1.04 0.0 0.0 0.0 100.0 0.0 0 0 0 4 0 1.0 0.0 40.0 10.0 0.0 0.0 0 0 0 5 0 1.0 0.0 60.0 20.0 0.0 0.0 0 0 0]; % Line code
% Bus bus R X 1/2 B = 1 for lines
% nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl linedata=[1 2 0.100 0.400 0.0 1 1 4 0.150 0.600 0.0 1 1 5 0.050 0.200 0.0 1 2 3 0.050 0.200 0.0 1 2 4 0.100 0.400 0.0 1 3 5 0.050 0.200 0.0 1 ];
lfybus % form the bus admittance matrix
lfgauss % Load flow solution by Gauss-Seidel method %lfnewton % Load flow solution by Newton-Raphson method %decouple % Load flow solution by Fast Decoupled method busout % Prints the power flow solution on the screen lineflow % Computes and displays the line flow and losses
OUTPUT :
Power Flow Solution by Gauss-Seidel Method Maximum Power Mismatch = 9.32572e-005
No. of Iterations = 25
Bus Voltage Angle ---Load--- ---Generation--- Injected No. Mag. Degree MW Mvar MW Mvar Mvar 1 1.020 0.000 0.000 0.000 65.141 32.921 0.000 2 0.955 -3.942 60.000 30.000 0.000 0.000 0.000
3 1.040 2.001 0.000 0.000 100.000 47.685 0.000 4 0.923 -8.009 40.000 10.000 0.000 0.000 0.000 5 0.993 -2.073 60.000 20.000 0.000 0.000 0.000 Total 160.000 60.000 165.141 80.607 0.000
Line Flow and Losses
--Line-- Power at bus & line flow --Line loss-- Transformer from to MW Mvar MVA MW Mvar tap 1 65.141 32.921 72.987 2 19.802 12.263 23.292 0.521 2.086 4 24.807 11.741 27.446 1.086 4.344 5 20.546 8.908 22.394 0.241 0.964 2 -60.000 -30.000 67.082 1 -19.280 -10.178 21.802 0.521 2.086 3 -57.325 -23.696 62.029 2.110 8.442 4 16.602 3.874 17.048 0.319 1.275 3 100.000 47.685 110.788 2 59.435 32.138 67.568 2.110 8.442 5 40.572 15.543 43.448 0.873 3.491 4 -40.000 -10.000 41.231 1 -23.721 -7.397 24.848 1.086 4.344 2 -16.283 -2.599 16.489 0.319 1.275 5 -60.000 -20.000 63.246
INPUT :
%clearbasemva = 100; accuracy = 0.0001; accel = 1.6; maxiter = 100;
% POWER FLOW CALCULATION, 5 BUSES 7 LINES USING
% NEWTON-RAPHSON METHOD
% Bus Bus Voltage Angle ---Load--- ---Generator--- Static Mvar % No code Mag. Degree MW Mvar MW Mvar Qmin Qmax +Qc/-Ql busdata=[1 1 1.02 0.0 0.0 0.0 0.0 0.0 0 0 0 2 0 1.00 0.0 60.0 30.0 0.0 0.0 0 0 0 3 2 1.04 0.0 0.0 0.0 100.0 0.0 0 0 0 4 0 1.0 0.0 40.0 10.0 0.0 0.0 0 0 0 5 0 1.0 0.0 60.0 20.0 0.0 0.0 0 0 0]; % Line code
% Bus bus R X 1/2 B = 1 for lines
% nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl linedata=[1 2 0.100 0.400 0.0 1 1 4 0.150 0.600 0.0 1 1 5 0.050 0.200 0.0 1 2 3 0.050 0.200 0.0 1 2 4 0.100 0.400 0.0 1 3 5 0.050 0.200 0.0 1 ];
lfybus % form the bus admittance matrix
%lfgauss % Load flow solution by Gauss-Seidel method lfnewton % Load flow solution by Newton-Raphson method %decouple % Load flow solution by Fast Decoupled method busout % Prints the power flow solution on the screen lineflow % Computes and displays the line flow and losses
OUTPUT :
Power Flow Solution by Newton-Raphson Method Maximum Power Mismatch = 3.56144e-007
No. of Iterations = 4
Bus Voltage Angle ---Load--- ---Generation--- Injected No. Mag. Degree MW Mvar MW Mvar Mvar 1 1.020 0.000 0.000 0.000 65.150 32.916 0.000 2 0.955 -3.941 60.000 30.000 0.000 0.000 0.000
3 1.040 2.001 0.000 0.000 100.000 47.684 0.000 4 0.923 -8.008 40.000 10.000 0.000 0.000 0.000 5 0.993 -2.073 60.000 20.000 0.000 0.000 0.000 Total 160.000 60.000 165.150 80.599 0.000
Line Flow and Losses
--Line-- Power at bus & line flow --Line loss-- Transformer from to MW Mvar MVA MW Mvar tap 1 65.150 32.916 72.993 2 19.800 12.264 23.291 0.521 2.086 4 24.805 11.743 27.444 1.086 4.344 5 20.544 8.909 22.393 0.241 0.964 2 -60.000 -30.000 67.082 1 -19.279 -10.178 21.801 0.521 2.086 3 -57.321 -23.698 62.026 2.110 8.441 4 16.600 3.876 17.046 0.319 1.275 3 100.000 47.684 110.787 2 59.431 32.139 67.564 2.110 8.441 5 40.569 15.545 43.445 0.873 3.490 4 -40.000 -10.000 41.231 1 -23.719 -7.399 24.846 1.086 4.344 2 -16.281 -2.601 16.487 0.319 1.275 5 -60.000 -20.000 63.246
INPUT :
%clearbasemva = 100; accuracy = 0.0001; accel = 1.6; maxiter = 100;
% POWER FLOW CALCULATION, 5 BUSES 7 LINES USING
% FAST-DECOUPLED METHOD
% Bus Bus Voltage Angle ---Load--- ---Generator--- Static Mvar % No code Mag. Degree MW Mvar MW Mvar Qmin Qmax +Qc/-Ql busdata=[1 1 1.02 0.0 0.0 0.0 0.0 0.0 0 0 0 2 0 1.00 0.0 60.0 30.0 0.0 0.0 0 0 0 3 2 1.04 0.0 0.0 0.0 100.0 0.0 0 0 0 4 0 1.0 0.0 40.0 10.0 0.0 0.0 0 0 0 5 0 1.0 0.0 60.0 20.0 0.0 0.0 0 0 0]; % Line code
% Bus bus R X 1/2 B = 1 for lines
% nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl linedata=[1 2 0.100 0.400 0.0 1 1 4 0.150 0.600 0.0 1 1 5 0.050 0.200 0.0 1 2 3 0.050 0.200 0.0 1 2 4 0.100 0.400 0.0 1 3 5 0.050 0.200 0.0 1 ];
lfybus % form the bus admittance matrix
%lfgauss % Load flow solution by Gauss-Seidel method %lfnewton % Load flow solution by Newton-Raphson method decouple % Load flow solution by Fast Decoupled method busout % Prints the power flow solution on the screen lineflow % Computes and displays the line flow and losses
OUTPUT :
Power Flow Solution by Fast Decoupled Method Maximum Power Mismatch = 9.98889e-005
No. of Iterations = 7
Bus Voltage Angle ---Load--- ---Generation--- Injected No. Mag. Degree MW Mvar MW Mvar Mvar 1 1.020 0.000 0.000 0.000 65.156 32.914 0.000 2 0.955 -3.941 60.000 30.000 0.000 0.000 0.000
3 1.040 2.001 0.000 0.000 100.000 47.680 0.000 4 0.923 -8.008 40.000 10.000 0.000 0.000 0.000 5 0.993 -2.073 60.000 20.000 0.000 0.000 0.000 Total 160.000 60.000 165.156 80.594 0.000
Line Flow and Losses
--Line-- Power at bus & line flow --Line loss-- Transformer from to MW Mvar MVA MW Mvar tap 1 65.156 32.914 72.998 2 19.801 12.265 23.291 0.521 2.086 4 24.805 11.742 27.444 1.086 4.343 5 20.545 8.911 22.394 0.241 0.964 2 -60.000 -30.000 67.082 1 -19.279 -10.179 21.801 0.521 2.086 3 -57.321 -23.699 62.027 2.110 8.441 4 16.599 3.875 17.045 0.319 1.275 3 100.000 47.680 110.786 2 59.432 32.140 67.565 2.110 8.441 5 40.569 15.547 43.446 0.873 3.490 4 -40.000 -10.000 41.231 1 -23.719 -7.399 24.846 1.086 4.343 2 -16.280 -2.600 16.486 0.319 1.275 5 -60.000 -20.000 63.246