0% found this document useful (0 votes)
37 views23 pages

PSS Lab Manual

Ev

Uploaded by

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

PSS Lab Manual

Ev

Uploaded by

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

Power System Simulation Lab

List of Experiments:

1. Matlab Program to find the Performance of Transmission Lines

2. Matlab Program to calculate String Efficiency

3. Matlab Program to calculate Ferranti effect

Matlab Program to form Y – Bus Matrix using Singular


4.
Transformation Method

5. Matlab Program to form Z – Bus Matrix

6. Matlab Program to find Load flow equations by Gauss-Seidel Method

Matlab Program to find Load flow equations by Fast De-coupled


7.
Method

8. Matlab Program to simulate Swing Equation

Matlab Program to find the Optimal loading of Generators neglecting


9.
Transmission Losses
Matlab Program to find the Optimal loading of generators with
10.
Penalty factors

TRANSMISSION LINES PERFORMANCE


SHORT LENGTH TRANSMISSION LINE

QUESTION:
A 50Hz, 3-Φ transmission line is 20KMs long. It has a total impedance of
(1.75+j7) Ω/KM and a shunt admittance of 46.5x10−6Mho/KM. It delivers
40000KW at 220KV with 90% power factor. Find sending end voltage,
regulation and efficiency and also A, B, Cand D constants by short line
approximation.

AIM: To compute a program for short length transmission line performance


using MATLAB.

PROGRAM:

%short transmission line performance


clear;
j=sqrt(-1);
l=input('line length:');
r=input('resistance of the line:');
r=r*l;
x=input('reactance of the line:');
x=x*l;
y=input('shunt admittance of the line:');
y=y*j*l;
z=r+j*x;
pr=input('receiving end power:');
pr=pr/3;
vr=input('receiving end voltage:');
vr=vr/sqrt(3);
pf=input('receiving end power factor:');
ir1=pr/(vr*pf);
a=1
b=z
c=0
d=1
m=acos(pf);
ir=ir1*cos(m)-j*ir1*sin(m);
vs=vr+ir*z
vs1=abs(vs)
reg=((vs1-vr)/vr)*100
eff=pr*100/(pr+((ir1^2)*r))

RESULT:

MEDIUM LENGTH TRANSMISSION LINE


QUESTION:

A 50Hz, 3-Φ transmission line is 80KMs long. It has a total series impedance of
(0.4375+1.75j) Ω/KM and a shunt admittance of 11.625x10−6Mho/KM. It
delivers 40MW at 220KV with 90% power factor. Find sending end voltage,
power,regulation, efficiency and also A, B, C, D constants by medium line
п-model approximation.
AIM: To compute a program for medium length transmission line performance
using MATLAB for both п-model and T-model.

PROGRAM:

%medium Length transmission line (pi-model) performance


clear;
j=sqrt(-1);
l=input('line length:');
r=input('resistance of the line:');
r=r*l;
x=input('reactance of the line:');
x=x*l;
y=input('shunt admittance of the line:');
y=y*j*l;
z=r+j*x;
pr=input('receiving end power:');
pr=pr/3;
vr=input('receiving end voltage:');
vr=vr/sqrt(3);
pf=input('receiving end power factor:');
ir1=pr/(vr*pf);
m=acos(pf);
ir=ir1*cos(m)-j*ir1*sin(m);
a=1+(y*z/2)
b=z
c=y*(1+(y*z/4))
d=a
vs=(a*vr)+(b*ir)
vs1=abs(vs);
is=(c*vr)+(d*ir)
is1=abs(is);
vrnl=abs(vs/a);
reg=((vrnl-vr)/vr)*100
spf=cos(angle(vs)-angle(is))
ps=3*vs1*is1*spf
eff=3*pr*100/(ps)
PROGRAM:

%medium Length transmission line (T-model) performance


clear;
j=sqrt(-1);
l=input('line length:');
r=input('resistance of the line:');
r=r*l;
x=input('reactance of the line:');
x=x*l;
y=input('shunt admittance of the line:');
y=y*j*l;
z=r+j*x;
pr=input('receiving end power:');
pr=pr/3;
vr=input('receiving end voltage:');
vr=vr/sqrt(3);
pf=input('receiving end power factor:');
ir1=pr/(vr*pf);
m=acos(pf);
ir=ir1*cos(m)-j*ir1*sin(m);
a=1+(y*z/2)
b=z*(1+(y*z/4))
c=y
d=a
vs=(a*vr)+(b*ir)
vs1=abs(vs);
is=(c*vr)+(d*ir)
is1=abs(is);
vrnl=abs(vs/a);
reg=((vrnl-vr)/vr)*100
spf=cos(angle(vs)-angle(is))
ps=3*vs1*is1*spf
eff=3*pr*100/(ps)

