Vous êtes sur la page 1sur 33

M.

Tech, PS

Power System Simulation Lab-1

FORMATION OF BUS ADMITTANCE MATRICES


Exp.No: 1

Date

AIM:
To determine the admittance matrices for the given power system network.
SOFTWARE REQUIRED: MATLAB
THEORY:
Bus admittance is often used in power system studies. In most of the power
system studies it is required to form y- bus matrix of the system by considering certain
power system parameters depending upon the type of analysis. Y-bus may be formed
by inspection method only if there is no mutual coupling between the lines. Every
transmission line should be represented by

- equivalent. Shunt impedances are added

to diagonal element corresponding to the buses at which these are connected. The off
diagonal elements are unaffected. The equivalent circuit of Tap changing transformers is
included while forming Y-bus matrix.
Formation of Y-Bus Matrix

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.

Dept. of EEE, SVCE

Page 1

M.Tech, PS

Power System Simulation Lab-1

PROGRAM
%MATLAB program for the formation bus admittance(Ybus) matrix
clc;
clear all;
n=4
ybus=zeros(n,n);
y=zeros(n,n);
for i=1:n
for j=i+1:n
fprintf('%d%d',i,j);
z(i,j)=input('enter the value');
if (z(i,j)~=0)
y(i,j)=1/z(i,j)
end
y(j,i)=y(i,j);
end
end
for i=1:n
for j=1:n
ybus(i,i)=ybus(i,i)+y(i,j);
end
end
for i=1:n
for j=i+1:n
ybus(i,j)=-y(i,j);
ybus(j,i)=ybus(i,j)
end
end
display('ybus')
OUTPUT
ybus =
3.0000 - 9.0000i
-2.0000 + 6.0000i
3.0000i
-1.0000 + 3.0000i
0

-2.0000 + 6.0000i -1.0000 + 3.0000i


3.0000 - 9.0000i
0

0
-1.0000 +

0
3.0000 - 9.0000i
-2.0000 + 6.0000i
-1.0000 + 3.0000i
.0000 + 6.0000i
3.0000 - 9.0000i

RESULT:

Dept. of EEE, SVCE

Page 2

M.Tech, PS

Power System Simulation Lab-1

FORMATION OF Z-BUS MATRIX USING MATLAB


Expt.No: 2

Date

AIM : To determine the bus impedance matrices for the given power system network.
SOFTWARE REQUIRED: MATLAB
THEORY:
Formation of Z-Bus Matrix
In bus impedance matrix the elements on the main diagonal are called driving
point impedance and the off-diagonal elements are called the transfer impedance of the
buses or nodes. The bus impedance matrixes are very useful in fault analysis. The bus
impedance matrix can be determined by two methods. In one method we can form the
bus admittance matrix and than taking its inverse to get the bus impedance matrix. In
another method the bus impedance matrix can be directly formed from the reactance
diagram and this method requires the knowledge of the modifications of existing bus
impedance matrix due to addition of new bus or addition of a new line (or impedance)
between existing buses.
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
%MATLAB program for the formation bus impedance (Zbus) matrix
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);
Dept. of EEE, SVCE

Page 3

M.Tech, PS

Power System Simulation Lab-1

from=zprimary(count,2);
to=zprimary(count,3);
value=zprimary(count,4);
newbus=max(from,to);
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.1397

0.1103

0.1250

0.1103

0.1397

0.1250

0.1250

0.1250

0.1750

RESULT:

Dept. of EEE, SVCE

Page 4

M.Tech, PS

Power System Simulation Lab-1

SOLUTION OF POWER FLOW USING GAUSS-SEIDEL METHOD


Expt.No: 3

Date

AIM :
To understand, in particular, the mathematical formulation of power flow model in
complex form and a simple method of solving power flow problems of small sized
system using Gauss-Seidel iterative algorithm
SOFTWARE REQUIRED: MATLAB
THEORY:
The GaussSeidel method is an iterative algorithm for solving a set of non-linear load
flow equations.
The non-linear load flow equation is given by

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
%matlab programm for loadflow analysis using gauss siedal method
clear
n=4
v=[1.04 1.04 1 1]
Y=[3-9i* -2+6i -1+3i 0
-2+6i 3.666-11i -0.666+2i -1+3i
-1+3i -0.666+2i 3.666-11i -2+6i
0 -1+3i -2+6i 3-9i]
type=ones(n,1)
typechanged=zeros(n,1)

Dept. of EEE, SVCE

Page 5

M.Tech, PS

Power System Simulation Lab-1

