Download as pdf or txt
Download as pdf or txt
You are on page 1of 82

P.E.S.

COLLEGE OF
ENGINEERINGMANDYA – 571
401, KARNATAKA
DEPARTMENT OF ELECTRICAL AND ELECTRONICS
ENGINEERING
(Accredited by National Board of Accreditation, Govt. Aided Institution an Affiliated to V.T.U. Belgaum)

POWER SYSTEM SIMULATION LABORATORY


MANUAL - P18EEL77
7th Semester
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

VISION

“The department of E & E would Endeavour to create a pool


of Engineers who would be technically competent, ethically
strong also fulfill their obligation in terms of social
responsibility”

MISSION

M1: Adopt the best pedagogical methods and provide the best
facility, infrastructure and an ambience conducive to imbibe
technical knowledge and practicing ethics.
M2: Group and individual exercises to inculcate habit of
analytical and strategic thinking to help the students to
develop creative thinking and in still team skills.
M:3 MOUs and Sponsored projects with industry and R & D
organizations for Collaborative learning
M4: Enabling and encouraging students for continuing
Education and molding them for life-long learning process
DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

PROGRAM EDUCATIONAL OBJECTIVES (PEO’S)

PEO1: Excel in professional career and/or higher education


by acquiring knowledge in mathematical, computing and
engineering principles
PEO2: Analyze real life problems, design computing systems
appropriate to its solutions that are technically sound,
economically feasible and socially acceptable
PEO3: Exhibit professionalism, ethical attitude,
communications kills, team work in their profession and
adaptto current trends by engaging in lifelong learning.
PROGRAM OUTCOMES (PO’s)
PO-1: Graduates will apply the knowledge of mathematics,
Physics, chemistry and allied engineering subjects to solve
problems in Electrical and Electronics Engineering.

PO-2: Graduates will Identify, formulate and solve Electrical and


Electronics Engineering problems.
PO-3: Graduates will design Electrical and Electronics systems
meeting the given specifications for different problems taking
safetyand precautions into consideration.

PO-4: Graduates will design, conduct experiments, analyze and


interpret data
PO-5: Graduates will use modern software tools to model and
analyzeproblems, keeping in view their limitations.

PO-6: Graduates will understand the impact of local and global issues
/happenings on Electrical Engineers.

PO-7: Graduates will provide sustainable solutions for


problemsrelated to Electrical and Electronics Engineering and
also will understand their impact on environment.

PO-8: Graduates will have knowledge of professional ethics and


codeof conduct as applied to Electrical engineers.

PO-9: Graduates will work effectively as an individual and as a


member or leader in diverse teams and in multi-disciplinary
settings.

PO-10: Graduates will communicate effectively in both verbal and


written form.
PO-11: Graduates will have the ability for self- education and
lifelonglearning.
PO-12: Graduates will plan, execute and complete projects
PROGRAM SPECIFIC OUTCOMES (PSO’s)

PSO-1: To understand the concept in Electrical and


Electronics Engineering and apply them to develop modules,
analyze, assess the performance of various power system
equipment, generation, transmission, utilization and protection
mechanisms.

PSO-2: Design, develop, analyze and test electrical and


electronics system: Deploy control strategies for electrical
dives, power system networks, power electronics, high voltage
andother related applications.
LIST OF EXPERIMENTS

1. Calculation of ABCD parameters for medium and long transmission line


systems. Verification of AD-BC=1. Determination of efficiency and
regulation.
2. (i) Y-Bus formation for power systems by using inspection method.
(ii) Determination of bus currents, bus power and line flows for a specified
system with given bus voltage profile.
3. Bus admittance matrix (YBus) formation for power systems with and without
mutual Coupling, by singular transformation.
4. To determine fault currents and voltages in a single transmission line system
for SLG fault, LL fault, and LLG (DLG) fault.
5. Determination of power angle diagram of salient and non-salient pole
synchronous machines. Calculation of reluctance power & regulation.
6. To determine i) Swing curve ii) Critical clearing time for a Single Machine
connected to Infinite Bus (SMIB) system through a pair of identical
transmission lines.
7. Determination of optimal generator scheduling for thermal plants.
8. Load flow analysis using (i) Gauss Seidel method, (ii) Newton Raphson
method, and (iii) Fast decoupled flow method.
COURSE OUTCOMES

At the end of the course the student will be able to:

CO1: Apply the knowledge of power systems for formation of Y bus with and without
mutual coupling using MATLAB Programming
CO2: Conduct experiments to execute programs to study load flow, different faults and
stability of the power system.
CO3: Ability to communicate effectively in a team / as an individual to conduct
experiments.

Course Articulation Matrix


Program Outcome

Course Outcome (CO) P P P P P P P P P P P P P P


OO O O O O O O O O O OS S
1 2 3 4 5 6 7 8 9 1 1 1 O O
0 1 2 1 2
Apply the knowledge of power systems for formation
of Y bus with and without mutual coupling using 3 3 - - 3 - - - - - - - 2 -
MATLAB Programming
Conduct experiments to execute programs to study
load flow, different faults and stability of the power 3 3 - - 3 - - - - - - - - -
system.
Ability to communicate effectively in a team/as an
- - - - - - - 1 3 3 - - - -
individual s to conduct experiments
L- Low M- Medium H-High
Power System Simulation Lab

Experiment No.1

Calculation of ABCD Parameters


AIM:
1. To Determine the ABCD Parameters for symmetric PI –configuration of a
transmission line.
2. To Verify the relation AD-BC=1.
3. Determination of efficiency and regulation of line by using ABCD constants.

Theoretical background:
Accurate analysis of the transmission lines requires that the 2 - port parameters viz.,
A,B,C, D parameters of the lines are to be determined. Let line series impedance be z
and y be its shunt admittance, where z and y are the impedance and admittance per unit
length, respectively. It can be shown that for a long transmission lines the A, B, C, D
parameters are given by:
A = coshγl, B = Zcsinhγl, C = Yc sinhγl, D = coshγl.
Sending end and Receiving end Voltages and Currents are related by:

A Transmission line connected to a source at the sending end and a load at the
receiving end may be thought of as a two terminal pair network , with sending end
voltage and current as VS and IS , and receiving end voltage and current as VR and
I R . For any two of the above four variables, the other two variables depend on the
parameters of the transmission network between the input and output ports. For
example, the dependence of VS and IS on VR and I R may be expressed through the
relations:VS  AVR  BIR.............................. (1).
IS  CVR  DIR …….…… (2).
where the coefficients A, B, C, D are called the transmission parameters. It follows
from equations (1) and (2), Passive networks have the unique property of
AD  BC 1 .
For a specified VR and I R , VS and IS can be determined from equations (1) and (2).
(1/ y) VS
NOTE: With I =0, V =V * and I = yV 
(z  (1/ y)) (z  (1/ y))
R R S S S

V
A S
VR with IR  0

IS
C with IR  0
VR
VS
Similarly, with VR = 0, I  and IS  yVS 
R
z

Dept.of E& E Engg.,PESCE,Mandya Page 1


Power System Simulation Lab

VS
B with VR  0 IS
VR and D with VR  0
IR
PROCEDURE:

(1). A Pi network is identified with a series impedance z and symmetric shunt


admittance y.
(2). Determine A, B, C, D constants for the given network.
(3). Using values of A, B, C, D parameters, AD-BC is computed and verified that
AD-BC=1
(4). For an given active power of P KW or watts/ph drawn by the load at the receiving
end at rated voltage VR and power factor p.f, say lag, the receiving end current is
P
IR  cos1 pf
VR pf
Then, the corresponding sending end voltage Vs and Is are obtained as
VS  AVR  BIR
IS  CVR  DIR
Sending end Real Power = P  Re al(V I * )
S S S

Receiving end Real Power (given) = PR  P


PR
Then, Efficiency = *100
PS
(Vs  VR )
Then, Regulation= * 100
VR
Output expected from the program (Experiment):
 ABCD constants.
 Sending end voltage, current, power, power factor.
 Percentage voltage regulation.
 Percentage efficiency.

ALGORITHM:

To find ABCD constants of equivalent PI - network & hence to find efficiency


regulation
1. Read length, impedance/Km, admittance/Km of transmission line
2. Enter choice 1- for short line
2- for medium line
3- for long line.
3. If choice = 1
Read the length. Calculate Zeq and Yeq. (i.e Z & Y)
Set B = Z ; A = D = 1 ; C = 0.
If choice = 2
Read the length. Calculate Zeq and Yeq. (i.e Z & Y)
Calculate A = D = (1 + YZ/2) and

Dept.of E& E Engg.,PESCE,Mandya Page 2


Power System Simulation Lab

B=Z
C = Y(1 + YZ/4).
Zeq
If choice = 3.
Read length Yeq Yeq
Zc = z/y
 = (z*y)*length.
A = D = Cosh ()
C =1/Zc Sinh ().
4. Display A, B, C, & D constants.
5. Enter choice 1 – to read Vr, Ir & compute Vs, Is
2 – To read Vs, Is& compute Vr, Ir
If choice = 1
Find Vs = A.Vr + B.Ir
Is = C.Vr + D.Ir where Vr & Ir are in per phase
Display Vs & Is
If choice = 2
Find Vr = D.Vs – B.Is
Is = C.Vr + D.Ir where Vs & Is are in per phase
Display Vs & I s.
Find (i) Vssv & Is sr
(ii) Sending end power factor, Pfsend = Cos (sv - sr)
(iii) Sending end power, Ps = 3 Vs * Is * Pf send

6. Find (i) Vr rv & Ir r1.


(ii) Receiving end power factor Pfrec = Cos (rv –r1)
(iii) Receiving end power, Pr = 3 V r * I r  * Pfrec
7. Find efficiency,  = Pr/Ps * 100
8. Find voltage regulation
Vs| - Vr
VR = *100
Vr
9. Display (i) efficiency, 
(ii) Voltage regulation, VR
10. Stop.

Note:
(1) To find generalized equivalent circuit elements of Pi- network for long lines.
Z or Zeq = y*length* sinh () /
Y or Yeq = y*length/2* tanh (/2) / (/2)
Display Zeq & Yeq.
(2). Ttransmission lines are categorized as three types:
(i). Short transmission line: Length of the line varies up to 80km.
(ii). Medium transmission line: Length of the line varies from 80 to 150km.
(iii). Long transmission line: Length varies above 150km.

Dept.of E& E Engg.,PESCE,Mandya Page 3


Power System Simulation Lab

Data for the programming


Calculate the Line parameters (A B C D), for the following data. Also determine the
efficiency and voltage regulation for different line lengths (i.e. Short, Medium, and
Long lines).
Given: Receiving End Voltage, Vr= (132+0.0i) in KV (Line to Line).
Receiving end Current in Amps, Ir = (174.96-131.22i).
(As calculated from Three Phase Power drawn by the Load).
Transmission Line Parameters: Line impedance z in ohms/KM, z = (0.2+0.40i).
Line admittance y in ohms/KM, y= (0+3.14e-6i).
(Given: Short line as 40km, Medium line =150 km, and Long lines = 250 km)

Zeq

Yeq Yeq

Example 2
Receiving End Voltage = 6.6 KV, (Line to Line)
Three Phase Power drawn by the Load = 100 KW at 0.8 PF lag
Transmission Line Parameters:
Series Resistance = 5 Ohms
Series Inductance = 0.1 Henry
Total Line charging capacitance = 0.4 μF

Dept.of E & E Engg.,PESCE,Mandya Page 4


Power System Simulation Lab

%---------------------MATLAB Program for A B C D parameters-----------


