Sei sulla pagina 1di 101

INTRODUCTION TO MATLAB

Expt.No:
Date
:
OBJECTIVES
(i)

To procure sufficient knowledge in MATLAB to solve the power system


Problems.

(ii)

To write a MATLAB program.

SOFTWARE REQUIRED
(i)
1.

MATLAB

INTRODUCTION TO MATLAB

MATLAB
is a high performance language for technical computing. It integrates
computation, visualization and programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation.
MATLAB is numeric computation software for engineering and scientific calculations.
MATLAB is primary tool for matrix computations. MATLAB is being used to simulate random
process, power system, control system and communication theory.
MATLAB comprising lot of optional tool boxes and block set like control system,
optimization, and power system and so on.
1.1.

TYPICAL USES INCLUDE


Math and computation.
Algorithm development.
Modeling, simulation and prototype.
Data analysis, exploration and Visualization.
Scientific and engineering graphics.
Application development, including graphical user interface building.

MATLAB is a widely used tool in electrical engineering community. It can be used for
simple mathematical manipulation with matrices for understanding and teaching basic
mathematical and engineering concepts and even for studying and simulating actual power system
and electrical system in general. The original concept of a small and handy tool has evolved to

become an engineering work house. It is now accepted that MATLAB and its numerous tool boxes
replace and/or enhance the usage of traditional simulation tool for advanced engineering
applications.
Engineering personnel responsible for studies of electrical power system, control system
and power electronics circuits will benefit from the MATLAB. To expertise in Electrical System
Simulation one should have a basic understanding of electric circuits, power system and power
electronics.
1.2.

GETTING STARTED WITH MATLAB

To open the MATLAB applications double click the Matlab icon on the desktop. This will
open the MATLAB window space with Matlab prompt as shown in the fig.1.

Fig-1: MATLAB window space


To quit from MATLAB type
>> quit
(Or)
>>exit
To select the (default) current directory click ON the icon [] and browse for the folder
named D:\SIMULAB\xxx, where xxx represents roll number of the individual candidate in
which a folder should be created already.
When you start MATLAB you are presented with a window from which you can enter
commands interactively. Alternatively, you can put your commands in an M- file and execute it at
the MATLAB prompt. In practice you will probably do a little of both. One good approach is to
incrementally create your file of commands by first executing them.
M-files can be classified into following 2 categories,
i)

Script M-files Main file contains commands and from which


functions can also be called.
ii)
Function M-files Function file that contains function command at the
first line of the M-file.
M-files to be created by you should be placed in your default directory. The M-files
developed can be loaded into the work space by just typing the M-file name.

To load and run a M-file named ybus.m in the workspace.


>>ybus
These M-files of commands must be given the file extension of .m. However M-files are
not limited to being a series of commands that you dont want to type at the MATLAB window,
they can also be used to create user defined function. It turns out that a MATLAB tool box is
usually nothing more than a grouping of M-files that someone created to perform a special type of
analysis like control system design and power system analysis. Any of the matlab commands (eg:
sqrt) is really an M-file.
One of the more generally useful matlab tool boxes is simulink a drag and-drop dynamic
system simulation environment. This will be used extensively in laboratory, forming the heart of
the computer aided control system design (CACSD) methodology that is used.
>>simulink
At the matlab prompt type simulink and brings up the Simulink Library Browser. Each of
the items in the Simulink Library Browser are the top level of a hierarchy of palette of elements
that you can add to a simulink model of your own creation. At this time expand the simulink
pallete as it contains the majority of the elements you will use in this course. Simulink has built
into it a variety of integration algorithm for integrating the dynamic equations. You can place the
dynamic equations of your system into simulink in four ways.
1 Using integrators
2. Using transfer functions.
3. Using state space equations.
4. Using S- functions (the most versatile approach)
Once you have the dynamics in place you can apply inputs from the sources palettes and
look at the results in the sinks palette.
Finally the most important MATLAB features are its help. At the MATLAB Prompt
simply typing helpdesk gives you access to searchable help as well as all the MATLAB manuals.
>>helpdesk
To get the details about the command name sqrt, just type
>>help sqrt
Where sqrt is the command name and you will get pretty good description in the MATLAB
window as follows.
/SQRT Square root.
SQRT(X) is the square root of the elements of X. Complex
results are produced if X is not positive.
See also SQRTM.

Overloaded methods
help sym/sqrt.m
1.3

MATLAB WORKSPACE
The workspace is the window where you execute MATLAB commands (Ref. figure-1). The
best way to probe the workspace is to type whos. This command shows you all the variables that
are currently in workspace. You should always change working directory to an appropriate
location under your user name.
Another useful workspace-like command is
>>clear all
It eliminates all the variables in your workspace. For example start MATLAB and execute
the following sequence of commands
>>a=2;
>>b=5;
>>whos
>>clear all
The first two commands loaded the two variables a and b to the workspace and assigned
value of 2 and 5 respectively. The clear all command clear the variables available in the work
space. The arrow keys are real handy in MATLAB. When typing in long expression at the
command line, the up arrow scrolls through previous commands and down arrow advances the
other direction. Instead of retyping a previously entered command just hit the up arrow until you
find it. If you need to change it slightly the other arrows let you position the cursor anywhere.
Finally any DOS command can be entered in MATLAB as long as it is preceded by any
exclamination mark.
>>!dir
1.4
MATLAB Data Types
The most distinguishing aspect of MATLAB is that it allows the user to manipulate vectors
(like 5+j8) and matrices with the same ease as manipulating scalars (like5,8). Before diving into
the actual commands everybody must spend a few moments reviewing the main MATLAB data
types. The three most common data types you may see are,
1) arrays 2) strings 3) structures.
As for as MATLAB is concerned a scalar is also a 1 x 1 array. For example clear your
workspace and execute the commands.
>>a=4.2:
>>A=[1 4;6 3];
>>whos

Two things should be evident. First MATLAB distinguishes the case of a variable name
and that both a and A are considered arrays. Now lets look at the content of A and a.
>>a
>>A
Again two things are important from this example. First anybody can examine the
contents of any variables simply by typing its name at the MATLAB prompt. Second, when typing
in a matrix space between elements separate columns, whereas semicolon separate rows. For
practice create the matrix in your workspace by typing it in all the MATLAB prompt.
>>B= [3 0 -1; 4 4 2;7 2 11];
(use semicolon(;) to represent the end of a row)
>>B
Arrays can be constructed automatically. For instance to create a time vector where the
time points start at 0 seconds and go up to 5 seconds by increments of 0.001
>>mytime =0:0.001:5;
Automatic construction of arrays of all ones can also be created as follows,
>>myone=ones (3,2)
Note:
Any MATLAB command can be terminated by a semicolon, which suppressed any
echo information to the screen.
1.5

Scalar versus Array Mathematical Operation


Since MATLAB treats everything as an array, you can add matrices as easily as

scalars.
Example:
>>clear all
>> a=4;
>> A=7;
>>alpha=a+A;
>>b= [1 2; 3 4];
>>B= [6 5; 3 1];
>>beta=b+B
Of course cannot violate the rules of matrix algebra which can be understood from the following
example.
>>clear all
>>b=[1 2;3 4];
>>B=[6 7];
>>beta=b*B
In contrast to matrix algebra rules, the need may arise to divide, multiply, raise to a
power one vector by another, element by element. The typical scalar commands are used for this

+,-,/, *, ^ except you put a . in front of the scalar command. That is, if you need to multiply the
elements of [1 2 3 4] by [6 7 8 9], just type...
>>[1 2 3 4].*[6 7 8 9]
1.6

Conditional Statements

