Anda di halaman 1dari 122

INTRODUCTION TO MATLAB

OBJECTIVES:
(i)

To procure sufficient knowledge in MATLAB to solve the power system


Problems.

(ii)

To write a MATLAB program.

SOFTWARE REQUIRED:
MATLAB

1. 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,
(iii)

Script M-files Main file contains commands and from which functions can
also be called.

(iv)

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

1. Using transfer functions.


2. Using state space equations.
3. 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 :
>>for n=1:2:10
>>s=s+n^2
>>end
- Yields the sum of 1^2+3^2+5^2+7^2+9^2
1.7

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
1

0.25

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.

COMPUTATION OF POWER SYSTEM COMPONENTS IN


PER UNIT
Aim:
To write a matlab program to determine the per unit quantities for the given power
system network and to draw the reactance diagram of the network.

Formula used:
1. Per unit impedance
actual impedance
Zpu =
base impedance
2. Base impedance
KVb2
Z(base) =
MVAb
3. Zpu(new)
MVA(new)
KVb(old) 2
Zpu(new) = Zpu(old) [
][
]
MVAb(old)
KVb(new)
4. For LT/HT Transformer
HT rating
KVb(new) = KVb(old)
LT rating
5. For HT/LT Transformer
LT rating
KVb(new) = KVb(old)
HT rating

Theory:
A typical power system consists of a 3-phase grid to which all generating stations feeds
energy and from which all substations taps energy. The components of a power system are
generating stations, power transformers, transmission lines, substation, distribution transformer
and loads. The various components of power system and their interconnections are usually
represented by single line diagram. A balanced three phase system is always analyzed on per
phase basis by considering one of the three phase line and neutral. Hence it is enough if we show
one phase and neutral in the diagrammatic representation of power system. In single line
representation of power system, the components of the system are represented by standard

symbols and the transmission lines are represented by straight lines. Hence a single line diagram
is diagrammatic representation of power system in which the components are represented by
their symbols and the purpose of the one-line diagram is to supply in concise form the significant
about the system.
The electric power transmission lines are operated at very high voltage levels and
transmits large amount of power. Hence the operating voltage of transmission line is expressed
in kilovolt (KV) and power transmitted in kilowatt or mega watt(MW) and kilovolt
ampere(KVA). The per unit value of any quantity is defined as the ratio of the actual value of the
quantity to the base value expressed as decimal. The ratio in percent 100times the value in per
unit
Per unit value =

actual value
base value

The power system requires the base value of four quantities and they are voltage, power,
current and impedance selection of base values for any two of them determines the base values
of the remaining two.
The impedance of a device or component is usually specified in per unit on the bases of
name plate rating. When a system is formed by interconnecting various devices, it will be
convenient for analysis if the impedances are converted to common base. Since all impedance in
any one part of a system must be expressed on the common impedance base.
Equivalent circuit of components of power system:
The equivalent circuit of a power system is needed to perform analysis like load flow
analysis, fault level calculations etc. it can be obtained from the equivalent circuit of the
components of the power system. The various components of power system are generator,
transformer, transmission line, induction motor, synchronous motor, resistive and reactive loads.
The equivalent circuits of various electrical machines developed in electrical machine theory can
be used in power system modeling with or without approximations.
Equivalent circuit of generator:
It consists of a source representing induced emf per phase, a series reactance representing
the armature reactance and leakage reactance and a series resistance representing the armature
winding resistance.
Equivalent circuit of synchronous motor:
The synchronous motor is similar to generator in construction, but it performs the reverse
action of the generator. Therefore the direction of current in motor is opposite to that of
generator.

Equivalent circuit of transformer:


It consist of shunt branches to represent magnetizing current and core loss, series
resistance representing. Winding resistance referred to primary and the resistance representing
leakage reactance refereed to primary. The three phase transformer is represented by its single
phase equivalent circuit.
The resistive and reactive loads can be represented in the equivalent circuit by any of following
1. Constant power representation
2. constant current representation
3. Constant impedance representation
In constant power representation, the load active power (MW) and reactive power (MVAr)
are considered to be constant. This method of representation will be useful in load flow studies.
In constant current representation the magnitude of the load current is considered as constant.
The constant current of the load can be calculated from the specified voltage, active and reactive
power of the load.
Three winding transformer:
In addition to the primary and secondary windings, the transformer may be constructed with
a third winding called tertiary winding. In three winding transformer, the two winding are
connecting in star and one winding in delta or two winding in delta and one winding is star. The
purpose of providing the tertiary winding is the following
1. To get supply voltage for the substation auxiliary devices. The auxiliary devices may
work at voltage different from those of the primary and secondary winding
2. Static capacitors or synchronous condenser may be connected to the tertiary winding for
reactive power injection into the system for voltage control
3. A delta connected tertiary reduces the impedance offered to the zero sequence currents
there by allowing a large earth-fault current to flow for proper protection of protective
equipments. Further it limits voltage imbalance when the load is unbalanced. It also
permits the third harmonic current to flow thereby reducing third harmonic voltages. For
the reasons the tertiary winding also called as stabilization winding
4. Three windings may be used for interconnection three transmission line at different
voltage.
5. Tertiary can serve the purpose of measuring voltage of an HV testing transformer
In three winding transformers, the three winding may have different KVA rating. The impedance
of each winding of a three winding may be given in pu calculated by using their own winding

rating as bases. But while representing in reactance/impedance diagram it is necessary to convert


the pu reactance to a common base
Impedance and reactance diagram:
The impedance or reactance diagram of a power system is the equivalent circuit of the
power system in which the various components of the power system are represented by their
approximate or simplified equivalent circuits. This equivalent circuit of power system is used to
analyze the performance of a system under load condition or to analyze the condition of the
system under fault.
Impedance diagram:
The impedance of a power system diagram is used for load flow studies. The impedance
diagram can be obtained from the single line diagram by replacing all the components of the
power system by their single phase equivalent circuit. The following approximations are made
while forming impedance diagram.
i.
The current limiting impedances connected between the generator neutral and ground
are neglected since under balanced conditions no current flows through neutral.
ii.
Since the magnetizing current of a transformer is very low when compared to load
current the shunt branches in the equivalent circuit of the transformer can be
neglected.
iii.
If the inductive reactance of a component is very high when compared to resistance
then the resistance can be omitted, which introduce a little error in calculations.
Reactance diagram:
The reactance diagram is used for fault conditions. The following approximations are made in
constructing reactance diagram,
1. The neutral to ground impedance of the generator is neglected for symmetrical faults.
2. Shunt branches in the equivalent circuits of transformer are neglected.
3. The resistance in the equivalent circuits of various components of the system is omitted.
4. All static loads are neglected.
5. Induction motors are neglected in computing fault occurs, because the current contributed
by an induction motor dies out very quickly after the induction motor is short-circuited
6. The capacitance of the transmission lines is neglected.
The reactance diagram can obtained from impedance diagram if we obtain omit all static
loads, all resistances, shunt branches of transformer and capacitance of transmission line in the
impedance diagram. The impedance and reactance diagram obtained from the above

approximation are also called positive sequence impedance diagram and positive sequence
reactance diagram.
The impedance or reactance of various components of power system in a single line diagram
are expressed in percentage value or per unit calculated by taking their rating as base value.
When the impedance or reactance diagram is formed, all the impedance or reactance should be
expressed in per unit calculated on a common base value. Hence it is necessary tot convert all the
pu value reactance to a common base. The conversion of per unit reactance from one base to
another can be performed using equation
KVb old 2
MVA old
Xpu(new) = Xpu(old) (
) (
)
KVb new
MVA new
Algorithm:
1. Start
2. Read the data
a. Base MVA
b. Base KV
3. Read the ratings of
a. Generator
b. Transformer
c. Load
d. Transmission lines
4. Calculate per unit reactance of the components in the following order
a. Generator
b. Transformer
c. Transmission line
d. Load
5. Print the per unit values
6. Stop

