Experiment No 8
Experiment No 8
Problem: Single line diagram of a system is given below. Using Gauss-Seidel Method
determine the phasor values of the voltage at buses 2 and 3.
1 1.03 0 0 0 0 0
2 1.02 0.8 0 0.4 0.3 0
3 1 0 0 1 0.8 0
MATLAB CODE:
clc; % clear command window
clear all; % clear Workspace
cd('E:\semester\6 TH SEMESTER\main\fatin\Power System I');
% Change current directory
for k1=1:k-1
I1(1,k)=I1(1,k)+Y(k,k1)*V(d,k1);
% BUS(1 to k-1 ) has d iteration voltage,
% We use this updated (d) value
end
for k1=k+1:n
I1(1,k)=I1(1,k)+Y(k,k1)*V(d-1,k1);
% BUS(k+1 to n ) has not d iteration voltage,
% We use the old(d-1) value,here k1 is not k
end
V(d,k)=(conj(S(1,k)/V(d-1,k))-I1(1,k))/Y(k,k);
% Gauss-Seidel Iterative Voltage
if(Pg(k) ~=0)
V(d,k)=V(1,k)*exp(i*angle(V(d,k)));
% For Generator BUS, Magnitude of V is Fixed
% only angle is iterated
end
end
%_____________For Error Checking_______
noerror=1; % Let, initially no error
for k=2:n
if(Pg(k) ~=0)
% For gen, check (|angle difference|<tol)
noerror=noerror && ((abs(rad2deg(angle(V(d,k))-
angle(V(d-1,k)))))<tol);
elseif((Pg(k)==0) && (Qg(k)==0))
% For load, check (|magnitude difference|<tol)
% and (|angle difference|<tol)
noerror=noerror && ((abs(abs(V(d,k))-abs(V(d-
1,k))))<tol) && ((abs(rad2deg(angle(V(d,k))-angle(V(d-
1,k)))))<tol);
end
end
% Here, if all above difference < tol; noerror=1
% program enter into following if condition and
% iteration break. Otherwise iteration continues
if (noerror)
break;
end
end
%_____For Showing Output____
for k=1:n
disp(['Voltage of BUS ',num2str(k),': ',
num2str(abs(V(d,k))),' Angle= ',
num2str(rad2deg(angle(V(d,k))))]);
end
Excel File:
EXPNO5_1.xlsx
BUS 1 BUS 2 R X
1 2 0.05 0.25
1 3 0.04 0.2
2 3 0.03 0.15
EXPNO5_2.xlsx
OUTPUT:
This Problem is 3 Bus System
The Admittance Matrix is:
Y =
Iteration: 500
Voltage of BUS 1: 1.03 Angle= 0
Voltage of BUS 2: 1.02 Angle= -1.4954
Voltage of BUS 3: 0.929 Angle= -5.1907
Conclusion:
We can analysis load flow study analysis by Gauss-Seidel using MATLAB very easily.