% Calculation of ABCD Parameters for equivalent PI - Network with
% series impedance Z and Shunt admittance Y. And determination of
% Efficiency and voltage regulation.
%
% line Data given
z=0.2+0.40i ; % Line impedance z in ohms/KM
y=0+3.14e-6i ; % Line admittance y in ohms/KM
K1 = input('\n Enter 1-for short line \n 2-for medium line
\n 3-for long line ');
switch K1 % Line type
case 1, % Short line
length=40; % data given or use the input statement as given
below
% length=input('\n Enter length of short line ');
Z=z*length; Y=y*length;
A=1; B=Z; C=0; D=1;
case 2, % Medium Line
length=100; % data given
Z=z*length; Y=y*length;
A=1+Y*Z/2;
B=Z;
C=Y*(1+Y*Z/4);
D=A;
case 3, % Long line
length=200; % data given
zc = sqrt(z/y);
gam = sqrt(z*y)*length; % Gamma
A=cosh(gam);
D=A;
B=zc*sinh(gam);
C=1/zc*sinh(gam);

otherwise
disp('Wrong choice of Line type');
end
fprintf('\n A,B,C and D constants : \n');
fprintf(' ');
fprintf('\n A = %15.4f %+15.4fi',real(A),imag(A));
fprintf('\n B = %15.4f %+15.4fi',real(B),imag(B));
fprintf('\n C = %15.4f %+15.4fi',real(C),imag(C));
fprintf('\n D = %15.4f %+15.4fi',real(D),imag(D));
fprintf('\n\n (AD - BC) = %5.2f \n',real(A*D-B*C));

K2 = input('\n Enter 1 - To read Vr, Ir and compute Vs , Is


\n 2 - To read Vs, Is and compute Vr, Ir ');
switch K2,
case 1,
% vr=input('enter Vr/phase ');
% ir=input('enter Ir/phase ');
vr=132+0.0i; % Receving end voltage in KV (L-L)
ir=174.96-131.22i; % Receving end Current in Amps
vr=vr*1e3/sqrt(3) % L-L votage to ph.voltage in Volts

vs=(A*vr+B*ir)/1e3; % In KV
is=C*vr+D*ir;

Dept.of E & E Engg.,PESCE,Mandya Page 5


Power System Simulation Lab

fprintf('\n Sending end Voltage/ph=%f %+fi KV',real(vs),imag(vs));


fprintf('\n Sending end Current/ph=%f %+fiAMP',real(is),imag(is));
vs=vs*1e3; % KV to volts
case 2,
% vs=input('Enter Vs/phase ');
% is=input('Enter Is/phase ');
vs=132+0.0i;
is=174.96-131.22i;
vs = vs*1e3/sqrt(3.0);
vr =(D*vs-B*is)/1e3;
ir =-C*vs+D*is;
fprintf('\n Receiving end Voltage/ph=%f %+fi
KV',real(vr),imag(vr));
fprintf('\n Receiving end Current/ph=%f %+fi
AMP',real(ir),imag(ir));
vr=vr*1e3;
end
rec_pow=3*real(vr*conj(ir))/1e6;
% rec_pow=3*abs(vr)*abs(ir)*cos(angle(vr)-angle(ir))/1e6;
send_pow=3*real(vs*conj(is))/1e6;
% send_pow=3*abs(vs)*abs(is)*cos(angle(vs)-angle(is))/1e6;
eff=rec_pow/send_pow*100;
reg=((abs(vs)/abs(A))-abs(vr))/abs(vr)*100;
fprintf('\n Receiving end power=%.2f KVA',rec_pow);
fprintf('\n Sending end power=%.2f KVA',send_pow);
fprintf('\n Efficiency=%.2f %%',eff);
fprintf('\n Voltage Regulation=%.2f %% \n',reg);

program outputs:

>> ABCD_parameters.
Enter 1-for short line
2-for medium line
3-for long line 2

A,B,C and D constants :

A = 0.9937 +0.0031i
B = 20.0000 +40.0000i
C = -0.0000 +0.0003i
D = 0.9937 +0.0031i

(AD - BC) = 1.00

Enter 1 - To read Vr, Ir and compute Vs , Is


2 - To read Vs, Is and compute Vr, Ir 1

vr = 7.6210e+04

Sending end Voltage/ph=84.479635 +4.613300i KV


Sending end Current/ph=174.235712 -105.991690i AMP
Receiving end power=40.00 KVA
Sending end power=42.69 KVA
Efficiency=93.70 %
Voltage Regulation=11.72 %

Dept.of E & E Engg.,PESCE,Mandya Page 6


Power System Simulation Lab

Experiment No.2
YBus by inspection method and Calculation of Line flows
AIM: 1. To form YBus for a power system by inspection method.
2. To Determine Bus currents, Bus power and Line flows for a specified
system voltage (bus) profile, for a given power system.

Theoretical background:
The analysis of a power system requires certain network matrices viz., Bus admittance
matrix, Ybus or Bus Impedance matrix Zbus. The bus admittance matrix relates the bus
current variables represented by the column vector to the bus voltage variables
through the relation
IBus  YBus EBus ……………………………………… (1)
Ybus is an n x n square matrix where n is the number of buses in the system. This Y bus
can be formed by using manual Inspection method or Singular transformation
technique.

The method of inspection


- compute diagonal and off diagonal elements separately.
- applicable for systems with no mutual coupling
- has a simple computational procedure.
- Diagonal Element = sum of all the admittances connected at the bus under
consideration,
N

i.e., Ypp   ypq ........................................................................................................(1).


q0

Where q=0 represents ground


And N = Number of buses in the system
ypq = admittance between buses p & q
- Off Diagonal Elements = negative of admittance between the buses ( p & q ) under
consideration i.e, Ypq   ypq …………….………………….… (2).
- Ybus elements are determined using the above equations (1) and (2), for p=1to n.
Ybus is a symmetric matrix. Hence only the Nx(N-1) elements of upper triangular
matrix be determined and the remaining N elements be determined using the
relation
Yij  Yji ............................................................................................... (3).
Calculation of Line flows: Computation of power flow gives vital information about
the real and reactive power injected at each bus, into the system, real and
reactive power flows in each transmission line and the real and reactive
power loss in each transmission line. The algorithms required to program
are as given below.

PROCEDURE & ALGORITHMS:


2.(a).Formation of Y bus by direct method.(Inspection method).
1. Read the no. of buses (nbus) & no. of lines (nline).
2. Read the following line from bus no. to bus no. line impedance & half line
charging admittance.

Dept.of E & E Engg.,PESCE,Mandya Page 7


Power System Simulation Lab

3. Convert line impedance to admittance of each line.


4. Repeat step (i) to (iii) for K=1 to nline.
i. p=from bus no. q= to bus no.
ii. Diagonal elements
Ypp = Ypp + line admittance + half line charging Y.
Yqq = Yqq+line adm. + hlcY
iii. Off diagonal elements Ypp =
Ypp – line admittance Yqp =
Yqp – line admittance.
5. Display Ybus
Display Zbus = [Ybus]-1
6. Stop.
Program
% FORMATION OF " ybus " i.e. Bus Admittance Matrix.
% BY USING INSPECTION METHOD WITHOUT MUTUAL COUPLING:
% Line Data is from Stagg& Abiad book
% Note: Ldata -> Line data & hlcY ->Half Line Charging Admittance
% Bus No.From to z =(r+jx) hlcY(Suceptance +iB only)
Ldata = [1 2 0.02+0.06i 0.06i
1 3 0.08+0.24i 0.05i
2 3 0.06+0.18i 0.04i
2 4 0.06+0.18i 0.04i
2 5 0.04+0.12i 0.03i
3 4 0.01+0.03i 0.02i
4 5 0.08+0.24i 0.05i];
fb = Ldata(:,1); % fb-From bus
tb = Ldata(:,2); % tb-To bus
z = Ldata(:,3); % Line Impedances
h = Ldata(:,4); % Half Line Charging Admittance
y = 1./z ; % Line Admittances
nbus=max(max(fb),max(tb)); % Total no. of buses/Max.Bus No.
Ybus=zeros(nbus);
nline=length(fb); % Total no. of Lines
for k =1 : nline,
p=fb(k);q=tb(k);
Ybus(p,p)=Ybus(p,p)+y(k)+h(k); % Self Admittances, Ypp
Ybus(q,q)=Ybus(q,q)+y(k)+h(k); % Self Admittances, Yqq
Ybus(p,q)=Ybus(p,q)-y(k); % Mutual Admittances, Ypq
Ybus(q,p)=Ybus(p,q); % Mutual Admittances, Ypq
end
format short;
Ybus % Dispaly Ybus and Zbus
Zbus=inv(Ybus)

%
Program outputs: [Ybus] and [Zbus] matrices.
Ybus =

6.25 – j 18.695 -5 + j 15 -1.25 + j 3.75 0 0


-5 + j 15 10.8333 – j 32.415 -1.6667 + j 5 -1.6667 + j 5 -2.5 + j 7.5
-1.25 + j 3.75 -1.6667 + j 5 12.9167 – j 38.695 -10 + j 30 0
0 -1.6667 + j 5 -10 + j 30 12.9167 – j 38.695 -1.25 + j 3.75
0 -2.5 + j 7.5 0 -1.25 + j 3.75 3.75 – j 11.21

Dept.of E & E Engg.,PESCE,Mandya Page 8


Power System Simulation Lab

Zbus =
+0.0126 - 1.6866i 0.0005 - 1.7228i -0.0043 - 1.7369i -0.0053 - 1.7398i -0.0052 - 1.7396i
+0.0005 - 1.7228i 0.0053 - 1.7084i -0.0037 - 1.7352i -0.0038 - 1.7356i -0.0015 - 1.7285i
-0.0043 - 1.7369i -0.0037 - 1.7352i 0.0089 - 1.6975i 0.0045 - 1.7107i -0.0047 - 1.7382i
-0.0053 - 1.7398i -0.0038 - 1.7356i 0.0045 - 1.7107i 0.0090 - 1.6973i -0.0033 - 1.7339i
-0.0052 - 1.7396i -0.0015 - 1.7285i -0.0047 - 1.7382i -0.0033 - 1.7339i 0.0212 - 1.6610i

2.(b)Procedure & Algorithm for Bus currents, Bus power & line flows.

A system voltage profile is assumed (which could preferably be the data obtained
from a load flow analysis).
(1).Read the following line data at each from busno(p), to busno(q), line imp. (Zpq)
& half line charging admittance (Yshpq) read voltages at all buses.
(2). Convert line impedance to admittance of each line Ypq.
(3). Repeat step (i) to (ix) for k = 1 to no. of lines.
(i). Let p = from bus no. & q = to bus no.
(ii). Line current, Ipq = (Vp-Vq) Ypq+Vq*Yshpq
(iii). Line flows = SLpq = Vp.(Ipq)*
(iv). Generation at bus p= SGp = SGp + SLpq.
(v). Ipq = (Vq – Vp).Ypq + Vq * Yshpq.
(vi). Iq = Iq + Ipq.
(vii). SLpq + Vq Ipq*.
(viii). Loss (k) = Loss (k) + SLpq + SLqp.
(ix) Total loss = Total loss + loss(k).
(4). Display current at each bus.
Display line flows & line loss at each line
Display generations at each bus
Display the total losses.
(5). Stop.
Program

% Line Flows Calculation i.e. bus currents, Bus power & line P&Q
flows.
% p q z hlc(ADM)
Ldata = [ 1 2 0.02+0.04i 0.00i
1 3 0.01+0.03i 0.00i
2 3 0.0125+0.025i 0.00i ];
% Bus Voltages
v(1)=1.05+0i;
v(2)=0.98-0.06i;
v(3)=1.0-0.05i;
fb=Ldata(:,1); % from bus
tb=Ldata(:,2); % to bus
z= Ldata(:,3); % z- line imp.'s
ysh=Ldata(:,4); % Shunt Y/2 or B/2 (ylc)
y=1./z;
nbus=max(max(fb),max(tb));
nline=length(fb);
% format short
Ib=zeros(nbus,1);
SG=zeros(nbus,1);
loss=zeros(nline,1);
totloss=0;

Dept.of E & E Engg., PESCE, Mandya Page 9


Power System Simulation Lab

for k=1:nline % For all branches/lines


% Calculation of Line Currents
p=fb(k); q=tb(k);
I(p,q)=(v(p)-v(q))*y(k)+v(p)*ysh(k); % I-from p-bus
I(q,p)=(v(q)-v(p))*y(k)+v(q)*ysh(k); % I-to q-bus
% Caln. of Bus Currents
Ib(p) = Ib(p)+I(p,q) ; % Ip -> from P-bus
Ib(q) = Ib(q)+I(q,p); % Iq <- to Q-bus
% Line flows: Complex power, SL = (P+jQ) = (VI*)
SL(p,q) = v(p)*conj(I(p,q)); % power flow from p-bus
SL(q,p)= v(q)*conj(I(q,p)); % power flow to the q-bus

% Bus Power /generation


SG(p) = SG(p)+SL(p,q);
SG(q) = SG(q)+SL(q,p);
% Line Losses for k-line
loss(k) = loss(k)+SL(p,q)+SL(q,p);
totloss = totloss+loss(k);
end

fprintf('\n--------------BUS CURRENTS-------------\n'); Ib

fprintf('\n\n------------LINE FLOWS----------------\n'); SL

fprintf('\n\n------------BUS GENRATIONS------------\n'); SG

fprintf('\n\n------------LINE LOSSES---------------\n'); loss

fprintf(' Total Loss = '); totloss

Program Outputs:

BUS CURRENTS
Ib =
3.9000 - 1.8000i
-2.5400 + 1.2800i
-1.3600 + 0.5200i
LINE FLOWS
SL =
0 1.9950 + 0.8400i 2.1000 + 1.0500i
-1.9100 - 0.6700i 0 -0.6560 - 0.4320i
-2.0500 - 0.9000i 0.6640 + 0.4480i 0
------------BUS GENRATIONS------------
SG =
4.0950 + 1.8900i
-2.5660 - 1.1020i
-1.3860 - 0.4520i
LINE LOSSES
loss =
0.0850 + 0.1700i
0.0500 + 0.1500i
0.0080 + 0.0160i
Total Loss = 0.1430 + 0.3360i

Dept.of E & E Engg., PESCE, Mandya Page 10


Power Syatem Simulation Lab

System Data for Ybus Formation


Example.1 Number of Buses = 4, Number of Transmission Lines = 5.

Sl.No. Transmission Line Self Half Line


Impedance Charging
Number From Bus To Bus Admittance
1 1 1 2 0.02 + j 0.06 j 0.02
2 2 2 3 0.025 + j 0.125 j 0.02
3 3 3 4 0.03 + j 0.1 j 0.02
4 4 4 1 0.015 + j 0.09 j 0.02
5 5 4 2 0.018 + j 0.072 j 0.02

Dept.of E & E Engg., PESCE,Mandya Page 11


Power system simulation lab

Experiment No.3

Formation of Ybus and Zbus by singular transformations

AIM:
To determine YBus for a given power system by singular transformation method with
and without mutual coupling cases.

Theoretical background:
A representation of a power system & the corresponding oriented graph are shown in
Figures.

The number of branches b required to form a tree, is b = n-1 , where n is the


number of nodes in the graph. Links in a connected graph with e elements, is L = e-b.
It follows that L = e-n+1.
Incidence Matrices:
Element-node incidence matrix Â. The element-node incidence matrix shows the
incidence of elements to nodes in a connected graph. The elements of the matrix are as
follows:

Dept.of E & E Engg., PESCE,Mandya Page 12


Power system simulation lab

aij = 1 if the ith element is incident & oriented away from the jth node
aij = -1 if the ith element is incident & oriented toward the jth node
aij = 0 if the ith element is not incident to jth node
The dimension of the matrix is e x n, where e is the number of elements & n is
the number of nodes in the graph. The element node incidence matrix for the graph
shown in Fig. 2 is:

Element-node incidence matrix, Â (A cap)

n o d e s
El.\n 0 1 2 3 4
1 1 -1
2 1 -1
3 1 -1
Â= 4 -1 1
5 1 -1
6 1 -1
7 1 -1

Bus incidence matrix A:


Any node of a connected graph can be selected as a reference node. Then the variables
of the other nodes, referred to as buses can be measured with respect to the assigned
reference. The matrix obtained from  by deleting the column corresponding to the
reference node is the element bus incidence matrix A, which will be called the bus
incidence matrix. The dimension of this matrix is e x (n-1). Selecting node 0 as
reference for the graph shown.

Formation of Y bus using singular transformation


A power system network consists of interconnected set of elements. In bus frame of
reference the performance of an interconnected network is described by (n-1)
independent nodal equations where n is the number of buses. In matrix notation, the
performance equation in impedance form is: Ebus = Zbus lbus or in admittance form:
Ibus = YbusEbus.
Where Ebus = vector of bus voltages measured w.r.t reference bus
Ibus = vector of impressed bus currents

Dept.of E & E Engg., PESCE,Mandya Page 13


Power system simulation lab

Zbus = bus impedance matrix whose elements are open circuit driving point & transfer
impedance.
Ybus = Bus admittance matrix whose elements are short circuit driving point & transfer
admittances. Here Ybus is given by:
Ybus = At [y]A ,
where [y] is primitive admittance matrix. The bus incidence matrix A is singular &
therefore At [y] A is a singular transformation of [y]. Therefore it fallows that
Zbus = Ybus-1 = (At[y]A) -1

PROCEDURE:
The Singular Transformation method
 Applicable for systems with or without mutual coupling
 Requires formation of Bus Incidence Matrix ‘A’
 Requires formation of primitive admittance matrix [y]
 Ybus is obtained in a single step matrix computation a
YBus=At [ y]A
 Formation of Matrix A
 For N bus system with k transmission lines, the oriented connected graph is
drawn, with ground as reference node. The graph will have ‘n’ nodes other than
the reference node and ‘e’ elements where e=k+n, n representing the total line
charging admittance at each bus. Hence ‘A’ is a matrix of size e x n. Elements of
A is 1,-1, or 0 depending on the incidence or otherwise of an element at a node
 Formation matrix [y]
The impedance data of the system including mutual impedance is expressed in matrix
form to obtain the primitive impedance matrix [z] of size exe. Ordering of elements in
the matrices A and [Z] should be same. Primitive admittance matrix[y] is obtained as
[y]=inverse[z] ...............................................................(1)

The YBus is then given by


YBus  At [ y]A.................................................................... (2)

ALGORITHMS:

1.(a) Formation of Ybus using singular Transformation method without mutual


coupling.
1. Read no. of buses (nbus) & no. of lines (nlines).
2. Initialize shunt admittance matrix to zeros.
3.Repeat step no (i). to step no (iv).
for all lines, i=1 to nline.
(i) Read line data i.e., frombus no, tobus no, Zseries, half line charging.
(ii) Shunt admittance [from bus] =shunt admittance (from bus) + half line charging.
(iii) Shunt admittance [to bus] = shunt admittance (to bus) + half line charging.
(iv) Series admittance[i]=1/series impedance[i].
4. Initialize all the elements of matrix A of size[(nbus + nline) X nbus] to zeros.
Form the incidence matrix A.

Dept.of E & E Engg., PESCE,Mandya Page 14


Power system simulation lab

Form A = Ab where Ab is identity matrix of size (nbus X nbus)


Al
Al is a matrix of size (nline * nbus) & elements of Al = [aij].
Where aij = 0 if ith branch is not incident on jth bus.
aij = 1 if ith branch is incident to & oriented away from jth bus.
aij = -1 if ith branch is incident to & oriented away from jth bus.

5. Form Y-primitive matrix


Initialize all elements of matrix Ypr of size (nbus + nline X nbus + nline) to
zeros.
Y YY
Form Ypr =
YY1 Y1

Where Y is a matrix of size (nbus X nbus) with diagonal elements Yii


Yii = total shunt admittance at bus i & all other elements being zeros.
YY is a matrix ofsize (nbus X nline) with elements being zeros.
Y1 is matrix of size (nline X nline) with diagonal elements Y1ii
Y1ii = Yseries of line i=1/Zseries of line i.
YY1 is matrix of size(nline X nbus) with all elements being zeros.

6. Display A matrix & Ypr matrix.


7. Form Transpose of matrix A i.e., AT.
8. From ATY = AT *Ypr.
9. Form Ybus = ATY * A & display.
10. From Zbus = [Ybus]-1 & display.
11. Stop.

PROGRAM
% FORMATION OF " Ybus " i.e. Bus Admittance Matrix
% Line data from Stagg and Abiad book.
clc, clear all
% Bus No. Line Imp. (Line Charging Admittance)
% From to z =(r+ix) lcY
Ldata =[ 1 2 0.02+0.06i 0.06i
1 3 0.08+0.24i 0.05i
2 3 0.06+0.18i 0.04i
2 4 0.06+0.18i 0.04i
2 5 0.04+0.12i 0.03i
3 4 0.01+0.03i 0.02i
4 5 0.08+0.24i 0.05i ];

fb = Ldata(:,1); % fb = From Bus


tb = Ldata(:,2); % tb = To bus
z = Ldata(:,3); % Line Impedance
lcy= Ldata(:,4); % Line Charging Admittance
y=1./z; % convert Line Imp. to Adm.
nbus=max(max(fb),max(tb)); % Total Buses/Max.Bus No.
Ybus=zeros(nbus); % Initialise with zeros

Dept.of E & E Engg., PESCE,Mandya Page 15


Power system simulation lab

nline=length(fb); % Total no. of Lines


nlb=nline+nbus; % Lines+Buses
A=zeros(nlb,nbus); % A-matrix Initialisation
for k=1:nbus
A(k,k)=1; % A-mat. with branches only
end
for k=1:nline % A-mat. With all lines/links
A(nbus+k,fb(k))= 1;
A(nbus+k,tb(k))=-1;
end
disp('A-matrix'),disp(A);
sh=zeros(nbus);

% Add all line lc-y's as Shunt elements to the diagonal


elements
for k=1:nline
sh(fb(k))=sh(fb(k))+lcy(k); % from-bus
sh(tb(k))=sh(tb(k))+lcy(k); % to-bus
end

% Initialize Ypr Primitive Admittance Matrix to zeros


ypr=zeros(nlb,nlb);

% Diagonal elements are as Self Admittances values only


% [NO mutual coupling elements ]

for k=1:nbus
ypr(k,k)=sh(k);
end

for k=1:nline
ypr(nbus+k,nbus+k)=y(k);
end

At = transpose(A);
Ybus=At*ypr*A % Calculate and display Results
Zbus =inv(Ybus)

%
Program outputs
A-matrix
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 -1 0 0 0
1 0 -1 0 0
0 1 -1 0 0
0 1 0 -1 0
0 1 0 0 -1
0 0 1 -1 0
0 0 0 1 -1

Dept.of E & E Engg., PESCE,Mandya Page 16


Power system simulation lab

Ybus =

6.25-18.64i -5.0000 +15.00i -1.2500+ 3.75i 0 0


-5.00+15.0i 10.8333 -32.33i -1.6667+ 5.0i -1.6667+ 5.00i -2.50 + 7.5i
-1.25+3.7i -1.6667 + 5.00i 12.9167-38.64i -10.000+30.00i 0
0 -1.6667 + 5.00i -10.00+30.0i 12.9167-38.64i -1.25+ 3.75i
0 -2.5000 + 7.50i 0 -1.25+ 3.750i 3.75-11.17i

Zbus =

0.0126 - 1.6866i 0.0005 - 1.7228i -0.0043 - 1.7369i -0.0053 - 1.7398i -0.0052 - 1.7396i
0.0005 - 1.7228i 0.0053 - 1.7084i -0.0037 - 1.7352i -0.0038 - 1.7356i -0.0015 - 1.7285i
-0.0043 - 1.7369i -0.0037 - 1.7352i 0.0089 - 1.6975i 0.0045 - 1.7107i -0.0047 - 1.7382i
-0.0053 - 1.7398i -0.0038 - 1.7356i 0.0045 - 1.7107i 0.0090 - 1.6973i -0.0033 - 1.7339i
-0.0052 - 1.7396i -0.0015 - 1.7285i -0.0047 - 1.7382i -0.0033 - 1.7339i 0.0212 - 1.6610i

1.(b) Formation of Ybus using singular Transformation method with mutual coupling.
Algorithm:
1. Read no. of buses(nbus) & no. of lines(nline).
2. Read line data i.e., From bus no., Zseries, mutual line no., Zmutual at all lines.
3. Form bus incidence matrix A
(i) initialize all the elements of A of size (nline X nline) to zeros.
(ii) Form A = [aij] matrix
Where aij = 0 if ith branch is not incident on jth bus.
aij = 1 if ith branch is incident to & oriented away from jth bus.
aij = -1 if ith branch is incident to & oriented away from jth bus.
4. Form Zprimitive matrix, Zpr
(iii) Initialize all the elements of Zpr of size(nline*nline) to zeros.
(iv) The diagonal elements is Zpr are assigned with respective Zseries
i.e.,Zpr(i,i) = Zseries of ith line.
(v) The off diagonal elements is zeros if the line i has no mutual coupling with
line j.
(vi) The off diagonal element Zpr (i,j) = Zmutual if the line I has mutual
coupling with line j.
5. Form Y primitive matrix Ypr = [Zpr]-1
6. Display A matrix & Ypr matrix.
7. Form transpose of matrix A i.e., AT.
8. Form ATY = AT * Ypr.
9. Form Ybus = ATY * A display.
10. form Zbus = [Ybus] -1 & display.
11. Stop.

Dept.of E & E Engg., PESCE,Mandya Page 17


Power system simulation lab

Program
% Y-bus formation with Mutual coupling elements included,
% by using Singular Transformation for Y-bus formation.
% Problem data is from stagg.pp-61..
clc, clear all
% coel=coupling element no.in the Line data
% Bus Nos. Line Mutual Coupling
% from to Imp.z coel mutual imp
Ldata=[ 1 2 0.00+0.6i 0 0.0
1 3 0.00+0.5i 1 0.1i
3 4 0.00+0.5i 0 0.0
1 2 0.00+0.4i 1 0.2i
2 4 0.00+0.2i 0 0.0 ];
ref = 1 ; % given data - ref.bus is one.
fb =Ldata(:,1); % from bus
tb =Ldata(:,2); % to bus
z =Ldata(:,3); % line imp.s
coel=Ldata(:,4); % coupling element.
zm=Ldata(:,5); % mutual imp.
y=1./z; % line adm.
nb=max(max(fb),max(tb)); % No. of buses

ybus=zeros(nb,nb);
ne = length(fb); % No.of elements
Acap=zeros(nb,nb); % Ele.-Nodes Inci.Matrix

% Formation of bus incidence matrix 'A' & A-cap


for i = 1:ne
p = fb(i) ; q = tb(i) ;
Acap(i,p) = 1;
Acap(i,q) = -1;
end
disp('Element-Node Incidence Acap(ne,ref+nb) matrix ');
disp(Acap) ;

A = Acap;
A(:,ref)=[]; % delete ref.bus
disp(' BUS INCIDENCE A(ne,nb) matrix ');
disp(A) ;
% Primitive Impedance matrix <Zp>
for i=1:ne
Zp(i,i) = z(i) ; % Diagonal elements.
if (coel(i) > 0) % If coupling exists add
Zp(i,coel(i)) = zm(i); % Off-diagonal elements
Zp(coel(i),i) = zm(i) ;
end
end

% calculation parts
Yp = inv(Zp) ; % Invert Zp to get pri.Yp-matrix
fprintf(' Primitive Yp(ne,ne) matrix \n\n');
for i=1 : ne
for j=1 : ne

Dept.of E & E Engg., PESCE,Mandya Page 18


Power system simulation lab

Yp(i,j) = (-1)*Yp(i,j);
fprintf(' (0,%6.3fi) ',imag(Yp(i,j)));
end
fprintf('\n');
end

At = A' ; % convert A to A-transpose


Ybus = At*Yp*A ; % Formation of Y-bus
fprintf('\n Y-BUS MATRIX \n') ;
disp(Ybus);
%
Program Outputs
Element-Node Incidence Acap(ne,ref+nb) matrix
1 -1 0 0
1 0 -1 0
0 0 1 -1
1 -1 0 0
0 1 0 -1

BUS INCIDENCE A(ne,nb) matrix


-1 0 0
0 -1 0
0 1 -1
-1 0 0
1 0 -1
Primitive Yp(ne,ne) matrix

(0, 2.083i) (0,-0.417i) (0, 0.000i) (0,-1.042i) (0, 0.000i)


(0,-0.417i) (0, 2.083i) (0, 0.000i) (0, 0.208i) (0, 0.000i)
(0, 0.000i) (0, 0.000i) (0, 2.000i) (0, 0.000i) (0, 0.000i)
(0,-1.042i) (0, 0.208i) (0, 0.000i) (0, 3.021i) (0, 0.000i)
(0, 0.000i) (0, 0.000i) (0, 0.000i) (0, 0.000i) (0, 5.000i)

Y-BUS MATRIX
0 + 8.0208i 0 - 0.2083i 0 - 5.0000i
0 - 0.2083i 0 + 4.0833i 0 - 2.0000i
0 - 5.0000i 0 - 2.0000i 0 + 7.0000i

Dept.of E & E Engg., PESCE,Mandya Page 19


Power System Simulation Lab

Example. (2).Find the Bus admittance matrix for the power system given.
Number of Buses = 4, Number of Transmission Lines = 5.

Transmission Line Self Mutual Coupling Half


Impedance Line
Number From To Coupled Mutual Charging
Bus Bus Transmission Impedance Admittance
Line Number
1 1 2 0.02 + j 5 j 0.05 j 0.02
0.06
2 2 3 0.025 + j 5 j 0.08 j 0.02
0.125
3 3 4 0.03 + j 0.1 5 j 0.05 j 0.02
4 4 1 0.015 + j 5 j 0.04 j 0.02
0.09
5 4 2 0.018 + j 1,2,3,4 - j 0.02
0.072

Dept.of E & E Engg., PESCE, Mandya Page 20


Power System Simulation Lab

APPENDIX

Formation of Bus – Admittance matrix Ybus, Inspection Method


Derivation
Consider a small power system network a shown in Figure, consisting of two generators, a
load & three transmission lines. We assume that the network is symmetrical & operating
under balanced conditions.

G1 G2

I1 I2
V1 V2
Z12
Z13 Z23
V3
I3
G1= Generator at bus 1.
G2= Generator at bus 2.
L= Load at bus 3.
l1= injected at bus 1
l2 = injected current at bus 2.
L3= injected current at bus 3.
V1= Voltage at bus 1
V2= Voltage at bus 2.
V3= Voltage at bus 3.
Z12= impedance at transmission line connected between bus 1 & 2.
Z13= impedance at transmission line connected between bus 1 & 3.
Z23= impedance at transmission line connected between bus 2 & 3.
From the network we can write the node voltage equations as
l1 = (y12 + y31)V1 – y12V2 – y31V3
l2 = -y12 V1 + (y12 + y23)V2-y23V3
l3 = -y31V1-y23V2+(y31+y23) V3
Where
y12=1/z12
y23= 1/z23
y31=1/z31
In matrix form we can write
I1 y12 + y13 -y12 -y31 V1
I2 = -y12 y12 + y23 -y23 V2
I3 -y31 -y23 y31 + y32 V3

It is to be noted that all injected currents are positive & extracted currents are negative.
Dept.of E & E Engg., PESCE, Mandya Page 21
Power system simulation lab

The above equation can be written as


I1 Y11 Y12 Y13 V1
I2 = Y21 Y22 Y23 V2
I3 Y31 Y32 Y33 V3

In Compact form we can write


[lbus] = [Ybus][Vbus]

Where Y11 = y12 + y13


Y22=y21+y23
Y33=y31+y32
&
Y12= Y21= -y12
Y23= Y32= -y23
Y31= Y13= -y31
The elements Y11, Y22, Y33 forming the diagonal elements are called self-
admittance.In general the diagonal elements Ypp of the bus admittance matrix is equal to sum
of admittance of all the elements connected to bus p.
That is Ypp = yp1 +yp2 --------- +ypn
Where ypq is the admittance of elements connected between the buses p & q.
Y12= Y21= -y12
Y23= Y32= -y23
Y31= Y13= -y31
In general
Ypq =Yqp= -ypq
If the power system elements have mutual coupling, then bus admittance matrix
cannot be found directly by inspection of the single line diagram. In such case Y bus can be
formed from graph theoretic approach. However, mutual coupling between power system
elements exists only on case of transmission lines running in parallel for long distance. But
this is also weak so for all practical purpose this can be ignored.
Advantages of bus admittance matrix (Ybus):
1. Data preparation is simple.
2. Its formation & modification is easy.
3. Since the bus admittance matrix is sparse matrix (i.e. most of elements are zero), the
computer memory requirements are less. For large power system more than 90% of its
off- diagonal elements are zero. This is due to the fact that in power system network
each node (node) is connected to not more then three nodes in general & an element
Ypq exists only if a transmission line links nodes p & q.
Bus- impedance matrix Zbus
Bus impedance matrix Zbus can be obtained by inverting the above-obtained Ybus matrix. But
usual method of forming Zbus matrix is by singular transformation or by step method.
In matrix form the relation between lbus, Zbus, Vbus can be written as
Vbus =[Zbus][lbus]
For a three bus system it can be written as

Dept.of E & E Engg., PESCE,Mandya Page 22


Power System Simulation Lab

V1 Z11 Z12 Z13 I1

V2 = Z21 Z22 Z23 I2

V3 Z31 Z32 Z33 I3

The elements Z11, Z22 Z33 forming the diagonal terms are called self impedance. The
elements Z12, Z13, Z21 …….. Forming the off diagonal elements are called mutual
admittances. Where the elements of Zbus matrix are obtained by inverting the Ybus matrix.
The order of Zbus matrix is same as that of Ybus matrix, which is of the order ==> (No of
buses)* (No of buses).

Advantages of Zbus Matrix:


1. Bus impedance matrix is mainly used in short circuit studies.
2. The use of bus impedance matrix provides a convenient means of calculating short
circuit current & voltage. When the ground is selected as reference, one of the distinct
advantage is that once the bus impedance matrix is formed, the elements of this
matrix can be used directly to calculate the current & voltage associated with various
types of faults & fault locations.
3. The result obtained from bus impedance matrix can be used to form loop admittance
matrix.

Example(1): Formation of YBus without mutual coupling by Inspection method.

Single Line Diagram of Transmission Network:

Half Line Charging Admittance Data: Shunt Admittance Element Data:

Bus Code HLC Admittance Bus Shunt Admittance


1-2 j 0.03 4 j0.02
1-4 j0.025
2-3 j0.02
2-4 j0.015
3-4 J0.01

Dept. of E&E Engg., PESCE,Mandya Page 23


Power system simulation lab

Experiment No.4
Study of Asymmetrical Faults
AIM:
To determine fault currents and voltages in a power system, for occurrence of a
Asymmetrical (short circuit) faults namely S.L.G, D.L.G, L.L.F, etc faults.

Theoretical background:
The shunt type of faults involves short circuit between conductor and ground, or short
circuit between two or more conductors. The shunt faults are characterized by
increase in current and fall in voltage and frequency. The shunt faults can be
classified as shown below.
1. Line-to-ground fault. 2. Line-to-line fault. 3. Double line-to ground fault. 4. Three
phase fault.
Single line to ground fault (SLGF):
For a single line to ground fault, Ia1 = Ia2 = Ia0 = Ia/3., and Ia1 = Ia2 = Ia0 = Vf / (Z1 + Z2
+ Z0).The above equations indicates that the three sequence networks should be
connected in series through the fault point in order to simulate a single line-to-ground
fault.
Line-to-Line fault (LLF). For a line to line fault, Va1 = Va2 and
Ia1 =Vpf/(Z1 + Z2).These equations indicate that the sequence networks should be
connected in parallel through the fault point in order to simulate a Line to Line fault .
Double Line to ground fault (DLGF): For a Line to Line fault, Va1 = Va2 = Va0 and
Ia1 = Vpf /[Z1+(Z2Z0/(Z2 + Z0))] .These equations indicate that the three sequence
networks should be connected in parallel through the fault point in order to simulate a
Double Line to ground.

PROCEDURE AND ALGORITHMS:

(a)Procedure for Double Line to Ground Fault (DLG)


1. Consider a power System with a generator connected at the sending end and
connected to a load or synchronous motor at the other receiving end connected
through the line. Load or Motor is drawing a pre-fault current ipf and the fault is on
the transmission line with vpf as the pre-fault voltage.
2. z1, z2 , z0 are the positive, negatives and zero sequence (Thevenin’s equivalents)
impedances at the fault point and vpf is the Thevenin’s voltage for positive sequence
network.
3. Let I fa1 is the positive sequence current for phase ‘a’ line, at the fault point.
4. I  vpf , where, z f is the fault impedance.
fa1 ((z||  z 3 z)) z
1 2 o f

5. Let I fa 2 is the negative sequence current for phase ‘a’ line and I fa 0 is the zero
sequence current for phase ‘a’ line at the fault point.

Dept.of E & E Engg., PESCE,Mandya Page 24


Power system simulation lab

6. I  I * zo  3z f
fa 2 fa1 ((z||  z 3 z)) z
1 2 o f

7. I  I z
* ((z||  z 3 2z)) z
fao fa1
1 2 o f

 1 12 1  I fao 
I fa 
8. I  1 a
   -------------(a)
a  I fa1 
 fb  
I  1 a a2  I 
 fc     fa 2 
Eqn.(a). Gives the fault currents from lines a, b, c into the fault point.
9. Pre-fault currents are appropriately superposed
10. Unbalanced currents Iu at any point is determined as Iu  AIs where Is is the
vector of sequence component currents at that point and A is the transformation
matrix for converting sequence components to unbalanced currents.
11. At the fault point, voltages are given by :
va1  vpf  z1Ia1
va 2  Ia 2 z2
va0  I ao (3zo ) z f
And then, vu = Avs gives unbalanced voltage at the fault point.

NOTE: Similarly the same procedure may be applied to all other faults viz...SLG,
LLF, etc

Programs for Unsymmetrical fault analysis viz., SLG, LLF, DLG faults

1. Program for SLG fault

% Program for Single Line to Ground fault


clear all ; clc ; close all

disp('---Single Line to Ground (SLG) fault results -----------');


disp(' ')
% Refer: PSA by: W.D. Stevenson (old edition ex:13.1)
MVA =20 ; KV = 13.8 ; % Power & Line to line Voltage
x1= 0.25 ; x2= 0.35; x0 =0.1 ; % Sequence Reactances in p.u

% Define the operators "a = 1|120(deg) and a-square, a2 =1|-120(deg)"


a = complex(-0.5+0.866i) ;
a2 = complex(-0.5-0.866i) ; % a^2 (a-square) i.e a2=conj(a)

Ibase = (0.0+0*i); % Initialize base current to zero (complex no.)


Ea= (1.0+0*i); % Assume Ea=1.0p.u i.e 100 % voltage
% ---- Sequence Impedances are :---------------------
z0=(0.0+x0*i) ; z1=(0.0+x1*i) ; z2=(0.0+x2*i);
% Single Line to ground fault current calculations
ia1 = (Ea)/(z1+z2+z0) ; % Sequence currents in p.u
ia2 = ia1 ; ia0 = ia1 ;

Dept.of E & E Engg., PESCE,Mandya Page 25


Power system simulation lab

disp(' Sequence components Ia0,Ia1,Ia2 in P.U values are:');


ia0 , ia1 , ia2 ,
% sub transient / fault currents in p.u
ia = 3*(ia1);
ib = 0 ; ic = 0 ; % as lines are not grounded.
disp(' Sub-transient currents in P.U.'); ia, ib, ic,

% To calculate the actual I - values


Ibase = (MVA*1000)/(sqrt(3)*KV); % base current
fprintf('\n Base current, Ibase = %9.2f Amps ',Ibase);
actIa = ia*Ibase; % Actual value = p.u value*Base value
actIb = ib*Ibase;
actIc = ic*Ibase;
% use - disp(' sub transient currents Ia,Ib,Ic in Amps ');
% use - either disp(actIa);disp(actIb);disp(actIc); or fprintf(..)
fprintf('\n Sub transient currents Ia,Ib,Ic in Amps ');
fprintf('\n Ia = %6.3f +i%6.3f Amps',real(actIa),imag(actIa));
fprintf('\n Ib = Ic = %6.3f +i %6.3f Amps\n',real(actIb),imag(actIb));
fprintf('\n Fault current, If = Ia = %9.3f Amps \n\n ',abs(actIa));

%--------------- Calculate the Sequence voltages in p.u------------


Va1 = Ea-(ia1*z1);
Va2 = 0 -(z2*ia2) ;
Va0 = 0 -(z0*ia0) ;
disp('Sym.components of ph.voltage(Vph)=Va=(Va1,Va2,Va0 are:)');
disp(Va1);disp(Va2);disp(Va0);
% Line to neutral/ ground voltages in P.U values
Va = 0 % Because line is grounded or Va = Va0+Va1+Va2
Vb = Va0+(a2*Va1)+(a*Va2)
Vc = Va0+(a*Va1)+(a2*Va2)
% here all are Phase (i.e.L-2-G) Voltages

% OPTIONAL PART of the program:


% TO Calculate the Line to Line voltages
disp(' Line to Line voltages Va,Vb,Vc in p.u.values');
Vab = Va - Vb
Vbc = Vb - Vc
Vca = Vc - Va

% convert p.u.Volts into actual values of voltages in KVs


VL1 = (Vab)*(KV/sqrt(3.0));
VL2 = (Vbc)*(KV/sqrt(3.0));
VL3 = (Vca)*(KV/sqrt(3.0));

disp(' Line to Line voltages Vab,Vbc,Vca in KVs');


fprintf('\n Vab = %6.3f KV @%6.3f deg.\n',abs(VL1),angle(VL1));
fprintf('\n Vbc = %6.3f KV @%6.3f deg.\n',abs(VL2),angle(VL2));
fprintf('\n Vca = %6.3f KV @%6.3f deg.\n',abs(VL3),angle(VL3));

% Ex:2. MVA =100 ; KV = 220 ; % Power & Line to line Voltage


% x0 =1.1 ; x1= 0.6 ; x2= 0.6; % Sequence Reactances in p.u

Dept.of E & E Engg., PESCE,Mandya Page 26


Power system simulation lab

Single Line to Ground (SLG) fault results


-----------------------------------------------------
Sequence components Ia0, Ia1, Ia2 in P.U values are:
ia0 = 0.0000 - 1.4286i, ia1 = 0.0000 - 1.4286i, ia2 = 0.0000 - 1.4286i
Sub-transient currents in P.U. are: ia = 0.0000 - 4.2857i, ib = 0 , ic = 0
Base current, Ibase = 836.74 Amps
Sub transient currents Ia, Ib ,Ic in Amps
Ia = 0.000 +i-3586.027 Amps , Ib = Ic = 0.000 +i 0.000 Amps
Fault current, If = Ia = 3586.027 Amps
Symmetrical components of Vph., phase voltage Va i.e.(Va1,Va2,Va0)
0.6429, -0.5000, -0.1429
Va = 0, Vb = -0.2143 - 0.9897i, Vc = -0.2143 + 0.9897i
Line to Line voltages Va,Vb,Vc in p.u.values
Vab = 0.2143 + 0.9897i , Vbc = 0.0000 - 1.9794i , Vca = -0.2143 + 0.9897i

Line to Line voltages Vab, Vbc, Vca in KVs


Vab = 8.068 KV @ 1.358 deg.
Vbc = 15.771 KV @-1.571 deg.
Vca = 8.068 KV @ 1.784 deg.

Program for Line to Line faults

% Program for Line to Line fault (LLF) - Fault Analysis


% ======================================================
clear all ; clc
disp(' -------- LLF fault results -------------');
disp(' ')
% Refer: PSA by : W.D. Stevenson (old - edition ex:13.2)
MVA =20 ; KV = 13.8 ; % Power & Line to line Voltage
x1= 0.25 ; x2= 0.35; x0 =0.1 ; % Sequence Reactances in p.u
% define the operators a & a2
a = (-0.5+0.866i) ; % operator ’a’ defined
a2 = (-0.5-0.866i) ; % operator ’a2’ defined
Ibase = (0.0+0*i); % Initialize base current to zero

Ea= (1.0+0*i); % Assume Ea=1.0p.u i.e. 100% voltage


z0= (0.0+x0*i) ; z1=(0.0+x1*i) ; z2=(0.0+x2*i);
% LLF calculations: - I- Sequence components are :
ia1 = (Ea)/(z1+z2); ia2 = -ia1 ; ia0 = 0 ;
disp(' Sequence components Ia0,Ia1,Ia2 in P.U values are: ');
ia0 , ia1 , ia2 ,
% fault currents in p.u
disp(' Sub transient currents Ia, Ib, Ic in P.U.');
ia = ia0+(ia1)+(ia2) , % note: lines are not grounded.
ib = ia0+(a2*ia1)+(a*ia2),
ic = ia0+(a*ia1)+(a2*ia2), % ic =-ib ;

% To calculate the actual values

Ibase = (MVA*1000)/(sqrt(3)*KV); % base current


fprintf('\n Base current: Ibase = %9.3f Amps',Ibase) ;
actIa = ia*Ibase ;
actIb = ib*Ibase ;
actIc = ic*Ibase ;

Dept.of E & E Engg., PESCE,Mandya Page 27


Power system simulation lab

fprintf('\n sub transient currents Ia,Ib,Ic in Amps ') ;


fprintf('\n Ia = %6.3f +i %6.3f Amps',real(actIa),imag(actIa));
fprintf('\n Ib = Ic = %6.3f +i%6.3f Amps \n ',real(actIb),imag(actIb));
fprintf('\n Fault current, If = Ib or -Ic =%9.3f Amps \n\n,abs(actIb));

%--- Calculate the Sequence components of voltages in p.u---------


Va1 = Ea-(ia1*z1);
Va2 = -(z2*ia2) ;
Va0 = -(z0*ia0) ;
disp(' Symmetrical components of voltage Va i.e(Va1,Va2,Va0)');
disp(Va1);disp(Va2);disp(Va0);
% Line to ground voltages in P.U values
Va = (Va0+Va1+Va2);
Vb = Va0 +(a2*Va1)+(a*Va2);
Vc = Va0 +(a*Va1) +(a2*Va2);
disp(' Line to ground voltages Va, Vb, Vc in p.u. are : ');
(Va), (Vb), (Vc),
% OPTIONAL PART of the program:
% TO Calculate the Line to Line voltages
disp(' Line to Line voltges Va,Vb,Vc in p.u.Volts');
Vab = Va - Vb
Vbc = Vb - Vc
Vca = Vc - Va

% convert p.u.Volts into actual values of voltages


VL1 = (Vab)*(KV/sqrt(3.0)) ;
VL2 = (Vbc)*(KV/sqrt(3.0)) ;
VL3 = (Vca)*(KV/sqrt(3.0)) ;

disp(' Line to Line voltages Vab,Vbc,Vca in KVs');


fprintf('\n Vab = %6.3f KV @%6.3f deg.\n',abs(VL1),angle(VL1));
fprintf('\n Vbc = %6.3f KV @%6.3f deg.\n',abs(VL2),angle(VL2));
fprintf('\n Vca = %6.3f KV @%6.3f deg.\n',abs(VL3),angle(VL3));
%
% Ex:2. MVA =100 ; KV = 220 ; % Power & Line to line Voltage
% x0 =1.1 ; x1= 0.6 ; x2= 0.6; % Sequence Reactances in p.u
% fault: L-L-F results

Sequence components Ia0, Ia1, Ia2 in P.U values


ia0 = 0, ia1 = 0.0000 - 1.6667i, ia2 = 0.0000 + 1.6667i
Sub-transient currents Ia, Ib, Ic in P.U.
ia =0, ib = -2.8867, ic = 2.8867 ,
Base current: Ibase = 836.740 Amps
sub transient currents Ia, Ib, Ic in Amps
Ia = 0.000 +i 0.000 Amps
Ib = Ic = -2415.388 +i 0.000 Amps
Fault currents, If = Ib or -Ic = 2415.388 Amps
Symmetrical components of voltage Va i.e(Va1,Va2,Va0)
0.5833, 0.5833, 0
Line to ground voltages Va, Vb, Vc in p.u.
Va = 1.1667, Vb = -0.5833, Vc = -0.5833
Line to Line voltages Va, Vb, Vc in p.u. Volts
Vab = 1.7500, Vbc = 0 , Vca = -1.7500
Line to Line voltages Vab, Vbc, Vca in KVs
Vab = 13.943 KV @ 0.000 deg.
Vbc = 0.000 KV @ 0.000 deg.
Vca = 13.943 KV @ 3.142 deg.

Dept.of E & E Engg., PESCE,Mandya Page 28


Power system simulation lab

Program for – DLG or LLG fault


% Program for - D L G fault analysis
%
clear all, clc
% MVA = input ("\n Enter Base MVA : ");
% KV =input ("\n Enter Base KV : ";
% display ('\n Enter the values 0f x0, x1, x2 \n');
% x0 =input ('x0'), x1=input('x1'), x2=input('x2');
% Refer: PSA by: W.D. Stevenson (old - edition ex:13.3)
% Data given:
MVA =20 ; KV = 13.8 ; % MVA rating & Line to line Voltage
x0 =0.1 ; x1= 0.25 ; x2= 0.35; % Sequence Reactances in p.u
z0=(0.0+x0*i) ; z1=(0.0+x1*i) ; z2=(0.0+x2*i);
Ea = (1.0+0i); % Assume Ea=1.0p.u as same as base
a = (-0.5+0.866i); % operator, a=1|@120 deg
a2 = (-0.5-0.866i); % operator, a2=1|@240 deg

% ---- Sym. components -- calculations ------


fprintf('\n D-L-G fault results \n');
fprintf('\n Symmetrical /Sequence components in P.U values \n');
ia1 = (Ea)/(z1+((z2*z0)/(z2+z0)))
ia2 =(-1)*(ia1*(z0/(z0+z2)))
ia0 =(-1)*(ia1*(z2/(z0+z2)))

% ----- fault currents in p.u -----------------


ia = (0+0*i); % as line a is not shorted to GND.
ib = ia0+(a2*ia1)+(a*ia2);
ic = ia0+(a*ia1)+(a2*ia2);
fprintf('\n sub transient currents Ia, Ib, Ic in in p.u. \n');
disp(ia); disp(ib); disp(ic);
disp(' Neutral current, In = 3Ia0 (or In = Ib+Ic)');
In = ib+ic

%--- to calculate the actual I - values


Ibase = (MVA*1000)/(sqrt(3)*KV); % base current
actIa = ia*Ibase ;
actIb = ib*Ibase ;
actIc = ic*Ibase ;

fprintf('\n Base MVA = %6.2f , Base KV = %6.2f ',MVA,KV) ;


fprintf('\n Base current, Ibase = %9.2f Amps \n',Ibase);

fprintf('\n Sub transient currents Ia, Ib, Ic in Amps ');


fprintf('\n Ia = %6.3f +i%6.3f Amps ', actIa) ;
fprintf('\n Ib = %6.3f +i%6.3f Amps ', actIb);
fprintf('\n Ic = %6.3f +i%6.3f Amps ', actIc) ;

% -------------- Voltage symmetrical components -----------------


Va1 = Ea-(ia1*z1);
Va2 = -ia2*z2 ; % or =Va1 ;
Va0 = Va1 ;
fprintf('\n Symmetrical components of voltage(Va)\n');
fprintf('\n Va1: %6.3f +i%6.3f ',Va1);
fprintf('\n Va2: %6.3f +i%6.3f ',Va2);
fprintf('\n Va0: %6.3f +i%6.3f \n ',Va0);

Dept.of E & E Engg., PESCE,Mandya Page 29


Power system simulation lab

% Line to ground voltages in P.U values


Va = (Va0+Va1+Va2);
Vb = 0; %Vb = Va0 +(a2*Va1)+(a*Va2);
Vc = 0; %Vc = Va0 +(a*Va1) +(a2*Va2);
disp(' Line to ground voltages Va, Vb, Vc in p.u. ');
(Va), (Vb), (Vc),

% OPTIONAL PART of the program:

% TO Calculate the Line to Line voltages


disp(' Line to Line voltges Va,Vb,Vc in p.u.Volts');
Vab = Va - Vb
Vbc = Vb - Vc
Vca = Vc - Va

% convert p.u.Volts into actual values of voltages


VL1 = (Vab)*(KV/sqrt(3.0));
VL2 = (Vbc)*(KV/sqrt(3.0));
VL3 = (Vca)*(KV/sqrt(3.0));

disp(' Line to Line voltges Vab,Vbc,Vca in KVs');


fprintf('\n Vab = %6.3f KV @%6.3f deg.\n',abs(VL1),angle(VL1));
fprintf('\n Vbc = %6.3f KV @%6.3f deg.\n',abs(VL2),angle(VL2));
fprintf('\n Vca = %6.3f KV @%6.3f deg.\n',abs(VL3),angle(VL3));

D-L-G fault results


Symmetrical /Sequence components in P.U values
ia1 = 0.0000 - 3.0508i, a2 = 0.0000 + 0.6780i, ia0 = 0.0000 + 2.3729i
Sub transient currents Ia, Ib, Ic in in p.u.: (0, -3.2292 + 3.5593i, 3.2292 + 3.5593i)
Neutral current, In = 3Ia0 (or In = Ib+Ic), In = 0.0000 + 7.1186i
Base MVA = 20.00, Base KV = 13.80
Base current, Ibase = 836.74 Amps
Sub transient currents Ia,Ib,Ic in Amps
Ia = 0.000 +i
Ib = -2701.960 +i
Ic = 2701.960 +i
Symmetrical components of voltage (Va)
Va1: 0.237 +i
Va2: 0.237 +i
Va0: 0.237 +i
Line to ground voltages Va, Vb, Vc in p.u.: Va = 0.7119, Vb = 0, Vc = 0
Line to Line voltages in p.u. : Vab = 0.7119, Vbc = 0, Vca = -0.7119
Line to Line voltages Vab, Vbc, Vca in KVs:

Vab = 5.672 KV @ 0.000 deg.

Vbc = 0.000 KV @ 0.000 deg.

Vca = 5.672 KV @ 3.142 deg.

Dept.of E & E Engg., PESCE,Mandya Page 30


Power System Simulation Lab

System Data for fault analysis

Example.1
(On a common base of 25 MVA, 11KV, in the Generator Circuit)

Motor is drawing 0.9 pu Real Power at 0.909 pu voltages and 0.8 PF lagging

(System Data, before conversion to Common Base)

Sl.No. Power System Component Rating Impedance


MVA KV Positive Negative Zero
1 Generator (G)
2 Sending End Transformer(Ts)
3 Receiving End
Transformer(Tr)
4 Transmission Line (TL)
5 Motor (M)

Motor is drawing 22.5 MW at 10 KV, 0.8 PF lag before occurrence of fault.


Note: Here Fault Imp, Zf =0.05. Write program to solve the above problem which includes Zf
and determine fault contributions.

Example.2: For the given circuit, find the fault currents, voltages for the following type of
faults at Bus 3. (1) Single Line to Ground Fault, (2) Line-to-Line Fault (3) Double Line to
Ground Fault. For the transmission line assume X1=X2, X0==2.5XL.

Dept.of E & E Engg., PESCE,Mandya Page 31


Power system simulation lab

Experiment-5
Power Angle Diagrams

AIM:
(i) Determination of power angle diagrams for Salient & Non-salient Synchronous
Machines.
(ii) Calculation of Reluctance power, excitation E.M.F & voltage regulation.

Theoretical background: The study of steady state stability is basically concerned


with the determination of the maximum power flow possible through the power
system, without loss of synchronism (stability). The power angle equation plays a
vital role in the study of steady state stability. There are basically two types of
synchronous machines, the non-salient pole type and the salient pole type.
(a) Power-Angle equation of a non-salient pole synchronous machine. In case of
non-salient pole machines (cylindrical rotor structure), the air gap is uniform all along
the rotor peripherals & hence the flux linkages is also uniform. Therefore, the machine
offers the same reactance for the flow of armature current at all places. This reactance is
called as the synchronous reactance (Xs) of the machine. The reactance diagram of a
non-salient pole synchronous (machine) generator connected through a transmission
line to an infinite bus is shown in figure (1).
Fig.(1).Single M/c Connected Infinite bus (SMIB) system.

Let E = generated voltage in the machine.


 = load angle or torque angle or power angle.
Xs = Syn. Reactance of the machine.
Et = voltage at the terminals of the machine
Xe= reactance of the transmission line.
V0= voltage at infinite bus (taken as reference)
I = Load current.
From the phasor diagram, )

I= where X = (Xs + Xe) ------ (1)

The net power delivered by the machine is given as, P = Re {V.I*}


P =Re from ------ eq. (1)
Finally, -------------------------------(2)

Dept.of E & E Engg., PESCE,Mandya Page 32


Power system simulation lab

This equation is called as the Power Angle Equation of a non-salient pole


synchronous machine. The graphical plot showing P vs.  , for fixed values of E, V
& X is called as the Power Angle Curve, which is shown in figure (3).
The maximum power transfer occurs at  = 900.
The corresponding power is
- - - - - -(3a) OR

- - - - - -(3b)

As  increases, power output of the machine reduces successfully and finally the
machine may stall. Hence, Pm at which maximum power transfer occurs is called as
the steady state stability limit (SSSL) of the machine. The machine operation is stable
in the region 00< 900. Here the slope of the curve is +ve (i.e. dP/d> 0). The term
dP/d is called as synchronizing power coefficient or machine stiffness. The condition
for dP/d <0, the system is unstable.
(b). Power-Angle equation of a salient pole synchronous machine:
A salient pole machine has projecting (salient) poles. Hence, the air gap is non-
uniform along the rotor periphery. It is least along the axis of the main poles (called
the direct axis). Hence, the flux linkages are non-uniform. Correspondingly, the
machine offers a direct axis reactance (Xd) & quadrature axis reactance (Xq) for the
flow of armature current. The phasor diagram of the machine neglecting the armature
resistance is shown in figure (4).

Referring to the diagram, we can derive the expression for power delivered as:

Dept.of E & E Engg., PESCE,Mandya Page 33


Power system simulation lab

(4)
As evident from equation(4), that there is a fundamental & a second harmonic
component of power, the first term is same as for a round-rotor machine with Xs =
Xd. This constitutes the major part of the power transfer. The second term is quite
small (10-20%) compared to the first term & is known as Reluctance Power.

Reluctance Power, Ps = ------------------------------------ (5)

The power angle curve of the machine is shown in figure (5). It is noticed that the
maximum power output (SSSL) occurs at <900 (about 700). This value of ‘’ at
which the power flow is maximum can be computed by equating the synchronizing
power coefficient i.e. dP/d to zero.

Resultant power

Ist term power.

Pm 900 1800 

Reluctance power

(c). Calculation of excitation E.M.F. & voltage regulation: When the rotor is
revolving at synchronous speed & the armature current is zero, the field m.m.f
produces the no-load generated e.m.f, E in each phase. The no-load generated voltage
which is proportional to the field current is known as the Excitation Voltage, E = V +
j I Xs. The voltage regulation of an alternator is a figure of merit used for
comparisons with other machines. It is defined as the percentage change in terminal
voltage from No-load to Rated load (i.e., E to V).

*100
Regulation R = .

Where, V = Rated voltage , & E = No load or excitation voltage

PROCEDURE:

(a).Salient Pole Generator


- Voltage behind quadrature axis synchronous reactance, Eq is calculated as
Eq  Vt  I l ()ra  jxq  Eq 
where Eq is the rated voltage / phase
Il is the load current at a specified pf, cos φ

Dept.of E & E Engg., PESCE,Mandya Page 34


Power system simulation lab

ra is the armature resistance / phase


xq is the quadrature axis reactance / phase

- Direct and quadrature axis components of armature currents are computed as


id  Il sin(  φ)
iq  Il cos(  φ)

φ is positive for lagging pf and negative for leading pf

- Excitation EMF is calculated as


E  ((E))q  jid xd  xq 

E Vt
- % Regulation = * 100
Vt
 EV sin  V 2 ()xsin2x  
- P t  t d q
 watts / phase
 xd 2xd xq 

 V 2 t()xsin2x 
d q
Where, reluctance Power = 

2xd xq
and, P is the total power output / phase

- Power angle diagram is obtained by evaluating the expression for P for about say
50 equally spaced values of δ between 0 to Π radian and obtaining the plot of
P vs δ
- Similar procedure is applicable for obtaining the fundamental and second harmonic
(reluctance power) components of Power Angle Diagram.

(b) Non Salient Pole Generator


-
- The only difference in the procedure is that xd and xq have same values.
Consequently, Eq  Vt  I l ()ra  jxq
E Vt
% Regulation = * 100
Vt
EVt sin 
P , neglecting R
a
xd
Reluctance Power = zero

Dept.of E & E Engg., PESCE,Mandya Page 35


Power system simulation lab

ALGORITHMS:

Expt.(a) Power angle characteristics of cylindrical rotor generator

1. Read or Enter values


2. Calculate,
=
–j .
)

3. Plot power angle characteristics from delta 0 to Pi.


Indicate Pmax & corresponding delta.
*100 .
4. Regulation R = (5) Display R
6. Stop.

Expt.(b) Power Angle Characteristics Of Salient Rotor Generator:

1. Read Xd, Xq, Xd1, V, P & Pf


2.  = Cos-1 (pf)
I= P/ (V*pf)
Ia = I Cos - j I Sin
delta = tan-1 ((Xd) /Ia. Cos) / (|V| + Xq Ia Sin))
E = VCos(delta) +Xd / Ia Sin (delta +)
Pm =E V / Xd
P = Pm. Sin (delta)
Pr = V2 (Xd – Xq) / (2 * d * q)
Pe = Pm. Sin (delta) + Pr Sin (2delta)
3. Plot P, Pr, Pe from delta = 0 to Pi
Find max Pe & the corresponding delta & indicate the same.

E - V
4. Regulation R = ------------------ *100
V
5. Display E, Pemax, delta, Reluctance power (Pr) & Volt R
6. Stop.

Dept.of E & E Engg., PESCE,Mandya Page 36


Power system simulation lab

Program for Power Angle Diagram


% Determination of power angle diagrams for salient and
% non-salient pole synchronous machines, reluctance power,
% excitation E.m.f and regulation.

clc , clear all , close all ;


P = input('Power in MW. = ');
pf = input('Power Factor = ');
Vt = input('Line to Line Voltage in KV = ');
Xd = input('Xd in ohms = ');
Xq = input('Xq in ohms = '); % Enter Xq=Xd value, if Xq is not given
Vph = Vt*1000/sqrt(3) % Convert line-V to Per phase voltage

pf_ang = acos(pf); % Power factor angle


Q = P*tan(pf_ang); % Reactive power
I =(P-j*Q)*1000000/(3*Vph) % Current in Amps

delta=0:1:180; % power angle in degrees


delta_rad=delta*(pi/180); % Angle in radians
% For Non-Salient pole Synchronous or generator Motor
if (Xd == Xq)
Ef = Vph+(j*I*Xd) ;
Ef_mag = abs(Ef) % Magnitude of Excitation EMF
RealPower = abs(Ef)*Vph*sin(delta_rad)/Xd;
Net_3Power = 3* RealPower/1000000 ; % in MW
Net_Reluct_power = 0.0
end

if (Xd~=Xq) % Salient pole Synchronous or generator Motor

Eq = Vph+(j*I*Xq);
Id_mag = abs(I)* sin(angle(Eq)-angle(I));

Ef_mag = abs(Eq) + ((Xd-Xq)*Id_mag) ;

RealPower = (Ef_mag)*Vph*sin(delta_rad)/Xd ;
Reluct_power = Vph^2*(Xd-Xq)*sin(2*delta_rad)/(2*Xd*Xq);
Net_Reluct_power = 3*Reluct_power/(1e6) ; % Power in MWs
TotalPower = RealPower + Reluct_power ;

Net_3Power = 3*TotalPower/1000000; % Total3phase Power in MW


end

fprintf('\n Excitation EMF per phase, Ef = %6.2f in KV \n',Ef_mag/1000);

Vreg =(Ef_mag - abs(Vph))*100/abs(Vph);


fprintf('\n Voltage Regulation = %5.2f %% \n', Vreg);

plot(delta,Net_Reluct_power,'k');
hold on % Note: to plot/draw graph on the same graph sheet
plot(delta,Net_3Power,'r');
xlabel('\delta (Deg) -->');
ylabel('Three phase Power -->');
title('Power Angle Curve for Synchronous M/C');
legend('Reluctance power', 'Total Real Power') ;
grid

Dept.of E & E Engg., PESCE,Mandya Page 37


Power system simulation lab

Inputs & outputs

Power in MW = 40
Power Factor = 0.8
Line to Line Voltage in KV = 34.65
Xd in ohms = 13.5
Xq in ohms = 9.33
Vph = 2.0005e+04
I = 6.6649e+02 - 4.9987e+02i
Excitation EMF per phase, Ef = 28.14 in KV
Voltage Regulation = 40.67 %

Note: Observe the outputs & Power – angle diagram o and comment on results

Power Angle Curve for Synchrous M/C


140
Reluctance power
120 Total Real Power

100
Three phase Power -->

80

60

40

20

-20
0 20 40 60 80 100 120 140 160 180
 (Deg) -->

Example. 2

A 3 Phase Star connected Synchronous Generator, with ratings as165 KVA, 95.2 KV,
delivering full load at 0.8PF lag. Armature resistance = 0.2 Ω per Phase. Direct axis
Armature Reactance = 2 Ω per Phase, Quadrature axis Armature Reactance = 1.2 Ω
per Phase (Salient Pole Synchronous Generator).Quadrature axis Armature Reactance
= 2 Ω per Phase (Non-Salient Pole Synchronous Generator).Draw power angle
diagram.

Example (3): A 50 MVA, 30KV, 3-phase, 60Hz synchronous generator has Xs of 9


Ohm/Ph & a negligible resistance. The generator is delivering rated power at a 0.8 p.f.
lagging at the rated terminal voltage, to an - bus.
a) Determine the excitation voltage E & the power angle .
b) With the excitation held constant at the value found in (a), the delivering a load of
5MW, determine armature current & the power factor.

Dept.of E & E Engg., PESCE,Mandya Page 38


Power system simulation lab

c) If the generator is operating at the excitation voltage of part (a), what is the SSSL
(power) the machine can deliver before losing synchronism? Also find the armature
current corresponding to this maximum power.

