Documente Academic
Documente Profesional
Documente Cultură
CONTENTS
3
4
5
Title Page
Table of Contents
1
2
INTRODUCTION
1.1 Overview
1.2 Program Interface
3
3
PROGRAM DESIGN
4
5
6
7
13
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)
Simulation Program
Gauss-Seidel Algorithm
Newton-Raphson Algorithm
MATLAB Environment
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
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.
5|P age
6|P age
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
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.
] = 1 [ ]
||
= + | || |( cos + sin )
=1
= + | || |( sin cos )
=1
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.
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,
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
Pre-multiplying the equations by 1 and adding the resulting equations to the equations,
Submatrices and of the Jacobian matrix are the same matrices that appear in Taylor series
development of functions,
13 | P a g e
14 | P a g e
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
EXECUTE ALGORITHMS
Iterations
Solving for the Temporary
Angle Corrections
17 | P a g e
Write and Import the Output Data into a Standard Text File
ieee_cdf_37bus_output_data.txt
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.
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
%
%
%
%
%
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
23 | P a g e
24 | P a g e
25 | P a g e
26 | P a g e
27 | P a g e
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);
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));
29 | P a g e
6. Output solution.
% OPENING THE FILE
open('ieee_cdf_37bus_ouput_data')
30 | P a g e
813.650
280.730
31 | P a g e
825.167
131.808
91.420
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
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
1.958
0.440
1.316
-0.351
1.314
0.141
-0.374
0.009
11.211
2.084
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