qlimitmax=zeros(n,1)
qlimitmin=zeros(n,1)
vmagfixed=zeros(n,1)
type(2)=2
qlimitmax(2)=1.0
qlimitmin(2)=0.2
vmagfixed(2)=1.04
diff=10;noofiter=1
vprev=v;
while(diff>0.00001 | noofiter==1);
abs(v)
abs(vprev)
%pause
vprev=v;
p=[inf 0.5 -1 0.3];
q=[inf 0 0.5 -0.1];
s=[inf+i*inf (0.5-i*0.2) (-1.0+i*0.5) (0.3-i*0.1)];
for i=2:n,
if type(i)==2 | typechanged(i)==1;
if(q(i)>qlimitmax(i)|qlimitmin(i)),
if q(i)<qlimitmin(i),
q(i)=qlimitmin(i);
else
q(i)=qlimitmax(i);
end
type(i)=1;
typechanged(i)=1;
else
type(i)=1;
typechanged(i)=0;
end
end
end
sumyv=0;
for k=1:n,
if(i~=k)
sumyv=sumyv+Y(i,k)*v(k);
end
end
v(i)=(1/Y(i,i)*((p(i)-i*q(i))/conj(v(i))-sumyv));
if type(i)==2 & typechanged(i)~=1,
v(i)=polartorect(vmagfixed(i),angle(v(i)*180/pi));
end
diff=max(abs(abs(v(2:n))-abs(vprev(2:n))));
noofiter=noofiter+1;
end
v;
OUTPUT:

RESULT:

Dept. of EEE, SVCE

Page 6

M.Tech, PS

Power System Simulation Lab-1

SOLUTION OF POWER FLOW USING NEWTON-RAPHSON METHOD


Expt. No: 4
Date:

AIM :
To determine the power flow analysis using Newton Raphson method
SOFTWARE REQUIRED: MATLAB
THEORY:
The Newton Raphson method of load flow analysis is an iterative method which
approximates the set of non-linear simultaneous equations to a set of linear
simultaneous equations using Taylors series expansion and the terms are limited to first
order approximation.

The load flow equations for Newton Raphson method are non-

linear equations in terms of real and imaginary part of 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 by either pressing Tools Run.
5. View the results.

Dept. of EEE, SVCE

Page 7

M.Tech, PS

Power System Simulation Lab-1

PROGRAM
% MATLAB program for Newton-Raphson method%
V = [1.05; 1.0; 1.04];
d = [0; 0; 0];
Ps=[-4; 2.0];
Qs= -2.5;
YB = [ 20-j*50 -10+j*20 -10+j*30
-10+j*20 26-j*52 -16+j*32
-10+j*30 -16+j*32
26-j*62];
Y= abs(YB); t = angle(YB);
iter=0;
pwracur = 0.00025; % Power accuracy
DC = 10;
% Set the maximum power residual to a high value
while max(abs(DC)) > pwracur
iter = iter +1
P=[V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+V(2)^2*Y(2,2)*cos(t(2,2))+ ...
V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
V(3)*V(1)*Y(3,1)*cos(t(3,1)-d(3)+d(1))+V(3)^2*Y(3,3)*cos(t(3,3))+ ...
V(3)*V(2)*Y(3,2)*cos(t(3,2)-d(3)+d(2))];
Q= -V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-V(2)^2*Y(2,2)*sin(t(2,2))- ...
V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,1)=V(2)*V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))+...
V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,2)=-V(2)*V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
J(1,3)=V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+2*V(2)*Y(2,2)*cos(t(2,2))+...
V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(2,1)=-V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2));
J(2,2)=V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))+...
V(3)*V(2)*Y(3,2)*sin(t(3,2)-d(3)+d(2));
J(2,3)=V(3)*Y(2,3)*cos(t(3,2)-d(3)+d(2));
J(3,1)=V(2)*V(1)*Y(2,1)*cos(t(2,1)-d(2)+d(1))+...
V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(3,2)=-V(2)*V(3)*Y(2,3)*cos(t(2,3)-d(2)+d(3));
J(3,3)=-V(1)*Y(2,1)*sin(t(2,1)-d(2)+d(1))-2*V(2)*Y(2,2)*sin(t(2,2))-...
V(3)*Y(2,3)*sin(t(2,3)-d(2)+d(3));
DP = Ps - P;
DQ = Qs - Q;
DC = [DP; DQ]
J
DX = J\DC
d(2) =d(2)+DX(1);
d(3)=d(3) +DX(2);
V(2)= V(2)+DX(3);
V, d, delta =180/pi*d;
End
P1= V(1)^2*Y(1,1)*cos(t(1,1))+V(1)*V(2)*Y(1,2)*cos(t(1,2)-d(1)+d(2))+...
V(1)*V(3)*Y(1,3)*cos(t(1,3)-d(1)+d(3))
Q1=-V(1)^2*Y(1,1)*sin(t(1,1))-V(1)*V(2)*Y(1,2)*sin(t(1,2)-d(1)+d(2))-...
V(1)*V(3)*Y(1,3)*sin(t(1,3)-d(1)+d(3))
Q3=-V(3)*V(1)*Y(3,1)*sin(t(3,1)-d(3)+d(1))-V(3)*V(2)*Y(3,2)*...
sin(t(3,2)-d(3)+d(2))-V(3)^2*Y(3,3)*sin(t(3,3))

Dept. of EEE, SVCE

Page 8

M.Tech, PS

Power System Simulation Lab-1

