Professional Documents
Culture Documents
clear all
close all
basemva = 100; accuracy = 0.001; accel = 1.8; maxiter = 100;
% 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.02 0.06 0.000 1
1 3 0.00 0.24 0.000 1
2 3 0.06 0.18 0.000 1
2 4 0.06 0.25 0.000 1
2 5 0.00 0.12 0.000 1
3 4 0.00 0.03 0.000 1
4 5 0.08 0.24 0.000 1];
tic
lfybus % form the bus admittance matrix
lfgauss % Load flow solution by Gauss-Seidel method
lfnewton % Power flow solution by Newton-Raphson method
decouple % Power flow solution by fast decoupled method
busout % Prints the power flow solution on the screen
lineflow % Computes and displays the line flow and losses
toc
output
Load flow solution by Gauss-Seidel method
Power flow solution by Newton-Raphson method
Power flow solution by fast decoupled method
Load flow solution with off nominal tap setting
clear all
close all
basemva = 100; accuracy = 0.001; accel = 1.8; maxiter = 100;
% 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.02 0.06 0.000 1
1 3 0.00 0.24 0.000 1.02
2 3 0.06 0.18 0.000 1
2 4 0.06 0.25 0.000 1
2 5 0.00 0.12 0.000 1.1
3 4 0.00 0.03 0.000 1.08
4 5 0.08 0.24 0.000 1];
tic
lfybus % form the bus admittance matrix
lfgauss % Load flow solution by Gauss-Seidel method
lfnewton % Power flow solution by Newton-Raphson method
decouple % Power flow solution by fast decoupled method
busout % Prints the power flow solution on the screen
lineflow % Computes and displays the line flow and losses
toc
output