PROGRAM CODE:
clc;
display('PER UNIT COMPUTATION OF POWER SYSTEM COMPONENTS');
k=input('Enter the Number of Elements:');
mvab=input('Enter the Base MVA:');
kvb=input('Enter the base KV:');
pu=zeros(k);
for i=1:1:k
ch=input('Enter the Component 1.Generator 2.Transformer 3.Load 4.Transmission
Line');
switch(ch)
case 1
mva=input('Enter the MVA of Generator:');
kv=input ('Enter the KV of Generator:');
x=input('Enter the Sub-Transiant Reactance of Generator:');
pu(i)=x*(kv/kvb)*(kv/kvb)*(mvab/mva);
case 2
t=input('Enter the type of Transformer: 1.Step Up Transformer
2.Distribution Transformer');
if (t==1)
mva=input('Enter the MVA of Transformer:');
hkv=input ('Enter the HV side KV of Transformer:');
lkv=input ('Enter the LV side KV of Transformer:');
x=input('Enter the Sub-Transiant Reactance of Transformer:');
kvbn=(hkv/lkv)*kvb
pu(i)=x*(lkv/kvb)*(lkv/kvb)*(mvab/mva);
end
if(t==2)
mva=input('Enter the MVA of Transformer:');
hkv=input ('Enter the HV side KV of Transformer:');
lkv=input ('Enter the LV side KV of Transformer:');
x=input('Enter the Sub-Transiant Reactance of Transformer:');
k=lkv/hkv;
kvbn=k*kvbn;
pu(i)=x*(lkv/kvbn)*(lkv/kvbn)*(mvab/mva);
end
case 3
mva=input('Enter the MVA of Load:');
kv=input ('Enter the KV of Load:');
x=input('Enter the Sub-Transiant Reactance of Load:');
pu(i)=x*(kv/kvbn)*(kv/kvbn)*(mvab/mva);

case 4
kv=input ('Enter the KV of Line:');
x=input('Enter the Sub-Transiant Reactance of Line:');
pu(i)=x/(kvbn*kvbn/mvab);
otherwise
disp('Enter the correct Choice');
end
end
pu

OUTPUT:
PER UNIT COMPUTATION OF POWER SYSTEM COMPONENTS
Enter the Number of Elements:6
Enter the Base MVA:300
Enter the base KV:20
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the MVA of Generator:300
Enter the KV of Generator:20
Enter the Sub-Transiant Reactance of Generator:0.2
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the type of Transformer: 1.Step Up Transformer
Transformer1
Enter the MVA of Transformer:350
Enter the HV side KV of Transformer:230
Enter the LV side KV of Transformer:20
Enter the Sub-Transiant Reactance of Transformer:.1
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the KV of Line:230
Enter the HV side KV of Step up Transformer:230
Enter the LV side KV of Step up Transformer:20
Enter the Sub-Transiant Reactance of Line:32
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the type of Transformer: 1.Step Up Transformer
Transformer2
Enter the MVA of Transformer:300
Enter the HV side KV of Transformer:230
Enter the LV side KV of Transformer:13.2
Enter the Sub-Transiant Reactance of Transformer:0.1
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the MVA of Load:200
Enter the KV of Load:13.2
Enter the Sub-Transiant Reactance of Load:.2
Enter the Component 1.Generator 2.Transformer 3.Load
Enter the MVA of Load:100
Enter the KV of Load:13.2
Enter the Sub-Transiant Reactance of Load:.2
pu =
0.2000
0.0857
0.1815
0.0915
0.2745
0.5491

4.Transmission Line1

4.Transmission Line2
2.Distribution

4.Transmission Line4

4.Transmission Line2
2.Distribution

4.Transmission Line3

4.Transmission Line3

VIVA QUESTIONS
1. What is the need for base values?
The components of various sections of power system may operate at different voltage and
power levels. It will be convenient for analysis of power system if the voltage, power, current
and impedance ratings of components of power system are expressed with reference to a
common value called base value. Hence for analysis purpose of a base value is chosen for
voltage, power, current and impedance. Then all the voltage, power, current and impedance
ratings of the components are expressed as percent or per unit of base value.
2. What is single line diagram?
A single line diagram is a diagrammatic representation of power system in which the
components are represented by their symbols and the interconnection between there are shown
by a single straight line. The ratings and impedances of the components are also marked on the
single line diagram.
3. Define per unit value
The per unit value of any quantity is defined as the ratio of the value of the quantity to the
base value expressed as a decimal. The base value is an arbitrary chosen value of quantity.
Per unit value=

4.Write the equation for converting the p.u. impedance expressed in one base to another?
,

Zpu,new=Zpu,old ,

,
,

5.What are the advantages of per unit computations?

Manufacturers usually specify the impedance of a device or machine in per unit on


the base of the name plate rating.
The p.u. impedance of a 3-phase transformer is independent of the type of winding
connection.
The p.u. values of widely different rating machines lie within a narrow range,
eventhough the ohmic values has a very large range.
The p.u. impedance of circuit element connected by transformers expressed on a
proper base will be same if it is referred to either side of a transformer.

Result:
The per unit quantities for the given power system network and the reactance diagram of the
network was obtained using MATLAB program.

FORMATION OF BUS ADMITTANCE MATRIX BY DIRECT


INSPECTION METHOD
Aim :
To write a MATLAB program, to obtain bus admittance matrix for a given power system
network by direct inspection method.

Software Used :
MATLAB 7.5 Version.

Formula Used :
(1) For diagonal elements

1
Ynn Yno
Yln
Z
m 1 nm
m n
nb

(or)
nb

Ynn Yno Ynm Yln


m 1
mn

(2) For off diagonal element,

1
Ynm Ymn

Z nm
Where,

Yno
Yln
Ynn
Znm
Ynm

-shunt admittance of nth bus.


- half line charging admittance.
-self admittance of nth bus.
- impedance between bus n and m
admittance between bus n and m.

Case (i) :
Addition of an element
Ynn, new
=
Ynn, old + y
Ymm, new
=
Ymm, old + y
Ynm, new
=
Ynm, old - y
Ymn, new
=
Ymn, old - y
Where,

Case (ii) :

Removal of an element

Ynn, new
Ymm, new
Ynm, new
Ymn, new

=
=
=
=

Admittance to be added

Ynn, old
Ymm, old
Ynm, old
Ymn, old

- y
- y
+ y
+y

Where,
Case (iii) :

y
Admittance to be removed
Additional of a shunt element

Where,

Ymm ,new
y

=
-

Ymm ,old + y
Admittance of shunt element

Theory:
The power system is a large and complex network, which consists of a number of
elements such as generators, transformers, transmission lines, controllers and switching devices.
Network analysis or power system analysis requires the development of network equation in a
form of network matrix. Through the primitive network describes the characteristic of individual
elements it does not provide information about network characteristics such as connections
therefore we require transforming the primitive network characteristics such as connection.
Therefore we require transforming the primitive network matrices into net-work matrices.
Network matrices can be developed either in the bus frame, branch frame or loop frame of
reference. In these frame of reference network matrices can be written as

Vbus = Zbus*Ibus
In the above equation, the Vbus matrix contains bus voltages, Ibus matrix represents injected
currents into the buses and Zbus is known as bus impedance matrix for an n-bus power system.

The dimensions of these matrices are nx1, nx1 and nxn respectively the network equations in
admittance from can be written as

Ibus=Ybus*Zbus
Where Ybus =Z-1bus
In the loop frame of reference
Vloop denotes the basic loop voltages, Iloop represents the basic loop currents and Zloop is the loop
impedance matrix. In the admittance form, network equations can be written as.

Iloop = Yloop Vloop where Yloop = Z-1loop


The size of matrices in the network equation based on loop frame depends on the number of
basic loops or links.
Finally the performance equation can be written in branch frame as:

VBr = ZBr IBr (or)


IBr = YBr VBr where YBr=Z-1Br
Here VBr and YBr represent branch voltage and currents. ZBr and YBr represent branch
impedance and branch admittance matrix respectively. The dimensions of theses matrices depend
upon the number of branches in a graph of a given power system network. However, the bus
frame of reference has emerged as an important frame of reference for developing power system
network performance equations, as in evident, from recent literature. Studies on power systems
like short circuit studies and power flow studies are performed by using either the ZBus or the
YBus. This frame of reference has advantage like computational convenience and reduced
computer memory requirements.
Bus admittance matrix for an n-bus power system is a square matrix of size nxn. The
leading diagonal elements represent the self or short circuit driving point admittance with respect
to each bus. The off-diagonal elements are the short circuit transfer admittance or the
admittances common to any two buses.

YBus can be obtained through the following methods:


1.
2.
3.
4.

Direct inspection method


Step by step procedure
Singular transformation method
Non-singular transformation method

Formation of YBus by direct inspection matrix method is suitable for small networks. In this
network method the YBus matrix is developed by simply inspecting the structure of the network
without developing any kind of equations
In a power flow studies, generators are represented as complex power source that is they are
represented by a complex number SGi as:

SGi = PGi + jQGi


where SGi is complex power generator at the tth bus.
The step by step procedure is a general purpose computer algorithm and is similar to the
direct inspection method. In the case of elements having mutual admittances, YBus can be
conveniently developed by either singular or non-singular transformation methods. These tow
methods are based on the graph theory discussed in and use of primitive admittance matrix,
whenever network changes are taking place such as outage of lines or addition of lines YBus need
to be modified. These methods can be easily coded and are quite useful for obtaining the
modified YBus.
Singular transformation method uses the singular bus incident matrix A. the equation for
Ybus in terms of matrix A is :

YBus = AT [Y] A
The method is known as singular transformation method as the matrix A is a singular
matrix. The matrix Y is a primitive admittance matrix. Non-singular transformation method uses
the augmented incidence square matrices.

YBus = Z-1Bus = [PT ZBr P]-1

Where P is the branch path incidence matrix and ZBr is the branch admittance matrix.

SGi = PGi + jQGi


PGi, QGi is active and reactive power generated at the tth bus. Loads are represented by a complex
number SDi as:

SDi = PDi + jQDi


where,
SDi is complex power demand/load at the tth bus. PDi, QDi is active and reactive power
demanded at the tth bus.
It may be seen that SGi abd SDi denote the local power generation and load respectively at
the i bus. Si is the difference of SGi and SDi. Therefore
th

Si = Pi +jQi = SGi SDi = (PGi PDi) + j(QGi QDi)


Si, Pi,Qi are complex power, active power and reactive power respectively injected at the ith bus.
Algorithm:
STEP 1: Start.
STEP 2: Read the Data
i.
Number of lines
ii.
Number of buses
iii. Line impedance
iv.
Half line charging admittance
STEP 3: initialize Ybus matrix
STEP 4: Form the Ybus matrix using formula.
STEP 5: Print the Ybus matrix.
STEP 6: Check for cases
1. Addition of an element.
2. Removal of an element
3. Addition of shunt element.
STEP 7: Calculate the new Ybus matrix.
STEP 8: Print the new Ybus matrix.
STEP 9: Stop.

PROGRAM CODE:
clc;
display('CALCULATION OF Y-BUS MATRIX BY DIRECT INSPECTION METHOD');
nb=input('Enter the number of buses:');
nl=input('Enter the number of lines:');
y=zeros(nb,nb);
for i=1:1:nl
sb(i)=input('Enter the Starting bus number:');
eb(i)=input('Enter the Ending bus number:');
z(i)=input('Enter the impedence Value:');
shy(i)=input('Enter the halfline charging admitance:');
sy(i)=1/z(i);
l=sb(i);
m=eb(i);
y(l,l)=y(l,l)+sy(i)+shy(i);
y(m,m)=y(m,m)+sy(i)+shy(i);
y(l,m)=y(l,m)-sy(i);
y(m,l)=y(m,l)-sy(i);
end
y
h=input('Enter the choice:');
switch(h)
case 1
n=input('Enter the number of buses to be added:');
for i=1:1:n
b=input('Enter the Starting bus number:');
c=input('Enter the ending bus number:');
az(i)=input('Enter the impedence Value:');
shy(i)=input('Enter the halfline charging admitance:');
y(b,b)=y(b,b)+(1/az(i))+shy(i);
y(c,c)=y(c,c)+(1/az(i))+shy(i);
y(c,b)=y(c,b)-(1/az(i));
y(b,c)=y(b,c)-(1/az(i));
end
case 2
n=input('Enter the number of buses to be Eliminated:');
for i=1:1:n
b=input('Enter the Starting bus number:');
c=input('Enter the ending bus number:');
az(i)=input('Enter the impedence Value:');
shy(i)=input('Enter the halfline charging admitance:');
y(b,b)=y(b,b)-(1/az(i))-shy(i);
y(c,c)=y(c,c)-(1/az(i))-shy(i);
y(c,b)=y(c,b)+(1/az(i));
y(b,c)=y(b,c)+(1/az(i));
end

case 3
n=input('Enter the number of Impedence to be added:');
for i=1:1:n
b=input('Enter the bus number:');
az=input('Enter the impedence Value:');
y(b,b)=y(b,b)+(1/az(i));
end
otherwise
disp('Enter the correct choice');
end
y

OUTPUT:
CALCULATION OF Y-BUS MATRIX BY DIRECT INSPECTION METHOD
Enter the number of buses:3
Enter the number of lines:3
Enter the Starting bus number:1
Enter the Ending bus number:2
Enter the impedence Value:0.05+0.25i
Enter the halfline charging admitance:0.02i
Enter the Starting bus number:1
Enter the Ending bus number:3
Enter the impedence Value:0.015i
Enter the halfline charging admitance:0.03i
Enter the Starting bus number:2
Enter the Ending bus number:3
Enter the impedence Value:0.04+0.2i
Enter the halfline charging admitance:0.12i
y =
0.7692 -70.4628i -0.7692 + 3.8462i
0.0000 +66.6667i
-0.7692 + 3.8462i
1.7308 - 8.5138i -0.9615 + 4.8077i
0.0000 +66.6667i -0.9615 + 4.8077i
0.9615 -71.3244i
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
y =
1.7308
-1.7308
0.0000
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
y =
0.0000
0.0000
0.0000

choice:1
number of buses to be added:1
Starting bus number:1
ending bus number:2
impedence Value:0.04+0.2i
halfline charging admitance:0
-75.2705i
+ 8.6538i
+66.6667i

-1.7308 + 8.6538i
2.6923 -13.3215i
-0.9615 + 4.8077i

0.0000 +66.6667i
-0.9615 + 4.8077i
0.9615 -71.3244i

choice:2
number of buses to be Eliminated:1
Starting bus number:1
ending bus number:2
impedence Value:0.05+0.25i
halfline charging admitance:0
-66.6167i
+ 0.0000i
+66.6667i

0.0000 + 0.0000i
0.9615 - 4.6677i
-0.9615 + 4.8077i

0.0000 +66.6667i
-0.9615 + 4.8077i
0.9615 -71.3244i

Enter the choice:3


Enter the number of Impedence to be added:1
Enter the bus number:1

Enter the impedence Value:0.4i


y =
0.7692 -72.9628i
-0.7692 + 3.8462i
0.0000 +66.6667i

-0.7692 + 3.8462i
1.7308 - 8.5138i
-0.9615 + 4.8077i

0.0000 +66.6667i
-0.9615 + 4.8077i
0.9615 -71.3244i

VIVA QUESTIONS
1.What is bus admittance matrix?
The matrix consisting of self and mutual admittances of the network of a power system is
called bus admittance matrix. It is given by the admittance matrix Y in the node basis matrix
equation of apower system and it is denoted as Ybus. The bus admittance matrix is symmetrical.
2.What is primitive admittance matrix?
A primitive admittance matrix is a matrix which is an inverse of primitive impedance
matrix, the diagonal elements of the primitive impedance matrix being the self impedance of the
network elements and the off-diagonal elements, the mutual impedances between the network
elements.
3.Write the equation to find the elements of new bus admittance matrix after eliminating
nth row and column in a n*n bus admittance matrix.
The element Yjk of new bus admittance matrix is given by
Yjk,new=Yjk

For j=1,2,3(n-1)
k=1,2,3,.(n-1)
Where Yjk, Yjn, Ynk and Ynn are elements of original or given bus admittance matrix of order
(nn).
4.What is the limitation for direct inspection method?
The impedance and admittances can be found by direct inspection method provided mutual
coupling between the elements of the given power system network is neglected.
5.What is Bus:
The meeting point of various components of a power system is called as a bus. Bus
conductor is made up of copper or aluminum wire of negligible resistance.

6.How you represent Y bus matrix?


Admittance matrix is represented as Y, for bus admittance matrix it is represented as Ybus.
a) The diagonal element of a bus admittance matrix is called as self admittance of a bus.
b) Half diagonal elements of a bus admittance matrix are called as mutual admittance of the
bus.
7. What is the use of Y bus matrix
In load flow analysis Y bus matrix is used. The load flow equations can also be formed using
either the mesh or node basis equations of power systems.

Result:
The Y bus matrix was formed for the given system by direct inspection method and the
results were verified using MATLAB program.

FORMATION OF Y BUS MATRIX BY BUS ELIMINATION


METHOD
Aim:
To write a MATLAB Program to obtain the Ybus
particular node from the formed nodal equation.
Software Required:
MATLAB 7.5 Version

Formula used:
1. Diagonal Element:

1
Ynn Yno Yln
m 1 Z nm
m n
nb

(or)
nb

Ynn Yno Ynm Yln


m 1
mn

2. Off Diagonal Element:

1
Ynm Ymn

Z
nm
Where,
Yno
shunt admittance of nth bus
Yln
half line charging admittance
Ynm self admittance of nth bus
Znm
impedance between bus n and m
Ynm admittance between bus n and m
3. Gaussian Elimination:

Y *Y
Ymn ' Ymn mk kn
Ykk
Where,
Ykk
-

bus to be eliminated

matrix and to eliminate any

Algorithm:
STEP 1: Start.
STEP 2: Read the data
i) Number of buses
ii) Number of lines
iii) Series Impedance
iv) Half line charging admittance.
STEP 3: Initialize the matrix.
STEP 4: Calculate the matrix using the formula.
STEP 5: Print matrix.
STEP 6: Get the bus number that has to be eliminated.
STEP 7: Calculate the reduced matrix using formula.
STEP 8: Print the new matrix.
STEP 9: Stop.

PROGRAM CODE:
clc;
display('CALCULATION OF Y-BUS MATRIX BY Gaussian Elimination Method');
nb=input('Enter the number of buses:');
nl=input('Enter the number of lines:');
for i=1:1:nl
sb(i)=input('Enter the Starting bus number:');
eb(i)=input('Enter the Ending bus number:');
z(i)=input('Enter the impedence Value:');
shz(i)=input('Enter the halfline charging Impedence:');
end
y=zeros(nb,nb);
for i=1:1:nl
sy(i)=1/z(i);
shy(i)=1/shz(i);
l=sb(i);
m=eb(i);
y(l,l)=y(l,l)+sy(i)+shy(i);
y(m,m)=y(m,m)+sy(i)+shy(i);
y(l,m)=y(l,m)-sy(i);
y(m,l)=y(m,l)-sy(i);
end
y
k=input('Enter the bus to be Eliminated:');
for l=1:1:(nb)
for m=1:1:(nb)
y(l,m)=y(l,m)-(y(l,k)*y(k,m))/y(k,k);
end
end
y(k,:)=[];
y(:,k)=[];
y

OUTPUT:
CALCULATION OF Y-BUS MATRIX BY Gaussian Elimination Method
Enter the number of buses:3
Enter the number of lines:3
Enter the Starting bus number:1
Enter the Ending bus number:2
Enter the impedence Value:0.05+0.25i
Enter the halfline charging admitance:0.02i
Enter the Starting bus number:1
Enter the Ending bus number:3
Enter the impedence Value:0.015i
Enter the halfline charging admitance:0.03i
Enter the Starting bus number:2
Enter the Ending bus number:3
Enter the impedence Value:0.04+0.2i
Enter the halfline charging admitance:0.12i
y =
0.7692 -70.4628i -0.7692 + 3.8462i
0.0000 +66.6667i
-0.7692 + 3.8462i
1.7308 - 8.5138i -0.9615 + 4.8077i
0.0000 +66.6667i -0.9615 + 4.8077i
0.9615 -71.3244i
Enter the bus to be Eliminated:3
y =
1.1001 - 6.5662i
-1.0926 + 6.7039i

-1.0929 + 6.7039i
1.0854 + 6.4996i

VIVA QUESTIONS
1.What is bus admittance matrix?
The matrix consisting of self and mutual admittances of the network of a power system is
called bus admittance matrix. It is given by the admittance matrix Y in the node basis matrix
equation of apower system and it is denoted as Ybus. The bus admittance matrix is symmetrical.
2.What is primitive admittance matrix?
A primitive admittance matrix is a matrix which is an inverse of primitive impedance
matrix, the diagonal elements of the primitive impedance matrix being the self impedance of the
network elements and the off-diagonal elements, the mutual impedances between the network
elements.
3.Write the equation to find the elements of new bus admittance matrix after eliminating
nth row and column in a n*n bus admittance matrix.
The element Yjk of new bus admittance matrix is given by
Yjk,new=Yjk

For j=1,2,3(n-1)
k=1,2,3,.(n-1)
Where Yjk, Yjn, Ynk and Ynn are elements of original or given bus admittance matrix of order
(nn).
4.What is the limitation for direct inspection method?
The impedance and admittances can be found by direct inspection method provided mutual
coupling between the elements of the given power system network is neglected.
5.What is Bus:
The meeting point of various components of a power system is called as a bus. Bus
conductor is made up of copper or aluminum wire of negligible resistance.

6. How you represent Y bus matrix?


Admittance matrix is represented as Y, for bus admittance matrix it is represented as Ybus.
a) The diagonal element of a bus admittance matrix is called as self admittance of a bus.
b) Half diagonal elements of a bus admittance matrix are called as mutual admittance of the
bus.
7. What is the use of Y bus matrix
In load flow analysis Y bus matrix is used. The load flow equations can also be formed using
either the mesh or node basis equations of power systems.

Result:
The Y bus matrix was formed for the given system by bus elimination method and the
results were verified using MATLAB program.

FORMATION OF YBUS BY SINGLUAR TRANSFORMATION


METHOD
Aim:
To develop a matlab program and to obtain the bus admittance matrix of the given power
system by singular transformation method when there is
a) No coupling between the lines
b) Coupling between the lines
Software Required:
MATLAB 7.5 Version
Formula:
Ybus a Yp a

Where,
[a]
[Yp]
[a]T

bus incidence matrix


primitive admittance matrix
transpose of bus incidence matrix

Theory:
The power system is a large and complex network, which consists of a number of
elements such as generators, transformers, transmission lines, controllers and switching devices.
Network analysis or power system analysis requires the development of network equation in a
form of network matrix. Through the primitive network describes the characteristic of individual
elements it does not provide information about network characteristics such as connections
therefore we require transforming the primitive network characteristics such as connection.
Therefore we require transforming the primitive network matrices into net-work matrices.
Network matrices can be developed either in the bus frame, branch frame or loop frame of
reference. In these frame of reference network matrices can be written as
Vbus = Zbus*Ibus
In the above equation, the Vbus matrix contains bus voltages, I bus matrix represents injected
currents into the buses and Zbus is known as bus impedance matrix for an n-bus power system.
The dimensions of these matrices are nx1, nx1 and nxn respectively the network equations in
admittance from can be written as
Ibus=Ybus*Zbus

Where Ybus =Z-1bus


In the loop frame of reference
Vloop denotes the basic loop voltages, Iloop represents the basic loop currents and Zloop is the loop
impedance matrix. In the admittance form, network equations can be written as.
Iloop = Yloop Vloop where Yloop = Z-1loop
The size of matrices in the network equation based on loop frame depends on the number of
basic loops or links.
Finally the performance equation can be written in branch frame as:
VBr = ZBr IBr (or)
IBr = YBr VBr where YBr=Z-1Br
Here VBr and YBr represent branch voltage and currents. ZBr and YBr represent branch
impedance and branch admittance matrix respectively. The dimensions of theses matrices depend
upon the number of branches in a graph of a given power system network. However, the bus
frame of reference has emerged as an important frame of reference for developing power system
network performance equations, as in evident, from recent literature. Studies on power systems
like short circuit studies and power flow studies are performed by using either the ZBus or the
YBus.
Bus admittance matrix for an n-bus power system is a square matrix of size nxn. The
leading diagonal elements represent the self or short circuit driving point admittance with respect
to each bus. The off-diagonal elements are the short circuit transfer admittance or the
admittances common to any two buses.
YBus can be obtained through the following methods:
1. Direct inspection method
2. Step by step procedure
3. Singular transformation method
4. Non-singular transformation method
Formation of YBus by direct inspection matrix method is suitable for small networks. In this
network method the YBus matrix is developed by simply inspecting the structure of the network
without developing any kind of equations
In a power flow studies, generators are represented as complex power source that is they are
represented by a complex number SGi as:
SGi = PGi + jQGi
Where SGi is complex power generator at the ith bus.

The step by step procedure is a general purpose computer algorithm and is similar to the
direct inspection method. In the case of elements having mutual admittances, YBus can be
conveniently developed by either singular or non-singular transformation methods. These two
methods are based on the graph theory discussed in and use of primitive admittance matrix,
whenever network changes are taking place such as outage of lines or addition of lines YBus need
to be modified. These methods can be easily coded and are quite useful for obtaining the
modified YBus.
Singular transformation method uses the singular bus incident matrix A. the equation for
Ybus in terms of matrix A is :
YBus = AT [Y] A
The method is known as singular transformation method as the matrix A is a singular
matrix. The matrix Y is a primitive admittance matrix. Non-singular transformation method uses
the augmented incidence square matrices.
YBus = Z-1Bus = [PT ZBr P]-1
Where P is the branch path incidence matrix and ZBr is the branch admittance matrix.
SGi = PGi + jQGi
PGi, QGi is active and reactive power generated at the ith bus. Loads are represented by a complex
number SDi as:
SDi = PDi + jQDi
where,
SDi is complex power demand/load at the tth bus. PDi, QDi is active and reactive power
demanded at the ith bus.
It may be seen that SGi abd SDi denote the local power generation and load respectively at
the ith bus. Si is the difference of SGi and SDi. Therefore
Si = Pi +jQi = SGi SDi = (PGi PDi) + j( QGi QDi)
Si, Pi,Qi are complex power, active power and reactive power respectively injected at the ith bus.

Algorithm:
STEP 1: Start.
STEP 2: Read the datas
i) Number of buses.
ii) Number of lines.
iii) Series impedance.
iv) Starting and ending bus no.
STEP 3: Initialize
i) YBus matrix.
ii) Bus incidence matrix.
iii) Primitive impedance matrix.
iv) Primitive admittance matrix.
STEP 4: Form bus incidence matrix, primitive impedance/ admittance matrix using Formula.
STEP 5: Print the primitive admittance matrix Yp.
STEP 6: Check for mutual coupling.
STEP 7: Read the data
i) No. of coupling elements.
ii) Starting and ending bus no.
iii) Coupling impedance.
STEP 8: Form new primitive impedance or admittance matrix.
STEP 9: Form the bus admittance matrix using formula
STEP 10: Print the bus admittance matrix.
STEP 11: Stop.

PROGRAM CODE:
clc;
disp('Y-BUS Formation By Singular Transformation Method');
nb=input('Enter the number of Buses:');
nl=input('Enter the number of Elements:');
a=zeros(nb,nl);
zp=zeros(nl,nl);
yp=zeros(nl,nl);
yb=zeros(nb,nb);
for i=1:nl
l=input('Enter the line number:');
sb(i)=input('Enter the starting Bus number:');
if sb(i)>0
a(sb(i),i)=1;
end
se(i)=input('Enter the Ending Bus number:');
if se(i)>0
a(se(i),i)=-1;
end
zp(l,l)=input('Enter the series impedence');
yp(l,l)=inv(zp(l,l));
end
a
zp
yp
coupling=input('Is the line Mutually Coupled? yes=1 no=0; Enter your
Option:');
if (coupling==1)
k=input('Enter the number of coupling to be added');
for i=1:k
l=input('Enter the starting Line number');
m=input('Enter the Ending Line number');
z=input('Enter the coupling Impedence');
yp(l,m)=1/z;
yp(m,l)=yp(l,m);
end
end
yb=a*yp*a';
yb

OUTPUT:
Y-BUS
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
a =

Formation By Singular Transformation Method


the number of Buses:3
the number of Elements:5
the line number:1
the starting Bus number:1
the Ending Bus number:0
the series impedence0.2j
the line number:2
the starting Bus number:1
the Ending Bus number:2
the series impedence0.3j
the line number:3
the starting Bus number:3
the Ending Bus number:1
the series impedence0.3j
the line number:4
the starting Bus number:2
the Ending Bus number:3
the series impedence0.5j
the line number:5
the starting Bus number:2
the Ending Bus number:0
the series impedence0.4j

1
1
-1
0
0
0
-1
0
1
1
0
0
1
-1
0
Is the line Mutually Coupled? yes=1 no=0; Enter
Enter the number of coupling to be added2
Enter the starting Line number1
Enter the Ending Line number3
Enter the coupling Impedence0.6j
Enter the starting Line number5
Enter the Ending Line number4
Enter the coupling Impedence0.8j
yb =
0.0000 - 8.3333i
0.0000 + 3.3333i
0.0000
0.0000 + 3.3333i
0.0000 -10.3333i
0.0000
0.0000 + 1.6667i
0.0000 + 3.2500i
0.0000
Is the line
yb =
0.0000
0.0000 +
0.0000 +

your Option:1

+ 1.6667i
+ 3.2500i
- 5.3333i

Mutually Coupled? yes=1 no=0; Enter your Option:0


11.6667i
3.3333i
3.3333i

0.0000 + 3.3333i
0.0000 -7.8333i
0.0000 + 2.0000i

0.0000 + 3.3333i
0.0000 + 2.0000i
0.0000 - 5.3333i

VIVA QUESTIONS
1.What is bus admittance matrix?
The matrix consisting of self and mutual admittances of the network of a power system is
called bus admittance matrix. It is given by the admittance matrix Y in the node basis matrix
equation of apower system and it is denoted as Ybus. The bus admittance matrix is symmetrical.
2.What is primitive admittance matrix?
A primitive admittance matrix is a matrix which is an inverse of primitive impedance
matrix, the diagonal elements of the primitive impedance matrix being the self impedance of the
network elements and the off-diagonal elements, the mutual impedances between the network
elements.
3.Write the equation to find the elements of new bus admittance matrix after eliminating
nth row and column in a n*n bus admittance matrix.
The element Yjk of new bus admittance matrix is given by
Yjk,new=Yjk

For j=1,2,3(n-1)
k=1,2,3,.(n-1)
Where Yjk, Yjn, Ynk and Ynn are elements of original or given bus admittance matrix of order
(nn).
4.What is the limitation for direct inspection method?
The impedance and admittances can be found by direct inspection method provided mutual
coupling between the elements of the given power system network is neglected.
5. What is Bus:
The meeting point of various components of a power system is called as a bus. Bus
conductor is made up of copper or aluminum wire of negligible resistance.

6. How you represent Y bus matrix?


Admittance matrix is represented as Y, for bus admittance matrix it is represented as Ybus.
a) The diagonal element of a bus admittance matrix is called as self admittance of a bus.
b) Half diagonal elements of a bus admittance matrix are called as mutual admittance of the
bus.
7. What is the use of Y bus matrix
In load flow analysis Y bus matrix is used. The load flow equations can also be formed using
either the mesh or node basis equations of power systems.