Like most Programming languages, MATLAB supports a variety of conditional statements


and looping statements. To explore these simply type
>>help if
>>help for
>>help while
Example :
>>if z=0
>>y=0
>>else
>>y=1/z
>>end
Looping :

1.7

>>for n=1:2:10
>>s=s+n^2
>>end
- Yields the sum of 1^2+3^2+5^2+7^2+9^2
PLOTTING

MATLABs potential in visualizing data is pretty amazing. One of the nice features is that
with the simplest of commands you can have quite a bit of capability.
Graphs can be plotted and can be saved in different formulas.
>>clear all
>>t=0:10:360;
>>y=sin (pi/180 * t);
To see a plot of y versus t simply type,
>>plot(t,y)
To add label, legend, grid and title use
>>xlabel (Time in sec);
>>ylabel (Voltage in volts)
>>title (Sinusoidal O/P);
>>legend (Signal);

The commands above provide the most plotting capability and represent several shortcuts
to the low-level approach to generating MATLAB plots, specifically the use of handle graphics.
The helpdesk provides access to a pdf manual on handle graphics for those really interested in it.
1.8
Functions
As mentioned earlier, a M-file can be used to store a sequence of commands or a userdefined function. The commands and functions that comprise the new function must be put in a
file whose name defines the name of the new function, with a filename extension of '.m'.A function
is a generalized input/output device. That is you can give some input.(arguments) and provides
some output. MATLAB functions allow you much capability to expand MATLABs usefulness.
We will just touch on function here as you may find them beneficial later.
We will start by looking at the help on functions :
>>help function
We will create our own function that given an input matrix returns a vector containing the
admittance matrix(y) of given impedance matrix(z)
z=[5 2 4;
1 4 5]

as input, the output would be,

y=[0.2 0.5 0.25;


1 0.25 0.2] which is the reciprocal of each elements.
To perform the same name the function admin and noted that admin must be
stored in a function M-file named admin.m. Using an editor, type the following commands and
save as admin.m.
admin.m :
function y = admin(z)
y = 1./z
return
Simply call the function admin from the workspace as follows,
>>z=[5 2 4;
1 4 5]
>>admin(z)
The output will be,
ans = 0.2 0.5 0.25
1
0.25 0.2
Otherwise the same function can be called for any times from any script file provided the function
M-file is available in the current directory.
With this introduction anybody can start programming in MATLAB and can be
updated themselves by using various commands and functions available. Concerned with the
Power System Simulation Laboratory, initially solve the Power System Problems manually, list
the expressions used in the problem and then build your own MATLAB program or function.

RESULT:

Expt. No:

Date:

COMPUTATION OF LINE PARAMETERS USING MATLAB


AIM
To determine the positive sequence line parameters L and C per phase per kilometre
of a three phase single and double circuit transmission lines for different conductor
arrangements and to understand modeling and performance of medium lines.
SOFTWARE REQUIRED: MATLAB 7.7
THEORETICAL BACK GROUND:-

Line Parameters
Transmission line has four electrical parameters - resistance, inductance,
capacitance and conductance. The inductance and capacitance are due to the
effect of magnetic and electric fields around the conductor. The shunt
conductance characterizes the leakage current through insulators, which is
very small and can be neglected. The parameters R, L and C are essential for
the development of the transmission line models to be used in power system
analysis both during planning and operation stages.
While the resistance of the conductor is best determined from manufactures
data, the inductances and capacitances can be evaluated using formula. The
student is advised to read any other text book before taking up the
experiment.
INDUCTANCE
The inductance is computed from flux linkage per ampere. In the case of the
three phase lines, the inductance of each phase is not the same if
conductors are not spaced equilaterally. A different inductance in each
phase results in unbalanced circuit. Conductors are transposed in order to
balance the inductance of the phases and the average inductance per phase is
given by simple formulas, which depends on conductor configuration and

PROCEDURE
Enter the command window of the MATLAB.
Create a new M file by selecting File - New M File.
Type and save the program in the editor window.
Execute the program by pressing Tools Run.

View the results.

EXERCISE
1.A 500kv 3 transposed line is composed of one ACSR 1,272,000-cmil, 45/7 bittern
conductor per phase with horizontal conductor configuration as show in fig.1. The conductors
have a diameter of 1.345in and a GMR of 0.5328in. Find the inductance and capacitance per
phase per kilometer of the line and justify the result using MATLAB.
A

D12=35

D 23=35

D =70
Fig.1
2.The transmission line is replaced by two ACSR 636,000-cmil, 24/7 Rook conductors which
have the same total cross-sectional area of aluminum as one bittern conductor. The line
spacing as measured from the centre of the bundle is the same as before and is shown in fig.2.
The conductors have a diameter of 0.977in and a GMR of 0.3924in.Bundle spacing is 18in
.Find the inductance and capacitance per phase per kilometer of the line and justify the result
using MATLAB.
18 A

B
D12=35

C
D 23=35

D13=70
Fig.2

3.A 345- KV double circuit three- phase transposed line is composed of two ACSR,
1,431,000-cmil, 45/7 Bobolink conductors per phase with vertical conductor configuration as
shown in fig.3. The conductors have a diameter of 1.427in and a GMR of 0.564 in .the
bundle spacing in 18in. find the inductance and capacitance per phase per kilometer of the
line and justify the result using MATLAB.
a

S11=11m
c H12 = 7m

S22=16.5m

H12 = 6.5m
c

S33=12.5m

Fig.3

