0% found this document useful (0 votes)
105 views143 pages

Power System Manual-Final

The document outlines the practical work for the Power System Laboratory course at the Government College of Engineering, detailing various experiments related to power system analysis, including the formulation of bus impedance and admittance matrices, load flow analysis, and economic dispatch methods. It includes MATLAB program codes for computing the Z-bus and Y-bus matrices, as well as algorithms for load flow analysis using the Gauss-Seidel method. The document serves as a record of the academic work done by students during the 2023-2024 academic year.

Uploaded by

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

Power System Manual-Final

The document outlines the practical work for the Power System Laboratory course at the Government College of Engineering, detailing various experiments related to power system analysis, including the formulation of bus impedance and admittance matrices, load flow analysis, and economic dispatch methods. It includes MATLAB program codes for computing the Z-bus and Y-bus matrices, as well as algorithms for load flow analysis using the Gauss-Seidel method. The document serves as a record of the academic work done by students during the 2023-2024 academic year.

Uploaded by

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

GOVERNMENT COLLEGE OF ENGINEERING

An Autonomous Institution Affiliated to Anna University, Chennai)

SALEM – 636 011.

Register number
Course Code & Title 18EE703 – Power System Laboratory
Department Electrical and Electronics Engineering

Certified that this is the bonafide record work done by

Thiru / Selvi ………………………………………………………………of …………………..

Semester of…………………… branch during the academic year 2023 - 2024

Date : ………………. Faculty Incharge

Submitted for the University Practical Examination held on……………………………at the


Government College of Engineering, Salem - 636 011.

Internal Examiner External Examiner

1
2
CONTENTS
Ex. Date Title of the Experiment Page Marks Faculty
No. No. (10) Signature
1 Formulation of Bus Impedance Matrix 5

2 Formulation of Bus Admittance Matrix 13

3 Load Flow Analysis using Gauss-Seidal 23


method
4 Load Flow Analysis using Newton-Raphson 37
method
5 Transient Stability Analysis: Single Machine 53
Connected to Infinite Bus System

6 Transient Stability Analysis of Multimachine 71


Connected to Infinite Power System
7 Load Frequency Control of single Area and 87
two area power systems

8 Economic Dispatch by Lambda Iteration 103


method
9 Solution to Combined Economic Emission 117
Dispatch problems
10 Thermal Unit Commitment using Priority List 125
method

3
Problem :
Find the bus impedance matrix for the network shown in the figure

4
Ex. No: 1 FORMULATION BUS IMPEDANCE MATRIX (ZBUS)
Date :

AIM
To develop a MATLAB program to obtain bus impedance matrix Z-bus of the power
system.

SOFTWARE REQUIRED
MATLAB
THEORY

Z-bus matrix is an important matrix is used in different kinds of power system study such as
short circuit study, load flow study etc.
In short circuit analysis the generator uses transformer impedance must be taken into account.
In quality analysis the two-short element are neglected by forming the z-bus matrix which is used
to compute the voltage distribution factor. This can be largely obtained by reversing the y-bus
formed by resection method or by analytical method.
Taking inverse of the Y-bus for large system in time conditioning managing modification in
the system requires whole process to be repeated to voltage changes in the system. In such cases
Z-bus is computed using direct to Z-bus building algorithm.

ALGORITHM
Step 1: Adding zs from a new bus to reference
Step 2 : Adding zs from a new bus to an old bus
Step 3 : Adding zs from an old bus to reference
Step 4 : Adding zs between two old buses.
Step 5: Zb connects two new buses (Zbus remains unaffected in this case). This
situation can be avoided by suitable numbering of buses.
Step 6: Print the z-bus matrix.

Type-1 Modification:
Zb added from a new bus to the reference bus (i.e., a new branch is added and the
dimension of Z-bus goes up by one).

5
6
Type-2 Modification :
Zb is added from a new bus to an old bus (ie., a new branch is added and the
dimension of Z-bus goes up by one).

Type-3 Modification :
Zb connects an old bus to the reference branch (ie.,a new loop is formed but the
dimension of z-bus does not change).

Type-4 Modification :
Zb connects two old buses (i.e. new loop is formed but the dimension of Z-bus,
does not change).

Program :

clear

zprimary=[
1 1 0 0.25
2 2 1 0.1
3 3 1 0.1
4 2 0 0.25
5 2 3 0.1]
[elements columns]=size(zprimary)
zbus=[]
currentbusno = 0
for count=1:elements,
[rows cols]=size(zbus)
from=zprimary(count,2)
to=zprimary(count,3)
value=zprimary(count,4)
newbus=max(from,to)

7
8
ref= min(from,to)
if newbus>currentbusno&ref==0
zbus=[zbus zeros(rows,1)
zeros(1,cols) value]
currentbusno = newbus
continue
end
if newbus>currentbusno&ref~=0
zbus=[zbus,zbus(:,ref)
zbus(ref,:) value+zbus(ref,ref)]
currentbusno=newbus
continue
end
if newbus<=currentbusno&ref==0
zbus=zbus-1/(zbus(newbus,newbus)+value)*zbus(:,newbus)*zbus(newbus,:)
continue
end
if newbus<=currentbusno&ref~=0
zbus=zbus-1/(value+zbus(from,from)+zbus(to,to)-
2*zbus(from,to))((zbus(:,from)-zbus(:,to))((zbus(from,:)-zbus(to,:))))
continue
end
end

Output:

Zbus = 0.13750j 0.11249j 0.13750j


0.11249j 0.13750j 0.11249j
0.13750j 0.09582j 0.25418j

9
10
Result:
Thus the MATLAB program has been developed to compute the Zbus matrix using Zbus
building algorithm for the given power system network.

11
PROBLEM :
2
3

5
4

Consider the single line diagram of a 5-bus power system network shown in Fig. The line
impedance and line charging admittance data of the system is given below.
Line Impedance, Z Half line charging Admittance, Y/2
(Bus to Bus) (p.u.) (p.u.)
1-2 0.02 + j0.10 j 0.030
1-5 0.05 + j0.25 j 0.020
2-3 0.04 + j0.20 j 0.025
2-5 0.05 + j0.25 j 0.020
3-4 0.05 + j0.25 j 0.020
3-5 0.08 + j0.40 j 0.010
4-5 0.10 + j0.50 j 0.075

1 2 3 4 5
1 2.6923 – j 13.4115 1.9231+j9.6154 0 0 -0.7692 + j3.8462
2 -1.9231+ j9.6154 3.6538 –j18.1942 -0.9615+j4.8077 0 -0.7692+ j3.8462
3 0 -0.9615 + j4.8077 2.2215 – j11.0027 -0.7692 +j3.8462 -0.4808 + j2.4038
4 0 0 -0.7692 + j5.6742 1.1538 – j5.6742 -0.3846 + j1.9231
5 -0.7692 + j3.8462 -0.7692 + j3.8462 -0.4808 + j2.4038 -0.3846 + j1.9231 2.4038 – j11.8942

12
Ex. NO: 2 FORMULATION OF BUS ADMITTANCE MATRIX ( YBUS)
DATE :

AIM
To develop a MATLAB program to obtain the bus admittance matrix (YBus) of the given
power system.
SOFTWARE REQUIRED
MATLAB

THEORY

Network description of a Multi node power system:


The bus admittance matrix YBus and bus impedance matrix Zbus are the two important
network descriptions of an interconnected power system. The injected bus currents (I) and bus
voltages (V) of a power system under steady state condition can be related through these matrices
as
YV=I
ZI=V
These matrices are important building blocks of power system modelling and analysis. The Zbus is
mainly used in fault analysis while Ybus is mainly used in power flow and stability analysis.

Formation of Bus Admittance Matrix.


Two-Rule Method (Based on Node-Voltage Analysis)
Consider a three-bus system shown in Fig., The equivalent circuit of the given system is
obtained with the generator is replaced by Norton equivalent circuit and, the lines and loads are
replaced by their impedance.

FORMATION OF Y-BUS MATRIX

Generalised Y-bus = yii………..yid


Ydi…………ydd
Where ,Yii = Self admittance
Ydi = Transfer admittance

13
14
Fig-1

In Fig the admittance of the generator, loads and transmission lines are given in per unit to
system MVA base. The ground is taken as reference node.

ALGORITHM
Step 1 : Read NL = number of lines; NB = number of buses.
Step 2: Initialize Yij0 = 0 (in = 1,2,3,….,NB; j = 1,2,….., NB).
Step 3: Set the line number counter I =1.
Step 4: Read the admittance y between buses j to k and shunt admittance between the
bus and refrence.
SBi – stores the index ‘i’ of the jth bus which is linked to the kth bus.
EBi – stores the index ‘i’ of the kth bus which is linked to the jth bus.
yi – admittance between the jth and kth buses.
Yish – shunt admittance between the jth and refrence buses.
Step 5: Assign the values
l = SBi
m = EBi
Yllnew = Yllold + yi + yish

15
16
Ymmnew = Ymmold + yi + yish
Ylmnew = Ylmold – yi
Ymlnew = Ymlold – yi
Step 6: Check I > NL
If ‘yes’ then GOTO step 7
Else I = i+1 and GOTO step 4 and repeat.
Step 7 : Write the matrix and stop.
PROCEDURE:
1.Enter the command window of the MATLAB.
2.Create a new M- file by selecting File – New – M – File.
3.Type and save the program in the editor window.
4.Execute the program by either pressing Tools – Run.
5.View the results.

PROGRAM:
%Function ybus

%THIS IS THE PROGRAM FOR CREATING Ybus MATRIX.

function[yb,ych]=ybus

%The line impedance are

clc

zz=[0 0.02+0.1i 0 0 0.05+0.25i

0.02+0.1i 0 0.04+0.2i 0 0.05+0.25i

0 0.04+0.2i 0 0.05+0.25i 0.08+0.4i

0 0 0.05+0.25i 0 0.1+0.5i

0.05+0.25i 0.05+0.25i 0.08+0.4i 0.1+0.5i 0];

% The line chargings are

ych= [

0 0.03 0 0 0.02

0.03 0 0.025 0 0.02

0 0.025 0 0.02 0.01

0 0 0.02 0 0.075

0.02 0.02 0.01 0.075 0];

17
18
%The ybus matrix is formed here

for i=1:5

for j=1:5

if zz(i,j)==0

yb(i,j)=0;

else

yb(i,j)=-1/zz(i,j);

end

end

end

for i=1:5

ysum=0;

csum=0;

for j=1:5

ysum=ysum+yb(i,j);

csum=csum+ych(i,j);

end

yb(i,i)=csum-ysum;

end

19
20
OUTPUT:
Ans =

2.6923 – 13.4115i -1.9231 + 9.61541i 0


0 -0.7692 + 3.8462i

-1.9231 + 9.6154i 3.6538 – 18.1942i -0.9615 + 4.8077i


0 - 0.7692 + 3.8462i
0 -0.9615 + 4.8077i 2.2115 – 11.0027i
- 0.7692 + 3.8462i -0.4808 +2.4038i
0 0 -
0.7692 + 3.8462i 1.1538 – 5.6742i -0.3846+1.923i
-0.7692 + 3.8462i -0.7692 + 3.8462i -0.4808 +2.4038i -
0.3846+1.923i 2.4038-11.8942i