Result:
The Y bus matrix was formed for the given system by singular transformation method
and the results were verified using MATLAB program.

FORMATION OF ZBUS BY PIVOTAL CONDENSATION METHOD

Aim:
To write a program to determine the Zbus matrix by inverting Y bus matrix using pivotal
condensation method and verifying by directly inversing the Ybus matrix.
Formula used:
n

i.

Ynm = Yno +

ii.

Ynm = Ymn = (

iii.

YBUS (new) = YBUS (old) + Y

iii.

YBUS (new) = YBUS (old) + Y

iv.

akk =

v.

akk = (

Z
m=1 nm
mn
1
Zmn

+ Yln

1
akk
aik
)
akk

aik akj
vi. aij = aij = (
)
akk
where

Ynn
Ynm
aik
Yln
akk
aij

- self admittance of nth bus


-negative sum of admittance connected between node n and m
- elements across rows and columns of pivotal element
-half line charging admittance
-pivotal element
-other element in the matrix

Algorithm:Step 1: Start
Step 2: Read the data
1. Number of lines
2. Number of buses
3. Series impedance between lines/buses
Step 3: Initialize Ybus
Step 4: Form Ybus matrix using formula 1 and 2
Step 5: Read the pivotal element
Step 6: For Zbus using pivotal condensation method by the formulas given
Step 7: print the bus impedance matrix.
Step 8: use inverse matlab command to verify the results
Step 9:Stop:

PROGRAM CODE:
clc;
disp('Y-BUS Formation By Pivotal Condensation Method');
nb=input('Enter the number of buses');
nl=input('Enter the number of lines');
for i=1:1:nl
sb(i)=input('Enter the Starting bus number:');
eb(i)=input('Enter the Ending bus number:');
z(i)=input('Enter the impedence Value:');
end
y=zeros(nb,nb);
for i=1:1:nl
sy(i)=1/z(i);
l=sb(i);
m=eb(i);
y(l,l)=y(l,l)+sy(i);
y(m,m)=y(m,m)+sy(i);
y(l,m)=y(l,m)-sy(i);
y(m,l)=y(m,l)-sy(i);
end
n=input('Enter the number of Impedence to be added:');
for i=1:1:n
b=input('Enter the bus number:');
az=input('Enter the impedence Value:');
y(b,b)=y(b,b)+(1/az);
end
y
z=zeros(nb,nb);
z=inv(y);
z
z=zeros(nb,nb);
for i=1:1:nb
for j=1:1:nb
if (i==j)
z(i,i)=-1/y(i,i);
else
z(i,j)=-(y(i,j)/y(i,i));
z(j,i)=-(y(j,i)/y(i,i));
end
end
end
for l=1:(nb-1)
c(l)= input('Enter the other element:');
end
for d=1:(nb-1)
for m=1:(nb-1)

q=c(d);
p=c(m);
if(q==p)
z(p,p)=(y(p,p) -(y(p,i)*y(i,p))/y(i,i))
else
z(p,q)=(y(p,q)-(y(p,i)*y(i,p))/y(i,i));
z(q,p)=(y(q,p)-(y(q,i)*y(i,q))/y(i,i));
end
end
end
disp(By Pivotal Condensation Method');
z=(-z)

OUTPUT:
Y-BUS
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter

Formation By Pivotal Condensation Method


the number of buses3
the number of lines3
the Starting bus number:1
the Ending bus number:2
the impedence Value:0.2i
the Starting bus number:2
the Ending bus number:3
the impedence Value:0.15i
the Starting bus number:1
the Ending bus number:3
the impedence Value:0.3i
the number of Impedence to be added:2
the bus number:1
the impedence Value:1.2i
the bus number:3
the impedence Value:1.5i

y =
0.0000 - 9.1667i
0.0000 + 5.0000i
0.0000 + 3.3333i

0.0000 + 5.0000i
0.0000 -11.6667i
0.0000 + 6.6667i

0.0000 + 3.3333i
0.0000 + 6.6667i
0.0000 -10.6667i

0.0000 + 0.6968i
0.0000 + 0.6581i
0.0000 + 0.6290i

0.0000 + 0.6581i
0.0000 + 0.7548i
0.0000 + 0.6774i

0.0000 + 0.6290i
0.0000 + 0.6774i
0.0000 + 0.7137i

z =

Enter
Enter
Enter
Enter
Enter
Enter

the
the
the
the
the
the

other
other
other
other
other
other

element:2
element:3
element:1
element:3
element:1
element:2

By Pivotal Condensation Method


z =
0.0000 + 0.6968i
0.0000 + 0.6581i
0.0000 + 0.6290i

0.0000 + 0.6581i
0.0000 + 0.7548i
0.0000 + 0.6774i

0.0000 + 0.6290i
0.0000 + 0.6774i
0.0000 + 0.7137i

VIVA QUESTIONS
1.Write the four ways of adding an impedance to an existing system so as to modify bus
impedance matrix. (NOV12)
To modify a bus impedance matrix, a branch of impedance Zb can be added to original
system in the following four different ways.
Case 1:Adding a branch of impedance Zb from a new bus-p to the reference bus.
Case 2:Adding a branch of impedance Zb from a new bus-p to an existing bus-q.
Case 3:Adding a branch of impedance Zb from a existing bus-q to the reference bus.
Case 4:Adding a branch of impedance Zb between two existing buses n and q.
2.What are the advantages of Zbus building algorithm?
For Zbus calculations by using singular transformation or non-singular transformation
methods, involving inversions and multiplications. This is a time consuming process for large
system consists of hundreds of buses. But the Zbus building algorithm is systematically element
by element is considered for addition and build the complete network directly from the element
parameters.
3.What is primitive impedance matrix?
The elements of the primitive impedance matrix are the self and mutual impedance of
individual network elements with their interconnection not considered
4.What are the factors that need to be omitted for an impedance diagram to reduce it to a
reactance diagram? (or) What are the approximations made in reactance diagram?
The following approximations are made in the raectance diagram:
The neutral reactances are neglected.
Shunt branches in the equivalent circuits of transformers are neglected.
The resistances are neglected.
All static loads and induction motors are neglected.
The capacitance of the transmission lines are neglected.

5.Write the formula to find pivotal elements

-1
Pivotal element = a'kk = -------akk
-aki
Pivotal row = a'ki = -------akk
-ajk
Pivotal column = a'jk = -------akk
(aik akj)
Other element = aij = aij - --------akk
7. What is the use of Z bus matrix
In fault analysis Z bus matrix is used to find the fault current in power systems.
8. Write the methods to find Z bus matrix
a.By inverting Y bus matrix
b.Pivotal condensation method
c.Bus building algorithm

Result:
The Zbus matrix using pivotal condensation method has been executed and
verified successfully in MATLAB

CALCULATION OF SYMMETRICAL COMPONENTS


Aim:
To write a Matlab program to determine the symmetrical components for the given
values for the following conditions
i) No line is open
ii) One line is open
iii) Two line is open

Formula used:
Symmetrical components for phase voltages
0
1 1 1
[+ ] = [1
3
1 2

1
2 ] [ ]

Symmetrical components for phase voltages


0
1 1 1
[+ ] = [1
3
1 2

1
2 ] [ ]

Zero sequence components,


0 = 0 = 0
0 = 0 = 0
Positive sequence components,
+ = 2 +
+ = +
+ = 2 +
+ = +
Negative sequence components,
=

= 2

= 2

Theory:
The analysis of unsymmetrical polyphase network by the method of symmetrical
components was introduced by Dr. C. Fortesque. He proved that an unbalanced system of n
related vectors can be resolve into n system of balanced vectors called symmetrical components
of original vectors. The n vectors of each set of components are equal in length and the phase
angles between adjacent vectors of the set are equal.
In a three phase system, the three unbalanced vectors can be resolved into three balanced
system of vectors. The vector of the balanced system is called symmetrical components of the
original system.
The symmetrical components of three phase systems are
1. Positive sequence components
2. Negative sequence components
3. Zero sequence components.
The positive sequence components consists of three vectors equal in magnitude,
displaced from each other by 120 degree in phase and having the same phase sequence as the
original vectors.
The negative sequence components consists of three vectors equal in magnitude
displaced from each other by 120 degree in phase, and having the phase sequence opposite to
that of the original vectors.
The zero sequence components consist of three equal vectors in magnitude and with zero phase
displacement from each other.
Let Va,Vb and Vc be the set of unbalanced voltage vectors with phase sequence abc. Each
voltage vector can be resolved in positive, negative and zero sequence components. Let Va1, Vb1
and Vc1 positive sequence components of Va,Vb and Vc respectively with phase sequence abc.
Va2, Vb2, Vc2 negative sequence components of Va, Vb, and Vc respectively with phase sequence
acb. Va0, Vb0 and Vc0 zero sequence components of Va, Vb and Vc respectively.

Vc1

VB2
120

120

120

120
Va1

Va2

120

120
VC2
Negative Sequence Component

Vb1
Positive Sequence Component
Va0

Vb0
Vc0

Zero Sequence Components


From the vector diagram of symmetrical components the following conclusion are made:
1. On rotating the vector Va1 by 120 degree in anticlockwise direction we get Vb1
2. On rotating the vector Va1 by 240 degree in anticlockwise direction we get Vc1
3. On rotating the vector Va2 by 120 degree in anticlockwise direction we get Vc1
4. On rotating the vector Va2 by 240 degree in anticlockwise direction we get Vb2
Therefore on rotating the symmetrical components of one vector by 120 degree or multiples
of 120 degree we get the symmetrical components of other vectors. Hence we can define an
operator which causes a rotation of 120 degree in the anticlockwise direction; such an operator is
denoted by the letter a.

The operator a is defining as.


a
=1
=1+ ej2/3
= Cos (2/3)+j Sin (2/3)
=0.5 + j0.866
since
a2 = -0.5-j0.866
a3
=1
Therefore 1+a2+a3=1 + (-0.5+j0.866) + (-0.5-j0.866) =0

Symmetrical components of unbalanced current vectors:The symmetrical components of unbalance current vectors can be obtained by an analysis
similar to that of voltage vectors. All the equations developed for voltages can be used for
current if we replace V by I. Let Ia, Ib, Ic unbalanced current vectors with phase sequence abc. Ia1,
Ib1, Ic1 positive sequence components of Ia, Ib, and Ic respectively with phase sequence abc. Ia2, Ib2
and Ic2 negative sequence components of Ia, Ib, and Ic respectively with phase sequence acb. Ia0,
Ib0, and Ico zero sequence components of Ia, Ib, and Ic.
Computation of unbalanced vectors from their symmetrical components:Each of the original unbalanced vectors is the sum of its positive, negative and zero
sequence components. Therefore the original unbalanced three phase voltage vectors can be
expressed in term of their components as shown below

Va = Va0 + Va1 + Va2


Vb = Vb0 + Vb1 + Vb2
Vc = Vc0 + Vc1 + Vc2
Vb0 = Va0

Vb1 = a2Va1
Va = Va0 + Va1 + Va2
Vb = Va0 +a2Va1 +aVa2
Vc = Va0 +aVa1 +a2Va2

Vb2 = aVa2

The above can be arranged in the matrix from as below


0
1
1
[+ ] = 3 [1
1

1
2 ] [ ]

