Anda di halaman 1dari 125

ANNA UNIVERSITY OF TECHNOLOGY - TIRUNELVELI GOVERNMENT COLLEGE OF ENGINEERING, TIRUNELVELI 627 007 DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

EE 76 POWER SYSTEM SIMULATION LABORATORY

LAB RECORD BOOK 2011-12

Prepared by R.ARUMUGAM Final year EEE (2008 - 2012) Government College of Engineering Tirunelveli - 627 007

MATLAB ( m- file ) will be available on request. Contact Id: 6face4u@gmail.com

GOVERNMENT COLLEGE OF ENGINEERING TIRUNELVELI 627 007

2011 -2012 REGISTER NO: 97408105701

CERTIFICATE
This is the bonafide record of work done by R.ARUMUGAM, Electrical and Electronics Engineering, Government College of Engineering, Tirunelveli during the academic year 2011-2012.

STATION : DATE :

STAFF IN-CHARGE

HEAD OF THE DEPARTMENT

Submitted for the Anna University Practical Examination held at Government college of Engineering, Tirunelveli, on..

INTERNAL EXAMINER

EXTERNAL EXAMINER

LIST OF EXPERIMENTS

EX:NO 1 2 3 4 5 6 7 8 9 10 11 12 13 14

DATE

NAME OF THE EXPERIMENT

PAGE 3 7 15 19 25 33 55 63 75 83 89 105 109 119

SIGN

08/07/11 Formation of Y -Bus Matrix by Direct Inspection method 15/07/11 Formation of Z -Bus Impedance Matrix by Bus Building Algorithm 22/07/11 Inverse of Matrix by Pivotal Condensation Method 29/07/11 Formation of Y bus Matrix by Singular Transformation method 29/07/11 Symmetrical Fault Analysis by Z bus 12/08/11 Unsymmetrical Fault Analysis by Z bus 26/08/11 Stability analysis using Swing Curve 26/08/11 Load Flow Analysis by Gauss Seidal Method 02/09/11 Load Frequency Control of Single Area and Double Area with Tie Line 23/09/11 Economic Dispatch by - iteration method 23/09/11 Load Flow Analysis by Newton Raphson Method 30/09/11 Transient Analysis of Simple RL circuit 30/09/11 Determination of Transmission Line Parameters 07/10/11 Load Flow analysis using ETAP Power Station

Flow Chart:

Ex.No:1 8/07/11

FORMATION OF Y BUS MATRIX BY DIRECT INSPECTION METHOD

AIM: To develop a MATLAB program to form Bus admittance matrix Y of a given power network by Direct Inspection Method. THEORY: Y-bus is known as the bus admittance matrix. Y-bus is often used in solving load flow problems. It has widespread application owing to its simplicity in data presentation, and the ease with which it can be formed and modified for network changes. The diagonal element of each node is the sum of admittances connected to it. It is known as self-admittance. The off-diagonal element is equal to the negative of the admittance between the nodes. In general, Y*V=I, Where Y - bus admittance matrix, V - Voltage at bus or node, I - Current at the bus or node.

Direct Inspection Method for Assembling Y matrix: 1) The diagonal element Yii of the matrix is equal to the sum of the admittances of all elements connected to the ith node. 2) The off-diagonal element Yij of the matrix is equal to the negative of the sum of the admittances of all elements connected between the nodes i and j. Algorithm: 1. Read the Line data 2. Form the Empty 3. Y Bus Matrix

Add all the admittance connected to a single bus to form the diagonal elements of the Y-bus

4.

The off-diagonal elements is admittances between the buses

equal

to

the

negative

of

the

5. 6.

Display Y-bus matrix Stop

OUTPUT: >> % % From Bus To Bus 1 2 2 3 3 4 R pu 0 0 0 0 0 0 X Pu 1.0; 0.8; 0.4; 0.2; 0.2; 0.08];