OUTPUT
iter = 1
DC =
-2.8600
1.4384
-0.2200
J=
54.2800 -33.2800 24.8600
-33.2800 66.0400 -16.6400
-27.1400 16.6400 49.7200
DX =
-0.0453
-0.0077
-0.0265
V=
1.0500
0.9735
1.0400
d=
0
-0.0453
-0.0077
iter = 2
DC =
-0.0992
0.0217
-0.0509
J=
51.7247 -31.7656 21.3026
-32.9816 65.6564 -15.3791
-28.5386 17.4028 48.1036
DX =
-0.0018
-0.0010
-0.0018
V=
1.0500
0.9717
1.0400
d=
0
-0.0471
-0.0087

Dept. of EEE, SVCE

Page 9

M.Tech, PS

iter =

Power System Simulation Lab-1

DC =
1.0e-003 *
-0.2166
0.0382
-0.1430
J=
51.5967 -31.6939 21.1474
-32.9339 65.5976 -15.3516
-28.5482 17.3969 47.9549
DX =
1.0e-005 *
-0.3856
-0.2386
-0.4412
V=
1.0500
0.9717
1.0400
d=
0
-0.0471
-0.0087
P1 = 2.1842
Q1 = 1.4085
Q3 =

1.4618

RESULT:

Dept. of EEE, SVCE

Page 10

M.Tech, PS

Power System Simulation Lab-1

FAST DECOUPLED LOAD FLOW ANALYSIS USING MATLAB SOFTWARE


Expt. No: 5

Date:

AIM:
To become proficient in the usage of software in solving load flow problems using Fast
decoupled load flow method.
SOFTWARE REQUIRED: MATLAB
THEORY:
Load flow study is useful in planning the expansion of power system as well as
determining best operation of the system. The principle obtained from load flow study is
the magnitude and phase angle of the voltage at each bus and real and reactive power
flowing in each line. Load flow analysis may be performed using A.C. network analyzer
and also by digital computer. But now a-days digital computer oriented load flow analysis
is a standard practice. The fast decoupled load flow method is a very fast method of
obtaining load flow solutions.
This method requires less number of arithmetic operations to complete iteration
consequently. This method requires less time per iterations. In N-R method, the
elements ofJacobian are to be computed in each iteration .So the time per iteration is
considerably more in N-R method than in FDLF. The rate of convergence in FDLF method
is slow requiring considerably more number of iterations to obtain a solution than in the
case of N-R method. However accuracy is same in both the cases. In this method both
the speeds as well as the sparsity are exploited.
This is an extension of N-R method formulated in polar co-ordinates with certain
approximation which results into a fast algorithm for load flow solution. In practice,
transmission system operating under steady state possesses strong interdependence
between

active

powers

and

bus

voltages,

angles,

similarly

there

is

strong

interdependence between bus voltage and reactive power

Dept. of EEE, SVCE

Page 11

M.Tech, PS

Power System Simulation Lab-1

The equation for power flow are again expressed below for calculating elements of
Jacobian (ie H & L)

Therefore the elements of Jacobian (ie H & L) can be calculated as from the equations
above of power. OFF diagonal element of H is

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
%MATLAB program for Fast Decoupled Method%
clc;
clear all;
%busdata
%busdata=[Bus No
bus code
Voltage Angle
pd qd pg qg]
busdata=[1 1 1.06 0 0 0 0 0;2 0 1 0 0.5 0.2 0 0;3 0 1 0 0.4 0.3 0 0;4 0 1 0 0.3 0.1 0
0 ;]
%linedata
%linedata=[start bus end bus rxshunt-Y]
linedata=[1 2 2 8 0;1 3 1 4 0;2 3 0.666 2.664 0;2 4 1 4 0;3 4 2 8 0;]
%Guass-Seidal Algorithm
Dept. of EEE, SVCE

Page 12

M.Tech, PS

Power System Simulation Lab-1

nl=linedata(:,1);
nr=linedata(:,2);
nbr=length(nl);
nbus=max(max(nl),max(nr));
r=linedata(:,3);%line resistance
x=linedata(:,4);%line resistance
bc=linedata(:,5);
y=complex(r,-x);
epsilon=0.001;
r=epsilon +1;
epsilon;
ybus=zeros(nbus,nbus);
for k=1:nbr
if nl(k)>0 & nr(k)>0
ybus(nl(k),nr(k))=-y(k);
ybus(nr(k),nl(k))=-y(k);
end
end
for n=1:nbus
for k=1:nbr
if nl(k)==n|nr(k)==n
ybus(n,n)=ybus(n,n)+y(k);
else
end
end
end
y;
ybus
p=(busdata(:,7)-busdata(:,5));
q=(busdata(:,8)-busdata(:,6));
s=complex(p,q);
v=busdata(:,3);
void=v;
iter=0;
while(r>=epsilon)
for k=2:nbus
sum=0;
for q=1:nbus
if(q~=k)
sum=sum+(ybus(k,q)*v(q));
else
end
end
sum;
v(k,1)=((conj(s(k,1)/conj(v(k,1)))-sum)/ybus(k,k));
iter+1;

Dept. of EEE, SVCE

Page 13

M.Tech, PS

