Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Lab Session 7: Load Flow Analysis Ofa Power System Using Gauss Seidel Method in Matlab

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7
At a glance
Powered by AI
The passage discusses solving power flow problems using the Gauss-Seidel method in MATLAB and comparing results with and without using an acceleration factor.

The MATLAB code is solving a power flow problem using the Gauss-Seidel method to calculate voltages, line flows, losses and slack bus power.

The reactive power Q constraint placed on generator 2 is 0 ≤ Q2 ≤ 600 MVAR.

Lab Session 7

Load Flow Analysis ofA Power System Using Gauss Seidel Method In MATLAB

Development of a MATLAB program to solve power flow problems using Gauss Seidel method.

The reactive power Q constraint on generator 2 is 0 ≤ Q 2 ≤ 600MVAR. 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 flow chart or other program description.
3. A description on any special features.
4. A description of the output.

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

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

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


Description:

Voltage controlled bus also has a type in which some constraints can be given as is given in this
problem i.e.

0 ≤ Q2 ≤ 600

After calculations, if Q2 violates this limit, this means that voltage at bus 2 is either too high or
too low. The limit of maximum reactive power is due to the capacity of generator. If reactive
power is high, the field circuit of generator gets damaged. If reactive power is less than the given
minimum value, it means that the generator is not supplying enough reactive power to provide
required real power at given voltage. If any of this condition is violated, the bus is treated as load
bus or P-Q bus.

MATLAB Code:

Before using acceleration factor:


functionloadflow(nbranch,ref)
clc
if ref==0||ref==1
if ref==1
nbref=input('no of branches connected to the reference = ');
disp('enter line data')
for p=1:nbref
disp('from refernce bus :')
tb=input('to bus no. :');
tb=tb+1;
r=input('resistance of line =');
x=input('reactance of line =');
z = r + i*x;
y = 1./z;
Ldata(p,:)=[1 tb r x y];
end
else
nbref=0;
end
for p=1+nbref:nbranch
fb=input('from bus no. :');
tb=input('to bus no. :');
r=input('resistance of line =');
x=input('reactance of line =');
if ref==1
fb=fb+1;
tb=tb+1;
end
z = r + i*x;
y = 1./z;
Ldata(p,:)=[fbtb r x y];
end
fb = Ldata(:,1);
tb = Ldata(:,2);
r = Ldata(:,3);
x = Ldata(:,4);
y = Ldata(:,5);
nbus = max(max(fb),max(tb));
Y = zeros(nbus,nbus);

for k=1:nbranch
Y(fb(k),tb(k)) = Y(fb(k),tb(k))-y(k);
Y(tb(k),fb(k)) = Y(fb(k),tb(k));
end

for m =1:nbus
for n =1:nbranch
iffb(n) == m
Y(m,m) = Y(m,m) + y(n);
elseiftb(n) == m
Y(m,m) = Y(m,m) + y(n);
end
end
end
if ref==1
Y(1,:)=[];
Y(:,1)=[];
end
else

display('reference nodes cannot be more than 1')


end
iter=0;
V1=1;
V2o=1.05;
V3o=1;
P2=4;
while(1)
Q2o=-imag(conj(V2o)*(V1*Y(2,1)+V2o*Y(2,2)+V3o*Y(2,3)))
if Q2o<0
Q2=0
V2o=1;
V2n=(1/Y(2,2))*(((P2-Q2*i)/conj(V2o))-V1*Y(2,1)-V3o*Y(2,3));
V2n_mag=sqrt(real(V2n)*real(V2n)+imag(V2n)*imag(V2n));
V2n_angle=atan(imag(V2n)/real(V2n));
elseif
Q2o>6
Q2=6
V2o=1;
V2n=(1/Y(2,2))*(((P2-Q2*i)/conj(V2o))-V1*Y(2,1)-V3o*Y(2,3));
V2n_mag=sqrt(real(V2n)*real(V2n)+imag(V2n)*imag(V2n));
V2n_angle=atan(imag(V2n)/real(V2n));
else

V2n=(1/Y(2,2))*(((P2-Q2o*i)/conj(V2o))-V1*Y(2,1)-V3o*Y(2,3));
V2n_mag=sqrt(real(V2n)*real(V2n)+imag(V2n)*imag(V2n));
V2n_angle=atan(imag(V2n)/real(V2n));
V2n=1.05*cos(V2n_angle)+1.05*sin(V2n_angle)*i;
end
end

V3n=(1/Y(3,3))*(((-5+4i)/conj(V3o))-V1*Y(3,1)-V2n*Y(3,2));
iter=iter+1;
if (abs(V3n-V3o)<0.000001)
break;
elseif Q2o>=0&&Q2o<=6
V2o=V2n;
else
V2n_angle=atan(imag(V2n)/real(V2n));
V2o=1.05*cos(V2n_angle)+1.05*sin(V2n_angle)*i;
end
V3o=V3n;
end
end
no_of_iterations=iter
V2=V2n
V3=V3n

S1=conj(V1)*(V1*Y(1,1)+V2*Y(1,2)+V3*Y(1,3))*100
I12=(V1-V2)*(-40*i);
I21=-I12;
I13=(V1-V3)/(-20*i);
I31=-I13;
I23=(V2-V3)/(-20*i);
I32=-I23;

S12=V1*conj(I12)*100
S21=V2*conj(I21)*100
S13=V1*conj(I13)*100
S31=V3*conj(I31)*100
S23=V2*conj(I23)*100
S32=V3*conj(I32)*100

Ploss12=abs(abs(real(S12))-abs(real(S21)))
Qloss12=abs(abs(imag(S12))-abs(imag(S21)))
Ploss13=abs(abs(real(S13))-abs(real(S31)))
Qloss13=abs(abs(imag(S13))-abs(imag(S31)))
Ploss23=abs(abs(real(S23))-abs(real(S32)))
Qloss23=abs(abs(imag(S23))-abs(imag(S32)))
MATLAB Results:
s
w
Flo
e
Lin
Flow Chart:

Conclusion:

The main purpose of the Acceleration Factor is to speed up convergence. The proper choice of
acceleration factor reduces the number of iterations. But the improper selection can even lead the
solution to diverge instead of converging. This method is known as Accelerated Gauss Seidel
Method.

You might also like