0% found this document useful (0 votes)
441 views179 pages

Power System Simulation Lab Report

Here are the key steps to model transmission lines in MATLAB: 1. Define the line parameters: resistance R, inductance L, capacitance C, and conductance G per unit length. 2. Calculate the ABCD parameters based on the line type (short, medium, long) using appropriate formulas. 3. Define the sending and receiving end voltages (Vs and Vr) and currents (Is and Ir). 4. Use the ABCD parameters and voltage/current definitions to write the transmission line equations in matrix form: [Vs] [A B] [Vr] [Is] = [C D] [Ir] 5. Solve the matrix equation numerically to obtain the

Uploaded by

venkatesh c
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)
441 views179 pages

Power System Simulation Lab Report

Here are the key steps to model transmission lines in MATLAB: 1. Define the line parameters: resistance R, inductance L, capacitance C, and conductance G per unit length. 2. Calculate the ABCD parameters based on the line type (short, medium, long) using appropriate formulas. 3. Define the sending and receiving end voltages (Vs and Vr) and currents (Is and Ir). 4. Use the ABCD parameters and voltage/current definitions to write the transmission line equations in matrix form: [Vs] [A B] [Vr] [Is] = [C D] [Ir] 5. Solve the matrix equation numerically to obtain the

Uploaded by

venkatesh c
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

MOHAMED SATHAK

A.J COLLEGE OF ENGINEERING


(Approved by AICTE, New Delhi and Affiliated to Anna University)
34, Old Mahabalipuram Road, Egattur, Chennai – 603 103.

ISO 9001: 2008 Certified Institution

Sponsored By: MOHAMMED SATHAK TRUST, Chennai – 600 034.

(ACADEMIC YEAR: 2020-2021)

EE 8711 - POWER SYSTEM SIMULATION LABORATORY

Name :

Register Number :

Department : Electrical and Electronics Engineering

Year / Semester : IV Year / VII Semester

(ANNA UNIVERSITY: CHENNAI - 600 025)


MOHAMED SATHAK
A.J COLLEGE OF ENGINEERING
(Approved by AICTE, New Delhi and Affiliated to Anna University)
34, Old Mahabalipuram Road, Egattur, Chennai – 603 103.

ISO 9001: 2008 Certified Institution

Sponsored By: MOHAMMED SATHAK TRUST, Chennai – 600 034.

Register Number

BONAFIDE CERTIFICATE

It is Certify that this is a Bonafide record of work done by


Mr. / Ms.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . of IV YEAR
B.E / [Link] ELECTRICAL AND ELECTRONICS ENGINEERING
in the EE8711 – POWER SYSTEM SIMULATION LABORATORY
during the academic year 2020-2021.

Staff In-Charge Head of the Department

Submitted for the Anna University B.E / [Link] Practical


Examination held on . . . . . . . . . . . . . . . . .

Internal Examiner External Examiner


INDEX

E. Page
Date Name of the Experiment Marks Initial
No No.

1 Computation of Parameters

2 Modeling of Transmission Lines


Formation of Bus Admittance Matrices
3
and Solution of Networks
4 Formation of Bus Impedance Matrices
Load Flow Analysis By Gauss – Seidal
5
Method
Load Flow Analysis By Newton -
6
Raphson Method
7 Fault Analysis
Transient and Small Signal Stability
8 Analysis – Single Machine Infinite Bus
System
Load Flow Analysis of Large System for
9 Different Load Condition Using
MATLAB Software
Electromagnetic Transients in Power
10
Systems
Load – Frequency Dynamics of Single-
11
Area Power Systems
Load – Frequency Dynamics of Multi-
12
Area Power Systems

13 Economic Dispatch in Power Systems


Small Signal Stability Analysis in Single-
14 Machine Infinite Bus System Using
MATLAB
Transient Analysis of Single Machine
15
Infinite Bus System With SSSC Controller
MSAJCE EE8711 - Power System Simulation Lab

[Link]
DATE:

COMPUTATION OF PARAMETERS
AIM:

To determine the positive sequence line parameters L and C per phase per kilometer of a
single phase, three phase single and double circuit transmission lines for different conductor
arrangements.

SOFTWARE REQUIRED: MATLAB


THEORY:
Transmission line has four parameters – resistance, inductance, capacitance and
conductance. The inductance and capacitance are due to the effect of magnetic and electric
fields around the conductor. The resistance of the conductor is best determined from the
manufactures data, the inductances and capacitances can be evaluated using the formula.
ARRANGEMENT INDUCTANCE CAPACITANCE
Lc= 2*10-7 ln(D/r’)
Cc= 2πξ0 /ln(D/r)
Single Phase System r’= 0.7788*r.
Cloop= Cc/2.
Lloop= 2*Lc
3-Ф Symmetrical
Lc= Lph = 2*10-7 ln(D/r’) Cc= Cph= 2πξ0/ln(D/r)
System
3-Ф Unsymmetrical Lc= Lph= 2*10-7 ln(Deq/r’)
Cc= Cph= 2πξ0/ln(Deq/r)
Transposed System Deq= (DAB*DBC*DCA)(1/3)