zdata = [ 0 0 1 1 2 3

>> Ybus = ybus(zdata); % OR Ybus = Y both are same >> Ybus

Ybus =

0 - 8.5000i 0 + 2.5000i 0 + 5.0000i 0 >>

0 + 2.5000i 0 - 8.7500i 0 + 5.0000i 0

0 + 5.0000i 0 + 5.0000i 0 -22.5000i 0 +12.5000i

0 0 0 +12.5000i 0 -12.5000i

MATLAB PROGRAM: %Formation of Y Bus Matrix by Direct Inspection Method function[Y]= ybus(zdata) nl=zdata(:,1); % Column array of Starting bus of the element nr=zdata(:,2); % Column array of Ending bus of the element R=zdata(:,3); % Column array of Resistance of the element X=zdata(:,4); % Colum array of Reactance of the element nbr=length(zdata(:,1)); % Length of the Vector = No of Element nbus=max(max(nl),max(nr));% Largest Elements in a Array = No of Buses Z=R+j*X; % Branch Impedance in a Complex Column Vector y=ones(nbr,1)./Z; % Branch Admittance in a Complex Column Vector Y=zeros(nbus,nbus); % Initialize Y to zeroes for k=1:nbr; % Formation of the off diagnol elements if nl(k) > 0 && nr(k) > 0 Y(nl(k),nr(k)) = Y(nl(k),nr(k)) - y(k); Y(nr(k),nl(k)) = Y(nl(k),nr(k)); % Y Bus Matrix is Symmetrical end end for n= 1: nbus % Formation of diagonal Elements for k = 1:nbr if nl(k) == n || nr(k)== n Y(n,n)=Y(n,n)+ y(k); else, end end end

APPLICATIONS & ADVANTAGES: Y Bus Matrix is used in Power Flow Studies. Data preparation is simple and its formation and modification is also easy. Since Bus Admittance Matrix is Sparse Matrix, the Computer Memory requirements are less and the no of computation required also less.

RESULT: Thus, the MATLAB program has been written to form the Bus admittance matrix Y of a given power network.

Flow chart:

Ex.No:2 15/07/11

FORMATION OF Z BUS MATRIX BY BUS BUILDING ALGORITHM METHOD

AIM: To develop a MATLAB program to form Bus Impedance matrix Z of a given power network using Bus Building Algorithm Technique. THEORY: Rule 1: Addition of a tree branch to the reference Start with the branches connected to the reference node. Addition of a branch zqo between a node q and the reference node o to the given Znewbus matrix of order (m*m), results in the Znewbus matrix of order (m+1)* (m+1).

Where, z = impedance of an element. This matrix is diagonal with the impedance values of the branches on the diagonal. Rule 2: Addition of a tree branch from a new bus to an old bus Continue with the remaining branches of the tree connecting a new node to the existing node. Addition of a branch zpq between a new node q and the existing node p to the given zoldbus matrix of order (m*m), results in the Znewbus matrix of order (m+1)*(m+1).

Rule 3: Addition of a Co-tree link between two existing buses When a link with impedance zpq is added between two existing nodes p and q, we augment the Zoldbus matrix with a new row and a new column.

Where,

The new row and column is eliminated using the relation,

and Z is defined as,

Rule 4: When bus q, is the reference bus, Zqi = Ziq = 0 (for i = 1,m) and the above matrix reduces to,

11

ALGORITHM: 1. Start with the branches connected to the reference node using rule 1 2. Continue with the remaining branches of the tree connecting a new node to the existing node using rule 2. 3. Add the link with impedance zpq between two existing nodes p and q using rule 3. 4. Check whether all elements connected , if not go to step (1) and continue. 5. Print the ZBUS matrix. 6. Stop the Program APPLICATION: 1. Bus Impedance Matrix is very much useful in both Symmetrical and Unsymmetrical Fault analysis.

OUTPUT:

>>

% From To % Bus Bus linedata= [0 1 2 0 1 2 1 3 2 3 >> Zbus = zbuild(linedata); >> Zbus Zbus = 0 + 0.1600i 0 + 0.0800i 0 + 0.1200i >>

R p.u 0 0 0 0 0

X p.u 0.2 0.4 0.8 0.4 0.4

Link identification link=1 branch=0 0; 0; 1; 0; 1];

0 + 0.0800i 0 + 0.2400i 0 + 0.1600i

0 + 0.1200i 0 + 0.1600i 0 + 0.3400i

13

MATLAB PROGRAM:
% FORMATION OF Z BUS BY BUS BUILDING ALGORITHM function [Zbus] = zbuild(linedata) nl=linedata(:,1); nr=linedata(:,2); R=linedata(:,3); X=linedata(:,4); ll=linedata(:,5); nbr=length(nl); nbus=max(max(nl),max(nr)); ZB=R+j*X; Zbus=zeros(nbus,nbus); % Rule - 1 for I=1:nbr if nl(I)==0 || nr(I)==0 if nl(I)==0 K=nr(I); elseif nr(I)==0 K=nl(I); end Zbus(K,K)=ZB(I); end end % Rule -2 for J=1:nbr if nl(J)>0 && nr(J) >0 if ll(J) == 0 Zbus(:,nr(J))=Zbus(:,nl(J)); Zbus(nr(J),:)=Zbus(nl(J),:); Zbus(nr(J),nr(J))= Zbus(nr(J),nr(J))+ZB(J); end end end %Rule-3 for J=1:nbr if nl(J)>0 && nr(J) >0 if ll(J) == 1 delta_Z=Zbus(:,nr(J))-Zbus(:,nl(J)); Zll=ZB(J)+Zbus(nr(J),nr(J))+Zbus(nl(J),nl(J))-2*Zbus(nr(J),nl(J)); P=(delta_Z*(-delta_Z)')./Zll; Zbus=Zbus-P; end end end

RESULT: Thus, the MATLAB program has been written to form the bus impedance matrix for a given network using building algorithm.

Flow Chart:

15

Ex.No:3 22/07/11

INVERSE OF A MATRIX BY PIVOTAL CONDENATION METHOD

AIM: To develop a MATLAB program to Compute the Inverse of a Square Matrix using Pivotal Condensation Method. THEORY: Pivotal method is used to find the inverse of any nxn Matrix. In this method, initially first diagonal element is chosen as pivotal element. Then pivotal matrix is found by dividing all elements by pivotal element. This process is repeated until all pivotal elements are over. Finally multiply with-1 with the result gives inversion of the matrix. ALGORITHM: 1. Start 2. Get the no. of buses 3. Get the elements of the buses one by one 4. Choose first diagonal element as pivot element 5. Form the pivoted matrix i. ii. iii. iv. v. Choose aij as pivot element Replace aij = Replace the elements in row of pivot as aki = Replace the element in column of pivot as ajk =Elements which are not in the row or column of pivot are replaced by = aij

6. Repeat the step4 and 5 until all pivot elements (diagonal) are Over 7. Multiply -1 with the final matrix 8. Display Y-bus matrix 9. Stop

OUTPUT: Inverse of Matrix Enter a Square Matrix: [7+0j 8+0.2j 4+0.4j;4+0.2j 1+0j 2+0.02j;1+0.02j 2+0.2j 3+0.2j] 7.0000 4.0000 + 0.2000i 1.0000 + 0.0200i 8.0000 + 0.2000i 1.0000 2.0000 + 0.2000i 4.0000 + 0.4000i 2.0000 + 0.0200i 3.0000 + 0.2000i

Inverse of Given Matrix by using MATLAB function inv() 0.0171 + 0.0021i 0.1691 + 0.0030i -0.1186 - 0.0061i 0.2693 - 0.0213i -0.2861 + 0.0178i 0.1024 + 0.0057i -0.2008 + 0.0207i -0.0365 - 0.0340i 0.4219 - 0.0086i

Inverse of Given Matrix By Pivotal Method 0.0171 + 0.0021i 0.1691 + 0.0030i -0.1186 - 0.0061i 0.2693 - 0.0213i -0.2861 + 0.0178i 0.1024 + 0.0057i -0.2008 + 0.0207i -0.0365 - 0.0340i 0.4219 - 0.0086i

>>

17

MATLAB PROGRAM:
% INVERSE OF SQUARE MATRIX BY PIVOTAL CONDENSATION METHOD clear all; close all; clc; disp('Inverse of Matrix'); y0=input('Enter a Square Matrix:'); disp(y0) [n,n]=size(y0); disp('Inverse of Given Matrix by using MATLAB function inv()') a= inv(y0); disp(a) for k=1:n t=y0(k,k); yn(k,k)= -1/y0(k,k); for i=1:n for j=1:n if((i==k && j~=k)||(i~=k && j==k)) yn(i,j)=-y0(i,j)/t; else if (i~=k && j~=k) yn(i,j)=y0(i,j)-(y0(i,k)*y0(k,j)/t); end end end end y0=yn; end x=-y0; disp('Inverse of Given Matrix By Pivotal Method'); disp(x)

RESULT: Thus, the MATLAB program has been written to determine the Inverse of given Square Matrix by Pivotal Condensation Method.

Flow Chart:

19

Ex.No:4 29/07/11

FORMATION OF Y BUS BY SINGULAR TRANSFORMATION

AIM: To develop a MATLAB program to form Bus admittance matrix Y of a given power network by Singular Transformation Method THEORY: Y-bus is known as the bus admittance matrix. Y-bus is often used in solving load flow problems. It has widespread application owing to its simplicity in data presentation, and the ease with which it can be formed and modified for network changes. In a typical power system network, each bus is connected to only a few nearby buses. Consequently, many off-diagonal elements are zero. Such a matrix is called sparse, and efficient numerical techniques can be applied to compute its inverse. By means of an appropriately ordered triangular decomposition, the inverse of a sparse matrix can be expressed as a product of sparse matrix factors, thereby giving advantages of computational speed, storage and reduction of round-off errors. Singular transformation method is a generalized method. It is applicable to all the systems. Bus admittance matrix can be calculated when there is mutual corresponding coupling between the elements. The matrix is rectangular, and therefore singular. Its elements are found as per the following rules. i. ii. iii. aik= 1 if ith elements is incident to and oriented away from the kth bus. aik=-1 if ith element is incident to but oriented towards the kth bus aik =0 if ith element is not incident to kth bus.

Y-bus is given by, Ybus=AT*Y*A

PROBLEM:

OUTPUT: Formation 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 Enter the Enter the Enter the Enter the Enter the Enter the of Y Bus Matrix by Singular Transformation Method no of buses : 5 no of lines : 6 starting bus : 1 ending bus : 2 impedance value: 0.25j starting bus : 2 ending bus : 3 impedance value: 0.4j starting bus : 3 ending bus : 4 impedance value: 0.2j starting bus : 4 ending bus : 2 impedance value: 0.125j starting bus : 1 ending bus : 5 impedance value: 1.25j starting bus : 3 ending bus : 5 impedance value: 1.25j

21

ALGORITHM: 1. Start 2. Get the no. of buses, number of elements 3. Get the starting and ending buses of each element 4. Form the bus incidence matrix A of size e*n 5. Form the transpose of bus incidence matrix AT 6. Form the primitive admittance matrix Y of size e*e 7. Form Y-bus using equation AT*Y*A 8. Display Y-bus matrix 9. Stop.

Bus Incidence Matrix [A]: 1 -1 0 0 0 1 -1 0 0 0 1 -1 0 -1 0 1 1 0 0 0 0 0 1 0

0 0 0 0 -1 -1

Transpose of Bus Incidence Matrix [At]: 1 0 0 0 1 0 -1 1 0 -1 0 0 0 -1 1 0 0 1 0 0 -1 1 0 0 0 0 0 0 -1 -1 Primitive Admittance Matrix: [y] 0 - 4.00i 0 0 0 0 0 0 0 - 2.50i 0 0 0 0 0 0 0 - 5.00i 0 0 0 0 0 0 0 - 8.00i 0 0 0 0 0 0 0 - 0.80i 0 0 0 0 0 0 0 - 0.80i

Y-BUS = [At] [y] [A] 0 - 4.80i 0 + 4.00i 0 0 0 + 0.80i >> 0 0 0 0 0 + 4.00i -14.50i + 2.50i + 8.00i 0 0 0 0 0 + + + 2.50i 8.30i 5.00i 0.80i 0 0 + 8.00i 0 + 5.00i 0 -13.00i 0 0 + 0.80i 0 0 + 0.80i 0 0 - 1.60i

23

MATLAB PROGRAM:
%Formation of Y Bus Matrix by Singular Transformation Method clear all; close all; clc; disp( 'Formation of Y Bus Matrix by Singular Transformation Method ') nb = input ( 'Enter the no of buses:' ); nl = input ( 'Enter the no of lines:' ); for j= 1:nl sb(j)=input ('Enter the starting bus:'); eb(j)=input ('Enter the ending bus: '); z(j) =input ('Enter the bus impedance value:'); b(j) =input ('Enter the half line charging admittance value:'); end %Formation of Bus Incidence Matrix y=zeros(nl,nb); for i=1:nl k=sb(i); m=eb(i); y(i,k)=1; y(i,m)=-1; end disp('Bus Incidence Matrix[A]:') disp(y) t=y';% Transpose of Bus Incidence Matrix disp('Transpose of Bus Incidence Matrix[At]:') disp(t) %Formation of Primitive Admittance Matrix u=zeros(nl,nl); for i=1:nl u(i,i)=1/z(i)+b(i)/2; end disp('Primitive Admittance Matrix:[y]') disp(u) answ=t*u*y; disp('Y-BUS = [At][y][A]') disp(answ)

RESULT: Thus, the MATLAB program has been written to form the Bus admittance matrix Y of a given power network by using Singular Transformation Method.

Flow chart:

25

Ex.No:5 29/07/11

SYMMETRICAL FAULT ANALYSIS BY Z BUS

AIM: To develop a MATLAB program to analyze the Symmetrical Fault of a given power network by using Bus Impedance Matrix. THEORY: Symmetrical fault may be a solid three phase short circuit is may involve any impedance. Such conditions are caused in the system accidently through insulation failure of equipment or Flashover of lines initiated by a lightening stroke or through faculty operation. The system must be protected against flow of heavy short circuit breakers and protecting relaying, we must estimate the magnitude of current that would flow under short circuit conditions. FORMULAE: Let a three phase fault occur in busk. Let a Pre-fault voltage at bus-k be Vpf. Let the Fault Impedance at the Faulted line be Zf. Then, Fault Current in bus k, If

Vpf Zkk Zf

In general the change in Voltage in bus-q due to three phase fault in bus-k is given by.

Vq IfZqk
The Voltage at a bus during a fault in bus-k is given by the sum of pre-fault bus voltage and change in bus voltage. Since the system is unloaded system the pre-fault voltage at all buses be Vpf = 1p.u.,(same as bus-K voltage).

V1 V2 . . Vk . . Vn

= Vpf IfZ1k = 1 0 - IfZ1k = Vpf IfZ2k = 1 0 - IfZ2k = Vpf Vpf = 0 = Vpf IfZnk = 1 0 - IfZnk

27

ALGORITHM: 1. Start 2. Get the base MVA and base KV 3. Calculate the base current Ib=[(MVA*1000)/(sqrt(3)*KV)] 4. Get bus data 5. Form Z-bus matrix 6. Read the fault bus number and fault impedance 7. Calculate fault current

If

Vpf Zkk Zf

8. Calculate Voltage at the buses during fault

Vn = Vpf IfZnk = 1 0 - IfZnk


9. Stop.

29

MATLAB PROGRAM:
%Symmetrical Fault Analysis using Z Bus Matrxi function zbussymfault(zdata) nl=zdata(:,1); nr=zdata(:,2); R=zdata(:,3); X=zdata(:,4); nbr=length(zdata(:,1)); % Length of the Vector = No of Element nbus=max(max(nl),max(nr)); % Largest Elements in a Array = No of Buses Z=R+j*X; % Branch Impedance in a Complex Column Vector y=ones(nbr,1)./Z; % Branch Admittance in a Complex Column Vector Y=zeros(nbus,nbus); % Initialize Y to zeroes for k=1:nbr; % Formation of the off diagnol elements if nl(k) > 0 && nr(k) > 0 Y(nl(k),nr(k)) = Y(nl(k),nr(k)) - y(k); Y(nr(k),nl(k)) = Y(nl(k),nr(k)); % Y Bus Matrix is Symmetrical end end for n= 1: nbus % Formation of diagonal Elements for k = 1:nbr if nl(k) == n || nr(k)== n Y(n,n)=Y(n,n)+ y(k); else, end end end kv=input('Enter base KV:'); mva=input('Enter base MVA:'); bc=(mva*1000)/(sqrt(3)*kv); Zbus = inv(Y); disp('BUS IMPEDANCE MATRIX:'); disp(Zbus); fbn=input('Enter the Fault bus no--->'); Zf=input('Enter the Fault impedance (Zf = R + j*X):'); V0 = ones(nbus, 1) + j*zeros(nbus, 1); If = V0(fbn)/(Zf + Zbus(fbn, fbn)); Ifm = abs(If); Ifa = Ifm*bc; %Ifmang=angle(If)*180/pi; fprintf('Total Fault current = %8.4f per unit \n\n', Ifm) fprintf('\nTotal Fault current = %f Amperes\n\n',Ifa) fprintf('\nBus Voltages during fault in per unit \n\n') fprintf(' Bus Voltage Angle\n') fprintf(' No. Magnitude degrees\n') for n = 1:nbus if n==fbn Vf(fbn) = V0(fbn)*Zf/(Zf + Zbus(fbn,fbn)); Vfm = abs(Vf(fbn)); angv=angle(Vf(fbn))*180/pi; else Vf(n) = V0(n) - V0(n)*Zbus(n,fbn)/(Zf + Zbus(fbn,fbn)); Vfm = abs(Vf(n)); angv=angle(Vf(n))*180/pi; end fprintf(' %4g', n), fprintf('%13.4f', Vfm),fprintf('%13.4f\n', angv) end

OUTPUT:

>> zdata = [ 0 0 1 1 2

1 2 2 3 3

0 0 0 0 0

0.2; 0.4; 0.8; 0.4; 0.4];

>> zbussymfault(zdata) Enter base KV:30 Enter base MVA:100 BUS IMPEDANCE MATRIX: 0 + 0.1600i 0 + 0.0800i 0 + 0.1200i Enter Enter Total Total 0 + 0.0800i 0 + 0.2400i 0 + 0.1600i 0 + 0.1200i 0 + 0.1600i 0 + 0.3400i

the Fault bus no--->3 the Fault impedance (Zf = R + j*X):0 + j* 0.16 Fault current = 2.0000 per unit Fault current = 3849.001795 Amperes

Bus Voltages during fault in per unit Bus Voltage Angle No. Magnitude degrees 1 0.7600 0.0000 2 0.6800 0.0000 3 0.3200 0.0000 >>

31

RESULT: Thus, the MATLAB program has been written for Symmetrical fault analysis of given power network by using Bus Impedance Matrix.

Start

Read line data, fault bus, fault impedance, Positive, negative, zero sequence reactance of each element Assume pre-fault voltage is 1 p.u.

Draw the positive, negative and zero sequence networks using sequence impedances of the power system. Compute positive, negative, zero sequence bus impedance matrices [z1 z2 z0]

Check Case

L-G

L-L

L-L-G

Symmetrical Components of Current

= =

Ia

Symmetrical Components of Current

Symmetrical Current

Components

of

= 0, =

= -

Fault phase current

Fault phase current

=
If = Ia = 3 Ib = Ic = 0
Symmetrical Voltages

= Ia = 0, Ib = -Ic
Symmetrical Voltages

Fault phase current

= 0
Symmetrical Voltages

=
Post fault voltage

=
Post fault voltage Compute Post fault votage using transformation matrix

Stop

33

Ex.No:6 12/08/11

UNSYMMETRICAL SHORT CIRCUIT FAULT ANALYSIS BY Z BUS MATRIX

AIM: To develop a MATLAB program to analyze the Symmetrical Fault of a given power network by using Bus Impedance Matrix. THEORY: The Fault which gives rise to unsymmetrical fault current is called an unsymmetrical fault. Various types of unsymmetrical Fault occur in power system. They are1. Shunt type Fault (or) Short Circuit Fault a) Single line to Ground (L-G) Fault b) Line to Line (L-L) fault c) Double Line to Ground (L-L-G) Fault (or) 2. Series type fault (or) Open Circuit Fault a) Open Conductor fault (One or Two conductor) Most of the faults that occur on power systems are unsymmetrical faults, which may consist of unsymmetrical short circuits, unsymmetrical faults through impedance, or open conductors. Any unsymmetrical fault causes unbalanced currents to flow in the system, so the method of symmetrical components is very useful in an analysis to determine the currents and voltages in all parts of the system after the fault occurrence of the fault. Sequence Impedance: Sequence Impedance is the impedance of an equipment or component to the current of different sequences. The impedance offered to flow of positive sequence currents is known as the positive sequence impedance and denoted by z1. The impedance offered to the flow of zero sequence currents is known as the negative sequence impedance and denoted by z2. When zero sequence current flow, the impedance known as zero sequence impedance and denoted by z0.