The equation can be used to compute the unbalanced voltage vectors from the knowledge of
symmetrical components. Transformation from phase quantities to symmetrical components in
MATLAB is very easy. Once the symmetrical components transformation matrix A is defined its
inverse is found using the MATLAB function inv. However, for quick calculations and graphical
demonstration the following functions are developed for symmetrical component analysis.
Sctm- The symmetrical components transformation matrix A is defined in this script file. Typing
sctm defines A.Phasor (F) this function makes plots of phasors. The rectangular complex form or
as an nx2 matrix. In the later case, the first column is the phasor magnitude and the second
column is its phase angle in degree.
Fabc= SC2abc (F012) this function returns the unbalanced phasor in rectangular form when
symmetrical components are specified. F012 may array in rectangular complex form or as a 3x2
matrix. In the later case, the first column is the phasor magnitude and the second column is its
phasor magnitude and second column is its phase angle in degree for the zero-positive and
negative sequence components. In addition the function produces a plot of the unbalanced
phasors and its symmetrical components.

Algorithm:
STEP 1: Start
STEP 2: Read the magnitude and angle of phase current and voltage
STEP 3: Calculate the radian form of angle
STEP 4: Initialize j operation
STEP 5: Convert polar to rectangular form for the phase currents
STEP 6: Check for the conditions
1. Symmetrical to phasor component
2. Phasor to symmetrical component
STEP 7: Calculate the components value using formula
STEP 8: Print the results
STEP 9: Stop

PROGRAM CODE:
clc;
disp('1.Symmetrical Components to Phasor Component 2. Phasor component to
symmetrical component:');
ch=input('Enter the Choice:');
i=sqrt(-1);
switch(ch)
case 1
mia0=input('Enter the Magnitude of Zero sequence Current:');
aia0=input('Enter the Angle of Zero sequence Current:');
mia1=input('Enter the Magnitude of positive sequence Current:');
aia1=input('Enter the Angle of positive sequence Current:');
mia2=input('Enter the Magnitude of negative sequence Current:');
aia2=input('Enter the Angle of negative sequence Current:');
[x1,x2]=pol2cart(aia0*pi/180,mia0);
[y1,y2]=pol2cart(aia1*pi/180,mia1);
[z1,z2]=pol2cart(aia2*pi/180,mia2);
x=(x1+(x2*i))
y=(y1+(y2*i))
z=(z1+(z2*i))
ia=x+y+z;
ib=x+y*(-0.5-0.866*i)+z*(-0.5+0.866*i);
ic=x+z*(-0.5-0.866*i)+y*(-0.5+0.866*i);
ia
ib
ic
case 2
mia=input('Enter the Magnitude of Zero sequence Current:');
aia=input('Enter the Angle of Zero sequence Current:');
mib=input('Enter the Magnitude of positive sequence Current:');
aib=input('Enter the Angle of positive sequence Current:');
mic=input('Enter the Magnitude of negative sequence Current:');
aic=input('Enter the Angle of negative sequence Current:');
[x1,x2]=pol2cart(aia*pi/180,mia);
[y1,y2]=pol2cart(aib*pi/180,mib);
[z1,z2]=pol2cart(aic*pi/180,mic);
x=(x1+(x2*i))
y=(y1+(y2*i))
z=(z1+(z2*i))
ia0=(1/3)*(x+y+z);
i2=(1/3)*(x+(y)*(-0.5-0.866*i)+(z)*(-0.5+0.866*i));
i1=(1/3)*(x+z*(-0.5-0.866*i)+y*(-0.5+0.866*i));
ia0
i1
i2
end

OUTPUT:
1. Symmetrical Components to Phasor Component
2. Phasor component to symmetrical component:
Enter the Choice:2
Enter the Magnitude of Current in Phase A:10
Enter the Angle of Current in Phase A:0
Enter the Magnitude of Current in Phase B:12
Enter the Angle of Current in Phase B:230
Enter the Magnitude of Current in Phase C:10
Enter the Angle of Current in Phase C:130
ia0 =
-1.3804 - 0.5107i
i1 =
10.5551 - 0.1158i
i2 =
0.8253 + 0.6265i
1.Symmetrical Components to Phasor Component
2. Phasor component to symmetrical component:
Enter the Choice:1
Enter the Magnitude of Zero sequence Current:1.47
Enter the Angle of Zero sequence Current:-160
Enter the Magnitude of positive sequence Current:10.56
Enter the Angle of positive sequence Current:-0.6
Enter the Magnitude of negative sequence Current:1.04
Enter the Angle of negative sequence Current:37
ia =
10.0087 + 0.0125i
ib =
-7.7141 - 9.1856i
ic =
-6.4386 + 7.6648i

VIVA QUESTIONS
1. What are sequence impedance and sequence networks?
The sequence impedances are the impedances offered by the devices or components for the like
sequence components of the current.
The single phase equivalent circuit of a power system consisting of impedances to current of any
sequence only is called sequence network.
2. What is meant by positive, negative and zero sequence reactance diagram?
The reactance diagram of a power system, when formed using positive, negative and zero
sequence reactance are called positive, negative and zero sequence reactance diagram.
3. Prove that 1+a+a2 = 0?
a = -0.5+j0.866
a2 =

-0.5-j0.866

1+a+a2 =1 -0.5+j0.866 -0.5-j0.866


=0
Hence it is proved.
4. Define negative sequence impedance?
It is the impedance offered by the equipment to the flow of negative sequence current.
5. Name the faults which do not have zero sequence current following?
In line to line faults the zero sequence currents do not flow.
6. Define positive sequence impedance?
It is the impedance offered by the equipment to the flow of positive sequence current.

Result:
Thus the MATALAB program for the calculation of symmetrical components are
executed and output is verified theoretically

SYMMETRICAL FAULT ANALYSIS


Aim:
To write a MATLAB program, to study the symmetrical three phase fault analysis for the
given power system by bus impedance matrix method.

Software used:
MATLAB 7.5 version

Formula Used:
a. Fault Current, If =

b. Fault Voltage, Vf = (1

where Zf Fault impedance


Zpp Line impedance

Theory:
Short circuits and other abnormal conditions often occur on a power system. Short
circuits are usually called faults by power system engineers. Some defects, other than short
circuits are also termed as faults.
Faults are caused either by insulation failures or by conducting path failures. The failure
of insulation results in short circuits which are very harmful as they may damage some
equipment of the power system. Most of the faults in transmission and distribution lines are
caused by over voltages due to lightning or switching surges, or by external conducting objects
falling on overhead lines. Overvoltages due to lightning or switching surges cause flashover on
the surface of insulators resulting in short circuits. Short circuits are also caused by tree branches
or other conducting objects falling on the overhead lines.

The fault impedance being low, the fault currents are relatively high. The fault currents
being excessive, they damage the faulty equipment and the supply installation. Also, the system
voltage may reduce to a low level, windings and bus bars may suffer mechanical damage due to
high magnetic forces during faults and the individual generators in a power station or group of
generators in different power stations may loose synchronism. The symmetrical fault occurs
when all the three conductors of a three-phase line are brought together simultaneously into a
shortcircuit condition as shown in Figure 1.

Fig 1. Symmetrical Fault on Three-Phase system


This type of fault gives rise to symmetrical currents i.e. equal fault currents with 120 0
displacement. Thus referring to Figure 1, fault currents IA, IB and IC will be equal in magnitude with 1200
displacement among them. Because of balanced nature of fault, only one phase needs to be considered in
calculations since condition in the other two phases will also be similar.
A three-phase short circuit occurs rarely but it is most severe type of fault involving largest
currents. For this reason, the balanced short-circuit calculations are performed to determine these
large currents to be used to determine the rating of the circuit breakers.

Algorithm:
Step 1: Read line data, machine data, transformer data, fault impedance etc.
Step 2: Compute [Ybus] matrix and calculate [Ybus]modified.
Step 3: Form [Zbus] by inverting the [Ybus] modified.
Step 4: Initialize count I = 0.
Step 5: Find the bus at which fault occurs I=I+1.
Step 6: Compute fault current at faulted bus and bus voltage at all buses.
Step 7: Compute all line and generator currents.
Step 8: Check if I< number of buses, if yes goes to step 5 else go to step 9.
Step 9: Print the results and stop the program.

PROGRAM CODE:
clc;
display('SYMMETRICAL FAULT ANALYSIS');
nb=input('Enter the number of buses:');
nl=input('Enter the number of lines:');
for i=1:1:nl
sb(i)=input('Enter the Starting bus number:');
eb(i)=input('Enter the Ending bus number:');
z(i)=input('Enter the impedence Value:');
shy(i)=input('Enter the halfline charging admitance:');
end
y=zeros(nb,nb);
for i=1:1:nl
sy(i)=1/z(i);
l=sb(i);
m=eb(i);
y(l,l)=y(l,l)+sy(i)+shy(i);
y(m,m)=y(m,m)+sy(i)+shy(i);
y(l,m)=y(l,m)-sy(i);
y(m,l)=y(m,l)-sy(i);
end
y
n=input('Enter the number of Impedence to be added:');
for i=1:1:n
b=input('Enter the bus number:');
az=input('Enter the impedence Value:');
y(b,b)=y(b,b)+(1/az);
end
y
zb=inv(y);
zb
k=input('Enter the faulted Bus Number');
ifault=1/zb(k,k);
vf=zeros(nb);
for i=1:1:nb
vf(i)=(1-zb(i,k)/zb(k,k));
end
vf(k)=0;
vf
for l=1:1:(nb)
for m=1:1:(nb)
ist(l,m)=(vf(l)-vf(m))/zb(l,m);
end
end
ist

OUTPUT:
SYMMETRICAL FAULT ANALYSIS
Enter the number of buses:3
Enter the number of lines:3
Enter the Starting bus number:1
Enter the Ending bus number:2
Enter the impedence Value:0.13j
Enter the halfline charging admitance:0
Enter the Starting bus number:1
Enter the Ending bus number:3
Enter the impedence Value:0.08j
Enter the halfline charging admitance:0
Enter the Starting bus number:2
Enter the Ending bus number:3
Enter the impedence Value:0.03j
Enter the halfline charging admitance:0
y =
0.0000 -20.1923i
0.0000 + 7.6923i
0.0000
0.0000 + 7.6923i
0.0000 -41.0256i
0.0000
0.0000 +12.5000i
0.0000 +33.3333i
0.0000
Enter the number of Impedence to be added:2
Enter the bus number:1
Enter the impedence Value:0.25j
Enter the bus number:2
Enter the impedence Value:0.2j
y =
0.0000 -24.1923i
0.0000 + 7.6923i
0.0000
0.0000 + 7.6923i
0.0000 -46.0256i
0.0000
0.0000 +12.5000i
0.0000 +33.3333i
0.0000
zb =
0.0000 + 0.1274i
0.0000 + 0.0981i
0.0000
0.0000 + 0.0981i
0.0000 + 0.1215i
0.0000
0.0000 + 0.1061i
0.0000 + 0.1151i
0.0000
Enter the faulted Bus Number3
vf =
0.2111
0.1439
0
ist=
-0.6889i
-1.9999i
-1.2434i

+12.5000i
+33.3333i
-45.8333i

+12.5000i
+33.3333i
-45.8333i
+ 0.1061i
+ 0.1151i
+ 0.1345i

VIVA QUESTIONS
1. What are symmetrical components?
An unbalanced system of N related vectors can be resolved into N systems of balanced vectors.
The N- set of balanced vectors are called symmetrical components.
2. What are positive sequence components?
It consists of three vectors of equal magnitude, displaced from each other by 120 degree in phase
and having the same phase sequence as the original vectors.
3. What are negative sequence components?
It consists of three vectors of equal magnitude, displaced from each other by 120 degree in phase
and having the phase sequence opposite to that of the original vectors.
4. What are zero sequence components?
It consists of three vectors of equal magnitude, and with zero phase displacement from each
other.
5. Express the value of the operator a and a2 in both polar and rectangular form?
a = 1 120 - polar form
= -0.5+j0.866 rectangular form
a2 = 1 240 - polar form
= -0.5-j0.866 rectangular form

Result:
The program to carry out the simulation study of a symmetrical three phase short circuit
on a given power system was developed and the results were verified.

UNSYMMETRICAL FAULT ANALYSIS


Aim:
To calculate the fault current and line to line voltage for
i.
ii.
iii.

Single line to ground fault


Line to Line fault
Double line to ground fault

Formula used:
1. Single line to ground fault:Fault current If =3Ia+ = (3*Ea) / (Z0+Z++Z-)
Where,
Ea

Generator equivalent

Z0

Zero sequence

Z+

Positive sequence impedance

Z-

Negative sequence impedance

Line voltage,
Vab = Va Vb
Vbc = Vb Vc
Vca = Vc Vb
Prefault voltage (Vpf=1pu)
Ea = 1 0
Ia0 = Ia/3

The unbalanced voltage are related to sequence component voltage by following equation
Va
1
V
[ b ] = [1
Vc
1

1
a2
a

1 Va0
a ] [Va+ ]
a2 Va

Where
Va = Va0 + Va+ + VaVb = Va0 + a2Va+ + aVaVc = Va0 + aVa+ + a2 VaThe matrix given below will be useful in the analog of unsymmetrical faults on the generator
Va0
0
Z0
[Va+ ] = [Eq ] [ 0
Va
0
0

0
Z+
0

0
0]
Z

Where
Va0
Va+
Va-

= -Z0 Ia0
=E Z+ Ia+
= -ZIa-

Sequence current
Ia
1
[Ib ] = [1
Ic
1

1
a2
a

1 Ia
a ] [0]
a2 0

Ia0 = Ia+ = Ia- = Ia/3


Actual voltage
Vab(act) = Vab(p.u) * base KV/sqrt(3)
If(act)

= If(p.u) * base(If)

If base= P/(sqrt(3)V)

2. Line to line fault:Ia0

=0

Ia2

=Ea/(Z+ + Z-)

Ia2

= -Ia1

Va0

=-Z0 Ia0

Va1

=Ea Z+Ia1

Va2

=-Z-Ia2 = Z-Ia1

3. Double line to ground fault


Ia0

=(-Ea+Ia1Z+)/(Z0 + 3Zf)

Ia1

=(Ea(Z-+(Z0+3Zf)))/(Z-Z0 + Z+Z- + Z+Z0)

If

-3EaZ-/( (Z- Zo)+(3Z- Zf)+(Z+ Z-)+(Zo Z+)+(3Z+ Zf) )

Iao
Ia+
Zf) )
Ia-

