Ticker

8/recent/ticker-posts

Solution of Load Flow by Gauss Seidel method without Q-limit Violation in MATLAB | PSS LAB | EEE

PROBLEM:

The system data for a load flow solution are given in the table. Determine the voltage at the end of first iteration by Gauss Seidel method.


 

Bus code

Admittance

Bus code

P

Q

V

Remark

    1-2

        2-j8

       1

       -

       -

    1.08

     slack

    1-3

        1-j4

       2

     0.5

     0.2

      -

       PQ

    2-3

    0.66-j2.6

       3

     0.4

     0.3

      -

       PQ

    2-4

        1-j4

      4

     0.3

     0.1

      -

       PQ

    3-4

        2-j8

      -

       -

       -

       -

         -

 




Theoretical Calculation:




MATLAB Program :

clc;                 

clear all;

nob=input('Enter the no. of buses = ');    

nol=input('Enter the no. of lines = '); 

inp=input('\nEnter send bus in 1st column, end bus in 2nd : ');

sb=inp(:,1);      %sending bus

eb=inp(:,2);      %ending bus

R=zeros(nol);

X=zeros(nol);

Z=zeros(nol);

 inp1=input('\nEnter R in 1st column, X in 2nd : ');

R=inp1(:,1);     

X=inp1(:,2);      

for i=1:nol

Z(i)=(R(i)+1j*X(i));

end 

Y=zeros(nob,nob);

for i=1:nol

a=sb(i);

b=eb(i);

Y(a,a)=Y(a,a)+(Z(i));

Y(b,b)=Y(b,b)+(Z(i));

Y(a,b)=-(Z(i));

Y(b,a)=Y(a,b);

end

disp('Y-Bus Matrix =');

disp(Y);        

inp2=input('\nEnter Voltage in 1st column, p in 2nd, q in 3rd: ');

vo=inp2(:,1);      

p=inp2(:,2);     

q=inp2(:,3);   

vn(1)=vo(1);  

for i=2:nob

    s1=0;

for j=1:i-1

       s1=s1+Y(i,j)*vn(j);

end

   s2=0;

for j=i+1:nob

       s2=s2+Y(i,j)*vo(j);

end

   vn(i)=(((p(i)-1j*q(i))/vo(i))-s1-s2)/Y(i,i);

   vacc(i)=vo(i)+a*(vn(i)-vo(i)); 

end

for i=1:nob

    fprintf('\nVoltage %d new =',i);

disp(vn(i));

fprintf('\nVoltage %d acc =',i);

disp(vacc(i));

end




MATLAB Output:




YouTube Video of My Channel on the Problem you can use this also






Disclaimer:

         In this video I missed Vacc 



( If you have any problem in doing this you can comment below  , I will help as soon as possible)

💗  Thanks For Visiting  💗

Post a Comment

2 Comments

  1. what about have one pv bus and two PQ bus

    ReplyDelete
    Replies
    1. Hi
      How to find voltage and angle for n atteration in This code?
      Thanks

      Delete