PROBLEM: The one-line diagram of a simple power system is shown in Figure. The neutral of each generator is grounded through a current-limiting reactor of 0.25/3 per unit on a l00-MVA base. The system data expressed in per unit on a common l00-MVA base is tabulated below. The generators are running on no-load at their rated voltage and rated frequency with their emfs in phase. Determine the fault current for the following faults. (a) A single line-to-ground fault at bus 3 through a fault impedance Zf = j0.l0 per unit. (b) A line-ta-line fault at bus 3 through a fault impedance Zf = jO.1 per unit. (c) A double line-to-ground fault at bus 3 through a fault impedance Zf = jO.1 per unit.

Item

Base MVA

Voltage Rating

X1
0.15 0.15 0.10 0.10 0.125 0.15 0.25

X2
0.15 0.15 0.10 0.10 0.125 0.15 0.25

X0
0.05 0.05 0.10 0.10 0.30 0.35 0.7125

G1 G2
T1 T2

L12 L13 L23

100 100 100 100 100 100 100

20kV 20kV 20/220 kV 20/220kV 220kV 220kV 220kV

35

Single Line to Ground Fault

Single line to ground fault on phase a at the terminals of an unloaded generator. The circuit diagram for Single Line to Ground Fault on an unloaded Y- connected generator with its neutral grounded through a reactance is shown, where phase a is one on which the fault occurs the relations to be developed for this type of fault will apply only when the fault is on phase a, but this should cause no difficulty since the phase are labeled arbitrarily and any phase can be designated as phase a. The boundary conditions at the fault point areVa = Zf Ia Ib = 0 Ic = 0 Then the symmetrical components of currents are= = = = Ia for and in Sequence Network equation, we obtain

Substituting = or = -

Solution: POSITIVE SEQUENCE IMPEDANCE NETWORK:

zdata1 = [0 0 1 1 2

1 2 2 3 3

0 0 0 0 0

0.25; 0.25; 0.125; 0.15; 0.25];

NEGATIVE SEQUENCE IMPEDANCE NETWORK:

Zdata2 = [0 1 0 0.25; 0 2 0 0.25; 1 2 0 0.125; 1 3 0 0.15; 2 3 0 0.25]; Since the Negative sequence impedance of each element X2 is the same as the positive sequence impedance of each element X1 , their networks are also same

37

Phase a voltage in term of symmetrical components is + + Va = = -Z0 = Zf Ia = 3Zf = ( = The fault current is Ia = 3 = network of the generator are connected in series we see that the current and voltages resulting the equations above, for the three sequence series with the voltages Ea. = + - ( - ( - ( ) ) ) )

If the three sequence as shown in fig. 4.2 there from satisfy impedance are then in

Sequence Network connections for single line to ground fault

ZERO SEQUENCE NETWORK:

zdata0= [0 1 0 0.40; 0 2 0 0.10; 1 2 0 0.30; 1 3 0 0.35; 2 3 0 0.7125;];

39

Line To Line Fault

Line To Line Fault between phase b and c. The circuit diagram for a line to line fault through impedance Zf between phase b and c on an unbalanced, Y-connected generator with its neutral grounded through a reactance is shown, the boundary conditions at the point areVb Vc=Zf Ib Ib = -Ic Ib+Ic = 0 Ia = 0 (Unloaded Generator) Then the symmetrical components of current are-

= Network = = ( ( = -

0,Hence

LL

fault

Calculation

do

not

involve

Zero

Sequence

) )

OUTPUT:
>> zdata0=[ 0 1 0 0.40; 0 2 0 0.10; 1 2 0 0.30; 1 3 0 0.35; 2 3 0 0.7125;]; >> zdata1 = [0 1 0 0.25; 0 2 0 0.25; 1 2 0 0.125; 1 3 0 0.15; 2 3 0 0.25]; >> zdata2=zdata1; >> Zbus0 = Zbus(zdata0) Zbus0 = 0 + 0.1820i 0 + 0.0545i 0 + 0.1400i >> Zbus1 = Zbus(zdata1) Zbus1 = 0 + 0.1450i 0 + 0.1050i 0 + 0.1300i >> Zbus2 = Zbus(zdata2) Zbus2 = 0 + 0.1450i 0 + 0.1050i 0 + 0.1300i 0 + 0.1050i 0 + 0.1450i 0 + 0.1200i 0 + 0.1300i 0 + 0.1200i 0 + 0.2200i 0 + 0.1050i 0 + 0.1450i 0 + 0.1200i 0 + 0.1300i 0 + 0.1200i 0 + 0.2200i 0 + 0.0545i 0 + 0.0864i 0 + 0.0650i 0 + 0.1400i 0 + 0.0650i 0 + 0.3500i

>> unsymmfault(zdata0,zdata1,zdata2,Zbus0,Zbus1,Zbus2) 1.L-G Fault 2.L-L Fault 3.L-L-G Fault Enter the choice: 1 Line-to-ground fault analysis Enter Faulted Bus No. -> 3 Enter Fault Impedance Zf = R + j*X in complex form: Zf = j*0.1

41

= =

(4.12)

Phase b and c voltage in terms symmetrical components are-

= Substituting for and we get

= The phase currents are-

The fault current is-

Or

Single line to-ground fault at bus No. 3 TOTAL FAULT CURRENT = 2.7523 per unit

Bus Voltages during the fault in per unit Bus No. 1 2 3 -------Voltage Magnitude------Phase a Phase b Phase c 0.6330 1.0046 1.0046 0.7202 0.9757 0.9757 0.2752 1.0647 1.0647

0.Exit the Program 1.Continue the program for another fault Enter the choice:1 1.L-G Fault 2.L-L Fault 3.L-L-G Fault Enter the choice: 2 Line-to-line fault analysis Enter Faulted Bus No. -> 3 Enter Fault Impedance Zf = R + j*X in complex form Zf = j*0.1

Line-to-line fault at bus No. 3 TOTAL FAULT CURRENT = 3.2075 per unit Bus Voltages during the fault in per unit Bus No. 1 2 3 -------Voltage Magnitude------Phase a Phase b Phase c 1.0000 0.6720 0.6720 1.0000 0.6939 0.6939 1.0000 0.5251 0.5251

0.Exit the Program 1.Continue the program for another fault Enter the choice:1 1.L-G Fault 2.L-L Fault 3.L-L-G Fault Enter the choice: 3 Double line-to-ground fault analysis Enter Faulted Bus No. -> 3 Enter Fault Impedance Zf = R + j*X in complex form: Zf = j*0.1

43

Again the symmetrical components of voltage are given by-

Sequence network connections for line to line fault Double Line To Ground Fault:

Double line to Ground fault The circuit diagram for a double line to ground fault on phases b and c through impedance Zf to ground on an unloaded, Y-connected generator with its neutral to grounded through a reactance is shown in fig 4.4. the boundary conditions at the fault point are-

Double line-to-ground fault at bus No. 3 TOTAL FAULT CURRENT = 1.9737 per unit

Bus Voltages during the fault in per unit Bus No. 1 2 3 -------Voltage Magnitude------Phase a Phase b Phase c 1.0066 0.5088 0.5088 0.9638 0.5740 0.5740 1.0855 0.1974 0.1974

0.Exit the Program 1.Continue the program for another fault Enter the choice:0 >>

45

Phase b and c voltage in terms symmetrical components are-

Since Vb = Vc , hence

Substituting for the symmetrical components of currents, we get

= =3 Again

= = =

Now = -

= 3

47

Again,

We can also find that

And the fault current is

Sequence network connections for double line to ground fault

MATLAB PROGRAM:

49

function unsymmfault(zdata0,zdata1,zdata2,Zbus0,Zbus1,Zbus2) nl = zdata1(:,1); nr = zdata1(:,2); nbus = max(max(nl), max(nr)); V0 = ones(nbus, 1) + j*zeros(nbus, 1); ff = 999; while ff > 0 fprintf('\n 1.L-G Fault'); fprintf('\n 2.L-L Fault'); fprintf('\n 3.L-L-G Fault'); c=input('\nEnter the choice: '); if (c~=1 && c~=2 && c~=3) fprintf('Invalid Choice..Try again') end if (c==1) fprintf('\nLine-to-ground fault analysis \n') nf = input('\nEnter Faulted Bus No. -> '); while nf <= 0 || nf > nbus fprintf('\nFaulted bus No. must be between 1 & %g \n', nbus) nf = input('\nEnter Faulted Bus No. -> '); end fprintf('\nEnter Fault Impedance Zf = R + j*X in ') Zf = input('complex form (for bolted fault enter 0). Zf = '); fprintf(' \n') fprintf('\nSingle line to-ground fault at bus No. %g\n', nf) a =cos(2*pi/3)+j*sin(2*pi/3); sctm = [1 1 1; 1 a^2 a; 1 a a^2];%Symmetrical Component Transformation Matrix Ia0 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+ Zbus0(nf, nf)+3*Zf); Ia1=Ia0; Ia2=Ia0; I012=[Ia0; Ia1; Ia2]; Ifabc = sctm*I012; Ifabcm = abs(Ifabc); fprintf('\nTOTAL FAULT CURRENT = %9.4f per unit\n\n', Ifabcm(1)) fprintf('Bus Voltages during the fault in per unit \n\n') fprintf(' Bus -------Voltage Magnitude------- \n') fprintf(' No. Phase a Phase b Phase c \n') for n = 1:nbus Vf0(n)= 0 - Zbus0(n, nf)*Ia0; Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1; Vf2(n)= 0 - Zbus2(n, nf)*Ia2; Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)]; Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3); fprintf(' %5g',n) fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n))) fprintf(' %11.4f\n', abs(Vc(n))) end end if (c==2) fprintf('\nLine-to-line fault analysis \n') nf = input('\nEnter Faulted Bus No. -> '); while nf <= 0 || nf > nbus fprintf('\nFaulted bus No. must be between 1 & %g \n', nbus) nf = input('\nEnter Faulted Bus No. -> ');

