0% found this document useful (0 votes)
31 views4 pages

502 Lab 6

Uploaded by

Muhammad Ans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

502 Lab 6

Uploaded by

Muhammad Ans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

LAB # 06

LOAD FLOW ANALYSIS OF A POWER SYSTEM USING GAUSS SEIDEL


METHOD IN MATLAB
This exercise concerns the development of a MATLAB program to solve power flow problems using Gauss
Seidel method.

Calculate voltages at bus 2 and 3. Determine the line flows and line losses and the slack bus real and reactive
power. Line impedances are marked in per unit on a 100 MVA base. Use an accuracy factor of 0.00001.

Your report should consist of:

A. Brief introductory comments on your solution.


B. A flowchart or other program description.
C. A description of any special features.
D. A description of the output.

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

Introduction:
This MATLAB lab equips us with skills for analyzing power systems. We'll focus on load flow analysis,
which is crucial for understanding voltage and power flow throughout the network. We'll build a program
that uses the Gauss-Seidel method to analyze a sample system. The program will calculate voltage at key
points (buses) and determine how much real and reactive power flows on each line. While this version
doesn't calculate line losses or slack bus power, it provides a solid foundation for further exploration.

Through this lab, we'll gain hands-on experience with the Gauss-Seidel method for power flow analysis in
MATLAB. We'll also learn to interpret the results, including voltage levels and the direction of power flow
within the system. This practical approach prepares us to analyze and assess power system behavior.
MATLAB Code

%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
Results
Flowchart

Input Data and


Initialize

Build Bus
End Admittance Matrix
(Ybus)

Convergence Iteretative Loop


Check (Gauss-Seidel)

You might also like