Example (4): Consider a synchronous machine characterized by the following


parameters: Xd = 1.0pu Xq = 0.6pu Xd = 0.3pu.The machine is connected directly
to an  - bus of voltage of 1.0pu. The generator is delivering a real power of 0.5pu at
0.8p.j lagging. Determine the voltage behind transient reactance & the transient
power-angle equation for the following cases:
(i) Neglecting the saliency effect
(ii) Including the effect of saliency

Dept.of E & E Engg., PESCE,Mandya Page 39


Power system simulation lab

Experiment-6
Transient stability
AIM:
(1) To determine Critical Clearing Time (CCT) or CC angle (CCA) for a given
Synchronous generator connected to Infinite bus (SMIB).
(2) To determine the stability of a system by drawing the Swing curve.

Theoretical background:
The stability problem is concerned with the behavior of the synchronous
machines after a disturbance. Stability in general is that attribute of a power system due
to which when an external disturbance tends to upset the synchronous running of
generators, restoring torques are developed so that the machines regain synchronism
quickly. Transient stability studies deal with the effects of large, sudden disturbances
such as the occurrence of the sudden application or removal of loads. The studies are
useful in determine such things as the nature of the relaying system needed, critical
clearing time of circuit breakers, voltage level of & transfer capability between system.
During any disturbance, rotor will decelerate or accelerate with respect to the
synchronously rotating air gap mmf, & a relative motion begins. The equation,
describing this relative motion is known as the ‘Swing equation’ is given below.
(d2 δ/dt2) = (Pa/M) = (1/M)(Pi – Pm sin δ)
The suddenness of disturbance could be due to sudden switching on or off of load,
sudden fault on the system, tripping of transmission line etc.The basic principle for
transient stability pertains to the rotor dynamics of a synchronous generator. For
normal synchronous running conditions, since a synchronous generator is a rotating
electromechanical energy conversion device, there is a balance between the net
mechanical input power, Pm and the electrical power developed Pe. Hence the
differential Power Pa, called the accelerating power and defined as the difference
between Pm and Pe is zero. By basic principles of mechanics, the rotor continues to run
at a constant (synchronous) speed. However, during sudden disturbances, there is a
sudden change in Pe. The mechanical input Pm cannot respond as quickly due to
mechanical inertia of governor system controlling the output of prime mover driving the
generator. The non-zero accelerating power now tends to cause acceleration of the
rotor. The change in speed of rotor causes the power angle to change from its steady
state value 0 . However P depends on δ so that with a change of δ, P changes
e e
followed by changes in Pa and the acceleration. This closed cycle of occurrence repeats
for a few cycles during which the rotor is subjected to acceleration and deceleration
causing the rotor to swing back and forth about a final new position. If the system is
unstable, the rotor is subjected to a continuous monotonic swing. In this background, a
plot of rotor swing as function of time, called the swing curve gives an idea about the
stability or otherwise of the system. The first peak of swing curve is important because,
it is assumed that successive peaks have reducing values so that the existence of the first
peak itself indicates system stability. Mathematically therefore the existence of a
d
0
dt (at the first peak) at a finite instant after the occurrence of disturbance indicates
stability. This principle is the basis for what is called the Equal area of Criterion.
Generally a short term transient stability analysis evaluates the swing curve for a period
of 1 sec. If there is no peak, the system is unstable, otherwise system is stable.