=
=

If / 3
Ea (Z- + Zo+ 3Zf ) / ( (Z- Zo)+(3Z- Zf)+(Z+ Z-)+(Zo Z+)+(3Z+

-( Iao + Ia+ )

Ea
Zo
Z+
ZVa ,Vb ,Vc
Vab Vbc Vca
If
Iao, Ia+, Ia-

generator voltage
zero sequence impedance
positive sequence impedance
negative sequence impedance
phase voltages
line voltages
fault current
zero, positive and negative sequence current

Where

Theory:
The unsymmetrical faults are faults in which the fault current in the tree phases are
unequal. The different types of unsymmetrical faults are
1.
2.
3.
4.

Single line to ground fault


Line to line fault
Double line to ground fault
One or two open conductor fault

Since any unsymmetrical faults cause unbalanced currents to flow in the system, the
unsymmetrical faults are analyses using symmetrical components. The concepts of symmetrical
components and sequence network developed in used for the analysis of unsymmetrical faults.
Unsymmetrical faults on power system
The unsymmetrical faults on the power system are analyzed using thevenins equivalent
of positive, negative and zero sequence network of the power system. The thevenins equivalent
is obtained with respect to fault point and reference.
In power system the prefault voltage and current are assumed to be balanced. Hence the
prefault voltage at the fault points is balanced voltage and so it has only positive sequence
component. The negative and zero sequence components of prefault voltage at the fault point is
zero. Therefore the prefault voltage at the fault point is thevenins voltage of positive sequence
network.
Let
Z1

= thevenins impedance of positive sequence network

Z2

= thevenins impedance of negative sequence network

Z0

=thevenins impedance of zero sequence network

Thevenins equivalent of positive, negative and zero sequence networks of the power system
with respect to fault point will be respectively

Z1

Z2

Z1Ia1
Va1

Z2Ia2

Z0
Va2

Z0Ia0
Va0
1

Vpf1

Va0

= -Z0 Ia0
Va1

= Vpf Z1Ia1

Va2

=-Z2Ia2

On arranging the equation is the matrix form we get,

Va0
0 Z0
V
V
[ a1 ] = [ pf ] [ 0
Va2
0
0

0
Z1
0

0 Ia0
0 ] [Ia1 ]
Z2 Ia2

The matrix equation will be useful in the analyses of unsymmetrical faults on the power system.
Single line to ground fault on a power system:The single line to ground fault on a power system can be represented by connecting three
stubs on the three transmission lines. The voltage and current under this fault condition is given
by, Ib=0, Ic=0, Va=0 are same as that of single line to ground fault on a single on a single
generator. The relation of symmetrical components must also have the same solution except that
Vpf replaces Ea, this for a line to ground fault.
Ia1 = Ia2 = Ia0 =Ia3 and Ia1 = (Vpf)/(Z1+Z2+Z0)
In the two equations indicates that the three sequence network should be connected in
series through the fault point in order simulate a single line to ground fault.
Line to Line fault on a power system
The line to line fault on a power system can be represented by connecting three stubs on
the three transmission lines. The following relation exist at the fault
Vb = Vc, Ia = 0, Ib = -IC
The voltage and current under this fault condition is given by equation are same as that of a line
to line fault on an isolated generator discussed in, the hence for a line to line fault. Va1=Va2
Ia1 = Vpf/(Z1+Z2)
The equation indicates that the positive and negative sequence network should be connected in
parallel at the fault point in order to simulate a line to line fault.

Double line to ground fault on a power system


The double line to ground fault on a power system can be represented by connecting three stubs
on the three transmission lines. The following relation must at the fault.
Vb = Vc=0; Ia=0
The voltage and current under this fault condition as shown are same as that of a double line to
ground fault on a isolated generator discussed section. Hence, for a double line to ground fault.
Va1= Va2 = v1ao. . .(or)
Ia1=Vpf/(Z1+ (Z2Z0/(Z2+Z0)
The two equation indicates that the three sequence network should be connected in parallel at the
fault point in order to simulate a double line to ground fault.

Algorithm:
STEP 1 : Start
STEP 2 : Read the data
i)
Base MVA
ii)
Base kV
iii)
Actual kV
iv)
Zero,+ve,-ve sequence impedance
STEP 3 : To check for the condition
i)
Line to line fault
ii)
Single line to ground fault
iii)
Double line to ground fault
STEP 4 : Calculate actual values of fault current and line to line voltages using formula
STEP 5 : Print the values
STEP 6 : Stop