PROGRAM 1:
Dab= input('Enter Dab value);
Dbc= input('Enter Dbc value);
Dca= input('Enter Dac value);
GMD=(Dab*Dbc*Dca)^(1/3);
GMRL= input('Enter GMRL(GMR) Value in ft (inch/12): ');
disp('Value of L in mH/KM:);
L = 0.2*log(GMD/GMRL)
dia= input('Enter conductor diameter in in);
r=dia/2; GMRC=r/12;
disp('Value of C in F/KM:);
C = 0.0556/log(GMD/GMRC)

PROGRAM 2:
Dab= input('Enter Dab value:);
Dbc= input('Enter Dbc value:);
Dca= input('Enter Dac value:);
GMD=(Dab*Dbc*Dca)^(1/3);
dia=input('Enter conductor diameter in in);
r=dia/2;
d=input('Enter Bundle Spacing in inch);
Ds=input('Enter GMR(Ds) in inch);
GMRL=(sqrt(d*Ds))/12;
GMRC=(sqrt(d*r))/12;
disp('Value of L in mH/KM:);
L = 0.2*log(GMD/GMRL)
disp('Value of C in F/KM:);
C = 0.0556/log(GMD/GMRC)

PROGRAM 3 :
S = input('Enter row vector [S11, S22, S33] = ');
H = input('Enter row vector [H12, H23] = ');
d = input('Bundle spacing in inch = ');
dia = input('Conductor diameter in inch = '); r=dia/2;
Ds = input('Geometric Mean Radius in inch = ');
S11 = S(1); S22 = S(2); S33 = S(3); H12 = H(1); H23 = H(2);
a1 = -S11/2 + j*H12;
b1 = -S22/2 + j*0;
c1 = -S33/2 - j*H23;
a2 = S11/2 + j*H12;
b2 = S22/2 + j*0;
c2 = S33/2 - j*H23;
Da1b1 = abs(a1 - b1); Da1b2 = abs(a1 - b2);
Da1c1 = abs(a1 - c1); Da1c2 = abs(a1 - c2);
Db1c1 = abs(b1 - c1); Db1c2 = abs(b1 - c2);
Da2b1 = abs(a2 - b1); Da2b2 = abs(a2 - b2);
Da2c1 = abs(a2 - c1); Da2c2 = abs(a2 - c2);
Db2c1 = abs(b2 - c1); Db2c2 = abs(b2 - c2);
Da1a2 = abs(a1 - a2);
Db1b2 = abs(b1 - b2);
Dc1c2 = abs(c1 - c2);
DAB=(Da1b1*Da1b2* Da2b1*Da2b2)^0.25;
DBC=(Db1c1*Db1c2*Db2c1*Db2c2)^.25;
DCA=(Da1c1*Da1c2*Da2c1*Da2c2)^.25;
GMD=(DAB*DBC*DCA)^(1/3)
Ds = 2.54*Ds/100; r = 2.54*r/100; d = 2.54*d/100;
Dsb = (d*Ds)^(1/2); rb = (d*r)^(1/2);
DSA=sqrt(Dsb*Da1a2); rA = sqrt(rb*Da1a2);
DSB=sqrt(Dsb*Db1b2); rB = sqrt(rb*Db1b2);
DSC=sqrt(Dsb*Dc1c2); rC = sqrt(rb*Dc1c2);
GMRL=(DSA*DSB*DSC)^(1/3)
GMRC = (rA*rB*rC)^(1/3)
L=0.2*log(GMD/GMRL)
% mH/km
C = 0.0556/log(GMD/GMRC) % micro F/km

MANUAL SOLUTION:

(PROBLEM-1)

MANUAL SOLUTION: (PROBLEM-2)

MANUAL SOLUTION:

(PROBLEM-3)

RESULT
Thus the positive sequence line parameters L and C per phase per kilometre of a three
phase single and double circuit transmission lines for different conductor arrangements were
determined and verified with MATLAB software.
The value of L and C obtained from MATLAB program are:
Case1: L=
C=
Case2: L=

C=

Case3: L=

C=

Expt. No:

Date:

MODELING OF TRANSMISSION LINES


AIM
To understand modeling and performance of Short, Medium and Long transmission
lines.
SOFTWARE REQUIRED: MATLAB 7.7
THEORY
The important considerations in the design and operation of a transmission line are the
determination of voltage drop, line losses and efficiency of transmission. These values are
greatly influenced by the line constants R, L and C of the transmission line. For instance, the
voltage drop in the line depends upon the values of above three line constants. Similarly, the
resistance of transmission line conductors is the most important cause of power loss in the line
and determines the transmission efficiency.
A transmission line has three constants R, L and C distributed uniformly along the
whole length of the line. The resistance and inductance form the series impedance. The
capacitance existing between conductors for 1-phase line or from a conductor to neutral for a 3phase line forms a shunt path throughout the length of the line.
Short Transmission Line:
When the length of an overhead transmission line is upto about 50km and the line
voltage is comparatively low (< 20 kV), it is usually considered as a short transmission line.
Medium Transmission Lines:
When the length of an overhead transmission line is about 50-150 km and the line
voltage is moderatly high (>20 kV < 100 kV), it is considered as a medium transmission line.
Long Transmission Lines:
When the length of an overhead transmission line is more than 150km and line voltage
is very high (> 100 kV), it is considered as a long transmission line.
Voltage Regulation:

The difference in voltage at the receiving end of a transmission line between conditions of
no load and full load is called voltage regulation and is expressed as a percentage of the receiving
end voltage.

Performance of Single Phase Short Transmission Lines


As stated earlier, the effects of line capacitance are neglected for a short transmission line.
Therefore, while studying the performance of such a line, only resistance and inductance of
the line are taken into account. The equivalent circuit of a single phase short transmission line
is shown in Fig. (i).Here, the total line resistance and inductance are shown as concentrated
or lumped instead of being distributed. The circuit is a simple a.c. series circuit.
Let I = load current
R = loop resistance i.e., resistance of both conductors
XL = loop reactance
VR = receiving end voltage
cos R = receiving end power factor (lagging)
VS = sending end voltage
cos S = sending end power factor

The phasor diagram of the line for lagging load power factor is shown in Fig. (ii). From the
right angled traingle ODC, we get,
2

(OC) = (OD)2 + (DC)


2

VS = (OE + ED)2 + (DB + BC)


2

= (VR cos R + IR) + (VR sinR + IXL)

10

An approximate expression for the sending end voltage VS can be obtained as follows. Draw
perpendicular from B and C on OA produced as shown in Fig. 2. Then OC is nearly equal to
OF i.e.,

OC = OF = OA + AF = OA + AG + GF
= OA + AG + BH
VS = VR + I R cos R + I XL sin R

Medium Transmission Line


Nominal T Method
In this method, the whole line capacitance is assumed to be concentrated at the middle
point of the line and half the line resistance and reactance are lumped on its either side as
shown in Fig.1, Therefore in this arrangement, full charging current flows over half the line.

11

In Fig.1, one phase of 3-phase transmission line is shown as it is advantageous to work in


phase instead of line-to-line values.

Fig.1
Let

IR = load current per phase


R = resistance per phase
XL = inductive reactance per phase
C = capacitance per phase
cos R = receiving end power factor (lagging)
VS = sending end voltage/phase
V1 = voltage across capacitor C

The phasor diagram for the circuit is shown in Fig.2. Taking the receiving end voltage VR as
the reference phasor, we have,
Receiving end voltage, VR = VR + j 0
Load current, IR = IR (cos R - j sin R)

Fig.2

12

Nominal Method
In this method, capacitance of each conductor (i.e., line to neutral) is divided into two
halves; one half being lumped at the sending end and the other half at the receiving end as
shown in Fig.3. It is obvious that capacitance at the sending end has no effect on the line
drop. However, its charging current must be added to line current in order to obtain the total
sending end current.

Fig.3
IR = load current per phase
R = resistance per phase
XL = inductive reactance per phase
C = capacitance per phase
cos R = receiving end power factor (lagging)
VS = sending end voltage per phase
The phasor diagram for the circuit is shown in Fig.4. Taking the receiving end voltage as the
reference phasor, we have,
VR = VR + j 0
Load current, IR = IR (cos R - j sin R)

13

EXERCISE

( Short Transmission Line)

A 220- KV, 3 transmission line is 40 km long. The resistance per phase is 0.15 per km
and the inductance per phase is 1.3623 mH per km. The shunt capacitance is negligible. Use
the short line model to find the voltage and power at the sending end and the voltage
regulation and efficiency when the line supplying a three phase load of
a) 381 MVA at 0.8 power factor lagging at 220 KV.
b) 381 MVA at 0.8 power factor leading at 220 KV.

PROGRAM (Short Transmission Line)


VRLL=220;
VR=VRLL/sqrt(3);
Z=[0.15+j*2*pi*60*1.3263e-3]*40;
disp=('(a)For 0.8 power factor lagging')
SR=304.8+j*228.6;
IR=conj(SR)/(3*conj(VR));
IS=IR;
VS=VR+Z*IR;
VSLL=sqrt(3)*abs(VS)
SS=3*VS*conj(IS)
REG=((VSLL-VRLL)/(VRLL))*10
EFF=(real(SR)/real(SS))*100
disp=('(b)For 0.8 power factor leading')
SR=304.8-j*228.6;
IR=conj(SR)/(3*conj(VR));
IS=IR;
VS=VR+Z*IR;
VSLL=sqrt(3)*abs(VS)
SS=3*VS*conj(IS)
REG=((VSLL-VRLL)/(VRLL))*100
EFF=(real(SR)/real(SS))*100

MANUAL SOLUTION: (Short transmission line)

14

15

Exercise : (Medium Transmission Line)


A three phase overhead line 200km long R = 0.16 ohm/km and Conductor diameter of 2cm with spacing 4, 5, 6 m
transposed. Find A, B, C, D constants, sending end voltage, current, power factor and power when the line is
delivering full load of 50MW at 132kV, 0.8 pf lagging, transmission efficiency, receiving end voltage and regulation.

PROGRAM (Medium Transmission Line)


clc
clear all
z=[];
z=input('Enter the length of line(km),Receiving voltage(v),Power(W),Powerfactor,L,R&C(per phase per km)');
l=z(1);vr=z(2);p=z(3);pf=z(4);L=z(5);R=z(6);c=z(7);
z=32+i*81;
y=i*0.00056;
disp('Medium Transmission line by nominal T method:')
A=1+(z*y)/2;C=y;B=z*(1+(z*y)/4);D=1+(z*y)/2;
disp('Generalized ABCD Constants are:')
disp(A);
disp(B);
disp(C);
disp(D);
ir=p/(1.732*vr*0.8)
vs=(A*vrph)+(ir*B);
fprintf('Sending end voltage Vs is %f\n',vs);
is=(vrph*C)+(D*ir);
fprintf('Sending end current Is is %f\n',is);
reg=((3*conj(vs)/conj(A))-v)*100/v;
fprintf('Voltage Regulation is %f\n',reg);
pows=3* conj(vs)* conj(is)*0.808;
eff=p*100/pows;
fprintf('Efficiency is %f\n',eff);

MANUAL SOLUTION: (Medium transmission line)

16

RESULT
Thus the program for modeling of transmission line was executed by using
MATLAB and the output was verified with theoretical calculation.
The value of the voltage regulation and efficiency obtained from the MATLAB
program are

SHORT TRANSMISSION LINE


FOR LAGGING PF:

FOR LEADING PF:

Voltage regulation REG =


Efficiency

EFF =

Voltage regulation REG =


Efficiency

EFF =

MEDIUM TRANSMISSION LINE


Voltage regulation REG =

Efficiency

EFF =

18

Expt. No:

Date:

FORMATION OF BUS ADMITTANCE & BUS IMPEDANCE


MATRIX USING MATLAB
AIM
To determine the bus admittance & bus impedance matrix for the given power
system Network.
SOFTWARE REQUIRED: MATLAB 7
OBJECTIVES
To determine the bus admittance and impedance matrices for the given
power system network.
To obtain network solution using these matrices.
To obtain certain specified columns of the bus impedance matrix Z
or the full matrix Z using the factors of Y or the inverse of Y.
SOFTWARE REQUIRED
MATLAB.
THEORETICAL BACKGROUND
Network Description of a Multimode Power System
The bus admittance matrix Y and bus impedance matrix Z are the two
important network descriptions of interconnected power system. The
injected bus currents and bus voltages of a power system under steady
state condition can be related through these matrices as
Y V= I
Z I =V

19

MANUAL CALCULATION:(Problem-1)-YBUS MATRIX

22

MANUAL CALCULATION:(Problem-2)-Z BUS MATRIX

EXERCISE 3:
Determine Z bus matrix for the power system network shown in fig using
Bus building algorithm

MATLAB CODE:

clc
clear all
close all
g=[1.2 0.2 0.15 1.5 0.3];
z1=[g(1)];
disp(z1);
disp('TYPE I MODIFICATION')
z2=[g(1) g(1)
g(1) g(1)+g(2)];
disp(z2);
disp('TYPE II MODIFICATION')
z3=[g(1) g(1) g(1)
g(1) g(1)+g(2) g(1)+g(2)
g(1) g(1)+g(2) g(1)+g(2)+g(3)];
disp(z3);
disp('TYPE III MODIFICATION')
z4=[g(1) g(1) g(1) g(1)
g(1) g(1)+g(2) g(1)+g(2) g(1)+g(2)
g(1) g(1)+g(2) g(1)+g(2)+g(3) g(1)+g(2)+g(3)
g(1) g(1)+g(2) g(1)+g(2)+g(3) g(1)+g(2)+g(3)+g(4)]
z4=[z4];
disp(z4);
disp('Actual Zbus matrix is:')
n=4;
for i=1:1:n
for j=1:1:n
z4(i,j)=z4(i,j)-(z4(i,n)*z4(n,j)/z4(n,n));
end
end

29

z4(:,4)=[];
z4(4,:)=[];
disp(z4);
disp('TYPE IV MODIFICATION MATRIX')
l=4;
p=2;q=4;
for i=1:l-1
z4(l,i)=z4(p-1,i)-z4(q-1,i);
z4(i,l)=z4(l,i);
end
z4(l,l)=g(5)+z4(1,1)+z4(3,3)-2*z4(1,3);
disp(z4);
n=4;
for i=1:1:n
for j=1:1:n
z4(i,j)=z4(i,j)-(z4(i,n)*z4(n,j)/z4(n,n));
end
end
z4(:,4)=[];
z4(4,:)=[];
disp('THE REQUIRED ZBUS MATRIX IS:');
ZBUS=z4*1i;
disp(ZBUS);

MANUAL CALCULATION:(Problem-3)- Z BUS MATRIX-Building Algorithm

30

RESULT

31

Figure shows the one line diagram of a simple three-bus power system with generators at buses 1 and
3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04
pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from
bus 2. Line impedances are marked in per unit on a 100 MVA base and the line charging susceptances
are neglected. Obtain the power flow solution by the Gauss- Seidal method including line flows and
line losses. Verify the results using available program.

PROGRAM:

y12=10-j*20;
y13=10-j*30;
y23=16-j*32;
y33=y13+y23;
V1=1.05+j*0;
format long
iter =0;
S2=-4.0-j*2.5;
P3 = 2;
V2=1+j*0;
Vm3=1.04;
V3=1.04+j*0;
for I=1:10;
iter=iter+1
E2 = V2;
E3=V3;
V2 = (conj(S2)/conj(V2)+y12*V1+y23*V3)/(y12+y23)
DV2 = V2-E2
Q3 = -imag(conj(V3)*(y33*V3-y13*V1-y23*V2))
S3 = P3 +j*Q3;
Vc3 = (conj(S3)/conj(V3)+y13*V1+y23*V2)/(y13+y23)
Vi3 = imag(Vc3);
Vr3= sqrt(Vm3^2 - Vi3^2);
V3 = Vr3 + j*Vi3
DV3=V3-E3
end
format short
I12=y12*(V1-V2); I21=-I12;
I13=y13*(V1-V3); I31=-I13;
I23=y23*(V2-V3); I32=-I23;
S12=V1*conj(I12); S21=V2*conj(I21);
S13=V1*conj(I13); S31=V3*conj(I31);
S23=V2*conj(I23); S32=V3*conj(I32);
I1221=[I12,I21]
I1331=[I13,I31]
I2332=[I23,I32]
S1221=[S12, S21 (S12+S13) S12+S21]
S1331=[S13, S31 (S31+S32) S13+S31]
S2332=[S23, S32 (S23+S21) S23+S32]

Expt. No:

Date:

LOAD FLOW ANALYSIS BY GAUSS SEIDAL METHOD USING MATLAB


AIM
To carry out load flow analysis of the given power system network by Gauss Seidal
method.
SOFTWARE REQUIRED: MATLAB 7.7
THEORY
Load flow analysis is the study conducted to determine the steady state operating
condition of the given system under given conditions. A large number of numerical
algorithms have been developed and gauss seidal method is one of such algorithm.
PROBLEM FORMULATION
The performance equation of the power system may be written of
[I bus]=[Y bus][V bus]
Selecting one of the buses as the reference bus, we get (n-1) simultaneous equations.
The bus loading equations can be written as
Ii = Pi-jQi / Vi*
(i=1,2,3,..n)
Where,
n
Pi=Re [ Vi*Yik Vk.]
K=1
n
Qi= -Im [ Vi*Yik Vk].
k=1
The bus voltage can be written in form of
n
Vi=(1.0/Yii)[Ii- Yij Vj]
J=1
ji(i=1,2,n)& i slack bus
Substituting Ii in the expression for Vi, we get
n
new
o
o
Vi
=(1.0/Yii)[Pi-JQi / Vi * - Yij Vi ]
J=1

(1)
(2)
(3)
(4)

(5)

(6)

The latest available voltages are used in the above expression,we get
Vi

new

=(1.0/Yii)[Pi-JQi / Vi * - YijVj
J=1

- Yij Vi ]

(7)

j=i+1

32

The above equation is the required formula .this equation can be solved for voltages in
interactive manner. During each iteration, we compute all the bus voltage and check for
convergence is carried out by comparison with the voltages obtained at the end of previous
iteration. After the solutions is obtained. The stack bus real and reactive powers, the reactive
power generation at other generator buses and line flows can be calculated.
ALGORITHM
Step1:Read the data such as line data, specified power ,specified voltages, Q limits at the
generator buses and tolerance for convergences
Step2: Compute Y-bus matrix.
Step3: Initialize all the bus voltages.
Step4: Iter=1
Step5: Consider i=2, where i is the bus number.
Step6:check whether this is PV bus or PQ bus . if it is PQ bus goto step 8 otherwise go to
next step.
Step7: Compute Qi check for q limit violation. QGi=Qi+QLi.
7).a).If QGi>Qi max ,equate QGi = Qimax. Then convert it into PQ bus.
7).b).If QGi<Qi min, equate QGi = Qi min. Then convert it into PQ bus.
Step8: Calculate the new value of the bus voltage using gauss seidal formula.
i=1

Vi=(1.0/Yii) [(Pi-j Qi)/vi0*- Yij Vj- YijVj ]


J=1

J=i+1

Adjust voltage magnitude of the bus to specify magnitude if Q limits are not violated.
Step9: If all buses are considered go to step 10 otherwise increments the bus no. i=i+1 and
Go to step6.
Step10: Check for convergence. If there is no convergence goes to step 11 otherwise go to
step12.
Step11: Update the bus voltage using the formula.
Vi

new

=Vi

old

+ (vi

new

-Vi

old

) (i=1,2,..n) i slackbus , is the acceleration factor=1.4

Step12: Calculate the slack bus power, Q at P-V buses real and reactive give flows real and
reactance line losses and print all the results including all the bus voltages and all the
bus angles.
Step13: Stop.

33

FLOW CHART:

FLOW CHART FOR GAUSS SEIDAL METHOD


PROCEDURE
Enter the command window of the MATLAB.
Create a new M file by selecting File - New M File.
Type and save the program in the editor Window.
Execute the program by pressing Tools Run.
View the results.

34

MANUAL CALCULATION

35

39

RESULT

A program has been developed using MATLAB for the given power system by Gauss
Seidal method and the results are verified with model calculation.

EXERCISE
Figure shows the one line diagram of a simple three-bus power system with generators at buses 1 and
3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04
pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from
bus 2. Line impedances are marked in per unit on a 100 MVA base and the line charging susceptances
are neglected. Obtain the power flow solution by the Newton Raphson method including line flows &
line losses. Verify the results using available program.

MATLAB CODE:
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));

Expt. No:

Date:

LOAD FLOW ANALYSIS BY NEWTON RAPSHON METHOD USING MATLAB


AIM
To carry out load flow analysis of the given power system by Newton Raphson
method.
SOFTWARE REQUIRED: MATLAB 7.7
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.

where, ep = Real part of


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

ALGORITHM
Step1: Input the total number of buses. Input the details of series line impendence and line
charging admittance to calculate the Y-bus matrix.
Step2: Assume all bus voltage as 1 per unit except slack bus.
Step3: Set the iteration count as k=0 and bus count as p=1.
Step4: Calculate the real and reactive power pp and qp using the formula
P=vpqYpq*cos(Qpq+p-q)
Qp=VpqYpa*sin(qpq+p-a)
Evalute pp*=psp-pp*
Step5: If the bus is generator (PV) bus, check the value of Qp*is within the limits.If it
violates

40

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))

MANUAL SOLUTION:

the limits, then equate the violated limit as reactive power and treat it as PQ bus. If limit is
not violated then calculate,
|vp|^r=|vgp|^rspe-|vp|r
Qp*=qsp-qp*
Step6: Advance bus count by 1 and check if all the buses have been accounted if not go to step5.
Step7: Calculate the elements of Jacobean matrix.
Step8: Calculate new bus voltage increment pk and fpk
Step9: Calculate new bus voltage ep*h+ ep*
Fp^k+1=fpK+fpK
Step10: Advance iteration count by 1 and go to step3.
Step11: Evaluate bus voltage and power flows through the line .
PROCEDURE
Enter the command window of the MATLAB.
Create a new M file by selecting File - New M File.
Type and save the program in the editor Window.
Execute the program by pressing Tools Run.
View the results.

41

42

RESULT
A program has been developed using MATLAB for the given power system by Newton
Raphson method and the results are verified with model calculation

49

EXERCISE
Figure shows the one line diagram of a simple three-bus power system with generators at buses 1 and
3. The magnitude of voltage at bus 1 is adjusted to 1.05 pu. Voltage magnitude at bus 3 is fixed at 1.04
pu with a real power generation of 200 MW. A load consisting of 400 MW and 250 Mvar is taken from
bus 2. Line impedances are marked in per unit on a 100 MVA base and the line charging susceptances
are neglected. Obtain the power flow solution by the Fast decoupled method including line flows and
line losses. Verify the results using available program.

PROGRAM:
V1= 1.05; V2 = 1.0; V3 = 1.04;
d1 = 0; d2 = 0; d3=0;
Ps2=-4; Ps3 =2.0;
Qs2= -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);
B =[-52 32; 32 -62]
Binv = inv(B)
iter=0;
pwracur = 0.0003; % Power accuracy
DC = 10;
% Set the max of power mismatch to a high value
while max(abs(DC)) > pwracur
iter = iter +1;
P2= V2*V1*Y(2,1)*cos(t(2,1)-d2+d1)+V2^2*Y(2,2)*cos(t(2,2))+ ...
V2*V3*Y(2,3)*cos(t(2,3)-d2+d3);
P3= V3*V1*Y(3,1)*cos(t(3,1)-d3+d1)+V3^2*Y(3,3)*cos(t(3,3))+ ...
V3*V2*Y(3,2)*cos(t(3,2)-d3+d2);
Q2=-V2*V1*Y(2,1)*sin(t(2,1)-d2+d1)-V2^2*Y(2,2)*sin(t(2,2))- ...
V2*V3*Y(2,3)*sin(t(2,3)-d2+d3);
DP2 = Ps2 - P2; DP2V = DP2/V2;
DP3 = Ps3 - P3; DP3V = DP3/V3;
DQ2 = Qs2 - Q2; DQ2V = DQ2/V2;
DC =[DP2; DP3; DQ2];
Dd = -Binv*[DP2V;DP3V];
DV = -1/B(1,1)*DQ2V;

Expt. No:

Date:

LOAD FLOW ANALYSIS BY FAST DECOUPLED METHOD USING MATLAB


AIM
To carry out load flow analysis of the given power system by Fast Decoupled method.

SOFTWARE REQUIRED: MATLAB 7.7


THEORY
Due to the weak coupling between PV and q- half of the elements of jacobian matrix
are neglected further the assumptions made are
Cos ij = 1
Sin ij = 0
Qi << Bij
2
|V|
The simplified FDLF equations are
(P / |V|) = [B][ ]
(Q / |V|) = [B][
|V|]
One iteration implies one solution for [] to update [] and one solution for [P/|V|] to
update [|V|] and is termed as 1- and 1-V iteration. The convergence for the real and reactive
power is achieved when max [P] < P; max [Q]<=Q.
The main advantage of the decoupled load flow as compared to Newton Raphson method is
its reduced memory is storing Jacobian.
ALGORITHM
Step1: Input the total number of buses.
Step2: Input the Y-bus matrix of order n X n.
Step3: Assume all the bus voltages are 1 pu except slack bus.
Step4: Form susceptance matrix B and B.
Step5: Set the iteration count as K=0.
Step6: Set Vs=0; rv=0.
Step7: Calculate the real and reactive power Pi using the formula
r

Pi = VpqYpq*cos(Qpq + p - q)
r

Step8: Evaluate Pi = Pispec P i .


r
Step9: Test for convergence if max ( Pi < P) then set rs = 1 and go to next step otherwise go
to step 2.
Step10: Check if rv = 1 then calculate the slack bus power and all line flows and print the result

50

d2 =d2+Dd(1);
d3 =d3+Dd(2);
V2= V2+DV;
angle2 =180/pi*d2;
angle3 =180/pi*d3;
R = [iter d2 d3 V2 DP2 DP3 DQ2];
disp(R)
end
Q3=-V3*V1*Y(3,1)*sin(t(3,1)-d3+d1)-V3^2*Y(3,3)*sin(t(3,3))- ...
V3*V2*Y(3,2)*sin(t(3,2)-d3+d2);
P1= V1^2*Y(1,1)*cos(t(1,1))+V1*V2*Y(1,2)*cos(t(1,2)-d1+d2)+ ...
V1*V3*Y(1,3)*cos(t(1,3)-d1+d3);
Q1=-V1^2*Y(1,1)*sin(t(1,1))-V1*V2*Y(1,2)*sin(t(1,2)-d1+d2)- ...
V1*V3*Y(1,3)*sin(t(1,3)-d1+d3);
S1=P1+j*Q1
Q3

otherwise go to step 13.


r

Step11: Set rv = 0 then calculate Si using (P / |V|) = [B][]


r+1

Step12: Calculate i

= i + i .

Step13: Calculate Qi using Qispec Q i .


r

Step14: Test for convergence if max (Qi )<Q then set rv = 1 and do next step otherwise go to
step 17.
Step15: Check if rs=1 then go to step 19.
Step16: Otherwise advance the iteration count by 1 and go to step 8.
r

Step17: Set rs = 0 and calculate |Vi| using (Q / |V|) = [B][ |V|]


r

Step18: Calculate |Vi| +1 = |Vi| + |Vi| and go to step 16.


Step19: Calculate slack bus power and all line flows and print the result.
PROCEDURE
Enter the command window of the MATLAB.
Create a new M file by selecting File - New M File.
Type and save the program in the editor Window.
Execute the program by pressing Tools Run.
View the results.

51

MANUAL SOLUTION:

57

RESULT
A program has been developed using MATLAB for the given power system by fast
decoupled method and the results are verified with model calculation.

60

Expt. No:

Date:

TRANSIENT AND SMALL SIGNAL STABILITY ANALYSIS OF SINGLE-MACHINE


INFINITE BUS SYSTEM
AIM

To become familiar with various aspects of the transient and small signal stability
analysis of Single-Machine-Infinite Bus (SMIB) system.
OBJECTIVES
The objectives of this experiment are:
1. To study the stability behavior of one machine connected to a large power system
subjected to a severe disturbance (3-phase short circuit)
2. To understand the principle of equal-area criterion and apply the criterion to study
the stability of one machine connected to an infinite bus
3. To determine the critical clearing angle and critical clearing time with the help of
equal-area criterion
4. To do the stability analysis using numerical solution of the swing equation.
SOFTWARE REQUIRED: MATLAB 7.7

THEORY
The tendency of a power system to develop restoring forces to compensate for the
disturbing forces to maintain the state of equilibrium is known as stability. If the forces
tending to hold the machines in synchronism with one another are sufficient to overcome the
disturbing forces, the system is said to remain stable.
The stability studies which evaluate the impact of disturbances on the behavior of
synchronous machines of the power system are of two types transient stability and steady
state stability. The transient stability studies involve the determination of whether or not
synchronism is maintained after the machine has been subjected to a severe disturbance. This
may be a sudden application of large load, a loss of generation, a loss of large load, or a fault
(short circuit) on the system. In most disturbances, oscillations are such magnitude that
linearization is not permissible and nonlinear equations must be solved to determine the
stability of the system. On the other hand, the steady-state stability is concerned with the
system subjected to small disturbances wherein the stability analysis could be done using the
linearized version of nonlinear equations. In this experiment we are concerned with the
transient stability of power systems.

61

MANUAL CALCULATION:

A method known as the equal-area criterion can be used for a quick prediction of
stability of a one- machine system connected to an infinite bus. This method is based on the
graphical interpretation of energy stored in the rotating mass as an aid to determine if the
machine maintains its stability after a disturbance. The method is applicable to a onemachine system connected to an infinite bus or a two- machine system. Because it provides
physical insight to the dynamic behavior of the machine, the application of the method to
analyze a single-machine system is considered here.
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.

RESULT:
Thus the stability analysis of single machine infinite bus system is verified using the
MATLAB program.

62

Expt. No:

Date:

LOAD FREQUENCY DYNAMICS OF SINGLE AND TWO AREA POWER SYSTEM

AIM

To obtain the frequency response and steady state frequency deviation of single and two
area power system using MATLAB.
SOFTWARE REQUIRED: MATLAB 7.7
THEORY
Active power control is one of the important control actions to be performed 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
Enter the command window of the MATLAB.
Create a new Model by selecting File - New Model.
Pick up the blocks from the Simulink library browser and form a block
diagram. After forming the block diagram, save the block diagram.
Double click the scope and view the result.

EXERCISE 1
An isolated power station has the following
parameters Turbine time constant, T = 0.5sec
Governor Time constant, g = 0.2sec
Generator inertia constant, H = 5sec

81

Governor speed regulation = R per unit


The load varies by 0.8 percent for a 1 percent change in frequency, i.e., D=0.8
(a) Use the Routh Hurwitz array to find the range of R for control system stability.
(b) Use MATLAB to obtain the root locus plot.
(c) The governor speed regulation is set to R = 0.05 per unit. The turbine rated output is 250MW at
nominal frequency of 60Hz. A sudden load change of 50 MW (PL = 0.2 per unit) occurs.
(i) Find the steady state frequency deviation in Hz.
(ii) Use MATLAB to obtain the time domain performance specifications and the frequency
deviation step response.

MANUAL SOLUTION:

82

EXERCISE 2
A two area system connected by a tie line has the following parameters on a 1000MVA common
base.
Area
Speed Regulation
Frequency sens. load
Inertia Constant
Base Power

1
R1=0.05
D1=0.6
H1=5
1000MVA

2
R2=0.0625
D2=0.9
H2=4
1000MVA

Governor Time Constant


Turbine Time Constant

g1= 0.2sec
T1=0.5sec

g2= 0.3sec
T2=0.6sec

The units are operating in parallel at the nominal frequency of 60Hz. The synchronizing power
coefficient is computed from the initial operating condition and is given to be P s = 2 p.u. A load
change of 187.5 MW occurs in area1.
(a) Determine the new steady state frequency and the change in the tie-line flow.
(b) Construct the SIMULINK block diagram and obtain the frequency deviation response for the
condition in part (a).

MANUAL SOLUTION:

83

MATLAB CODE(Single Area):


disp('Root-locus')
num = 1;
den = [1 7.08 10.56 .8];
figure (1), rlocus(num, den)
disp('Frequency deviation step response')
PL = 0.2;
numc = [0.1 0.7 1];
denc = [1 7.08 10.56 20.8];
t = 0:.02:10;
c = -PL*step(numc, denc, t);
figure(2), plot(t, c), grid
xlabel('t, sec'), ylabel('pu')
title('Frequency deviation step response')
timespec(numc, denc)

MATLAB CODE(Two Area):


R1 = 0.05; R2 = 0.0625;
D1 = 0.6; D2 = 0.9;
DPL1 = 187.5/1000;
Dw = -DPL1/(1/R1 + D1+ 1/R2+D2)
Df = Dw*60, f = 60+Df
DPm1 = -Dw/R1
DPm2 = -Dw/R2
DP12 = Dw*(1/R2 + D2)

85

RESULT

88

PROBLEM1a: (WITHOUT LOSS &no GENERATING LIMITS)


A power plant has three units with the following cost characteristics:
C1 0.004PG12 5.3P G1 500Rs/ hr
C 2 0.006PG22 5.5PG2 400Rs/ hr
C 3 0.009PG23 5.8P G3 200Rs/ hr
where PGi s are in MW. Find the scheduling for a load of 975 MW.
PROGRAM:
clc;
clear all;
n=input('Enter the number of units:');
a=zeros(n);
b=zeros(n);
c=zeros(n);
for i=1:n
fprintf('Enter the unit %g Data \n',i);
a(i)=input('Enter the value of a:');
b(i)=input('Enter the value of b:');
c(i)=input('Enter the value of c:');
end
pd=input('Enter the value of load demand:');
P=zeros(n);
sum=0; den=0;
for i=1:n
sum=sum+(b(i)/(2*a(i)));
end
for i=1:n
den=den+(1/(2*a(i)));
end
num=pd+sum;
lamda=num/den;
for i=1:n
P(i)=(lamda-b(i))/(2*a(i));
end
for i=1:n
fprintf('Optimal Generation of unit %g: %g MW\n',i,P(i));
end
fprintf('Lamda: %g \n',lamda);
for i=1:n
unitcost=a(i)*P(i)^2+b(i)*P(i)+c(i);
fprintf('Generation cost of unit %g : %g\n',i,unitcost);
end
totalcost=0;
for i=1:n
totalcost=totalcost+a(i)*P(i)^2+b(i)*P(i)+c(i);
end
fprintf('Total generation cost : %g\n', totalcost);

EXPT. NO
DATE

:
:

ECONOMIC LOAD DISPATCH IN POWER SYSTEM


AIM:
To understand the fundamentals of economic dispatch and solve the problem using classical method
without line losses.
SOFTWARE REQUIRED: MATLAB 7 & above

THEORY:
Power is allowed to vary within certain limits so as to meet a particular load demand with
minimum fuel cost. This is called the optimal power flow (OPF) problem. The OPF is used to
optimize the power flow solution of large scale power system. This is done by minimizing
selected the same distance from the centre of loads and their fuel costs are different. Also under
normal operating conditions, the generation capacity is more than the total load demand and
losses. Thus, there objective functions while maintaining an acceptable system performance in
terms of generator capability limits and the output of the compensating devices.
The simplest economic dispatch problem is the case when transmission line losses are
neglected. This is the problem model does not consider system configuration and line
impedances. In essence, the model assumes that the system is only one bus with all generation
and loads connected to it as shown in figure below.
C1

C2

P1

P2

Cn

Png

PD

(Plants connected to a common bus)

Since transmission losses are neglected, the total demand PD is the sum of all generation.
A cost function Ci is assumed to be known for each plant. The problem is to find the real power
generation for each plant such that the objective function as defined by the equation,
Ct =

ng
i =1

Ci =

n
i =1

i + i Pi + vi Pi 2

is minimum, subject to the constraint,

89

Exercise 2: (without losses and Generating Limits)

PROGRAM:
clear
clc
n=3;
demand=925;
a=[.0056 .0045 .0079];
b=[4.5 5.2 5.8];
c=[640 580 820];
Pmin=[200 250 125];
Pmax=[350 450 225];
x=0; y=0;
for i=1:n
x=x+(b(i)/(2*a(i)));
y=y+(1/(2*a(i)));
lambda=(demand+x)/y
Pgtotal=0;
for i=1:n
Pg(i)=(lambda-b(i))/(2*a(i));
Pgtotal=sum(Pg);
end
Pg
for i=1:n
if(Pmin(i)<=Pg(i)&&Pg(i)<=Pmax(i));
Pg(i);
else
if(Pg(i)<=Pmin(i))
Pg(i)=Pmin(i);
else
Pg(i)=Pmax(i);
end
end
Pgtotal=sum(Pg);
end
Pg
if Pgtotal~=demand
demandnew=demand-Pg(1)
x1=0;
y1=0;
for i=2:n
x1=x1+(b(i)/(2*a(i)));
y1=y1+(1/(2*a(i)));
end
lambdanew=(demandnew+x1)/y1
for i=2:n
Pg(i)=(lambdanew-b(i))/(2*a(i));
end
end
end
Pg

90

ng
i =1

Pi = PD

where, Ct is the total production cost, Ci is the production cost of ith plant, Pi is generation of the
ith plant, PD is the total demand and ng is the total number of despicable generating plants.
A rapid solution is obtained by the use of the gradient method (Lambda iteration).
Let f(2)= PD
Expanding the left hand side of the above equation in Taylors series about an operating point 2k
and neglecting the higher-order terms result in,

f ( ) k +
k =

df ( )
d
P k

df ( )
d

k = PD
P k

dPi
d

(or ) k =

P k
1
2vi

and therefore, k +1 = k + k
where, P k = PD

ng
i =1

Pi k

ALGORITHM:
1. Start the program.
2. Read the input data values
3. Start the iteration counter.
4. Check the test for convergence.
5. iter=iter+1
6. Calculate P,delp, J, dellambda and lambda.
7. Display the above values.
8. To find the total cost=sum(alpha+beta.*P+gamma.*P.
9. Print the value of total cost.
10. Stop the program.

91

Exercise 3: ( Losses and Generating Limits)

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

100
92

for i = 1:n
p(i) = (1 - b(i)/lambda - nb)/(2*(a(i)/lambda + bm(i,i)));
fprintf('Optimal generation of unit %g is %g MW\n',i,p(i));
end
for i = 1:n
for j = 1:n
pl = pl + p(i)*bm(i,j)*p(j);
end
end
fprintf('Power Loss is %g\n', pl);
for i=1:n
if (p(i)>pmax(i))
p(i) = pmax(i);
elseif (p(i)<pmin(i))
p(i) = pmin(i);
else
p(i) = p(i);
end
end
for i = 1:n
pg = pg + p(i);
end
delp = pd + pl - pg;
fprintf('Change in load is %g\n', delp);
for i = 1:n
deldde = deldde + (a(i) + b(i)*bm(i,i))/(2*((a(i) + lambda*bm(i,i))^2));
end
dellambda = delp/deldde;
fprintf('Change in Lambda is %g\n',dellambda);
lambda = lambda + dellambda;
if delp<1
t = 0;
end
end

101
93

MANUAL CALCULATION (Problem-1)

102
94

MANUAL SOLUTION (Problem-2):

MANUAL SOLUTION (Problem-3)

103
95

RESULT:

105
96

EXERCISE:

MATLAB CODE:

Z133 = j*0.22; Z033 = j*0.35; Zf = j*0.1;


disp('(a) Balanced three-phase fault at bus 3')
Ia3F = 1.0/(Z133+Zf)
disp('(b) Single line-to-ground fault at bus 3')
I03 = 1.0/(Z033 + 3*Zf + Z133 + Z133);
I012=[I03; I03; I03]
%sctm;
global sctm
a =cos(2*pi/3)+j*sin(2*pi/3);
sctm = [1 1 1; 1 a^2 a; 1 a a^2];
Iabc3 = sctm*I012
disp('(c) Line-to-line fault at bus 3')
I13 = 1.0/(Z133 + Z133 + Zf);
I012 = [0; I13; -I13]
Iabc3 = sctm*I012
disp('(d) Double line-to-ground fault at bus 3')
I13 = 1/(Z133 + Z133*(Z033+3*Zf)/(Z133+Z033+3*Zf));
I23 = -(1.0 - Z133*I13)/Z133;
I03 = -(1.0 - Z133*I13)/(Z033+3*Zf);
I012 = [I03; I13; I23]
Iabc3 = sctm*I012

EXPT NO
DATE

:
:

FAULT ANALYSIS

AIM:

To conduct short circuit analysis of the given power system using MATLAB
software package and verify the same.
SOFTWARE REQUIRED: MATLAB
THEORY:
Symmetrical Faults:
The MATLAB Short circuit analysis program analyzer the effect of 3 phase
symmetrical

fault on electrical distribution systems. The program calculates the total short circuit current as
well as the distributions of individual motors, generators and utility in the system. Fault duties
are in competence with the latest conditions which calculates.

Momentary symmetrical fault current in kA


Interrupting symmetrical fault current in kA

Unsymmetrical Faults:
The MATLAB short circuit analysis program also analyzes the effect of 3 phase
unsymmetrical faults like,

Line to ground faults


Double line faults

97

Solution:

99

ZERO SEQUENCE NETWORK:

100

101

RESULT:
Thus the fault analysis of the given power system using MATLAB software
package was experimented and the output was verified.

103

Ef=10000;
L=0.004;
Zc=400;
n1=[2*Ef 0];
d1=[1 Zc/L];
t=0:0.00001:0.0001;
Et=step(n1,d1,t);
plot(t,Et,'r');
Er=Et-Ef;
hold on;
plot(t,Er,'b')
Ef=10000;
C=0.000000009;
Zc=400;
n1=[2*Ef/(Zc*C)];
d1=[1 1/(Zc*C)];
t=0:0.00001:0.0001;
Et=step(n1,d1,t);
plot(t,Et,'r');
Er=Et-Ef;
hold on;
plot(t,Er,'b')
Ef=10000;
C=0.000000009;
Zc=400;
n1=[2*Ef/Zc 0];
d1=[1 1/(Zc*C)];
t=0:0.00001:0.0001;
It=step(n1,d1,t);
plot(t,It,'r');
hold on;
If=Ef/Zc;
Ir=It-If;
plot(t,Ir,'b')
Ef=10000;
L=0.004;
Zc=400;
n1=[2*Ef 0];
d1=[1 Zc/L];
tf(n1,d1)
t=0:0.00001:0.0001;
n2=[2*Ef/L];
d2=[1 Zc/L];
It=step(n2,d2,t);
plot(t,It,'r');
If=Ef/Zc;
Ir=It-If;
holdon;
plot(t,Ir,'b');

% LINE TERMINATED BY INDUCTOR FOR VOLTAGE:

%LINE TERMINATED BY CAPACITOR FOR VOLTAGE:

%LINE TERMINATED BY CAPACITOR FOR CURRENT:

%LINE TERMINATED BY INDUCTOR FOR CURRENT:

EXPT NO
1DATE

:
:

STUDY THE ELECTROMAGNETIC TRANSIENTS IN POWER


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

Figure 1. Part of the Network around a Node of Large System


Modeling Details:
Fig. 1 shows the details for the region around node 1 of a large system. Suppose that voltages
and currents have already been computed in steps of time (t) for t=0, t, 2t etc., upto t-t, and
that the solution must now be found for time t. At any distance of time the sum of the currents
flowing away from node 1 through the branches must be equal to the injected current i1.

105

i12 (t ) + i13 (t ) + i14 (t ) + i15 (t ) = i1 (t ) (1)


Since node voltages are used as state variables, it is necessary to express the branch currents, i12
etc., as function of node voltages. For the resistance:
i12 (t ) =

v1 (t ) v2 (t )
R

( 2)

For the inductance, a simple relationship is obtained by replacing the differential equation
di
v = L with a central difference equation:
dt
v(t ) + v(t t )
i (t ) i (t t )
=L
2
t
Applying the above relationship for the case of above figure,
v13 (t ) + v13 (t t )
i (t ) i13 (t t )
= L 13
2
t
Rewriting the above equation, we get
i13 (t ) i13 (t t ) =

t
t
v13 (t ) +
v13 (t t )
2L
2L

i13 (t ) =

t
t
v13 (t ) +
v13 (t t ) + i13 (t t )
2L
2L

i13 (t ) =

t
(v1 (t ) v3 (t ) ) + I13 (t t )
2L

t
v13 (t t ) + i13 (t t ) , the past history term with i13 computed
2L
from the values of the preceding steps.
where, I13 (t t ) =

I13 (t ) = i13(t t ) +

t
(v1 (t t ) v3 (t t ) )
2L

The derivation for the branch equation of the capacitance is analogous, and leads to
i14 (t ) =

2C
(v1 (t ) v4 (t ) ) + I14 (t t )
t

with I14 (t t ) = i14(t t )

2C
(v1 (t ) v4 (t ) )
t

For the transmission line between nodes 1 and 5, losses are first ignored, then reintroduced later
on. Then the wave equations

107

v
i
= L'
x
x
i
v

= C'
x
x

where, L &C=inductance and capacitance per unit length, x=distance from sending end.
The well known solution due to de Alembert:
i = F ( x ct ) + f (a + ct )

(5a )

v = zF ( x ct ) zf ( x + ct )
Where, F(x-ct) and f(x+ct) are functions of the composite variables x-ct and x+ct, z is the surge
impedance and c is the velocity of propagation.
If the current in equation (5a) is multiplied by z and added to the voltage, then v+zi=2zF(x-ct)
(5b).
Note that the composite expression v+zi does not change if x-ct does not change. Imagine a
fictitious observer travelling on the line with wave velocity c. The distance travelled is x=x0+ct
(x0 location of the starting point), or x-ct = constant. If x-ct is constant, then the value v+zi,
measured by the observer, must also remain constant. With travel time

Line Length
c

An observer leaving node 5 at time t- will measure the value v5(t-)+zi15(t-), and upon arrival
at node 1 (after the elapse of travel time ), will measure the value v1(t)+zi15(t)(negative sign
because i15 has opposite direction of i51 ). But the value as measured by the observer must
remain constant, so these values must be equal, giving, after rewriting,
i15 (t ) =

v5 (t )
I 51 (t )
z

(6a )

Where the term I15 is again known from previously computed values
I 51 (t ) =

v5 (t )
i51 (t )
z

(6b)

RESULT:
Thus the electromagnetic transient phenomena in power systems caused due to switching
and faults are studied.

109

Potrebbero piacerti anche