Dept.of E & E Engg., PESCE,Mandya Page 40


Power system simulation lab

The basic differential equation governing the rotor dynamics during the transient period
is called swing equation and is a Second Order, Non-Linear Differential equation
(NLDE) in 2δ, with constant coefficients given by:
 πf

 Pmech  Pem sin  ...............................................(1)
t 2
H
Where  = Power angle, in radians
f = System frequency
H = Inertia constant of rotor in MJ/MVA of stored kinetic energy at
synchronous speed.
Pe = Pem sin  , is the power angle characteristic of the synchronous generator.
Solution of Swing equation:
Solution of NLDE requires numerical methods. There are various methods available
for the solution of the Swing equation. There are (i) Point by Point or Step by Step
method, (ii) Runge-kutta (RK) method, (iii) Euler’s method, etc. One common method
is the modified Euler method. For computational purposes, equation (1) can be split
into two first order differential equations (2) and (3).
  o  i , o = Steady State Power Angle = Constant
i = Change (increment) of Power Angle during Transient interval.
 = Power angle at any instant of time
d d
w   w  i  w , w is speed at any instant.
r S S r
dt dt
w  w  w , w is change (increment) in rotor velocity = d i
i r S i
dt
dwi π f
therefore,  (sPin ) P  ……………………(2)
dt H mech em
d i
 w r w s w i ………………………………..… (3)