Power System Simulation Lab-1

p;
v;
end
v
dv=abs(void-v);
r=max(dv);
void=v;
iter=iter+1;
end
for ab=1:nbus
for ba=1:nbus
if(ab~=ba)
ibus(ab,ba)=(v(ab,1)-v(ba,1))*(-ybus(ab,ba));
else
ibus(ab,ba)=0;
end
end
end
ibus
for ab=1:nbus
for ba=1:nbus
if(ab~=ba)
lineflow(ab,ba)=(v(ab)*conj(ibus(ab,ba)));
end
end
end
lineflow
islack=0;
for ab=1:nbus
for ba=1:nbus
if(ab==1)
islack=islack+ibus(1,ba);
else
end
end
end
islack
slackpower=conj(v(1))*(islack)
%powerloss
for ab=1:nbus
for ba=1:nbus
if ba>ab
pw=ibus(ab,ba)*ibus(ab,ba)*(real(1/-ybus(ab,ba)));
else

Dept. of EEE, SVCE

Page 14

M.Tech, PS

Power System Simulation Lab-1

end
end
end
pw
OUTPUT
busdata =
1.0000
2.0000
3.0000
4.0000

1.0000
0
0
0

1.0600
1.0000
1.0000
1.0000

0
0
0
0

linedata =
1.0000
1.0000
2.0000
2.0000
3.0000

2.0000
3.0000
3.0000
4.0000
4.0000

2.0000
1.0000
0.6660
1.0000
2.0000

8.0000
4.0000
2.6640
4.0000
8.0000

0
0.5000
0.4000
0.3000

0
0
0.2000 0
0.3000 0
0.1000 0

0
0
0
0

0
0
0
0
0

ybus =
3.0000 -12.0000i -2.0000 + 8.0000i -1.0000 + 4.0000i
0
-2.0000 + 8.0000i 3.6660 -14.6640i -0.6660 + 2.6640i -1.0000 + 4.0000i
-1.0000 + 4.0000i -0.6660 + 2.6640i 3.6660 -14.6640i -2.0000 + 8.0000i
0
-1.0000 + 4.0000i -2.0000 + 8.0000i 3.0000 -12.0000i
ibus =
0
0.7581 - 0.2792i
-0.7581 + 0.2792i
0
-0.4902 + 0.2116i -0.0741 + 0.0480i
0
0.1790 + 0.0694i

0.4902 - 0.2116i
0.0741 - 0.0480i
0
-0.1356 - 0.0052i

line flow =
0
-0.7843 - 0.2192i
-0.5029 - 0.1573i
0

0.5196 + 0.2243i
0
0.0783 + 0.0422i 0.1855 + 0.0553i
0
0.1326 - 0.0190i
-0.1320 + 0.0212i
0

0.8035 + 0.2960i
0
0.0776 - 0.0395i
-0.1833 - 0.0466i

0
0.1790 - 0.0694i
0.1356 + 0.0052i
0

islack = 1.2483 - 0.4909i


slackpower = 1.3232 - 0.5203i
pw = 5.4014e-004 +4.1314e-005i

RESULT:

Dept. of EEE, SVCE

Page 15

M.Tech, PS

Power System Simulation Lab-1

SIMULATION OF SINGLE AREA POWER SYSTEMS


Expt . No: 6

Date:

AIM:
To become familiar with modelling and analysis of the frequency and tie-line flow
dynamics of a power system without and with load frequency controllers (LFC) and to
design better controllers for getting better responses.
THEORY:
Active power control is one of the important control actions to be perform to be
normal operation of the system to match the system generation with the continuously
changing system load in order to maintain the constancy of system frequency to a fine
tolerance level. This is one of the foremost requirements in proving quality power supply.
A change in system load cases a change in the speed of all rotating masses (Turbine
generator rotor systems) of the system leading to change in system frequency. The
speed change form synchronous speed initiates the governor control (primary control)
action result in the entire participating generator turbine units taking up the change in
load, stabilizing system frequency.
Restoration of frequency to nominal value requires secondary control action which
adjusts the load - reference set points of selected (regulating) generator turbine units.
The primary objectives of automatic generation control (AGC) are to regulate system
frequency to the set nominal value and also to regulate the net interchange of each area
to the scheduled value by adjusting the outputs of the regulating units. This function is
referred to as load frequency control (LFC).
PROCEDURE:
1. Enter the command window of the MATLAB.
2. Create a new Model by selecting File - New Model
3. Pick up the blocks from the simulink library browser and form a block diagram.
4. After forming the block diagram, save the block diagram.
5. Double click the scope and view the result.

Dept. of EEE, SVCE

Page 16

M.Tech, PS

Power System Simulation Lab-1

SIMULINK BLOCK DIAGRAM

OUTPUT

RESULT

Dept. of EEE, SVCE

Page 17

M.Tech, PS

Power System Simulation Lab-1

SIMULATION OF TWO AREA POWER SYSTEM


Expt . No: 7

Date :

AIM:
To become familiar with modelling and analysis of the frequency and tie-line flow
dynamics of a two area power system without and with load frequency controllers (LFC)
and to design better controllers for getting better responses.