RESULT:
Thus the MATLAB program has been developed to compute the Y-bus matrix by
inspection method for the given power system network.

21
FLOWCHART:

22
EX.NO: 3 LOAD FLOW ANALYSIS USING GAUSS-SEIDEL METHOD
DATE :

AIM:

To solve the given problem for load flow solution using Gauss Seidel method and verify
using MATLAB software

SOFTWARE REQUIRED:
MATLAB
THEORY:
A number of methods are available for solving Load Flow problem. In all these methods,
voltage solution is initially assumed and then improved upon using some iterative process until
convergence is reached. The following three methods will be presented:
1. Gauss-Seidel Load Flow (GSLF) method.
2. Newton-Raphson Load Flow (NRLF) method.
3. Fast Decoupled Load Flow (FDLF) method.
The first method GSLF is a simple method to program but the voltage solution isupdated only
node by node and hence the convergence rate is poor. The NRLF and FDLF methods update the
voltage solution of all the buses simultaneously in each iteration and hence have faster
convergence rate.
The GUASS-SEIDEL method is an iterative algorithm for solving a set of non-linear load flow
equations.
ALGORITHM:
STEP 1: Obtain the bus admittance matrix Ybus . Set
1. Vp(0) =1+j0 (except the slack bus)
2. Convergence criterion ε.
3. Iteration count k=0.
STEP 2: Set the bus count ,p=1.
STEP 3: Check for slack bus. If yes go to step 9, otherwise go to next step.
STEP 4: Check for generator bus. If yes go to next step, otherwise go to step 7.
STEP 5: Temporarily set |Vp(k) | = |Vp |spec and then calculate reactive power
𝑘+1
𝑄𝑝,𝑐𝑎𝑙 = −𝑖𝑚{(𝑉𝑝𝑘 )* [∑𝑝−1
𝑞=1 𝑌𝑝𝑞 𝑉𝑞
𝑘+1
+ ∑𝑛𝑞=𝑝 𝑌𝑝𝑞 𝑉𝑞𝑘 ]}
𝑘+1
If 𝑄𝑝,𝑐𝑎𝑙 violates the limits, then generator bus converted to load bus.
𝑘+1
𝑄𝑝,𝑐𝑎𝑙 < 𝑄𝑝,𝑚𝑖𝑛 ,then Qp= Qp,min
𝑘+1
𝑄𝑝,𝑐𝑎𝑙 < 𝑄𝑝,𝑚𝑎𝑥 ,then Qp= Qp,max
23
PROBLEM:

The single line diagram of a 3-bus power system shown in Fig. The series impedance and shunt
admittance of each line is (0.026+ j0.11) p.u. and j0.04 p.u. respectively. The bus specification and power
input, etc. at the buses is as under:
Bus PG QG PL QL Bus voltage
1 unspecified unspecified 1.0 0.5 1.03+j0
(slack bus)
2 1.5 unspecified 0 0 V=1.03 (PV
bus)
3 0 0 1.2 0.5 Unspecified
(PQ bus)
For bus 2 minimum and maximum reactive power limits are 0 and 0.8 pu.
a) Form [Ybus]
b) Find the values of 𝛿2 ,V3 and 𝛿3 at the end of first iteration.

24
STEP 6: For generator bus, calculate the phase angle of bus voltage, 𝛿𝑝𝑘+1

1 (𝑃𝑝 −𝑗𝑄𝑝 )
𝑘+1
𝑉𝑝,𝑡𝑒𝑚𝑝 =𝑌 [ − ∑𝑝−1
𝑞=1 𝑌𝑝𝑞 𝑉𝑞
𝑘+1
− ∑𝑛𝑞=𝑝+1 𝑌𝑝𝑞 𝑉𝑞𝑘 ]
𝑝𝑝 (𝑉𝑝𝑘 )∗

𝑖𝑚𝑎𝑔 𝑝𝑎𝑟𝑡 𝑜𝑓 𝑉 𝑘+1


𝛿𝑝𝑘+1 = 𝑡𝑎𝑛-1( 𝑟𝑒𝑎𝑙 𝑝𝑎𝑟𝑡 𝑜𝑓 𝑉𝑝,𝑡𝑒𝑚𝑝
𝑘+1 )
𝑝,𝑡𝑒𝑚𝑝

Now 𝑉𝑝𝑘+1 =| 𝑉𝑝,𝑠𝑝𝑒𝑐 | ∠𝛿𝑝𝑘+1 . Then go to step 8.

STEP 7: For load bus, calculate bus voltage 𝑉𝑝𝑘+1


1 (𝑃𝑝 −𝑗𝑄𝑝 )
𝑉𝑝𝑘+1 = 𝑌 [ − ∑𝑝−1
𝑞=1 𝑌𝑝𝑞 𝑉𝑞
𝑘+1
− ∑𝑛𝑞=𝑝+1 𝑌𝑝𝑞 𝑉𝑞𝑘 ]
𝑝𝑝 (𝑉𝑝𝑘 )∗

𝑘+1
𝑉𝑝,𝑎𝑐𝑐 = 𝑉𝑝𝑘 + 𝛼(𝑉𝑝𝑘+1 - 𝑉𝑝𝑘 ) then set 𝑉𝑝𝑘+1 = 𝑉𝑝,𝑎𝑐𝑐
𝑘+1
.

Choose 𝛼 = 1.6 (acceleration factor)


STEP 8: Calculate the change in bus p voltage using
∆𝑉𝑝𝑘+1 = 𝑉𝑝𝑘+1 − 𝑉𝑝𝑘

STEP 9: Increase the iteration count k and repeat the above for all voltages
until the bus count p=n.
STEP 10: Find the largest of |∆𝑉𝑚𝑎𝑥 | from
|∆𝑉1𝑘+1 |,|∆𝑉2𝑘+1 |, … |∆𝑉𝑛𝑘+1 |
Check if =| ∆𝑉𝑚𝑎𝑥 | < 𝜀. If yes go to next step, otherwise increase the
Iteration count k by one and go to step 2.
STEP 11: Calculate the line flows and slack bus power sing the bus voltages

PROCEDURE:

1. Enter the command window of the MATLAB.


2. Create a new M-file by selecting File – New – M – File.
3. Type and save the program in the editor window.
4. Execute the program in the editor window.
5. View the results.

25
26
PROGRAM:
clc;
close all;
clear all;
% From TO Resistance Reactance
linedata = [ 1 2 0.026 0.11
1 3 0.026 0.11
2 3 0.026 0.11];
ych=j*0.04; % Shunt Admittance
nl=linedata(:,1); % Sending end bus
nr=linedata(:,2); % Receiving end bus
R=linedata(:,3); % Resistance
X=linedata(:,4); % Reactance
nbr=length(linedata(:,1));
nbuses = max(max(nl), max(nr));
Z = R + j*X; %branch impedance
y= ones(nbr,1)./Z; %branch admittance
Ybus=zeros(nbuses,nbuses); % initialize Ybus to zero
for k = 1:nbr; % formation of the off diagonal elements
if nl(k) > 0 & nr(k) > 0
Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k);
Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));
end
end
for n = 1:nbuses % formation of the diagonal elements
for k = 1:nbr
if nl(k) == n | nr(k) == n
Ybus(n,n) = Ybus(n,n) + y(k)+ych;
else
end
end
end
% |Bus|Type| Vsp |theta |PGi |QGi | PLi | QLi | Qmin | Qmax |
busdata = [ 1 1 1.03 0 0.0 0 0 0 0 0;

27
28
bus = busdata(:,1); % Bus number
type = busdata(:,2); % Type of Bus 1-Slack, 2-PV, 3-PQ.
V = busdata(:,3); % Initial Bus Voltages.
th = busdata(:,4); % Initial Bus Voltage Angles.
GenMW = busdata(:,5); % PGi, Real Power injected into the buses.
GenMVAR = busdata(:,6); % QGi, Reactive Power injected into the buses.
LoadMW = busdata(:,7); % PLi, Real Power Drawn from the buses.
LoadMVAR = busdata(:,8); % QLi, Reactive Power Drawn from the buses.
Qmin = busdata(:,9); % Minimum Reactive Power Limit
Qmax = busdata(:,10); % Maximum Reactive Power Limit
nbus = max(bus); % To get no. of buses
P = GenMW - LoadMW; % Pi = PGi - PLi, Real Power at the buses.
Q = GenMVAR - LoadMVAR; % Qi = QGi - QLi, Reactive Power at the buse
Vprev = V;
toler = 1; % Tolerence.
iteration = 0; % iteration starting
while (toler > 0.00001) % Start of while loop
for i = 2:nbus
sumyv = 0;
for k = 1:nbus
if i ~= k
sumyv = sumyv + Ybus(i,k)* V(k); % Vk * Yik
end
end
if type(i) == 2 % Computing Qi for PV bus
Q(i) = -imag(conj(V(i))*(sumyv + Ybus(i,i)*V(i)));
if (Q(i) > Qmax(i)) || (Q(i) < Qmin(i)) % Checking for Qi Violation.
if Q(i) < Qmin(i) % Whether violated the lower limit.
Q(i) = Qmin(i);
else % No, violated the upper limit.
Q(i) = Qmax(i);
end
type(i) = 3; % If Violated, change PV bus to PQ bus. End

29
30
end
V(i) = (1/Ybus(i,i))*((P(i)-j*Q(i))/conj(V(i)) - sumyv); % Compute Bus
Voltages.
if type(i) == 2 % For PV Buses, Voltage Magnitude remains same, but
Angle changes.
r=abs(Vprev(i));
o=angle(V(i));
V(i) = r*cos(o) + j*r*sin(o); % rect = real + j*imag
end
end
iteration = iteration + 1; % Increment iteration count.
toler = max(abs(abs(V) - abs(Vprev))); % Calculate tolerance.
Vprev = V; % Vprev is required for next iteration, V(i) =
pol2rect(abs(Vprev(i)), angle(V(i)));
iteration; % Total iterations.
disp('iteratiron number')
disp (iteration)
V; % Bus Voltages in Complex form.
Vmag = abs(V); % Final Bus Voltages.
Ang = 180/pi*angle(V); % Final Bus Voltage Angles in Degree
disp('***************************************** ')
disp(' Gauss Seidel Load-Flow Study ')
disp('***************************************** ')
disp(' Bus Voltage Angle ')
disp(' no Volts Degree ')
ywz=[ bus(:,1) Vmag Ang ];
disp(ywz)
disp('***************************************** ')
end % End of while loop / Iteration
disp('VALUE AT FINAL ITERATION' )
disp ('VALUE ARRIVED AT ITERATION NUMBER :')
disp(iteration)
iteration; % Total iterations.
V; % Bus Voltages in Complex form.
Vmag = abs(V); % Final Bus Voltages.
31
32
Ang = 180/pi*angle(V); % Final Bus Voltage Angles in Degree
disp('***************************************** ')
disp(' Gauss Seidel Load-Flow Study ')
disp('***************************************** ')
disp(' Bus Voltage Angle ')
disp(' no Volts Degree ')
ywz=[ bus(:,1) Vmag Ang ];
disp(ywz)
disp('*****************************************

33
34
OUTPUT:

RESULT:
Thus, the Load flow analysis for the given power system was solved usingGauss-
Seidel method and the results are verified using MATLAB software.

35
FLOWCHART

36
Ex No: 4 LOAD FLOW ANALYSIS USING NEWTON-RAPHSON METHOD
Date:

AIM
To perform load flow analysis by Newton-Raphson method for the given power
system network.

SOFTWARE REQUIRED
MATLAB

FORMULA USED

Where, ep = Real part of Vp


fp = Imaginary part of Vp
Gpq, Bpq = Conductance and Susceptance of admittance Ypq respectively.

ALGORITHM
Step 1:
• Read number of buses.
• Read line admittances Yqk
• Read (i) for load bus
• Read (ii) for generator bus
• Obtain [Y]bus admittance matrix in Polar form where angle in radians.
Step 2 :
• Set (i) for load bus Vp(0) = 1.0 + j0.0
• Set (ii) for voltage bus 𝛿p(0) = 0 and |Vp(o) | = |Vp|
• Convergence criterion ∈
• Iteration count K = 0
Step 3:
Set bus count p=1

37
PROBLEM :

The single line diagram of a 3-bus system is shown in the figure. The series impedance and
shunt admittance of each line is 0.026+ j0.11 pu and j0.04 pu respectively. The bus
specification and power input, etc. at the buses is as under:

Bus PG QG PL QL Bus voltage

1 unspecified unspecified 1.0 0.5 1.03+j0


(slack bus)

2 1.5 unspecified 0 0 V=1.03 (PV


bus)

3 0 0 1.2 0.5 Unspecified


(PQ bus)

For bus 2 minimum and maximum reactive power limits are 0 and 0.8 pu.

a) Form [Ybus]

b) Find P20, Q20, P30, Q30