dt
For understanding the concept of transient stability and swing curve, it is common to
consider a synchronous generator delivering power to infinite bus through a pair of
transmission lines (i.e Single M/c connected to Infinite Bus, SMIB system).

In this system assume a 3 phase symmetric short circuit fault occurs on one of the
transmission lines. Then let it be followed by isolation of the faulty line after a few
cycles thus clearing the fault, on the remaining system. Thus the system switches from
pre-fault to during- fault and during- fault to post- fault conditions. What is interesting
is that if the faulty line is cleared after a critical instant of time, called the critical
clearing time tcr , the system does not regain stability even though the fault on the
system has been isolated. Hence evaluation of critical clearing time, tcr (CCT) is
absolutely essential to ensure that the fault is cleared in a time less than tcr thus
ensuring stability.

Dept.of E & E Engg., PESCE,Mandya Page 41


Power system simulation lab

Determination of Critical Clearing Angle or C. C. Time:


From equal area criterion of transient stability
Al = δcrδ0 Pm dδ = Pm (δcr - δo)
While the area A2 is,
A2 = δmax δ0 Pm dδ = Pm (δcr - δo)
Equation A1 & A2 & transposing terms

And
Pm = Pmax Sin δ0
Substituting for δmax & Pm in Eq.(1)
δcr = cos -1 [(Π - 2δ0 )sin δ0 – cosδ0 ] .......................... (2)
We have
Δ(t)│t=tc = ωs Pm/4H t2c +δ0
Substituting Eq.(2) in above equation
δ cr=ωs Pm/4H t2cr+δ0
tcr = √4H(δ cr - δ0 )/ ωs Pm
or
tcr = √(2H(δ cr - δ0 )/ pi*f* Pm)

Solution of swing equation: Point by Point Method


The swing equation is
(d2 δ/dt2) = (Pa/M) = (1/M)(Pi – Pm sin δ) --------------- (1)
The solution of above equation gives a plot of ‘δ’ versus ‘t’ – this graph is known as
swing curve. If the swing curve indicates that δ starts decreasing after reaching a
maximum value, the system can be assumed to be stable.
In the point by point method the change in δ during a small interval ∆t is calculated by
assuming that the accelerating power Pa calculated at the beginning of an interval is
constant from the middle of the interval being considered.
Consider the nth time interval which begins at t= (n-1) ∆t. The angular position of the
rotor at this instant is δn-1. The accelerating power Pa(n-1) & acceleration α(n-1) as
calculated at this instant is assumed to be constant from :
t = (n-3/2) ∆t to (n-1/2) ∆t.
During this interval the change in rotor speed can be written as
∆ωn-1/2 = (∆t) α(n-1) = (∆t /M) Pa(n-1) ---------------------------------(2)
The speed at the end of nth interval is

Dept.of E & E Engg., PESCE,Mandya Page 42


Power system simulation lab

∆ωn-1/2 = ∆ωn-3/2 + ∆ ωn-1/2 -----------------------------------------------------(3)


The change in speed is assumed to occur at the middle of one interval & is assumed to
remain constant till the middle of the next interval.
The change in angular position of rotor during nth time interval is
∆ δn = (∆t) ωn-1/2
And the value of δ at the end of nth interval is
δn = δn-1 + Δδn -------------------------------------- (5)
Substituting (2) in (3) & the resultant in (4)
Δδn = (Δt) ωn-3/2 + ((Δt)2 /M) P a(n-1) (6)
Also Δδn-1 = (Δt) ωn-3/2 (7)
Therefore Δδn = Δδn-1 + ((Δt)2 /M) P a(n-1) (8)
During the calculations, a special attention has to be paid to the effects of
discontinuities in the accelerating power Pa which occur when a fault is applied or
cleared or when a switching operation takes place. If a discontinuity occurs at the
beginning of an interval then average value of Pa before & after the
discontinuity be used.

PROCEDURE:
1. Excitation EMF ‘E’ and transfer reactance ‘Xo’ between the generator and infinite
bus are determined for the specified output of the generator, taking infinite bus voltage
V as reference.
EV sin 
2. Pre-fault power angle characteristics is determined as Po 
xo
where E and V are the magnitudes of Excitation EMF and voltage of infinite bus
P
3. Pre-fault Power angle is obtained as   sin1 mech
o
Pom
where, Pmech = Electrical Output of generator before occurrence of fault.
4. For the specified fault location the new transfer reactance x1 is determined.
Assuming constant Excitation EMF and infinite bus voltage, the P   characteristics
EV sin 
during the fault is obtained as P   P sin  .
1 1m
x1
5. For the system configuration after the isolation of faulty line, the transfer reactance
x2 and the corresponding Post fault P   characteristics is obtained as
EV sin 
P2   P2m sin 
x2
6.Total time of transient stability study Ts, time at the instant of fault clearance tc ,
inertia constant H of the generator, normal system frequency f are all identified from
system data.
Critical clearing
 angle is determined from the equation
  1  Pmech ()
 cmo
s  o  P1mcos  o  P2 m  m   
c  cos  
  P2m  P1m  
For determining critical clearing time, solution of swing equation is obtained for
sustained fault, using modified Euler method for the equation (2) and (3).
Critical clearing time is then the time corresponding to c .

Dept.of E & E Engg., PESCE,Mandya Page 43


Power system simulation lab

7. For calculation of swing curve for sustained fault, it is enough to assume tc > T;
For example, tc =T+0.01
8. For obtaining swing curve when the fault is cleared, the procedure is similar; i.e.,
point by point or modified Euler method is applied to equations (2) and (3) to obtain
incremental values of rotor swing during successive time steps and the rotor swing at t
the end of time steps obtained by adding the increments to the values at the
commencement respective steps. It is important to use Pe = P1 for intervals before
fault clearance and Pe = P2 for intervals after the fault clearance.
9. A Plot of δ Vs t gives the swing curve in both cases (Sustained Fault / Fault
cleared)
10. Procedure is repeated for different values of inertia constant, fault location, fault
clearing time, line reactance and pre fault electrical output to study their effect on
swing curve, by changing the value of one of them at a time keeping others constant.

Illustrative Example 1: Refer P S A book by Hadi Sadath, pp-497, example 11.5.


A 60 Hz synchronous generator having inertia constant H=5MJ/MVA & Xd=0.3 pu is
connected to infinite bus through a double circuit transmission lines, as shown in figure. The
generator is delivering real power Pe = 0.8 pu. & Q = 0.074 pu to the infinite bus at a voltage
of V = 1 pu. Here Xt =0.2, XL1=XL2 =0.3.

A temporary 3-phase fault occurs at sending side of the at a point ‘F’. When fault is cleared,
both lines are intact. Determine the critical clearing angle (CCA) & the critical clearing
time.(CCT).
(a). A 3-phase fault occurs at middle of one of the lines, and fault is cleared by isolating the
faulty line. Determine CCA
(b). If the fault is cleared in 0.3sec, obtain the numerical solution of the swing equation for
sec from the swing curve; determine the system stability, & the Critical Clearing Time
(CCT by using CCA).
(b).Repeat the simulation & obtain the swing plots for the CCT, & when fault is cleared in
0.5sec.
Solution: The current flowing into the bus is, I = S*/ V* = (0.8 – j0.074)/ 1.00o .
i.e.,I =(8 – j0.074)pu. The transfer reactance the internal voltage,E & the infinite bus before
fault is X1 = 0.3 + 0.2 + (0.3/2) = 0.65pu. The transient internal voltage is :
E’ = V + jX1 I = 1.0 + (j 0.065) (0.8 – j0.074). i.e. E’ = 1.17 26.387opu. Now the power
angle equation before the fault Pe1, is, Pe1 = P1max sin = (E.V/X1) sin
Pe1 = 1.8sin ----------------- (1)
The initial operating angle is given by, 1.8sino = 0.8
i.e. The initial power angle is o = 26.388o = 0.46055rad. or o = 26.4o

Dept.of E & E Engg., PESCE,Mandya Page 44


Power system simulation lab

The generator is operating at the initial power angle o = 26.4o or 0.4605 rad. The fault
occurs at the middle of one line [say at ‘F’], & resulting circuit is shown below. The transfer
reactance during fault may be found by Y - conversion.

The equivalent reactance between the generator & the - bus is X2

(0.5)(0.3) + (0.5)(0.15) + (0.03) (0.15)


X2 = = 1.18
0.15
Thus the power angle curve during fault is given by P e2 = Pe2maxsin = (EV/X2) Sin.
Pe2 = (1.7*1.0/1.8) Sin = 0.65.sin Sin -------(2)
When fault is cleared, the faulted line is isolated. Therefore, the post fault transfer reactance
is X3 = 0.3 + 0.2 + 0.3 = 0.8Pu.
The power-angle curve during fault is
Pe3 = P3max sin = (1.17*1.0/0.8) sin = 1.4625sin
Pe3 = 1.4625 sin -------- (3)

Pe
Pe before fault (P1)

Pe after fault (P3)


Pm
Pe during fault (P2)

0 o e max  

Fig(2) Equal area criterion for critical angle(CCA).


Referring to this figure, we have
Pe2
max = 180 – sin
o -1

Pe3max

0.8
=180o – sin-1
1.4625

Dept.of E & E Engg., PESCE,Mandya Page 45


Power system simulation lab

max = 146.838o = 2.5625 rad.

Now critical clearing angle (CC) is given by

Pm (max - o) + P2max cos v – P2max cos o


Cos c =
(P3max – P2max)

0.8 (2.5628 – 0.46055) + 1.4625 cos (146.838) – 0.65 cos (26.388)


=
1.4625 – 0.65
= - 0.15356

Thus the critical clearing angle is

c = cos-1 (-0.15356) = 98.834o

Dept.of E & E Engg., PESCE,Mandya Page 46


Power system simulation lab

PROGRAMS:

(1). Program for calculating CCA and CCT:


% This Program determines the Critical Clearing Angle for stability
% of a one-machine system (E) connected to Infinite bus (V),(SMIB)
% system. Let X1, X2 & X3 represent the pre-, during- and post-
% fault reactance respectively. Let Pmech,Pm = Input power = Pe,
% Output electrical power in p.u.or MW