51
end fprintf('\nEnter Fault Impedance Zf = R + j*X in ') Zf = input('complex form (for bolted fault enter 0). Zf = '); fprintf(' \n') fprintf('Line-to-line fault at bus No. %g\n', nf) a =cos(2*pi/3)+j*sin(2*pi/3); sctm = [1 1 1; 1 a^2 a; 1 a a^2]; Ia0=0; Ia1 = V0(nf)/(Zbus1(nf,nf)+Zbus2(nf, nf)+Zf); Ia2=-Ia1; I012=[Ia0; Ia1; Ia2]; Ifabc = sctm*I012; Ifabcm = abs(Ifabc); fprintf('TOTAL FAULT CURRENT = %9.4f per unit\n\n', Ifabcm(2)) fprintf('Bus Voltages during the fault in per unit \n\n') fprintf(' Bus -------Voltage Magnitude------- \n') fprintf(' No. Phase a Phase b Phase c \n') for n = 1:nbus Vf0(n)= 0; Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1; Vf2(n)= 0 - Zbus2(n, nf)*Ia2; Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)]; Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3); fprintf(' %5g',n) fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n))) fprintf(' %11.4f\n', abs(Vc(n))) end end if (c==3) fprintf('\nDouble line-to-ground fault analysis \n') nf = input('\nEnter Faulted Bus No. -> '); while nf <= 0 || nf > nbus fprintf('Faulted bus No. must be between 1 & %g \n', nbus) nf = input('\nEnter Faulted Bus No. -> '); end fprintf('\nEnter Fault Impedance Zf = R + j*X in ') Zf = input('complex form (for bolted fault enter 0). Zf = '); fprintf(' \n') fprintf('\nDouble line-to-ground fault at bus No. %g\n', nf) a =cos(2*pi/3)+j*sin(2*pi/3); sctm = [1 1 1; 1 a^2 a; 1 a a^2]; Z11 = Zbus2(nf, nf)*(Zbus0(nf, nf)+ 3*Zf)/(Zbus2(nf, nf)+Zbus0(nf, nf)+3*Zf); Ia1 = V0(nf)/(Zbus1(nf,nf)+Z11); Ia2 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/Zbus2(nf,nf); Ia0 =-(V0(nf) - Zbus1(nf, nf)*Ia1)/(Zbus0(nf,nf)+3*Zf); I012=[Ia0; Ia1; Ia2]; Ifabc = sctm*I012; Ifabcm=abs(Ifabc); Ift = Ifabc(2)+Ifabc(3); Iftm = abs(Ift); fprintf('\nTOTAL FAULT CURRENT = %9.4f per unit\n\n', Iftm) fprintf('Bus Voltages during the fault in per unit \n\n') fprintf(' Bus -------Voltage Magnitude------- \n')