THEORY:
Active power control is one of the important control actions to be performing to
be normal operation of the system to match the system generation with the continuously
changing system load in order to maintain the constancy of system frequency to a fine
tolerance level. This is one of the foremost requirements in proving quality power supply.
A change in system load cases a change in the speed of all rotating masses (Turbine
generator rotor systems) of the system leading to change in system frequency. The
speed change form synchronous speed initiates the governor control (primary control)
action result in the entire participating generator turbine units taking up the change in
load, stabilizing system frequency.
Restoration of frequency to nominal value requires secondary control action which
adjusts the load reference set points of selected (regulating) generator turbine units.
The primary objectives of automatic generation control (AGC) are to regulate system
frequency to the set nominal value and also to regulate the net interchange of each area
to the scheduled value by adjusting the outputs of the regulating units. This function is
referred to as load frequency control (LFC).
PROCEDURE:
1. Enter the command window of the MATLAB.
2. Create a new model by selecting File New Model
3. Pick up the blocks from the simulink library browser and form a block diagram.
4. After forming the block diagram, save the block diagram.
5. Double click the scope and view the result.

Dept. of EEE, SVCE

Page 18

M.Tech, PS

Power System Simulation Lab-1

SIMULINK BLOCK DIAGRAM:

OUTPUT

RESULT

Dept. of EEE, SVCE

Page 19

M.Tech, PS

Power System Simulation Lab-1

SIMULATION OF AUTOMATIC GENERATION USING MATLAB


Expt . No: 8

Date:

AIM:
To obtain automatic generation control using Matlab
THEORY:
If a load on the system is increased thr turbine speed drops before the governor
can adjust the input of the steam to a new load. As the value of speed diminishes, error
signal becomes smaller and position of fly ball governor gets closer to point required to
maintain a constant speed. However the speed will not be set to a constant point. One
way to restore speed or frequency to its nominal value is by use of integrator. This unit
monitors the average error over a period of time and because of its ability to return a
system to its set point, the integral action is also known as rest action.
Thus

as

system

load

changes

continuously

the

generation

is

adjusted

automatically to restore the frequency to its nominal value. This is known as generation
control.
The main role of AGC is an interconnected system is to divide the loads among
system stations and generators to achieve maximum economy besides maintaining
uniform frequency
SIMULINK BLOCK DIAGRAM:

Dept. of EEE, SVCE

Page 20

M.Tech, PS

Power System Simulation Lab-1

OUTPUT

RESULT:

Dept. of EEE, SVCE

Page 21

M.Tech, PS

Power System Simulation Lab-1

DEVELOP A PROGRAM TO SOLVE SWING EQUATION


Exp. No.: 9

Date:

Aim: To Develop a program to solve swing equation


SOFTWARE REQUIRED: MATLAB
THEORY:
Stability:

Stability problem is concerned with the behavior of power system when it is


subjected to disturbance and is classified into small signal stability problem if the
disturbances are small and transient stability problem when the disturbances are large.
Transient stability:

When a power system is under steady state, the load plus transmission loss
equals to the generation in the system. The generating units run 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 toque etc., the nature of system response
to small disturbance depends on the operating conditions, the transmission system
strength, types of controllers etc. Instability that may result from small disturbance may
be of two forms,(i) Steady increase in rotor angle due to lack of synchronizing torque.(ii)
Rotor oscillations of increasing magnitude due to lack of sufficient damping torque.
PROGRAM
%
Point by Point Solution of Swing Equation
%
*******************$$********************
% |||Swing equation being a non linear equation, numerical methods are use to
% solve it. Point by Point method is one of the classical solution to solve
% swing equation|||
%
Dept. of EEE, SVCE

Page 22

M.Tech, PS

Power System Simulation Lab-1

% Below is a solution of swing equation for a machine connected to infinite bus


