Sunteți pe pagina 1din 37

MATLAB Simulation Program for

LOAD FLOW ANALYSIS of 37-Bus System


(DECOUPLED POWER FLOW WITHOUT MAJOR APPROXIMATION)

Carmencita P. Cajiles, REE


Master of Science in Electrical Engineering
University of the Philippines Diliman
2015 90451
1|P age

CONTENTS

3
4
5

Title Page
Table of Contents

1
2

INTRODUCTION

1.1 Overview
1.2 Program Interface

3
3

PROGRAM DESIGN

2.1 Program Design Process


2.2 MATLAB Programming

4
5

STANDARD DATA STRUCTURES


POWER FLOW ALGORITHMS

6
7

4.1 Algorithm Discussions

IEEE 37-BUS TEST SYSTEM

13

5.1 Formulation of the Solution Equations


Algorithm
Iteration Schemes
5.2 Methodology
5.2.1 Flowchart
5.2.2 Solution Steps
5.3 Tabulation of Data
Bus Output Data
Branch Output Data
5.4 PowerWorld Simulator

13
15
16
17
17
19
31
31
32
33

2|P age

Appendix

36

INTRODUCTION
1.1 Overview
Load flow study is a numerical analysis of the flow of electric power in an interconnected system. A
power flow study usually uses simplified notation such as a one-line diagram and per-unit system,
and focuses on various aspects of AC power parameters, such as voltages, voltage angles, real power
and reactive power. It analyzes the power systems in normal steady-state operation.
(https://en.wikipedia.org/wiki/Power-flow_study)

1.2 Program Interface


MATLAB Simulation Program for LOAD FLOW ANALYSIS of 37 Bus System is a collection of routines
written in m-files which implement the important functions to compute and analyze the applications
of power flow.
The program is made up of three main algorithms: Gauss-Seidel, Newton-Raphson and P-Q
decoupling methods.

Simulation Program
Gauss-Seidel Algorithm
Newton-Raphson Algorithm

MATLAB Environment

P-Q Decoupling Algorithm

Visualized Computation

Output Solution

Figure 1.1 Diagram of MATLAB Simulation for Load Flow Analysis of 37-Bus System

3|P age

PROGRAM DESIGN
2.1 Program Design Process
The power flow problem is the computation of voltage magnitude and phase angle at each bus in a power
system under balanced three-phase steady state conditions. The designs of useful utilities translated into
the MATLAB language are the primary and most useful way to visualize the computations. Subprograms
do some specific part of the main task.

Input Data
(Data Pre-processing)

Execute Algorithms

Output Solution

Figure 2.1 Flowchart for Program Design

4|P age

Step 1: Input Data (Data Pre-processing). Input the electrical grid data, with containing varieties of
information: bus data, transmission line data and transformer data. To make the computation more
significant, adopt one data structure to be used as standard. Use IEEE Common Data Format.
Step 2: Execute Algorithms. The power flow algorithms are normally including Gauss-Seidel algorithm,
Newton-Raphson algorithm, and P-Q Decoupling algorithm, and other subroutines necessary for power
flow computation.
Step 3: Output Solution. After the power flow evaluation, we can get the results: the final voltage
magnitude and phase angle at each bus under balanced three-phase steady-state conditions. Additionally,
as a by-product of this solution, real and reactive power flows in equipment such as transmission lines
and transformers, as well as equipment losses, can also be computed.

2.2 MATLAB Programming


The name MATLAB stands for MATrix LABoratory. MATLAB was written originally to provide easy access
to matrix software developed by the LINPACK (linear system package) and EISPACK (Eigen system package)
projects.
MATLAB is a high performance language for technical computing. It integrates computation, visualization,
and programming environment. Furthermore, MATLAB is a modern programming environment: it has
sophisticated data structures, contains built-in editing and debugging tools, and supports object-oriented
programming. These factors make MATLAB an excellent tool for teaching and research.
MATLAB has powerful built-in routines that enable a very wide variety of computations. It also has easy
to use graphics commands that make the visualization of results immediately available. Specific
applications are collected in packages referred to as toolbox. There are toolboxes for signal processing,
symbolic computation, control theory, simulation, optimization, and several other fields of applied science
and engineering. (Introduction to MATLAB for Engineering Students, David Houcque, v.1.2 Aug. 2005)

5|P age

STANDARD DATA STRUCTURES


The data files importing to MATLAB Simulation Program for LOAD FLOW ANALYSIS of 37-Bus System are
in a specific structure using an IEEE Common Data Format.
See (https://www.ee.washington.edu/research/pstca/formats/cdf.txt) for the partial description of the
IEEE Common Data Format for the exchange of solved load flow data.

Figure 3.1 Common Data Format for 37-Bus System

6|P age

POWER FLOW ALGORITHMS


The goal of power flow study is to obtain complete voltage angle and magnitude information for each bus
in a power system for specified load and generator real power and voltage conditions. Once this
information is known, real and reactive power flow on each branch as well as generator reactive power
output can be analytically determined. Due to the nonlinear nature of this problem, numerical methods
are employed to obtain a solution that is within an acceptable tolerance.
The solution to the power flow problem begins with identifying the known and unknown variables in the
system. The known and unknown variables are dependent on the type bus. A bus without any generators
connected to is called a Load Bus. With one exception, a bus with at least one generator connected to it
is called a Generator Bus. The exception is one arbitrarily-selected bus that has a generator. This bus is
referred to as the slack bus.
In the power flow problem, it is assumed that the real power PD and reactive power QD at each load Bus
are known. For this reason, Load Buses are also known as PQ Buses. For Generator Buses, it is assumed
that the real power generated PG and the voltage magnitude || is known. For the Slack Bus, it is assumed
that the voltage magnitude || and voltage phase are known. Therefore, for each Load Bus, both the
voltage magnitude and angle are unknown and must be solved for; for each Generator Bus, the voltage
angle must be solved for; there are no variables that must be solved for the Slack Bus. In a system with
buses and generators, there are then 2( 1) ( 1) unknowns.
In order to solve for the 2( 1) ( 1) unknowns, there must be 2( 1) ( 1) equations
that do not introduce any new unknown variables. The possible equations to use are power balance
equations, which can be written for real and reactive power for each bus. The real power balance equation
is:

0 = + | || |( cos + sin )
=1

where is the net power injected at bus , is the real part of the element in the bus admittance matrix
corresponding to the th row and the th column, is the imaginary part of the element in the
corresponding to the th row and th column and is the difference in voltage angle between the
th and th buses ( = ). The reactive power balance equation is:

0 = + | || |( sin cos )
=1

where is the net reactive power injected at bus .


7|P age

Equations included are the real and reactive power balance equations for each Load Bus and the real
power balance equation foe each Generator Bus. Only the real power balance equation is written for a
Generator Bus because the net reactive power injected is assumed to be unknown and therefore including
the reactive power balance equation would result in an additional unknown variable. For similar reasons,
there are no equations written for the Slack Bus.
In many transmission systems, the voltage angles are usually relatively small. There is thus a strong
coupling between real power and voltage angle, and between reactive power and voltage magnitude,
while the coupling between real power and voltage magnitude, as well as reactive power and voltage
angle, is weak. As a result, real power is usually transmitted from the bus with higher voltage angle to the
bus with lower voltage angle, and reactive power is usually transmitted form the bus with higher voltage
magnitude to the bus with lower voltage magnitude. However, this approximation does not hold when
the voltage angle is very large.

Newton-Raphson Solution Method


This method begins with initial guesses of all unknown variables (voltage magnitude and angles at Load
Buses and voltage angles at Generator Buses). Next, a Taylor Series is written, with the higher order terms
ignored, for each of the power balanced equations included in the system of equations. The result is a
linear system of equations that can be expressed as:
[

] = 1 [ ]

||

where and are called the mismatch equations:

= + | || |( cos + sin )
=1

= + | || |( sin cos )
=1

and is a matrix of partial derivatives known as

8|P age

The linearized system of equations is solved to determine the next guess ( + 1) of voltage magnitude
and angles based on:

+1 = +
||+1 = || + ||

The process continues until a stopping condition is met. A common stopping condition is to terminate if
the norm of the mismatch equations is below a specified tolerance.

Fast-decoupled Load Flow Technique


An important and useful property of power system is that the change in real power is primarily governed
by the charges in the voltage angles, but not in voltage magnitudes. On the other hand, the charges in the
reactive power are primarily influenced by the charges in voltage magnitudes, but not in the voltage
angles. Note the following facts:
(a) Under normal steady-state operation, the voltage magnitudes are all nearly equal to 1.0.
(b) As the transmission lines are mostly reactive, the conductances are quite small as compared to
susceptance ( ).
(c) Under normal steady-state operation the angular differences among the bus voltages are quite
small ( 0 ( 5 10)).
(d) The injected reactive power at any bus is always much less than the reactive power consumed by
the elements connected to this bus when these elements are shorted to the ground ( 2 ).

9|P age

With these facts at hand, re-visit the equations for Jacobian elements in Newton-Raphson method.

and are quite small and negligible and also cos( ) 1 and sin( ) 0, as [( )
0]. Hence,

Similarly,

10 | P a g e

Substituting equations,

depends only on and depends only on . Thus, there is a decoupling between and
relations.

Similarly,

11 | P a g e

Combining equations,

Matrix is a constant matrix having a dimension of ( 1) ( 1). Its elements are the negative of
the imaginary part of the element (, ) of the matrix where = 2,3, . . and = 2,3, . . .
Combining equations,

Other Power Flow Methods

Gauss-Seidel Method. This is the earliest devised method. It shows slower rates of convergence
compared to other iterative methods, but is uses very little memory and does not need to solve a
matrix system.

12 | P a g e

IEEE 37-BUS TEST SYSTEM


5.1 Formulation of the Solution Equations
A Newton iteration is performed by solving the system of equations

Pre-multiplying the equations by 1 and adding the resulting equations to the equations,

For equivalent matrices,

Submatrices and of the Jacobian matrix are the same matrices that appear in Taylor series
development of functions,

13 | P a g e

Decoupled procedures without any major approximations:

Coupling effect taken into account,

Consider the -th iteration of algorithm,

14 | P a g e

Consider the computation of the temporary angle vector,

Adding the two successive angle corrections,

Algorithms

Primal Algorithm
Applying the properties discussed above, matrix is the Jacobian submatrix computed at =
1 . . , = 0. As for matrix ", it is given by the equivalent matrix computed at flat start.

15 | P a g e

Dual Algorithm
Here matrix is given by the Jacobian submatrix computed at flat start. And as for matrix ,
it is given by the equivalent matrix computed at flat start.

Iteration Schemes
The standard iteration scheme allows for repeated and iterations. That is to say, after one of the
sub problems has converged, repeated iterations may be performed on the other sub problem, until
convergence is reached for both sub problems.

16 | P a g e

5.2 Methodology
5.2.1 Flowchart
Open
MATLAB Simulation Program for LOAD FLOW Analysis of 37-Bus System

Run
Machine_Problem_37Bus_Test_System.m

DATA PRE-PROCESSING

Import LINE DATA


ieee_cdf_37bus_input_data.txt

Initializing YBUS Matrix


ybus_matrix.m

EXECUTE ALGORITHMS

Iterations
Solving for the Temporary
Angle Corrections

Solving for the Temporary


Voltage Corrections

17 | P a g e

Solving for the Voltage


Corrections

Solving for the Angle


Corrections

Solving for the Additional


Angle Corrections

Solving for the Additional


Voltage Corrections

Power Flow Solutions

Computation for the Real


and Reactive Power of Slack
Bus and PV Buses

Computation for the Line


Power Flows, Losses and
Total System Loss

Write and Import the Output Data into a Standard Text File
ieee_cdf_37bus_output_data.txt

Initialize Bus Output Data

Initialize Branch Output Data

OUTPUT SOLUTION

END PROGRAM

18 | P a g e

5.2.2

Solution Steps
1. Open MATLAB Simulation Program for LOAD FLOW Analysis of 37-Bus System.

2. Run Machine_Problem_37Bus_Test_System.m file.

19 | P a g e

3. Data Pre-processing.
3.1. Input line data ieee_cdf_37bus_input_data.txt file.

20 | P a g e

fid = fopen('ieee_cdf_37bus_input_data.txt');
% Importing the LINE DATA
cdf_input=fgetl(fid); cdf_input=fgetl(fid);
Bus_Data=[]; Bus_Data1 =[]; No_of_Buses=0;
while ischar(cdf_input)
cdf_input=fgetl(fid);
%
disp(['#' cdf_input '#'] );
if(strcmp(cdf_input(1:4),'-999')==1); break; end
Line_String_Numeric=cdf_input(1:4);
Line_Numeric=str2num(Line_String_Numeric);
Bus_Data1=[Bus_Data1; [Line_Numeric] ];
index=15; Line_String_Numeric=cdf_input(index:end);
Line_Numeric=str2num(Line_String_Numeric);
No_of_Buses=No_of_Buses+1;
Bus_Data=[Bus_Data; [No_of_Buses Line_Numeric] ];
end
% Importing the LINE DATA
cdf_input=fgetl(fid);
Line_Data=[]; No_of_Lines=0;
while ischar(cdf_input)
cdf_input=fgetl(fid);
%
disp(['#' cdf_input '#'] );
if(strcmp(cdf_input(1:4),'-999')==1); break; end
index=1; Line_String_Numeric=cdf_input(index:end);
Line_Numeric=str2num(Line_String_Numeric);
No_of_Lines=No_of_Lines+1;
Line_Data=[Line_Data; [No_of_Lines Line_Numeric]];
end

3.2. Initializing the ybus matrix.


Bus_Data(:,19) = Bus_Data1;
Ybus = ybus_matrix(Line_Data);
% Initializing the Ybus matrix
BranchNo = Line_Data(:,1);
BranchType = Line_Data(:,7);
TxRatio = Line_Data(:,16);
TSide = Line_Data(:,15);
BranchNl = Line_Data(:,2);
BranchNr = Line_Data(:,3);
BranchR = Line_Data(:,8);
BranchX = Line_Data(:,9);
BranchB = Line_Data(:,10)/2;

%
%
%
%
%

From Bus Number


To Bus Number
Resistance of the Line, R
Reactance of the Line, X
Susceptance between 2 Buses, B

BusNReal = Bus_Data(:,19);
BusNo = Bus_Data(:,1);
BusType = Bus_Data(:,5);
BusV = Bus_Data(:,6);
BusAngle = Bus_Data(:,7)*3.1416/180;
BusLoadMW = Bus_Data(:,8)/100;

21 | P a g e

BusLoadMVAr = Bus_Data(:,9)/100;
BusGenMW = Bus_Data(:,10)/100;
BusGenMVAr = Bus_Data(:,11)/100;
BusInjMVAr = Bus_Data(:,16)/100;
tht = zeros(length(BusNo),1);
V = ones(length(BusNo),1);

4. Execute Algorithms.
4.1. Iterations.
4.1.1. Solving for the temporary angle corrections.
% Process 01: Solving for the Temporary Angle Corrections
mismatchP = dP(Px,Ybus,tht,V,BusNo,BusType,BusNReal);
H = jacobianH(Ybus,tht,V,BusNo,BusType,BusNReal);
A = H;
b = mismatchP;
n = length(A);
x = zeros(n,1);
% 1.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 1.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dthtH = x;
tht = cpcH_theta(tht,dthtH,BusNo,BusType);

22 | P a g e

4.1.2. Solving for the voltage corrections.


% Process 02: Solving for the Voltage Corrections
mismatchQ = dQ(Qx,Ybus,tht,V,BusNo,BusType,BusNReal,BusInjMVAr);
H = jacobianH(Ybus,tht,V,BusNo,BusType,BusNReal);
L = jacobianL(Ybus,tht,V,BusNo,BusType,BusNReal);
N = jacobianN(Ybus,tht,V,BusNo,BusType,BusNReal);
M = jacobianM(Ybus,tht,V,BusNo,BusType,BusNReal);
Leq = jacobianLeq(H,L,N,M);
A = Leq;
b = mismatchQ;
n = length(A);
x = zeros(n,1);
% 2.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 2.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dVLeq = x;
V = cpc_VLeq(V,dVLeq,BusNo,BusType);

23 | P a g e

4.1.3. Solving for the additional angle corrections.


% Process 03: Solving for the Additional Angle Corrections
H = jacobianH(Ybus,tht,V,BusNo,BusType,BusNReal);
N = jacobianN(Ybus,tht,V,BusNo,BusType,BusNReal);
NV = N*dVLeq;
A = H;
b = NV;
n = length(A);
x = zeros(n,1);
% 3.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 3.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dthtN = x*-1;
tht = cpcN_theta(tht,dthtN,BusNo,BusType);

24 | P a g e

4.1.4. Solving for the temporary voltage corrections.


% Process 04: Solving for the Temporary Voltage Corrections
mismatchQ = dQ(Qx,Ybus,tht,V,BusNo,BusType,BusNReal,BusInjMVAr);
L = jacobianL(Ybus,tht,V,BusNo,BusType,BusNReal);
A = L;
b = mismatchQ;
n = length(A);
x = zeros(n,1);
% 4.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 4.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dVL = x;
V = cpc_VL(V,dVL,BusNo,BusType);

25 | P a g e

4.1.5. Solving for the angle corrections.


% Process 05: Solving for the Angle Corrections
mismatchP = dP(Px,Ybus,tht,V,BusNo,BusType,BusNReal);
H = jacobianH(Ybus,tht,V,BusNo,BusType,BusNReal);
L = jacobianL(Ybus,tht,V,BusNo,BusType,BusNReal);
N = jacobianN(Ybus,tht,V,BusNo,BusType,BusNReal);
M = jacobianM(Ybus,tht,V,BusNo,BusType,BusNReal);
Heq = jacobianHeq(H,L,N,M);
A = Heq;
b = mismatchP;
n = length(A);
x = zeros(n,1);
% 5.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 5.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dthtHeq = x;
tht = cpcHeq_theta(tht,dthtHeq,BusNo,BusType);

26 | P a g e

4.1.6. Solving for the additional voltage corrections.


% Process 06: Solving for the Additional Voltage Corrections
L = jacobianL(Ybus,tht,V,BusNo,BusType,BusNReal);
M = jacobianM(Ybus,tht,V,BusNo,BusType,BusNReal);
MT = M*dthtHeq;
A = L;
b = MT;
n = length(A);
x = zeros(n,1);
% 6.1 Forward Elimination
for k = 1:n
mult = A(k,k);
for z = k:n
A(k,z) = A(k,z)/mult;
end
b(k) = b(k)/mult;
if k == n
continue
else
for z = k+1:n
mult = A(z,k);
for j = k:n
A(z,j) = A(z,j) - mult*A(k,j);
end
b(z) = b(z) - mult*b(k);
end
end
end
% 6.2 Backward Elimination
x(n) = b(n)/A(n,n);
for k = n-1:-1:1
sum = b(k);
for j = k+1:n
sum = sum - A(k,j)*x(j);
end
x(k) = sum/A(k,k);
end
dVK = x*-1;
V = cpc_VK(V,dVK,BusNo,BusType);
if (max(abs(dthtH))<EPS) && (max(abs(dVK))<EPS)
break
end
dVolt(:,(mench_cajiles + 1)) = zeros(nPQ,1);
dAngle(:,(mench_cajiles + 1)) = zeros((nPV+nPQ),1);
end

27 | P a g e

4.2. Power flow solutions.


4.2.1. Computation for the real and reactive power of slack bus and PV buses.
% Computation for the Real and Reactive Power of Slack Bus and PV Buses
P = P_powerSlack(Ybus,tht,V,BusNo,BusType,BusNReal);
Q = Q_powerPV(Ybus,tht,V,BusNo,BusType,BusNReal,BusLoadMVAr,BusInjMVAr);
thtDeg = tht*180/3.1416;

4.2.2. Computation for the line power flows, losses and total system loss.
% Computation for the Line Power Flows, Losses and Total System Loss
TotalSLoss = 0;
LineFlows =
power_flow(BranchNl,Line_Data,BusOutput,BusOutput1,BranchR,BranchX,BranchB);
% Calculation for the Total System Loss
for lassie = 1:length(LineFlows)
TotalSLoss = TotalSLoss + LineFlows(lassie,10);

5. Writing and importing of output data into a standard text file.


5.1. Initialize bus output data.
% Writing and Importing of the Output Data into a Standard Text File
% Opening File
fid = fopen('ieee_cdf_37bus_ouput_data','w','n');
% Initializing Bus Output Data
fprintf(fid,'\r\n
Power Flow Output Solution Using Decoupled Algorithm
Without Major Approximation\r\n');
fprintf(fid,'
No. of Iterations = %g',
mench_cajiles);
fprintf(fid,'\r\n
Bus Voltage Angle
------Load-------Generation--Injected');
fprintf(fid,'\r\n
No. Mag.
Degree
MW
Mvar
MW
Mvar
Mvar \r\n');
for hush = 1:length(BusNo)
fprintf(fid,'
%2g', BusOutput(hush,8)); fprintf(fid,' %7.3f',
BusOutput(hush,1));
fprintf(fid,' %8.3f', BusOutput(hush,2)); fprintf(fid,'%9.3f',
BusOutput(hush,3));
fprintf(fid,' %9.3f', BusOutput(hush,4)); fprintf(fid,' %9.3f',
BusOutput(hush,5));
fprintf(fid,' %9.3f ', BusOutput(hush,6));
fprintf(fid,' %8.3f\r\n',BusOutput(hush,7));
BusOutput(length(BusNo)+1,3) = BusOutput(length(BusNo)+1,3) +
BusOutput(hush,3);
BusOutput(length(BusNo)+1,4) = BusOutput(length(BusNo)+1,4) +
BusOutput(hush,4);
BusOutput(length(BusNo)+1,5) = BusOutput(length(BusNo)+1,5) +
BusOutput(hush,5);

28 | P a g e

BusOutput(length(BusNo)+1,6) = BusOutput(length(BusNo)+1,6) +
BusOutput(hush,6);
BusOutput(length(BusNo)+1,7) = BusOutput(length(BusNo)+1,7) +
BusOutput(hush,7);
end
fprintf(fid,'\r\n
Total
');
fprintf(fid,' %9.3f', BusOutput(length(BusNo)+1,3));
fprintf(fid,' %9.3f', BusOutput(length(BusNo)+1,4));
fprintf(fid,' %9.3f', BusOutput(length(BusNo)+1,5));
fprintf(fid,' %9.3f', BusOutput(length(BusNo)+1,6));
fprintf(fid,' %9.3f\n\n',BusOutput(length(BusNo)+1,7));

5.2. Initialize branch output data.


% Initializing Branch Output Data
fprintf(fid,'\r\n\r\n
Transmission Line Flow and
Loss\r\n');
fprintf(fid,'\r\n
Bus
Bus
Circuit
Power Flow
Power Flow
---Power Loss---');
fprintf(fid,'\r\n
nl.
nr.
no.
nl to nr
nr to nl
MW
Mvar \r\n');
for mocha = 1:length(BranchNl)
fprintf(fid,'
%2g', LineFlows(mocha,1)); fprintf(fid,'
%2g',
LineFlows(mocha,2));
fprintf(fid,'
%1g', LineFlows(mocha,3));
fprintf(fid,' %9.3f',real(LineFlows(mocha,8)));
if imag(LineFlows(mocha,8)) >= 0
fprintf(fid,'+j%.3f',imag(LineFlows(mocha,8)));
else
fprintf(fid,'-j%.3f',abs(imag(LineFlows(mocha,8))));
end
fprintf(fid,' %9.3f',real(LineFlows(mocha,9)));
if imag(LineFlows(mocha,9)) >= 0
fprintf(fid,'+j%.3f',imag(LineFlows(mocha,9)));
else
fprintf(fid,'-j%.3f',abs(imag(LineFlows(mocha,9))));
end
fprintf(fid,' %9.3f', real(LineFlows(mocha,10)));
fprintf(fid,' %9.3f\r\n', imag(LineFlows(mocha,10)));
end
fprintf(fid,'\r\n
Total System Losses: ');
fprintf(fid,'
%2.3f
%2.3f',real(TotalSLoss),imag(TotalSLoss));

29 | P a g e

6. Output solution.
% OPENING THE FILE
open('ieee_cdf_37bus_ouput_data')

30 | P a g e

5.3 Tabulation of Data


Power Flow Output Solution Using Decoupled Algorithm Without Major Approximation
Bus No.
Voltage
Angle
---- Load -------- Generation ---Injected
Magnitude
Degree
MW
Mvar
MW
Mvar
Mvar
1
1.024
-15.822
0.000
0.000
0.000
0.000
0.000
3
1.002
-20.102
12.300
5.000
0.000
0.000
0.000
5
1.004
-23.939
15.300
3.200
0.000
0.000
0.000
10
1.022
-20.129
16.800
2.500
0.000
0.000
0.000
12
1.020
-21.442
22.900
6.500
0.000
0.000
0.000
13
1.001
-21.965
21.200
6.800
0.000
0.000
4.800
14
1.003
-23.795
22.200
15.200
0.000
0.000
7.250
15
1.006
-22.437
58.200
36.300
0.000
0.000
12.760
16
1.003
-22.615
57.800
40.400
0.000
0.000
28.960
17
1.013
-22.179
32.800
12.900
0.000
0.000
15.890
18
0.997
-24.715
51.200
15.200
0.000
0.000
14.310
19
1.013
-21.811
18.300
5.000
0.000
0.000
0.000
20
1.011
-22.871
15.300
5.000
0.000
0.000
7.360
21
1.014
-23.078
37.200
13.400
0.000
0.000
0.000
24
1.003
-22.866
36.300
10.400
0.000
0.000
0.000
27
1.005
-22.568
19.500
7.800
0.000
0.000
0.000
28
1.030
-12.806
0.000
0.000
300.000
-1.154
0.000
29
1.025
-15.395
0.000
0.000
0.000
0.000
0.000
30
1.008
-19.013
23.400
6.200
0.000
0.000
0.000
31
1.030
-14.780
0.000
0.000
216.997
51.157
0.000
32
1.011
-18.498
0.000
0.000
0.000
0.000
0.000
33
1.016
-19.676
14.000
3.000
0.000
0.000
0.000
34
1.002
-24.087
44.620
0.000
0.000
0.000
0.000
35
1.025
-16.088
0.000
0.000
0.000
0.000
0.000
37
0.995
-24.749
33.400
9.600
0.000
0.000
0.000
38
1.025
-15.748
0.000
0.000
0.000
0.000
0.000
39
1.015
-18.077
0.000
0.000
0.000
0.000
0.000
40
1.003
-19.819
0.000
0.000
0.000
0.000
0.000
41
1.003
-20.158
0.000
0.000
0.000
0.000
0.000
44
1.020
-22.477
59.800
12.300
20.000
28.772
0.000
47
0.998
-20.473
0.000
0.000
0.000
0.000
0.000
48
1.020
-22.704
55.800
12.500
0.000
0.000
0.000
50
1.020
-20.816
14.100
2.000
42.090
1.675
0.000
53
1.002
-20.464
59.500
27.800
140.000
45.000
0.000
54
1.010
-22.338
12.430
5.730
106.080
6.358
0.000
55
0.990
-23.124
45.300
12.300
0.000
0.000
0.000
56
1.024
-15.918
14.000
3.700
0.000
0.000
0.000
Total

813.650

280.730

Table 1. Bus Output Data

31 | P a g e

825.167

131.808

91.420

Transmission Line Flow and Loss


Bus
nl.
1
1
3
3
5
5
10
10
10
12
12
12
12
12
13
14
14
15
15
15
15
15
16
17
18
18
20
20
20
21
21
24
28
28
29
30
30
31
31
32
33
33
35
35
35
39
39
39
39
44
44
47
48

32 | P a g e

Bus
nr.
40
31
40
41
18
44
13
39
19
27
40
40
17
18
55
44
34
54
54
54
24
16
27
19
37
37
50
48
34
48
48
44
29
29
41
41
32
38
28
29
50
32
56
39
31
47
40
38
38
41
41
53
54

Circuit
No.
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
3
2
1
1
1
1
1
2
1
1
1
1
2
1
1
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
2
1
1

Power Flow
nl to nr
1.154+j0.357
-1.154-j0.357
-0.137-j0.025
0.014.-j0.025
0.184+j0.017
-0.337-j0.049
0.455+j0.091
-0.933-j0.090
0.308-j0.026
0.296+j0.121
-0.707-j0.157
-0.707-j0.157
0.208+j0.052
0.676+0.077
0.236+0.056
-0.298-j0.071
0.076-j0.009
-0.434-j0.044
-0.434-j0.044
-0.438-j0.046
0.244-j0.044
0.480-j0.057
-0.099-j0.152
-0.121+0.082
0.166+0.022
0.168+0.024
-0.420+j0.129
-0.107-j0.120
0.373+j0.015
-0.186-j0.067
-0.186-j0.067
-0.120-j0.127
0.936+j0.116
0.936+j0.116
0.693+j0.083
0.468+j0.046
-0.702-j0.108
1.664+j0.315
-1.125-j0.090
-0.993-j0.036
0.149-j0.111
-0.289+0.081
-0.036+j0.015
0.510+j0.072
-0.474-j0.087
0.839+0.202
0.396+0.084
-0.837-j0.169
-0.836-j0.168
-0.571-j0.025
-0.597-j0.025
-0.146-j0.506
-0.060+j0.262

Power Flow
nr to nl
-1.153-j0.271
1.157+j0.188
0.137+j0.007
-0.014+j0.012
-0.183-j0.016
0.341+0.057
-0.448-j0.076
0.930+0.124
-0.304+0.033
-0.295-0.184
0.703+j0.179
0.703+j0.179
-0.207-j0.051
-0.664-j0.039
-0.235-j0.053
0.302+0.030
-0.076+0.008
0.436+0.023
0.436+j0.023
0.440+j0.026
-0.243+j0.023
-0.479+j0.038
0.100+0.106
0.121-j0.083
-0.166-j0.047
-0.168-j0.049
0.428-j0.115
0.107+j0.120
-0.370-j0.008
0.186+j0.60
0.187+j0.061
0.121+j0.128
-0.936-j0.073
-0.936-j0.073
-0.684-j0.061
-0.466-j0.049
0.703+j0.111
-1.662-j0.408
1.127-j0.243
1.003+j0.073
-0.148+j0.112
0.290-j0.075
0.036-j0.035
-0.507-j0.072
0.474+j0.098
-0.834-j0.179
-0.394-j0.093
0.825+j0.204
0.823+j0.204
0.566+j0.048
0.593+j0.050
0.147+j0.347
0.062-j0.336

--- Power Loss --MW


Mvar
-2.308
-0.628
-2.311
-0.546
0.274
-0.031
0.028
-0.037
0.367
0.033
-0.678
-0.106
0.903
0.168
1.863
0.214
0.613
-0.059
0.591
0.305
1.410
0.336
1.410
0.336
0.415
0.103
1.340
0.116
0.470
0.109
-0.601
-0.101
0.153
-0.017
-0.870
-0.067
-0.870
-0.067
-0.877
-0.072
0.487
-0.067
0.959
-0.095
-0.199
-0.258
-0.242
0.165
0.332
0.069
0.337
0.073
-0.847
0.244
-0.214
-0.240
0.743
0.023
-0.372
-0.127
-0.373
-0.128
-0.242
-0.256
-1.872
-0.189
-1.872
-0.189
1.377
0.144
0.934
0.095
-1.405
-0.219
3.325
0.723
-2.252
0.153
-1.995
-0.109
0.297
-0.223
0.579
-0.156
-0.071
0.050
1.017
0.144
0.948
0.185
1.673
0.381
0.790
0.177
1.662
0.373
1.659
0.372
1.137
0.073
1.190
0.075
-0.293
-0.854
-0.122
0.598

48
54
54
56

47
55
53
29

1
1
1
1

-0.980-j0.629
0.222+j0.071
-0.658+0.198
-0.176-j0.002

0.978+j0.685
-0.218-j0.070
0.658-j0.175
0.176-j0.011

Total System Loss:

1.958
0.440
1.316
-0.351

1.314
0.141
-0.374
0.009

11.211

2.084

Table 2. Branch Output Data

5.4 PowerWorld Simulator


The 37-bus, 9-generator, 57-line/transformer power system of PowerWorld Simulator Case Example
6_13 (Power System Analysis and Design 5th Edition by Glover, Sarma, & Overbye)

33 | P a g e

Taken into account the comparison of results. A close approximation of values with only three iterations
in MATLAB Simulation Program for Load Flow Analysis of 37-Bus System being compared to PowerWorld
Simulator Case Example 6_13 with a convergence tolerance of 0.1000 and maximum of iterations 50.

34 | P a g e

35 | P a g e

APPENDIX
References:
Hadi Saadat, Power System Analysis (2nd Edition), New York:McGraw-Hill, 2002.
J. Duncan Glover, Mulukutla S. Sarma, Thomas J. Overbye, Power System Analysis and Design (4th Edition),
Canada: Thomson Learning, 2012.
Monticelli, Garcia, and Saavedra, Fast Decoupled Load Flow: Hypothesis, Derivations, and Testing, IEEE
Transactions on Power Systems, Vol. 5, No. 4, Nov. 1990.
P.Srikanth, O. Rajendra, A.Yesuraj, M. Tilak, and K. Raja, Load Flow Analysis of IEEE 14 Bus System Using
MATLAB, International Journal of Engineering Research & Technology (IJET), Vol 2, Isuue 5, May 2013.
Online: Power Flow Study, https://en.wikipedia.org/wiki/Power-flow_study
David Houcque, Introduction to MATLAB for Engineering Students, v.1.2, Aug. 2005.
Mariesa L. Crow, Computational Methods for Electric Power Systems, Second Edition, 2009.

36 | P a g e

menchcajiles_2015

37 | P a g e

S-ar putea să vă placă și