fprintf('

No.

Phase a

Phase b

Phase c

\n')

53

for n = 1:nbus Vf0(n)= 0 - Zbus0(n, nf)*Ia0; Vf1(n)= V0(n) - Zbus1(n, nf)*Ia1; Vf2(n)= 0 - Zbus2(n, nf)*Ia2; Vabc = sctm*[Vf0(n); Vf1(n); Vf2(n)]; Va(n)=Vabc(1); Vb(n)=Vabc(2); Vc(n)=Vabc(3); fprintf(' %5g',n) fprintf(' %11.4f', abs(Va(n))),fprintf(' %11.4f', abs(Vb(n))) fprintf(' %11.4f\n', abs(Vc(n))) end end fprintf('\n 0.Exit the Program ') fprintf('\n 1.Continue the program for another fault') m= input('\nEnter the choice:'); if(m==1) ff =999; else ff = 0; end end ----------------------------------------------------------------------------------------------function[Zbus]= Zbus(zdata) nl=zdata(:,1); nr=zdata(:,2); R=zdata(:,3); X=zdata(:,4); nbr=length(zdata(:,1)); nbus=max(max(nl),max(nr)); Z=R+j*X; y=ones(nbr,1)./Z; Y=zeros(nbus,nbus); % % % % % % % % % Column array of Starting bus of the element Column array of Ending bus of the element Column array of Resistance of the element Colum array of Reactance of the element Length of the Vector = No of Element Largest Elements in a Array = No of Buses Branch Impedance in a Complex Column Vector Branch Admittance in a Complex Column Vector Initialize Y to zeroes

for k=1:nbr; % Formation of the off diagnol elements if nl(k) > 0 && nr(k) > 0 Y(nl(k),nr(k)) = Y(nl(k),nr(k)) - y(k); Y(nr(k),nl(k)) = Y(nl(k),nr(k)); % Y Bus Matrix is Symmetrical end end for n= 1: nbus % Formation of diagonal Elements for k = 1:nbr if nl(k) == n || nr(k)== n Y(n,n)=Y(n,n)+ y(k); end end end Zbus = inv(Y);

RESULT : Thus, the MATLAB program has been written for Unsymmetrical Short Circuit fault analysis of given power network by using Bus Impedance Matrix.

Flow Chart: Start

Read Pmaxb, Pmaxd, Pmaxa, f, H, Period, ts, tc

Calculate M = H /(f*pi) Pm0=1 del0 = asin(Pm0/Pmaxb) Intialize


t0=0;dt = 0.02;k=0;i = 2;0 =0

check t <= Period

Calculate K1, K2, K3, K4 and l1, l2, l3, l4


Calculate K and l = 0 + = 0 + t= t0 + dt

Plot (t, )

Stop

55

Ex.No:7 26/08/11

STABILITY ANALYSIS USING SWING CURVE

AIM: To develop a MATLAB program to analyze the Stability of Power System using Swing curve by Runge Kutta Method. Theory: Power System Stability is the property of the system that enables it to remain in a state of operating equilibrium under normal operating conditions and to regain an acceptable state of equilibrium after being subjected to a disturbance. They are classified in to Steady State stability Dynamic Stability Transient Stability

Steady State Stability is the ability of power system to bring it to a stable condition or remain in synchronism after a small disturbance such as gradual infinitesimal variations in system variables like rotor angle, voltage, etc. Dynamic Stability is the ability of the system to remain in synchronism when it is subjected to sustained oscillations followed by transient state. Transient Stability is the ability of the System to bring it to a stable condition after large disturbances due to sudden outage of line, sudden loss of excitation and sudden application or removal of loads. Swing Equation: Under normal operating conditions, the relative position of the rotor axis and the resultant magnetic field axis is fixed. The angle between the two is known as the power angle or torque angle. During any disturbance, rotor will decelerate or accelerate with respect to the synchronously rotating air gap mmf, a relative motion begins. The equation describing the relative motion is known as the swing equation.

Where, H is the Inertia Constant.

57

RungeKutta Method: To Solve Non-Linear Second Order Differential Equations = = = Where, = Rotor Speed Variation in Per unit At time t0 = 0, i.e. at Pre Fault Condition, The rotor is running at Synchronous speed 0 = , therefore the Change in angular Velocity is zero. = and t0 = 0 , (initial Conditions), let will dt steps.
0

the increment in time

+ + +

= [ +

= [ +

]
=

= [ + ]
= [ + + + ]

= =

[ + + + ]

Hence at t1 = t0 + dt,

= + = +
Repeat the iteration up to desire time

OUTPUT:

Stable Case

Enter Enter Enter Enter Enter Enter Enter Enter >>

the Maximum value of Power(in p.u.) before the fault occurs: 2.3 the Maximum value of Power (in p.u.) during the fault: 0 the Maximum value of Power (in p.u.)after the fault is Cleared: 1.5 the System Frequency: 50 the Inertia Constant of Machine "H": 5 Simulation Period(sec): 1 fault occurrence time (sec): 0.02 the fault clearance time(sec): 0.04

MATLAB PROGRAM:

59

clc; clear all; Pmaxb = input('Enter the Maximum value of Power(in p.u.) before the fault occurs: '); Pmaxd = input('Enter the Maximum value of Power (in p.u.) during the fault: '); Pmaxa = input('Enter the Maximum value of Power (in p.u.)after the fault is Cleared: '); f = input('Enter the System Frequency: '); H = input('Enter the Inertia Constant of Machine "H": '); Period = input('Enter Simulation Period(sec): '); ts = input('Enter fault occurrence time (sec): '); tc = input('Enter the fault clearance time(sec): '); M = H/(f*pi); % Let the generator be operating in steady state with a torque angle del0. % At thi scondition the mechanica power input is Pm0 and the electrical % output is Pe0. Under ideal conditions Pm0 = Pe0 = Pmax0 Sin(del0); Pm0 = 1; Pe0 = 1; Pmech = Pm0; del0 = asin(1/Pmaxb); dt = 0.02; k=0; i = 2; while(k <= Period) if(k<=ts) Pmax = Pmaxb; elseif((k>ts)&(k<=tc)) Pmax = Pmaxd; else Pmax = Pmaxa; end t(1) = 0.0; del(1) = del0; w(1) = 0; k1 = dt*w(i-1); l1 = dt*(Pmech - Pmax*sin(del(i-1)))/M; k2 = dt*(w(i-1) + l1/2); l2 = dt*(Pmech - Pmax*sin(del(i-1)+ k1/2))/M; k3 = dt*(w(i-1) + l2/2); l3 = dt*(Pmech - Pmax*sin(del(i-1)+ k2/2))/M; k4 = dt*(w(i-1) + l3); l4 = dt*(Pmech - Pmax*sin(del(i-1)+ k3))/M; del(i) = del(i-1) + (k1+2*k2+2*k3+k4)/6; w(i) = w(i-1) + (l1+2*l2+2*l3+l4)/6; t(i) = (i-1)*dt; k = k + dt; i = i + 1; end k = 0:0.02:Period; plot (t,del) xlabel('Time(Seconds)') ylabel('Delta(in rad)') title('Swing Equation Solution') grid on

OUTPUT: Unstable Case

Enter Enter Enter Enter Enter Enter Enter Enter >>

the Maximum value of Power(in p.u.) before the fault occurs: 2.3 the Maximum value of Power (in p.u.) during the fault: 0 the Maximum value of Power (in p.u.)after the fault is Cleared: 1.5 the System Frequency: 50 the Inertia Constant of Machine "H": 5 Simulation Period(sec): 1 fault occurrence time (sec): 0.02 the fault clearance time(sec): 0.8

61

RESULT: Thus, the MATLAB program has been written to analyze the Stability of power System using swing curve by Runge Kutta Method.

Flow chart:

Start Read line data, bus Data, tolerance,

1. Compute Y bus Matrix 2.Intialize Bus Voltage 3.Set iteration count iter =1

Bus No, i =1 i=i+1

No
Does i refers to PV Bus

Vnew = V (spec) Qical = - Im [ Vi* QGi = Qical

cal
] + QLi

QGi > Qi(max)


Check for Q limit

QGi < Qi(min)

QGi = Qi(max) Qi(spec) = Qi(max) -QLi

Qi(spec) =

Qical

QGi = Qi(min) Qi(spec) = Qi(min) - QLi

No
Is i < N

Yes No
Are all

Yes
Calculate line flows, losses and slack bus power Print the result Stop iter =iter + 1

63

Ex.No:8 26/08/11

LOAD FLOW ANALYSIS BY GAUSS SEIDAL METHOD

AIM: To perform the Load flow analysis of power system network by Gauss Seidal Iterative Algorithm. THEORY: The Load flow studies involve the solution of the power system network under steady state conditions. The solution is obtained by considering certain inequality constraints imposed on node voltages and reactive power of generators. The main information obtained from a load flow study are the magnitude and phase angle of the voltage at each bus and real and reactive power flowing in each line. ALGORITHM: 1. Form Y Bus matrix 2. Assume Vk = Vk(spec) 3. Assume Vk = 1

00 at all generator bus

00 = 1+j0 at all load bus

4. Set iteration count = 1(iter = 1) 5. Let bus number i = 1 6. If i refers to generator bus go to step no.7, otherwise go to step 8. 7. (a) If i refers to Slack bus go to step 9. Otherwise go to step 7(b) (b) Compute Qi using,

65

Check for Q limit violation. If Qi(min) < QGi < Qi(max), then Qi(spec) = Qical If Qi(min) > QGi, then Qi(spec) = Qi(min)- QLi If Qi(max) < QGi, then Qi(spec) = Qi(max)- QLi If Qlimit is violated, then treat this bus as P-Q bus till convergence is obtained 8. Compute Vi using the equation

9. If i is less than number of buses, increment i by 1 and go to step 6. 10. Compare two successive iteration values for Vi If Vinew - Viold < tolerance, go to step 12. 11. Update the new voltage as Vnew = Vold + (Vnew - Vold) Vold = Vnew iter = iter + 1; go to step 5 12. Compute relevant quantities. Slack Bus Power, S1 = Pi - jQi = V*I = Vi* Line flows Sij = Pij + jQij 13. Stop the Execution.

MATLAB PROGRAM:
clc; clear all; close all; % | From | To % | Bus | Bus linedata = [ 1 2 1 3 2 3 ybus = ybusgs(linedata);

67

| |

R 0.02 0.01 0.0125

| |

X 0.04 0.03 0.025

| |

B/2 | | 0.00; 0.00; 0.00;];

% |Bus | Type | Vsp | theta | PGi | QGi | PLi | QLi | Qmin | Qmax | busdata = [ 1 1 1.05 0 0.0 0 0 0 0 0; 2 3 1.0 0 0.0 0 2.566 1.102 0 0; 3 3 1.0 0 0.0 0 1.386 0.452 0 0; ]; bus = busdata(:,1); % Bus number. type = busdata(:,2); % Type of Bus 1-Slack, 2-PV, 3-PQ. V = busdata(:,3); % Initial Bus Voltages. th = busdata(:,4); % Initial Bus Voltage Angles. GenMW = busdata(:,5); % PGi, Real Power injected into the buses. GenMVAR = busdata(:,6); % QGi, Reactive Power injected into the buses. LoadMW = busdata(:,7); % PLi, Real Power Drawn from the buses. LoadMVAR = busdata(:,8); % QLi, Reactive Power Drawn from the buses. Qmin = busdata(:,9); % Minimum Reactive Power Limit Qmax = busdata(:,10); % Maximum Reactive Power Limit nbus = max(bus); % To get no. of buses P = GenMW - LoadMW; % Pi = PGi - PLi, Real Power at the buses. Q = GenMVAR - LoadMVAR; % Qi = QGi - QLi, Reactive Power at the buses. Vprev = V; toler = 1; % Tolerence. iteration = 1; % iteration starting while (toler > 0.00001) % Start of while loop for i = 2:nbus sumyv = 0; for k = 1:nbus if i ~= k sumyv = sumyv + ybus(i,k)* V(k); % Vk * Yik end end if type(i) == 2 % Computing Qi for PV bus Q(i) = -imag(conj(V(i))*(sumyv + ybus(i,i)*V(i))); if (Q(i) > Qmax(i)) || (Q(i) < Qmin(i)) % Checking for Qi Violation. if Q(i) < Qmin(i) % Whether violated the lower limit. Q(i) = Qmin(i); else % No, violated the upper limit. Q(i) = Qmax(i); end type(i) = 3; % If Violated, change PV bus to PQ bus. end end V(i) = (1/ybus(i,i))*((P(i)-j*Q(i))/conj(V(i)) - sumyv); % Compute Bus Voltages if type(i) == 2 % For PV Buses, Vm remains same, but Ang changes. V(i) = pol2rect(abs(Vprev(i)), angle(V(i)));

69
end end iteration = iteration + 1; % Increment iteration count. toler = max(abs(abs(V) - abs(Vprev))); % Calculate tolerance. Vprev = V; % Vprev is required for next iteration %V(i) = pol2rect(abs(Vprev(i)), angle(V(i))); end % End of while loop / Iteration V; % Bus Voltages in Complex form. VC = conj((V)); Vmag = abs(V); % Final Bus Voltages. Ang = 180/pi*angle(V); % Final Bus Voltage Angles in Degree. for p = 1:nbus sumyv = 0; for q = 1:nbus sumyv = sumyv + ybus(p,q)*V(q); end S(p) = VC(p)* sumyv; end disp('###############################################################################'); disp('-------------------------------------------------------------------------------'); disp(' Gauss Siedal Load flow Analysis '); disp('-------------------------------------------------------------------------------'); disp('| Bus | V | Angle | P Q '); disp('| No | pu | Degree | p.u. p.u '); for m = 1:nbus disp('---------------------------------------------------------------------------'); fprintf('%3g', m); fprintf(' %8.4f', Vmag(m)); fprintf(' %8.4f', Ang(m)); fprintf(' %8.4f %8.4f', real(S(m)),imag(S(m))); fprintf('\n'); end fb tb nl Pl Ql = = = = = linedata(:,1); linedata(:,2); length(fb); busdata(:,7); busdata(:,8); % From bus number... % To bus number... % No. of Branches.. % PLi.. % QLi..

Iij = zeros(nbus,nbus); Sij = zeros(nbus,nbus); Si = zeros(nbus,1); %Line Current Flows.. for m = 1:nl p = fb(m); q = tb(m); Iij(p,q) = -(V(p) - V(q))*ybus(p,q); % Y(m,n) = -y(m,n).. Iij(q,p) = -Iij(p,q); end %Iij = sparse(Iij); Iijm = abs(Iij); Iija = angle(Iij);

% Line Power Flows.. for m = 1:nbus for n = 1:nbus if m ~= n Sij(m,n) = V(m)*conj(Iij(m,n)); end end end %Sij = sparse(Sij); Pij = real(Sij); Qij = imag(Sij);

71

% Line Losses.. Lij = zeros(nl,1); for m = 1:nl p = fb(m); q = tb(m); Lij(m) = Sij(p,q) + Sij(q,p); end Lpij = real(Lij); Lqij = imag(Lij); % Display disp('-------------------------------------------------------------------------------'); disp(' Line Flow and Losses '); disp('-------------------------------------------------------------------------------'); disp('|From|To | P | Q | From| To | P | Q | Line Loss |'); disp('|Bus |Bus| p.u. | p.u. | Bus | Bus| p.u. | p.u. | p.u. | p.u.|'); for m = 1:nl p = fb(m); q = tb(m); disp('----------------------------------------------------------------------------'); fprintf('%4g', p); fprintf('%4g', q); fprintf(' %8.3f', Pij(p,q)); fprintf(' %8.3f', Qij(p,q)); fprintf(' %4g', q); fprintf('%4g', p); fprintf(' %8.3f', Pij(q,p)); fprintf(' %8.3f', Qij(q,p)); fprintf(' %8.3f', Lpij(m)); fprintf(' %8.3f', Lqij(m));fprintf('\n'); end disp('--------------------------------------------------------------------------------'); fprintf(' Total Loss '); fprintf(' %8.3f', sum(Lpij)); fprintf(' %8.3f', sum(Lqij)); fprintf('\n'); disp('--------------------------------------------------------------------------------'); disp('################################################################################');

--------------------------------------------------------------------------------------------function rect = pol2rect(rho,theta) rect = rho.*cos(theta) + j*rho.*sin(theta);

PROBLEM: Perform the Load flow analysis for given power system network using Gauss Seidal Iterative Algorithm. The magnitude of a voltage bus 1 is adjusted t0 1.05 per unit. The scheduled loads at buses 2 and 3 are as marked on the diagram. Line Impedances are marked in per unit on a 100-MVA base and line charging susceptances are neglected.

SOLUTION:
##################################################################################### ------------------------------------------------------------------------------------Gauss Siedal Load flow Analysis ------------------------------------------------------------------------------------| Bus | V | Angle | P Q | No | pu | Degree | p.u. p.u ------------------------------------------------------------------------------------1 1.0500 0.0000 4.0948 -1.8899 ------------------------------------------------------------------------------------2 0.9818 -3.5034 -2.5659 1.1019 ------------------------------------------------------------------------------------3 1.0013 -2.8623 -1.3860 0.4520 ------------------------------------------------------------------------------------Line Flow and Losses ------------------------------------------------------------------------------------|From|To | P | Q | From| To | P | Q | Line Loss | |Bus |Bus| p.u. | p.u. | Bus | Bus| p.u. | p.u. | p.u. | p.u. | ------------------------------------------------------------------------------------1 2 1.995 0.840 2 1 -1.910 -0.670 0.085 0.170 ------------------------------------------------------------------------------------1 3 2.100 1.050 3 1 -2.050 -0.900 0.050 0.150 ------------------------------------------------------------------------------------2 3 -0.656 -0.432 3 2 0.664 0.448 0.008 0.016 ------------------------------------------------------------------------------------Total Loss 0.143 0.336 ------------------------------------------------------------------------------------##################################################################################### >>

73
function ybus = ybusgs(linedata); % Returns ybus fb = linedata(:,1); % From bus number... tb = linedata(:,2); % To bus number... r = linedata(:,3); % Resistance, R... x = linedata(:,4); % Reactance, X... b = linedata(:,5); % Ground Admittance, B/2... z = r + i*x; % Z matrix... y = 1./z; % To get inverse of each element... b = i*b; % Make B imaginary... nbus = max(max(fb),max(tb)); nbranch = length(fb); ybus = zeros(nbus,nbus); % no. of buses... % no. of branches... % Initialise YBus...

% Formation of the Off Diagonal Elements... for k=1:nbranch ybus(fb(k),tb(k)) = -y(k); ybus(tb(k),fb(k)) = ybus(fb(k),tb(k)); end % Formation of Diagonal Elements.... for m=1:nbus for n=1:nbranch if fb(n) == m | tb(n) == m ybus(m,m) = ybus(m,m) + y(n) + b(n); end end end ybus; % Bus Admittance Matrix

RESULT: Thus, the MATLAB program has been written to perform load flow analysis of given power system network by using Gauss Seidal Iterative Algorithm.

SINGLE AREA SYSTEM: 1. An isolated power station has the following parameters Turbine time constant, T = 0.5sec Governor time constant, g = 0.2sec Generator inertia constant, H = 5sec Governor speed regulation = R per unit The load varies by 0.8 percent for a 1 percent change in frequency, i.e., D = 0.8 (a) The governor speed regulation is set to R = 0.05 per unit. The turbine rated output is 250MW at nominal frequency of 60Hz. The LFC System is equipped with the secondary integral control loop for AGC. A sudden load change of 50 MW (PL = 0.2 per unit) occurs. Set the integral controller gain to KI = 7. Construct the SIMULINK block diagram and obtain frequency deviation response of above condition. SOLUTION: SIMULINK BLOCK DIAGRAM

75

Ex.No:9 02/09/11

LOAD FREQUENCY CONTROL OF SINGLE AND DOUBLE AREA SYSTEM WITH TIE LINE

AIM: To simulate the characteristics of load frequency control of single and double area system with tie line using MATLAB. THEORY: The Load frequency control [LFC] loop controls the real power and frequency and Automatic Voltage Generator [AVR] loop regulates the reactive power and voltage magnitude. LFC has gained in importance with the growth of interconnected systems and has made the operation of interconnected System Possible. The Operation Objectives of the LFC are to maintain reasonably uniform frequency, to divide the load between generators, and to control the Tie line interchange schedules. AGC IN A SINGLE AREA SYSTEM: With the primary LFC loop, a change in the system load will result in steady state frequency deviation, depending on the governor speed regulation. In order to reduce the frequency deviation to zero, we must provide a reset action. The rest action can be achieved by introducing an integral controller to act on the load reference setting to change the speed set point. The integral controller increases the system type by 1 which forces the final frequency deviation to zero. The LFC system, with the addition of the secondary loop, is shown in Figure. The integral controller gain KI must be adjusted for a satisfactory transient response.

Frequency Deviation Step Response

( in p.u. rad)

Time ( sec)

77

AGC IN THE TWO AREA SYSTEM: In many cases, a group of generators are closely coupled internally and swing in unison. Furthermore, the generator turbines tend to have same response characteristics. Such a group of generators are said by Coherent. Then it is possible to let the LFC loop represent the whole system, which is referred to as a Control area. Block diagram of two area system with only primary LFC loop is shown in figure,

Conventional LFC is based upon lie-line bias control, where each area tends to reduce the mea control error (ACE) to zero. The control error for each area consists of a linear combination of frequency and tieline error.

The area bias Ki determines the amount of interaction during a disturbance in the neighboring areas. An overall satisfactory performance is achieved when Ki is selected equal to the frequency bias factor of that area, i.e., Bi = 1/Ri + Di; Thus, the ACEs for a two-area system are

TWO AREA SYSTEM: 1. A two area system connected by a tie line has the following parameters on a 1000MVA common base Area Speed Regulation Frequency sens.load coeff. Inertia Constant Base Power Governor Time Constant Turbine Time Constant 1 2

R1=0.05 D1=0.6 H1=5 1000MVA g1 = 0.2sec T1 =0.5sec

R2=0.0625 D2=0.9 H2=4 1000MVA g1 = 0.3sec T1 =0.6sec

The units are operating in parallel at the nominal frequency of 60Hz. The synchronizing power coefficient is computed from the initial operating condition and is given to be Ps = 2 p.u. A load change of 187.5 MW occurs in area 1. Construct the SIMULINK model for the two area system with the inclusion of the ACE and Obtain the frequency and Power response of each area. SOLUTION: SIMULINK BLOCK DIAGRAM

79

Where, P12 and P21 are departures from scheduled interchanges. ACEs are used as actuating signals to activate changes in the reference power set points, and when steady state is reached. P12 and will be zero. The integrator gain constant must be chosen small enough so as not to cause the area to go into a chase mode. PROCEDURE: 1. Enter the command window of the MATLAB. 2. Create a new Model by selecting File - New Model. 3. Pick up the blocks from the Simulink library browser and form a block diagram. 4. After forming the block diagram, save the block diagram. 5. Double click the scope and view the result.

Frequency Deviation Step Response

( in p.u. rad)

Time ( sec) Power Deviation Step Response

P( in p.u. watts)

Pm1

Pm2 P12
Time ( sec)

81

RESULT: Thus the Load Frequency control of single and double area system with tie line has been simulated using MATLAB SIMULINK.

Flow chart:

Start

Read Total demand, Cost matrix Function, Loss Coefficient matrix, Power limit for each unit

Initialize =10

abs >0.0001

Calculate P, P, and Loss of each unit

Calculate &

Calculate Total Generation Cost

Display , P of each unit ,total loss and total generation cost

Stop

83

Ex.No:10 23/09/11

ECONOMIC LOAD DISPATCH BY -- ITERATIVE SOLUTION METHOD

AIM: To determine the Economic Load Dispatch for lossless and lossy system by -- iterative solution method. THEORY: The purpose of economic load dispatch is to reduce costs for the power system. By economic scheduling, we mean to find the generation of the different generators or plants, so that total fuel cost is minimum and at the same time the total demand and losses at any instant must be met by the total generation. The Economic Dispatch Problem involves the solution for two different problems. They are Unit Commitment and On-Line Dispatch. Unit Commitment is the optimum allocation an each generating station at various station load levels. FORMULAE:

Bii = Loss Coefficients, Bij = 0 for Lossy System B is Null Matrix for Lossless System.

PROBLEM - 1 :( Without Losses) The Fuel-cost functions for three thermal plants in $/h are given by C1 = 500 + 5.3P1 + 0.004P12 C2 = 400 + 5.5P2 + 0.006P22 C3 = 200 + 5.8P3 + 0.009P32 Where P1, P2, P3 are in MW. The total load, PD, is 975MW with the following generator limits in (MW): 200 < P1 < 450 150 < P2 < 350 100 < P3 < 225 Neglecting line losses, find the Optimal Dispatch and the total cost in $/h by Iterative Method.

PROBLEM - 2 :( With Loss) The Fuel-cost functions for three thermal plants in $/h are given by C1 = 200 + 7.0P1 + 0.008P12 $/h C2 = 180 + 6.3P2 + 0.009P22 $/h C3 = 140 + 6.8P3 + 0.007P32 $/h Where P1, P2, P3 are in MW. The total load, PD, is 150 MW with the following generator limits in (MW): 10 < P1 < 85 10 < P2 < 80 10 < P3 < 70 The Real Power Loss is given by the simplified expression PL = 0.000218P12 + 0.000228P22 + 0.000179P32 Find the Optimal Dispatch and the total cost in $/h by Iterative Method.

85

MATLAB PROGRAM:
clc; clear all; close all; disp('---------------------------------------------------') fprintf('\nECONOMIC DISPATCH INCLUDING GENERATOR LIMITS\n') disp('---------------------------------------------------') ff = 999; while ff > 0 fprintf('\n1.Without Losses\n2.With Losses\n\n') ch = input('Enter Your Choice: '); PD = input('Enter the Total Demand (MW):'); CT = input('Enter the Cost matrix Function: '); A = CT(:,1); B = CT(:,2); C = CT(:,3); N = length(A);% Gives the No of Generator units PLIM = input('Enter the Power Limit Matrix [min max]: '); if(ch == 2) BLC = input('Enter Loss Coefficients Matrix [B]:'); else BLC = zeros(N,N); end L = input('Enter the initial value(assumption) of Lambda : '); DEL_L = 10; iter = 0; while (abs(DEL_L) >= 0.0001) %Calculation of P and Del P for i=1:N NUM1 =(L -B(i)); DEN1 =2*(C(i)+L*BLC(i,i)); P(i) = NUM1./DEN1; if(P(i)>PLIM(i,2)) P(i)=PLIM(i,2); end if(P(i)<PLIM(i,1)) P(i)=PLIM(i,1); end end PSUM =sum(P); PLSUM = sum(BLC*(P.^2)'); DELP = PD + PLSUM - PSUM; %Calculation of Del Lambda for i=1:N NUM2 =(C(i) + B(i).*BLC(i,i)); DEN2 = 2*(C(i)+L*BLC(i,i))*(C(i)+L*BLC(i,i)); PbyDel(i) = NUM2./DEN2; end SIGPbyDel = sum(PbyDel); DEL_L = DELP/SIGPbyDel;

--------------------------------------------------ECONOMIC DISPATCH INCLUDING GENERATOR LIMITS --------------------------------------------------1.Without Losses 2.With Losses Enter Enter Enter Enter Enter Your Choice: 1 the Total Demand (MW):975 the Cost matrix Function: [500 5.3 0.004;400 5.5 0.006;200 5.8 0.009;]; the Power Limit Matrix [min max]: [200 450;150 350;100 225;]; the initial value(assumption) of Lambda : 6 9.40 $/MWh

Incremental Cost of Delivered Power "Lambda" = Optimal Dispatch of Generation: 450.0000 324.9888 199.9925

Total System Loss = Total generation cost = 0.Exit the Program 1.Continue the program Enter the choice:1 1.Without Losses 2.With Losses Enter Enter Enter Enter Enter Enter

0.00 8236.07 $/h

Your Choice: 2 the Total Demand (MW):150 the Cost matrix Function: [200 7.0 0.008;180 6.3 0.009;140 6.8 0.007;]; the Power Limit Matrix [min max]: [10 85;10 80;10 70;]; Loss Coefficients Matrix [B]:[0.000218 0 0;0 0.000228 0;0 0 0.000179;]; the initial value(assumption) of Lambda : 6 7.68 $/MWh

Incremental Cost of Delivered Power "Lambda" = Optimal Dispatch of Generation: 35.0905 64.1316 52.4765

Total System Loss = Total generation cost = 0.Exit the Program 1.Continue the program Enter the choice:0 >>

1.70 1592.65 $/h

87
L = L + DEL_L; iter = iter+1; end %Display fprintf('\nIncremental Cost of Delivered Power "Lambda" = % 10.2f $/MWh \n', L) fprintf('\nOptimal Dispatch of Generation:\n') disp(P') fprintf('\nTotal System Loss = % 10.2f MW \n', PLSUM) %Generation Cost PG = [ones(1,N); P; P.^2]; for i = 1:N GENCOST(i) = CT(i,:)*PG(:,i); end TOTAL =sum(GENCOST); fprintf('\nTotal generation cost = % 10.2f $/h \n', TOTAL) fprintf('\n 0.Exit the Program ') fprintf('\n 1.Continue the program ') m= input('\nEnter the choice:'); if(m==1) ff =999; else ff = 0; end end

RESULT: Thus the MATLAB program has been written to determine the Economic Load Dispatch of Power Generation System by using -- iterative solution method.

Flow Chart:

Start

Read line data, bus data, tolerance, for P, Q :

1. Compute Y bus Matrix 2.Intialize Bus Voltage State Vector 3.Set iteration count, iter =1 Bus No, i =1

i=i+1

Compute Pi and Qi

=
=1

cos( + )

=
=1

sin( + )

Does i refers to PV Bus

Calculate = ()

Calculate = ()
= ()

Check for Q limit

() = () = ()

= ()

() = () = ()

Is i < N

Form J =

, Calculate

= []1

Update Bus Voltage Vnew =Vold + V, new = old +

Check for tolerance Pi, Qi <

Calculate line flows, slack bus power, total line losses Stop

iter = iter + 1

89

Ex.No:11 23/09/11

LOAD FLOW ANALYSIS BY NEWTON RAPHSON METHOD

AIM: To perform the Load flow analysis of power system network by Newton Raphson method. THEORY: The Gauss-Seidal algorithm is very simple but the convergence becomes increasingly slow as the system size grows. The Newton Raphson technique converges equally fast for large as well as small systems, usually in less than 4 or 5 iterations but more functional evaluations are required. It has become very popular for large system studies The Newton Raphson method of load flow analysis is an iterative method which approximates the set of non-linear simultaneous equations to a set of linear simultaneous equations using Taylors series expansion and the terms are limited to first order approximation.

ALGORITHM: 1. Form Y Bus matrix 2. Assume flat start for starting voltage solution = 0, for i = 1,,N for all buses except slack bus

= 1.0, for i = M+1,M+2,...,N(for all PQ bus) Where, M = no of PV Bus 3. For Load buses, Calculate Pical and Qical 4. For PV buses, Check for Q limit violation. If Qi(min) < Qical < Qi(max), then bus acts as PV Bus If Qi(min) > Qical, then, Qi(spec) = Qi(min) If Qi(max) < Qical, then, Qi(spec) = Qi(max) If Qlimit is violated, then treat this bus as P-Q bus till convergence is obtained

PROBLEM: Perform the Load flow analysis for given power system network using newton raphson Iterative Algorithm. The magnitude of a voltage bus 1 is adjusted t0 1.05 per unit. The scheduled loads at buses 2 and 3 are as marked on the diagram. Line Impedances are marked in per unit on a 100-MVA base and line charging susceptances are neglected.

91

5. Compute mismatch vector using

6. Compute ; i = 1,2,.,N except slack ; i = M + 1,,N 7. Compute Jacobian matrix using

8. Obtain state correction vector

9. Update state vector using Vnew = Vold + V new = old + 10. This procedure is continued until | Pi | < and | Qi | < , Otherwise go to step 3. 11. Stop the Execution.

OUTPUT:

No of Iterations : 5 ####################################################################################### --------------------------------------------------------------------------------------Newton Raphson Loadflow Analysis -------------------------------------------------------------------------------------| Bus | V | Angle | Injection | Generation | Load | | No | pu | Degree | MW | MVar | MW | Mvar | MW | MVar | ----------------------------------------------------------------------------------1 1.0500 0.0000 4.095 1.890 4.095 1.890 0.000 0.000 ----------------------------------------------------------------------------------2 0.9818 -3.5035 -2.566 -1.102 -0.000 -0.000 2.566 1.102 ----------------------------------------------------------------------------------3 1.0012 -2.8624 -1.386 -0.452 -0.000 -0.000 1.386 0.452 --------------------------------------------------------------------------------------Total 0.143 0.336 4.095 1.890 3.952 1.554 --------------------------------------------------------------------------------------###################################################################################### -----------------------------------------------------------------------------------Line FLow and Losses -----------------------------------------------------------------------------------|From|To | P | Q | From| To | P | Q | Line Loss | |Bus |Bus| MW | MVar | Bus | Bus| MW | MVar | MW | MVar | --------------------------------------------------------------------------------1 2 1.995 0.840 2 1 -1.910 -0.670 0.085 0.170 --------------------------------------------------------------------------------1 3 2.100 1.050 3 1 -2.050 -0.900 0.050 0.150 --------------------------------------------------------------------------------2 3 -0.656 -0.432 3 2 0.664 0.448 0.008 0.016 ----------------------------------------------------------------------------------Total Loss 0.143 0.336 ----------------------------------------------------------------------------------################################################################################### >>

MATLAB PROGRAM
% Type.... % 1 - Slack Bus.. % 2 - PV Bus.. % 3 - PQ Bus. clc; clear all; close all; % | From | To % | Bus | Bus linedata = [ 1 2 1 3 2 3 Y = ybusnr(linedata);

93

| |

R 0.02 0.01 0.0125

| |

X 0.04 0.03 0.025

| |

B/2 | | 0.00; 0.00; 0.00;];

% |Bus | Type | Vsp | theta | PGi | QGi | PLi | QLi | Qmin | Qmax | busdata = [ 1 1 1.05 0 0.0 0 0 0 0 0; 2 3 1.0 0 0.0 0 2.566 1.102 0 0; 3 3 1.0 0 0.0 0 1.386 0.452 0 0; ]; bus = busdata(:,1); % Bus Number.. nbus = max(bus); % To get no. of buses type = busdata(:,2); % Type of Bus 1-Slack, 2-PV, 3-PQ.. V = busdata(:,3); % Specified Voltage.. del = busdata(:,4); % Voltage Angle.. Pg = busdata(:,5); % PGi.. Qg = busdata(:,6); % QGi.. Pl = busdata(:,7); % PLi.. Ql = busdata(:,8); % QLi.. Qmin = busdata(:,9); % Minimum Reactive Power Limit.. Qmax = busdata(:,10); % Maximum Reactive Power Limit.. P = Pg - Pl; % Pi = PGi - PLi.. Q = Qg - Ql; % Qi = QGi - QLi.. Psp = P; % P Specified.. Qsp = Q; % Q Specified.. G = real(Y); % Conductance matrix.. B = imag(Y); % Susceptance matrix.. pv = find(type == 2 | type == 1); % PV Buses.. pq = find(type == 3); % PQ Buses.. npv = length(pv); % No. of PV buses.. npq = length(pq); % No. of PQ buses.. Tol = 1; Iter = 1; while (Tol > 1e-5) % Iteration starting.. P = zeros(nbus,1); Q = zeros(nbus,1); % Calculate P and Q for i = 1:nbus for k = 1:nbus P(i) = P(i) + V(i)* V(k)*(G(i,k)*cos(del(i)-del(k)) + B(i,k)*sin(del(i)-del(k))); Q(i) = Q(i) + V(i)* V(k)*(G(i,k)*sin(del(i)-del(k)) - B(i,k)*cos(del(i)-del(k)));

end % Checking Q-limit violations.. if Iter <= 7 && Iter > 2 % Only checked up to 7th iterations.. for n = 2:nbus if type(n) == 2 QG = Q(n)+Ql(n); if QG < Qmin(n) V(n) = V(n) + 0.01; elseif QG > Qmax(n) V(n) = V(n) - 0.01; end end end end % Calculate change from specified value dPa = Psp-P; dQa = Qsp-Q; k = 1; dQ = zeros(npq,1); for i = 1:nbus if type(i) == 3 dQ(k,1) = dQa(i); k = k+1; end end dP = dPa(2:nbus); M = [dP; dQ]; % Mismatch Vector

95

% Jacobian % J1 - Derivative of Real Power Injections with Angles.. J1 = zeros(nbus-1,nbus-1); for i = 1:(nbus-1) m = i+1; for k = 1:(nbus-1) n = k+1; if n == m for n = 1:nbus J1(i,k) = J1(i,k) + V(m)* V(n)*(-G(m,n)*sin(del(m)-del(n)) + B(m,n)*cos(del(m)-del(n))); end J1(i,k) = J1(i,k) - V(m)^2*B(m,m); else J1(i,k) = V(m)* V(n)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-del(n))); end end end % J2 - Derivative of Real Power Injections with V.. J2 = zeros(nbus-1,npq); for i = 1:(nbus-1)

end

97
% Checking Q-limit violations.. if Iter <= 7 && Iter > 2 % Only checked up to 7th iterations.. for n = 2:nbus if type(n) == 2 QG = Q(n)+Ql(n); if QG < Qmin(n) V(n) = V(n) + 0.01; elseif QG > Qmax(n) V(n) = V(n) - 0.01; end end end end % Calculate change from specified value dPa = Psp-P; dQa = Qsp-Q; k = 1; dQ = zeros(npq,1); for i = 1:nbus if type(i) == 3 dQ(k,1) = dQa(i); k = k+1; end end dP = dPa(2:nbus); M = [dP; dQ]; % Mismatch Vector % Jacobian % J1 - Derivative of Real Power Injections with Angles.. J1 = zeros(nbus-1,nbus-1); for i = 1:(nbus-1) m = i+1; for k = 1:(nbus-1) n = k+1; if n == m for n = 1:nbus J1(i,k) = J1(i,k) + V(m)* V(n)*(-G(m,n)*sin(del(m)-del(n)) + B(m,n)*cos(del(m)-del(n))); end J1(i,k) = J1(i,k) - V(m)^2*B(m,m); else J1(i,k) = V(m)* V(n)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-del(n))); end end end % J2 - Derivative of Real Power Injections with V.. J2 = zeros(nbus-1,npq); for i = 1:(nbus-1)