La= 2*10-7[ln√(Dab*Dca)/r’
+j√3*ln√(Dab/Dca)
3-Ф Unsymmetrical
Lb= 2*10-7[ln√(Dbc*Dab)/r’ -----------------
Non- Transposed
+j√3*ln√(Dbc/Dab)
System
Lc= 2*10-7[ln√(Dca*Dbc)/r’
+j√3*ln√(Dca/Dbc)

Lc= 2*10-7 ln(√3D/2r’)


3-Ф Symmetrical Cc= 2πξ0/ln(√3D/2r)
Lph= Lc/2
Double circuit System Cph= Cc*2.

Lc= 2*10-7
3-Ф Unsymmetrical Cc=
ln[2(1/3)(D/r’)(m/n)(2/3)] (1/3)
Transposed System 2πξ0/ln[2 (D/r)(m/n)(2/3)]
Lph= Lc/2
With Vertical Profile Cph= Cc*2.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Lc= 2*10-7 ln(Dm/Ds) Cc=


3-Ф Unsymmetrical
Lph= Lc/2 2πξ0/ln[i m2jh/r3n3d](1/3)
2

Transposed Double
Cph= Cc*2.
Circuit
Lc= 2*10-7 ln(Dm/Ds)
3-Ф Line With Lph= Lc/2
--------
Bundled Conductors Dm= (DAB*DBC*DCA)(1/3)
Ds= ( DSA*DSB*DSC)(1/3)

PROCEDURE:
1. Enter the command window of the MATLAB.
2. Create a new M – file by selecting File - New – M – File
3. Type and save the program in the editor window.
4. Execute the program by either pressing Tools – Run.
5. View the results.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

1. (a) Calculate the loop inductance and capacitance of a 1 phase line with two parallel
conductors spaced 3.5m apart. The diameter of each conductor is 1.5 cm.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

CALCULATION OF INDUCTANCE AND CAPACITANCE OF SINGLE PHASE LINE

Program:
clc;
clear all;
disp('CALCULATION OF INDUCTANCE AND CAPACITANCE OF 1 PHASE LINE');
d=input('Enter diameter in cm:');
r=d/2;
rad=r*10^(-2);
D=input('Enter distance between conductors in m:');
r1=rad*0.7788;
L=4*10^(-7)*log(D/r1);
C=(pi*8.854*10^(-12))/(log(D/rad));
disp('INDUCTANCE(in H/m):');
disp(L);
disp('CAPACITANCE(in F/m):');
disp(C);

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

1. (b) Calculate the inductance and capacitance of a conductor of a 3 phase system shown
which has 1.2 cm diameter and conductors at the edge of an equilateral triangle of side
1.5m.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

CALCULATION OF INDUCTANCE & CAPACITANCE OF 3-Ф SYMMETRIC LINE

Program:
clc;
clear all;
disp('CALCULATION OF INDUCTANCE AND CAPACITANCE OF 3 PHASE
SYMMETRIC LINE');
d=input('Enter diameter in cm:');
r=d/2;
rad=r*10^(-2);
D=input('Enter distance between conductors in m:');
r1=rad*0.7788;
L=2*10^(-7)*log(D/r1);
C=(2*pi*8.854*10^(-12))/(log(D/rad));
disp('INDUCTANCE(in H/m):');
disp(L);
disp('CAPACITANCE(in F/m):');
disp(C);

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

[Link]
DATE:

MODELING OF TRANSMISSION LINES


AIM:
To understand modeling and performance of short, medium and long transmission lines.
SOFTWARE REQUIRED: MATLAB
FORM ULAE:
Vs=AVR+BIR
Is=CVR+DIR
TYPE METHOD ABCD PARAMETERS
Short ------------------- A=D=1; B=Z; C=0.
A=D=1+YZ/2;
Nominal T Method B=Z(1+YZ/4);
C=Y;
Medium
A=D=1+YZ/2;
Nominal π Method B=Z;
C=Y(1+YZ/4);
A=D=cos h(γℓ);
B=Zc sin h(γℓ);
Rigorous Method C=1/Zc sin h(γℓ);
γ=√(ZY);
Zc=√(Z/Y);
A=D=1+YZ/2;
B=Z;
C=Y(1+YZ/A);
Equivalent π Method Z=Z sin h(γℓ)/ γℓ;
Long Y=Y tan h(γℓ/2)/ (γℓ/2);
γ=√(ZY);
Zc=√(Z/Y);
A=D=1+YZ/2;
B=Z;
C=Y(1+YZ/A);
Equivalent T Method Z=Z tan h(γℓ/2)/ (γℓ/2);
Y=Y sin h(γℓ)/ γℓ;
γ=√(ZY);
Zc=√(Z/Y);

PROCEDURE:
1. Enter the command window of the MATLAB.
2. Create a new M – file by selecting File - New – M – File
3. Type and save the program in the editor window.
4. Execute the program by either pressing Tools – Run.
5. View the results.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

1. A balanced 3 phase load of 30 MW is supplied at 132KV, 50Hz and 0.85 pf lag by means of
a line. The series impedance is 20+j52Ω and total admittance is 315*10-6Ʊ. Using Nominal
T methods determine A, B, C, D parameters and regulation.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

MEDIUM TRANSMISSION LINE

Program:
clc;
%clear all;
R=input('Resistance :');
XL=input('Inductive Reactance :');
XC=input('Capacitive Reactance :');
G=input('Conductance :');
length=input('Length of Transmission Line :');
f=input('Frequency :');
Z1= (R+j*XL)*length;
Y1= (G+j*XC)*length;
m=menu('ENTER THE TYPE OF NETWORK','NOMINAL T', 'NOMINAL PI');
switch m
case {1}
A = 1+(Z1*Y1/2);
B=Z1*(1+(Z1*Y1/4));
C=Y1;
D=A;
otherwise
A = 1+(Z1*Y1/2);
B=Z1;
C=Y1*(1+(Z1*Y1/4));
D=A;
end
TM = [ A B; C D ];
VRL=input('ENTER RECEIVEING END VOLTAGE :');
VRP=VRL/(sqrt(3));
PR = input('ENTER RECEIVING END LOAD IN MW :');
Pf=input('ENTER THE RECEIVING END LOAD POWER FACTOR :');
h=acos(Pf);
SR=PR/Pf;
SR=SR*(cos(h)+j*sin(h));
QR=imag(SR);
IR=conj(SR)/(3*conj(VRP));
SM=TM*[VRP;IR];
VS=SM(1,1);
IS=SM(2,1);
Pfs=cos(angle(VS)-angle(IS));
SS=3*VS*conj(IS);
VSA=angle(VS)*(180/pi);
ISA=angle(IS)*(180/pi);
VS=sqrt(3)*abs(VS);
IS=abs(IS)*1000;
VREG=((VS/(abs(TM(1,1)))-VRL)/VRL)*100;
PS=real(SS);
QS=imag(SS);
eff=PR/PS*100;
PL=PS-PR;
QL=QS-QR;
Z1
Y1

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

fprintf('SENDING END LINE VOLTAGE %g at %g degrees \n',VS,VSA)


fprintf('SENDING END LINE CURRENT %g at %g degrees \n',IS,ISA)
fprintf('SENDING END POWER FACTOR %g\n',Pfs)
fprintf('SENDING END REAL POWER %g\n',PS)
fprintf('SENDING END REACTIVE POWER %g\n',QS)
fprintf('PERCENTAGE VOLTAGE REGULATION %g\n',VREG)
fprintf('REAL POWER LOSS %g\n',PL)
fprintf('REACTIVE POWER LOSS %g\n',QL)
fprintf('EFFICIENCY %G', eff)

NOMINAL T
Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

2. A 50Hz, 3 phase, 100 km transmission line has total impedance of 35Ω, reactance 0f 140Ω
and shunt admittance of 930*10-6 Ʊ. It delivers 40 MW at 220KV, 0.9 pf lag .Using
nominal π determine A,B ,C,D Vs, VSA,ISA , pf, Ps Qs,η.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

NOMINAL PI
Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 3
DATE:
FORMATION OF BUS ADMITTANCE MATRICES AND SOLUTION OF
NETWORKS
AIM:
To develop a program to obtain Ybus matrix for the given networks by the method of
inspection.
FORMATION OF Y-BUS MATRIX
Yii Yij 
Generalized [Y-Bus] = 
Y ji Y jj 

Each admittance Yii (i =1,2,……n) is called the self admittance or driving point
admittance of bus I and equals the sum of all admittances terminating on the particular bus.
Each off-diagonal term Yij (i,j = 1,2…n; ji) is the transfer admittance between buses I
and j, n=total number of buses. Further, Yij = Yji
SIMULATION
In this exercise matrix, Z-Bus for the system is developed by first forming the Ybus and
then inverting it to get the Z-Bus matrix. The generator and transformer impedances are taken
into account.
Ybus is a sparse matrix, Z-Bus is a full matrix, i.e., zero elements of Ybus become non-
zero values in the corresponding Z-Bus elements. The bus impedance matrix is most useful for
short circuit studies.
ALGORITHM
Step (1): Initialize [Y-Bus] matrix that is replace all entries by zero.

Yij = Yij-yij = Yji = off diagonal element


n
Step (2): Compute Yii   y ij = diagonal element.
j 1

Step (3): Modify the Ybus matrix by adding the transformer and the generator admittances
to the respective diagonal elements of Y- bus matrix.

Step (4): Compute the Z-Bus matrix by inverting the modified Ybus matrix.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

FLOWCHART START

Read no of buses(NB),No of lines


(NL) & line Data

Initialize Y Bus Matrix

Consider Line l=1

i = sb(l); j = eb(l)

Y(i,i) = Y(i,i) + yseries(l) +0.5 ysh(l)


Y(j,j) = Y(j,j) + yseries(l) +0.5 ysh(l)
Y(i,j) = - yseries(l)

Y(j,i) = Y(i,j)

l=l+1 Is l = NL?

Modify the Ybus by adding generator and transformer admittances to


the respective diagonal elements.

Compute the Z-bus matrix by inverting modified Ybus

Print all the Results

STOP

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

1. The [Y-Bus] matrix is formed by inspection method for a four bus system. The line data and
is given below.

LINE DATA
Line SB EB Series Line charging
Number Impedance (p.u) Admittance (p.u)
1 1 2 0.10 + j0.40 j0.015
2 2 3 0.15 + j0.60 j0.020
3 3 4 0.18 + j0.55 j0.018
4 4 1 0.10 + j0.35 j0.012
5 4 2 0.25 + j0.20 j0.030

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

FORMATION OF Y-BUS BY THE METHOD OF INSPECTION

Program:
clc;
clear all;
n=input('Enter number of buses');
l=input('Number of lines');
s=input('[Link] or 2:Admittance');
ybus=zeros(n,n);
lc=zeros(n,n);

for i=1:l
a=input('Starting bus:');
b=input('Ending bus:');
t=input('Admittance or Impedance of line:');
lca=input('Line charging admittance:');
if(s==1)
y(a,b)=1/t;
else
y(a,b)=t;
end
y(b,a)=y(a,b);
lc(a,b)=lca;
lc(b,a)=lc(a,b);
end

for i=1:n
for j=1:n
if i==j
for k=1:n
ybus(i,j)=ybus(i,j)+y(i,k)+lc(i,k)/2;
end
else
ybus(i,j)=-y(i,j);
end
ybus(j,i)=ybus(i,j);
end
end
ybus

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 4
DATE:
FORMATION OF BUS IMPEDANCE MATRICES
AIM:
To develop a program to obtain the Z bus matrix for the given network by the method of bus
building algorithm.

FORMATION OF Z-BUS MATRIX


Z-Bus matrix is an important matrix used in different kinds of power system studies
such as short circuit study, load flow study, etc.
In short circuit analysis, the generator and transformer impedances must be taken into
account. In contingency analysis, the shunt elements are neglected while forming the Z-Bus
matrix, which is used to compute the outage distribution factors.
This can be easily obtained by inverting the Ybus formed by inspection method or by
analytical [Link] inverse of the Ybus for large systems is time consuming; Moreover,
modification in the system requires the whole process to be repeated to reflect the changes in
the system. In such cases, the Z-Bus is computed by Z-Bus building algorithm.
ALGORITHM:
Step 1: Start the program.
Step 2: Read the number of buses, starting bus and ending bus.
Step 3: Initialize the Z Bus matrix.
Step 4: Form the Z – Bus matrix as follows
Case 1:
When a new bus of impedance Zb is connected to reference bus Zbus,new = [ Zb ]
Case 2: Adding new bus p to existing bus q
Zbus,new = Zorig Z1q
Z2q
..
Zq1 Zq2 …… Zqq+ Zb

Case 3: Adding impedance from an existing bus to reference bus.


Zjk,act = Zjk – Zj(n+1)* Z(n+1)k
Z(n+1)(n+1)
Case 4: Adding Zb between two existing buses h and q

Zbus,new = Zorig Z1h - Z1q


Z2h – Z2q
Zh1 – Zq1 Zh2 – Zq2......Z(n+1)(n+1)

Case 5: Print the Z – bus matrix.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Problem:
Find the bus impedance matrix for the given network

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

FORMATION OF Z BUS BY BUS BUILDING ALGORITHM


Program
clc;
clear all;
nbus=input('Enter the total no. of buses excluding reference bus');
zbus=zeros(nbus,nbus);
t=1;
while t==1
s=menu('Specify the case number','Connect a new bus to reference bus','connect an old bus
to new bus','Connect two old buses','Connect an old bus to reference bus','Quit');
switch(s);
case{1}
zb=input('Enter the Zbus value');
zbus=zb;
case{2}
n=input('Enter the 2nd bus no.:');
zb=input('Enter the reactance value:');
for i=1:n
if i==n
zbus(n,n)=zbus(n-1,n-1)+zb;
else
zbus(i,n)=zbus(i,n-1);
zbus(n,i)=zbus(n-1,i);
end
end
case{3}
l=input('Enter the existing bus number 1:');
n=input('Enter the existing bus number 2:');
zb=input('Enter the reactance value:');
n=n+1;
for i=1:n
if i==n
zbus(n,n)=zbus(l,l)+zb+zbus(n-1,n-1)-(2*zbus(1,n-1));
zbus(n,n);
else
zbus(i,n)=zbus(l,i)-zbus(i,n-1);
zbus(i,n);
zbus(n,i)=zbus(i,n);
end
end
for i=1:nbus
for j=1:nbus
if i==j
zbus(i,j)=zbus(i,j)-(zbus(i,n)*zbus(n,j)/zbus(n,n));
zbus(j,i)=zbus(i,j);
zbus(i,j)=zbus(j,i);
else
zbus(i,j)=zbus(i,j)-(zbus(i,n)*zbus(n,j)/zbus(n,n));
end
end
end
zbus(i,n)=0;
zbus(n,i)=0;

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

case{4}
n=input('Enter the bus number:');
zb=input('Enter reactance value:');
n=n+1;
for i=1:n
if i==n
zbus(n,n)=zbus(n-1,n-1)+zb;
else
zbus(i,n)=zbus(i,n-1);
zbus(n,i)=zbus(n-1,i);
end
end
for i=1:n
for j=1:n
if i==j
zbus(i,j)=zbus(i,j)-(zbus(i,n)*zbus(n,j)/zbus(n,n));
zbus(j,i)=zbus(i,j);
zbus(i,j)=zbus(j,i);
else
zbus(i,j)=zbus(i,j)-(zbus(i,n)*zbus(n,j)/zbus(n,n));
end
end
end
case{5}
disp('End the program');
choice=menu('Would you like to print program or end program','print','end');
if choice==1
zbus
else
t=0;
end
end
end

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 5
DATE:
LOAD FLOW ANALYSIS BY GAUSS – SEIDAL METHOD
AIM:
To carryout load flow analysis of the given power system by Gauss – Seidal method.
ALGORITHM:
Step 1: Assume a flat voltage profile of 1+j0 for all buses except the slack bus. The
voltage of slack bus is the specified voltage and it is not modified in any iteration.
Step 2: Assume a suitable value of  called convergence criterion. Here  is a specified change
in bus voltage that is used to compare the actual change in bus voltage k th and (k  1)th
iteration.
Step 3: Set iteration count, k=0 and assumed voltage profile of the buses is denoted as
V01,V02 ,V03 ,.....V0n except slack bus.
Step 4: Set bus count, p=1
Step 5: Check for slack bus. If it is a slack bus then go to step-12,otherwise go to next step.
Step 6: Check for generator bus. If it is a generator bus go to next step, otherwise (i.e., if it is
load bus) go to step=9.

Step 7: Temporarily set V pk  V p and phase of V pk as the k th iteration value if the bus-p is
spec
a generator bus where V p is the specified magnitude of voltage for bus – p. Then calculate
spec
the reactive power of the generator bus using the following equation.

Q kp ,cal
1
 
 *  p 1 n  
 ( 1)  Im  V pk   Y pqVqk 1   Y pqVqk  
  q 1 q p  

The calculated reactive power may be within specified limits or it may violate the limits.
If the calculated reactive power is within the specified limits then consider this bus as generator
bus and set Q p  Q kp,cal
1
for this iteration and go to step-8.
If the calculated reactive power violates the specified limit for reactive power then treat this bus
as a load [Link] magnitude of the reactive power at this bus will correspond to the limit it has
violated.
i.e., if Q kp ,cal
1
 Q p , min then Q p  Q p , min

(or) Q kp ,cal
1
 Q p , min then Q p  Q p , max

Since the bus is treated as load bus, take actual value of V pk for (k  1)th iteration.i.e. V pk Need
not be replaced by V p when the generator bus is treated as load bus. Go to step9.
spec
Step 8: For generator bus the magnitude of voltage does not change and so for all iteration the
magnitude of bus voltage is the specified value. The phase of the bus voltage can be as shown
below.
 
k 1 1  Pp  jQ p p 1 k 1 n k
V p , temp     Y pqV q   Y pqVq 
Y pp 
 Vp  
k  q  1 q  p 1 

 pk 1  tan 1 
 k


 Im V p , temp 
1

  
 Re al V pk,temp
1 

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Now that (k  1)th iteration voltage of the generator bus is given by


V pk  1  V p   pk  1
spec

After calculating V pk 1 for generator buses, go to step -11.


Step 9: For the load bus the (k  1)th iteration value of load bus –p voltage, V pk 1 can be

calculated using the following equation.


 
1  Pp  jQ p p 1 n k
V pk 1  
k 1
  Y pqVq   Y pqV q 
Y pp 
 Vp 
k  q 1 q  p 1 

Step 10: An acceleration factor,  can be used for faster convergence. If the acceleration factor

is specified then modify the (k  1)th iteration value of bus-p voltage using the following
equation.

V pk,acc
1
 V pk   (V pk 1  V pk )

Then set , V pk 1 = V pk,acc


1

Step 11: Calculate the change in the bus-p voltage, using the relation,

V pk 1  V pk 1  V pk

Step 12: Repeat the steps 5 to 11 until all the bus voltages have been calculated. For this
increment the bus count by1 and go to step-5, until the bus count is n.
Step 13: Find out the largest of the absolute value of the change in voltage.

i.e., Find the largest among V1k 1 , V 2k 1 , ….., V nk 1 Let this be the largest change

Vmax .Check whether this largest change Vmax is less than the prescribed tolerance  .If

Vmax is less than  then move to the next step. Otherwise increment the iteration count and

go to step-4.
Step 14: Calculate the line flows and slack bus power using the bus voltages.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
The system data for a load flow solution are given below. Determine the voltages by
Gauss – Seidal method
Line admittances
Bus Admittan
code ce
1–2 2 – j8
1–3 1 – j4
0.666 –
2–3
j2.664
2–4 1 – j4
3–4 2 – j8

Bus Specifications

Bus P Q V Remarks
code
1 - - 1.06 Slack
2 0.5 0.2 - PQ
3 0.4 0.3 - PQ
4 0.3 0.1 - PQ

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clc;
clear all;
n=input ('no of buses');
l=input ('no of lines');
s=input ('impedance 1 or admittance 2');
for i=1:l
a=input ('starting bus');
b=input ('ending bus');
t=input ('admittance or impedance value');
if s==1
y(a,b)=1/t;
else
y(a,b)=t;
end
y(b,a)=y(a,b);
end
ybus=zeros(n,n);
for i=1:n
for j=1:n
if i==j
for k=1:n
ybus(i,j)=ybus(i,j)+y(i,k);
end
else
ybus(i,j)=-y(i,j);
end
ybus(j,i)=ybus(i,j);
end
end

ybus
p=zeros(1,n);
q=zeros(1,n);
v=zeros(1,n);
pv=input ('no of pv buses');
pq=input('no of pq buses');
s=input ('slack bus number');
v(s)=input ('slack bus voltage');
acc=input ('accleration factor');
for i=1:pv
b(i)=input('pv bus number');
p(b(i))=input('real power');
v(b(i))=input ('voltage value');
qmin(b(i))=input ('min value of q');
qmax(b(i))=input ('max value of q');
end
for i=1:pq
c(i)=input('pq bus number');
p(c(i))=input('real power');
p(c(i))=-p(c(i));
q(c(i))=input ('reactive power');
q(c(i))=-q(c(i));
v(c(i))=1+0i;

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

end
e=v;
e
enew(s)=v(s);
it=0;
yy=zeros(1,n);
for ii=1:n
ypq(ii)=0;
if ii~=s
flag=0;
gen=0;
for j=1:pv
if ii==b(j)
flag=1;
end
end
if flag==1
for k=1:n
yy(ii)=yy(ii)+ybus(ii,k)*v(k);
end
qcal(ii)=-imag(conj(v(ii))*yy(ii));
if qcal(ii)<qmin(ii)
qcal(ii)=qmin(ii);
elseif qcal(ii)>qmax(ii)
qcal(ii)=qmax(ii);
else
qcal(ii)=qcal(ii);
gen=1;
end
else
qcal(ii)=q(ii);
end
qcal(ii)=qcal(ii)*sqrt(-1);
for k=1:n
if k~=ii
ypq(ii)=ypq(ii)+ybus(ii,k)*e(k);
end
end
enew(ii)=(((p(ii)-qcal(ii))/conj(e(ii)))-ypq(ii))/ybus(ii,ii);
dele(ii)=enew(ii)-e(ii);
enew(ii)=e(ii)+acc*dele(ii);

if gen==1
ang=angle(enew(ii));
enew(ii)=v(ii)*cos(ang)+v(ii)*sin(ang)*sqrt(-1);
end
e(ii)=enew(ii);
end
end
disp('voltages');
enew

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 6
DATE:
LOAD FLOW ANALYSIS BY NEWTON - RAPHSON METHOD
AIM:
To carryout load flow analysis of the given power system by Newton raphson method.
ALGORITHM:
Step-1: Assume a flat voltage profile 1 + j0 for all buses (nodes) except the slack bus. The
voltage of the slack bus is the specified voltage and it is not modified in any iteration.
Step-2: Assume a suitable value of ε called convergence criterion. Hence ε is a specified
change in the residue that is used to compare the critical residues (Δ P and Δ Q or Δ V) at the
end of each iteration.
Step-3: Set iteration count k = 0, and assumed voltage profile of the buses are denoted as V10,
V20 …Vn0 except slack bus.
Step-4: Set bus count p = 1.
Step-5: Check for slack bus. If it is a slack bus then go to Step 13, otherwise go to next step.
Step-6: Calculate the real and reactive power of bus-p using the following equation.

Step-7: Calculate the change in real power, change in real power, Δ Pk = Pp,spec – Ppk; where
Pp,spec = Specified real power for bus-p.
Step-8: Check for Generator bus. If it is a Generator bus go to next step, otherwise go to Step
12.
Step-9: Check for reactive power limit violation of Generator buses. For this compare the
calculated reactive power Qpk with specified limits. If the limit is violated go to Step 11,
otherwise go to next step.
Step-10: If the calculated reactive power is within the specified limits then consider this bus as
Generator bus. Now calculate the voltage residue (change in voltage) using the following
equation.
| Δ Vpk|2 = |Vp|spec2 - |Vpk|2 where |Vp|spec = specified voltage.
Step-11: If the reactive power limit is violated then treat this bus as a load bus. Now the
specified reactive power for this bus will correspond to the limit violated.
i.e., if Qpk < Qp, min then Qp, spec = Qp, min
(Or) if Qpk > Qp, min then Qp, spec = Qp, max
Step-12: Calculate the change in reactive power for load bus (or for the Generator bus treated
as load bus). Change in reactive power, Δ Qpk = |Qp, spec| - Qpk
Step-13: Repeat steps 5 to12 until all residues (change in P and Q or V) are calculated. For this
increment the bus count by 1 and go to Step 5, until the bus count is n.
Step-14: Determine the largest of the absolute value of the residue (i.e., find the largest among
Δ Pk ,
Δ Qk or |Δ Vpk|2. Let this largest change be Δ E.
Step-15: Compare Δ E and ε. If Δ E < ε then to Step 20, If Δ E > ε go to next step.
Step-16: Determine the elements of Jacobian matrix (J) by partially differentiating the load
flow equations and evaluating the equation using Kth iteration values.
Step-17: Calculate the increments in real and reactive part of voltages.
Step-18: Calculate the new bus voltage.
Step-19: Advance the iteration count, i.e., k = k + 1 and go to Step 4.
Step-20: Calculate the line flows.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:

Consider the 3 bus system each of the 3 line bus a series impedance of 0.02 + j0.08
p.u and a total shunt admittance of j0.02 [Link] specified quantities at the buses
are given below : Find the voltages in each bus for the given system using Newton-
Raphson Method

Bus Real load Reactive Load Real power Reactive Voltage


demand, PD demand, QD generation,PG Power Specified
Generation, QG
1 2 1 - - V1=1.04
2 0 0 0.5 1 Unspecified
3 1.5 0.6 0 QG3 =  V3 = 1.04

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:

clc;
basemva=100;
accuracy=0.001;
accel=1.8;
maxiter=100;
busdata=[1 1 1.04 0 0 0 0 0 0 0 0
2 0 1 0 0.5 1 0 0 0 0 0
3 2 1.04 0 0 0 1.5 0.6 0 0 0 ];
linedata=[ 1 2 0.02 0.08 0.01 1
1 3 0.02 0.08 0.01 1
2 3 0.02 0.08 0.01 1];
lfybus
lfnewton
busout
lineflow

lfybus

j=sqrt(-1); i = sqrt(-1);
nl = linedata(:,1); nr = linedata(:,2); R = linedata(:,3);
X = linedata(:,4); Bc = j*linedata(:,5); a = linedata(:, 6);
nbr=length(linedata(:,1)); nbus = max(max(nl), max(nr));
Z = R + j*X; y= ones(nbr,1)./Z; %branch admittance
for n = 1:nbr
if a(n) <= 0 a(n) = 1; else end
Ybus=zeros(nbus,nbus); % initialize Ybus to zero
% formation of the off diagonal elements
for k=1:nbr;
Ybus(nl(k),nr(k))=Ybus(nl(k),nr(k))-y(k)/a(k);
Ybus(nr(k),nl(k))=Ybus(nl(k),nr(k));
end
end
% formation of the diagonal elements
for n=1:nbus
for k=1:nbr
if nl(k)==n
Ybus(n,n) = Ybus(n,n)+y(k)/(a(k)^2) + Bc(k);
elseif nr(k)==n
Ybus(n,n) = Ybus(n,n)+y(k) +Bc(k);
else, end
end
end
clear Pgg

Lf newton

ns=0; ng=0; Vm=0; delta=0; yload=0; deltad=0;


nbus = length(busdata(:,1));
for k=1:nbus
n=busdata(k,1);
kb(n)=busdata(k,2); Vm(n)=busdata(k,3); delta(n)=busdata(k, 4);
Pd(n)=busdata(k,5); Qd(n)=busdata(k,6); Pg(n)=busdata(k,7); Qg(n) =
busdata(k,8);
Qmin(n)=busdata(k, 9); Qmax(n)=busdata(k, 10);
Qsh(n)=busdata(k, 11);
if Vm(n) <= 0 Vm(n) = 1.0; V(n) = 1 + j*0;

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

else delta(n) = pi/180*delta(n);


V(n) = Vm(n)*(cos(delta(n)) + j*sin(delta(n)));
P(n)=(Pg(n)-Pd(n))/basemva;
Q(n)=(Qg(n)-Qd(n)+ Qsh(n))/basemva;
S(n) = P(n) + j*Q(n);
end
end
for k=1:nbus
if kb(k) == 1, ns = ns+1; else, end
if kb(k) == 2 ng = ng+1; else, end
ngs(k) = ng;
nss(k) = ns;
end
Ym=abs(Ybus); t = angle(Ybus);
m=2*nbus-ng-2*ns;
maxerror = 1; converge=1;
iter = 0;
% Start of iterations
clear A DC J DX
while maxerror >= accuracy & iter <= maxiter % Test for max. power mismatch
for i=1:m
for k=1:m
A(i,k)=0; %Initializing Jacobian matrix
end, end
iter = iter+1;
for n=1:nbus
nn=n-nss(n);
lm=nbus+n-ngs(n)-nss(n)-ns;
J11=0; J22=0; J33=0; J44=0;
for i=1:nbr
if nl(i) == n | nr(i) == n
if nl(i) == n, l = nr(i); end
if nr(i) == n, l = nl(i); end
J11=J11+ Vm(n)*Vm(l)*Ym(n,l)*sin(t(n,l)- delta(n) + delta(l));
J33=J33+ Vm(n)*Vm(l)*Ym(n,l)*cos(t(n,l)- delta(n) + delta(l));
if kb(n)~=1
J22=J22+ Vm(l)*Ym(n,l)*cos(t(n,l)- delta(n) + delta(l));
J44=J44+ Vm(l)*Ym(n,l)*sin(t(n,l)- delta(n) + delta(l));
else, end
if kb(n) ~= 1 & kb(l) ~=1
lk = nbus+l-ngs(l)-nss(l)-ns;
ll = l -nss(l);
% off diagonalelements of J1
A(nn, ll) =-Vm(n)*Vm(l)*Ym(n,l)*sin(t(n,l)- delta(n) + delta(l));
if kb(l) == 0 % off diagonal elements of J2
A(nn, lk) =Vm(n)*Ym(n,l)*cos(t(n,l)- delta(n) + delta(l));end
if kb(n) == 0 % off diagonal elements of J3
A(lm, ll) =-Vm(n)*Vm(l)*Ym(n,l)*cos(t(n,l)-
delta(n)+delta(l)); end
if kb(n) == 0 & kb(l) == 0 % off diagonal elements of J4
A(lm, lk) =-Vm(n)*Ym(n,l)*sin(t(n,l)- delta(n) + delta(l));end
else end
else , end
end
Pk = Vm(n)^2*Ym(n,n)*cos(t(n,n))+J33;
Qk = -Vm(n)^2*Ym(n,n)*sin(t(n,n))-J11;
if kb(n) == 1 P(n)=Pk; Q(n) = Qk; end % Swing bus P
if kb(n) == 2 Q(n)=Qk;
if Qmax(n) ~= 0
Qgc = Q(n)*basemva + Qd(n) - Qsh(n);
if iter <= 7 % Between the 2th & 6th iterations
if iter > 2 % the Mvar of generator buses are
if Qgc < Qmin(n), % tested. If not within limits
Vm(n)
Vm(n) = Vm(n) + 0.01; % is changed in steps of 0.01 pu to
elseif Qgc > Qmax(n), % bring the generator Mvar within

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Vm(n) = Vm(n) - 0.01;end % the specified limits.


else, end
else,end
else,end
end
if kb(n) ~= 1
A(nn,nn) = J11; %diagonal elements of J1
DC(nn) = P(n)-Pk;
end
if kb(n) == 0
A(nn,lm) = 2*Vm(n)*Ym(n,n)*cos(t(n,n))+J22; %diagonal elements of J2
A(lm,nn)= J33; %diagonal elements of J3
A(lm,lm) =-2*Vm(n)*Ym(n,n)*sin(t(n,n))-J44; %diagonal of elements of
J4
DC(lm) = Q(n)-Qk;
end
end
DX=A\DC';
for n=1:nbus
nn=n-nss(n);
lm=nbus+n-ngs(n)-nss(n)-ns;
if kb(n) ~= 1
delta(n) = delta(n)+DX(nn); end
if kb(n) == 0
Vm(n)=Vm(n)+DX(lm); end
end
maxerror=max(abs(DC));
if iter == maxiter & maxerror > accuracy
fprintf('\nWARNING: Iterative solution did not converged after ')
fprintf('%g', iter), fprintf(' iterations.\n\n')
fprintf('Press Enter to terminate the iterations and print the results
\n')
converge = 0; pause, else, end

end

if converge ~= 1
tech= (' ITERATIVE SOLUTION DID NOT CONVERGE');
else,
tech=(' Power Flow Solution by Newton-Raphson Method');
end
V = Vm.*cos(delta)+j*Vm.*sin(delta);
deltad=180/pi*delta;
i=sqrt(-1);
k=0;
for n = 1:nbus
if kb(n) == 1
k=k+1;
S(n)= P(n)+j*Q(n);
Pg(n) = P(n)*basemva + Pd(n);
Qg(n) = Q(n)*basemva + Qd(n) - Qsh(n);
Pgg(k)=Pg(n);
Qgg(k)=Qg(n);
elseif kb(n) ==2
k=k+1;
S(n)=P(n)+j*Q(n);
Qg(n) = Q(n)*basemva + Qd(n) - Qsh(n);
Pgg(k)=Pg(n);
Qgg(k)=Qg(n);
end
yload(n) = (Pd(n)- j*Qd(n)+j*Qsh(n))/(basemva*Vm(n)^2);
end
busdata(:,3)=Vm'; busdata(:,4)=deltad';
Pgt = sum(Pg); Qgt = sum(Qg); Pdt = sum(Pd); Qdt = sum(Qd); Qsht =
sum(Qsh);

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

busout

disp(tech)
fprintf(' Maximum Power Mismatch = %g \n', maxerror)
fprintf(' No. of Iterations = %g \n\n', iter)
head =[' Bus Voltage Angle ------Load------ ---Generation---
Injected'
' No. Mag. Degree MW Mvar MW Mvar
Mvar '
'
'];
disp(head)
for n=1:nbus
fprintf(' %5g', n), fprintf(' %7.3f', Vm(n)),
fprintf(' %8.3f', deltad(n)), fprintf(' %9.3f', Pd(n)),
fprintf(' %9.3f', Qd(n)), fprintf(' %9.3f', Pg(n)),
fprintf(' %9.3f ', Qg(n)), fprintf(' %8.3f\n', Qsh(n))
end
fprintf(' \n'), fprintf(' Total ')
fprintf(' %9.3f', Pdt), fprintf(' %9.3f', Qdt),
fprintf(' %9.3f', Pgt), fprintf(' %9.3f', Qgt), fprintf(' %9.3f\n\n',
Qsht)

lineflow

SLT = 0;
fprintf('\n')
fprintf(' Line Flow and Losses \n\n')
fprintf(' --Line-- Power at bus & line flow --Line loss--
Transformer\n')
fprintf(' from to MW Mvar MVA MW Mvar
tap\n')

for n = 1:nbus
busprt = 0;
for L = 1:nbr;
if busprt == 0
fprintf(' \n'), fprintf('%6g', n), fprintf(' %9.3f',
P(n)*basemva)
fprintf('%9.3f', Q(n)*basemva), fprintf('%9.3f\n', abs(S(n)*basemva))

busprt = 1;
else, end
if nl(L)==n k = nr(L);
In = (V(n) - a(L)*V(k))*y(L)/a(L)^2 + Bc(L)/a(L)^2*V(n);
Ik = (V(k) - V(n)/a(L))*y(L) + Bc(L)*V(k);
Snk = V(n)*conj(In)*basemva;
Skn = V(k)*conj(Ik)*basemva;
SL = Snk + Skn;
SLT = SLT + SL;
elseif nr(L)==n k = nl(L);
In = (V(n) - V(k)/a(L))*y(L) + Bc(L)*V(n);
Ik = (V(k) - a(L)*V(n))*y(L)/a(L)^2 + Bc(L)/a(L)^2*V(k);
Snk = V(n)*conj(In)*basemva;
Skn = V(k)*conj(Ik)*basemva;
SL = Snk + Skn;
SLT = SLT + SL;
else, end
if nl(L)==n | nr(L)==n
fprintf('%12g', k),
fprintf('%9.3f', real(Snk)), fprintf('%9.3f', imag(Snk))
fprintf('%9.3f', abs(Snk)),
fprintf('%9.3f', real(SL)),
if nl(L) ==n & a(L) ~= 1

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

fprintf('%9.3f', imag(SL)), fprintf('%9.3f\n', a(L))


else, fprintf('%9.3f\n', imag(SL))
end
else, end
end
end
SLT = SLT/2;
fprintf(' \n'), fprintf(' Total loss ')
fprintf('%9.3f', real(SLT)), fprintf('%9.3f\n', imag(SLT))
clear Ik In SL SLT Skn Snk

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

OUTPUT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Parameter Calculated Value Simulated Value


Bus voltage after the first
iteration using Newton
Raphson method

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 7
DATE:
FAULT ANALYSIS
AIM:
To become familiar with modeling and analysis of power systems under faulted
condition and to compare the fault level, post-fault voltages and currents for different types of
faults, both symmetric and unsymmetric.

OBJECTIVES
To conduct fault analysis on a given system using software available and obtain fault analysis
report with fault level and current at the faulted point and post-fault voltages and currents in the
network for the following faults.
1. Line-to-Ground
2. Line-to-Line
3. Double Line-to-Ground
SINGLE LINE-TO-GROUND FAULT

Sequence Network of Single line-to-ground-fault

Fault Current

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

LINE-TO-LINE FAULT

Sequence Network of Line-to-Line Fault

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

DOUBLE LINE-TO-GROUND FAULT

Sequence of Double line-to-ground fault

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
The one line diagram of a simple power system is shown in the figure. The
neutral of each generator is grounded through a current limiting reactor of 0.25/3
per unit on a 100MVA base. The system data expressed in per unit on a common
100MVA base is tabulated below. The generators are running on no load at their
rated voltage and rated frequency with their emf’s in phase.
Determine the fault current for the following faults.
a) A balanced three phase fault at bus 3 through a fault impedance Zf=j0.1 per
unit.
b) A single line to ground fault at bus 3 through a fault impedance Zf=j0.1 per
unit.
c) A line to line fault at bus 3 through a fault impedance Zf=j0.1 per unit.
d) A double line to ground fault at bus 3 through a fault impedance Zf=j0.1 per
unit.

Base Voltage
Item X1 X2 X0
MVA Rating
G1 100 20kV 0.15 0.15 0.05
G2 100 20kV 0.15 0.15 0.05
T1 100 20kV/220kV 0.1 0.1 0.1
T2 100 20kV/220kV 0.1 0.1 0.1
L12 100 220kV 0.125 0.125 0.3
L13 100 220kV 0.15 0.15 0.35
L23 100 220kV 0.25 0.25 0.7125

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
zdata1 = [0 1 0 0.25
0 2 0 0.25
1 2 0 0.125
1 3 0 0.15
2 3 0 0.25];

zdata0 = [0 1 0 0.40
0 2 0 0.10
1 2 0 0.30
1 3 0 0.35
2 3 0 0.7125];
zdata2 = zdata1;
Zbus1 = zbuild(zdata1)
Zbus0 = zbuild(zdata0)
Zbus2 = Zbus1;
symfault(zdata1,Zbus1)
lgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2)
llfault(zdata1, Zbus1, zdata2, Zbus2)
dlgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2)

symfault
function symfaul(zdata, Zbus, V)

nl = zdata(:,1); nr = zdata(:,2); R = zdata(:,3);


X = zdata(:,4);
nc = length(zdata(1,:));
if nc > 4
BC = zdata(:,5);
elseif nc ==4, BC = zeros(length(zdata(:,1)), 1);
end
ZB = R + j*X;
nbr=length(zdata(:,1)); nbus = max(max(nl), max(nr));
if exist('V') == 1
if length(V) == nbus
V0 = V;
else, end
else, V0 = ones(nbus, 1) + j*zeros(nbus, 1);
end
fprintf('\Three-phase balanced fault analysis \n')
ff = 999;
while ff > 0
nf = input('Enter Faulted Bus No. -> ');
while nf <= 0 | nf > nbus
fprintf('Faulted bus No. must be between 1 & %g \n', nbus)
nf = input('Enter Faulted Bus No. -> ');
end

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

fprintf('\nEnter Fault Impedance Zf = R + j*X in ')


Zf = input('complex form (for bolted fault enter 0). Zf = ');
fprintf(' \n')
fprintf('Balanced three-phase fault at bus No. %g\n', nf)

If = V0(nf)/(Zf + Zbus(nf, nf));


Ifm = abs(If); Ifmang=angle(If)*180/pi;
fprintf('Total fault current = %8.4f per unit \n\n', Ifm)
%fprintf(' p.u. \n\n', Ifm)
fprintf('Bus Voltages during fault in per unit \n\n')
fprintf(' Bus Voltage Angle\n')
fprintf(' No. Magnitude degrees\n')

for n = 1:nbus
if n==nf
Vf(nf) = V0(nf)*Zf/(Zf + Zbus(nf,nf)); Vfm = abs(Vf(nf));
angv=angle(Vf(nf))*180/pi;
else, Vf(n) = V0(n) - V0(n)*Zbus(n,nf)/(Zf + Zbus(nf,nf));
Vfm = abs(Vf(n)); angv=angle(Vf(n))*180/pi;
end
fprintf(' %4g', n), fprintf('%13.4f', Vfm),fprintf('%13.4f\n', angv)

end

fprintf(' \n')

fprintf('Line currents for fault at bus No. %g\n\n', nf)


fprintf(' From To Current Angle\n')
fprintf(' Bus Bus Magnitude degrees\n')

for n= 1:nbus
%Ign=0;
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k==0
Ink = (V0(n) - Vf(n))/ZB(I);
Inkm = abs(Ink); th=angle(Ink);
%if th <= 0
if real(Ink) > 0
fprintf(' G '), fprintf('%7g',n), fprintf('%12.4f',
Inkm)
fprintf('%12.4f\n', th*180/pi)
elseif real(Ink) ==0 & imag(Ink) < 0
fprintf(' G '), fprintf('%7g',n), fprintf('%12.4f',
Inkm)
fprintf('%12.4f\n', th*180/pi)
else, end
Ign=Ink;
elseif k ~= 0
Ink = (Vf(n) - Vf(k))/ZB(I)+BC(I)*Vf(n);
%Ink = (Vf(n) - Vf(k))/ZB(I);
Inkm = abs(Ink); th=angle(Ink);
%Ign=Ign+Ink;
%if th <= 0
if real(Ink) > 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf('%12.4f', Inkm), fprintf('%12.4f\n', th*180/pi)
elseif real(Ink) ==0 & imag(Ink) < 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf('%12.4f', Inkm), fprintf('%12.4f\n', th*180/pi)
else, end
else, end

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

else, end
end

if n==nf
fprintf('%7g',n), fprintf(' F'), fprintf('%12.4f', Ifm)
fprintf('%12.4f\n', Ifmang)
else, end
end
resp=0;
while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1
& strcmp(resp, 'Y')~=1
resp = input('Another fault location? Enter ''y'' or ''n'' within single
quote -> ');
if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 &
strcmp(resp, 'Y')~=1
fprintf('\n Incorrect reply, try again \n\n'), end
end
if resp == 'y' | resp == 'Y'
nf = 999;
else ff = 0; end
end % end for while

lgfault
function lgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2, V)
if exist('zdata2') ~= 1
zdata2=zdata1;
else, end
if exist('Zbus2') ~= 1
Zbus2=Zbus1;
else, end
nl = zdata1(:,1); nr = zdata1(:,2);
nl0 = zdata0(:,1); nr0 = zdata0(:,2);
nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));
nbr0=length(zdata0(:,1));
R0 = zdata0(:,3); X0 = zdata0(:,4);
R1 = zdata1(:,3); X1 = zdata1(:,4);
R2 = zdata1(:,3); X2 = zdata1(:,4);

for k=1:nbr0
if R0(k)==inf | X0(k) ==inf
R0(k) = 99999999; X0(k) = 99999999;
else, end
end
ZB1 = R1 + j*X1; ZB0 = R0 + j*X0;
ZB2 = R2 + j*X2;

if exist('V') == 1
if length(V) == nbus
V0 = V;
else, end
else, V0 = ones(nbus, 1) + j*zeros(nbus, 1);
end
fprintf('\nLine-to-ground fault analysis \n')
ff = 999;
while ff > 0
nf = input('Enter Faulted Bus No. -> ');
while nf <= 0 | nf > nbus
fprintf('Faulted bus No. must be between 1 & %g \n', nbus)
nf = input('Enter Faulted Bus No. -> ');
end
fprintf('\nEnter Fault Impedance Zf = R + j*X in ')
Zf = input('complex form (for bolted fault enter 0). Zf = ');
fprintf(' \n')
fprintf('Single line to-ground fault at bus No. %g\n', nf)

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

a =cos(2*pi/3)+j*sin(2*pi/3);
sctm = [1 1 1; 1 a^2 a; 1 a a^2];
Ia0 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+ Zbus0(nf, nf)+3*Zf); Ia1=Ia0;
Ia2=Ia0;
I012=[Ia0; Ia1; Ia2];
Ifabc = sctm*I012;
Ifabcm = abs(Ifabc);
fprintf('Total fault current = %9.4f per unit\n\n', Ifabcm(1))
fprintf('Bus Voltages during the fault in per unit \n\n')
fprintf(' Bus -------Voltage Magnitude------- \n')
fprintf(' No. Phase a Phase b Phase c \n')

for n = 1:nbus
Vf0(n)= 0 - Zbus0(n, nf)*Ia0;
Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;
Vf2(n)= 0 - Zbus2(n, nf)*Ia2;
Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];
Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);
fprintf(' %5g',n)
fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))
fprintf(' %11.4f\n', abs(Vc(n)))
end
fprintf(' \n')
fprintf('Line currents for fault at bus No. %g\n\n', nf)
fprintf(' From To -----Line Current Magnitude---- \n')
fprintf(' Bus Bus Phase a Phase b Phase c \n')
for n= 1:nbus
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k ~= 0
Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I);
Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I);
else, end
else, end
end
for I = 1:nbr0
if nl0(I) == n | nr0(I) == n
if nl0(I) ==n k = nr0(I);
elseif nr0(I) == n k = nl0(I);
end
if k ~= 0
Ink0(n, k) = (Vf0(n) - Vf0(k))/ZB0(I);
else, end
else, end
end
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k ~= 0
Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)];
Inkabcm = abs(Inkabc); th=angle(Inkabc);
if real(Inkabc(1)) > 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))
elseif real(Inkabc(1)) ==0 & imag(Inkabc(1)) < 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