% through two parallel lines. Swing equation is drawn for a persisting fault in
% one of the parallel line and also after fault is cleared. stability
%
of system is concluded after analysing the swing curve.
%
clearing angle is calculated for system stability|||
%% MVA base = 50
% given
E = 50; V =1; Xd = 0.2; X1 =0.4; X2 = 0.4;H = 2.7;
% prefault condition
del = 0:pi/10:pi;
del1 =del;
del2 = del;
M = 2.7/(180*50);
% angular momentum = H/180*f
Peo = (1.05/0.4)*sin(del);
% Initial power curve
Po = 1 ;
% power output in pu = 50 MW/50 MVA
delo = asind(0.4/1.05);
% initial load angle in degrees //Pe = (E*V/X) sin(delo)
% During fault
Pe2 = 1.05*sin(del1);
% Power curve during fault
%Post fault condition
Pe3 = (1.05/0.6)*sin(del2);
% Power curve after clearing fault
%% Primary Power curve plot Figure-1
plot(del,Peo);
set(gca,'XTick',0:pi/10:pi);
set(gca,'XTickLabel',{'0','','','','','pi/2','','','','','pi'});
title('Power Curve');
xlabel('Load angle');
ylabel('Genpower');
text((2/3)*pi,(1.05/0.4)*sin((2/3)*pi),'\leftarrow intial
curve','HorizontalAlignment','left');
text(pi/2,2.75,'2.625*sin\delta','HorizontalAlignment','center');
hold all
plot(del1,Pe2);
text((2/3)*pi,1.05*sin((2/3)*pi),'\leftarrow during fault','HorizontalAlignment','left');
text(pi/2,1.80,'1.05*sin\delta','HorizontalAlignment','center');
plot(del2,Pe3);
text((2/3)*pi,(1.05/0.6)*sin((2/3)*pi),'\leftarrow fault
cleared','HorizontalAlignment','left');
text(pi/2,1.1,'1.75*sin\delta','HorizontalAlignment','center');
hold off
%% -----------t = 0.05;
% time step preferably 0.05 seconds
t1 = 0:t:0.5;
%% (a) sustained fault at t = 0
% for discontinuity at t = 0 , we take the average of accelerating power
% before and after the fault
% at t = 0-, Pa1 = 0
% at t = 0+. Pa2 = Pi - Pe2
% at t = 0 ,Pa =Pa1+Pa2/2
pao = (1 - (1.05*sind(delo)))/2;
% at the instant of fault del1 = delo
Pa(1) = Pao;
cdel(1) = 0;
d1 = t^2/M;
for i = 1:11

Dept. of EEE, SVCE

Page 23

M.Tech, PS

Power System Simulation Lab-1

if i == 1
d2(i) = d1*Pa(i);
del(i) = delo;
else
cdel(i) = cdel(i-1)+d2(i-1);
del(i) = del(i-1)+cdel(i);
Pe(i) = 1.05*sind(del(i));
Pa(i) = 1 - Pe(i);
d2(i) = d1*Pa(i);
end
end
%% swing curve 1 plot
figure (2);
plot(t1,del);
set(gca,'Xtick',0:0.05:0.5);
set(gca,'XtickLabel',
{'0','0.05','0.10','0.15','0.20','0.25','0.30','0.35','0.40','0.45','0.50'});
title('Swing Curve');
xlabel('seconds');
ylabel('degrees');
text(0.30,150,' Sustained fault','HorizontalAlignment','right');
text(0.001,130,' load angle increases with time -- Unstable
state','HorizontalAlignment','left');
%% (b) Fault cleared in 0.10 seconds ,2nd step ---- 3rd element [1]0 [2]0.05,[3]0.10
Pafo = (1 - (1.05*sind(delo)))/2;
% at the instant of fault del1 = delo
Paf(1) = Pao;
cdelf(1) = 0;
d1f = t^2/M;
for i = 1:2
if i == 1
d2f(i) = d1*Pa(i);
delf(i) = delo;
else
cdelf(i) = cdelf(i-1)+d2f(i-1);
delf(i) = delf(i-1)+cdelf(i);
Pef(i) = 1.05*sind(delf(i));
Paf(i) = 1 - Pef(i);
d2f(i) = d1*Paf(i);
end
end

Dept. of EEE, SVCE

Page 24

M.Tech, PS

Power System Simulation Lab-1

% after clearing fault, power curve shift to Pe3


for i = 3:11
if i == 3
cdelf(i) = cdelf(i-1)+d2f(i-1);
delf(i) = delf(i-1)+cdelf(i);
Pef(i) = 1.05*sind(delf(i));
Paf(i) = 1 - Pef(i);
a1 = Paf(i);
d2f(i) = d1*Paf(i);
a2 = d2f(i);
Pef(i) = 1.75*sind(delf(i));
Paf(i) = 1 - Pef(i);
d2f(i) = d1*Paf(i);
Paf(i) = (Paf(i)+ a1)/2;
d2f(i) = (d2f(i) + a2)/2;
else
cdelf(i) = cdelf(i-1)+d2f(i-1);
delf(i) = delf(i-1)+cdelf(i);
Pef(i) = 1.75*sind(delf(i));
Paf(i) = 1 - Pef(i);
d2f(i) = d1*Paf(i);
end
end
%% -----figure (3);
plot(t1,delf);
set(gca,'Xtick',0:0.05:0.5);
set(gca,'XtickLabel',
{'0','0.05','0.10','0.15','0.20','0.25','0.30','0.35','0.40','0.45','0.50'});
title('Swing Curve');
xlabel('seconds');
ylabel('degrees');
text(0.25,57,' Fault Cleared in 0.10 sec','HorizontalAlignment','right');
text(0.15,30,' load angle decreases with time -- Stable
state','HorizontalAlignment','left');
%% (c) critical clearing angle
delo = degtorad(delo);
% initial load angle in rad
delm = pi - asin(1/1.75); % angle of max swing
c1 = ((delm-delo)-(1.05*cos(delo))+(1.75*cos(delm)))/(1.75-1.05);
cclang = acos(c1);
% critical clearing angle in rad
cclang = radtodeg(cclang);
% critical clearing angle in degree
cclang = int16(cclang);
% converting to integer
fprintf('\n\n\t\t Critical Clearing angle is %d degree ',cclang);
RESULT:

Dept. of EEE, SVCE

Page 25

M.Tech, PS

Power System Simulation Lab-1

STABILITY ANALYSIS: SINGLE MACHINE CONNECTED TO AN INFINITE


BUS SYSTEM
Exp. No: 10
Date:
AIM :
To become familiar with various aspects of the transient and small signal stability
analysis of Single-Machine-Infinite Bus (SMIB) system
SOFTWARE REQUIRED: MATLAB
THEORY:
Stability:

Stability problem is concerned with the behavior of power system when it is


subjected to disturbance and is classified into small signal stability problem if the
disturbances are small and transient stability problem when the disturbances are large.
Transient stability:

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

When a power system is under steady state, normal operating condition, the system
may be subjected to small disturbances such as variation in load and generation, change
in field voltage, change in mechanical toque etc., the nature of system response to small
disturbance depends on the operating conditions, the transmission system strength,
types of controllers etc. Instability that may result from small disturbance may be of two
forms,
(i)
Steady increase in rotor angle due to lack of synchronizing torque.
(ii)
Rotor oscillations of increasing magnitude due to lack of sufficient damping
torque.
PROCEDURE:
1. Enter the command window of the MATLAB.
2. Create a new M file by selecting File - New M File
3. Type and save the program.
4. Execute the program by either pressing Tools Run
5. View the results.

Dept. of EEE, SVCE

Page 26

M.Tech, PS

Power System Simulation Lab-1

ALGORITHM:

PROGRAM
%transient small signal stability%
%clc
%clear all
E=1.35;
V=1.0;
H=9.94;
X=0.65;
Pm=0.6;
D=0.138;
fo=60;
Pmax=E*V/X;
do=(asin(Pm/Pmax));
Ps=Pmax*cos(do);
Wn=sqrt(3.14*60/(H*Ps));
Z=D/2*sqrt(3.14*60/(H*Ps));
Wd=Wn*sqrt(1-Z^2);
fd=Wd/(2*3.14);
tan=1/(Z*Wn);
th=acos(Z);
Ddo=10*3.14/180;
t=0:0.01:3;
Dd=Ddo/sqrt(1-Z^2)*exp(-Z*Wn*t).*sin(Wd*t+th);
d=(do+Dd)*(180/3.14);
Dw=Wn*Ddo/sqrt(1-Z^2)*exp(-Z*Wn*t).*sin(Wd*t);
f=fo+Dw/(2*3.14);
subplot(2,1,1)
plot(t,d);
grid
title('variation of rotor angle')

Dept. of EEE, SVCE

Page 27

M.Tech, PS

Power System Simulation Lab-1

xlabel('tsec')
ylabel('delta degree')
subplot(2,1,2)
plot(t,f)
grid
xlabel('tsec')
ylabel('frequency as hertz')
title('variation of generator frequency')

OUTPUT:

RESULT:

Dept. of EEE, SVCE

Page 28

M.Tech, PS

Power System Simulation Lab-1

SOLUTION OF ECONOMIC DISPATCH PROBLEM IN POWER SYSTEMS


Exp. No.:

11

Date:

PROBLEM:
The fuel cost functions for three thermal plants 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. The total load PD is 800MW. Neglecting line losses and
generator limits, find the optimal dispatch and the total cost in $/h.
AIM:

To develop a program for solving economic dispatch problem without


transmission losses for a given load condition using direct method and Lambda-iteration
method.
TOOL BAR: MATLAB
THEORY:
A modern power system is invariably fed from a number of power plants.
Research and development has led to efficient power plant equipment. A generating unit
added to the system today is likely to be more efficient than the one added some time
back. With a very large number of generating units at hand, it is the job of the operating
engineers to allocate the loads between the units such that the operating costs are to be
minimum. The optimal load allocation is by considering a system with any number of
units. The loads should be so allocated among the different units that every unit
operates at the same incremental cost. This criterion can be developed mathematically
by the method of Lagrangian multiplier.
Statement of Economic Dispatch Problem (EDP)
In a power system, with negligible transmission loss and with N number of
spinning thermal generating units the total system load PD at a particular interval can be
met by different sets of generation schedules.
{PG1(k), PG2(k), ..................PGN(K)}; k = 1,2,........NS
Out of these NS set of generation schedules, the system operator has to choose the set
of schedules, which minimize the system operating cost, which is essentially the sum of
the production cost of all the generating units. This economic dispatch problem is
mathematically stated as an optimization problem.
The number of available generating units N, their production cost functions, their
operating limits and the system load PD.
To determine the set of generation schedules PG,
N
Min FT =Fi (PGi)
i=1

Dept. of EEE, SVCE

.(1)

Page 29

M.Tech, PS

Power System Simulation Lab-1

N
= PGi PD = 0
i=1

..(2)

PGi min PGi PGi max

..(3)

The units production cost function is usually approximated by quadratic function


Fi (PGi) = ai PGi2+ bi PGi+ ci ; i= 1,2,.......N
..(4)
where ai, bi and ci are constants
Necessary conditions for the existence of solution to EDP
The ED problem given by the equations (1) to (4). By omitting the inequality constraints,
the reduced ED problem may be restated as an unconstrained optimization problem by
augmenting the objective function with the constraint multiplied by Lagrange
multiplier, to obtained the Lagrange function, L as
N
N
Min L (PG1........PGN, ) = Fi(PGi) - [PGi PD]
(5)
i=1
i=1
The necessary conditions for the existence of solution to (6) are given by
L / PGi= 0 = dFi(PGi) / dPGi - ; i = 1, 2,........N
N
L / = 0 = PGi PD
i=1

....(6)
.(7)

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


conditions (6) and (7) which state that the economic generation schedules not only
satisfy the system power balance equation (8) but also demand that the incremental
cost rates of all the units be equal be equal to which can be interpreted as incremental
cost of received power.
When the inequality constraints (3) are included in the ED problem the necessary
condition (6) gets modified as
dFi (PGi) / dPGi = for PGi min PGi PGi max
for PGi = PGi max
for PGi = PGi min

..(8)

Methods of solution for EDP without transmission losses:


The solution to the ED problem with the production cost function assumed to be a
quadratic function, equation (4), can be obtained by simultaneously solving (6) and (7)
using a direct method as given below,
Economic Schedule
dFi (PGi) / dPGi = 2 ai PGi + bi =

Dept. of EEE, SVCE

; i = 1,2, ........ N

(9)

Page 30

M.Tech, PS

Power System Simulation Lab-1

From Equation (9) we obtain


PGi = ( bi ) / 2ai ;

i=1,2.........N

.(10)

Substituting Equation (10) in Equation (7) we obtain


N
( - bi) / 2ai = PD
i=1
N
N
(1/2ai) = (b1/2ai)
i=1
i=1
N
N
= [PD + ( bi/2ai )] / [(1/2ai) ]
i=1
i=1

(11)

Algorithm for EDP without transmission loss:


The method of solution involves computing Lagrangian multiplier () using equation (11)
and then computing the economic schedules P Gi ; i=1,2,........N using equation (10). In
order to satisfy the operating limits (3) the following iterative algorithm is to be used.
Step 1: Compute using Equation (11).
Step 2: Compute using Equation (10) the economic schedules
PGi; i = 1,2,........N
Step 3: If the computed PGi satisfy the operating limits
PGi min PGi PGi max
;
i = 1,2,.........N
Then stop, the solution is reached. Otherwise proceed to Step 4
Step 4: Fix the schedule of the NV number of violating units whose generation PGi
violates the operating limits (12) at the respective limit, either
PGi max or PGi min
Step 5: Distribute the remaining system load PD minus the sum of the fixed
generation schedules to the remaining units numbering NR (= N-NV) by
computing using Equation (11) and the PGi ; iNR using equation (10)
where NR is the set of remaining units.
Step 6: Check whether optimality condition (8) is satisfied. If yes, stop the solution
Otherwise, release the generation schedule fixed at PGi max or PGi min of
those generators not satisfying optimality condition (8), include these units
in the remaining units, modify the sets NV, NR and the remaining load.
Go to Step 5.

Dept. of EEE, SVCE

Page 31

M.Tech, PS

Power System Simulation Lab-1

PROGRAM
clc
clear all
disp=('input data')
alpha=input('enter the alpha value in cost function: ')
beta=input('enter the beta value in cost function:')
Pd=input('enter the total load in mw:')
gamma=input('enter the gamma value in cost function:')
delp=10;
lamda=input('enter the estimated value of lamda:')
disp=('output')
disp=(['lamda p1 p2 p3 grad del lamda'])
iter=0;
while abs(delp)>=0.001
iter=iter+1;
p=((lamda-beta)./(2*gamma)); delp=Pd-sum(p);
j=sum(ones(length(gamma),1)./(2*gamma));
dellamda=delp/j;
disp=([lamda,p(1),p(2),p(3),delp,j,dellamda])
lamda=lamda+dellamda;
end
totalcost=sum(alpha+beta.*p+gamma.*p.^2)

OUTPUT:
disp =
input data
enter the alpha value in cost function: [500;400;200]
alpha =
500
400
200
enter the beta value in cost function:[5.3;5.5;5.8]

Dept. of EEE, SVCE

Page 32

M.Tech, PS

Power System Simulation Lab-1

beta =
5.3000
5.5000
5.8000
enter the total load in mw:800
Pd =

800

enter the gamma value in cost function:[0.004;0.006;0.009]


gamma =
0.0040
0.0060
0.0090
enter the setimated value of lamda:5
lamda =

disp =
output
disp =
lamda p1 p2 p3 grad del lamda
disp =
5.0000 -37.5000 -41.6667 -44.4444 923.6111 263.8889

3.5000

disp =
8.5000 400.0000 250.0000 150.0000

0 263.8889

totalcost =
6.6825e+003
>>
RESULT:

Dept. of EEE, SVCE

Page 33

Vous aimerez peut-être aussi