dTh = X(1:nbus-1); dV = X(nbus:end);

% Change in Voltage Angle.. % Change in Voltage Magnitude..

99

% Updating State Vectors.. del(2:nbus) = dTh + del(2:nbus); k = 1; for i = 2:nbus if type(i) == 3 V(i) = dV(k) + V(i); k = k+1; end end Iter = Iter + 1; Tol = max(abs(M));

% Voltage Angle..

% Voltage Magnitude..

% Tolerance..

end fprintf('No of Iterations : %d\n\n',Iter); Vm = pol2rect(V,del); % Converting polar to rectangular.. Del = 180/pi*del; % Bus Voltage Angles in Degree... fb = linedata(:,1); % From bus number... tb = linedata(:,2); % To bus number... nl = length(fb); % No. of Branches.. Pl = busdata(:,7); % PLi.. Ql = busdata(:,8); % QLi.. Iij = zeros(nbus,nbus); Sij = zeros(nbus,nbus); Si = zeros(nbus,1); % Bus Current Injections.. I = Y*Vm; Im = abs(I); Ia = angle(I); %Line Current Flows.. for m = 1:nl p = fb(m); q = tb(m); Iij(p,q) = -(Vm(p) - Vm(q))*Y(p,q); % Y(m,n) = -y(m,n).. Iij(q,p) = -Iij(p,q); end Iij = sparse(Iij); Iijm = abs(Iij); Iija = angle(Iij); % Line Power Flows.. for m = 1:nbus for n = 1:nbus if m ~= n Sij(m,n) = Vm(m)*conj(Iij(m,n)); end end