else, end
else, end
else, end
end
if n==nf
fprintf('%7g',n), fprintf(' F'),
fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2))
fprintf(' %11.4f\n', Ifabcm(3))
else, end
end
resp=0;
while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1
& strcmp(resp, 'Y')~=1
resp = input('Another fault location? Enter ''y'' or ''n'' within single
quote -> ');
if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 &
strcmp(resp, 'Y')~=1
fprintf('\n Incorrect reply, try again \n\n'), end
end
if resp == 'y' | resp == 'Y'
nf = 999;
else ff = 0; end
end % end for while

llfault
function llfault(zdata1, Zbus1, zdata2, Zbus2, V)
if exist('zdata2') ~= 1
zdata2=zdata1;
else, end
if exist('Zbus2') ~= 1
Zbus2=Zbus1;
else, end

nl = zdata1(:,1); nr = zdata1(:,2);
R1 = zdata1(:,3); X1 = zdata1(:,4);
R2 = zdata2(:,3); X2 = zdata2(:,4);
ZB1 = R1 + j*X1; ZB2 = R2 + j*X2;
nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));
if exist('V') == 1
if length(V) == nbus
V0 = V;
else, end
else, V0 = ones(nbus, 1) + j*zeros(nbus, 1);
end
fprintf('\nLine-to-line fault analysis \n')
ff = 999;
while ff > 0
nf = input('Enter Faulted Bus No. -> ');
while nf <= 0 | nf > nbus
fprintf('Faulted bus No. must be between 1 & %g \n', nbus)
nf = input('Enter Faulted Bus No. -> ');
end
fprintf('\nEnter Fault Impedance Zf = R + j*X in ')
Zf = input('complex form (for bolted fault enter 0). Zf = ');
fprintf(' \n')
fprintf('Line-to-line fault at bus No. %g\n', nf)
a =cos(2*pi/3)+j*sin(2*pi/3);
sctm = [1 1 1; 1 a^2 a; 1 a a^2];
Ia0=0;
Ia1 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+Zf); Ia2=-Ia1;
I012=[Ia0; Ia1; Ia2];
Ifabc = sctm*I012;
Ifabcm = abs(Ifabc);
fprintf('Total fault current = %9.4f per unit\n\n', Ifabcm(2))

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