PROGRAM CODE:
clc;
disp('Unsymmetrical fault analysis:');
bm=input('Enter the MVA base:');
bk=input('Enter the base kv:');
z0=input('Enter the zero seq reactance:');
z1=input('Enter the positive seq reactance:');
z2=input('Enter the negative seq reactance:');
zf=input('Enter the fault reactance:');
ib= bm/(1.732*bk);
Ea=(bk/bk);
i= sqrt(-1);
p=-0.5+(0.866*i);
q=-0.5-(0.866*i);
fprintf('\n1.Single Line to Ground Fault:\n2.Line to Line Fault:\n3.Double
Line To Ground fault:');
a=input('Enter the choice:');
switch(a)
case 1
ifa=(3*Ea)/((3*If)+z0+z1+z2)
ia1=ifa/3;
ia2=ia1;
ia0=ia1;
fprintf('\n1.Fault at c:\n2.Fault at a:\n3.Fault at b:');
b=input('Enter the choice:');
case 2
ifa=-1*(Ea*(1.732*i)*Ea)/(z1+z2)
ia0=0;
ia1=Ea/(z1+z2);
ia2=-1*(ia1);
fprintf('\n1.Fault in a,b:\n2.Fault in b,c:\n3.Fault in c,a:');
b=input('Enter the choice:');
case 3
ia1=(Ea*(z2+z0))/(z2*z0)+(z1*z2)+(z1*z0)
ia0=((-Ea)+(ia1*z1))/(z0+3*zf)
ia2=((ia1*z1)-Ea)/z2;
ifa=3*ia0;
fprintf('\n1.Fault bw a,b and gnd;\n2.Fault bw b,c and gnd;\n3. Fault
bw c,a and gnd');
b=input('Enter the choice');
end
va0=-1*(z0*ia0);
va1=Ea-(z1*ia1);
va2=-1*(z2*ia2);
va=(va0+va1+va2);

vb=(va0+(q*va1)+(p*va2));
vc=(va0+(p*va1)+(q*va2));
vab=va-vb;
vbc=vb-vc;
vca=vc-va;
vaba=(vab*bk)/sqrt(3);
vbca=(vbc*bk)/sqrt(3);
vcaa=(vca*bk)/sqrt(3);
ifac= (ifa*ib);
if(b==1)
vca=vaba
vab=vbca
vbc=vcaa
elseif(b==2)
vab=vaba
vbc=vbca
vca=vcaa
elseif(b==3)
vbc=vaba
vca=vbca
vab=vcaa
end

OUTPUT:
Unsymmetrical fault analysis:
Enter the MVA base:20
Enter the base kv:11
Enter the zero seq reactance:0.06i
Enter the positive seq reactance:0.25i
Enter the negative seq reactance:0.146i
Enter the fault reactance:0
1.Single Line to Ground Fault:
2.Line to Line Fault:
3.Double Line To Ground fault:
Enter the choice:1
ifa =
0.0000 - 6.5789i
1.Fault at c:
2.Fault at a:
3.Fault at b:
Enter the choice:2
vab =
1.2535 + 4.2455i
vbc =
0.0000 - 8.4910i
vca =
-1.2535 + 4.2455i
Enter the choice:2
ifa =
-4.3737
1.Fault in a,b:
2.Fault in b,c:
3.Fault in c,a:
Enter the choice:2
vab =
7.0244 + 0.0000i
vbc =
0.0000e+00 - 1.4102e-15i
vca =
-7.0244 + 0.0000i
Enter the choice:3
ia1 =
-0.0515 -23.5160i
ia0 =
-0.2146 -81.3166i
1.Fault bw a,b and gnd;
2.Fault bw b,c and gnd;
3. Fault bw c,a and gnd

Enter the choice3


vbc =
-92.9573 + 0.2453i
vca =
0
vab =
92.9573 - 0.2453i

VIVA QUESTIONS
1. Write the symmetrical components of the 3 phase system?
In a 3 phase system, the three unbalanced vectors can be resolved into three balanced system of
vectors. They are (i) Positive sequence components.
(ii) Negative sequence components.
(iii) Zero sequence components.
2. What is meant by positive, negative and zero impedances?
The impedance of a circuit element for positive, negative and zero sequence component currents are
called positive, negative and zero impedances.
3. What is the use of operator in symmetrical components?
To deal with the unbalanced problems in general and to assist in defining the relationships between
the phase voltages and also the phase currents, we use sequence operator .
4. Write the symmetrical component transformation matrix?
The symmetrical component transformation matrix is

T=
5. Will there be zero sequence currents in a delta connection?
There are no zero sequence currents in a delta connection.
6. What is meant by impedance to positive sequence current?
The impedance of the circuit when positive sequence currents alone are following is called
impedance to positive sequence current.
7. Name the fault in which positive, negative and zero sequence component currents are equal?
In Single line-to-ground fault the positive, negative and zero sequence component current are equal.

8. Name the fault in which positive, negative component currents together is equal to zero sequence
current in magnitude?
Double line-to-ground fault .
In three phase faults the negative and zero sequence currents are absent.

Result:
The subtransient current and the line to line voltage for various fault condition are
determined and the output is verified, theoretically and also using MATLAB

LOAD FLOW ANALYSIS USING GAUSSS SEIDAL METHOD


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.
FORMULA USED:
i.

For diagonal element


nb

Ynn = Yno + Ynm + Yen


m=1
mn

ii.

For half diagonal elements


Ynm = Ymm = [

iii.

1
]
Ynm

If the bus is a generator bus or load bus


VpK+1

p1

q=

q=p+1

1 Pp jQp
=
[
Ypq VqK+1 Ypq VpK ]
Ypp (VpK )+

Where

iv.

VpK

= Kth iteration value of bus voltage VP

VpK+1

=( K +1) th iteration value of bus voltage VP

If the bus is generator by


p1

QK+1
p

= (1) Im [(Vp )

[ Ypp VqK+1
q=1

K+1
p

= tan

img of VpK+1

[
]
real of VpK+1

+ Ypq Yqk ]]
q=p

v.

If the bus is a load by


Vp K+1
= VpK + (VpK+1 VpK )
(acc)
Where
- acceleration factor
VpK+1 VpK =VpK+1 = change in bus voltage

THEORY:
The gauss seidal method is an iterative algorithm for solving a set of non-linear load flow
equation. The non-linear lad flow equation are given by
VpK+1

p1

q=1

q=p+1

1 Pp jQp
=
[
Ypq VqK+1 Ypq VpK ]
Ypp (VpK )+

When p=1,2,3...n and this equation is presented here for convenience. The variable in the
equation obtained from the VP=1,2,3n are the node voltage V1, V2... Vn. in gauss seidal
method is initial values of voltage are assumed and they are denoted as V10, V20, V30. On
substituting the initial value in equation and by taking P=1. The revised by value of bus-1
voltage V1 is replaced for initial value V10 and the revised bus-2 voltage v2 is computed. Now
voltage the V1 for V10 and V2 for V20 and performs the calculation for bus-3 and so on. The
process of computing all the voltage as explained above is called one iteration. The iterative
process is then repeated till the bus voltage converges with in prescribed accuracy. The
convergence of bus voltage is quite sensitive to the initial value assumed. Based on practical
experience it is easier to get of initial voltages very close to final solution.
In view of the above discussion the load flow equation can be written in the modified
from as shown below
VpK+1

p1

q=

q=p+1

1 Pp jQp
=
[
Ypq VqK+1 VpK ]
Ypp (VpK )+

Where
ViK

= Kth iteration value of bus voltage Vi

ViK+1

= (K +1) th iteration value of bus voltage Vi

In the equation to compute the (K+1)th iteration values of voltages are used for all buses
is than P and Kth iteration value of voltages are used for all buses grated than or equal to P. the
equation is applicable for load bus. Since in load bus voltage changes in both magnitude and
phase voltage are allowed but is generator bus the magnitude of voltage remains constant and so
the equation is used to calculate the phase of the voltage.
It is important to note that the slack bus is reference bus and so its voltage will not
change. Therefore in each iteration the slack bus voltage is not modified. For a generator bus, the
reactive power is not specified. Therefore in order to calculate the phase of bus voltage and
admittance shown.
p1

Pp jQp
= Ypq Vq + Ypp Vp + Ypq Vq
Vp
q=1

q=p+1

p1

Pp jQp =

Vp [ Ypq Vq
q=1

+ Ypq Vq ]
q=p

This equation from complex power in bus (k+1)th iteration be obtained in equation
p1

K
K+1
PpK+1 QK+1
+ Ypq VqK ]
qp = Vp [ Ypq Vq
q=1

q=p

Also for generator buses a lower and upper limit for reactive powers will be specified in
each iteration. The reactive power of generator bus is calculated using in equation and then
checked with specified values.

ALGORITHM:
Step 1 : Start
Step 2 : Read the data
I.

No. of bus

II.

No. of lines

III.

Admittance value.

Step 3 : Form Y bus


Step 4 : Check for the bus
Step 5 : It is a slack bus go to step 10
Step 6 : If it is a generator bus get the value of P and V calculate the Q and using the formula
given.
Step 7 : If it is a load bus, get the value of P and Q. calculate V using formula given
Step 8 : Check the tolerance limit. If it satisfies the limit go to next step else increase iteration
number and go to Step 5
Step 9 : Calculate the line flow and slack bus power.
Step 10: Stop

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

PROGRAM CODE:
clc;
display('LOAD FLOW ANALYSIS BY GAUSS-SEIDAL METHOD');
b=input('Enter the number of buses:');
nl=input('Enter the number of lines:');
y=zeros(b,b);
for i=1:1:nl
sb(i)=input('Enter the Starting bus number:');
eb(i)=input('Enter the Ending bus number:');
z(i)=input('Enter the impedence Value:');
shy(i)=input('Enter the halfline charging admitance:');
sy(i)=1/z(i);
l=sb(i);
m=eb(i);
y(l,l)=y(l,l)+sy(i)+shy(i);
y(m,m)=y(m,m)+sy(i)+shy(i);
y(l,m)=y(l,m)-sy(i);
y(m,l)=y(m,l)-sy(i);
end
y
v(l)=input('Enter the slack bus voltage:');
v1(l)=v(l);
v2(l)=v(l);
for i=2:b
pg(i)=input('Enter the generator real power in pu:');
qg(i)=input('Enter the generator reactive power in pu:');
pl(i)=input('Enter the load real power in PU:');
ql(i)=input('Enter the load reactive in PU:');
v(i)=input('Enter the initial value of bus voltage:');
P(i)=pg(i)-pl(i);
Q(i)=qg(i)-ql(i);
end
ac=input('Enter the acceleration factor:');
t=input('Enter the tolerance limit:');
n=input('Enter the number of iteration:');
vmax=1;
for h=1:n
if(vmax>t)
for p=2:b
l(p)=0;
l1(p)=0;
for q=1:(p-1)
l(p)=l(p)+(y(p,q)*v1(q));
end

for q=(p+1):b
l1(p)=l1(p)+(y(p,q)*v(q));
end
v1(p)=(((P(p)-Q(p))/conj(v(p)))-l(p)-l1(p))/y(p,p);
va(p)=v(p)+(ac*v1(p)-v(p));
vd(p)=abs(va(p)-v(p));
v1(p)=va(p);
end
for i=2:(b-1)
for j=3:b
if(vd(i)>vd(j))
vmax=vd(i);
else
vmax=vd(i);
end
end
end
for i=1:b
disp('Iteration Number');
h
disp('Bus Number');
i
disp('Bus Voltage');
v1(i)
disp('Difference in Voltage');
vd(i)
end
for i=1:b
v(i)=v1(i);
end
else
break;
end
end

OUTPUT:
LOAD FLOW
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the
Enter the

ANALYSIS BY GAUSS-SEIDAL METHOD


number of buses:3
number of lines:3
Starting bus number:1
Ending bus number:2
impedence Value:0.02+0.04i
halfline charging admitance:0
Starting bus number:1
Ending bus number:3
impedence Value:0.01+0.03i
halfline charging admitance:0
Starting bus number:2
Ending bus number:3
impedence Value:0.012+0.025i
halfline charging admitance:0

y =
20.0000 -50.0000i -10.0000 +20.0000i -10.0000 +30.0000i
-10.0000 +20.0000i 25.6047 -52.5098i -15.6047 +32.5098i
-10.0000 +30.0000i -15.6047 +32.5098i 25.6047 -62.5098i
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter

the
the
the
the
the
the
the
the
the
the
the
the
the
the

slack bus voltage:1.05


generator real power in pu:0
generator reactive power in pu:0
load real power in PU:2.566
load reactive in PU:1.102i
initial value of bus voltage:1
generator real power in pu:0
generator reactive power in pu:0
load real power in PU:1.386
load reactive in PU:0.452i
initial value of bus voltage:1
acceleration factor:1.6
tolerance limit:0.001
number of iteration:10

Iteration Number
h =
1
Bus Number
i =

1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
1
Bus Number
i =
2
Bus Voltage
ans =
0.9727 - 0.0496i
Difference in Voltage
ans =
0.0567
Iteration Number
h =
1
Bus Number
i =
3
Bus Voltage
ans =
0.9942 - 0.0725i

Difference in Voltage
ans =
0.0728
Iteration Number
h =
2
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
2
Bus Number
i =
2
Bus Voltage
ans =
0.9788 - 0.0897i
Difference in Voltage
ans =
0.0405

Iteration Number
h =
2
Bus Number
i =
3
Bus Voltage
ans =
1.0030 - 0.06712i
Difference in Voltage
ans =
0.0143
Iteration Number
h =
3
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
3

Bus Number
i =
2
Bus Voltage
ans =
0.9826 - 0.0516i
Difference in Voltage
ans =
0.0383
Iteration Number
h =
3
Bus Number
i =
3
Bus Voltage
ans =
0.9995 - 0.0354i
Difference in Voltage
ans =
0.0260
Iteration Number
h =
4
Bus Number
i =
1

Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
4
Bus Number
i =
2
Bus Voltage
ans =
0.9789 - 0.0513i
Difference in Voltage
ans =
0.0037
Iteration Number
h =
4
Bus Number
i =
3
Bus Voltage
ans =
0.9990 - 0.0516i

Difference in Voltage
ans =
0.0162
Iteration Number
h =
5
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
5
Bus Number
i =
2
Bus Voltage
ans =
0.9803 - 0.0676i
Difference in Voltage
ans =
0.0164

Iteration Number
h =
5
Bus Number
i =
3
Bus Voltage
ans =
1.0009 - 0.0553i
Difference in Voltage
ans =
0.0042
Iteration Number
h =
6
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
6

Bus Number
i =
2
Bus Voltage
ans =
0.9807 - 0.0604i
Difference in Voltage
ans =
0.0072
Iteration Number
h =
6
Bus Number
i =
3
Bus Voltage
ans =
0.9997 - 0.0468i
Difference in Voltage
ans =
0.0086
Iteration Number
h =
7
Bus Number
i =
1

Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
7
Bus Number
i =
2
Bus Voltage
ans =
0.9796 - 0.0568i
Difference in Voltage
ans =
0.0038
Iteration Number
h =
7
Bus Number
i =
3
Bus Voltage
ans =
0.9995 - 0.0491i

Difference in Voltage
ans =
0.0023
Iteration Number
h =
8
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
8
Bus Number
i =
2
Bus Voltage
ans =
0.9802 - 0.0615i
Difference in Voltage
ans =
0.0048

Iteration Number
h =
8
Bus Number
i =
3
Bus Voltage
ans =
1.0002 - 0.0517i
Difference in Voltage
ans =
0.0027
Iteration Number
h =
9
Bus Number
i =
1
Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
9

Bus Number
i =
2
Bus Voltage
ans =
0.9804 - 0.0609i
Difference in Voltage
ans =
6.5467e-004
Iteration Number
h =
9
Bus Number
i =
3
Bus Voltage
ans =
0.9999 - 0.0495i
Difference in Voltage
ans =
0.0022
Iteration Number
h =
10
Bus Number
i =
1

Bus Voltage
ans =
1.0500
Difference in Voltage
ans =
0
Iteration Number
h =
10
Bus Number
i =
2
Bus Voltage
ans =
0.9800 - 0.0591i
Difference in Voltage
ans =
0.0018
Iteration Number
h =
10
Bus Number
i =
3
Bus Voltage
ans =
0.9997 - 0.0494i
Difference in Voltage
ans =
2.1479e-004

VIVA QUESTIONS
1. What are the advantages of gauss-seidal methods?
1. Calculations are simple
2. The memory requirement is less
3. Useful for small system
2. What are the disadvantages of gauss-seidal methods?
1. Not suitable for large systems.
2. Convergence time increases with size of the system
3. Requires large number of iterations to reach convergence.
3.What is load flow study? (or) power flow study?
The study of various methods of solution to power system network is referred to as load flow study.
The solution provides the voltages at various buses, power flowing in various lines and lines.
4. What is the need for load flow study?
The load flow study of a power system is essential to decide the best operation of existing system
and for planning the future expansion of the system. it is also essential for designing a new power system.
5. What are the quantities that are associated with each bus in a system?
Each bus in a power system in associated with 4 quantities. They are real power, reactive power,
magnitude of voltage and phase angle of voltage.
6. What are the different types of buses in a power system?
1. Load bus or PQ bus
2. Generator bus
3. Slack bus
7. List the quantities specified and the quantities be determined from the load flow study for
various types of buses?
Bus type
Quantities specified
Quantities to be obtained
Load bus
P,Q
|V| ,
Generator bus
P,|V|
Q,
Slack bus
|V| ,
P,Q

RESULT:
Thus the load flow problem is solved by gauss seidal method and the voltages are
calculated using MATLAB program

Economic Load Dispatch


Aim:
To write a MATLAB program to determine the economic load schedule for the given
power system units.

Software used:
MATLAB 7.5 Version.

Formula used:
PD
1. =

2. PGi =

i=1 2

i=1 2i
- i
2i

3. PD new = PD old - (sum of fixed values)


where,

PGi - Generating power in MW

PD - Demand power in MW
- Legrange multiplier.

4.

PGi = PD

Theory:
The purpose of economic load dispatch on optimal dispatch is to reduced the fuel cost for
the power system by economic load scheduling. We mean to find the generation of different
generator on plant. So that the fuel cost is minimum and the same time, the total demand and
losses at any instant must be the net of total generation. The economic dispatch problem involves
the solution of the two different problems went commitment and online dispatch.

In a power system with negligible transmission loss and N number of spinning thermal
generating units. The total system load Po at a particular interval can be the net of different set of
the generation schedule.
The system operation has to choose the total set of schedule with minimize the system
operation cost which is essentially the sum of the production cost all the generating units. This
economic dispatch problem is mathematically stated as an optimization problem
PGi min PGi max
The unit producti0oon cost function is usually approximated by a quadratic function.
Fi(PGi) = aiPGi2 + bi PGi + Ci
Where ai, bi, ci are constants
The saturation to the economic load dispatch problem with production cost. Function is
assumed to be close so that the fuel cost is minimum and at the same time the total demand must
be the net of the total part of economic dispatch towards the performance of the net of the total
generation.
Procedure:
1.

Start

2. Get the data


a. Alpha value
b. Beta value
c. Gamma value
d. No. of units of generator
e. Power demand
3. Calculate the value of each generator power and cost function
4. Print the value
5. Stop

PROGRAM CODE:
clc;
disp('ECONOMIC LOAD DISPATCH:');
fprintf('\nEnter the method \n 1. Without loss and limits:\n2.Without loss
and with limits:\n ');
ch=input('Enter the choice:');
switch(ch)
case 1
n=input('Enter the number of units:');
e=input('Enter the value of tolerance:');
l=0;
for i=1:n
a(i)=input('Enter the value of a:');
b(i)=input ('Enter the value of b:');
c(i)=input('Enter the value of c:');
pg(i)=(l-b(i))/(2*a(i));
end
pd=input ('Enter the total demand');
s=0;
for i=1:n
s=s+pg(i);
end
d=s-pd;
di=abs(d);
dk=0;
if(di>e)
for i=1:n
dk=dk+(1/(2*a(i)));
end
dl=di/dk;
if(pg<pd)
ln=dl-l
else if(pg>pd)
ln=dl-l;
end
end
end
for i=1:n
pg(i)=(ln-b(i))/(2*a(i));
end
pg
p=0;
for i=1:n
p=p+pg(i);
end

p;
d=p-pd;
di=abs(d)
case 2
pd=input('Enter the power demand:');
n=input('Enter the number of units:');
s=0;
p=0;
e=0.001;
for i=1:n
a(i)=input('Enter the value of a:');
b(i)=input('Enter the value of b:');
c(i)=input('Enter the value of c:');
r(i)=(b(i)/(2*a(i)));
s=s+r(i);
d(i)=(1/(2*a(i)));
p=p+d(i);
end
l=(pd+s)/p
k=0;
for i=1:n
v(i)=input('Enter the lower limit:');
u(i)=input('Enter the upper limit:');
pg(i)=((l-b(i))/(2*a(i)));
if (pg(i)<v(i)||pg(i)>u(i))
if(pg(i)<v(i))
pgl=v(1);
pgl
else
pgl=u(i);
pgi
end
pdl=pd-pgl;
fprintf('The Violating Generator Bus is %g',i);
end
end
g=0;
h=0;
for i=1:(n-1)
o(i)=input('Enter the other bus:');
m=o(i);
w(i)=(b(m)/(2*a(m)));
k=k+w(i);
t(i)=(1/(2*a(m)));
g=g+t(i);
end
ln=((pdl+k)/g)

for i=1:(n-1)
m=o(i);
pgn(i)=(ln-b(m))/(2*a(m));
h=h+pgn(i);
end
z=h+pgl;
di=pd-z;
di
pgl
pgn
end

OUTPUT:
ECONOMIC LOAD DISPATCH:
Enter the method
1. Without loss and limits:
2.Without loss and with limits:
Enter the choice:1
Enter the number of units:2
Enter the value of tolerance:0.0001
Enter the value of a:0.1
Enter the value of b:25
Enter the value of c:1.6
Enter the value of a:.1
Enter the value of b:32
Enter the value of c:2.1
Enter the total demand250
ln =
53.5000
pg =
142.5000
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter

the
the
the
the
the
the
the
the
the
the
the
the

107.5000
choice:2
power demand:925
number of units:3
value of a:0.0045
value of b:5.2
value of c:580
value of a:0.0056
value of b:4.5
value of c:640
value of a:0.0079
value of b:5.8
value of c:820

l =
8.6149
Enter
Enter
Enter
Enter

the
the
the
the

lower
upper
lower
upper

limit:250
limit:450
limit:200
limit:300

pgl =
300
The Violating Generator Bus is 2Enter the lower limit:125
Enter the upper limit:225
Enter the other bus:1
Enter the other bus:3
ln =
9.0014
pgl =
300
pgn =
422.3790

202.6210

VIVA QUESTIONS
1. Define economic dispatch problem?
The objective of economic dispatch problem is to minimize the operating cost of active
power generation.
2. Define incremental cost?
The rate of change of fuel cost with active power generation is called incremental cost.
3. Define base point and participation factor?
The present operating point of the system is called base point.
The change in generation required to meet power demand is called as participation
4. What are the advantages of using participation factor?
The advantages of using participation factor are:
a) computer implementation of economic dispatch is straight forward.
b) Execution time for economic dispatch is short.
c) It will always give consistent answers when units reach limits.
d) It gives linear incremental cost functions or have non-convex cost curves.
5.What is Lagrangian multiplier?
The necessary condition for the existence of a minimum cost operating condition is that
the incremental cost rates of all the units be equal to some undetermined value called
Lagrangian multiplier.
=dFi/dPGi
5. Write the quadratic expression for fuel cost.
Ci(PGi) =aiPGi2 + biPGi+C i (Rs/Hr)
where,
ai, bi,C i = constants
PGi=power generation

