Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
17 views6 pages

502 Lab 7

Uploaded by

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

502 Lab 7

Uploaded by

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

LAB # 07

LOAD FLOW ANALYSIS OF A POWER SYSTEM HAVING REACTIVE


POWER CONSTRAINTS IN MATLAB
This exercise concerns the development of a MATLAB program to solve power flow problems using Gauss
Seidel method. This

The reactive power constraint on generator 2 is 0≤ Q2 ≤600 Mvar. Calculate voltage at bus 3. Determine
the line flows and line losses and the slack bus real and reactive power. Line admittances are marked in per
unit on a 100 MVA base. Use an accuracy factor of 0.000001.

Your report should consist of:

1. Brief introductory comments on your solution.


2. A flowchart or other program description.
3. A description of any special features.
4. A description of the output.

Construct a power flow diagram and show the direction of the line flows.

Now consider an acceleration factor α = 1.6 and repeat the above problem.

Compare the two methods on the basis of no. of iterations required.


Introduction
This laboratory exercise focuses on load flow analysis in power systems, presenting a unique challenge:
incorporating reactive power limitations on generators. Participants will develop a MATLAB program
utilizing the Gauss-Seidel method to analyze a sample power system where Generator 2's reactive power
output is restricted. The program's objectives include determining voltages at key buses within the system,
computing real and reactive power flows on each line segment, estimating line losses, and identifying the
power supplied by the slack bus (generator).

To investigate how convergence speed may be affected, two approaches will be compared: the standard
Gauss-Seidel method and one incorporating an acceleration factor. This hands-on activity provides valuable
experience in analyzing power systems with generator constraints. Participants will gain insights into how
control strategies can influence the convergence behavior of iterative methods like Gauss-Seidel.

Furthermore, participants will learn to interpret load flow analysis results, including voltage profiles, power
flows, and the implications of reactive power constraints. By engaging in this exercise, they will enhance
their understanding of power system operation and the significance of addressing generator limitations in
system analysis.

Main Objectives:
 Implement the Gauss-Seidel method in MATLAB to solve load flow for a system with a reactive
power constraint.

 Calculate the voltage magnitude and angle at bus 3.

 Determine the real and reactive power flows on each line.

 Calculate the line losses and the real and reactive power supplied by the slack bus (generator
bus).

 Analyze the impact of an acceleration factor (α) on the convergence speed of the Gauss-Seidel
method.

MATLAB code
% Take user input for line admittances
Y12_real = input('Enter real part of admittance between Bus 1 and Bus 2: ');
Y12_imag = input('Enter imaginary part of admittance between Bus 1 and Bus
2: ');
Y12 = Y12_real + 1i * Y12_imag;

Y13_real = input('Enter real part of admittance between Bus 1 and Bus 3: ');
Y13_imag = input('Enter imaginary part of admittance between Bus 1 and Bus
3: ');
Y13 = Y13_real + 1i * Y13_imag;

Y23_real = input('Enter real part of admittance between Bus 2 and Bus 3: ');
Y23_imag = input('Enter imaginary part of admittance between Bus 2 and Bus
3: ');
Y23 = Y23_real + 1i * Y23_imag;

% Given voltages
v1 = 1.05;
v2 = 1 + 1i * 0;
v3 = 1 + 1i * 0;

% Formulate the Y-bus matrix


Ybus = [Y12 + Y13, -Y12, -Y13; -Y12, Y12 + Y23, -Y23; -Y13, -Y23, Y13 +
Y23];

% Display the Y-bus matrix


disp('Y-bus matrix:');
disp(Ybus);

% Input power values in MW


a1 = input('Enter p2 in MW: ');
b1 = input('Enter q2 in MVAR: ');
a2 = input('Enter p3 in MW: ');
b2 = input('Enter q3 in MVAR: ');
pu = input('Enter the base value in MVA: ');

% Convert power to per unit (pu)


p2 = (-a1 / pu);
q2 = (-b1 / pu);
p3 = (-a2 / pu);
q3 = (-b2 / pu);

disp(['p2 = ', num2str(p2)]);


disp(['q2 = ', num2str(q2)]);
disp(['p3 = ', num2str(p3)]);
disp(['q3 = ', num2str(q3)]);

% Initialize arrays to store results


V2 = v2;
V3 = v3;

% Convergence criterion
tolerance = 0.00001;

% Initialize acceleration factor


acceleration_factor = 1.6;

% ITERATIONS
for i = 1:1000 % Set a maximum limit for safety
V2_new = (1 / (Y23 + Y12)) * (((p2 - 1i*q2) / conj(V2)) - (-Y12*v1) - (-
Y23*v3));
V3_new = (1 / (Y13 + Y23)) * (((p3 - 1i*q3) / conj(V3)) - (-Y13*v1) - (-
Y23*v2));

% Accelerated Gauss-Seidel
V2_new = V2 + acceleration_factor * (V2_new - V2);
V3_new = V3 + acceleration_factor * (V3_new - V3);

% Check convergence
if abs(V2_new - V2) < tolerance && abs(V3_new - V3) < tolerance
disp(['Converged after ', num2str(i), ' iterations.']);
break;
end

% Update for next iteration


V2 = V2_new;
V3 = V3_new;
end

% Display final results


disp(['V2: ', num2str(V2)]);
disp(['V3: ', num2str(V3)]);
disp(['V2_Phasor = ', num2str(abs(V2)), ' ', num2str(angle(V2)*180/pi), '
degrees']);
disp(['V3_Phasor = ', num2str(abs(V3)), ' ', num2str(angle(V3)*180/pi), '
degrees']);

% Calculate line flows and losses (if needed)


S12 = v1 * conj(Y12 * (v1 - V2));
S13 = v1 * conj(Y13 * (v1 - V3));
S21 = V2 * conj(Y12 * (V2 - v1));
S23 = V2 * conj(Y23 * (V2 - V3));
S31 = V3 * conj(Y13 * (V3 - v1));
S32 = V3 * conj(Y23 * (V3 - V2));
% Calculate line losses
Loss12 = S12 + S21;
Loss13 = S13 + S31;
Loss23 = S23 + S32;
% Calculate slack bus real and reactive power
P1 = real(S12 + S13) + real(Loss12 + Loss13);
Q1 = imag(S12 + S13) + imag(Loss12 + Loss13);
% Display the results
disp(['Line Flows: S12 = ' num2str(S12) ', S13 = ' num2str(S13) ', S21 = '
num2str(S21) ', S23 = ' num2str(S23) ', S31 = ' num2str(S31) ', S32 = '
num2str(S32)]);
disp(['Line Losses: Loss12 = ' num2str(Loss12) ', Loss13 = ' num2str(Loss13)
', Loss23 = ' num2str(Loss23)]);
disp(['Slack Bus Real and Reactive Power: P1 q= ' num2str(P1) ', Q1 = '
num2str(Q1)]);
Result

Flow Chart

Build Y-bus Accceltrative


Input Data
Matrix Factor

Iterative Loop Convergence Output


(Gauss-Seidel) Check Results

You might also like