c) Find [J0]

38
Step 4 :
Check for slack bus, If yes then go to step(), Otherwise go to next step.
Step 5 :
Check for load bus, If yes.
Pp(k) and Qp(k) are calculated from Eq (1) and Eq (2) respectively.
If Qp (min) < Qp(k) < Qp (max) , the bus act as PV bus.
If Qp(k) > Qp (max), Qp (spec) = Qp (max)
If Qp(k) < Qp (min), Qp (spec) = Qp (min) , the PV bus will act as PQ bus.

(1)

(2)

(𝑘)
Step 6: Check for generator buses, if yes, Pp(k) and ∆𝑄𝑝 are calculated from
Equation (1) and Equation (2) respectively.
Δ Pp(k) = Pp (spec) – Pp(k)
(3)
Δ Qp(k) = Qp (spec) - Qp(k) (4)

Step 7: Increase the bus count p = p+1, Repeat step (3), (4) & (5).

Step 8: The elements of Jacobian matrix J1 , J2 , J3 & J4 are calculated from the
Equations (5) to Equation (12)

(13)

Step 9: The Linear simultaneous equation (13) is solved optimally ordered triangular
factorization and Gaussian elimination.

Step 10: Update the Bus Voltage magnitudes and Phase angles using

Vp(k+1) = Vp(k) + ΔVp(k)


Δ(k+1) = 𝛿(k) + Δ𝛿p(k)

[ For PV buses, calculate Qi then check the reactive power limit, if yes go to
Step (3)]

39
40
Step 11: Increase the iteration count k, and the above process is continued until
(𝑘) (𝑘)
the power residuals ∆𝑃𝑝 ≤ ∈ and ∆𝑄𝑝 ≤ ∈ .

Step 12: Compute line power flows and slack bus power.

PROGRAM :
% Program for Newton Raphson Load Flow Analysis
clc;
close all;
clear all;
% From To R X
% Bus Bus (pu) (pu)
linedata=[ 1 2 0.026 0.11
1 3 0.026 0.11
2 3 0.026 0.11];
ych=j*0.04; % Shunt Admittance
nl=linedata(:,1); % Sending end bus
nr=linedata(:,2); % Receiving end bus
R=linedata(:,3); % Resistance
X=linedata(:,4); % Reactance
nbr=length(linedata(:,1));
No_of_Bus = max(max(nl), max(nr));
Z = R + j*X; %branch impedance
y= ones(nbr,1)./Z; %branch admittance
Ybus=zeros(No_of_Bus,No_of_Bus); % initialize Ybus to zero
for k = 1:nbr; % formation of the off diagonal elements
if nl(k) > 0 & nr(k) > 0
Ybus(nl(k),nr(k)) = Ybus(nl(k),nr(k)) - y(k);
Ybus(nr(k),nl(k)) = Ybus(nl(k),nr(k));
end
end
for n = 1:No_of_Bus % formation of the diagonal elements
for k = 1:nbr
if nl(k) == n | nr(k) == n
Ybus(n,n) = Ybus(n,n) + y(k)+ych;
else
end
end
end
% Bus Bus Vol Vol Generating Load Reactive Power limit
% no type Mag angle Pg QG Pl Ql Qmax Qmin
busdata= [ 1 1 1.03 0 0 0 0 0 0 0
2 2 1.03 0 1.5 0.0 0.0 0.0 0.1 0.5
3 3 1.0 0 0 0 1.2 0.5 0 0];
G=real(Ybus); % Separation of YBus
B=imag(Ybus);
BMva=1;
busNo=busdata(:,1);
type=busdata(:,2);
V=busdata(:,3);

41
42
del=busdata(:,4);
Pg=busdata(:,5)/BMva;
Qg=busdata(:,6)/BMva;
Pl=busdata(:,7)/BMva;
Ql=busdata(:,8)/BMva;
Qmin=busdata(:,9)/BMva;
Qmax=busdata(:,10)/BMva;
PV_Bus=find(type==2|type==1);
PQ_Bus=find(type==3); % type1(Slack),type2(PV_Bus Bus),type3(PQ_Bus
Bus )
No_of_PQ_Bus=length(PQ_Bus);
No_of_PV_Bus=length(PV_Bus);
Active_Power_specified=Pg-Pl;
Reactive_Power_specified=Qg-Ql; % Net Power flow through different
node
Iter=0;Tol=1; % Iterantion And tolerance
while Tol>1e-5
P=zeros(No_of_Bus,1);
Q=zeros(No_of_Bus,1);
for i=1:No_of_Bus
for j=1:No_of_Bus
P(i)=P(i)+V(i)*V(j)*(G(i,j)*cos(del(i)-
del(j))+B(i,j)*sin(del(i)-del(j)));
Q(i)=Q(i)+V(i)*V(j)*(G(i,j)*sin(del(i)-del(j))-
B(i,j)*cos(del(i)-del(j)));
end
end
% Verification of limit violation for reactive power
if Iter>2 && Iter<=7
for n=2:No_of_Bus
if type(n)==2;
QG=Q(n)+Ql(n);
if QG > Qmax(n)
V(n)=V(n)-0.01;
elseif QG < Qmin(n)
V(n)=V(n)+0.01;
end
end
end
end
dPa=Active_Power_specified-P;
dQa=Reactive_Power_specified-Q;
dP=dPa(2:No_of_Bus);
k=1;
dQ=zeros(No_of_PQ_Bus,1);
for i=1:No_of_Bus
if type(i)==3
dQ(k,1)=dQa(i);
k=k+1;
end
end
M=[dP;dQ];% delta Matrix
%% Formation Fo Jacobian Matrix[J1 J2;J3 J4]
%% Formation Of J1

43
44
J1=zeros(No_of_Bus-1,No_of_Bus-1);
for i=1:No_of_Bus-1
m=i+1;
for j=1:No_of_Bus-1;
n=j+1;
if m==n
for n=1:No_of_Bus
J1(i,j)=J1(i,j)+V(m)*V(n)*(-G(m,n)*sin(del(m)-
del(n))+B(m,n)*cos(del(m)-del(n)));
end
J1(i,j)=J1(i,j)-V(m)^2*B(m,m);
else
J1(i,j)=V(m)*V(n)*(G(m,n)*sin(del(m)-del(n))-B(m,n)*cos(del(m)-
del(n)));
end
end
end
%% Formation Of J2
J2=zeros(No_of_Bus-1,No_of_PQ_Bus);
for i=1:No_of_Bus-1
m=i+1;
for j=1:No_of_PQ_Bus
n=PQ_Bus(j);
if m==n
for n=1:No_of_Bus
J2(i,j)=J2(i,j)+V(n)*(G(m,n)*cos(del(m)-
del(n))+B(m,n)*sin(del(m)-del(n)));
end
J2(i,j)=J2(i,j)+V(m)*G(m,m);
else
J2(i,j)=V(m)*(G(m,n)*cos(del(m)-del(n))+B(m,n)*sin(del(m)-
del(n)));
end
end
end
%% Formation Of J3
J3=zeros(No_of_PQ_Bus,No_of_Bus-1);
for i=1:No_of_PQ_Bus
m=PQ_Bus(i);
for j=1:No_of_Bus-1
n=j+1;
if m==n
for n=1:No_of_Bus
J3(i,j)=J3(i,j)+V(m)*V(n)*(G(m,n)*cos(del(m)-
del(n))+B(m,n)*sin(del(m)-del(n)));
end
J3(i,j)=J3(i,j)-V(m)^2*G(m,m);
else
J3(i,j)=V(m)*V(n)*(-G(m,n)*cos(del(m)-del(n))-
B(m,n)*sin(del(m)-del(n)));
end
end
end
%% Formation Of J4

45
46
J4=zeros(No_of_PQ_Bus,No_of_PQ_Bus);
for i=1:No_of_PQ_Bus
m=PQ_Bus(i);
for j=1:No_of_PQ_Bus
n=PQ_Bus(j);
if m==n
for n=1:No_of_Bus
J4(i,j)=J4(i,j)+V(n)*(G(m,n)*sin(del(m)-del(n))-
B(m,n)*cos(del(m)-del(n)));
end
J4(i,j)=J4(i,j)-V(m)*B(m,m);
else
J4(i,j)=V(m)*(G(m,n)*sin(del(m)-del(n))-
B(m,n)*cos(del(m)-del(n)));
end
end
end
J=[J1 J2;J3 J4]; % Jacobian Matrix
X=inv(J)*M;
dTh=X(1:No_of_Bus-1); % Change in angle
dV=X(No_of_Bus:end); % change in volatge mag
del(2:No_of_Bus)=del(2:No_of_Bus)+dTh; % Voltage angle update
% voltage mag update
k=1;
for n=2:No_of_Bus
if type(n)==3
V(n)=V(n)+dV(k);
k=k+1;
end
end
Iter=Iter+1;
Tol=max(abs(M));
disp('iteration number')
disp(Iter)
Q=zeros(No_of_Bus,1);
for i=1:No_of_Bus
for j=1:No_of_Bus
P(i)=P(i)+V(i)*V(j)*(G(i,j)*cos(del(i)-
del(j))+B(i,j)*sin(del(i)-del(j)));
Q(i)=Q(i)+V(i)*V(j)*(G(i,j)*sin(del(i)-del(j))-
B(i,j)*cos(del(i)-del(j)));
end
end
for i=1:No_of_Bus
del(i)=180*del(i)/pi; % Converion radian to degree
end
disp('***************************************** ')
disp(' Newton Raphson Load-Flow Study ')
disp('***************************************** ')
disp(' Bus Voltage Angle ')
disp(' no Volts Degree ')
ywz=[ busNo(:,1) V del ];
disp(ywz)
disp('***************************************** ')

