Professional Documents
Culture Documents
Load Flow Analysis - Gauss-Seidel Method: Roll No.: 107119142 Name: Koshal Agrawal Experiment No.: 06
Load Flow Analysis - Gauss-Seidel Method: Roll No.: 107119142 Name: Koshal Agrawal Experiment No.: 06
Load Flow Analysis - Gauss-Seidel Method: Roll No.: 107119142 Name: Koshal Agrawal Experiment No.: 06
: 06
Question 1
1. Write a MATLAB code to analyse the power flow using the Gauss-Seidel Method for the system shown in Fig. 1. Take base
MVA as 100 MVA. Perform iterations till a tolerance of 𝜀 = 0.0001 is reached. The final results should display the following
MATLAB Code:
% Implemented matrix based on Given Values
A = [1 2 0.05i;
1 3 0.025i;
2 3 0.025i];
n = max(A(:,2)); % No of Buses
l = numel(A(:,1));
for q = 1:l
f = A(q,1);
t = A(q,2);
X = A(q,3);
% Algorithm Part
val2=1;
val3=1;
while(val2 > 0.0001 && val3 > 0.0001)
Q2 = -imag(conj(V2) * ((Ybus(2, 1)*V1) + (Ybus(2, 2)*V2) + (Ybus(2, 3)*V3)));
oldV2 = V2;
V2 = (1/Ybus(2, 2)) * (((complex(P2, -Q2))/conj(oldV2)) - Ybus(2, 1)*V1 - Ybus(2, 3)*V3);
V2 = modV2 * exp(1i*angle(V2));
val2 = abs(V2 - oldV2);
oldV3 = V3;
V3 = (1/Ybus(3, 3)) * (((complex(-P3, Q3))/conj(oldV3)) - Ybus(3, 1) * V1-Ybus(3, 2)*V2);
val3 = abs(V3 - oldV3);
end
%Output
fprintf("1. The bus voltages:\n");
fprintf(" a)Bus 1: %f<%f V\n", abs(V1), angle(V1));
fprintf(" b)Bus 2: %f<%f V\n", abs(V2), angle(V2));
fprintf(" c)Bus 3: %f<%f V\n", abs(V3), angle(V3));
fprintf("\n")
Observations:
In the Gauss method, we assume the voltage for all the buses except the slack bus where the voltage
magnitude and phase angle are specified and remain fixed.
Normally, we assume the voltage magnitude and phase angle of these buses are equal to that of the slack bus
and work in a per-unit system.
In the case of the Gauss-Seidel method, the value of bus voltages calculated for any bus immediately replace
the previous values in the next step while in the case of the Gauss method, the calculated bus voltages replace
the earlier value only at the end of the iteration. Due to this Gauss-Seidel method converges much faster than
that of the Gauss method compared to the Gauss method.
Question 2
For the same system, if a capacitor bank of rating 100 Mvar is added at bus 2, analyse the load flow and
comment on the results obtained
MATLAB Code:
% Implemented matrix based on Given Values
A = [1 2 0.05i;
1 3 0.025i;
2 3 0.025i];
n = max(A(:,2)); % No of Buses
l = numel(A(:,1));
for q = 1:l
f = A(q,1);
t = A(q,2);
X = A(q,3);
% Algorithm Part
val2=1;
val3=1;
while(val2 > 0.0001 && val3 > 0.0001)
Q2 = -imag(conj(V2) * ((Ybus(2, 1)*V1) + (Ybus(2, 2)*V2) + (Ybus(2, 3)*V3)));
oldV2 = V2;
EELR17 Power Systems Laboratory 3
V2 = (1/Ybus(2, 2)) * (((complex(P2, -Q2))/conj(oldV2)) - Ybus(2, 1)*V1 - Ybus(2, 3)*V3);
V2 = modV2 * exp(1i*angle(V2));
val2 = abs(V2 - oldV2);
oldV3 = V3;
V3 = (1/Ybus(3, 3)) * (((complex(-P3, Q3))/conj(oldV3)) - Ybus(3, 1) * V1-Ybus(3, 2)*V2);
val3 = abs(V3 - oldV3);
end
%Output
fprintf("1. The bus voltages:\n");
fprintf(" a)Bus 1: %f<%f V\n", abs(V1), angle(V1));
fprintf(" b)Bus 2: %f<%f V\n", abs(V2), angle(V2));
fprintf(" c)Bus 3: %f<%f V\n", abs(V3), angle(V3));
fprintf("\n")
MATLAB Output:
Observations:
In the Gauss method, we assume the voltage for all the buses except the slack bus where the voltage
magnitude and phase angle are specified and remain fixed.
Normally, we assume the voltage magnitude and phase angle of these buses are equal to that of the slack bus
and work in a per-unit system.
In the case of the Gauss-Seidel method, the value of bus voltages calculated for any bus immediately replace
the previous values in the next step while in the case of the Gauss method, the calculated bus voltages replace
EELR17 Power Systems Laboratory 4
the earlier value only at the end of the iteration. Due to this Gauss-Seidel method converges much faster than
that of the Gauss method compared to the Gauss method.