end Sij = sparse(Sij); Pij = real(Sij); Qij = imag(Sij); % Line Losses.. Lij = zeros(nl,1); for m = 1:nl p = fb(m); q = tb(m); Lij(m) = Sij(p,q) + Sij(q,p); end Lpij = real(Lij); Lqij = imag(Lij); % Bus Power Injections.. for i = 1:nbus for k = 1:nbus Si(i) = Si(i) + conj(Vm(i))* Vm(k)*Y(i,k); end end Pi = real(Si); Qi = -imag(Si); Pg = Pi+Pl; Qg = Qi+Ql;

101

disp('###############################################################################'); disp(' Newton Raphson Loadflow Analysis ');

disp('###############################################################################'); disp('| Bus | disp('| No | V pu | | Angle | Injection MW | MVar | | Generation MW | Mvar | | Load |');

Degree |

) MW | MVar | ';

for m = 1:nbus disp ('-------------------------------------------------------------------------' ); fprintf('%3g', m); fprintf(' %8.3f', fprintf(' %8.3f', fprintf(' %8.3f', end disp('-------------------------------------------------------------------------' ); fprintf(' Total ' );fprintf(' %8.3f', sum(Pi)); fprintf(' ' %8.3f', sum(Qi)); fprintf(' %8.4f', V(m)); fprintf(' %8.4f', Del(m)); Pi(m)); fprintf(' %8.3f', Qi(m)); Pg(m)); fprintf(' %8.3f', Qg(m)); Pl(m)); fprintf(' %8.3f', Ql(m)); fprintf('\n');

103
fprintf(' fprintf(' %8.3f', sum(Pi+Pl)); fprintf(' %8.3f', sum(Qi+Ql)); %8.3f', sum(Pl)); fprintf(' %8.3f', sum(Ql)); fprintf('\n');

disp('-------------------------------------------------------------------------' ); disp('###############################################################################'); disp('-------------------------------------------------------------------------'

disp('

Line FLow and Losses ');

disp('-------------------------------------------------------------------------' disp('|From|To | disp('|Bus |Bus| P MW | | Q MVar | From| To | | Bus | Bus| P MW | | Q MVar | | Line Loss |'); MW | MVar |');

for m = 1:nl p = fb(m); q = tb(m); disp('-------------------------------------------------------------------------' ); fprintf('%4g', p); fprintf('%4g', q); fprintf(' %8.3f', Pij(p,q)); fprintf(' %8.3 f', Qij(p,q)); fprintf(' %4g', q); fprintf('%4g', p); fprintf(' %8.3f', Pij(q,p)); fprintf(' %8.3f', Qij(q,p)); fprintf(' %8.3f', Lpij(m)); fprintf(' %8.3f', Lqij(m)); fprintf('\n'); end disp('-------------------------------------------------------------------------' fprintf(' fprintf(' Total Loss %8.3f', sum(Lpij)); fprintf(' %8.3f', sum(Lqij)); '); fprintf('\n');

disp('###############################################################################'); disp('-------------------------------------------------------------------------' );

RESULT: Thus the MATLAB program has been written to perform load analysis of given power system network by using Newton Raphson Method.

PROBLEM: Let R = 0.125 ohm, L = 10mH, and the Source voltage be given by v(t) = 151Sin(377t + ). Determine the current response after closing the switch for the following cases. A)No DC offset B)For Maximum DC Offset

SOLUTION:

Enter Enter Enter Enter >>

the the the the

value value value value

of of of of

R: 0.125 L: 0.010 Vm: 151 f: 60

105

Ex.No:12 30/09/11

TRANSIENT RESPONSE OF SIMPLE RL CIRCUIT

AIM: To analyze the transient response of simple RL circuit using MATLAB. THEORY: Consider a sinusoidal voltage v(t) = Vm Sin(wt+)applied to a simple RL circuit at time t = 0,as shown in fig.

The circuit consists of R in series with a constant L. The instantaneous voltage equation for the circuit is

The solution for the current may be shown to be

Where, Im = Vm/Z, = L/R, = tan-1L/R, Z =

RESPONSE WITHOUT DC OFFSET


40

20

i(t)

-20

-40

0.05

0.1

0.15 t,sec

0.2

0.25

0.3

0.35

RESPONSE WITH MAXIMUM DC OFFSET

60 40 20
i(t)

0 -20 -40

0.05

0.1

0.15 t,sec

0.2

0.25

0.3

0.35

107

The first term is the steady state sinusoidal component. The second term is a dc transient component known as dc offset which decays exponentially. The DC and sinusoidal Components are equal and opposite when t=0, so that the condition for zero initial current is satisfied. The Magnitude of the DC component depends on the instant of application of the voltage to the circuit, as defined by the angle . The DC Component is zero when ( = ). Similarly, the DC component will have a maximum initial value of Vm/Z which is the peak value of the alternating component, if the circuit is closed when = /2 radians. If L >> R , then = /2, so that circuit closure at voltage maximum would give no dc component, and closure at voltage zero would cause the maximum dc transient current to flow.
MATLAB PROGRAM:
clc; clear all; close all; R = input('Enter the value of R: '); L = input('Enter the value of L: '); Vm = input('Enter the value of Vm: '); f = input('Enter the value of f: '); w = 2*pi*f; X =w*L; Z = R + j*X; Zm = abs(Z); Za = angle(Z); Im = Vm/Zm; tau = L/R; gamma = atan(X/R);% in radian alpha1 = gamma; alpha2 = gamma - (pi/2); t = 0: 0.001:0.3; i1 = Im*sin(w*t+alpha1-gamma)-Im*exp(-t/tau).*sin(alpha1-gamma); i2 = Im*sin(w*t+alpha2-gamma)-Im*exp(-t/tau).*sin(alpha2-gamma); grid on subplot(2,1,1),plot(t,i1) xlabel('t,sec'),ylabel('i(t)') subplot(2,1,2) plot(t,i2) xlabel('t,sec'),ylabel('i(t)')

RESULT: Thus the MATLAB Program has been written for Transient analysis of Simple RL Network and its Output waveform has been obtained.

EXERCISES: 1. Two wires of single phase transmission line are separated by 3m. The radius of each conductor is 0.02m. Find the inductance and capacitance of each conductor? 2. Determine the inductance and capacitance per phase of a 3-phase transmission line in fig. Diameter of the conductors is 2.5 cm. Assume the line is transposed b 5m 4m

6m

3. Find the inductance and capacitance per phase of a double circuit, three phase system as shown in fig. The conductor radius is 2.5cm.

D=4 m

8m

b'

4m

109

Ex.No:13
30/09/11

COMPUTATION OF TRANSMISSION LINE PARAMETERS

AIM: To write a MATLAB program to determine the line parameters (Inductance/phase and Capacitance/phase) of a single phase, three phase single and double circuit transmission lines for different conductor arrangements. THEORY: Transmission line has four parameters namely resistance, inductance, capacitance and conductance. The inductance and capacitance are due to the effect of magnetic and electric fields around the conductor. The resistance of the conductor is best determined from the manufactures data, the inductances and capacitances can be evaluated using the formula. FORMULAE:

1. Single Phase 2 wire system: a

D a'

Fig. 1.1 Conductor arrangement

D L = 2 10 7 ln R' 2 o C an = F m ln (D R )
Where,

H m

L = Inductance of conductor Can = Capacitance of conductor a w.r.t neutral D = Distance between the conductors (m) R= 0.7788 R R = Radius of the conductors 0 = Absolute Permittivity = 8.854*10-12

OUTPUT: --------------------------------------------------COMPUTATION OF TRANSMISSION LINE PARAMETERS --------------------------------------------------1.Single Phase - 2 Wire System 2.Three Phase Single Circuit Line (Symmetrical Spacing) 3.Three Phase Single Circuit Line (UnSymmetrical Spacing) 4.Three Phase Double Circuit Line (Symmetrical Spacing) Enter Your Choice: 1 Single Phase - 2 Wire System D (in m) = 3 R (in m) = 0.02 Inductance/Phase of a Conductor(H/m): 1.0521e-006

Capacitance/Phase of a Conductor(F/m):

1.1103e-011

0.Exit the Program 1.Continue the program Enter the choice:1 1.Single Phase - 2 Wire System 2.Three Phase Single Circuit Line (Symmetrical Spacing) 3.Three Phase Single Circuit Line (UnSymmetrical Spacing) 4.Three Phase Double Circuit Line (Symmetrical Spacing) Enter Your Choice: 3 Three Phase Single Circuit Line (UnSymmetrical Spacing) Dab (in m) = 5 Dbc (in m) = 4 Dca (in m) = 6 R (in m) = 0.0125 Inductance/Phase of a Conductor(H/m): 1.2456e-006

Capacitance/Phase of a Conductor(F/m):

9.3062e-012

0.Exit the Program 1.Continue the program Enter the choice:1

111

2. Three phase single circuit line Symmetrical Spacing b D

D a Fig. 1.2 Conductor arrangement c

D L a = L b = L c = 2 10 7 ln R' 2 o C an = F m ln (D R )
Where, L = Inductance of conductor Can = Capacitance of conductor a w.r.t neutral D = Distance between the conductors (m) R= 0.7788 R R = Radius of the conductors 0 = Absolute Permittivity = 8.854*10-12

H m

3. Three phase single circuit line Unsymmetrical spacing b

ab

bc

c a
ca

Fig. 1.3 Conductor arrangement

D eq L avg = 2 10 7 ln R' 2 o C an = F m ln (D eq R )

H m

1.Single Phase - 2 Wire System 2.Three Phase Single Circuit Line (Symmetrical Spacing) 3.Three Phase Single Circuit Line (UnSymmetrical Spacing) 4.Three Phase Double Circuit Line (Symmetrical Spacing) Enter Your Choice: 4 Three Phase Double Circuit Line (Symmetrical Spacing) D (in m) = 4 R (in m) = 0.025 Inductance/Phase of a Conductor(H/m): -5.3929e-007

Capacitance/Phase of a Conductor(F/m): -2.2740e-011

0.Exit the Program 1.Continue the program Enter the choice:0 >>

113

Where, Lavg = Average Inductance of the conductors Can = Capacitance of conductor a w.r.t neutral 1/3 eq = Equivalent distance between the conductors (m) = (Dab * Db c* Dca) R = 0.7788 R R = Radius of the conductors 0 = Absolute Permittivity = 8.854*10-12

4. Three phase Double Circuit line (symmetrical spacing) a c

b 3 D c

2D

b'

a Fig. 1.4 Conductor arrangement

3D L a = L b = L c = 2 10 7 ln 2R' 2 o C an = F ln 3 D 2 R

H m

Where, L = Inductance of conductor Can = Capacitance of conductor a w.r.t neutral D = Distance between the conductors (m) R = 0.7788 R R = Radius of the conductors 0 = Absolute Permittivity = 8.854*10-12

ALGORITHM: 1. Form A. B. C. D. a menu as follows Single phase two wire system Three phase single circuit line Symmetrical Spacing Three phase phase single circuit line Unsymmetrical spacing Three phase phase Double Circuit line (symmetrical spacing)

115

2. For all the cases, get the required input. 3. Perform necessary calculations. 4. Print the output. MATLAB PROGRAM:
clc; clear all; close all; disp('---------------------------------------------------') fprintf('\n COMPUTATION OF TRANSMISSION LINE PARAMETERS \n') disp('---------------------------------------------------') ff = 999; % Constants in formulae e0 = 8.854*10^(-12); c0 = 2*10^(-7); n0 = 2*pi*e0; while ff > 0 fprintf('\n1.Single Phase - 2 Wire System'); fprintf('\n2.Three Phase Single Circuit Line (Symmetrical Spacing)'); fprintf('\n3.Three Phase Single Circuit Line (UnSymmetrical Spacing)'); fprintf('\n4.Three Phase Double Circuit Line (Symmetrical Spacing)'); ch = input('\nEnter Your Choice: '); if ch == 1 fprintf('\n Single Phase - 2 Wire System\n'); D = input(' D (in m) = '); R = input(' R (in m) = '); R0 = 0.7788*R; L = c0*log(D/R0); C = n0/log(D/R); end if ch == 2 fprintf('\n Three Phase Single Circuit Line (Symmetrical Spacing)\n'); D = input(' D (in m) = '); R = input(' R (in m) = '); R0 = 0.7788*R; L = c0*log(D/R0); C = n0/log(D/R); end

if ch == 3 fprintf('\n Three Phase Single Circuit Line (UnSymmetrical Spacing)\n'); Dab = input(' Dab (in m) = '); Dbc = input(' Dbc (in m) = '); Dca = input(' Dca (in m) = '); Deq =(Dab*Dbc*Dca)^(1/3); R = input(' R (in m) = '); R0 = 0.7788*R; L = c0*log(Deq/R0); C = n0/log(Deq/R); end if ch == 4 fprintf('\n Three Phase Double Circuit Line (Symmetrical Spacing)\n'); D = input(' D (in m) = '); R = input(' R (in m) = '); R0 = 0.7788*R; L = c0*log(1.732*D/2*R0); C = n0/log(1.732*D/2*R); end fprintf('\nInductance/Phase of a Conductor(H/m):'); disp(L) fprintf('\nCapacitance/Phase of a Conductor(F/m):'); disp(C) fprintf('\n 0.Exit the Program ') fprintf('\n 1.Continue the program ') m= input('\nEnter the choice:'); if(m==1) ff =999; else ff = 0; end end

117

RESULT: Thus the MATLAB program has been written to compute the transmission line parameters and its output is verified.

119

Ex.No:14 07/10/11

LOAD FLOW ANALYSIS USING E-TAP POWER STATION

AIM: To perform load flow analysis by using ETAP Power Station THEORY: Load flow study in power system parlance is the steady state solution of the power system network. The main information obtained from this study comprises the magnitude and phase angle of load bus voltage, reactive power at generator buses, real and reactive power flow on the transmission line, other variables being specified. Newton metho6d is a power full method of solving nonlinear algebraic equation it works faster and is sure to converge in most cases as compared to Gauss Seidal method. It is in deep the practical method of load flow solution of large power network. Its only drawback is the large requirements of computer memory which has been overcome through a compact storage scheme. A number of methods are available for solving load flow problems. In all these methods, voltage solutions initially assumed and then improved upon using some iterative process until convergence is reached. In solving a power flow problem, the system assumes to be operating on their balanced condition and a single phase model is used four quantities are associated with each bus. Slack bus: It is taken as reference where the magnitude and phase angle are specified. This bus makes up the difference between the loads and generated power that are caused by the losses in the network. Load bus: At these busses the active and reactive powers are specified. The magnitude and phase angle of the bus voltage are unknown. These buses are called PQ buses.

I/P Data For All Buses Info Nominal KV Z12 Rating Model Impedance Units(%) Z13 Rating Model Impedance Units(%) Z23 Rating Model Impedance Units(%) Info Confiuration Design Balancede R=1,X=3,Y=0 Base KV=100 100 KV I/P For Impedance Remarks Assume it is the base KV

Balanced R=2,X=4,Y=10 Base KV=100

Formula:Zpu=Zact/Zbase Zbase=Vbase^2/MVAbase Zact=Zpu*Zbase=2+j4 Note:ETAP will accept base value only

Balanced R=1.25,X=2.5 Base KV=100 I/P For Generator bus Gen1

Swing %V=105 I/P For Generator bus Gen2

Refrence or slack bus Given:1.05+j0

Info Configuration Design

Voltage control %v=104 MW=200 Var limit=200& -100 I/P for Lumped Load

Generator bus Given:

Name plate MW=400 MVAR=250

Formula=pf=MW/MVA MVA=sqrt(MW^2+MVAR^2)

Generator Bus:

121

At these buses, the real power and voltage magnitude are specified. The phase angles of the voltage and reactive power are to be determined. The limits on the values of the reactive power are also specified.

PROCEDURE: Make the one line diagram for load flow analysis using ETAP software. Enter the ratings of various components in the one line diagram. Perform load flow analysis and store the report.

RESULT: Thus the Load flow analysis of Power System has been performed by using ETAP Power Station.