fprintf('Bus Voltages during the fault in per unit \n\n')


fprintf(' Bus -------Voltage Magnitude------- \n')
fprintf(' No. Phase a Phase b Phase c \n')
for n = 1:nbus
Vf0(n)= 0;
Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;
Vf2(n)= 0 - Zbus2(n, nf)*Ia2;
Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];
Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);
fprintf(' %5g',n)
fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))
fprintf(' %11.4f\n', abs(Vc(n)))
end
fprintf(' \n')
fprintf('Line currents for fault at bus No. %g\n\n', nf)
fprintf(' From To -----Line Current Magnitude---- \n')
fprintf(' Bus Bus Phase a Phase b Phase c \n')

for n= 1:nbus
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k ~= 0
Ink0(n, k) = 0;
Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I);
Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I);

Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)];


Inkabcm = abs(Inkabc); th=angle(Inkabc);
if real(Inkabc(2)) < 0

fprintf('%7g', n), fprintf('%10g', k),


fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))
elseif real(Inkabc(2)) ==0 & imag(Inkabc(2)) > 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))
else, end
else, end
else, end
end
if n==nf
fprintf('%7g',n), fprintf(' F'),
fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2))
fprintf(' %11.4f\n', Ifabcm(3))
else, end
end
resp=0;
while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1
& strcmp(resp, 'Y')~=1
resp = input('Another fault location? Enter ''y'' or ''n'' within single
quote -> ');
if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 &
strcmp(resp, 'Y')~=1
fprintf('\n Incorrect reply, try again \n\n'), end
end
if resp == 'y' | resp == 'Y'
nf = 999;
else ff = 0; end
end % end for while

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

dlgfault
function dlgfault(zdata0, Zbus0, zdata1, Zbus1, zdata2, Zbus2, V)

if exist('zdata2') ~= 1
zdata2=zdata1;
else, end
if exist('Zbus2') ~= 1
Zbus2=Zbus1;
else, end

nl = zdata1(:,1); nr = zdata1(:,2);
nl0 = zdata0(:,1); nr0 = zdata0(:,2);
nbr=length(zdata1(:,1)); nbus = max(max(nl), max(nr));
nbr0=length(zdata0(:,1));
R0 = zdata0(:,3); X0 = zdata0(:,4);
R1 = zdata1(:,3); X1 = zdata1(:,4);
R2 = zdata2(:,3); X2 = zdata2(:,4);

for k = 1:nbr0
if R0(k) == inf | X0(k) == inf
R0(k) = 99999999; X0(k) = 999999999;
else, end
end
ZB1 = R1 + j*X1; ZB0 = R0 + j*X0;
ZB2 = R2 + j*X2;

if exist('V') == 1
if length(V) == nbus
V0 = V;
else, end
else, V0 = ones(nbus, 1) + j*zeros(nbus, 1);
end

fprintf('\nDouble line-to-ground fault analysis \n')


ff = 999;
while ff > 0
nf = input('Enter Faulted Bus No. -> ');
while nf <= 0 | nf > nbus
fprintf('Faulted bus No. must be between 1 & %g \n', nbus)
nf = input('Enter Faulted Bus No. -> ');
end
fprintf('\nEnter Fault Impedance Zf = R + j*X in ')
Zf = input('complex form (for bolted fault enter 0). Zf = ');
fprintf(' \n')
fprintf('Double line-to-ground fault at bus No. %g\n', nf)
a =cos(2*pi/3)+j*sin(2*pi/3);
sctm = [1 1 1; 1 a^2 a; 1 a a^2];

Z11 = Zbus2(nf, nf)*(Zbus0(nf, nf)+ 3*Zf)/(Zbus2(nf, nf)+Zbus0(nf,


nf)+3*Zf);
Ia1 = V0(nf)/(Zbus1(nf,nf)+Z11);
Ia2 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/Zbus2(nf,nf);
Ia0 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/(Zbus0(nf,nf)+3*Zf);
I012=[Ia0; Ia1; Ia2];
Ifabc = sctm*I012; Ifabcm=abs(Ifabc);
Ift = Ifabc(2)+Ifabc(3);
Iftm = abs(Ift);

fprintf('Total fault current = %9.4f per unit\n\n', Iftm)


fprintf('Bus Voltages during the fault in per unit \n\n')
fprintf(' Bus -------Voltage Magnitude------- \n')
fprintf(' No. Phase a Phase b Phase c \n')

for n = 1:nbus

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Vf0(n)= 0 - Zbus0(n, nf)*Ia0;


Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1;
Vf2(n)= 0 - Zbus2(n, nf)*Ia2;
Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)];
Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3);
fprintf(' %5g',n)
fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n)))
fprintf(' %11.4f\n', abs(Vc(n)))
end
fprintf(' \n')
fprintf('Line currents for fault at bus No. %g\n\n', nf)
fprintf(' From To -----Line Current Magnitude---- \n')
fprintf(' Bus Bus Phase a Phase b Phase c \n')
for n= 1:nbus
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k ~= 0
Ink1(n, k) = (Vf1(n) - Vf1(k))/ZB1(I);
Ink2(n, k) = (Vf2(n) - Vf2(k))/ZB2(I);
else, end
else, end
end
for I = 1:nbr0
if nl0(I) == n | nr0(I) == n
if nl0(I) ==n k = nr0(I);
elseif nr0(I) == n k = nl0(I);
end
if k ~= 0
Ink0(n, k) = (Vf0(n) - Vf0(k))/ZB0(I);
else, end
else, end
end
for I = 1:nbr
if nl(I) == n | nr(I) == n
if nl(I) ==n k = nr(I);
elseif nr(I) == n k = nl(I);
end
if k ~= 0
Inkabc = sctm*[Ink0(n, k); Ink1(n, k); Ink2(n, k)];
Inkabcm = abs(Inkabc); th=angle(Inkabc);
if real(Inkabc(2)) < 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))
elseif real(Inkabc(2)) ==0 & imag(Inkabc(2)) > 0
fprintf('%7g', n), fprintf('%10g', k),
fprintf(' %11.4f', abs(Inkabc(1))),fprintf(' %11.4f',
abs(Inkabc(2)))
fprintf(' %11.4f\n', abs(Inkabc(3)))
else, end
else, end
else, end
end
if n==nf
fprintf('%7g',n), fprintf(' F'),
fprintf(' %11.4f', Ifabcm(1)),fprintf(' %11.4f', Ifabcm(2))
fprintf(' %11.4f\n', Ifabcm(3))
else, end
end
resp=0;
while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1
& strcmp(resp, 'Y')~=1

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