RESULT:
LONG LENGTH TRANSMISSION LINE

QUESTION:

A 50Hz, 3-Φ transmission line is 400KMs long. It has a total series impedance
of (0.0875+0.35j) Ω/KM and a shunt admittance of 2.325x 10−6Mho/KM. It
delivers 40MW at 220KV with 90% power factor. Find sending end voltage,
power,regulation, efficiency and also A, B, C, D constants by long line
approximation.

AIM: To compute a program for long length transmission line performance


using MATLAB.

PROGRAM:
%long length transmission line performance
clear;
j=sqrt(-1);
l=input('line length:');
r=input('resistance of the line:');
r=r*l;
x=input('reactance of the line:');
x=x*l;
y=input('shunt admittance of the line:');
y=y*j*l;
z=r+j*x;
pr=input('receiving end power:');
pr=pr/3;
vr=input('receiving end voltage:');
vr=vr/sqrt(3);
pf=input('receiving end power factor:');
ir1=pr/(vr*pf);
m=acos(pf);
ir=ir1*cos(m)-j*ir1*sin(m);
a=1+(y*z/2)
b=z*(1+(y*z/6))
c=y*(1+(y*z/6))
d=a
vs=(a*vr)+(b*ir)
vs1=abs(vs);
is=(c*vr)+(d*ir)
is1=abs(is);
vrnl=abs(vs/a);
reg=((vrnl-vr)/vr)*100
spf=cos(angle(vs)-angle(is))
ps=3*vs1*is1*spf
eff=3*pr*100/(ps)
RESULT:
STRING EFFICIENCY

QUESTION: Each conductor of 33KV, 3-phase system is suspended by a


string of ‘3’ similar insulators. Capacitor of each disc is ‘ 9’ times of
capacitance between tower and insulator. Calculate the voltage across each
insulator and string efficiency.

AIM: To compute a program for finding the string efficiency of a group of


insulators using MATLAB.

PROGRAM:

clear;
n=input('Enter the number of strings:');
m=input('ratio between mutual capacitance to shunt capacitance:');
v=input('operating voltage:');
a=zeros(n,n);
b=zeros(n,1);
v1=v/sqrt(3);
b(n,1)=v1;
for i=1: 1:n-1
for j=1: 1:n
if(i==j)
a(i,j)=1+m;
end
if(j==(i+1))
a(i,j)=-m;
end
if(i>j)
a(i,j)=1+m;
end
end
end
end
a(n,:)=1
x=inv(a)*b
streff=v1*100/(n*x(n,1))

RESULT:
FERRANTI EFFECT

QUESTION:

A 3-phase 50Hz transmission line is 5000Kms long. The line parameters are
R=0.125ohm/km, X=0.4ohm/km and Y=2.8*10^-6 mho/km. If the line is open
circuited with a receiving end voltage of 220Kv, find the rms value and phase
angle of the following. Use the receiving end line to neutral voltage as
reference.

a. The incident and reflected voltages to neutral at the receiving end


b. The incident and reflected voltages to neutral at 200km from the
receiving end.
c. The resultant voltage at 200km from the receiving end.

AIM:

To develop a matlab program to simulate Ferranti effect.


PROGRAM CODE:

clc
clear all
Vr=220e3/sqrt(3);
alpha=0.163e-3;
beta=1.068e-3;
l=5000;
k=1;
for i=0:10:l,
Vs=(Vr/2)*exp(alpha*i)*exp(j*beta*i)+(Vr/2)*exp(-alpha*i)*exp(-j*beta*i);
X(k)=real(Vs);
Y(k)=imag(Vs);
length(k)=i;
if(i==200)
disp(‘the sending end voltage at 200kms is’)
Vs
end
k=k+1;
end
plot(X,Y)
plot(length, X)
plot(length, Y)
plot(length, X, length, Y)

RESULTS :
YBUS USING SINGULAR TRANSFORMATION

QUESTION:

The following figure shows the one-line diagram of a simple four bus. The
shunt admittances are neglected. Find the Y-Bus matrix using “Singular
Transformation”.

AIM:

To develop a matlab program to obtain the simulation of ybus using singular


transformation.
PROGRAM CODE:

clc
clear all
ydata=[1 1 2 1/(0.05+j*0.15) 0 0
2 1 3 1/(0.1+j*0.30) 0 0
3 2 3 1/(0.15+j*0.45) 0 0
4 2 4 1/(0.10+j*0.30) 0 0
5 3 4 1/(0.05+j*0.15) 0 0];
elements=max(ydata(:,1));
yprimitive=zeros(elements,elements);
for i=1:elements,
yprimitive(i,i)=ydata(i,4);
if (ydata(i,5)~=0)
j=ydata(i,5);
ymutual=ydata(i,6);
yprimitive(i,j)=ymutual;
end
end
buses=max(max(real(ydata(2,:))),max(real(ydata(3,:))));
A=zeros(elements,buses);
for i=1:elements,
if ydata(i,2)~=0
A(i,ydata(i,2))=1;
end
if ydata(i,3)~=0
A(i,ydata(i,3))=-1;
end
end
YBUS=A'*yprimitive*A

RESULTS:
Z BUS MATRIX MODELING

AIM:

To develop a matlab program to obtain the simulation of ybus using singular


transformation.
PROGRAM CODE:

zdata1=[1 1 0 0.25
2 2 1 0.1
3 3 2 0.1
4 2 0 0.25
5 1 3 0.1];
[elements,columns]=size(zdata1);
zbus11=[];
currentbusno=0;
for count=1:elements
[rows,cols]=size(zbus11);
from=zdata1(count,2);
to=zdata1(count,3);
value=zdata1(count,4);
newbus=max(from,to);
ref=min(from,to);
if newbus>currentbusno&ref==0
zbus11=[zbus11 zeros(rows,1);zeros(1,cols) value]
currentbusno=newbus;
continue
end
if newbus>currentbusno&ref~=0
zbus11=[zbus11 zbus11(:,ref);zbus11(ref,:) value+zbus11(ref,ref)]
currentbusno=newbus;
continue
end
if newbus<=currentbusno&ref==0
zbus11=zbus11-
1/(zbus11(newbus,newbus)+value)*zbus11(:,newbus)*zbus11(newbus,:)
continue
end
if newbus<=currentbusno&ref~=0
zbus11=zbus11-1/(value+zbus11(from,from)+zbus11(to,to)-
2*zbus11(from,to))*((zbus11(:,from)-zbus11(:,to))*(zbus11(from,:)-
zbus11(to,:)))
continue
end
end
zbus1=j.*zbus11
RESULTS:
LOAD FLOW BY GAUSS SIEDEL METHOD
QUESTION:

Consider a simple power system. Values of real and reactive powers are listed
in table. All buses other than the slack bus are of pq type. Assuming a flat
voltage profile start, find the voltages at the end of first iteration using guass
siedel iteration.

Bus Pi(pu) Qi(pu) Vi(pu) Remarks


1 - - 1.04<0 Slack
2 0.5 -0.2 - PQ
3 -1.0 0.5 - PQ
4 0.3 -0.1 - PQ

AIM:

To develop a matlab program to obtain the load flow solution by Gauss-Siedel


method.
PROGRAM CODE:

clc
clear
n=4;
V=[1.04 1 1 1];
Y=[3-1j*9 -2+1j*6 -1+1j*3 0;
-2+1j*6 3.666-1j*1 1 -0.666+1j*2 -1+1i*3;
-1+1j*3 -0.666+1j*2 3.666-1j*11 -2+1j*6;
0 -1+1i*3 -2+1j*6 3-1j*9];
type=ones(n,1);
typechanged=zeros(n,1);
Qlimitmax=zeros(n,1);
Qlimitmin=zeros(n,1);
Vmagfixed=zeros(n,1);
type(2)=2;
Qlimitmax(2)=1.0;
Qlimitmin(2)=-0.2;
vmagfixed(2)=1.04;
diff=10;
noofitar=1;
Vprev=V;
while (diff>0.00001||noofitar==1);
abs(V);
abs(Vprev);
Vprev=V;
p=[inf 0.5 -1 0.3];
Q=[inf -0.3 0.5 -0.1];
s=[inf 0.5-1j*0.2 -1.0+1j*0.5 0.3-1j*0.1];
for i=2:n,
if type(i)==2||typechanged(i)==1,
if (Q(i)>Qlimitmax(i))||(Q(i)<Qlimitmin(i))
if(Q(i)<Qlimitmin(i))
Q(i)=Qlimitmin(i);
else
Q(i)=Qlimitmax(i);
end
type(i)=1;
typechanged(i)=1;
else
type(i)=2;
typechanged(i)=0;
end
end
sumyv=0;
for k=1:n;
if (i~=k)
sumyv=sumyv+Y(i,k)*V(k);
end
end
V(i)=(1/Y(i,i))*(((p(i)-1j*Q(i))/conj(V(i)))-sumyv);
end
diff=max(abs(abs(V(2:n))-abs(Vprev(2:n))));
if (noofitar==1)
disp(‘the voltages at the end of first iteration are’)
V
end
noofitar=noofitar+1;
end
disp(‘the total no. of iterations are’)
noofitar
disp('the bus voltages are')
V

RESULTS:
LOAD FLOW ANALYSIS BY FAST DE-COUPLED METHOD

AIM:

To develop a matlab program to obtain the load flow solution by Gauss-Siedel


method.
PROGRAM CODE:

Z=[ 1 2 0.05 0.15


1 3 0.10 0.30
2 3 0.15 0.45
2 4 0.10 0.30
3 4 0.05 0.15 ];
fb=Z(:,1);
tb=Z(:,2);
r=Z(:,3);
X=Z(:,4);
nbr=length(Z(:,1));
nbus=max(max(fb),max(tb));
Z=r+j*X;
y =ones(nbr,1)./Z;
Y =zeros(nbus,nbus);
for k=1:nbr
if fb(k)>0&tb(k)>0
Y(fb(k),tb(k))=Y(fb(k),tb(k))-y(k);
Y(tb(k),fb(k))=Y(fb(k),tb(k));
end
end
for n=1:nbus
for k=1:nbr
if fb(k)==n|tb(k)==n
Y(n,n)=Y(n,n)+y(k);
end
end
end
disp(Y)

busdata=[1 1.04 0.0 0.0 0


2 1.0 0.5 -0.2 0
3 1.0 -1.0 0.5 0];
bus=busdata(:,1);
v=busdata(:,2);
p=busdata(:,3);
q=busdata(:,4);
d=busdata(:,5);
nbus=max(bus);
vprev=v;
dprev=d;
ps=p;
qs=q;
toler=1;
iteration=0;
dp=zeros(nbus,1);
dq=zeros(nbus,1);
w=v(1,1);
b=imag(y);
while(toler>0.0001)
for i=2:nbus
sump=0;
sumq=0;
for k=1:nbus
sump=sump+(abs(v(i))*abs(v(k))*abs(y(i,k))*cos(angle(y(i,k))+(dprev(k))- (dprev(i))));
sumq=sumq-(abs(v(i))*abs(v(k))*abs(y(i,k))*sin(angle(y(i,k))+(dprev(k))- (dprev(i))));
end
p(i)=sump;
q(i)=sumq;
dp(i)=ps(i)-p(i);
dq(i)=qs(i)-q(i);
end
dp1=dp;
dq1=dq;
v1=v;
d1=d;
dp1(1,:)=[];
dq1(1,:)=[];
v1(1,:)=[];
d1(1,:)=[];
B=-(b(2:nbus,2:nbus));
da=inv(B)*(dp1./v1)
dv=inv(B)*(dq1./v1)
danew=[0;da];
dvnew=[0;dv];
v=v+dvnew
d=d+danew
iteration=iteration+1
toler=max(abs(dv))
end
v
d

RESULTS:
SWING EQUATION

QUESTION :

Consider a power system having : inertia constant of the machine 4, infinite bus
voltage 1, infinite generator voltage 1.35, reactance of the system after fault 0.6,
mechanical input to the generator prior to fault 0.8, initial value of delta 16, and
the time interval as 0.01. For this power system obtain the swing curve.
Comment on the system stability.

AIM:

To develop a matlab program to solve the given swing equation


PROGRAM CODE:

clc
clear all
m=input('enter the inertia constant of machine=');
v0=input('enter the infinite bus voltage=');
v1=input('enter the infinite generator voltage=');
xf=input('enter the reactance system after the fault=');
pm=input('enter the mechanical input to the generator prior to the fault=');
del0=input('enter the initial value of the delta=');
inte= input('enter the time interval=');
pmax=v1*v0/xf;
n1=50.0/inte;
n=round(n1);
d(1)=del0;
deld(1)=0;
for i=2:n+1
pa(i-1)=pm-pmax*(sin((2*pi)/360)*(d(i-1)));
deld(i)=deld(i-1)+((inte^2)*pa(i-1))/m;
d(i)=d(i-1)+deld(i);
end
t(1)=0;
for i=2:n+1
t(i)=t(i-1)+inte;
end
plot(t,d);
xlabel('time in seconds');
ylabel('delta in degrees');
title('solution of the swing equation');

RESULTS:
OPTIMAL LOADING OF GENERATORS NEGLECTING LOSSES

QUESTION:

Incremental fuel costs in rupees per MWh for a plant consisting of two units
are:

dF1/dP1 = 0.2P1+40 and dF2/dP2 = 0.25P2+30

Assume that both units are operating at all times and total load varies from
40MW to 250MW, and the maximum and minimum loads on each unit are to be
125MW and 20MW respectively. How will the load be shared between the two
units as the system load varies over full range? What are the corresponding
values of the plant incremental costs?

AIM :

To develop a matlab program to find out the optimal loading of generators


neglecting losses.
PROGRAM CODE:

clc
clear all
n=2;pd=231.25;alpha=[0.20 0.25];beta=[40 30];
%initial guess for lambda
lambda=20;lambdaprev=lambda;
%tolerance is eps ansd increment in lambda is delta lambda
eps=1;deltalambda=0.25;
%the minimum and maximum limits of each generating unit are stored in
%arrays pgmin and pgmax
pgmax=[125 125];pgmin=[20 20];pg=100*ones(n,1);
while abs(sum(pg)-pd)>eps
for i=1:n,
pg(i)=(lambda-beta(i))/alpha(i);
if pg(i)>pgmax(i)
pg(i)=pgmax(i);
end
end
if(sum(pg)-pd)<0
lambdaprev=lambda;
lambda=lambda+deltalambda;
else
lambdaprev=lambda;
lambda=lambda-deltalambda;
end
end
disp('the final value of lambda is')
lambdaprev
disp('the distributionof load shared by two units is')
pg

RESULTS:
OPTIMAL LOADING OF GENERATORS WITH PENALTY FACTORS

QUESTION:

Consider a two bus system. If 100MW is transmitted from plant 1 to the load, a
transmission loss of 10MW is incurred. Find the required generation for each
plant and the power received by load when the system £ is Rs.25/MWh. The
incremental fuel costs of the two plants are given below:

dC1/dPG1 = 0.02PG1+16.0 Rs/MWh

dC2/dPG2 = 0.04PG2+20.0 Rs/MWH

AIM:

To develop a matlab program to obtain the optimal loading of generators with


penalty factors.

PROGRAM CODE:

clear all
n=2;
pd=237.04;
alpha=[0.020
0.04];
beta=[16
20];
lamda=20;
lamdaprev=lamda;
eps=1;
deltalamda=0.25;
pgmax=[200 200];
pgmin=[0 0];
B=[0.001 0
0 0];
pg=zeros(n,1);
nootifer=0;
pl=0;
pg=zeros(n,1);
while abs(sum(pg)-pd-pl)>eps
for i=1:n,
sigma=B(i,:)*pg-B(i,i)*pg(i);
pg(i)=(1-(beta(i)/lamda)-(2*sigma))/(alpha(i)/lamda+2*B(i,i));
pl=pg'*B*pg;
if pg(i)>pgmax(i)
pg(i)=pgmax(i);
end
if pg(i)<pgmin(i)
pg(i)=pgmin(i);
end
end
pl=pg'*B*pg;
if(sum(pg)-pd-pl)<0
lamdaprev=lamda;
lamda=lamda+deltalamda;
else
lamdaprev=lamda;
lamda=lamda-deltalamda;
end
nootifer=nootifer+1;
pg;
end
disp('the no of iterations required are ')
nootifer
disp('the final value of lamda is')
lamdaprev
disp('theoptimal loading of generators including penalty factors is')
pg
disp('the losses are ')
pl

RESULT:

You might also like