LOAD FLOW ANALYSIS USING GAUSS- SEIDEL METHOD



Our aim from this coding is to determine and verify load flow solution by gauss-seidel method using MATLAB. 

The gauss-seidel method is an iterative algorithm for solving a set of non linear load flow equations. The process of computing all the bus voltages is called one iteration, the iterative process is then repeated till the bus voltage converges with in prescribed accuracy. The converges of bus voltage is quite sensitive to the initial values assumed. Based on practical experiences it is easier to get a set of initial voltages very close to final solution. To compute the (k+1)th iteration value of the bus –p voltage, the (k+1)th iteration values of voltages are used for all buses less than p and kth iteration values of voltages are used for all buses greater than or equal to p.
It is important to note that the slack bus is a reference bus and so its voltage will not change therefore in each iteration the slack bus voltage is not modified. For generator bus, the reactive power is not refer specified .thee in order to calculate the phase of bus voltage of a generator bus.  

ALGORITHM
1.        Assume a flat voltage profile 1+j0 for all buses (nodes)except the slack bus. The voltage slack bus is the specified voltage. It is not modified in any iteration.
2.        Assume a suitable value of e called convergence criterion. Here e is a specified change in bus voltage between kth and (k+1)th iteration.
3.        Set iteration count k=0. Voltage profile of the buses are denoted as   V10, V20, V30,..Vn0 except slack bus.
4.        Set bus count, p=1.
5.        Check for slack bus. If it is a slack bus, go to step 12. Otherwise go to next step.
6.        Check for generator bus. If it is generator bus go to next step. Otherwise go to step 9.
7.        Temporarily set Vpk = Vp,spec  and phase of Vpk as the kth iteration value if the bus Pis a generator bus using the following equation. The calculated reactive power may be within the limits or it may violate the limits.

If the calculated reactive power is within the limits then consider this bus as a generator bus, set Q for this iteration, and go to step 8.
If the calculated reactive power violates the specified limit for reactive power then treat this as load bus. The magnitude of the reactive power at this bus will correspond to the limit it has violated.
Qpk+1 < Qp,min then Qp=Qp,min
Qpk+1 < Qp,max then Qp=Qp,max
Since the bus is treated as load bus, take actual value of Vpk for (k+1)th iteration Vpk need not be replaced by Vpk spec when the generator bus is treated as load bus. Go to step 9.
8.        For generator bus the magnitude of voltage does not change and so for all iterations the magnitude of bus voltage is the specified value.
9.        Solve the voltage equation for bus P (find Vpk+1).
10.    Calculate ∆Vpk = Vpk+1 – Vpk.
11.    Find the value Vpk+1acc.
12.    Increment the bus count p by one.
13.    Calculate the bus voltages for all buses except slack bus(p=2,3,…,n).
14.    Repeat the iterative process until ∆Vp for all the buses are within a specified limit e.


PROGRAM:
%Gauss Sedial
clc;
data=[1    1    2    10-j*20
            2    1    3    10-j*30
            3    2    3    16-j*32]
elements=max(data(:,1));
bus=max(max(data(:,2)),max(data(:,3)));
y=zeros(bus,bus);
for p=1:bus,
for q=1:elements,
if(data(q,2)==p|data(q,3)==p)
y(p,p)=y(p,p)+data(q,4);
end
end
end
for p=1:bus,
for q=1:bus,
if (p~=q)
for r=1:elements
if((data(r,2)==p&data(r,3)==q)|(data(r,2)==q&data(r,3)==p))
y(p,q)=-(data(r,4));
end
end
end
end
end
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');
p2=(a1/pu);
q2=(b1/pu);
p3=(a2/pu);
q3=(b2/pu);
dx1=1+j*0;
dx2=1+j*0;
v1=1.05;
v2=1+j*0;
v3=1+j*0;
iter=0;
disp('iter v2 v3');
while(abs(dx1)&abs(dx2)>=0.00001)&iter<7;
iter=iter+1;
g1=(((p2-j*q2)/conj(v2))+(-y(1,2)*v1)+(-y(2,3)*v3))/y(2,2);
g2=(((p3-j*q3)/conj(v3))+(-y(1,3)*v1)+(-y(2,3)*g1))/y(3,3);
dx1=g1-v2;
dx2=g2-v3;
v2=v2+dx1;
v3=v3+dx2;
fprintf ('%g',iter),disp([v2,v3]);
end

Share This Post →

No comments:

Post a Comment

Don't forget to share this with this your friends....

For quires feel free to mail us at "howtousematlab@gmail.com"

Powered By Blogger |   Designed By Blogger Templates
DMCA.com