resp = input('Another fault location? Enter ''y'' or ''n'' within single


quote -> ');
if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp, 'y')~=1 &
strcmp(resp, 'Y')~=1
fprintf('\n Incorrect reply, try again \n\n'), end
end
if resp == 'y' | resp == 'Y'
nf = 999;
else ff = 0; end
end % end for while

OUTPUT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Quantity Calculated Value Simulated Value


FAULT CURRENT FOR
1. THREE PHASE FAULT
2. L-G FAULT
3. L-L FAULT
4. DOUBLE LINE FAULT

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 8
DATE:
TRANSIENT AND SMALL SIGNAL STABILITY ANALYSIS – SINGLE

MACHINE INFINITE BUS SYSTEM

AIM
To become familiar with various aspects of the transient and small signal stability
analysis of Single-Machine-Infinite Bus (SMIB) system.
OBJECTIVES
 To understand modeling and analysis of transient and small signal stability of a SMIB
power system.
 To examine the transient stability of a SMIB and determine the critical clearing time of the
system, through stimulation by trial and error method and by direct method.
 To assess the transient stability of a multi- machine power system when subjected to a
common disturbance sequence: fault application on a transmission line followed by fault
removal and line opening.
 To determine the critical clearing time.
THEORY
Stability: Stability problem is concerned with the behaviour of power system when it is
subjected to disturbance and is classified into small signal stability problem if the disturbances
are small and transient stability problem when the disturbances are large.
Transient stability: When a power system is under steady state, the load plus transmission loss
equals to the generation in the system. The generating units run a synchronous speed and
system frequency, voltage, current and power flows are steady. When a large disturbance such
as three phase fault, loss of load, loss of generation etc., occurs the power balance is upset and
the generating units rotors experience either acceleration or deceleration. The system may come
back to a steady state condition maintaining synchronism or it may break into subsystems or
one or more machines may pull out of synchronism. In the former case the system is said to be
stable and in the later case it is said to be unstable.
Small signal stability: When a power system is under steady state, normal operating condition,
the system may be subjected to small disturbances such as variation in load and generation,
change in field voltage, change in mechanical toque etc., The nature of system response to
small disturbance depends on the operating conditions, the transmission system strength, types
of controllers etc. Instability that may result from small disturbance may be of two forms,
(i) Steady increase in rotor angle due to lack of synchronising torque.
(ii) Rotor oscillations of increasing magnitude due to lack of sufficient damping
torque.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

FORMULA
Reactive power Qe = sin(cos-1(p.f))
S*
Stator Current It =
Et*
Pe - jQe
=
Et*
Voltage behind transient condition
E1 = Et + j Xd1It
Voltage of infinite bus
EB = Et - j( X3 + Xtr )It
X1 X2
where, X3 =
X1 + X2
Angular separation between E1 and EB
o =  E1 -  EB
Prefault Operation:
X1 X2
1
X = j Xd + jXtr +
X1 + X2
1
E x EB
Power Pe = sino
X

Pe * X
o = sin-1
E1 * EB
During Fault Condition:
Pe = PEii = 0
Find out X from the equivalent circuit during fault condition
Post fault Condition:
Find out X from the equivalent circuit during post fault condition

E1 x EB
Power Pe = sino
X
max =  - o
Pm
Pe =
sinmax

Critical Clearing Angle:

Pm(max - o ) + P3maxcosmax - P2maxcoso


Coscr =
P3max - P2max

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Critical Clearing Time:

2H (cr - o)
tcr =
 fo Pm Secs

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
Transient stability of SMIB system
A 60Hz synchronous generator having inertia constant H = 5 MJ/MVA and a direct axis
transient reactance Xd1 = 0.3 per unit is connected to an infinite bus through a purely reactive
circuit as shown in figure. Reactances are marked on the diagram on a common system base.
The generator is delivering real power Pe = 0.8 per unit and Q = 0.074 per unit to the infinite
bus at a voltage of V = 1 per unit.

a) A temporary three-phase fault occurs at the sending end of the line at point [Link] the
fault is cleared, both lines are intact. Determine the critical clearing angle and the critical
fault clearing time.
b) A three phase fault occurs at the middle of one of the lines, the fault is cleared and teh
faulted line is isolated. Determine the critical clearing angle.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
a) Pm = 0.8; E = 1.17; V = 1.0;

X1 = 0.65; X2 = inf; X3 = 0.65;


eacfault(Pm, E, V, X1, X2, X3)

b) Pm = 0.8; E = 1.17; V = 1.0;

X1 = 0.65; X2 = 1.8; X3 = 0.8;


eacfault(Pm, E, V, X1, X2, X3)