clear all
clc , close all ;
% Refer: Power Sytem by Nagarath & Kothari(new book).
% Problem on CCT : from PSA by: Hadi Sadath pp - 487 Ex=11.5
f = 60 ; H=5 ; % Data Given
Xd = 0.3 ; Xt1 = 0.2 ; Xt2 = 0 ; XL = 0.3 ; % Each line Reactance
% Gen output is Pmech,Pm = Pe, Pelectrical,
Pe =0.8 ; E =1.17 ; V =1.0 ; H = 5 ;

disp('---- NORMAL Operation i.e. Before the Fault occurs -------')


Xe =Xd + Xt1 ; % Let Xe =Xd + Xt1 ;
% To Pre-fault Reactance , Xpre
X1 = Xe + XL/2 + Xt2 % X1 = Xd + Xt1 + XL/2 + Xt2 ; % before fault
Pe1m = E*V/X1 , % Pre fault power
d0 =asin(Pe/Pe1m) %(delta-0)
disp('---- During - Fault occurs, Calculate X2 & X3 -------')
% Caluculate X2 = Xfault i.e duning fault
fprintf('Initial power angle, delta,d0 = %6.3f rad. = %6.3f
deg.\n\n',d0,(d0*180/pi));
fprintf(' 1- for fault at the beginning of tr.line \n');
fprintf(' 2-for fault at the middle of line \n') ;
fprintf(' 3-for fault at the end of tr.line \n' );
ch=input(' Enter choice No. : ');
switch ch
case 1, % Assume faulty line No.2 is Open Ckted.
disp('CASE1 : When Sym. 3-phsae fault occurs near Sending End
occurs then X2 =Inf, Pe =0 : ');
X2 =inf % During - fault, power output Pe = 0.
X3 = Xe + XL/2 + Xt2
%
case 2,
% If necessary, use Delta-Star Convertion to calculate X2,
disp(' % Case 2 : When 3-ph S.C. fault occurs atthe middle of
the Line ');
disp(' Equivalent reactance, X2, Xduring fault, Xfault = ');
X2 = ((Xe*XL/2) + (Xe*XL) + (XL*XL/2))/(XL/2)
X3 = Xe + XL
%
case 3 ,
Dist= input('Enter Fault location in "- % " of distance, viz
for middle point 50% = ');
Dist=Dist/100 ;
if(Dist== 0)
X2 = Xe+XL % Xd+Xt+XL
else
% use Delta-Star Convertion for X2 = Xfault=
X2 = ((Xe*XL*Dist) + (Xe*XL) + (XL*XL*Dist))/(XL *Dist)
end ;

Dept.of E & E Engg., PESCE,Mandya Page 47


Power system simulation lab

X3 = Xe + XL

otherwise
disp('---Wrong input----');
end ;

%
Pe2m = E*V/X2
Pe3m = E*V/X3
% To calculate critical clearing angle dc(delta-cr) ,cos(dc) is :
dmax = pi-asin(Pe/Pe3m) %(delta-max )
cosdc = (Pe*(dmax-d0) + Pe3m*cos(dmax)- Pe2m*cos(d0))/(Pe3m-Pe2m)
dc = acos(cosdc) % Crit.Cl. Angle = (delta-cr)
CCA = dc*180/pi

if dc > dmax
fprintf('No critical clearing angle could be found.\n')
fprintf('System can remain stable during this
disturbance.\n\n')
else
fprintf('Initial angle (delta-0),do =%6.3f rad. = %6.3f deg
\n',d0,d0*180/pi);
fprintf('Max.angle(delta-max),dmax =%6.3f rad. = %6.3f
deg.\n',dmax, dmax*180/pi);
fprintf('Critical Clearing Angle(delta-c) =%6.3f rad= %6.3f
deg.\n',dc,dc*180/pi) ;
end;

if X2 == inf ,
fprintf('\n For this o.c. case, X2 = Inf, CCT can be found
from an Analytical formula. \n')
H = input('To find CCT, Enter Inertia Constant H, (or 0 to
skip) H = ');
CCT = sqrt((2*H*(dc-d0))/(pi*f*Pe)) % delta in radians
fprintf('Crit.Clrg. Time (CCT) =%6.3f Sec = %6.3f
cyles.\n\n',CCT,CCT*f) ;
end

%
% Optional Part of the program

figure
x =0:1:180; % Angle in degrees
Del = x*(pi/180); % angle, delta in radians

% x = 0:pi/20:pi;
y1 = Pe1m*sin(Del);
y2 = Pe2m*sin(Del);
y3 = Pe3m*sin(Del);
plot(x,y1,x,y2,x,y3); grid ;
title('Power Angle curves for SMIB system');
xlabel('Power Angle, delta in radians'), ylabel('Powers ');
legend('Pre fault ', 'During Fault', 'Post Fault')
%

Dept.of E & E Engg., PESCE,Mandya Page 48


Power system simulation lab

Results :
---- NORMAL Operation i.e. Before the Fault occurs ------
X1=0.6500, Pe1m =1.8000,d0=0.4606,
---- During - Fault occurs, Calculate X2 & X3 ------
Initial power angle, delta,d0=0.461rad.=26.388 deg.
1- for fault at the beginning of tr.line
2-for fault at the middle of line
3-for fault at the end of tr.line
Enter choice No. : 1
CASE1 : When Sym. 3-phsae fault occurs near Sending End occurs then X2
=Inf, Pe =0 :
X2=Inf, X3=0.6500.Pe2m =0,Pe3m = 1.8000
dmax =2.6810, cosdc = 0.0911 ,dc = 1.4796
CCA = 84.7745

Initial angle (delta-0),do = 0.461 rad. = 26.388 deg


Max.angle(delta-max),dmax = 2.681 rad. = 153.612 deg.
Critical Clearing Angle(delta-c) = 1.480 rad= 84.775 deg.

For this o.c. case, X2 = Inf, CCT can be found from an Analytical formula.
To find CCT, Enter Inertia Constant H, (or 0 to skip) H = 5
CCT = 0.2600
Crit.Clrg. Time (CCT) = 0.260 Sec = 15.597 cyles.

>>Case2: When 3-ph S.C. fault occurs atthe middle of the Line
---- During - Fault occurs, Calculate X2 & X3 ------
Initial power angle, delta,d0 = 0.461 rad. = 26.388 deg.

1- for fault at the beginning of tr.line


2-for fault at the middle of line
3-for fault at the end of tr.line
Enter choice No. : 2
% Case 2 : When 3-ph S.C. fault occurs atthe middle of the Line
Equivalent reactance, X2, Xduring fault, Xfault =

X2 =1.8000,X3 =0.8000,Pe2m =0.6500,Pe3m =1.4625, dmax =2.5628


cosdc = -0.1536,dc =1.7250,CCA =98.8335

Initial angle (delta-0), do = 0.461 rad. = 26.388 deg


Max.angle (delta-max), dmax = 2.563 rad. = 146.838 deg.
Critical Clearing Angle (delta-c) = 1.725 rad= 98.834 deg.
>>
Other Examples from books: (Include these lines to the program
% Data given from Nag. & Kothari (new book).Ex.12.8 @ Page 477
% Pe = 1.0 ; E = 1.2; V=1.0; H = 5 ; f =50 ;
% Xd = 0; Xt1 = 0.25; XL1 = 0.5; XL2 = 0.4 ; Xt2 =0.05 ;
% Xe =Xd + Xt1 ;
% X1 = Xe + XL1*XL2/(XL1+XL2) + Xt2
% X2 = inf ; X3 = Xe + XL1 + Xt1
%
% Ex2: Data from Nag.&Koth. Ex.12.10 @ Page 483(new book).
% MVA = 20 ;MW = 18 ; E= 1.1 ; V=1.0; H = 2.52 ; G = 1 ; f= 50 ;
% Pe = MW/MVA % M =H/(180*f)
% Xd = 0.35; XL1 = 0.2 ; XL2 =0.2 ; Xt1 = 0 ; Xt2 =0;
% Reactances of Gen,Tfr.,Line ,etc
% XL = 0.2
% Let Reactance of each line of double circuit parallel lines

Dept.of E & E Engg., PESCE,Mandya Page 49


Power System Simulation Lab
%
% case3: Fault point is 'At any distance:' of the Tr.Line.
% Dist= input('Enter Fault location in % of distance, viz for
middle point 50% = ');

Power Angle curves for SMIB system


1.8
Pre fault
1.6 During Fault
Post Fault
1.4

1.2

1
Powers

0.8

0.6

0.4

0.2

0
0 20 40 60 80 100 120 140 160 180
Power Angle, delta in radians

Example (1): To draw Swing curve


Refer: P S A by Nagrath & Kothari book @ pp-482,ex:12.10
A 50 MVA, 50 Hz, synchronous generator delivers 16 MW over a double circuit line to
infinite bus. The generator has K.E. of 2.52 MJ/MVA at rated speed and it has Xd’=
0.35 p.u and. Each transmission line has a reactance of 0.2 p.u. on a 20 MVA base.
Here |Eg| = 1.1 p.u. and |V| = 1.0 p.u. A three phase circuit occurs at the midpoint of
one of the transmission lines.
(i) Plot the swing curves with the fault cleared by simultaneous opening of breakers at
both ends of faulty line at 2.5 cycles and 6.25 cycles after the occurrence of the fault.
Find the critical clearing angle and critical clearing time by plotting swing curve using
Point by Point method.
(ii) Also plot the swing curve over the period of 0.5 sec if the fault is sustained.

Note:
(i) For this problem, X1, X2 & X3 can be found by using CCA/CCT program or by
hand calculation (refer pp-483 of Nag & Koth book.
(ii) First of all calculate CCA by using the above mentioned equation. Run program to
draw the swing curve for sustained fault case.Then read/determine the CCT from the
swing curve corresponding to the sustained fault case.
(Ans. CCA=118.620 & CCT =0.38 sec)

Dept.of E & E Engg., PESCE,Mandya Page 50


Power System Simulation Lab

(2) Program for swing equation: Point by Point Method:


% Program: SOLUTION FOR SWING EQUATION
% BY: POINT BY POINT (STEP BY STEP) METHOD Version - II
clc , clear all; % close all ;
% data from: P S A by Nagrath & Kothari book @ pp-482,ex:12.10
MVA = 20 ; % input('Base MVA = ');
MW = 18 ; % input('Generator output power in MW = ');
f =50 ;
H = 2.52; % input('Generator Inertia constant H in MJ/MVA = ');
X1 = 0.45 ; % input('Pre fault reactance Xpre in p.u. = ');
X2 = 1.25 ; % input('Reactance during fault Xfault in p.u. = ');
X3 = 0.55 ; % input('Post fault reactance Xpost in p.u. = ');
E = 1.1 ; % input('Sending end voltage E in p.u. = ');
V = 1.0 ; % input('Receiving end voltage V in p.u. = ');

delta = 21.604 ; % input('Initial displacement angle in degree = ');


tc = input(' Enter Fault clearing time in sec = ');
% use tc = 0.5,0.125 and 0.05 sec
tfinal = 1.5 ; % input('Final time for swing equation in sec = ');
G = 1 ; % p.u.
M = G*H/(180*f);
Pe = MW/MVA; % Gen. Power output in p.u.
% Calculate Pmax for pre, during & post fault caes
P1m = (E*V)/X1; % max.Ppre
P2m = (E*V)/X2; % max.Pfault
P3m = (E*V)/X3; % max.Ppost
ddelta = 0.0;
tstep = 0.05;
t = 0; tf = 0;
i = 2;
time(1)= 0; ang(1) = delta;
%
while t < tfinal,
if (t == tf),
Pa1 = Pe-P1m*sin(delta*pi/180);
Pa2 = Pe-P2m*sin(delta*pi/180);
Pa = (Pa1+Pa2)/2;
end
if (t == tc),
Pa1 = Pe-P2m*sin(delta*pi/180);
Pa2 = Pe-P3m*sin(delta*pi/180);
Pa = (Pa1+Pa2)/2;
end
if (t>tf & t<tc),
Pa = Pe-P2m*sin(delta*pi/180);
end
if(t>tc),
Pa = Pe-P3m*sin(delta*pi/180);
end

ddelta = ddelta+(tstep*tstep*Pa/M);
delta = (delta+ddelta);
t = t + tstep;
time(i) = t;
ang(i) = delta;
i = i+1;
end % end for While statement

Dept.of E & E Engg.,PESCE,Mandya Page 51


Power System Simulation Lab

figure(1)
plot(time,ang,'bo-'); grid on;
title(['Swing curve for SMIB system.Fault cleared at ', num2str(tc),'
sec']);
xlabel('time, sec'), ylabel('Delta, degrees');

% --- Optional Part -------Calculation of CCT and CCA (CCA) ----------

dmax = pi-asin(Pe/P3m) % Delta max, d-max


disp(dmax*180/pi)
d0 = asin(Pe/P1m), disp(d0*180/pi)
dc = acos((Pe*(dmax-d0)+P3m*cos(dmax)-P2m*cos(d0))/(P3m-P2m))
CCA =(dc*180/pi)
fprintf('\n Critical Clearing Angle = %6.2f degrees ',CCA);
itr = 1;
while(time(itr) < 1.0)
if (ang(itr) >= CCA ) %
break;
end
itr = itr+1 ;
end
CCT = time(itr)
fprintf('\n Critical clearing time = %4.2f seconds \n', CCT );
% hold on

program outputs:
Note: tclear = cycles/f = 2.5cycles/50Hz = 0.05 sec
** For Fault cleared in 2.5 cycles & Fault cleared in 6.5 cycles, Fault clearing time is
0.05 seconds & 0.125 seconds respectively.
Outputs: Case (1)
For -Sustained fault: i.e when fault is cleared by time > = 0.5 secs
Enter Fault clearing time in sec = 0.5
dmax = 2.6748 rad. = 153.2563 degrees.
d0 = 0.3771 rad = 21.6035 deg.
dc = 2.0701 rad or CCA = 118.6063
Critical Clearing Angle = 118.61 degrees
CCT = 0.4000
Critical clearing time = 0.40 seconds

Dept.of E & E Engg.,PESCE,Mandya Page 52


Power System Simulation Lab

Case(2): When Fault cleared at 2.5 cycles (i.e 0.05secs):


Enter Fault clearing time in sec = 0.05
Critical clearing angle = 91.24 degrees
Critical clearing time = 1.00 seconds
Case (3) Fault cleared in 6.5 cycles (0.125secs):

Example (2):

A 50 Hz, synchronous generator is having inertia constant H = 2.52 MJ/MVA and


Xd’= 0.32 p.u. is connected to an infinite bus delivering 16 MW over a double circuit
line. The reactance of the connecting HT transformer is 0.2 p.u. and reactance of each
line is 0.4 p.u. on a 20 MVA base. |Eg| = 1.2 p.u. and |V| = 1.0 p.u. A three phase circuit
occurs at the midpoint of one of the transmission line. The fault is cleared by
simultaneous opening of breakers at both ends of line at 2.5 cycles and 6.25 cycles after
the occurrence of the fault. Find the critical clearing angle and critical clearing time by
plotting swing curve using Point by Point method.

Program inputs and outputs


Input:
Sustained fault:
1. Generator Inertia constant H in MJ/MVA = 5.2
2. Pre fault reactance Xpre in p.u. = 0.7
3. Reactance during fault Xfault in p.u. = 1.9
4. Post fault reactance Xpost in p.u. = 0.9
5. Sending end voltage E in p.u. = 1.2
6. Receiving end voltage V in p.u. = 1.0
7. Base MVA = 20
8. Generator output power in MW = 16
9. Initial displacement angle in degree = 27.82

Dept.of E & E Engg.,PESCE,Mandya Page 53


Power System Simulation Lab

10. Fault clearing time in sec = 1.2


11. Final time for swing equation in sec = 1.5

** For Fault cleared in 2.5 cycles & Fault cleared in 6.5 cycles, Fault clearing time is
0.05 seconds & 0.125 seconds respectively.
Note: tclear = cycles/f = 2.5cycles/50Hz = 0.05 sec
Outputs: Case (1)
For -Sustained fault: i.e when fault is cleared by time > = 0.5 secs
Critical clearing angle = 91.24 degrees
Critical clearing time = 0.45 seconds

Data for Example

Symmetric 3φ fault at ‘F’, the midpoint of one of the transmission lines, cleared in
0.251 sec. Base Power = 20 MVA, Base KV=10KV. |E|=1.1 p.u., |V|=1 p.u.

Dept.of E & E Engg.,PESCE,Mandya Page 54


Power System Simulation Lab

Experiment No.7.
Economic Load Dispatch
AIM:
1. Determination of optimal generator scheduling for thermal power plants.
i.e. Write a program for Economic load allocation of power plants without
considering transmission losses.
2. Calculation of Penalty factors and optimal generator scheduling (Load allocation)
with transmission losses considered.

Theoretical background
Economic dispatch solution has two different problems to be solved
(1).Unit commitment or pre-dispatch problems to find the specified margin of operating
reserve over a specified period of time.
(2). On-line economic dispatch wherein it is required to distribute the load among the
generating units actually paralleled with system & being in running condition. In the
later, the minute-to-minute generating schedule is worked out to minimize the total cost.
In this experiment, i.e. the program for solving the problem discussed here is that, the
economic load dispatch (ELD) or Optimal operation of power plants with neglecting
transmission loss is written.
The problem is about minimizing the total generating cost.
i.e. Min. FT = Σng n=1 Fn
Subject to total demand = sum of all generator generations.
i.e PD = Σng n=1Pn
Making use of Lagrangian multiplier,
F = FT + λ (PD - Σng n=1 .Pn)
where λ is the Lagrangian multiplier.

Optimal operating condition is obtained by differentiating LaGrange’s function, F


with respect to the generation Pn & equating to Zero. It can be shown that the
necessary condition for optimal operation of plants or generators is given by:
𝑑 𝐹1 𝑑 𝐹2 𝑑𝐹
= = − − − = 𝑛𝑔 = 𝝀
𝑑 𝑃1 𝑑 𝑃2 𝑑 𝑃𝑛𝑔
Here dFn/dPn is the incremental production cost of plant n in Rs. per MWhr.
By using the above criterion for ELD, optimal laod allocation to the generators cane
found out. The required program is given below. Before getting the ELD solution, there
are certain constraints to be considered. The following are general constraints considered
for operation of power plants / power systems.

System constraints are:


 Equality constraints
 Inequality constraints
Inequality constraints are two types hard & soft.
Hard type: transformer tap limits, generator MW limits, switchable var limits.
Soft type: Voltage magnitude, phase angle MW limits, switchable var limits.
Equality constraints are basic power flow equations.
The total generation = total demand + loss

Dept.of E & E Engg., PESCE,Mandya Page 55


Power System Simulation Lab

Inequality constraints:
 Generator constraints:
MVA loading should be within the acceptable limits
[(MW)*(MW) + (MVAR)*(MVAR)] <= [(MVArate)*(MVArate)]
Pgmin <= Pgen<=Pgmax
Qgmin <= Qgen<=Qgmax
 Voltage constraints:
│Vpmin│<=│Vp││Vpmax│
 Tap constraints
tap_min <= tap <= tap_max
 Line loading constraints
L_loading <= Lmax_loading

Note that that while writing the program only generator constraints
i.e. Pgmin <= Pgen<=Pgmax are considered.

PROCEDURE

Optimal operating condition is obtained by using the following condition and solve for
Pn .
𝑑 𝐹1 𝑑 𝐹2 𝑑𝐹𝑛𝑔
= = −−−= = 𝝀
𝑑 𝑃1 𝑑 𝑃2 𝑑 𝑃𝑛𝑔
Solution for the problem: Assume a suitable value of λ(0). This value should be more
than the largest intercept of the incremental cost characteristics of the various generators.
Compute the individual generations P1, P2, .... Pn corresponding to incremental cost of
production. In case generation at any bus is violated, fix it to either minimum or
maximum.
Check the equality: If not, make a second guess of λ & proceed. Stop when the
generation & demand match with a small error.

Input required & output expected


 System Data
No of generators
Total Demand

 Generators data
(For each Generator) Remark
PMinimum In MW
PMaximum In MW
Generator cost Coefficient - Co
Generator cost Coefficient - Co
Generator cost Coefficient - Co
Output expected
The output contains the following –
 Generation schedule & generation cost.

Dept.of E & E Engg.,PESCE,Mandya Page 56


Power System Simulation Lab

 Lambda (λ).
 Final Cost of generation.
 Final Total generation cost.
In the following program given for solving the problem discussed here is that, the
economic load dispatch (ELD) or optimal operation of plants with neglecting transmission loss.

PROGRAM
% Economic Load Dispatch problem without considering
% the transmission losses.
% Refer: ‘Power System Analysis’ by: Hadi Sadath
clc ; clear ;
disp('OPTIMAL LOAD ALLOCATION OF THERMAL PLANTS')
disp(' ')
% Fuel Cost curves are given by: F=a*P^2 + b*P + c
a=[0.004 0.006 0.009];
b=[5.3 5.5 5.8];
c=[500 400 200];
N=3; Pd=975; % N=No:of Gen.& Pd=Demand in MW;
Pmin=[200 150 100];
Pmax=[450 350 225]; Pg =Pmin;
lam = 20; % Lamda Initial value(>>b) is assumed
oldLam =lam ; deltalam =0.01 ;
diff=1; % diff = sum of Pgs - total demand
while (diff > 0.001)
for k=1:N
Pg(k)=(lam-b(k))/a(k);
if(Pg(k)<Pmin(k))
Pg(k)=Pmin(k);
elseif(Pg(k)>Pmax(k))
Pg(k)=Pmax(k);
end
end
sum=0;
for k=1:N
sum=sum+Pg(k);
end
diff=sum-Pd;
if(diff<0)
oldlam =lam;
lam=lam+deltalam;
else
oldlam =lam;
lam=lam-deltalam;
end
end
fprintf('\n The generation schedule is');
for k=1:N
fprintf('\n Pg(%d)=%.2fMW',k,Pg(k));
end
fprintf('\n Total demand=%.2fMW \n Total
generation=%.2fMW',Pd,sum);

Dept.of E & E Engg., PESCE, Mandya Page 57


Power System Simulation Lab

fprintf('\n Incrimental fuel cost, Lambda =%.2fRs/MWH',oldlam);


fprintf('\n The cost of generations with optimum generation');
opcost=0;
for k=1:N
F(k)= a(k)*Pg(k)^2+b(k)*Pg(k)+c(k);
fprintf('\n F(%d)=Rs%.2f',k,F(k));
opcost = opcost+F(k);
end
fprintf('\n Total cost with optimum generation=Rs%.2f',opcost);
fprintf('\n The cost of generations with equal generation');
p=Pd/N; % for equal distribution of load i.e P1=P2=P3
eqcost=0;
for k=1:N
F1(k)=a(k)*p^2+b(k)*p+c(k);
fprintf('\n F(%d)=Rs%.2f',k,F1(k));
eqcost=eqcost+F1(k);
end
fprintf('\n Total cost with equal generation=Rs%.2f',eqcost);
saving=eqcost-opcost;
fprintf('\n Saving in Fuel cost = %.2fRs/MWH\n',saving);

OPTIMAL LOAD ALLOCATION OF THERMAL PLANTS

The generation schedule is


Pg(1)=450.00MW
Pg(2)=335.00MW
Pg(3)=190.00MW
Total demand=975.00MW
Total generation=975.00MW
Incremental fuel cost, Lambda =7.51Rs/MWH
The cost of generations with optimum generation
F(1)=Rs3695.00
F(2)=Rs2915.85
F(3)=Rs1626.90
Total cost with optimum generation=Rs8237.75
The cost of generations with equal generation
F(1)=Rs2645.00
F(2)=Rs2821.25
F(3)=Rs3035.63
Total cost with equal generation=Rs8501.88
Saving in Fuel cost = 264.13Rs/MWH

ALGORITHM:
Algorithm for economic load dispatch problem by considering transmission losses.
Transmission losses are represented by B- coefficients. (Known/given)
1. Assume a suitable value of λ . This value should be more than the largest intercept of
the incremental production cost of various generators.
2. Calculate the generations based on equal incremental production cost
3. Calculate the generation at all the buses using equation.

Dept.of E & E Engg., PESCE,Mandya Page 58


Power System Simulation Lab

𝑓𝑛
1− − ∑ 2𝐵 𝑃 −𝐵
𝜆 𝑚!𝑛 𝑚𝑛 𝑚 𝑛𝑜
𝑃𝑛 = 𝐹𝑚
𝜆 + 2 𝐵𝑚
4. Check if the difference in power at all generator buses between two consecutive iteration
is less than a pre-specified value. If not, go back to step3.
5. Calculate the losses using the relation
𝑃𝐿 = ∑ 𝒎 ∑𝒏 𝑃𝑛 𝐵𝑚𝑛 𝑃𝑚 + ∑ 𝐵𝑚𝑜 𝑃𝑚 + 𝐵𝑜𝑜
and calculate
∆𝑃 = ∑ 𝑃𝐺 − 𝑃𝐿 − 𝑃𝐷
6. If |∆𝑃| is less than error,€, stop calculation and calculate the cost of generation with these
values of powers.
7. Update the value of 𝝀 and go back to step3.
Program:
The program for this algorithm i.e. for economic load dispatch by considering
transmission losses is available in the software package called “P_CAPS” or in “Mi-
POWER” software or any other suitable program can be used to solve this problem .
Students are encouraged to use the package and solve the following problems.
“P_CAPS” software is a menu driven software package. It can be used very easily.

PROBLEMS On Economic load dispatch using β-co-efficients


Cost equation & loss co-efficient of different units in a plant are given. Determine economic
generation for a total load demand of 240MW.
For a 3 machine system
Unit No. Cost of fuel input in Rs/hr
1. C 1 = 0.05 P 2
+20P 1
1
+ 800 Rs./MWh; 0≤ P1≤100
2.
2
C2 = 0.06 P +15P2 2+ 1000 Rs./MWh; 0≤ P2≤100
3. C 3 = 0.07 P 2
+20P 3 +
3
900 Rs./MWh; 0≤ P3≤100
B or Loss Co-efficients:
Β11 = 0.0005 Β12 = 0.00005 Β13 = 0.0002
Β21 = Β12 Β22 = 0.0004 Β23 = 0.00018
Β31 = Β13 Β32 = Β23 Β33 = 0.0005

For a 2 machine system: Cost equations are:

Unit No. Cost of fuel input in Rs/hr


2
1. C1 = 0.015 P1 +16P1 + 50 Rs./MWh; 0≤ P1≤150
2
2. C2 = 0.0025 P2 +12P2 + 30 Rs./MWh; 0≤ P2≤100

Loss Co-efficients:
Β11 = 0.005 Β12 = 0.012
Β21 = Β12 Β22 = 0.002

Dept.of E & E Engg., PESCE,Mandya Page 59


Power System Simulation Lab

Experiment-8
Load Flow analysis
AIM:
To conduct Load Flow analysis using (i) Gauss Seidal (GS) Method (ii) Newton Raphson (NR)
method and (iii) Decoupled Load Flow (DLF) or Fast DLF method.

Theoretical background:

The Load Flow Studies (LFS) or Load Flow Analysis (LFA) or load-flow calculation is
the most common network analysis tool for examining the undisturbed and disturbed network.
The load-flow calculation can provide voltage profiles for all nodes and loading of network
components, such as Lines or cables and transformers, etc. With this information, compliance to
operating limitations such as those stipulated by voltage ranges and maximum loads, can be
examined.
Load Flow Analysis using GS Method:
Gauss-Seidal method is an iterative algorithm for solving a set of non-linear load flow equations.
The understanding of Load flow analysis requires the concept of Bus Power, Bus Voltage and
Bus Current. In a Power system, for normal steady state conditions the bus voltage magnitudes
would be around the respective nominal (rated) values so that in terms of power unit values the
magnitudes of bus voltages are around 1 p.u. Also transfer of power from one bus to another
through a transmission line requires a phase difference between the two bus voltages. Hence
each bus voltage is characterized by a magnitude of around 1p.u. and a phase angle with respect
to a reference bus which is called the slack bus. Also each bus is characterized by real and
reactive bus power. The problem is then, given the real and reactive bus powers, to find the exact
magnitude of bus voltage and phase angle, at all the busses in the system. The equation relating
bus powers with bus voltages are nonlinear algebraic equations. Gauss Seidal method is a
method of solving such equations.
In general, the basic mathematical model for Gauss Seidal method may be summarized as

where α is
called the acceleration factor, and is greater than 1, with a typical value ofaround 1.6
in load flow analysis.

Load Flow Analysis using NR Method

The Newton-Raphson (NR) method is a power full method of solving nonlinear algebraic
equations. It works faster, & is sure to converge in most cases as compared to Gauss-Seidal
(GS) method. The number of iteration required to obtain a solution is independent of the
system size, but more functional evaluations are required at each iteration. Since in the

Dept.of E & E Engg., PESCE,Mandya Page 60


Power System Simulation Lab

power flow problem real power & voltage magnitude are specified for voltage-controlled
buses, the power flow equation is formulated in polar form. For the typical bus of the
power system the current entering bus I is given by:
Ii = ΣYij Vj
In the above equation, J includes bus i. Expressing this equation in polar form, we have
Ii = Σ│Yij ││Vj│  θij + δj
The complex power at bus i is
Pi – jQi = V*iIi
Therefore Pi = = Σnj=1 │Vi││ Vj│ │Yij │cos θij + δj
Separating the real & imaginary parts

Pi = Σnj=1 │Vi││ Vj│ │Yij │ cos(θij - δj + δj )…..(1)


Qi = - Σnj=1 │Vi││ Vj│ │Yij │ sin(θij - δj + δj )…..(2)

Above equations constitute a set of nonlinear algebraic equations in terms of the


independent variables, voltage magnitudes in per unit, & phase angle in radians. We have
two equations for each load bus. Expanding in Taylor’s series about the initial estimate &
neglecting all higher order terms results in the following set of linear equations.

In the above equation, bus 1 is assumed to be slack bus. The Jacobian matrix gives the linearized
relationship between small changes in voltage angle ∆δi(k) & voltage magnitude ∆│ Vi(k)│ with
small changes in real & reactive power ∆Pi (k) & ∆Q i (k) . Elements of Jacobian matrix are the
partial derivatives of the equations (1) & (2), evaluated at ∆δ i (k) & ∆│ Vi(k)│.

Dept.of E & E Engg.,PESCE,Mandya Page 61


Power System Simulation Lab

The terms ∆Pi(k) & ∆Qi(k) are the difference between the scheduled & calculated values,
known as the power residuals, given by:

Dept.of E & E Engg., PESCE,Mandya Page 62


Power System Simulation Lab

∆Pi(k) = Pisch – P ik
∆Qi(k) = Qisch - Q ik
But we know that ∆P J1 J2 ∆δ
=
∆Q J3 J4 ∆│V│

Now calculate the change in bus voltage & angle.


∆ δk ∆Pk J1 J2 -1

=
∆│Vik│ ∆Qk J3 J4
The new estimates for bus voltages are
δik+1 = δi(k) + ∆ δi(k)
│Vi(k+1)│ = │Vi(k)│ +∆│Vi(k)│
The process is continued until the residuals ∆Pi(k) & ∆Qi(k) are less than the specified
accuracy, i.e.,
│∆Pi(k)│≤є
│∆Qi(k)│≤є

PROCEDURE
1. Bus admittance matrix, Ybus is formed for the system as given in Experiment No.2
2. Bus No.1 is chosen as slack bus, where there is a Generator. Maximum number of
iterations and tolerance for convergence of bus voltages are assumed.
3. Select any one method of Power flow or Load flow analysis viz. GS/NR/FDLF method.
4. Use suitable algorithm. In all the methods the following steps are followed.
a. Initial values of Bus voltages are assumed
b. Real and Reactive Bus Powers are calculated from Bus Power Data
c. Bus Voltages are calculated, using an acceleration factor, α= 1.6, using equations
for GS method, till convergences.
d. Line flows are calculated
e. Procedure repeated for a smaller value of acceleration factor,α such as 1.4

Note: The problems can be solved by using the available any suitable software Packages like
“MiPower” of PRDC, Bangalore or by using any power system software. To learn the MatLab
implementation (i.e. programming) of these GS method or NR methods, the algorithms or flow
charts are given in many Power system (CTPS) textbooks. . However the following simple,
sample programs are also given here, to get the programing concepts. Students are hereby,
advised to learn and modify these programs depending upon the complexity of the problems to
be solved.

Dept.of E & E Engg., PESCE,Mandya Page 63


Power System Simulation Lab

Sample Programs for Gauss – Seidal (GS) method of Load flow Analysis.

Example. 1. A given 4- bus power system has the following bus data and Ybus data calculated
from the line data. Use GS method to find all bus voltages for 4 iterations.

System Data (Bus Data)


Sl. Bus Bus Bus powers
No. No. Voltage Real Reactive Bus
(PU) Power, P Power Q Types
1 1 1.06 + j 0 - - Slack
2 2 1.0– j0 -0.5 -0.2 PQ
Bus
3 3 1.0 – j0 -0.4 -0.3 PQ
Bus
4 4 1.04– j0 +0.3 Qmin=0.1 Gen.bus
Qmax=1.0 PV Bus

From line data, we can find out Ybus as (refer Ybus program), Ybus =

3-12i -2+8i 1+4i 0


Ybus -2+8i 3.66-14.664i -0.666+2.664i -1+4i
matrix -1+4i -0.666+2.664i 3.66-14.664i -2+8i
0 -1+4i -2+8i 3-12i

% Sample Program for Gauss- Seidal method of Load flow Analysis.


% Program to solve simple 4-bus system with Bus-1 as Slack bus
% Revised program No.2
clc , clear all ;

% Enter Y-bus of the system


Y=[3-12i -2+8i -1+4i 0
-2+8i 3.66-14.664i -0.666+2.664i -1+4i
-1+4i -0.666+2.664i 3.66-14.664i -2+8i
0 -1+4i -2+8i 3-12i];

% Enter no.of buses,slack bus no,no.of pq buses,no of pv buses


nbus = 4 ; % Total no of Buses
sbno = 1 ; % Slack bus no.
npq = 2 ; % Load or PQ bus
npv = 1 ; % PV or Generator bus

% Assume bus no 1 as Slack bus, next npq buses as PQ buses and the remaining
as PV buses
v(1)=1.06+0i; % enter slack bus voltage given

% Assume voltages at all other buses as (1+j0)


v(2)=1; v(3)=1; v(4)=1;
% Enter P & Q values at all PQ buses
P(2)=-0.5;P(3)=-0.4;Q(2)=-0.2;Q(3)=-0.3;
% Enter P , Vsp and Q limits at PV buses
P(4)=0.3;
vsp(4)=1.04;Qmin(4)=0.1;Qmax(4)=1.0;
% Enter accuracy of convergence
acc=0.001;

Dept.of E & E Engg., PESCE,Mandya Page 64


Power System Simulation Lab

for it=1:5 % Repeat for 5 iterations


% pgm. to find bus voltages at PQ buses(load)
for p=2:npq+1,
v1(p)=v(p);
pq=(P(p)-Q(p)*1i)/conj(v(p));
ypq=0;
for q=1:nbus
if(p==q) continue;
end
ypq=ypq+Y(p,q)*v(q);
end
v(p)=(pq-ypq)/Y(p,p);
end

% to find voltages at PV- buses


for p=npq+2:nbus,
v1(p)=v(p);
s=0;
for q=1:nbus,
if(p~=q)
s=s+Y(p,q)*v(q);
else
vp=v(q);
ang=angle(v(q));
v(q)=complex(vsp(q)*cos(ang),vsp(q)*sin(ang));
s=s+Y(p,q)*v(q);
end
end
Qc(p) = -1*imag(conj(v(p))*s);
if(Qc(p)>= Qmin(p)& Qc(p)<=Qmax(p))
pq=(P(p)-Qc(p)*i)/conj(v(p));
ypq=0;
for q=1:nbus
if(p==q) continue;
end
ypq=ypq+Y(p,q)*v(q);
end
v(p)=(pq-ypq)/Y(p,p);
ang=angle(v(p));
v(p)=complex(vsp(p)*cos(ang),vsp(p)*sin(ang));
else
if(Qc(p)<Qmin(p))
Q(p)=Qmin(p);
else
Q(p)=Qmax(p);
end
pq=(P(p)-Q(p)*i)/conj(vp);
ypq=0;
for q=1:nbus
if(p==q) continue;
end
ypq=ypq+Y(p,q)*v(q);
end
v(p)=(pq-ypq)/Y(p,p);
end
end

Dept.of E & E Engg.,PESCE,Mandya Page 65


Power System Simulation Lab

% To find the voltages at all buses and Q at PV busses


fprintf('\n The voltages at all buses and Q at PV - busses after …
iteration no. %d', it);
for p=1:npq+1
fprintf('\n V(%d)=%.4f @ %.2fdeg',p,abs(v(p)),angle(v(p))*180/pi);
end
for p=npq+2:nbus
fprintf('\n V(%d)=%.4f @%.2fdeg Q(%d)=%+.3f …..
\n', p, abs(v(p)),angle(v(p))*180/pi, p, Qc(p));
end
% To check for convergence
for p=2:nbus
diff(p)=abs(v(p)-v1(p));
end
err=max(diff);
if(err<=acc)
break;
end
end

outputs
The voltages at all buses and Q at PV - busses after iteration no 1

V(1)=1.0600 @ 0.00deg
V(2)=1.0124 @ -1.61deg
V(3)=0.9933 @ -1.48deg
V(4)=1.0400 @-0.66deg Q(4)=+0.425

The voltages at all buses and Q at PV - busses after iteration no 2

V(1)=1.0600 @ 0.00deg
V(2)=1.0217 @ -1.99deg
V(3)=1.0162 @ -1.86deg
V(4)=1.0400 @-0.85deg Q(4)=+0.208

The voltages at all buses and Q at PV - busses after iteration no 3

V(1)=1.0600 @ 0.00deg
V(2)=1.0259 @ -2.09deg
V(3)=1.0175 @ -1.94deg
V(4)=1.0400 @-0.91deg Q(4)=+0.185

The voltages at all buses and Q at PV - busses after iteration no 4

V(1)=1.0600 @ 0.00deg
V(2)=1.0261 @ -2.11deg
V(3)=1.0175 @ -1.98deg
V(4)=1.0400 @-0.95deg Q(4)=+0.185

Dept.of E & E Engg.,PESCE,Mandya Page 66


Power System Simulation Lab

PROGRAM 2:
% Sample Program for Gauss- Seidal method of Load flow Analysis.
% Program to solve simple 4-bus system with Bus-1 as Slack bus,
% Bus-2 as P-V(Gen) bus and Bus-3&4 as Load buses
clear all ; clc
n=4; % No. of Buses
V=[1.04 1.04 1 1]; % Initial bus voltages given
% Bus adm. matrix Ybus or Y of the given problem
% Given: 4-bus system with Ybus as given below
Y =[ 3-j*9 -2+j*6 -1+j*3 0
-2+j*6 3666-j*11 -0.666+j*2 -1+j*3
-1+j*3 -0.666+j*2 3.666-j*11 -2+j*6
0 -1+j*3 -2+j*6 3-j*9];
type = ones(n,1); % types of buses
typechanged = zeros(n,1);
Qmax = zeros(n,1); % Reactive power range for P-V bus
Qmin = zeros(n,1);
Vmagfixed = zeros(n,1);
type(2) = 2; % Bus-2 is P-V bus
Qmax(2)=1.0; % Given Qmax & Qmin. for P-V bus
Qmin(2)=0.2;
Vmagfixed(2)=1.04; % as bus is voltage control bus
diff=10;
no_of_iter=1 % No of iterations
Vprev=V;
while (diff>0.00001 || no_of_iter==1) % ||reps OR operator
abs(V);
abs(Vprev);
disp(' Press any key to continue'); pause ; Vprev = V;
% Bus data for each bus
% Bus No:1 2 3 bus-4
P=[inf 0.5 -1 0.3];
Q=[inf 0 0.5 -0.1];
S=[inf+j*inf (0.5-j*0.2) (-0.1+j*0.5) (0.3-j*0.1)];
for i=2:n,
if type(i)==2 |typechanged(i)==1,
if (Q(i)>Qmax(i) | Q(i)<Qmin(i)),
if (Q(i)< Qmin(i))
Q(i)= Qmin(i)
else
Q(i)= Qmax(i)
end
type(i)=1;
typechanged(i)=1;
else
type(i)=2;
typechanged(i)=0;
end
end
end
sum=0.0;
for k=1:n
if(i ~= k)
sum = sum + Y(i,k)*V(k);
end
end

Dept.of E & E Engg.,PESCE,Mandya Page 67


Power System Simulation Lab

% V(i) = (1/Y(i,i))*[{(P(i)-j*Q(i)/(conj(V(i)}- sum)


Vcon = conj(V(i)) ;
V(i) = (1/Y(i,i))*((P(i)-j*Q(i)/Vcon)- sum)
if (type(i)==2 & typechanged(i)~=1 ),
V(i)=polartorect(Vmagfixed(i),angle(V(i))*180/pi)
end
%end
diff=max(abs(abs(V(2:n))-abs(Vprev(2:n))));
no_of_iter = no_of_iter+1
end
disp('Bus - Voltage values are:');
disp(V).

PROGRAM OUTPUTS
no_of_iter = 1

Press any key to continue

Q = Inf 0.2000 0.5000 -0.1000


V = 1.0400 1.0400 1.0000 1.0133 + 0.0333i

no_of_iter = 2

Press any key to continue


Q = Inf 0.2000 0.5000 -0.1000
V = 1.0400 1.0400 1.0000 1.0134 + 0.0330i

no_of_iter = 3

Press any key to continue


Q = Inf 0.2000 0.5000 -0.1000
V = 1.0400 1.0400 1.0000 1.0134 + 0.0330i

no_of_iter = 4

Bus - Voltage values are:


1.0400 1.0400 1.0000 1.0134 + 0.0330i

Dept.of E & E Engg., PESCE,Mandya Page 68


Power System Simulation Lab

% Program to calculate Jacobian matrix J, in the Newton Raphson method


clc ; clear all
%------ intialise the Jacobian arrays
J1 = zeros(10); J2 = zeros(10);
J3 = zeros(10); J4 = zeros(10);
J = zeros(10);
% Problem from the manual (Refer: Data from manual @ pp-91
Ybus = [ 70-90i -20+40i -50+50i 0.0+0.0i
-20+40i 43.08-55.39i 0.0+0i -23.077+15.39i
-50+50i 0.0+0i 75-75i -25+25i
00+00i -23.077+15.39i -25+25i 48.077-40.39i ];

Y = abs(Ybus) ;
the = angle(Ybus) ; % Admit. angles - theta(i,j) in radians
disp(' Ybus : Admit. magnitudes '); disp(Y);
disp(' Theta in degrees ');
disp(the.*180/pi)
Vbus(1)= 1.00+0i; Vbus(2)= 1.00+0i;
Vbus(3)= 1.00+0i ; Vbus(4)= 1.00+0i ;
V = abs(Vbus); % Bus Voltage - Magnitudes
del = angle(Vbus) ; % Voltage - Phase angles i.e. delta(i)
% number of buses, number of series elememnts
nBus = 4 ; SlackBus = 1;

% Jacobian Calculations
% Computation of J1
% J1(ii)
for i=1 : nBus
T=0;
for j=1 : nBus
if((j~=i))
T=T+(V(i)*V(j)*Y(i,j)*sin(the(i,j)-del(i)+del(j)));
end
if(i ~=SlackBus)
J1(i,i)=T;
end
end
end
% J1(ij)
for i=1:nBus
for j=1:nBus
if((j ~=i)&(i~=SlackBus)&(j~=SlackBus))
J1(i,j)= -V(i)*V(j)*Y(i,j)*sin(the(i,j)-del(i)+del(j));
end;
end
end

% Computation of J2
% J2(ii)
for i=1 : nBus
T=0;
for j=1 : nBus
if((j ~=i))
T=T+(V(j)*Y(i,j)*cos(the(i,j)-del(i)+del(j)));
end;
end

Dept.of E & E Engg.,PESCE,Mandya Page 69


Power System Simulation Lab

if(i ~=SlackBus)
J2(i,i)=(2*V(i)*Y(i,i)*cos(the(i,i)))+T;end;
end

% J2(ij)
for i=1 : nBus
for j=1 : nBus
if((j ~=i)&(i ~=SlackBus)&(j ~=SlackBus))
J2(i,j) = V(i)*Y(i,j)*cos(the(i,j)-del(i)+del(j));end;
end
end

% Computation of J3
% J3(ii)
for i=1 : nBus
T=0;
for j=1 : nBus
if((j ~=i))
T=T+(V(i)*V(j)*Y(i,j)*cos(the(i,j)-del(i)+del(j)));end;
end
if(i ~=SlackBus)
J3(i,i)=T;end
end
% J3ij
for i=1 : nBus
for j=1 : nBus
if((j ~=i)&(i ~=SlackBus)&(j ~=SlackBus))
J3(i,j)= -V(i)*V(j)*Y(i,j)*cos(the(i,j)-del(i)+del(j));end;
end
end

% Computation of J4
% J4(ii)

for i=1 : nBus


T=0;
for j=1 : nBus
if((j ~=i))
T=T+(V(j)*Y(i,j)*sin(the(i,j)-del(i)+del(j)));end;
end
if(i ~=SlackBus)
J4(i,i)=(-2*V(i)*Y(i,i)*sin(the(i,i)))-T; end;

end

% J4(ij)
for i=1 : nBus
for j=1 : nBus
if((j ~=i)&(i ~=SlackBus)&(j ~=SlackBus))
J4(i,j) = -V(i)*Y(i,j)*sin(the(i,j)-del(i)+del(j));end;
end
end

Dept.of E & E Engg.,PESCE,Mandya Page 70


Power System Simulation Lab

% Forming Jacobian Matrix


for i= 1 : nBus
for j= 1 : nBus
if((i ~=SlackBus)&(j ~=SlackBus))
J(i-1,j-1)=J1(i,j);
J(i-1,j+(nBus-2)) = J2(i,j);
J(i+(nBus-2),j-1) = J3(i,j);
J(i+(nBus-2),j+(nBus-2)) = J4(i,j);
end
end
end
fprintf(' \n');
fprintf('\t\t Jacobian Matrix \n');
fprintf(' \n');
for i=1 :(2*nBus-2)
for j=1 :(2*nBus-2)
fprintf(' %6.3f \t',J(i,j));
end
fprintf('\n');
end
fprintf(' \n');

PROGRAM OUTPUTS

Ybus : Admittance(magnitudes)
114.0175 44.7214 70.7107 0
44.7214 70.1708 0 27.7381
70.7107 0 106.0660 35.3553
0 27.7381 35.3553 62.7913

Theta in degrees
-52.1250 116.5651 135.0000 0
116.5651 -52.1257 0 146.3008
135.0000 0 -45.0000 135.0000
0 146.3008 135.0000 -40.0340

Jacobian Matrix

55.390 -0.000 -15.390 43.083 0.000 -23.077


-0.000 75.000 -25.000 0.000 75.000 -25.000
-15.390 -25.000 40.390 -23.077 -25.000 48.077
-43.077 -0.000 23.077 55.390 -0.000 -15.390
-0.000 -75.000 25.000 -0.000 75.000 -25.000
23.077 25.000 -48.077 -15.390 -25.000 40.390

Dept.of E & E Engg., PESCE,Mandya Page 71


Power System Simulation Lab

Decoupled method of Load flow solution :

For theory and problem with solution, please refer the CTPS book by Dr.K.Uma Rao.
Refer : Chapter 7. Problem no: 7.7 at page no: pp272 to 280(in old edition)
EX.7.7: Problem given is a 3-bus power system with bus 1 as Slack bus, bus 2 as a PV bus or
generator bus and bus 3 as a load(PQ)bus. From Line data Ybus can be found out as :
[ y11 = -15, yl2= 10, yl3= 5
y2l = yl2, y22=-15, y23= 5
y3 l= yl3, y32= y23, y33=-10
Bus Data given in the problem as:
Bus 1 is Slack bus with |V1| =1.0 pu voltage.
Bus 2 is Generator bus (or PV) with Pg =5.3217p.u.and |V2| =1.0pu
Load at bu3 with PL = -3.6392pu, QL= -0.5339pu

% Program for Decoupled Load Flow method for Load Flow Solution
% Note: the problem solved here is from the CTPS text book
% by : K. Uma Rao. Ref: Example7.7(pp272) for Data & solution
clc, clear all
pi=22.0/7.0 ; % For a 3-bus power system

% B(mn) element values are from Ybus matrix (Y=G+jB)as G=0, Y =jB only
bll =-15.0 ; bl2= 10.0 ; bl3= 5.0 ;
b2l = bl2 ; b22=-15.0 ; b23= 5.0 ;
b3l = bl3 ; b32 = b23 ; b33= -10.0 ;

% Initial bus Voltages (magnitudes)


v1 =1.0 ; v2 =1.1 ; v3 =1.0 ;
% Bus Voltages angles (delta)
del1 = 0.0 ; del2 = 0.0 ; del3=-0.0 ;

for i = 1:1:5 % Total no. of Iterations


disp(' Iteration= '), disp(i);

d12 = del1 -del2 ;


d13 = del1-del3 ;
d23 = del2-del3 ;
d31 = -d13 ;
d21 = -d12 ;
d32 = -d23 ;

disp(' Calculated Real power-P & Reactive power-Q values ');


p2c = (v2*v1*b2l*sin(d21))+(v2*v3*b23*sin(d23)) ; % P2cal values
p3c = (v3*v1*b3l*sin(d31))+(v2*v3*b32*sin(d32)) ;
q2c = (-b22*v2*v2)-(v2*v1*b2l*cos(d21))- (v2*v3*b23*cos(d23)) ;
q3c = (-b33*v3*v3)-(v3*v1*b3l*cos(d31))- (v2*v3*b23*cos(d32)) ;

%Data given: Generator/PV bus2: Pg = P2sp = 5.3217


% Load bu3 PL= P3sp = -3.6392 , QL= Q3sp = -0.5339
P2sp = 5.3217 ; P3sp = -3.6392 ; Q3sp = -0.5339 ;
disp(' Delta-P & Delta-Q values are :')
dp2 = P2sp - p2c ;
dp3 = P3sp - p3c ;
dq3 = Q3sp -q3c ;

Dept.of E & E Engg., PESCE,Mandya Page 72


Power System Simulation Lab

% display the delta(p) & delta(q)data


pow=[dp2
dp3
dq3]
% Jacobian matrix elements calculations
H22 = -q2c-(b22 *v2 *v2) ;
H23 = v2*v3*(-b23*cos(d23)) ;
H32 = v3*v2*(-b32*cos(d32)) ;
H33 = -q3c-(b33*v3*v3) ;

N23= 0.0 ; N33= 0.0 ;


M32= 0.0 ; M33= 0.0 ;
L33= q3c-(b33 *v3*v3) ;

disp(' Jacobian matrix formation ')


Jac = [ H22 H23 N23
H32 H33 N33
M32 M33 L33]

disp(' Change in del(delta) variables delta2, de1ta3, delta(v3) ');


ch= inv(Jac)*pow

chdel2 = ch(1) ;
chdel3 = ch(2) ;
chv3 = ch(3) ;
del2 = del2+chdel2 ;
del3=del3+chdel3 ;
% % new calculated voltage
v3 = v3+chv3 % display
disp(' ')
end
disp(' Final Voltages are:')
v1,v2,v3

OUTPUTS

Iteration= 1
Calculated Real power-P & Reactive power-Q values
Delta-P & Delta-Q values are :
pow= 5.3217
-3.6392
-0.0339
Jacobian matrix formation ,Jac =
16.5000 -5.5000 0
-5.5000 10.5000 0
0 0 9.5000
Change in del(delta) variables delta2, de1ta3, delta(v3)
ch= 0.2508
-0.2152
-0.0036
v3 = 0.9964

Dept.of E & E Engg., PESCE,Mandya Page 73


Power System Simulation Lab

Iteration= 2
Calculated Real power-P & Reactive power-Q values
Delta-P & Delta-Q values are :pow = 0.1294 , -0.1127 , -0.6995

Jacobian matrix formation, Jac =


15.5519 -4.8960 0
-4.8960 9.7632 0
0 0 10.0943
Change in del(delta) variables delta2, de1ta3, delta(v3)
ch = 0.0056, -0.0088, -0.0693 ,v3 = 0.9271

Iteration=3
Change in Del (delta) variables delta2, de1ta3, delta (v3)
ch = 0.0039 , -0.0261, -0.0108, v3 = 0.9164

Iteration=4
Change in del(delta) variables delta2, de1ta3, delta(v3)
ch = 0.0006, -0.0046 ,-0.0118, v3 = 0.9046

Iteration=5
Change in del(delta) variables delta2, de1ta3, delta(v3)
ch = 0.0007, -0.0051, -0.0014 ,v3 = 0.9031

Final Voltages are: v1 = 1.0


v2 = 1.1000
v3 = 0.9031

PROGRAMMING EXAMPLES FOR SELF STUDY

Problem. 1

System Data (Bus Data)


Sl. Bus Bus Bus Power
No. No. Voltage Real Power Reactive Power
(PU)
Generation Load Generation Load (PU)
( PU) (PU) (PU)
1 1 1.06 + j 0 (Slack) - - - -
2 2 1.0– j 0 (PQ Bus) 0.4 0.2 0.3 0.1
3 3 1.0 – j 0( PQ Bus) 0 0.45 0 0.15
4 4 1.0 – j 0(PQ Bus) 0 0.4 0 0.05
5 5 1.0 – j 0(PQ Bus) 0 0.6 0 0.1

Dept.of E & E Engg., PESCE,Mandya Page 74


Power System Simulation Lab

From line data, we can find out Ybus as (refer Ybus program)
Ybus =

6.25 – j 18.695 -5 + j 15 -1.25 + j 3.75 0 0


-5 + j 15 10.8333 – j 32.415 -1.6667 + j 5 -1.6667 + j 5 -2.5 + j 7.5
-1.25 + j 3.75 -1.6667 + j 5 12.9167 – j 38.695 -10 + j 30 0
0 -1.6667 + j 5 -10 + j 30 12.9167 – j 38.695 -1.25 + j 3.75
0 -2.5 + j 7.5 0 -1.25 + j 3.75 3.75 – j 11.21

Problem 2:

The following given data of power system of 5 bus system with 2 generating units, 6 lines, Transmission
line series impedance & shunt susceptance are given in table 1. Real power generation, real & reactive
power loads in MW & MVAR are given in table 1.2 with bus 1 as slack. Use the following methods to
obtain load flow solution.
a. Gauss – Seidal using Y-bus, with acceleration factor of 1.3 & tolerance of 0.00015 p.u. for real
and imaginary components of voltage.
b. Newton – Raphson method.
Table. 1 Line Data

Bus code Code Length R in X in R in X in Charging


From-To No. in km. Ohms Ohms p.u. p.u. MVAR

1-2 1 64.4 8 32 0.042 0.168 4.1


1-5 2 48.4 6 24 0.031 0.126 3.1
2-3 3 48.3 6 24 0.031 0.126 3.1
3-4 4 128.7 16 64 0.084 0.336 8.2
3-5 5 80.5 10 40 0.053 0.210 5.1
4-5 6 96.5 12 48 0.063 0.252 6.1

Table.2 Bus Data

Bus Generating Generating Load Load V (p.u.) Remark


MW MVAR MW MVAR
1 500 - 65 30 1.04 Slack Bus
2 0 0 115 60 1.00 Load Bus
3 180 - 70 40 1.02 v/g magnitude constant
4 0 0 70 30 1.00 Load Bus
5 0 0 85 40 1.00 Load Bus

Dept.of E & E Engg.,PESCE,Mandya Page 75

You might also like