47
48
end
Q=zeros(No_of_Bus,1);
for i=1:No_of_Bus
for j=1:No_of_Bus
P(i)=P(i)+V(i)*V(j)*(G(i,j)*cos(del(i)-del(j))+B(i,j)*sin(del(i)-
del(j)));
Q(i)=Q(i)+V(i)*V(j)*(G(i,j)*sin(del(i)-del(j))-B(i,j)*cos(del(i)-
del(j)));
end
end
for i=1:No_of_Bus
del(i)=180*del(i)/pi; % Converion radian to degree
end

OUTPUT :

Newton Raphson Load-Flow Study


*****************************************
Bus Voltage Angle
no Volts Degree

1.0000 1.0300 0
2.0000 1.0300 3.7881
3.0000 0.9909 -1.4726

49
50
RESULT:
Thus the load flow analysis is performed for the given power system by Newton-
Raphson method and the results are verified using MATLAB program.

51
Problem:

A 20 MVA, 50 Hz generator delivers 18 MW over a double circuit line to an infinite bus. The
generator has kinetic energy of 2.52 MJ/MVA at rated speed. The generator transient reactance
is X’d= 0.35 pu. Each transmission circuit has R = 0 and a reactance of 0.2 pu on a 20 MVA
base. | E’ |= 1.1 pu and infinite bus voltage V = 1.0 ∠0°. A three-phase short circuit occurs at
the mid-point of one of the transmission lines. Plot swing curves with fault cleared by
simultaneous opening of breakers at both ends of the line at 2.5 cycles and 6.25 cycles after the
occurrence of fault. Also plot the swing curve over the period of 0.5 second, if the fault is
sustained.

52
Ex No: 5 TRANSIENT STABILITY ANALYSIS OF SINGLE MACHINE
CONNECTED TO INFINITE BUS SYSTEM
Date:

AIM
To develop a software program to find transient stability analysis of single machine connected
infinite bus system.

SOFTWARE REQUIRED
MATLAB
THEORY
Power system stability may be defined as that property of the system which enables
the synchronous machines of the system to respond to a disturbances from normal operating
conditions so as to return to a conductor where their operation is again normal. Stability
studies are usually classified into three types.
Transient stability
Steady state stability
Dynamic stability

Transient Stability:

Transient Stability studies are aimed at determining in the system will remain in
synchronism following major disturbances such as transmission system faults, sudden load
changes, loss of generation units or line switching.
Transient stability problems can be subdivided into two types.

(i) First swing stability problems.

(ii) Multi swing stability problems.

First swing stability is used in simple generator model without representation of


control system of the machine of the system are found to remain in synchronism within the
first, & second, the system is said to be stable, multi swing stability problems extend over a
longer study period and therefore must consider effects of generator control system which
affect machine performance during the extended time period.

53
54
Stability:
Stability problem is concerned with the behaviors of power system when it is
subjected to disturbances and is classified into small signal stability problem if the
disturbances are small and transient stability problem when the disturbances are large. The
descriptions of the problems are as follows.

Transient Stability
When a power system is under steady state, the load plus transmission loss equals
tothe generation in the system. The generating units run at synchronous speed and system
frequency, voltage, current and power flows are steady. When a large disturbance such as
three phase fault, loss of load, loss of generation etc., occurs the power balance is upset and
the generating units rotors experience either acceleration or deceleration. The system may
come back to a steady state condition maintaining synchronism or it may break into
subsystems or one or more machines may pull out of synchronism. In the former case the
system is said to be stable and in the later case it is said to be unstable.

Small Signal Stability

When a power system is under steady state, normal operating condition, the system
may be subjected to small disturbances such as variation in load and generation, change in
field voltage, change in mechanical torque etc. The nature of system response to small
disturbances depends on the operating condition, the transmission system strength, types of
controllers etc. Instability that may result from small disturbances may be of two forms
(i) Steady increase in rotor angle due to lack of synchronizing torque

(ii) Rotor oscillations of increasing magnitude due to lack of sufficient damping torque.

For small disturbance, the non-linear equations characterizing the dynamics of power
system may be linearized around an operating point for the purpose of analysis. Small signal
analysis using linear techniques provides valuable information about the dynamic
characteristics of the system and assists in its design. The location of the roots of the
characteristic equation of the linearized differential equation will reveal the stability status
of the system. We can also obtain the response of rotor angle and frequency of the rotor of
the synchronous machines.

55
56
PROGRAM
clear
t=0
tf=0
tfinal=0.5
tc=0.125
tstep=0.05
M=2.52/(180*50)
i=2
delta-21.64*pi/180
ddelta=0
time(1)=0
ang(1)=21.64
Pm=0.9
Pmaxbf=2.44
Pmaxdf=0.88
Pmaxaf-2.00
while t<tfinal, if (t==tf)
Paminus=0.9-Pmaxbf*sin(delta)
Paplus-0.9-Pmaxdf*sin(delta)
Paav (Paminus+Paplus)/2
pa = Paav
end
Pa=Paav
if (t==tc)
Paminus=0.9-Pmaxdf*sin(delta)
Paplus-0.9-Pmaxaf*sin(delta)
Paav (Paminus+Paplus)/2
Pa=Paav