eacfault
function eacfault(Pm, E, V, X1, X2, X3)
if exist('Pm')~=1
Pm = input('Generator output power in p.u. Pm = '); else, end
if exist('E')~=1
E = input('Generator e.m.f. in p.u. E = '); else, end
if exist('V')~=1
V = input('Infinite bus-bar voltage in p.u. V = '); else, end
if exist('X1')~=1
X1 = input('Reactance before Fault in p.u. X1 = '); else, end
if exist('X2')~=1
X2 = input('Reactance during Fault in p.u. X2 = '); else, end
if exist('X3')~=1
X3 = input('Reactance aftere Fault in p.u. X3 = '); else, end
Pe1max = E*V/X1; Pe2max=E*V/X2; Pe3max=E*V/X3;
delta = 0:.01:pi;
Pe1 = Pe1max*sin(delta); Pe2 = Pe2max*sin(delta); Pe3 =
Pe3max*sin(delta);
d0 =asin(Pm/Pe1max); dmax = pi-asin(Pm/Pe3max);
cosdc = (Pm*(dmax-d0)+Pe3max*cos(dmax)-Pe2max*cos(d0))/(Pe3max-
Pe2max);
if abs(cosdc) > 1
fprintf('No critical clearing angle could be found.\n')
fprintf('system can remain stable during this
disturbance.\n\n')
return
else, end
dc=acos(cosdc);
if dc > dmax
fprintf('No critical clearing angle could be found.\n')
fprintf('System can remain stable during this
disturbance.\n\n')
return
else, end
Pmx=[0 pi-d0]*180/pi; Pmy=[Pm Pm];
x0=[d0 d0]*180/pi; y0=[0 Pm]; xc=[dc dc]*180/pi; yc=[0
Pe3max*sin(dc)];
d0=d0*180/pi; dmax=dmax*180/pi; dc=dc*180/pi;
x=(d0:.1:dc);
y=Pe2max*sin(x*pi/180);
y1=Pe2max*sin(d0*pi/180);
y2=Pe2max*sin(dc*pi/180);
x=[d0 x dc];
y=[Pm y Pm];

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

xx=dc:.1:dmax;
h=Pe3max*sin(xx*pi/180);
xx=[dc xx dmax];
hh=[Pm h Pm];
delta=delta*180/pi;
if X2 == inf
fprintf('\nFor this case tc can be found from analytical
formula. \n')
H=input('To find tc enter Inertia Constant H, (or 0 to skip) H =
');
if H ~= 0
d0r=d0*pi/180; dcr=dc*pi/180;
tc = sqrt(2*H*(dcr-d0r)/(pi*60*Pm));
else, end
else, end
%clc
fprintf('\nInitial power angle = %7.3f \n', d0)
fprintf('Maximum angle swing = %7.3f \n', dmax)
fprintf('Critical clearing angle = %7.3f \n\n', dc)
if X2==inf & H~=0
fprintf('Critical clearing time = %7.3f sec. \n\n', tc)
else, end
h = figure; figure(h);
fill(x,y,'m')
hold;
fill(xx,hh,'c')
plot(delta, Pe1,'-', delta, Pe2,'r-', delta, Pe3,'g-', Pmx,
Pmy,'b-', x0,y0, xc,yc, xm,ym), grid
Title('Application of equal area criterion to a critically
cleared system')
xlabel('Power angle, degree'), ylabel(' Power, per unit')
text(5, 1.07*Pm, 'Pm')
text(50, 1.05*Pe1max,['Critical clearing angle = ',num2str(dc)])
axis([0 180 0 1.1*Pe1max])
hold off;

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
E=1.35; V=1.0; H=9.94; X=0.65; Pm=0.6; D=0.138; f0=60;
Pmax=E*V/X, d0=asin(Pm/Pmax)
Ps=Pmax*cos(d0)
wn=sqrt(pi*60/H*Ps)
z=D/2*sqrt(pi*60/(H*Ps))
wd=wn*sqrt(1-z^2),fd=wd/(2*pi)
tau=1/(z*wn)
th=acos(z)
Dd0=10*pi/180;
t=0:.01:3;
Dd=Dd0/sqrt(1-z^2)*exp(-z*wn*t).*sin(wd*t+th);
d=(d0+Dd)*180/pi;
Dw=-wn*Dd0/sqrt(1-z^2)*exp(-z*wn*t).*sin(wd*t);
f=f0+Dw/(2*pi);
subplot(2,1,1),plot(t,d),grid
xlabel('t sec'),ylabel('Delta degree')
subplot(2,1,2),plot(t,f),grid
xlabel('t sec'),ylabel('frquency hertz')
subplot(111)

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Small signal stability of SMIB system


A 60Hz synchronous generator having inertia constant H = 9.94 MJ/MVA and a direct axis
transient reactance Xd1 = 0.3 per unit is connected to an infinite bus through a purely reactive
circuit as shown in figure. Reactances are marked on the diagram on a common system base.
The generator is delivering real power Pe = 0.6 per unit and 0.8 power factor lagging to the
infinite bus at a voltage of V = 1 per unit.

Assume the per unit damping power co-efficient is D=0.138. Consider a small disturbance of
∆δ=10°=0.1745 radian. Obtain equations describing the motion of the rotor angle and the
generator frequency.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Output:

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 9
DATE:
LOAD FLOW ANALYSIS OF LARGE SYSTEM FOR DIFFERENT LOAD
CONDITION USING MATLAB SOFTWARE
AIM:
To carryout load flow analysis of large system for different load condition using
Newton raphson method.
ALGORITHM:
Step-1: Assume a flat voltage profile 1 + j0 for all buses (nodes) except the slack bus. The
voltage of the slack bus is the specified voltage and it is not modified in any iteration.
Step-2: Assume a suitable value of ε called convergence criterion. Hence ε is a specified
change in the residue that is used to compare the critical residues (Δ P and Δ Q or Δ V) at the
end of each iteration.
Step-3: Set iteration count k = 0, and assumed voltage profile of the buses are denoted as V10,
V20 …Vn0 except slack bus.
Step-4: Set bus count p = 1.
Step-5: Check for slack bus. If it is a slack bus then go to Step 13, otherwise go to next step.
Step-6: Calculate the real and reactive power of bus-p using the following equation.

Step-7: Calculate the change in real power, change in real power, Δ Pk = Pp,spec – Ppk; where
Pp,spec = Specified real power for bus-p.
Step-8: Check for Generator bus. If it is a Generator bus go to next step, otherwise go to Step
12.
Step-9: Check for reactive power limit violation of Generator buses. For this compare the
calculated reactive power Qpk with specified limits. If the limit is violated go to Step 11,
otherwise go to next step.
Step-10: If the calculated reactive power is within the specified limits then consider this bus as
Generator bus. Now calculate the voltage residue (change in voltage) using the following
equation.
| Δ Vpk|2 = |Vp|spec2 - |Vpk|2 where |Vp|spec = specified voltage.
Step-11: If the reactive power limit is violated then treat this bus as a load bus. Now the
specified reactive power for this bus will correspond to the limit violated. i.e., if Qpk < Qp, min
then Qp, spec = Qp, min
(Or) if Qpk > Qp, min then Qp, spec = Qp, max
Step-12: Calculate the change in reactive power for load bus (or for the Generator bus treated
as load bus). Change in reactive power, Δ Qpk = |Qp, spec| - Qpk
Step-13: Repeat steps 5 to12 until all residues (change in P and Q or V) are calculated. For this
increment the bus count by 1 and go to Step 5, until the bus count is n.
Step-14: Determine the largest of the absolute value of the residue (i.e., find the largest among
Δ Pk ,
Δ Qk or |Δ Vpk|2. Let this largest change be Δ E.
Step-15: Compare Δ E and ε. If Δ E < ε then to Step 20, If Δ E > ε go to next step.
Step-16: Determine the elements of Jacobian matrix (J) by partially differentiating the load
flow equations and evaluating the equation using Kth iteration values.
Step-17: Calculate the increments in real and reactive part of voltages.
Step-18: Calculate the new bus voltage.
Step-19: Advance the iteration count, i.e., k = k + 1 and go to Step 4.
Step-20: Calculate the line flows.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
1. Obtain the power flow solution for the IEEE-30 bus system by Newton Raphson
method,
The data for the voltage controlled buses are
Transformer tap setting

Regulated bus data


Min Max
Bus Voltage
Mvar Mvar
no magnitude
capacity capacity
2 1.043 -40 50
5 1.010 -40 40
8 1.010 -10 40
11 1.082 -6 24
13 1.071 -6 24

Injected Q due
to capacitors
Bus
Mvar
no
10 19
24 4.3

Transformer data
Tap
Transformer
setting
designation
pu
4-12 0.932
6-9 0.978
6-10 0.969
28-27 0.968

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clear
basemva = 100; accuracy = 0.001; accel = 1.8; maxiter = 100;

% IEEE 30-BUS TEST SYSTEM (American Electric Power)


% Bus Bus Voltage Angle ---Load---- -------Generator----- Static
Mvar
% No code Mag. Degree MW Mvar MW Mvar Qmin Qmax +Qc/-Ql
busdata=[1 1 1.06 0.0 0.0 0.0 0.0 0.0 0 0 0
2 2 1.043 0.0 21.70 12.7 40.0 0.0 -40 50 0
3 0 1.0 0.0 2.4 1.2 0.0 0.0 0 0 0
4 0 1.06 0.0 7.6 1.6 0.0 0.0 0 0 0
5 2 1.01 0.0 94.2 19.0 0.0 0.0 -40 40 0
6 0 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
7 0 1.0 0.0 22.8 10.9 0.0 0.0 0 0 0
8 2 1.01 0.0 30.0 30.0 0.0 0.0 -30 40 0
9 0 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
10 0 1.0 0.0 5.8 2.0 0.0 0.0 -6 24 19
11 2 1.082 0.0 0.0 0.0 0.0 0.0 0 0 0
12 0 1.0 0 11.2 7.5 0 0 0 0 0
13 2 1.071 0 0 0.0 0 0 -6 24 0
14 0 1 0 6.2 1.6 0 0 0 0 0
15 0 1 0 8.2 2.5 0 0 0 0 0
16 0 1 0 3.5 1.8 0 0 0 0 0
17 0 1 0 9.0 5.8 0 0 0 0 0
18 0 1 0 3.2 0.9 0 0 0 0 0
19 0 1 0 9.5 3.4 0 0 0 0 0
20 0 1 0 2.2 0.7 0 0 0 0 0
21 0 1 0 17.5 11.2 0 0 0 0 0
22 0 1 0 0 0.0 0 0 0 0 0
23 0 1 0 3.2 1.6 0 0 0 0 0
24 0 1 0 8.7 6.7 0 0 0 0 4.3
25 0 1 0 0 0.0 0 0 0 0 0
26 0 1 0 3.5 2.3 0 0 0 0 0
27 0 1 0 0 0.0 0 0 0 0 0
28 0 1 0 0 0.0 0 0 0 0 0
29 0 1 0 2.4 0.9 0 0 0 0 0
30 0 1 0 10.6 1.9 0 0 0 0 0];

% Line code
% Bus bus R X 1/2 B = 1 for lines
% nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl
linedata=[1 2 0.0192 0.0575 0.02640 1
1 3 0.0452 0.1852 0.02040 1
2 4 0.0570 0.1737 0.01840 1
3 4 0.0132 0.0379 0.00420 1
2 5 0.0472 0.1983 0.02090 1
2 6 0.0581 0.1763 0.01870 1
4 6 0.0119 0.0414 0.00450 1
5 7 0.0460 0.1160 0.01020 1
6 7 0.0267 0.0820 0.00850 1
6 8 0.0120 0.0420 0.00450 1
6 9 0.0 0.2080 0.0 0.978
6 10 0 .5560 0 0.969
9 11 0 .2080 0 1
9 10 0 .1100 0 1
4 12 0 .2560 0 0.932
12 13 0 .1400 0 1
12 14 .1231 .2559 0 1
12 15 .0662 .1304 0 1
12 16 .0945 .1987 0 1
14 15 .2210 .1997 0 1
16 17 .0824 .1923 0 1
15 18 .1073 .2185 0 1

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

18 19 .0639 .1292 0 1
19 20 .0340 .0680 0 1
10 20 .0936 .2090 0 1
10 17 .0324 .0845 0 1
10 21 .0348 .0749 0 1
10 22 .0727 .1499 0 1
21 22 .0116 .0236 0 1
15 23 .1000 .2020 0 1
22 24 .1150 .1790 0 1
23 24 .1320 .2700 0 1
24 25 .1885 .3292 0 1
25 26 .2544 .3800 0 1
25 27 .1093 .2087 0 1
28 27 0 .3960 0 0.968
27 29 .2198 .4153 0 1
27 30 .3202 .6027 0 1
29 30 .2399 .4533 0 1
8 28 .0636 .2000 0.0214 1
6 28 .0169 .0599 0.065 1];

lfybus % form the bus admittance matrix


lfgauss % Load flow solution by Gauss-Seidel method
busout % Prints the power flow solution on the screen
lineflow % Computes and displays the line flow and losses

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

2. Repeat the above problem with the small load change.

Program:
clear
basemva = 100; accuracy = 0.001; accel = 1.8; maxiter = 100;

% IEEE 30-BUS TEST SYSTEM (American Electric Power)


% Bus Bus Voltage Angle ---Load---- -------Generator----- Static
Mvar
% No code Mag. Degree MW Mvar MW Mvar Qmin Qmax +Qc/-Ql
busdata=[1 1 1.06 0.0 0.0 0.0 0.0 0.0 0 0 0
2 2 1.043 0.0 10.00 12.7 40.0 0.0 -40 50 0
3 0 1.0 0.0 2.4 1.2 0.0 0.0 0 0 0
4 0 1.06 0.0 7.6 1.6 0.0 0.0 0 0 0
5 2 1.01 0.0 94.2 19.0 0.0 0.0 -40 40 0
6 0 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
7 0 1.0 0.0 22.8 10.9 0.0 0.0 0 0 0
8 2 1.01 0.0 30.0 30.0 0.0 0.0 -30 40 0
9 0 1.0 0.0 0.0 0.0 0.0 0.0 0 0 0
10 0 1.0 0.0 15.8 2.0 0.0 0.0 -6 24 19
11 2 1.082 0.0 0.0 0.0 0.0 0.0 0 0 0
12 0 1.0 0 11.2 7.5 0 0 0 0 0
13 2 1.071 0 0 0.0 0 0 -6 24 0
14 0 1 0 6.2 1.6 0 0 0 0 0
15 0 1 0 8.2 2.5 0 0 0 0 0
16 0 1 0 3.5 1.8 0 0 0 0 0
17 0 1 0 9.0 5.8 0 0 0 0 0
18 0 1 0 3.2 0.9 0 0 0 0 0
19 0 1 0 9.5 3.4 0 0 0 0 0
20 0 1 0 2.2 0.7 0 0 0 0 0
21 0 1 0 17.5 11.2 0 0 0 0 0
22 0 1 0 0 0.0 0 0 0 0 0
23 0 1 0 3.2 1.6 0 0 0 0 0
24 0 1 0 8.7 6.7 0 0 0 0 4.3
25 0 1 0 0 0.0 0 0 0 0 0
26 0 1 0 3.5 2.3 0 0 0 0 0
27 0 1 0 0 0.0 0 0 0 0 0
28 0 1 0 0 0.0 0 0 0 0 0
29 0 1 0 2.4 0.9 0 0 0 0 0
30 0 1 0 10.6 1.9 0 0 0 0 0];

% Line code
% Bus bus R X 1/2 B = 1 for lines
% nl nr p.u. p.u. p.u. > 1 or < 1 tr. tap at bus nl
linedata=[1 2 0.0192 0.0575 0.02640 1
1 3 0.0452 0.1852 0.02040 1
2 4 0.0570 0.1737 0.01840 1
3 4 0.0132 0.0379 0.00420 1
2 5 0.0472 0.1983 0.02090 1
2 6 0.0581 0.1763 0.01870 1
4 6 0.0119 0.0414 0.00450 1
5 7 0.0460 0.1160 0.01020 1
6 7 0.0267 0.0820 0.00850 1
6 8 0.0120 0.0420 0.00450 1
6 9 0.0 0.2080 0.0 0.978
6 10 0 .5560 0 0.969
9 11 0 .2080 0 1
9 10 0 .1100 0 1
4 12 0 .2560 0 0.932
12 13 0 .1400 0 1
12 14 .1231 .2559 0 1
12 15 .0662 .1304 0 1
12 16 .0945 .1987 0 1
14 15 .2210 .1997 0 1
16 17 .0824 .1923 0 1

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

15 18 .1073 .2185 0 1
18 19 .0639 .1292 0 1
19 20 .0340 .0680 0 1
10 20 .0936 .2090 0 1
10 17 .0324 .0845 0 1
10 21 .0348 .0749 0 1
10 22 .0727 .1499 0 1
21 22 .0116 .0236 0 1
15 23 .1000 .2020 0 1
22 24 .1150 .1790 0 1
23 24 .1320 .2700 0 1
24 25 .1885 .3292 0 1
25 26 .2544 .3800 0 1
25 27 .1093 .2087 0 1
28 27 0 .3960 0 0.968
27 29 .2198 .4153 0 1
27 30 .3202 .6027 0 1
29 30 .2399 .4533 0 1
8 28 .0636 .2000 0.0214 1
6 28 .0169 .0599 0.065 1];

lfybus % form the bus admittance matrix


lfgauss % Load flow solution by Gauss-Seidel method
busout % Prints the power flow solution on the screen
lineflow % Computes and displays the line flow and losses

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 10
DATE:
ELECTROMAGNETIC TRANSIENTS IN POWER SYSTEMS

AIM:
a. To study and understand the electromagnetic transient phenomena in power systems
caused due to switching and fault by PSCAD software.
b. To become proficient in the usage of PSCAD software to address problems in the areas
of overvoltage protection and mitigation and insulation coordination of EHV systems.

OBJECTIVES:
a. To study the transients due to energization of a single-phase and three-phase load from a
non- ideal source with line represented by π model.
b. To study the transients due to energization of a single-phase and three-phase load from a
non- ideal source and line represented by distributed parameters.
c. To study the transient over voltages due to faults for a SLG fault at far end of a line.
d. To study the Transient Recovery Voltage (TRV) associated with a breaker

Solution Method for Electromagnetic Transients Analysis


Intentional and inadvertent switching operations in EHV systems initiate over voltages,
which might attain dangerous values resulting in destruction of apparatus. Accurate
computation of these over voltages is essential for proper sizing, coordination of insulation of
various equipments and specification of protective devices. Meaningful design of EHV systems
is dependent on modeling philosophy built into a computer program. The models of
equipment’s must be detailed enough to reproduce actual conditions successfully – an
important aspect where a general purpose digital computer program scores over transient
network analyzers. The program employs a direct integration time-domain technique evolved
by Dommel. The essence of this method is discretization of differential equations associated
with network elements using trapezoidal rule of integration and solution of the resulting
difference equations for the unknown voltages. Any network which consists of interconnections
of resistances, inductances, capacitances, single and multiphase π circuits, distributed parameter
lines, and certain other elements can be solved. To keep the explanations simple, however
single phase network elements will be used rather than the more complex multiphase network
elements.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

SOLUTION METHOD FOR ELECTROMAGNETIC TRANSIENTS ANALYSIS:


Intentional and inadvertent switching operations in EHV systems initiate over voltages,
which might attain dangerous values resulting in destruction of apparatus. Accurate
computation of these voltages is essential for proper sizing, co-ordination of insulation of
various equipments and specification of protective devices. Meaningful use of EHV is
dependent on modeling philosophy built into a computer program. The models of equipments
must be detailed enough to reproduce actual conditions successfully –an important aspect
where a general purpose digital computer program scores over transient network analyzers.

The program employs a direct integration time-domain technique evolved by Dommel.


The essence of this method is discretization of differential equations associated with network
elements using trapezoidal rule of integration and solution of the resulting equations for the
unknown voltages. Any network which consists of interconnections of resistances, inductances,
capacitances, single and multiphase pi circuits, distributed parameter lines, and certain other
elements can be solved. To keep the explanations simple, however, single phase network
elements will be used, rather than the complex multiphase network elements.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM
1. Prepare the data for the network given in the given figure and run PSCAD software .Obtain
the plots of source voltage, load bus voltage and load current following the energization of a
single-phase load. Comment on the results. Double the source inductance and obtain the
plots of the variables mentioned earlier. Comment on the effect of doubling the source
inductance. Energization of a single phase 0.95 pf load from a non ideal source and a
more realistic line representation (lumped R,L,C ) using PSCAD software.

PSCAD MODEL

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 11
DATE:
LOAD – FREQUENCY DYNAMICS OF SINGLE- AREA POWER
SYSTEMS
AIM:
To become familiar with the modeling and analysis of load frequency and tie line flow
dynamics of a power systems with load frequency controller (LFC) under different control
modes and to design improved controllers to obtain the best system response.
OBJECTIVES:
i. To study the time response(both steady state and transient) of area frequency deviation
and transient power output change of regulating generator following a small load
change in a single-area power system with the regulating generator under “free governor
action” for different operating conditions and different system parameters.
ii. To study the time response (both steady state and transient) of area frequency deviation
and the turbine output change of regulating generator following a small load change in a
single area system provided with an integral frequency controller, to study the effect of
changing the gain of the controller and to select the best gain for the controller to obtain
the best response.
iii. To analyze the time response of area frequency deviation and net interchange deviation
following a small load change in one of the areas in an inter connected two area power
system under different control modes, to study the effect of changes in controller
parameters on the response and to select the optimal set of parameters for the controllers
to obtain the best response under different operating conditions.

LOAD FREQUENCY CONTROL:


Primary control:
The speed change from the synchronous speed initiates the governor control action resulting in
all the participating generator-turbine units taking up the change in load, and stabilizes the
system frequency.

Secondary control:
It adjusts the load reference set points of selected turbine-generator units so as to give nominal
value of frequency. The frequency control is a matter of speed control of the machines in the
generating stations. The frequency of a power system is dependent entirely upon the speed in
which the generators are rotated by their prime movers. All prime movers, whether they are
steam or hydraulic turbines, are equipped with speed governors which are purely mechanical
speed sensitive devices, to adjust the gate or control valve opening for the constant speed.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

N = 120 f / P
Therefore Nαf
where, N = Speed in rpm
f = Frequency in Hz
P = Number of poles.

ΔXE(s) = [ΔPc (s) – (1/R) ΔF(s) ] x


where R = = speed regulation of the governor in Hz/MW
kG = = Gain of speed governor
TG = = Time constant of speed governor
Turbine model:

Tt = Time constant of turbine


k t = Gain constant
ΔPV(s) = per unit change in valve position from nominal value
Generator Load model:

ΔPD(s) = Real load change


k p = 1/B = Power system gain
Tp = 2H/Bfo = Power system time constant

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
1. The load dynamics of a single area system are Pr=2000 MW; NOL=1000MW;H=5s;f=50Hz;
R=4%; TG=0.08s;TT=0.3s; Assume linear characteristics . The area has governor but not
frequency control. It is subjected to an increase of 20MW. Construct simulink diagram and
hence i) determine steady state frequency. ii) If speed governor loop was open, what would
be the frequency drop? iii) Prove frequency is zero if secondary controller is included.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Model of load frequency control with integral control of single area system:

Program:
clear all;
clc;
rac=input('Enter the value of Related Area capcity:');
nol=input('Enter the value of nominal operating load:');
f=input('Enter the value of frequency:');
cil=input('Enter the value of change in load:');
dpd=input('Enter the value of deviation in load in percentage:');
df=input('Enter the value of deviation in frequency in percentage:');
r=input('Enter the value of regulation in Hz/pu MW:');
H=input('Enter the value of Inertia Time constant:');
D=((dpd*(nol))/(df*f));
Dpu=(D/rac);
Kp=(1/Dpu);
Tp=((2*H)/(f*Dpu));
delpd=cil/rac;
if r~= inf
B=(Dpu+(1/r));
else
B=(Dpu);
end
Fs=-(delpd/B);
disp('The static gain of the power system in Hz/pu MW' );
Kp
disp('The Time constant of the power system in seconds');
Tp
disp('Steady state frequency deviation in Hz');
Fs

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

WITH GAIN

Frequency response

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

WITHOUT GAIN

Frequency response

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

WITH INTEGRAL CONTROLLER

Frequency response

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 12
DATE:
LOAD – FREQUENCY DYNAMICS OF MULTI-AREA POWER
SYSTEMS

AIM:
To become familiar with the modeling and analysis of load frequency and tie line flow
dynamics of a power systems with load frequency controller (LFC) under different control
modes and to design improved controllers to obtain the best system response.
OBJECTIVES:
i. To study the time response(both steady state and transient) of area frequency deviation
and transient power output change of regulating generator following a small load
change in a single-area power system with the regulating generator under “free governor
action” for different operating conditions and different system parameters.
ii. To study the time response (both steady state and transient) of area frequency deviation
and the turbine output change of regulating generator following a small load change in a
single area system provided with an integral frequency controller, to study the effect of
changing the gain of the controller and to select the best gain for the controller to obtain
the best response.
iii. To analyze the time response of area frequency deviation and net interchange deviation
following a small load change in one of the areas in an inter connected two area power
system under different control modes, to study the effect of changes in controller
parameters on the response and to select the optimal set of parameters for the controllers
to obtain the best response under different operating conditions.
LOAD FREQUENCY CONTROL:
Primary control:
The speed change from the synchronous speed initiates the governor control action
resulting in all the participating generator-turbine units taking up the change in load, and
stabilizes the system frequency.
Secondary control:
It adjusts the load reference set points of selected turbine-generator units so as to give
nominal value of frequency. The frequency control is a matter of speed control of the machines
in the generating stations. The frequency of a power system is dependent entirely upon the
speed in which the generators are rotated by their prime movers. All prime movers, whether
they are steam or hydraulic turbines, are equipped with speed governors which are purely
mechanical speed sensitive devices, to adjust the gate or control valve opening for the constant
speed.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

N = 120 f / P
Therefore Nαf
where, N = Speed in rpm
f = Frequency in Hz
P = Number of poles.

ΔXE(s) = [ΔPc (s) – (1/R) ΔF(s) ] x


where R = = speed regulation of the governor in Hz/MW
kG = = Gain of speed governor
TG = = Time constant of speed governor
Turbine model:

Tt = Time constant of turbine


k t = Gain constant
ΔPV(s) = per unit change in valve position from nominal value
Generator Load model:

ΔPD(s) = Real load change


k p = 1/B = Power system gain
Tp = 2H/Bfo = Power system time constant
Model of load frequency control with integral control of single area system:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

FOR TWO AREA SYSTEMS


1. A two area system connected by a tie line has the following parameters on a 1000 MVA
base. R1=0.05pu, R2=0.0625pu,D1=0.6, D2=0.9,H1=5,H2=4; Base power1=Base
power2=1000MVA, TG1=0.2s, TG2=0.3s, TT1=0.5s,TT2=0.6s. The units are operating in
parallel at the nominal frequency of 50Hz. The synchronizing power coefficient is 2pu. A
load change of 200MW occurs in area1. Find the new steady state frequency and change in
the tie line flow. Construct simulink block diagram and find deviation in frequency
response for the condition mentioned.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clear all;
clc;
rac1=input('Enter the value of Related area capacity-1 in MW:');
cil1=input('Enter the value of change in load-1 in MW:');
D1=input('Enter the value of damping coefficient-1 in pu:');
r1=input('Enter teh value of regulation-1 in pu:');
rac2=input('Enter the value of Related area capacity-2 in MW:');
cil2=input('Enter the value of change in load-2 in MW:');
D2=input('Enter the value of damping coefficient-2 in pu:');
r2=input('Enter teh value of regulation-2 in pu:');
f0=input('Enter the value of frequency:');
B1=(D1+(1/r1));
B1=B1/f0;
B2=(D1+(1/r2));
B2=B2/f0;
delpd1=cil1/rac1;
delpd2=cil2/rac2;
a12=-(rac1/rac2);
delf=((a12*delpd1)-delpd2)/(B2-(a12*B1));
f=f0+delf;
delptie=((B1*delpd2)-(B2*delpd1))/(B2-(a12*B1));
delptie=delptie*rac1;
fprintf('Steady state frequency deviation is : %g Hz\n',delf);
fprintf('System frequency :%g Hz\n',f);
fprintf('Change in tie line flow from area 1 to area 2 :%g MW\n',
delptie);

Output:
Enter the value of Related area capacity-1 in MW:1000
Enter the value of change in load-1 in MW:200
Enter the value of damping coefficient-1 in pu:0.6
Enter the value of regulation-1 in pu:0.05
Enter the value of Related area capacity-2 in MW:1000
Enter the value of change in load-2 in MW:0
Enter the value of damping coefficient-2 in pu:0.9
Enter teh value of regulation-2 in pu:0.0625
Enter the value of frequency:50
Steady state frequency deviation is : -0.268817 Hz
System frequency :49.7312 Hz
Change in tie line flow from area 1 to area 2 :-89.2473 MW

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

1. A two area system connected by a tie line has the following parameters on a 1000 MVA
base. R1=0.05pu, R2=0.0625pu, D1=0.6, D2=0.9, H1=5, H2=4; Base power1=Base
power2=1000MVA, TG1=0.2s, TG2=0.3s, TT1=0.5s, TT2=0.6s. The units are operating in
parallel at the nominal frequency of 50Hz. The synchronizing power coefficient is 2pu.
A load change of 200MW occurs in area1. Find the new steady state frequency and
change in the tie line flow. Construct simulink block diagram with the inclusion of the
ACE’s and find deviation in frequency response for the condition mentioned.

Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 13
DATE:
ECONOMIC DISPATCH IN POWER SYSTEMS
AIM:
To understand the fundamentals of economic dispatch and solve the problem using
classical method with and without line losses.
Mathematical Model for Economic Dispatch of Thermal Units
Statement of Economic Dispatch Problem
In a power system, with negligible transmission loss and with N number of spinning
thermal generating units the total system load PD at a particular interval can be met by different
sets of generation schedules

{PG1(k) , PG2(k) , ………………PGN(K) }; k = 1,2,……..NS


Out of these NS set of generation schedules, the system operator has to choose the set of
schedules, which minimize the system operating cost, which is essentially the sum of the
production cost of all the generating units. This economic dispatch problem is mathematically
stated as an optimization problem.

Given : The number of available generating units N, their production cost functions, their
operating limits and the system load PD,
To determine: The set of generation schedules,
PGi ; i = 1,2………N (1)
Which minimize the total production cost,
N
Min ; FT =  Fi (PGi ) (2)
i=1

and satisfies the power balance constraint


N
=  PGi –PD = 0 (3)
i=1

and the operating limits


PGi,min  PGi  PGi, ,max (4)
The units production cost function is usually approximated by quadratic function
Fi (PGi) = ai PG2i + bi PGi + ci ; i = 1,2,…….N (5)
where ai , bi and ci are constants
Necessary conditions for the existence of solution to ED problem
The ED problem given by the equations (1) to (4). By omitting the inequality constraints
(4) tentatively, the reduce ED problem (1),(2) and (3) may be restated as an unconstrained
optimization problem by augmenting the objective function (1) with the constraint  multiplied
by LaGrange multiplier,  to obtained the LaGrange function, L as

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

N N

Min: L (PG1 ……..PGN , ) =  Fi(PGi) -  [ PGi – PD] (6)


i=1 i=1

The necessary conditions for the existence of solution to (6) are given by
L / PGi = 0 = dFi (PGi) / dPGi -  ; i = 1, 2,……..N (7)
N

L /  = 0 =  PGi – PD (8)
i=1

The solution to ED problem can be obtained by solving simultaneously the necessary


conditions (7) and (8) which state that the economic generation schedules not only satisfy the
system power balance equation (8) but also demand that the incremental cost rates of all the
units be equal be equal to  which can be interpreted as “incremental cost of received power”.
When the inequality constraints(4) are included in the ED problem the necessary condition (7)
gets modified as
dFi (PGi) / dPGi =  for PGi,min  PGi  PGi, ,max
 for PGi = PGi, ,max
`  for PGi = PGi, ,mi ____ (9)
Economic Schedule
PGi = ( -bi)/ 2ai ; i=1,2…………….N (10)
Incremental fuel cost
N N
= PD + ( bi/2ai ) /  (1/2ai) (11)
i=1 i=1

ALGORITHM:
1. Read the total number of generating units, power demand, fuel cost and Bmn , co-
efficient.
2. Find the initial value of lambda by using the given formula
N bi
PD  
i 1 2 a i
 
N 1

i 1 2 a i
3. Calculate the value of
PGi    bi  / 2ai
4. If PGi  Pmax ,then PGi  Pmax
If PGi  Pmin , then PGi  P min
5. Calculate the change in power,
p   PGi  PD .
6. If P  0.0001, then stop. Otherwise go to next step.
7. Calculate change in lambda.
N 
  P /   (1 / 2ai ) 
 i 1 
8. If  PGi  PD ,     
Otherwise,     

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

9. Read the total number of generating units, power demand, fuel cost and Bmn co-
efficient.
10. Find the initial value of lambda by using the given formula
bi
N
PD  
i 1 2 a i
 
N 1

i 1 2 a i
11. Calculate the value of
 
N
 
PGi  1  bi /     2  Bij  PGi / 2 ai /    2  Bii 
 j 1 
12. If PGi  Pmax ,then PGi  Pmax
If PGi  Pmin , then PGi  P min
13. Calculate the transmission loss
N N

PL    PGi  Bij  PGj 
i 1 j 1
14. Calculate the change in power,
p   PGi  PL  PD .
15. If P  0.0001, then stop. Otherwise go to next step.
16. Calculate change in lambda
N 
  P /   (1 / 2ai ) 
 i 1 
17. If  PGi  PD ,     
Otherwise,     
18. Stop the program.

PROCEDURE
1. Enter the command window of the MATLAB.
2. Create a new M – file by selecting File - New – M – File
3. Type and save the program.
4. Execute the program by either pressing Tools – Run.
5. View the results.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM1a: (WITHOUT LOSS AND GENERATING LIMITS)


A power plant has three units with the following cost characteristics:
C 1  0 .004 PG21  5 .3 PG1  500 Rs / hr
C 2  0 .006 PG22  5 .5 PG 2  400 Rs / hr
C 3  0 .009 PG23  5 .8 PG 3  200 Rs / hr

where PGi ’s are in MW. Find the scheduling for a load of 975 MW.
Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clc;
clear all;
n=input('Enter the number of units:');
a=zeros(n);
b=zeros(n);
c=zeros(n);
for i=1:n
fprintf('Enter the unit %g Data \n',i);
a(i)=input('Enter the value of a:');
b(i)=input('Enter the value of b:');
c(i)=input('Enter the value of c:');
end
pd=input('Enter the value of load demand:');
P=zeros(n);
sum=0; den=0;
for i=1:n
sum=sum+(b(i)/(2*a(i)));
end
for i=1:n
den=den+(1/(2*a(i)));
end
num=pd+sum;
lamda=num/den;
for i=1:n
P(i)=(lamda-b(i))/(2*a(i));
end
for i=1:n
fprintf('Optimal Generation of unit %g: %g MW\n',i,P(i));
end
fprintf('Lamda: %g \n',lamda);
for i=1:n
unitcost=a(i)*P(i)^2+b(i)*P(i)+c(i);
fprintf('Generation cost of unit %g : %g\n',i,unitcost);
end
totalcost=0;
for i=1:n
totalcost=totalcost+a(i)*P(i)^2+b(i)*P(i)+c(i);
end
fprintf('Total generation cost : %g\n', totalcost);

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM1b: (WITHOUT LOSS AND WITH GENERATING LIMITS))


A power plant has three units with the following cost characteristics:
100≤PG1≤450
C 1  0 .004 PG21  5 .3 PG1  500 Rs / hr
C 2  0 .006 PG22  5 .5 PG 2  400 Rs / hr
C 3  0 .009 PG23  5 .8 PG 3  200 Rs / hr
100≤PG2≤350
100≤PG3≤225
where PGi ’s are in MW. Find the scheduling for a load of 975 MW.
Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clc;
clear all;
n=input('Enter the number of units:');
a=zeros(n);
b=zeros(n);
c=zeros(n);
pmin=zeros(n);
pmax=zeros(n);
P=zeros(n);
for i=1:n
fprintf('Enter the unit %g Data \n',i);
a(i)=input('Enter the value of a:');
b(i)=input('Enter the value of b:');
c(i)=input('Enter the value of c:');
pmin(i)=input('Enter the minimum value of generation:');
pmax(i)=input('Enter the maximum value of generation:');
end
pd=input('Enter the value of load demand:');
sum=0; den=0;
for i=1:n
sum=sum+(b(i)/(2*a(i)));
den=den+(1/(2*a(i)));
end
num=pd+sum;
lamda=num/den;
t=1;
while t>0
for i=1:n
P(i)=0;
end
PG=0;
for i=1:n
P(i)=(lamda-b(i))/(2*a(i));
end
for i=1:n
if(P(i)>pmax(i))
P(i)=pmax(i);
elseif P(i)<pmin(i)
p(i)=pmin(i);
else
P(i)=P(i);
end
PG=PG+P(i);
end
delp=pd-PG;
dellamda=delp/den;
if PG<pd
lamda=lamda+dellamda;
else
lamda=lamda-dellamda;
end
if delp<0.0001
t=0;
end
end
for i=1:n
fprintf('Optimal Generation of unit %g: %g MW\n',i,P(i));
end
fprintf('Lamda: %g \n',lamda);
for i=1:n
unitcost=a(i)*P(i)^2+b(i)*P(i)+c(i);
fprintf('Generation cost of unit %g : %g\n',i,unitcost);
end
totalcost=0;
for i=1:n

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

totalcost=totalcost+a(i)*P(i)^2+b(i)*P(i)+c(i);
end
fprintf('Total generation cost : %g\n', totalcost);

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM 1c: (WITH LOSS AND GENERATING LIMITS))


A power plant has three units with the following cost characteristics:
10≤PG1≤85
C 1  0 .008 PG21  7 PG 1  200 Rs / hr
C 2  0 .009 PG22  6 .3 PG 2  180 Rs / hr
C 3  0 .007 PG23  6 .8 PG 3  140 Rs / hr
10≤PG2≤80
10≤PG3≤70
PL=0.0218 PG12+0.0228 PG22+0.0179 PG32.
where PGi ’s are in MW. Find the scheduling for a load of 150 MW.
Manual Calculation:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program:
clc;
clear all;
n = input('Enter the no. of Units : ');
a = zeros(n);
b = zeros(n);
c = zeros(n);
pmin=zeros(n);
pmax=zeros(n);
p = zeros(n);
sum = 0;
den = 0;
bm = zeros(n,n);
for i = 1:n
fprintf('Enter the unit %g data \n',i);
a(i) = input('Enter the value of a : ');
b(i) = input('Enter the value of b : ');
c(i) = input('Enter the value of c : ');
pmin(i)=input('Enter the MIN value of Generation : ');
pmax(i)=input('Enter the MAX value of Generation : ');
end
for i = 1:n
for j = 1:n
bm(i,j) = input('Enter B Coefficient : ');
end
end
pd = input('Enter the value of load demand : ');
for i = 1:n
sum = sum + (b(i)/(2*a(i)));
den = den + (1/(2*a(i)));
end
lambda = (pd + sum)/den;
t = 1;
while t >0
fprintf('\nLambda is %g\n',lambda);
for i = 1:n
p(i) = 0;
end
pg = 0;
pl = 0;
deldde = 0;
nb = 0;
for i = 1:n
for j = 1:n
if i~=j
nb = nb + bm(i,j)*p(j);
end
end
end
for i = 1:n
p(i) = (1 - b(i)/lambda - nb)/(2*(a(i)/lambda + bm(i,i)));
fprintf('Optimal generation of unit %g is %g MW\n',i,p(i));
end
for i = 1:n
for j = 1:n
pl = pl + p(i)*bm(i,j)*p(j);
end
end
fprintf('Power Loss is %g\n', pl);
for i=1:n
if (p(i)>pmax(i))
p(i) = pmax(i);
elseif (p(i)<pmin(i))
p(i) = pmin(i);

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

else

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

p(i) = p(i);
end
end
for i = 1:n
pg = pg + p(i);
end
delp = pd + pl - pg;
fprintf('Change in load is %g\n', delp);
for i = 1:n
deldde = deldde + (a(i) + b(i)*bm(i,i))/(2*((a(i) +
lambda*bm(i,i))^2));
end
dellambda = delp/deldde;
fprintf('Change in Lambda is %g\n',dellambda);
lambda = lambda + dellambda;
if delp<1
t = 0;
end
end

Output:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 14
DATE:
SMALL SIGNAL STABILITY ANALYSIS IN SINGLE-MACHINE
INFINITE BUS SYSTEM USING MATLAB

AIM:
To become familiar with various aspects of the small signal stability analysis of Single-
Machine-Infinite Bus (SMIB) system.

THEORY :
Stability : Stability problem is concerned with the behavior of power system when it is
subjected to disturbance and is classified into small signal stability problem if the disturbances
are small and transient stability problem when the disturbances are large.
Small signal stability: When a power system is under steady state, normal operating condition,
the system may be subjected to small disturbances such as variation in load and generation,
change in field voltage, change in mechanical toque etc., The nature of system response to
small disturbance depends on the operating conditions, the transmission system strength, types
of controllers etc. Instability that may result from small disturbance may be of two forms,
(i) Steady increase in rotor angle due to lack of synchronising torque.
(ii) Rotor oscillations of increasing magnitude due to lack of sufficient damping
torque.
FORMULA :
Reactive power Qe = sin(cos-1(p.f))
S*
Stator Current It =
Et*
Pe - jQe
=
Et*
Voltage behind transient condition
E1 = Et + j Xd1It
Voltage of infinite bus
EB = Et - j( X3 + Xtr )It
X1 X2
where, X3 =
X1 + X2
Angular separation between E1 and EB
o =  E1 -  EB
Prefault Operation:
X1 X2
X = j Xd1+ jXtr +
X1 + X2
E1 x EB

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Power Pe = sino
X

Pe * X
-1
o = sin
E1 * EB
During Fault Condition:
Pe = PEii = 0
Find out X from the equivalent circuit during fault condition
Post fault Condition:
Find out X from the equivalent circuit during post fault condition

E1 x EB
Power Pe = sino
X
max =  - o
Pm
Pe =
sinmax

Critical Clearing Angle:

Pm(max - o ) + P3maxcosmax - P2maxcoso


Coscr =
P3max - P2max

Critical Clearing Time:

2H (cr - o)
tcr =
 fo Pm Secs

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

PROBLEM:
1. A 60Hz synchronous generator having inertia constant H = 9.94 MJ/MVA and a
direct axis transient reactance Xd1 = 0.3 per unit is connected to an infinite bus
through a purely reactive circuit as shown in figure. Reactance’s are marked on the
diagram on a common system base. The generator is delivering real power Pe =
0.6 per unit and 0.8 power factor lagging to the infinite bus at a voltage of V = 1 per
unit. The generator is operating in the steady state at δο=16.79° when the input
power is increased by a small amount ∆P=0.2 per unit. The generator excitation and
the infinite bus bar voltage are the same as before E’=1.35 per unit and V=1.0 per
unit.
i) Obtain the step response for the rotor angle and the generator frequency.
ii) Obtain the response using MATLAB function.
iii) Obtain a SIMULINK block diagram representation of the state- space model and
simulate to obtain the response.

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Program

E = 1.35, V= 1.0; H= 9.94; X=0.65; Pm=0.6; D=0.138; f0 = 60;


Pmax = E*V/X, d0 = asin(Pm/Pmax) % Max. power
Ps = Pmax*cos(d0) % Synchronizing power coefficient
wn = sqrt(pi*60/H*Ps) % Undamped frequency of of oscillation
z = D/2*sqrt(pi*60/(H*Ps)) % Damping ratio
wd = wn*sqrt(1-z^2), fd = wd/(2*pi) %Damped frequency oscill.
tau = 1/(z*wn) % Time constant
th = acos(z) % Phase angle theta
Dp = 0.2; Du = pi*f0/H*Dp; % Small step change in power input
t = 0:.01:3;

% Plotting the analytical solution

Dd = Du/wn^2*(1- 1/sqrt(1-z^2)*exp(-z*wn*t).*sin(wd*t + th));


d = (d0+Dd)*180/pi; % Load angle in degrees
Dw = Du/(wn*sqrt(1-z^2))*exp(-z*wn*t).*sin(wd*t);
f = f0 + Dw/(2*pi); % Frequency in Hz
figure(1), subplot(2,1,1), plot(t, d), grid
xlabel('t, sec'), ylabel('Delta, degrees')
subplot(2,1,2), plot(t,f), grid
xlabel('t, sec'), ylabel('Frequency, Hz')

% Step response
A = [0 1; -wn^2 -2*z*wn]; % wn, z and t are defined earlier
Dp = 0.1; Du = pi*f0/H*Dp; % Small step change in power input
B = [0;1]*Du;
C = [1 0; 0 1];% Unity matrix defining output y as x1 and x2
D = [0; 0];
[y, x] = step(A, B, C, D, 1, t);
Dd = x(:, 1); Dw = x(:, 2); % State variables x1 and x2
d1 = (d0 + Dd)*180/pi; % Load angle in degrees
f1 = f0 + Dw/(2*pi); % Frequency in Hz
figure(2), subplot(2,1,1), plot(t, d), grid
xlabel('t, sec'), ylabel('Delta, degrees')
subplot(2,1,2), plot(t, f), grid
xlabel('t, sec'), ylabel('Frequency, Hz')
subplot(111)

OUTPUT

E = 1.3500
Pmax = 2.0769
d0 = 0.2931
Ps = 1.9884
wn = 6.1405
z = 0.2131
wd = 5.9995
fd = 0.9549
tau = 0.7643
th = 1.3561

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

c)

Du = 60*pi/H*(0.2)

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

EXP NO: 15
DATE:

TRANSIENT ANALYSIS OF SINGLE MACHINE INFINITE BUS


SYSTEM WITH SSSC CONTROLLER
AIM:
To analyse the transient performance of the Single Machine Infinite Bus (SMIB) system
with Static Synchronous Series Compensator (SSSC) using MATLAB.
THEORY:
A SSSC is a voltage source converter based series FACTS device that injects a voltage
in series with the transmission line voltage. Consider that a SSSC is placed near bus m in the
SMIB system as shown in Fig.1.

Vt Vm V
L1 L2

SSSC
L3
L4 Infinite bus
Fig 1 Schematic diagram of SMIB system with SSSC controller
The equivalent circuit of the system is shown in [Link] the SSSC is represented by
a series voltage source VS. Note that VS is always kept in quadrature with the line current so
that the SSSC can exchange only reactive power with the system.

E Vmm V0

jX1 +
Vs - jX2

Fig 2 Equivalent circuit of the SMIB system with SSSC controller


The series voltage injected by the SSSC is given by
vs  vs e j(/2) (1)
Where θ is the angle of the line current and is given by
 V  E' cos  
  tan 1  
 E sin  
'
(2)
 E  VS  V   E  V   E  VS 
' ' '

   
 jX   jX   jX  (3)
 I 0  I (4)
I is the additional current term caused by SSSC voltage VS
The electrical output power Pe is given by
Pe  Pmax sin   Pe (5)
Where
E'V
Pmax 
X
The additional power term Pe in the above equation is due to the SSSC voltage

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

 '  V *  E 'V
Pe  Re E  S    S
sin(  )
  jX   X
(6)
0
When VS lags the current by 90,(α=θ-90 ) ,Pe becomes
E ' VS
Pe  sin(    900 )
X (7)
'
E VS
Pe  cos(  )
X (8)
From the phasor diagram cos(θ-900) can be written as

Fig 3 Phasor diagram of SSSC


(a) When Vs lags I by 90  (b) When Vs leads I by 90
(Capacitive mode) (Inductive mode)
V
cos(  )  cos 
E' (9)
Value of cosθ can be written as
E ' sin 
cos  
(E '2  V 2  2E ' V cos )
(10)
Using the above two equations, Pe can be written as
Sub equation (8) in (9)
V sin()
cos(  ) 
(E '2  V 2  2E ' V cos )
(11)
Substitute the equation (10) in (6), we get
VS E ' V sin 
Pe 
X (E '2  V 2  2E ' V cos )
(12)
VSPmax sin 
Pe 
(E  V 2  2E ' V cos )
'2
(13)
Pe  VS .f 2 () (14)
Where
Pmax sin 
f 2 ( ) 
(E  V 2  2E ' V cos )
'2
(15)
Pmax sin 
Pe  Pmax sin()  VS
(E  V 2  2E ' V cos )
'2
(16)
Where
VS  K 2 (17)
K2 is a positive gain and it depends on the maximum voltage rating (VSmax) of the SSSC

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

.
 VS min  VS  VS max (18)
The rate of dissipation of transient energy is given by
 , )  [D  K f ( )]2
 E( 2 2 (19)
The second term with in the square bracket of above equation can again be considered as
additional damping (DSSSC) provided by the SSSC
Pmax sin 
DSSSC  K 2f 2 ()  K 2
(E '2  V 2  2E ' V cos )
(20)
Unlike the STATCOM, DSSSC is independent of reactance ratio, and hence the location of the
SSSC along the line.

Fig 4 Simulation Block Diagram of the SMIB System with SSSC Controller

Data for the SMIB system:

Generator: X`=0.3 pu, f=60 Hz, D=0, H=5s (M=H/f).

Transformer: X=0.1 pu.

Transmission lines: X=0.4 pu of each line.

The generator initially delivers a power of 1.0 pu at a terminal voltage of 1.05 pu and
the infinite bus voltage of 1.0 pu. The generator internal voltage E` for the above operating
condition is found as 1.235640.35o pu.

REFERENCE:

M.H. Haque. ‘Damping improvement by FACTS devices: A comparison between


STATCOM and SSSC’

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

MODEL OUTPUT:
ROTOR ANGLE RESPONSE WITHOUT SSSC CONTROLLER:
0.18

0.16

0.14
ROTOR ANGLE (DEGREE)

0.12

0.1

0.08

0.06

0.04

0.02

0
0 1 2 3 4 5 6 7 8 9 10
TIME (SEC)

ROTOR ANGLE RESPONSE WITH SSSC CONTROLLER:

0.07

0.06

0.05
ROTOR ANGLE (DEGREE)

0.04

0.03

0.02

0.01

0
0 1 2 3 4 5 6 7 8 9 10
TIME (SEC)

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

RESULT:

Page No. . . . . . . .
MSAJCE EE8711 - Power System Simulation Lab

Page No. . . . . . . .

You might also like