7. Compare with unit commitment and economic load dispatch.


Unit commitment

optimum allocation of number of


units to be operated to determine the
units of a plant that should operate for
a given load is the problem of unit
commitment
There are number of subsets of the
complete set of n units that would
satisfy the expected demand.
Purpose of unit commitment is to find
the optimal subset among the subsets
which provide the minimum operating
cost.

Economic Load Dispatch

Optimum allocation of generation to


each station. (At each generating
station at various station load level)

The problem assumes that there are


n units already connected to the
system.
Purpose of economic dispatch
problem is to find the optimum
operating policy for these n units.

8. Define fuel constraints?


A system in which some units have limited fuel or else have constraints that require
them to burn a specified amount of fuel in a given time.

Result:
Thus the economic load dispatch scheduling for the given power system problems are
determined using MATLAB and output are verified theoretically.

EQUAL AREA CRITERION


Aim:
To write a MATLAB program for the determination of equal area criterion for a given
system.
Software used:
MATLAB 7.5 Version.
Formula used:
1. cosc =
2. K1 =
3. K 2 =

sino (m -o )- K1coso +K 2 cosm


K 2 -K1

Pm2
Pm1

Pm3
Pm1

sino
4. 1 =sin -1
K2
5. m = - 1

6. Pi =Pm1sino
Where,

Pi - input power.
Pm1 - Maximum power transfer on unfault condition.
Pm2 - Maximum power transfer during fault conditions
m - Maximum allowable angle.
c - Critical clearing angle.

Theory:
Refer book.

Algorithm:
STEP 1: Start.
STEP 2: Read the various power values
1.) Input power
2.) Maximum power transfer at pre fault
3.) Maximum power transfer at post fault.
4.) Maximum power transfer during fault.
STEP 3: Calculate K1 and K2 using formula.
STEP 4: Calculate
1.) Maximum allowable angle.
2.) Critical clearing angle.
using formula.
STEP 5: Print the values.
STEP 6: Stop.

PROGRAM CODE:
clc;
pm1=input('Enter the maximum Capacity of the line:');
pi=input('Enter the value of power flow during prefault condition:');
pm2=input('Enter the value of power flow during fault condition:');
pm3=input('Enter the value of power flow during postfault condition:');
k1=pm2/pm1;
k2=pm3/pm1;
d0=asind(pi/pm1);
d1=asind(sind(d0)/k2);
dm=180-d1;
dc=acosd(((sind(d0))*((dm-d0)*0.0175)-k1*cosd(d0)+k2*cosd(dm))/(k2-k1));
abs (dc)

OUTPUT:
Enter
Enter
Enter
Enter

the
the
the
the

ans =
94.0446

maximum Capacity of
value of power flow
value of power flow
value of power flow

the line:4
during prefault condition:2
during fault condition:1.5
during postfault condition:3.5

VIVA QUESTIONS
1. State equal area criterion?
It states that the system is stable if the area under Pa- curve reduces to zero at same value
of This is possible only if the positive area under Pa- curve is equal to the negative area under
Pa- curve for a finite change in . Hence this stability criterion is called as equal area criterion.
2. What is the use of swing curve?
It is usually plotted for the transient state to study the nature of variations of the stability of
the system for any disturbance can be determined.
3. Define power angle
It is defined as angular displacement of the rotor from synchronously rotaring frame
4. Define critical clearing time?
It is the maximum allowable change in the power angle before clearing the fault, without
loss of synchronism. The time corresponding to this angle is called critical clearing time tcc.
5. Define critical clearing angle?
It is the maximum allowable change in the power angle before clearing the fault, without
loss of synchronism. It is denoted as cc.
6. List the methods of imparting transient stability limit of the power system?
i.
ii.
iii.
iv.

Increase of system voltage and use of AVR.


Use of high speed excitation
Reduction in system transfer reactance
Use of high speed reclosing breakers.

7. What is the condition for stability in equal area criterion?


The system to be stable if the positive or accelerating area Pa- must be equal to negative
decelerating area

8. Give the simplified power angle equation and the expression for Pmax
The equation is

Pe=Pmax Sin

Where Pmax=
| E|

Magnitude of internal emf of generator

|V|

Magnitude of infinite bus voltage

Transfer reactance b/w generator and infinite bus

Power angle

9. For the swing equation what will be the value of Pa during steady state operation?
During steady state operation there is no acceleration or deceleration motor. Therefore Pa=0.
10. Name the two ways by which transient stability study can be made in a system?
1. Equal area criterion
2.Point-by-point method

Result:
Thus the equal area criterion for the given system is determined using MATLAB and the
output is verified theoretically.

Load Curve and Load Duration Curve


Aim:
To plot load curve and load duration curve and determine total energy, average load, load
factor, maximum demand.

Software used:
MATLAB 7.5 version

Formula used:
(1) Connected load

(all loads )

(2) Maximum demand

highest load

(3) Demand factor

maximum demand / connected load

(4) Total energy

( load in MW * time interval )

(5) Average load

total energy/24

(6) Load factor

average load / maximum demand

THEORY:
The load flow studies involve the solution of power system network under steady state
condition. The solution is obtained by the certain intently constrains improved on voltage and
relative power of the system. The information obtained from a load flow study is magnitude and
phase factor magnitude of voltage. For each value has equal reactive power following in such
line, the load flow and gives the condition of the system when the behavior of the system is to be

studied. Thus the load curve and load duration curve between the load flow and gives the
condition of the system of the certain inequality on the voltage and reactive power of the system.

Algorithm:
STEP 1: Start
STEP 2: Initialize the connected load and total energy
STEP 3: Read the data
(i)
(ii)
(iii)

Number of intervals
Starting time and ending time interval
Load values

STEP 4: Calculate the following using formulae


(i)
(ii)
(iii)
(iv)
(v)
(vi)

Connected load
Maximum demand
Demand factor
Total energy
Average load
Load factor

STEP 5: Print the values


STEP 6: Draw the load curve and load duration curve
STEP 7: Stop

PROGRAM CODE:
clc;
nl=input('Enter the number of loads:');
for i=1:nl
s(i)=input('Enter the starting time:');
e(i)=input ('Enter the ending time:');
l(i)=input('Enter the load value:');
end
cl=sum(e);
md=max(e);
te=0;
for i=1:nl
in(i)=e(i)-s(i);
te=(l(i)*in(i)+te);
end
te;
avgl=te/24;
lf=avgl/md;
fprintf('\n1.Load Curve:\n2.Load Duration Curve:\n');
d=input('Enter the Choice:');
switch(d)
case 1
e=input ('Enter the last value of X-axis:');
t=input('Enter the last value of Y-axis');
x=[s,e];
y=[l,t];
stairs(x,y);
case 2
lt=input('Enter the least load');
[x,y]=dsort(l);
for i=1:nl
f(i)=x(i);
end
for i=1:nl
a(i)=int (y(i));
end
b=0;
for i=1:nl
k(i)=a(i)+b;
b=k(i);
end
p=[0,k];
q=[f,lt];
stairs(p,q);
end

OUTPUT:
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter

the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the
the

number of loads:11
starting time:0
ending time:2
load value:6
starting time:2
ending time:6
load value:5
starting time:6
ending time:9
load value:10
starting time:9
ending time:12
load value:15
starting time:12
ending time:14
load value:12
starting time:14
ending time:16
load value:14
starting time:16
ending time:18
load value:16
starting time:18
ending time:20
load value:18
starting time:20
ending time:22
load value:16
starting time:22
ending time:23
load value:12
starting time:23
ending time:24
load value:6

1.Load Curve:
2.Load Duration Curve:
Enter the Choice:1
Enter the last value of X-axis:24
Enter the last value of Y-axis18

VIVA QUESTIONS
1. What is load curve?
The curve drawn between the variations of load on the power station with reference to time is
known as load curve. There are three types, Daily load curve, Monthly load curve, Yearly load
curve
2. What is Demand factor?
It is the ratio of maximum demand to connected load.
Demand factor= (max demand)/ (connected load)
3. What is Load factor?
The ratio of average load to the maximum demand during a given period is known as load factor.
Load factor = (average load)/ (maximum demand)
4. What is Diversity factor?
The ratio of the sum of individual maximum demand on power station is known as diversity
factor. Diversity factor = (sum of individual maximum demand)/(maximum demand).
5. What is Load duration curve and what is the use of it?
When the load elements of a load curve are arranged in the order of descending magnitudes the
curve then obtained is called load duration curve.
The load and load duration curve is used in power stations and extension of new power plants to
meet the demands.

RESULT:
The load curve and load duration curve are plotted and total energy, average load, load
factor and maximum demand are determined.

Anda mungkin juga menyukai