57
58
end
if(t>tf& t<tc),
end
Pa=Pm-Pmaxdf*sin(delta)
if(t<tc),
Pa=Pm-Pmaxaf*sin(delta)
end
t, Pa
ddelta=ddelta+(tstep*tstep*Pa/M);
delta=(delta*180/pi+ddelta)*pi/180;
deltadeg=delta*180/pi;
t=t+tstep;
pause
time(i)=t
ang(i)=deltadeg
i=i+1
end
axis([0 0.6 0 160])
plot(time, ang, 'ko’)

OUTPUT :

Singlemachine infinite t = 0
th =0
tfinal - 005000
te = 0-1250
tstep= 0.0500
M = 2-8000-04
i = 0

59
60
delta =0.3777
ddelta =0
time =0
ang = 21-6400
Pm =0.9000
Pmax bf= 2.4400
Pmaxdf=0.8800
Pmax =2
Paminus=1.09249e-04
Paples = 0.5755
Paav = 0.2878
Pa =0.2848
Pa = 0-1625
t = 0
Pa =0.1625
ddelta = 1.4505
delta = 0.4030
delta deg = 23.0905
t = 0.0500
time =0 0.0500
ang= 21·6400 23.0905
i =3
Pa = 0.5549
Pa = 0.1156
t=0.0500
Pa = 0.1156
ddelta = 2.4829
delta = 0.4463
deltadeg = 25.5734

61
62
t = 0·1000
time=0 0.0500 0.1000
ang = 21. 6400 23.0905 25.5734
I =4
Pa=0-5201
Pa=0.0367
t=0.1000
Pa=0.0367
ddelta =2.8103
delta =0.4954
deltadeg=28.3837
t=0 0.0500 0.1000 0.1500
ang = 21.6400 23.0905 25.5734 28.3837
i=5
t=0.1500
Pa = 0.0367
ddelta=3.1377
delta=0·5502
deltadeg = 31.5213 t = 0·2000
time =0 0.0500 0.1000 0.1500 0.2000
ang = 21.6400 23.0905 25.5734 28.3837 31.5213
i = 6
t = 0·2000
Pa = 0.0367
ddelta = 3.4650 i=7
t=0.2500
Pa=0.0364
ddelta = 3-74924
delta = 0.6768

63
64
deltadeg - 38-7788
t= 0·3000
time = 0 0.0500 0.1000 0.1500 0.2000 0.2500 0.30
ang = 21·6400 23.0905 25.5434 28.3884 31.5213 34.9864 38.7786
1=8
t = 0.3000
Pa = 0.0364
ddelta = 4.41198
delta = 0.7487
deltadeg = 42.8986
t= 0.3500
time = 0 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500
ang =21.6400 23.0905 25.5734 28.3837 31.5213 34.9864 38.7788 42.8986
i =9
t = 0·3500 Pa = 0.0367
ddelta =4.4472
delta =0.8263
deltadey = 47.3458
t=0·4000
time = 0 0.0500 0.1000 0-2000 01500 0.2500 0.3000 0.3500 0.4000
ang= 21.6400 23.0905 25.5734 28.3834 31.5213 34.986 38.7788 42.8986
47.3458
1=10 t=0.4000
Pa = 0.0367
ddelta= 4.4746 delta = 0·9097 deltadeg = 52.1204 t=0·4500
time = 0 0.0500 0.1000 0-2000 01500 0.2500 0.3000 0.3500 0.4000
ang = 21.6400 23.0909 25.6434 28.3837 31.5213 34.9864 38.7788 45.8986
47.3458
i=11
t= 0·4500 Pa = 0.0367
ddelta = 5.1020

65
66
delta = 0.9987
deltadeg =57.2223
t=0·5000
time = 0 0.0500 0.1000 0-2000 01500 0.2500 0.3000 0.3500 0.4000 0.4500
0.5000
ang = 21.6400 23.0909 25.6434 28.3837 31.5213 34.9864 38.7788 45.8986
47.3458
52.1204 57.223
i=12 t=0·5000 Pa = 0.0367
ddelta =5.4293
delta =1.0935
deltadeg = 62.6514 t=0·5500
time = 0 0.0500 0.1000 0-2000 01500 0.2500 0.3000 0.3500 0.4000 0.4500
0.5000 0·5500
ang = 21.6400 23.0909 25.6434 28.3837 31.5213 34.9864 38.7788 45.8986
47.3458
52.1204 57.223 62.6517

67
68
OUTPUT WAVEFORM:
Execution of the Program
Angle in (Deg)

Time (sec)

RESULT:
Thus the Matlab program was developed to find transient stability analysis of
single machine connected to infinite bus system.

69
PROBLEM:
A 50Hz 220kv transmission line has 2 generators and an infinite bus as shown in figure. The
transformer and line data are given in table. A three phase fault occurs as shown. The pre-fault
load flow solution is presented in table. Find the swing equation for each generator during the
fault period.

Data is given below for the two generators on a MVA base.


Gen 1: 500 MVA, 25 kV, Xd’ = 0.067 pu; H =12 MJ/MVA
Gen 2: 300 MVA, 20 kV, Xd’ = 0.10 pu, H = 9 MJ/MVA
Plot the swing curves for the machines at buses 2 and 3 for the above fault which is cleared by
simultaneous opening of the circuit breakers at the ends of the faulted line at (a) 0.275 second
and (b) 0.08 second.
TABLE 1: Line and transformer data. All values are in pu on 220kV, 100MVA base

Bus to Bus Series Impedance


R (pu) X (pu) Half line Charging Admittance (pu)

Line 4 -5 0.018 0.11 0.113


Line 5-1 0.004 0.0235 0.098
Line 4-1 0.007 0.04 0.041

Trans: 2-4 - 0.022 -

Trans: 3-5 - 0.04 -

70
Ex. No: 6 TRANSIENT STABILITY ANALYSIS OF MULTI MACHINE
CONNECTED TO INFINITE BUS POWER SYSTEM
Date:

AIM:
To become familiar with modeling aspects of synchronous machines and network for
transient stability analysis of multi-machine connected to infinite bus power systems.

SOFTWARE REQUIRED:
MATLAB.

THEORY:
The classical transient stability study is based on the application of a three – phase
fault. A solid three-phase fault at bus k in the network results in Vk = 0. This is simulated
by removing the kth row and column from the prefault bus admittance matrix. The new bus
admittance matrix is reduced by eliminating all nodes except the internal generator nodes.
The generator excitation voltages during the fault and post-fault modes are assumed to
remain constant.

For multi-machine transient stability analysis of an interconnected power system, it


is necessary to solve 2 state equations for each generator, with initial power angles 0 and
ω0i = 0.
When the fault is cleared, which may involve the removal of the faulty line, the bus
admittance matrix is recomputed to reflect the change in the network. Next the post-fault
reduced bus admittance matrix is evaluated and the post-fault electrical power of the ith
generator shown by Pi pf is determined.
Using the post-fault power Pi pf, the simulation is continued to determine the system
stability, until the plots reveal a definite trend as to stability or instability.
Usually the slack generator is selected as the reference, and the phase angle
difference of all other generators with respect to the reference machine are plotted. Usually,
the solution is carried out for two swings to show that the second swing is not greater than
the first one. If the angle differences do not increase, the system is stable. If any of the
angle differences increase indefinitely, the system is unstable.

71
TABLE 2: Bus data and prefault load-flow values in pu on 220kV, 100MVA Base

S. No. Voltage Voltage Generation Load


& Bus Polar Form Bus type
No. Real Imaginary P Q P Q
(e) (f)
1 1.0 ‫ﮮ‬0° Slack 1.00 0.0 -3.8083 -0.2799 0 0

2 1.03‫ﮮ‬8.35° PV 1.0194 0.1475 3.25 0.6986 0 0

3 1.02‫ﮮ‬7.16° PV 1.0121 0.1271 2.10 0.3110 0 0

4 1.0174‫ﮮ‬4.32° PQ 1.0146 0.767 0 1.0 1.0 0.44

5 1.0112‫ﮮ‬2.69° PQ 1.0102 0.0439 0 0 0 0.16

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

ALGORITHM:
Step 1: From the prefault load flow data determine E’k voltage behind transient reactance for
all generators. This establishes generator emf magnitudes |Ek| which remain constant
during the study and initial rotor angles δk°=‫ﮮ‬Ek.
Step 2: Record prime mover inputs to generators, Pmk = PGk.
Step3 : Augment the load flow network by the generator transient reactances.
Step 4 : Shift network buses behind the transient reactances.
Step 5 : Find Ybus for various network conditions during fault, post fault (faulted line cleared),
after line reclosure.
Step 6 : For faulted mode, find generator outputs from power angle equations and solve swing
equations step by step (point-by-point method).
Step 7 : Keep repeating the above step for post fault mode and after line reclosure mode.
Step 8 : Examine δ(t) plots of all generators and establish the answer to the stability question.

PROGRAM:

basemva = 100; accuracy = 0.0001; maxiter = 10;


busdata=[1 1 1.06 0.0 00.00 00.00 0.00 00.00 0 0 0
2 2 1.04 0.0 00.00 00.00 150.00 00.00 0 140 0
3 2 1.03 0.0 00.00 00.00 100.00 00.00 0 90 0
4 0 1.0 0.0 100.00 70.00 00.00 00.00 0 0 0
5 0 1.0 0.0 90.00 30.00 00.00 00.00 0 0 0
6 0 1.0 0.0 160.00 110.00 00.00 00.00 0 0 0];
linedata=[1 4 0.035 0.225 0.0065 1.0
1 5 0.025 0.105 0.0045 1.0
1 6 0.040 0.215 0.0055 1.0
2 4 0.000 0.035 0.0000 1.0

73
74
3 5 0.000 0.042 0.0000 1.0
4 6 0.028 0.125 0.0035 1.0
5 6 0.026 0.175 0.0300 1.0];
lfybus % form the bus admittance matrix
lfnewton % Power flow solution by method

busout % Prints the power flow solution

% Gen. Ra Xd' H
gendata=[ 1 0
0.20 20
2 0 0.15 4
3 0 0.25 5];
trstab
trstab
global Pm f H E Y th
ngg f=60;
%zdd=gendata(:,2)+j*gendata;
ngr=gendata(:,1);
%H=gendata(:,4);

ngg=length(gendata(:%

for k=1:ngg

zdd(ngr(k))=gendata(k, 2)+j*gendata(k,3);
%H(ngr(k))=gendata
H(k)=gendata(k,4); %
new
end
%%
for k=1:ngg
I=conj(S(ngr(k)))/conj(V(ngr(k)));
%Ep(ngr(k)) = V(ngr(k))+zdd(ngr(k))*I;
%Pm(ngr(k))=real(S(ngr(k)));
Ep(k) = V(ngr(k))+zdd(ngr(k))*I; % new
Pm(k)=real(S(ngr(k))); % new
end
E=abs(Ep);

75
76
d0=angle(Ep); for
k=1:ngg
nl(nbr+k) = nbus+k;
nr(nbr+k) =
gendata(k, 1);
%R(nbr+k) = gendata(k, 2);
%X(nbr+k) = gendata(k, 3); R(nbr+k) =
real(zdd(ngr(k)));

X(nbr+k) = imag(zdd(ngr(k)));

Bc(nbr+k) = 0;
a(nbr+k) = 1.0;
yload(nbus+k)=0;
end
nbr1=nbr;
nbus1=nbus;
nbrt=nbr+ngg;
nbust=nbus+ngg;
linedata=[nl, nr, R, X, -j*Bc, a];
[Ybus, Ybf]=ybusbf(linedata, yload,
nbus1,nbust); fprintf('\nPrefault reduced
bus admittance matrix \n')

Ybf
Y=abs(Ybf);
th=angle(Ybf);
Pm=zeros(1, ngg);
disp([' G(i) E''(i)
d0(i) Pm(i)']) for ii
= 1:ngg
for jj = 1:ngg
Pm(ii) = Pm(ii) + E(ii)*E(jj)*Y(ii,
jj)*cos(th(ii, jj)-d0(ii)+d0(jj)); end,
fprintf(' %g', ngr(ii)), fprintf('
%8.4f',E(ii)), fprintf(' %8.4f',180/pi*d0(ii))

fprintf(' %8.4f \n',Pm(ii))

77
78
end

respfl='y';
while respfl =='y' | respfl=='Y'
nf=input('Enter faulted bus No. ->
'); fprintf('\nFaulted reduced bus
admittance matrix\n')
Ydf=ybusdf(Ybus, nbus1, nbust, nf)
%Fault cleared
[Yaf]=ybusaf(linedata, yload, nbus1,nbust, nbrt);
fprintf('\nPostfault reduced bus admittance matrix\n')
Yaf
resptc=
'y';

while resptc =='y' | resptc=='Y

c=input('Enter clearing time of fault in


sec. tc = '); tf=input('Enter final
simulation time in sec. tf = '); clear t x
del
t0 = 0;
w0=zeros(1,
length(d0)); x0 =
[d0, w0];
tol=0.0001;
Y=abs(Ydf); th=angle(Ydf);
%[t1, xf] =ode23('dfpek', t0, tc, x0, tol); % Solution during
fault (use with MATLAB 4)
tspan=[t0, tc];
[t1, xf] =ode23('dfpek', tspan, x0); % Solution during fault (use
with MATLAB 5) x0c =xf(length(xf), :);
Y=abs(Yaf); th=angle(Yaf);
%[t2,xc] =ode23('afpek', tc, tf, x0c, tol); % Postfault solution
(use with MATLAB 4)
tspan = [tc, tf]; % use with MATLAB 5
[t2,xc] =ode23('afpek', tspan, x0c); % Postfault solution (use

79
80
with MATLAB 5)
t =[t1; t2]; x = [xf; xc];
fprintf('\nFault is cleared at %4.3f
Sec. \n', tc) for k=1:nbus
if
kb(k)==1
ms=k;
else, end
end
fprintf('\nPhase angle difference of each
machine \n') fprintf('with respect to the slack
in degree.\n')
fprintf('
t - sec')
kk=0;
for k=1:ngg
if k~=ms
kk=kk+1;
del(:,kk)=180/pi*(x(:,k)-x(:,ms));
fprintf(' d(%g,',ngr(k)), fprintf('%g)', ngr(ms))
else,
end
fprintf
(' \n')
disp([t, del])
h=figure;
figure(h)

plot(t, del)
title(['Phase angle difference (fault cleared at ',
num2str(tc),'s)']) xlabel('t, sec'), ylabel('Delta,
degree'), grid
resp=0;
while strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp,
'y')~=1 & strcmp(resp, 'Y')~=1
resp=input('Another clearing time of fault? Enter ''y'' or ''n'' within

81
82
quotes
-> ');
if strcmp(resp, 'n')~=1 & strcmp(resp, 'N')~=1 & strcmp(resp,
'y')~=1 & strcmp(resp,'Y')~=1
fprintf('\n Incorrect reply, try
again \n\n'), end
end
resptc=
resp;
end
resp2=;
while strcmp(resp2, 'n')~=1 & strcmp(resp2, 'N')~=1 & strcmp(resp2,
'y')~=1 & strcmp(resp2,'Y')~=1
resp2=input('Another fault location: Enter ''y'' or ''n'' within quotes ->
');
if strcmp(resp2, 'n')~=1 & strcmp(resp2, 'N')~=1 & strcmp(resp2,
'y')~=1 & strcmp(resp2, 'Y')~=1
fprintf('\n Incorrect reply, try again
\n\n'), end respf1=resp2;
end
if respf1=='n' | respf1=='N', return,
else, end

end

83
84
RESULT:

Thus the multi-machine transient stability analysis is simulated on a given power


system network.

85
EXERCISE 1: Single Area Load Frequency Control

An isolated power station has the following parameters


Turbine time constant = 0.5 s
Governor time constant = 0.2 s
Governor inertia constant = 5 s
Governor speed regulation R = 0.05 per unit
The load varies by 0.8 per cent for a 1 per cent change in frequency (D=0.8). The turbine rated
output is 250 MW at nominal frequency 50 Hz. A sudden load change of 50 MW (𝝙PL= 0.2
Per unit) occurs.

Find steady state Frequency deviation in Hz. Also obtain the frequency deviation step response
using MATLAB SIMULINK block diagram.

Solution:

The closed loop transfer function of the control system is given by:

∆Ω(𝑠) 𝑠(1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 )


= 𝑠
−ΔPL 𝑠(2𝐻𝑠 + 𝐷)(1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 ) + 𝑘𝑖 + 𝑅

a) Steady state

∆𝜔𝑠𝑠 = lim(∆Ω(𝑠))(−∆𝑃𝐿 )
𝑠→0

1
= (−0.2)
0.05 + 1
= − 0.00952
∆𝑓 = ∆𝜔𝑠𝑠 𝑓𝑠
= − 0.00952 ∗ 50
= − 0.476𝐻𝑧

86
Ex No: 7 LOAD FREQUENCY CONTROL OF SINGLE AREA AND

TWO AREA POWER SYSTEMS

Date :

AIM:

To become familiar with modeling and analysis of the frequency and the line flow
dynamics of a power system with and without Load Frequency Controller (LFC).

THEORY:

LOAD FREQUENCY CONTROL:

LOAD FREQUENCY PROBLEMS:

If the system is connected to numerous loads in a power system, then the system
frequency and speed change with the characteristics of the governor as the load changes. If it’s
not required to maintain the frequency constant in a system then the operator is not required to
change the setting of the generator. But if constant frequency is required the operator can adjust
the velocity of the turbine by changing the characteristics of the governor when required. If a
change in load is taken care by two generating stations running parallel then the complex nature
of the system increases. The ways of sharing the load by two machines are as follow:

1. Suppose there are two generating stations that are connected to each other by tie line. If
the change in load is either at A or at B and the generation of A is regulated so as to have
constant frequency then this kind of regulation is called as Flat Frequency Regulation.
2. The other way of sharing the load is that both A and B would regulate their generations
to maintain the frequency constant. This is called parallel frequency regulation.

87
WITHOUT THE USE OF AGC:

The Simulink model for the single area system with AGC is:

Figure 7.10 Simulation block diagram of the system without using AGC
The steady state frequency deviation response for single area system without AGC is

88
3. The third possibility is that the change in the frequency of a particular area is taken care
of by the generator of that area thereby maintain the tie-line loading. This method is
known as flat tie-line loading control.
4. In Selective Frequency control each system in a group is taken care of the load changes
on its own system and does not help the other systems, the group for changes outside
its own limits.
5. In Tie-line Load-bias control all the power systems in the interconnection aid in
regulating frequency regardless of where the frequency change originates.

Figure7.1 Load Frequency Control

MATHEMATICAL MODELLING OF POWER SYSTEM

1. MATHEMATICAL MODELLING OF A GENERATOR:


With the use of swing equation of a synchronous machine to small
perturbation, we have

89
WITH AGC:

Figure 7.11 Simulation block diagram for the given system using AGC

The steady state frequency deviation response of single area system with AGC is

Comparison of steady state frequency deviation responses of system with and without AGC is

90
2H 𝑑2 Δδ
= ∆𝑃𝑚 − ∆𝑃𝑒
𝜔𝑠 𝑑𝑡 2

or in terms of small change in speed

Laplace Transformation gives,

1
∆Ω(s) = [ΔP𝑚 (s)– ΔP𝑒 (s)]
2Hs

Figure 7.2 Mathematical modeling block diagram for a generator

2. MATHEMATICAL MODELLING OF LOAD:


The load on a power system consists of variety of electrical drives. The load speed
characteristic of the load is given by:

𝛥𝑃𝑒 = 𝛥𝑃𝐿 + 𝐷 𝛥𝜔

where ΔPL is the non-frequency sensitive change in load,


DΔω is the load change that is frequency sensitive.
D is expressed as % change in load divided by % change in frequency

Figure 7.3 Mathematical modelling block diagram of load and generator

91
EXERCISE 2: Two Area Load Frequency Control

A two area system connected by tie line has following parameters on 1000 MVA common
base.

AREA 1 2
Speed regulation 𝑅1 = 0.05 𝑅2 = 0.0625
Frequency-sensitive load 𝐷1 = 0.6 𝐷2 = 0.9
coefficient
Inertia constant 𝐻1 = 5 𝐻2 = 4
Governor time constant 𝜏𝑔1 = 0.2𝑠 𝜏𝑔2 = 0.3𝑠
Turbine time constant 𝜏 𝑇1 = 0.5𝑠 𝜏 𝑇2 = 0.6𝑠
Base power 1000MVA 1000MVA
The units are operating in parallel at the nominal frequency of 50Hz. The synchronizing power
coefficient is computed from the initial operating condition and is given to be Ps=0.2 pu. A load
change of 187.5 MW occurs in area 1. Determine the new steady state frequency and change
in the tie-line flow and obtain the frequency deviation step response using MATLAB
SIMULINK.

SOLUTION:
𝑀𝑉𝐴𝑏 = 1000𝑀𝑉𝐴
Change in load, ∆ 𝑃𝐿1 = 187.5𝑀𝑊

187.5
Pu change in load ∆ 𝑃𝐿1 = 1000

∆ 𝑃𝐿1 = 0.1875𝑝𝑢

Steady state per unit frequency deviation


𝑃𝐿1
∆𝜔𝑠𝑠 = − ∆
𝐵1 + 𝐵𝐿

92
3. MATHEMATICAL MODELLING FOR PRIME MOVER:
The source of power generation is the prime mover. It can be hydraulic turbines near
waterfalls, steam turbine whose energy come from burning of coal, gas and other fuels. The
model of turbine relates the changes in mechanical power output ΔPm and the changes in the
steam valve position ΔPV.

𝑃𝑚 (𝑠) 1
𝐺𝑇 (𝑠) = =
𝑃𝑉 (𝑠) 1 + 𝜏 𝑇 𝑠

Figure 7.4 Mathematical modelling block diagram of simple turbine

where the turbine constant is in the range of 0.2 -2.0s.

4. MATHEMATICAL MODELLING FOR GOVERNOR :


When the electrical load is increased suddenly then the electrical power exceeds the
input mechanical power. In s-domain

1
∆𝑃𝑉 (𝑠) = ∆𝑃 (𝑠)
1 + 𝜏𝑔 𝑉

Figure 7.5 Block diagram of speed governing system

The command ΔPg is transformed through amplifier to the steam valve position command
ΔPV.

93
B1 , B L are frequency bias factors
1
𝐵1 = ( ) + 𝐷1
𝑅1
1
= ( ) + 0.6
0.5
𝐵1 = 20 .6
1
𝐵2 = ( ) + 𝐷2
𝑅2
1
=( ) + 0.9
0.0625
𝐵2 = 16.9
0.1875
∆𝜔𝑠𝑠 = −
20.6 + 16.9
∆𝜔𝑠𝑠 = − 0.005 𝑝𝑢

Change in frequency in Hz ∆𝑓 = ∆𝜔𝑠𝑠 ∗ 𝑓𝑜

∆𝑓 = (−0.005) ∗ (50)

= − 0.25𝐻𝑧

Now, frequency= 𝑓𝑜 + ∆𝑓 = 50 – 0.25 𝐻𝑧

𝑓 = 49.75 𝐻𝑧

Change in tie line flow in pu,


𝐵2
∆𝑃12 = ( ) ∗ ∆ 𝑃𝐿1
𝐵1 + 𝐵2
16.9
= ( ) ∗ (− 0.1875)
20.6 + 16.9
∆𝑃12 = − 0.0845 𝑝𝑢

∆𝑃12 = (− 0.0845) ∗ (1000)

∆𝑃12 = − 84.5𝑀𝑊

There is 84.5 MW reduction in the line per unit change in Mechanical power
(pu).

94
We assume here a linear relationship and considering simple time constant we get this s-domain
relation. Combining all the above block diagrams, for an isolated area system we get the
following:

Figure7.6 Block diagram of single area system without LFC

The closed loop transfer function that relates the load change to the frequency deviation is

∆Ω(𝑠) (1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 )


=
−ΔPL 1
(2𝐻𝑠 + 𝐷)(1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 ) +
𝑅

5. AUTOMATIC GENERATION CONTROL:


If the load on the system is suddenly increased, then the speed of the turbine drops
before the governor could adjust the input of the steam to this new load. As the change in the
value of speed decreases the error signal becomes lesser and the position of the governor and
not of the fly balls gets nearer to the point required to keep the speed constant. One way to
regain the speed or frequency to its actual value is to add an integrator on its way. The integrator
will monitor the average error over a certain period of time and will overcome the offset. Thus,
as the load in the system changes continuously the generation is adjusted automatically to
restore the frequency to its nominal value.

95
∆𝜔
∆𝑃𝑚1 = −
𝑅1

(−0.005)
= −
0.05

∆𝑃𝑚1 = 0.1𝑝𝑢

∆𝑃𝑚1 = 0.1 ∗ (1000 𝑀𝑉𝐴)

∆𝑃𝑚1 = 100𝑀𝑊

∆𝜔
∆𝑃𝑚2 = −
𝑅2
− 0.005
= −
0.0625
∆𝑃𝑚2 = 0.080 𝑝𝑢

∆𝑃𝑚2 = 0.080 ∗ (1000𝑀𝑉𝐴)

∆𝑃𝑚2 = 80𝑀𝑊

WITHOUT AGC:

Figure 7.13 Simulink block diagram for two area system without AGC

96
This method is known as automatic generation control. In an interconnected system
consisting of several areas, the task of the AGC is to divide the load among the system, stations
and generators so to achieve maximum economy and uniform frequency.

AGC IN A SINGLE AREA:

With the main LFC loop, change in the system load will result in a steady state
frequency deviation, depending on the speed regulation of the governor. To reduce the
frequency deviation to zero we need to provide a reset action by using an integral controller to
act on the load reference setting to alter the speed set point. This integral controller would
increase the system type by 1 which forces the final frequency deviation to zero. The integral
controller gain need to be adjusted for obtaining satisfactory transient response.

Figure7.7 Block diagram of single area system with LFC

The closed loop transfer function of the control system is given by

∆Ω(𝑠) 𝑠(1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 )


= 𝑠
−ΔPL 𝑠(2𝐻𝑠 + 𝐷)(1 + 𝜏𝑔𝑠 )(1 + 𝜏 𝑇𝑠 ) + 𝑘𝑖 + 𝑅

97
The steady state frequency deviation response for two area system without AGC is

The power deviation response for two area system without AGC is

WITH AGC

Figure 7.12 Simulink block diagram for two area system with AGC

98
AGC IN THE MULTIAREA SYSTEM:

In many cases a group of generators are closely coupled internally and swing in unison.
Furthermore, the generator turbines tend to have the same response characteristics. Such a
group of generators are said to be coherent. Then it is possible to let the LFC loop represent the
whole system and the group is called the control group. For a two area system, during normal
operation the real power transferred over the tie line is given by

|𝐸 1 ||𝐸2 |
𝑃12 = 𝑠𝑖𝑛𝛿12
𝑋12

Figure7.8 Block diagram of two-area system without controller

For a small deviation in the tie-line flow Where X12= X1+Xtie+X2 and δ12 =δ1 - δ2

For a small deviation in the tie-line flow

𝑑𝑃12
𝛥𝑃12 = | 𝛥𝛿
𝑑𝛿12 𝛿12 12

𝛥𝑃12 = 𝑃𝑠 Δ𝛿12

99
The steady state frequency deviation response is

The power deviation step response is

100
Figure 7.9 Block diagram of two-area system with AGC

INFERENCE:

i. From the step response of single area system with AGC, it is observed that the steady-
state frequency deviation ∆𝜔𝑠𝑠 is zero, and the frequency returns to its nominal value in
approximately 10 seconds.
ii. From the step response of two area system with AGC, it is observed that the steady-state
frequency deviation ∆𝜔𝑠𝑠 is zero, and the frequency returns to its nominal value in
approximately 20 seconds.

RESULT:

Thus the modeling and analysis of the frequency and the line flow dynamics of a power
system with and without load frequency controller is studied.

101
PROBLEM:
CASE 1: Economic Dispatch Without line losses
The fuel cost functions for three thermal phases is $/h are given by
C1 = 500 + 5.3P1 + 0.004P12
C2 = 400 + 5.5P2 + 0.006P22
C3 = 200 + 5.8P3 + 0.009P32
Where P1,P2 and P3 are in MW
Find the optimal dispatch and the total cost in $/h for the thermal plants, when the total load
demand in 975 MW .With the following generator limits (ie MW)
200 ≤ P1≤ 450
150 ≤ P2≤350
100 ≤ P3≤ 225

102
EX.NO: 08
ECONOMIC DISPATCH BY LAMBDA ITERATION METHOD
DATE :

AIM
To understand the fundamentals of economics dispatch and solve the problem using
lambda iteration method with and without line losses.

SOFTWARE REQUIRED
MATLAB
THEORY
` Mathematics model for economics dispatch of thermal units without transmission loss
statement of economic dispatch problem.
In power system with negligible transmissions loss and with N, number of spinning
thermal generating units the total system load PD at particular interval can be met by different
lets of generation schedules.
Out of these ns let of generation schedules the system operator has to choose the let of
schedules which minimize the system operating cost, which is essentially the sum of production
cost of all generation units. This economics dispatch problem is mathematically stated as an
optimization problem.
Given:
The number of available generating units (n) these production lost functions, their operating
limits and system load PD,
To determine :
The set of generation schedules Pgi; i= 1,2,3,…n ------- (1)
which minimize total production cost

------- (2)
And satisfies power balance constant

------- (3)

And operating limits


Pgi,min <= PgI <= Pgi,max -------- (4)

103
104
The unit production cost function is essentially approximated by quadratic function
CI(Pgi) = αi + βi Pg(i) + γi Pgi2; i=1,2,3. . .n ------- (5)
Where α_i, βi, and γi are constants.
Necessary conditions for existence of solution to ED problem.
The ED problem giver by equation (1) to (4). By emitting is equality constrains (4)
iteratively, The reduce ED problem (1), (2) and (3) may be restarted as unconstrained
optimization problem by augmenting the objective function (i) with constant multiplied by
Lagrange multiplier, λ to obtain the Lagrange function L as

------- (6)

The necessary conditions for existence of solution to (6) are given by


------- (7)

------- (8)

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


conditions (7) and (8) which state that the economic generation’s schedules not only satisfy the
system power balance equation (8) but also demand that increment cost rates of all the units be
equal to λ which can be interpreted as “incremental cost of received power”.
When the inequality constraints (4) are included in ED problem the necessary condition
(7) gets modified as
Economic schedules
Incremental fuel cost

105
106
PROGRAM 1 : Economic Dispatch without line losses
alpha=[500 400 200];
beta=[5.3 5.5 5.8];
gamma=[0.004 0.006 0.009];
Pmin=[200 150 100];
Pmax=[450 350 225];
PD=975;
%Initial value of Lambda should be >'the maximum value in beta array'
Lambda=input('enter the initial value of Lambda=');
fprintf('')
iter=0; %Iteration count
n=3;
DelP=-1.0; %Initilaise the value of Del P
Pg=zeros(1, n);
while abs(DelP)~=0 %Test for convergence
%totalpg=0;
X=0; % Denominator of Delambda
for i=1:n
Pg(i)=(Lambda-beta(i))./(2*gamma(i));
if Pg(i)>Pmax(i)
Pg(i)=Pmax (i);
end
if Pg(i)<Pmin (i)
Pg(i)=Pmin(i);
else
Pg(i)=Pg(i);
end
X=X+(1./(2*gamma(i)));
totalPg=sum(Pg);
end
DelP=PD-totalPg;
Delambda=DelP./X;

107
108
Lambda=Lambda+Delambda;
iter=iter+1;
if (iter==1000)
break;
end
end
for i=1:n
cost(i) = (alpha(i) +(beta(i).*Pg(i)+gamma(i).*Pg(i)^2));
end
Totalcost=sum(cost);
fprintf('\n Number of iteration=%10d\n', iter)
fprintf('\n Optimal dispatch generation Pg1 =%8.2f MW \n', Pg(1));
fprintf('\n Optimal dispatch generation Pg2 =%8.2f MW \n', Pg (2));
fprintf('\n Optimal dispatch generation Pg3 =%8.2f MW \n', Pg (3));
fprintf('\n Generation costl=%10.2f $/h \n', cost (1));
fprintf('\n Generation cost2=%10.2f $/h \n', cost (2));
fprintf('\n Generation cost1=%10.2f $/h \n', cost (3));
fprintf('\n Total Generation cost=%10.2f $/h \n',Totalcost);

OUTPUT :
enter the initial value of Lambda=6
Number of iteration= 1000
Optimal dispatch generation Pg1 = 450.00 MW
Optimal dispatch generation Pg2 = 325.00 MW
Optimal dispatch generation Pg3 = 200.00 MW
Generation costl= 3695.00 $/h
Generation cost2= 2821.25 $/h
Generation cost1= 1720.00 $/h
Total Generation cost= 8236.25 $/h

109
CASE 2: Economic Dispatch Problem with line losses
The fuel cost functions $/h of three thermal plant of power system are
C1 = 200 + 7.0P1 + 0.0008P12
C2 = 180 + 6.3P2 + 0.009P22
C3 = 140 + 6.8P3 + 0.007P32
Where P1, P2 and P3 are in MW, plant outputs are
10MW ≤ P1≤ 85MW
10MW ≤ P2≤ 80MW
10MW ≤ P3≤ 70MW
The real power loss is given by
P Loss = 0.000218P12+0.000228P22+0.000179P32
Determine the optimal dispatch of generation, when the total system load is 150 MW.

110
PROGRAM 2 : Economic Dispatch with line losses
alpha=[200 180 140];
beta=[7.0 6.3 6.8];
gamma=[0.008 0.009 0.007];
Pmin=[10 10 10];
Pmax=[85 80 70];
PD=150;
n=3;%No. of generator units
%loss coefficient matrix is 'B'
B=[ 0.000218 0 0
0 0.000228 0
0 0 0.000179];
%Initial value of Lambda should be >'the maximum value in beta array'
Lambda=input('enter the initial value of Lambda=');
fprintf('')
iter=0; %Iteration count
n=3;
DelP=-1; %Initilaise the value of Del P
Pg=zeros(1,n);
while abs(DelP)~=0 %Test for convergence
PLoss=0;
X=0; % Denominator of Delambda
for i=1:n
Pg(i)=(Lambda-beta(i))./(2*gamma(i)+(Lambda*B(i,i)));
if Pg(i)>Pmax(i)
Pg(i)=Pmax (i);
end
if Pg(i)<Pmin (i)
Pg(i)=Pmin(i);
Else

111
112
Pg(i)=Pg(i);
end
X=X+(1./(2*(gamma(i)+Lambda*B(i,i))^2));
totalPg=sum(Pg);
end
PLoss=PLoss+(Pg*B*transpose(Pg));
DelP=PD+PLoss-totalPg;
Delambda=DelP./X;
Lambda=Lambda+Delambda;
iter=iter+1;
if (iter==1000)
break;
end
end
for i=1:n
cost(i) = (alpha(i) +(beta(i).*Pg(i)+gamma(i).*Pg(i)^2));
end
Totalcost=sum(cost);
fprintf('\n Number of iteration=%10d\n', iter)
fprintf('\n Optimal dispatch generation Pg1 =%8.2f MW \n', Pg(1));
fprintf('\n Optimal dispatch generation Pg2 =%8.2f MW \n', Pg (2));
fprintf('\n Optimal dispatch generation Pg3 =%8.2f MW \n', Pg (3));
fprintf('\n The Real Power Loss=%8.2f MW \n', PLoss)
fprintf('\n Generation costl=%10.2f $/h \n', cost (1));
fprintf('\n Generation cost2=%10.2f $/h \n', cost (2));
fprintf('\n Generation cost1=%10.2f $/h \n', cost (3));
fprintf('\n Total Generation cost=%10.2f $/h \n',Totalcost);

113
114
OUTPUT :
enter the initial value of Lambda=8
Number of iteration= 1000
Optimal dispatch generation Pg1 = 33.91 MW
Optimal dispatch generation Pg2 = 65.82 MW
Optimal dispatch generation Pg3 = 52.00 MW
The Real Power Loss= 1.72 MW
Generation costl= 446.57 $/h
Generation cost2= 633.63 $/h
Generation cost1= 512.53 $/h
Total Generation cost= 1592.72 $/h

115
116
117
118
119
120
RESULT:
The optimal economic scheduling of the generator with and without losses are
obtained for the given system.

121
PROBLEM:
The fuel cost function for three thermal plants in $/h are given by,
Unit 1 2 3 4 5 6
ai ($/Mw2 0.1525 0.1060 0.0280 0.0355 0.0211 0.0180
bi ($/Mw) 38.540 46.160 40.400 38.310 36.328 38.270
ci ($/h) 756.8000 451.3250 1050.000 1243.530 1658`57 1356.660
di (kg/MW2 0.00420 0.00420 0.00683 0.00683 0.00400 0.00460
ei (kg/MWh) 0.3300 0.3300 -0.5455 -0.5455 -0.5112 -0.5112
fi (kg/h) 13.860 13.860 40.267 40.267 42`900 42.900
Pi,min (MW) 10 10 35 35 130 125
Pi,max (MW) 125 150 225 210 325 315
Find the optimal dispatch when the load demand is 700 MW

122
EX.NO: 09
DATE:
SOLUTION TO COMBINED ECONOMIC EMISSION DISPATCH
PROBLEMS

AIM:
To determine the combined economic emission dispatch schedules neglecting using
lambda iteration method.
THEORY:
The Combined Economic Dispatch (EED) problem is famulated as a multi –object, non-
linear, constrained optimization problem.
Problem formulation :
The total cost of a plant is expressed as
𝑛 𝑛

Min FT = ∑ Fi (Pi) = ∑ ai + bipi + ciPi2


𝑖=1 𝑖=1

Min FT = Σ Fi P(i) = Σ ai + bi +ci Pi2


The total procedure emission of a plant is expressed as,
𝑛 𝑛

Min ET = ∑ Ei (Pi) = ∑ di + eipi + fiPi2


𝑖=1 𝑖=1

Where, Et is total Emission, di, ei, and fi are emission coefficients of generating unit 1.
The combined economic emission dispatch problem can be formulated as,
F= min f (FT, ET)
𝑛
FT= ∑𝑖=1( ai Pi2 + bipi + ci) + himax(di pi2 + ei pi + (i)

Where, hi max is the maximum price penarter factor of unit i.


( ai pi2max + bi pi max +(i)
ℎ𝑖 𝑚𝑎𝑥 = (di pi2max + ei pi max +(i)) for i= 1,2……..n

This objective function detailed in (4) is minimized subject to system and operational
constained that are as follows.
Power balance constraint
∑𝑛𝑖=1 𝑝𝑖 = pD
Where, pd is the power demand (MW)
Generator capacity constraints
Pi min ≤ pi ≤ pi max , Where, pi min and pi max are minimum and
maximum generation limited of generation I respectively.

123
124
ALGORITHMIC STEPS FOR LAMBDA ITERATION METHOD:
STEP 1: Read generator cost co-efficients, generation limit and load demand.
STEP 2: Assume initial estimate λ (preferably maximum value of coefficient of pi)
STEP 3: Compute the real power output of generating units using the co - ordination
equation.
λ−𝐵𝑖
𝑝𝑖 = 2𝑟𝑖

STEP 4: Check for the generation limit, if any unit violates the generation limits, fix the
generation of the unit which side it violate.
STEP 5: Compute real power mismatch ( ∆ p).
∆p = ∑𝑛𝑖=0 pi − pD
STEP 6: Compute ∆ λ
STEP 7: Update λ= λ +∆ λ. Computation copies continued from step 3 till ∆p ≤ 0.0001.
STEP 8: Compute the total fuel of cost.
STEP 9: Print the dispatch schedules 1 total fuel cost total emission.

PROGRAM:
Clear
clc
costcoeff=[1756.8 38.54 0.1525; 451.325 46.16 0.106; 1050 40.4 0.0280;
1243.53 38.31 0.355; 1658.57 36.328 0.0211; 1356.66 38.27 0.018]:
emissioncoeff=[13.860 0.33 0.00420; 13.86 0.33 0.00420; 40.267 -0.5455
0.00683;40.267 -0.5455 0.00683; 42.9 -0.5112 0.00460; 42.9 -0.5112
0.00460];
mwlimits=[10 125; 10 150; 35 225; 35 210; 130 325; 125 315);
Pdt =700; % Power demand
nth=length(costcoeff(:,1)); % Number of thermal units
for i=1:nth
hmax(i)=(costcoeff(i,1)+costcoeff(i,2)* mwlimits(i,2)+costcoeff(i,3)*
mwlimits (i,2)^2)/(emissioncoeff(i,1)+ emissioncoeff(i,2)*
mwlimits(i,2)+emissioncoeff(i,3)* mwlimits(i,2)^2);
end
for i=1:nth
for j=1:3
cost (i,j)=costcoeff(i,j)+hmax(i)*emissioncoeff(i,j);
end
end.
iteration =0; % Iteration count

125
126
delp=10;
error=0.001;
lambda=max(cost (:,2)); % Initial estimate
for i=1:nth % Denominator of delLambda
dr(i)=inv(2*cost(i,3));
end
sdr=sum(dr);
while abs(delp)>error % Optimisation looop
iteration=iteration+1;
for i=1:nth
p(i)=(lambda-cost(i,2))/(2*cost(i,3));
if p(i)>=mwlimits(i,2)
p(i)=mwlimits(i,2);
elseif p(i)<= mwlimits(i,1)
p(i)=mwlimits(i,1);
end
end
totgen=sum(p);
delp=Pdt-totgen;
dellambda-abs(delp)/sdr;
if delp > 0.001
lambda=lambda+dellambda;
end
end
for i=1:nth
fcost(i)=costcoeff(i, 1)+(costcoeff(i,2)*p(i))+(p(i)^2*costcoeff(i,3));
femission(i)=emissioncoeff(i, 1)+(emissioncoeff(i,2)*p(i))+(p(i)^2
emissioncoeff(i,3));
end
tofcost=sum(fcost);
tofemission=sum(femission);
%fprintf("\nNumber of Iterations = % 10.2f\n', iteration)
fprintf("\n Optimal Dispatch of Generation (MW):\n")
disp (p')
fprintf("\n Total Power Demand (MW):\n')
disp (Pdt)
fprintf("\nTotal Generation Cost= % 10.2f 5/h \n', tofcost)
fprintf("\nTotal Emission= % 10.2f kg/h \n', tofemission)

127
128
OUTPUT

Optimal Dispatch of Generation (MW):


51.7147
52.1326
134.5870
57.1290
205.4878
198.9439
Total Power Demand (MW):
700
Total Generation Cost = 37586.21 $/h
Total Emission= 461.96 kg/h

RESULT:

Thus, the combined economic emission dispatch problem solved using classical
method and verified using MATLAB Software.

129
PROBLEM
Obtain the optimal Unit Commitment for the given generators using Priority list
technique
Unit 1:Pmin=150MW ;Pmax=600MW
Fuel Cost function H1= 510 + 7.2 P1 + 0.00142 P1^2 MBtu/Hr
Unit 2:Pmin=100MW ; Pmax=400MW
Fuel Cost function H2=310 + 7.85 P2 + 0.00142 P2^2 MBtu/Hr
Unit 3:Pmin =150MW ;Pmax = 600MW
Fuel Cost function H3=78 + 7.97 P3 + 0.004822 P3^2 MBtu/Hr
With
Fuel cost 1=1.1 Rs/MBtu
Fuel cost 2=1.0 Rs/MBtu
Fuel cost 3=1.2 Rs/MBtu

130
Ex No: 10 THERMAL UNIT COMMITMENT USIND PRIORITY LIST METHOD
Date:

AIM
To obtain the optimal Unit commitment schedule by priority listing method for the given
problem using MATLAB program.

SOFTWARE REQUIRED
MATLAB

FORMULA USED
Full-load average production cost (FLAPC) is the heat rate multiplied by the fuel cost.

FLAPC = (Net Heat Rate at Full-load) x Fuel cost

𝐶1 (𝑃𝐺𝑖 ) 𝐾.𝐻𝑖( 𝑃𝐺𝑖)


FLAPC = =
𝑃𝐺𝑖 𝑃𝐺𝑖

𝑃𝐺𝑖 = PGi, max

Hi( PGi)
FLAPC1 = K1 × PGi

𝑃𝐺𝑖 = PGi, max

THEORY
It consists of creating a priority list of units. In this method, FLAPC is computed for
every unit. Then in order of ascending costs, the units are arranged for commitment. At each
hour when load is dropping, determine whether dropping the next unit on the list leaves
sufficient generation to supply the load plus the spinning-reserve requirements. If the supply is
not sufficient, keep the unit committed. Determine the number of hours before the unit is
needed again. If the time is less than the minimum shut-down time for the unit, keep it
committed. Perform a cost comparison for the sum of the hourly production costs for the next
number of hours with the next unit to be dropped being committed and the sum of the restart
costs for the next unit based on the minimum cost of cooling the unit or banking the unit.

131
132
ALGORITHM

1. Determine FLAPC for each unit.


2. Form priority order (ascending order).
3. Commit the No of unit corresponding to the priority order.
4. Compute the feasible combination from economic load dispatch problem.
5. Each hour load is changing,
Assume the load is dropping or decreasing
Whether falling the unit will supply generator and spinning reverse.
6. If not, continue as it is. If yes, go to next step.
7. Determine the No of Hours, before the unit will be required again.
8. Check H< minimum shutdown time,
If yes, go to the last step.
If not, go to next step.
9. Calculate two Cost.
(i) Sum of hourly production costs for the next H hours with unit up.
(ii) Recompute the same for the unit down the start-up cost for either cooling or barking.
If the second case is less expensive, the unit should be on.

PROGRAM
% Unit commitment Problem
clc;
clear all;
n=input('Enter the number of generating units');
for i=1:n
disp('Enter the details for unit');
disp(i);
a1(i)=input('Enter the coefficient of Pg^2');
b1(i)=input('Enter the coefficient of Pg');
c1(i)=input('Enter the coefficient ');
pmin(i)=input('Enter the Pmin value');
pmax(i)=input('Enter the Pmax value');
k(i)=input('Enter the fuel cost');
a(i)=(k(i)*a1(i));
b(i)=(k(i)*b1(i));

133
134
c(i)=(k(i)*c1(i));
end
for i=1:n
FLAPC(i)=(k(i)*(c1(i)+(b1(i)*pmax(i))+(a1(i)*pmax(i)^2)))
/pmax(i);
end
FLAPC
for i=1:n
for j=i+1:n
if FLAPC(j)<FLAPC(i)
temp1=FLAPC(i);
FLAPC(i)=FLAPC(j);
FLAPC(j)=temp1;
temp2=pmin(i);
pmin(i)=pmin(j);
pmin(j)=temp2;
temp3=pmax(i);
pmax(i)=pmax(j);
pmax(j)=temp3;
temp4=a(i);
a(i)=a(j);
a(j)=temp4;
temp5=b(i);
b(i)=b(j);
b(j)=temp5;
temp7=c(i);
c(i)=c(j);
c(j)=temp7;
end
end
end
FLAPC
u=n;
for i=1:n
m1=0;
m2=0;

135
136
for k=1:u
m1=m1+pmin(k);
m2=m2+pmax(k);
end
u=u-1;
psmin(i)=m1;
psmax(i)=m2;
end
psmin
psmax
lam=input('Enter the initial value of lambda');
pd=input('Enter the Pd value');
u=n;
for i=1:n
if psmax(i)>pd
delp=-1;
iteration=0;
while delp~=0
pp=0;
x=0;
for i=1:u
p(i)=(lam-b(i))/(2*a(i));
if p(i)<pmin(i)
p(i)=pmin(i);
end
if p(i)>pmax(i)
p(i)=pmax(i);
else
p(i)=p(i);
end
x=x+(1/(2*a(i)));
pp=pp+p(i);
end
for i=1:u
for j=i+1:u
if FLAPC(j)<FLAPC(i)

137
138
temp6=p(i);
p(i)=p(j);
p(j)=temp6;
end
end
end
for k=1:u
f(k)=(c(k)+(b(k)*p(k))+(a(k)*p(k)^2));
end
tot=0;
for k=1:u
tot=tot+f(k);
end
delp=pd-pp;
dellam=delp/x;
lam=lam+dellam;
if iteration==100
break;
end
iteration=iteration+1;
end
u=u-1;
end
disp('For the combination ');
disp(i);
disp('Total Fuel Cost=');
disp(tot);
disp('At the end of Iteration=');
disp(iteration);
disp('Power of the units');
disp(p);
disp('lambda=');
disp(lam);
p=zeros(1,n);
lam=0;
tot=0;end

139
140
OUTPUT
Enter the number of generating units3
Enter the details for unit 1
Enter the coefficient of Pg^2=0.006
Enter the coefficient of Pg=7
Enter the constant coefficient=600
Enter the Pmin value=100
Enter the Pmax value=400
Enter the fuel cost=1.1
Enter the details for unit 2
Enter the coefficient of Pg^2=0.01
Enter the coefficient of Pg=8
Enter the constant coefficient=400
Enter the Pmin value=50
Enter the Pmax value=300
Enter the fuel cost=1.2
Enter the details for unit 3
Enter the coefficient of Pg^2=0.008
Enter the coefficient of Pg=6
Enter the constant coefficient=500
Enter the Pmin value=150
Enter the Pmax value=500
Enter the fuel cost=1
FLAPC = 11.9900 14.8000 11.0000
FLAPC = 11.0000 11.9900 14.8000
u = 3
psmin = 300 250 150
psmax = 1200 900 500
Enter the PD value 800
Enter the starting value of lambda 8
At the end of combination 3
iteration= 3
Power of the unit= 313.8298 335.1064 151.0638
lamda= 11.0213
Total cost= 8.6271e+003

141
142
RESULT

Thus, the optimal unit commitment schedule is obtained using priority listing method.

143

You might also like