PSS Lab
PSS Lab
No:
Date:
Aim:
To Determine
To determine the complex bus voltages at all the buses except slack bus.
Hence only the (n-1) complex power equations are taken and iteratively solved to get the (n-
1) unknown complex voltages.
Operating Constraints
1
Power Flow Model
Where the complex power injection at the kth bus (PIk + jQIk) is equal to the complex power
flowing into the network through all the lines connected to kth bus (PIk + jQIk). Since the bus
generation and demand are specified, the complex power injection is a specified quantity and
is given by
PIk (sp) + jQIk (sp) = (PGk (sp) – PDk (sp)) + j (QGk (sp) – QDk (sp)) (2)
The complex power (Pk + jQk) can be written as a function of state variables as
N
Pk + jQk = Vk Ik* = Vk ∑ Y*km V*m (3)
m=1
Substituting Vk =|Vk|∟δk and Ykm = |Ykm| ∟θkm, equation (3) becomes
N
Pk (δ, V) = |Vk| ∑ │Ykm││Vkm│cos (δk-δm-θkm) (4)
m=1
N
Qk (δ, V) = |Vk| ∑│Y km│ │Vm│sin (δk-δm-θkm) (5)
m=1
Substituting equations (2), (4) and (5) in equation (1) we get the following two power balance
equations for kth bus.
Load Flow model in real variable form is compiled by adopting the following rules:
(i) For every bus whose bus phase angle δ is unknown, include the respective real
power balance equation (6)
(ii) For every bus whose bus voltage magnitude |V| is unknown, include the respective
reactive power balance equation (7)
Thus for a system with a slack bus and M P-V buses, the number of real power balance
equation.NP is given by,
NP = N-1
and the number reactive power balance equations.NQ is given by,
2
NQ = N-M-1
Assuming that the buses are numbered with P-Q buses first, followed by P-V buses and then
by the slack bus, the Load Flow model for the system with M P-V buses is given by
Where expressions Pk (δ,V) and Qk (δ,V) are given by equations (4) and (5). Equations (8)
and (9) can be written in compact form as
F(X) = 0 (10)
Where X = state vector= (δ1, δ2 …δNP, V1, V2…V NQ) T and the number of nonlinear
equations in F in equation (10) is equal to (NP+NQ)
Compact power flow equation has to be solved using N-R method to obtain the state vector
through iterative process. Once the solution is obtained the unknown real and reactive
injections and power flow in each line can be computed.
Let us assume a solution X0 to equation (10) and let the correct solution to (10) be X0
+ΔX. Expanding equation (10) by Taylor series at X0, and neglecting second and higher order
terms we get
The voltage correction scheme for Newton-Raphson method can be obtained by expanding
equation (12) as
𝐻 𝑁 ∆𝑉∆𝑃 ∆𝑃
( ) ( │) = ( ) (13)
𝐽 𝐿 │𝑉 ∆𝑄
3
(17)
The elements of the Jacobin matrix are given below Off – diagonal elements:
Diagonal elements:
4. Compute Jacobin matrix using equation (18), (19), (20), and (21)
5. Obtain state correction vector by solving equation (13) using optimally ordered triangular
factorization.
4
Flowchart
Read Data: , , k=1,2 …N k=1,2,…NP
, , where , tolerance
Yes
Is
No
Print Solution
Set
5
Q Limit Check for P-V bus
Compute
Set
Do
Yes
Is
No
Yes
Is
No
Switch bus k to P-Q bus
Change
Set
6
B
Exercise
1. Perform the load flow study for the given system using Newton Raphson Method
G1 G2
T1 T2
Line charging
Line No Starting bus Ending bus Series line impedance
admittance
1 1 2 0.2+0.6j 0.05j
2 2 3 0.25+0.0125j 0.035j
3 3 1 0.02+0.28j 0.015j
Reactive
Line No Starting bus Voltage magnitude Angle Real power
power
1 1 1.04 0 0 0
2 2 1 10.69 0 0
3 3 1.05 20 0 0
7
PROGRAM
clc
clear all
sb=[1 1 2]; %input('Enter the starting bus = ')
eb=[2 3 3]; % input('Enter the ending bus = ')
nl=3; %input(' Enter the number of lines= ')
nb=3; %input(' Enter the number of buses= ')
sa=[1.25-3.75j 5-15j 1.667-5j]; %input('Enter the value of series impedance =')
Ybus=zeros(nb,nb);
for i=1:nl
k1=sb(i);
k2=eb(i);
y(i)=(sa(i));
Ybus(k1,k1)=Ybus(k1,k1)+y(i);
Ybus(k2,k2)=Ybus(k2,k2)+y(i);
Ybus(k1,k2)=-y(i);
Ybus(k2,k1)=Ybus(k1,k2);
end
Ybus
Ybusmag=abs(Ybus);
Ybusang=angle(Ybus)*(180/pi);
% Calculation of P and Q
v=[1.06 1 1];
P=[0 0 0];
Q=[0 0 0];
del=[0 0 0];
Pg=[0 0.2 0];
Pd=[0 0 0.6];
Qg=[0 0 0];
8
Qd=[0 0 0.25];
for p=2:nb
for q=1:nb
P(p)=P(p)+(v(p)*v(q)*Ybusmag(p,q)*cos(del(p)+angle(Ybus(p,q))-del(q)));
Q(p)=(Q(p)+(v(p)*v(q)*Ybusmag(p,q)*sin(del(p)-angle(Ybus(p,q))-del(q))));
Pspe(p)=Pg(p)-Pd(p);
Qspe(p)=Qg(p)-Qd(p);
delP(p)=Pspe(p)-P(p);
delQ(p)=Qspe(p)-Q(p);
end
end
P;
Q;
Pspe;
Qspe;
delP;
delQ;
%Calculation of J1
P2=[0 0 0];
for p=2:nb
for q=2:nb
if(p==q)
P1=2*v(p)*Ybusmag(p,q)*cos(angle(Ybus(p,q)));
for j=1:nb
if (j~=p)
P2(q)=P2(q)+v(j)*Ybusmag(q,j)*cos(del(q)+angle(Ybus(q,j))-del(j));
PV(p,q)=P1+P2(q);
end
end
9
else
PV(p,q)=v(p)*Ybusmag(p,q)*cos(del(p)+angle(Ybus(p,q))-del(q));
end
end
end
PV;
% Calculation of J2
Pdel=[0 0 0;0 0 0;0 0 0];
for p=2:nb
for q=2:nb
if(p==q)
for j=1:nb
if(j~=p)
Pdel(p,q)=Pdel(p,q)-v(j)*v(q)*Ybusmag(q,j)*sin(del(q)-angle(Ybus(p,j))-del(j));
end
end
else
Pdel(p,q)=-v(p)*v(q)*Ybusmag(p,q)*sin(del(p)+angle(Ybus(p,q))-del(q));
end
end
end
Pdel;
%Calculation of J3
Q2=[0 0 0];
for p=2:nb
for q=2:nb
if(p==q)
Q1=2*v(p)*Ybusmag(p,q)*sin(-angle(Ybus(p,q)));
for j=1:nb
10
if (j~=p)
Q2(q)=Q2(q)+v(j)*Ybusmag(q,j)*sin(del(q)-angle(Ybus(q,j))-del(j));
QV(p,q)=Q1+Q2(q);
end
end
else
QV(p,q)=v(p)*Ybusmag(p,q)*sin(del(p)-angle(Ybus(p,q))-del(q));
end
end
end
QV;
%Calculation of J4
Qdel=[0 0 0;0 0 0;0 0 0];
for p=2:nb
for q=2:nb
if(p==q)
for j=1:nb
if(j~=p)
Qdel(p,q)=Qdel(p,q)+v(j)*v(q)*Ybusmag(q,j)*cos(del(q)+angle(Ybus(p,j))-
del(j));
end
end
else
Qdel(p,q)=-v(p)*v(q)*Ybusmag(p,q)*cos(del(p)+angle(Ybus(p,q))-del(q));
end
end
end
Qdel;
11
%Jacobian matrix
PV(1,:)=[ ];
PV(:,1)=[ ];
Pdel(1,:)=[ ];
Pdel(:,1)=[ ];
QV(1,:)=[ ];
QV(:,1)=[ ];
Qdel(1,:)=[ ];
Qdel(:,1)=[ ];
J=[PV Pdel;QV Qdel]
%Find the change in v&del
delP(1:1)=[];
delQ(1:1)=[];
delpq=[delP';delQ']
vdel=inv(J)*delpq
%Find new v&del
for i=1:nb-1
for j=2:nb
vnew(i)=v(j)+vdel(i);
delnew(i)=del(j)+vdel(i+2);
end
end
VNEW=[v(1) vnew]
DELNEW=[del(1) delnew]
12
OUTPUT:
Enter the number of buses: 3
Enter the number of lines: 3
Enter the number of starting bus: [1 1 2]
Enter the number of ending buses: [2 3 3]
Enter the details of series line impedance: [0 -0.2-0.6j -0.02-0.28j; -0.2-0.6j 0 -0.25-0.0125j; -
0.02-0.28j -0.25-0.0125j 0]
Enter the details of line impedance: [0 -20j -66.67j; -20j 0 -28.57j; -66.67j -28.57j 0]
Ybus =
-0.2538 -63.1167i 0.5000 - 1.5000i 0.2538 - 3.5533i
0.5000 - 1.5000i -3.9900 -28.3705i 3.9900 - 0.1995i
0.2538 - 3.5533i 3.9900 - 0.1995i -3.9900 -28.3705i
Enter the voltage magnitude of bus1:1.04
Enter the angle of bus1:0
Enter the real power of bus1:0
Enter the reactive power of bus1:0
Enter the voltage magnitude of bus2:1
Enter the angle of bus2:10.69
Enter the real power of bus2:0
Enter the reactive power of bus2:0
Enter the voltage magnitude of bus3:1.05
Enter the angle of bus3:20
Enter the real power of bus3:0
Enter the reactive power of bus3:0
The jacobian matrices are:
1.6531 -0.6879 -10.7867 -4.1860
0.2717 -2.1082 -4.1380 -16.4133
-2.8067 4.1860 55.0879 0.6879
4.1380 -7.6153 -0.2717 64.6651
The voltage magnitudes are: 1.04 0.52354 0.54972
The phase values are: 0 16.5966 17.564
13
Result:
Load flow for the given test system is carried out by Newton Raphson method and the
results have been verified by the MATLAB programs.
14
Exp.No:
Date:
Aim:
To develop Fast Decoupled (FDPF) method for solving power flow equations. To
demonstrate the iterative process of FDPF method using the given test system and to check
the results with the MATLAB software
FDPF improves the speed and reliability of convergence and to reduce storage
requirements.
Decoupling Process
There is a loose physical interactions between the real and reactive power flow in the
power system
Values of elements of sub matrix and are relatively small when compared to
the sub matrix and .
The first step in decoupling process is to neglect the coupling sub matrix and .
(1)
(2)
(3)
Where
(4)
(5)
(6)
(7)
and where
(8)
Assumptions:
15
Invoking the following in (7) and (8)
(9)
(10)
Assuming all values of to be equal to and comparing the value of with
it is found and hence
(11)
and can be expressed in
matrix form as
(12)
(13)
in (12) and (13) is negative bus susceptance matrix.
Three step process to improve decoupling
o Divide the ith equation of (12) and (13) by thereby removing the L.H.S
terms to the denominator of the R.H.S terms.
o Remove the influence of Q-flow on the calculation of
By setting all the R.H.S terms to in (12)
By omitting shunt reactance’s and off nominal tap ratio from in
(12)
By neglecting series resistance while calculating in (12) which
makes it a D.C load flow matrix.
FDPF Method
(a) Omitting from [B’] the representation of those network elements that
predominantly affect MVAR flows, i.e shunt reactances and off- nominal in-phase
transformer taps (tap ratio istaken as 1 p.u.)
(b) Omitting from [B”] the angle shifting effects of the phase shifters (phase shifter
ratio taken as 1.p.u
Both B’ and B” are real, sparse matrices and have the structures of [H] and [L] respectively
16
Q Limit Check for P-V bus
17
Read Data: Assume “Flat start” for ; ;
Is Ye
s
No
No Yes
Is Ye
s
No
No Yes
B
A Converged.
PV bus adjustment Compute and Print
solution
18
10
Exercise:
1. Perform the load flow study for the given system using Fast Decoupled Method
G1 G2
T1 T2
Line
Line Starting Ending Series line Real Reactive
charging Voltage
No Bus Bus Impedance Power Power
Admittance
19
PROGRAM
% clear all;
busd = Bus_Data;
nbus = max(busd(:,1));
Y = ybusppg(nbus, Line_Data); % Calling ybusppg.m to get Y-Bus Matrix..
BaseMVA = 100; % Base MVA..
bus_num = busd(:,1); % Bus Number..
bus_type = busd(:,2); % Type of Bus 1-Slack, 2-PV, 3-PQ..
V = busd(:,3); % Specified Voltage..
theta = busd(:,4); % Voltage Angle..
Pgen = busd(:,5)/BaseMVA; % PGi..
Qgen = busd(:,6)/BaseMVA; % Qgeni..
Pload = busd(:,7)/BaseMVA; % Ploadi..
Qload = busd(:,8)/BaseMVA; % Qloadi..
Qmin = busd(:,9)/BaseMVA; % Minimum Reactive Power Limit..
Qmax = busd(:,10)/BaseMVA; % Maximum Reactive Power Limit..
dPbyV = (-Pgen+Pload)./abs(V); % Pi = Pgeni - Ploadi..
dQbyV = (-Qgen+Qload)./abs(V); % Qi = Qgeni - Qloadi..
Pspec = dPbyV; % P Specified..
Qspec = dQbyV; % Q Specified..
G = real(Y); % Conductance matrix..
B = imag(Y); % Susceptance matrix..
Tol = 1;
Iter = 1;
B_Q = B;
for i=1:npv
B_Q(:,pv(i)-i+1) = [];
B_Q(pv(i)-i+1,:) = [];
end
while (Tol > 1e-5 && Iter < 10) % Iteration starting..
dPbyV = zeros(nbus,1);
20
dQbyV = zeros(nbus,1);
% Calculate P and Q
for i = 1:nbus
for k = 1:nbus
dPbyV(i) = dPbyV(i) + V(k)*(G(i,k)*cos(theta(i)-theta(k)) + B(i,k)*sin(theta(i)-
theta(k)));
dQbyV(i) = dQbyV(i) + V(k)*(G(i,k)*sin(theta(i)-theta(k)) - B(i,k)*cos(theta(i)-
theta(k)));
end
end
k = 1;
dQ = zeros(npq,1);
for i = 1:nbus
if bus_type(i) == 3
dQ(k,1) = dQa(i);
k = k+1;
end
end
dP = dPa(2:nbus);
M = [dP; dQ]; % Mismatch Vector
deltaTh = (-B_P)\dP;
deltaV = (-B_Q)\dQ;
Iter = Iter + 1;
Tol = max(abs(M)); % Tolerance..
end
22
OUTPUT
Piter Qiter
0 0 1 0.0 0.65 -
1 0 1 -2.2345 - 0.480400
1 1 0.9679 - 0.075759 -
2 1 - -1.965 - 0.006451
23
Result:
The FDPF for the given test system is carried out ant the results have been verified by using
MATLAB
24
Exp. No:
Date:
ECONOMIC DISPATCH WITHOUT LOSSES USING LAMBDA-ITERATION
METHOD
AIM:
To compute the optimal economical scheduling of the generators with & without considering
the network losses for the given system
THEORY:
N
Objective Function: in FT F Pi
i 1 i
Where Fi =αi + βiPi + γiPi2
25
Pi, min_--- Minimum Power generation from plant i.
Pi, max -- Maximum Power generation from plant i.
N
Let PLOAD Pi 0
i 1
By making use of Lagrangian multiplier the auxiliary function is obtained as
N
L FT , i.e, L FT PLOAD Pi
i 1
Lagrangian Multiplier
Differentiating L wrt Pi and equating to zero
L Fi Pi
(0 1) 0
Pi Pi
Fi
Pi
the condition for optimum operation is
F1 F2 F
.......................... N
P1 P2 PN
Fi
is the Incremental production cost of the unit i.
Pi
ALGORITHM FOR ECONOMIC DISPATCH METHOD:
λ=
2. Find the value of power output of all the generators by using the formula given below
Pi =
3. Check the value of power residue .If it is zero then stop the iteration and print the optimal
schedule otherwise go to next step.
ΔP= Pload -
4. Calculate the change in λ and update the value of λ by using the equations given below,
Δλ =
λ new= λ + Δλ
5. Go to step 2
26
PROBLEM:
1. The given cost function of the 3 Generating units are given below,
C1 = 561+7.92+0.001562P12 Rs/Hr
C2 = 310+7.85P2+0.00194P22 Rs/Hr
C3 = 78+7.97P3+0.00482P32 Rs/Hr
Where P1, P2, P3 are in MW. The total system load is PD = 975MW. The MW limits of the
generating units are given below,
150 P1 600
100 P2 400
50 P3 200
The fuel cost of all the unit is 1 Rs/MBtu.The generating units contributes to satisfy a load
demand of 850 MW. The loss expression is given as
Ploss=0.00003P12 +0.0000982P22+0.00012P32 in MW.
Write the program in C/ MAT Lab to calculate the optimum dispatch scheduling for the
above problem
27
PROGRAM
clear all
clc
n=3;
demand=925;
a=[.0056 .0045 .0079];
b=[4.5 5.2 5.8];
c=[640 580 820];
pmin=[200 250 125];
pmax=[350 450 225];
x=0;y=0;
for i=1:n
x=x+(b(i)/(2*a(i)));
y=y+(1/(2*a(i)));
lamda=(demand+x)/y
ptotal=0;
for i=1:n
pg(i)=(lamda-b(i))/(2*a(i));
pgtotal=sum(pg);
end
pg
for i=1:n
if(pmin(i)<=pg(i)&&pg(i)<=pgmax(i));
pg(i);
else
if(pg(i)<=pmin(i))
pg(i)=pmin(i);
28
else
pg(i)=pmax(i);
end
end
pgtotal=sum(pg);
end
pg
if pgtotal~=demand
demandnew=demand-pg(i)
x1=x1+(b(i)/(2*a(i)));
y1=y1+(1/(2*a(i)));
end
lambdanew=(demandnew+x1)/y1
for i=2:n
pg(i)=(lambdanew-b(i)))/(2*a(i)));
end
end
end
pg
29
OUTPUT
FLAPC =
30
9.7922 9.4010 9.3240
FLAPC =
psmin =
300 150 50
psmax =
8.1944e+003
100
lambda=
9.1483
31
32
RESULT:
The optimal economical scheduling of the generators without losses are obtained for
the given system.
Exp. No:4
Date:
ECONOMIC DISPATCH WITH LOSSES USING LAMBDA-ITERATION METHOD
AIM:
To compute the optimal economical scheduling of the generators with considering the
network losses for the given system.
Theory:
TRANSMSSION N/W
WITH LOSSES
PLOSS
N
Objective Function Min FT F Pi
i 1 i
Subjected to the following constraints
Equality Constraint,
N
PLOAD PLOSS Pi
i 1
N – Number of generating units
PLOAD -Total load of the system
33
PLOSS -Total Network losses of the system.
In Equality Constraint,
Pi, min Pi Pi, max
Pi, min_--- Minimum Power generation from plant i.
Pi, max -- Maximum Power generation from plant i.
The Lagrangian function was formulated by adding the constraints to the objective
function by using lagrangian multiplier and is given below,
N
Let PLOAD PLOSS Pi
i 1
PLOSS is the total system loss
Making use of the Lagrangian multiplier, the auxiliary function is
L FT
N
L FT PLOAD PLOSS Pi
i 1
Differentiating L wrt Pi and equating to zero
L Fi P P N P
( LOAD LOSS i ) 0
Pi Pi Pi Pi i 1 Pi
Fi P
0 LOSS 1 0
Pi Pi
Fi P
LOSS Coordination Equation
Pi P
i
PLOSS
= Incremental Transmission loss at plant i
Pi
= Incremental production cost (Rs/MWHr).
ALGORITHM FOR ECONOMIC DISPATCH METHOD:
λ=
2. Find the value of power output of all the generators by using the formula given below
Pi =
3. Check the value of power residue .If it is zero then stop the iteration and print the optimal
schedule otherwise go to next step.
ΔP= Pload - +
4. Calculate the change in λ and update the value of λ by using the equations given below,
34
Δλ =
λ new= λ + Δλ
1. Go to step
PROGRAM:
%lambda iteration
Clear all;
Clc;
for i=1:n
s1(i)=b(i)/(2*a(i));
s2(i)=1/(2*a(i));
end
nr=sum(s1);
dr=sum(s2);
lambda=(pd+nr)/dr;
lambda
for j=1:4
disp=(‘iteration’)
for i=1:n
p(i)=(lambda-b(i))/(2*a(i)+lambda*B(i,i));
end
g=sum(p);
p1=((p(1)^2)*B(1,1))+((p(2)^2)*B(2,2))+(2*B(1,2)*p(1)*p(2));
delp=pd+p1-g;
if delp<1
35
p;
else
for i=1:n
c1(i)=a(i)+B(i,i)*b(i);
c2(i)=2*(a(i)+(lambda*B(i,i)))^2;
c(i)=c1(i)/c2(i);
end
z=sum(c);
dellambda=delp/z;
end
h=g-p1
ifh<pd
lambda=lambda+dellambda
else
lambda=lambda-dellambda
end
end
36
RESULT:
The optimal economical scheduling of the generators with & without losses are
obtained for the given system.
37
Exp.No: 5
Date:
ANALYSIS OF SWITCHING SURGE USING MATLAB: ENERGISATION OF A
LONG DIDTRIBUTED-PARAMETER LINE
AIM:
Software Required:
MATLAB software
Theory:
Intentional and inadvertent switching operations in EHV system initiate over voltages,
which might obtain dangerous value resulting in distinction of apparatus. Accurate
Computation of these over voltages is essential for proper sizing co ordination of insulation
of various equipments and specification of protection devices. Meaningful design of EHV
system is dependent on modeling philosophy built in to a computer program.
38
Simulation:
39
OUTPUT:
40
41
RESULT:
The study of transient due to energization of a long distributed parameter line has
been performed.
42
Exp.No: 6
Date:
SIMULATION AND IMPLEMENTATION OF VOLTAGE SOURCE INVERTER
Aim:
Software Required:
MATLAB software
Theory:
Three-phase Current Source Inverter (CSI) has distinct advantage over Voltage Source
Inverter (VSI) drives primarily due to following reasons:
1. The drive is current sensitive. Torque is directly related to stator current and rather
nonlinearly with stator voltage.
2. The drive is regenerative. Hence the control of current ensures the direct and precise
control of the electromagnetic torque. Pulse width modulation (PWM) current source inverter
(CSI) fed ac motor drives are often used in high power (1,000–10 000 hp) applications. The
CSI drive has the features of simple structure:
1. Reliable short circuit protection
2. Four quadrant operation capability and nearly sinusoidal outputs.
3. Low output dv/dt resulting from filtering effect of output capacitors.
4. In addition, the switching device [symmetrical GTO or gate commutated thyristor
(GCT)] used in the CSI can be easily connected in series, which makes the CSI drive
particularly suitable for implementation at medium voltage (2300 V–7200 V) levels.
These advantages outweigh the other disadvantages of the CSI topology.
The Current Source PWM Rectifier can be used as the front end as a DC link source. The
rectifier can be operated at unity power factor. As compared with VSI there is intense need
for developing modulation and control strategies for CSI. The performance of CSI in very
high power applications still holds good essentially due to the ruggedness and ability to meet
load demands easily.
The six-step or square wave inverters switching leads to large amount of harmonics in
load voltage and current, the widespread application of this inverter has been curbed.
43
In complying with Kirchhoff’s voltage (KVL) and current (KCL) law, the VSI is
restricted in the sense that both the devices in a leg cannot be on at the same, else it would
result in shorting of the DC link capacitor. But it does allow the shorting of the adjacent legs.
Similarly for CSI it is mandatory that only one device in the top and only one in the bottom is
on at a time, else the output capacitors will be shorted but it does allow the shorting of the
same leg. Table gives the switching states available in a voltage source converter.
Switching states of VSI:
From the VSI states the occurrence of the null states causes a train of shorting pulses hence
the main issue arising here is the distribution of these shorting pulses in the given cycle. In
order to have minimum harmonics on the output waveform, the distribution has to be
symmetric. It is known that in a three- phase system each phase voltage is maximum
/minimum for 120° in every cycle. If the line-line voltages are considered, then the
maximum/minimum is 120° but distributed 60° in a cycle. This 60° distribution is essential
for generation of symmetric output current waveforms. For example, Vap has its maximum
occurring in sector I for 60° and VI for 60°, thus the effective period for which the amplitude
of Vap is maximum is 120° but it is distributed by 60° in a cycle. It is also known that this
sequence can be achieved using the absolute maximum of the line-line voltages of the
reference signals.
44
Generation of distribution logic for the NULL states:
45
Simulation of single phase inverter:
46
Output:
47
Simulation of three phase inverter:
48
OUTPUT:
49
RESULT:
The experiment of implemented and simulated results is obtained for voltage source
inverter.
50
EXP.NO:7
DATE:
TRANSIENT STABILITY ANALYSIS OF SINGLE MACHINE
INFINITE BUS SYSTEM USING CLASSICAL MACHINE MODEL
AIM:
To become familiar with various aspects of the transient stability analysis of Single-
Machine Infinite Bus (SMIB) system using classical machine model.
SOFTWARE REQUIRED:
MATLAB software
THEOREM:
Stability problem is concerned with the behavior of power system when it is subjected
to disturbances and is classified into small signal stability problem if the disturbances are
small and transient stability problem when the disturbances are large. The description of the
problems are as follows.
When a power system is under steady state, the load plus transmission loss equals to
the generation in the system. The generating units run at synchronous speed and system
frequency, voltage, current and power flows are steady. When a large disturbance such as
three phase fault, loss of load, loss of generation etc., occurs the power balance is upset and
the generating units rotors experience either acceleration or deceleration. The system may
come back to a steady state condition maintaining synchronism or it may break into
subsystems or one or more machines may pull out of synchronism. In the former case the
system is said to be stable and in the later case it is said to be unstable.
51
The equivalent circuit with the generator represented by classical model and all resistances
neglected is shown in figure below.
Equivalent circuit
E’ = Et + jX’ dIt
X = X’ d +XE where XE = Xtr + X1 || X2
Where
52
Swing Equation:
During any disturbance in the system, the rotor will accelerate or decelerate with
respect to synchronously rotating axis and the relative motion begins. The equation
describing the relative motion is called as swing equation.
The following assumptions are made in the derivation of swing equation
1. Machine represented by classical model.
2. Controllers are not considered.
3. Loads are constants.
4. Voltage and currents are sinusoids.
The fundamental equation of motion of the rotor of the synchronous machine is given
by
Changing rotor speed in to per unit and introducing damping torque, equation (6.7) become
Where
= rotor speed deviation in p.u
Pm = mechanical input in p.u
KD = damping co-efficient in p.u
53
Modified Euler Method:
Runge - Kutta method of fourth order is one of the best numerical method's used for the
purpose of solving the swing equation. The damping of the rotors must also be taken into
account to get the results in an accurate form.
According to this algorithm, the total transient period is typically of the order of one second
is divided into a large number of small intervals, each of t second duration. During each t
duration, the value of parameters K1, K2, K3, K4, and l1, l2, l3, l4, are calculated. Thus, these
parameters are used to determine the changes in I , i.
f 0
Ii ( Pmi1 Pei1 (0) Di i )t
1
1
where,
H i
HI' = per - unit inertia constant of the ith machine referred t the system base.
i' (i (0) 2f 0 ) / 2f 0 = per - unit disturbance velocity of the ith machine
I 2i
f 0
Hi
P mi
' ' '
Pei (0) D I ( I I I / 2 2f 0 t
Where,
54
Pei' ( 0 ) = electrical power of the ith generator calculated using i at the end of previous t.
I 2i
f 0
Hi
P
mi
' '' '
Pei (0) D I ( I I I / 2 2f 0 t
Where,
I 4i
f 0
H '
i
P mi
'
Pei (0) DI ( I I 3I / 2 2f 0 t
'' '
Where,
55
ALGORITHM:
1. Read inertia constant, machine transient reactance, tie - line reactance, voltages at
generator buses, bus powers, system frequency, type of fault.
2. Conduct load flow analysis.
3. Calculate the machine currents.
4. Calculate the voltage behind transient reactance E' is given by
E' = Vt + j It Xd
5. Assume mechanical powers are constant since governor action is not taken into
consideration.
6. The angle for E' is taken as initial value of and initial value of = 2fo .
7. Compute reduced YBUS for faulted and post faulted systems.
8. Calculate first estimates of phase angle K1 and speed l1
d
k1 | 0t i (0) 2f 0 t ----------- (1)
dt
d
I1 | 0t f 0 / H ( Pm Pe (0)) t ----------- (2)
'
dt
I 2 f 0 / H Pm Pe1 (0) t ----------- (4)
I 3 f 0 / H Pm Pe" (0) t ----------- (6)
I 4 f 0 / H Pm Pe" (0) t ----------- (8)
12. Find the phase angle and speed at the end of the first interval
13. Repeat from step (8) and calculate the phase angle and speed during the subsequent time
interval till t = 0.3seconds. All these calculations should be done using reduced YBUS matrix
corresponding to faulted system.
56
14. Repeat the steps (8) to (12) for t =0.3seconds upto t = 1.0seconds by using reduced YBUS
matrix corresponding to faulted system.
15. Plot the swing curves and state the system is stable or not.
57
Flowchart for transient stability analysis
START
t=0.01
NO
t=t+ IS t|< tC
YES
STOP 58
PROGRAM
59
OUTPUT
Enter the time interval: [0 0.5 0.1 0.15 0.2 0.25 0.3]
k1 = 0.2286
k2 = 0.7143
dlmr = 2.2127
dcr = 0.9009
tcr = 0.1221
m= 4.4444e-004
dlor =
del =
60
SWING CURVE
SWING CURVE
80
75
70
65
Angle in degres
60
55
50
45
40
35
30
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
Time in Seconds
61
RESULT:
The Transient stability analysis has been carried out and simulated on a given power system
network.
62
Exp. No: 8
Date:
UNIT COMMITMENT: PRIORITY-LIST SCHEMES
AIM:
To obtain the optimal Unit commitment schedule by priority listing method for the
given problem using MATLAB/C program
ALGORITHM:
Priority-List Method:
4. If the time is less than the minimum shut-down time for the unit, keep it committed.
5. Perform a cost comparison for the sum of the hourly production costs for the next
number of hours with the next unit to be dropped being committed and the sum of the
restart costs for the next unit based on the minimum cost of cooling the unit or
banking the unit ‘
THEORY:
Unit Commitment, further abbreviated as UC, refers to the strategic choice to be made
in order to determine which of the available power plants should be considered to supply
electricity. UC is not the same as dispatching. Dispatching consists of fitting a given set of
power plants into a certain electric demand. UC appoints the set of plants from which
dispatching can choose. The difference between both issues is time. In dispatching decisions,
there is no time to rapidly activate a power plant because the inertia of most plants will not
allow this. UC therefore prepares a set of plants and stipulates in which time period they have
to be on-line and ready for dispatching.
63
UC chooses plants taking into account a wide variety of parameters, technological
aspects (such as minimal operation point, minimum up and down time and transient behavior)
as well as economical considerations (such as start-up costs and operational costs) and social
elements (such as availability of staff and work-schemes). UC optimization enables utilities
to minimize electricity generation costs.
Brute Force Method: The most evident method is what we call brute force in which
all possible combinations of power plants to provide a given demand are calculated. The
possibilities conflicting with the boundary conditions are struck off the list. Finally, the most
economic of all remaining possibilities is withheld. This method is not only scientifically
clumsy but will also amount in the largest possible calculation time.
DP Method:
Dynamic programming (DP) is a name used for methods in which a-priori impossible
or improbable possibilities are left out. This Method starts from a previously determined
optimal UC planning and gradually adds power plants to obtain optimal solutions for higher
demand.
Decomposition Method:
In this method the main problem is decomposed into several sub-problems that are
easier to solve. In order to take into account uncertainties combine the DP with fuzzy logic.
The neural networks can be used to enable the model to learn from previously made
decisions. · It is possible to decompose UC into a master problem and sub-problems that can
be solved separately. The master problem is optimized (minimal cost), linking the sub-
problems by Lagrange multipliers.
Priority Listing Method:
A very simple method is based on Priority Listing in which power plants are logically
ranked. Originally, the plants were ranked according to full load cost. All plants are initially
activated. Then they are shut down one at a time to check whether or not the overall costs are
reduced.
Next to these conservative methods, also some unconventional methods like genetic
algorithms can be used. This is a stochastic adaptive search based on "survival of the fittest".
64
Exercise:
Obtain the optimal Unit Commitment for the given generators using Priority list technique
Unit1:Pmin=150MW ;Pmax=600MW
Unit2:Pmin=100MW ;Pmax=400MW
Unit1:Pmin=150MW ;Pmax=600MW
With
65
PROGRAM
clc;
clear all;
n=input('Enter the number of generating units');
for i=1:n
disp('Enter the details for unit');
disp(i);
a1(i)=input('Enter the coefficient of Pg^2');
b1(i)=input('Enter the coefficient of Pg');
c1(i)=input('Enter the coefficient ');
pmin(i)=input('Enter the Pmin value');
pmax(i)=input('Enter the Pmax value');
k(i)=input('Enter the fuel cost');
a(i)=(k(i)*a1(i));
b(i)=(k(i)*b1(i));
c(i)=(k(i)*c1(i));
end
for i=1:n
FLAPC(i)=(k(i)*(c1(i)+(b1(i)*pmax(i))+(a1(i)*pmax(i)^2)))/pmax(i);
end
FLAPC
for i=1:n
for j=i+1:n
if FLAPC(j)<FLAPC(i)
temp1=FLAPC(i);
FLAPC(i)=FLAPC(j);
FLAPC(j)=temp1;
temp2=pmin(i);
pmin(i)=pmin(j);
pmin(j)=temp2;
temp3=pmax(i);
pmax(i)=pmax(j);
pmax(j)=temp3;
temp4=a(i);
a(i)=a(j);
a(j)=temp4;
temp5=b(i);
b(i)=b(j);
b(j)=temp5;
temp7=c(i);
c(i)=c(j);
c(j)=temp7;
end
end
end
FLAPC
u=n;
for i=1:n
66
m1=0;
m2=0;
for k=1:u
m1=m1+pmin(k);
m2=m2+pmax(k);
end
u=u-1;
psmin(i)=m1;
psmax(i)=m2;
end
psmin
psmax
lam=input('Enter the initial value of lambda');
pd=input('Enter the Pd value');
u=n;
for i=1:n
if psmax(i)>pd
delp=-1;
iteration=0;
while delp~=0
pp=0;
x=0;
for i=1:u
p(i)=(lam-b(i))/(2*a(i));
if p(i)<pmin(i)
p(i)=pmin(i);
end
if p(i)>pmax(i)
p(i)=pmax(i);
else
p(i)=p(i);
end
x=x+(1/(2*a(i)));
pp=pp+p(i);
end
for i=1:u
for j=i+1:u
if FLAPC(j)<FLAPC(i)
temp6=p(i);
p(i)=p(j);
p(j)=temp6;
end
end
end
for k=1:u
f(k)=(c(k)+(b(k)*p(k))+(a(k)*p(k)^2));
end
tot=0;
for k=1:u
67
tot=tot+f(k);
end
delp=pd-pp;
dellam=delp/x;
lam=lam+dellam;
if iteration==100
break;
end
iteration=iteration+1;
end
u=u-1;
end
disp('For the combination ');
disp(i);
disp('Total Fuel Cost=');
disp(tot);
disp('At the end of Iteration=');
disp(iteration);
disp('Power of the units');
disp(p);
disp('lambda=');
disp(lam);
p=zeros(1,n);
lam=0;
tot=0;
end
68
OUTPUT
u= 3
iteration= 3
lamda= 11.0213
70
RESULT:
Thus the optimal unit commitment Schedule is obtained using priority listing method
71
EXP NO:10
DATE:
CONTINGENCY ANALYSIS: GENERATOR SHIFT FACTORS AND LINE
OUTAGE DISTRIBUTION FACTORS
AIM:
To write a program in MATLAB to perform contingency analysis of the given 3- bus
system and to calculate the distribution factors for various line outages.
ALGORITHM:
STEP1: Start the program.
STEP2: Get the various values of line reactance, generated power, power demand,
base MVA values.
STEP3: Calculate the B coefficient matrix.
STEP4: Determine the line flows for the three bus system.
STEP5: Calculate the generation shift factors using
Ali =
Ll,k =
STEP7: Calculate the new line flows after the various generation outages as
Pnm = Pnm(old)+ ali * p
STEP8: Conduct the DC load flow to check the generation values match the
calculated line flows.
72
Theory:
The contingency analysis allow system to be operated defensively. Many of the
problems that occur on a power system can cause serious trouble which is often the case with
cascading failures. In this analysis, certain programs are used that model possible system
troubles before they arise. These programs are based on a model of a power system and are
used to study outage events and alarm the operators about any potential over loads or out of
limit voltages.
A simple and fast method of contingency analysis is based on network and linear
sensitivity analysis namely,
Generator shift factors
Line outage distribution factor
Generator shift factor:
The generator shift factors are designated as ali and have the following definition:
ali = fl / pi
where,
l=line index
i=bus index
fl=change in MW power flow on line l,when a change in generation pi occurs at
bus i.
pi=change in generation at bus i.
73
Problem:
Calculate the generation shift factors, line outages, generator outages for the given circuit
diagram. Take base MVA as 100.
74
PROGRAM
clear all;
clc;
r1=input('enter the reactance between bus 1 and 2');
r2=input('enter the reactance between bus 2 and 3');
r3=input('enter the reactance between bus 1 and 3');
limp=[(r1+r3) r1 r3;r1 (r1+r2) r2;r3 r2 (r3+r2)];
pg=input('enter the generated power');
pd=input('enter the power demand');
b=input('enter the base');
bo=[(1/r1)+(1/r3) -(1/r1);-(1/r1) (1/r1)+(1/r2)];
bo;
xo=inv(bo)
p=[(pg/b) -(pd/b)];
po=transpose(p);
del=(xo*po)
%line flows
del(3)=0;
p=[0 0 0;0 0 0;0 0 0];
for i=1:3
for j=1:3
if(i~=j)
p(i,j)=(del(i)-del(j))/limp(i,j);
end
end
end
p
%generation shift factors
a=[0 0 0;0 0 0;0 0 0];
xo(3)=0;
for i=1:3
for j=1:3
if(i~=j)
a(i,j)=(xo(i)-xo(j))/limp(i,j);
end
end
end
a
xo=inv(bo)
r1
r2
75
r3
L12=(xo(1,1)-xo(2,1))*r3/((r3-xo(1,1))*r1)
L23=(xo(2,1)*r3)/((r3-xo(1,1))*r2)
%outage of line 1-2
L13=(xo(1,1)-xo(1,2))*r1/((r1-((xo(1,1)-xo(1,2))-(xo(2,1)-xo(2,2))))*r3)
L23=-(xo(2,1)-xo(2,2))*r1/((r1-((xo(1,1)-xo(1,2))-(xo(2,1)-xo(2,2))))*r3)
%Outage of line 2-3
L12=(-(xo(1,2)-xo(2,2))*r2)/((r2-xo(2,2))*r1)
L13=(xo(1,2)*r2)/((r2-xo(2,2))*r3)
%The new line flows after outage of generator 1'
delp=-.4;
P12=p(1,2)+a(1,2)*delp
P13=p(1,3)+a(1,3)*delp
P23=p(2,3)+a(2,3)*delp
%'dc load flow'
po=[0;-1.3]
xo
del=xo*po
limp
p12=(del(1,1)-del(2,1))/limp(1,2)
P13=del(1,1)/limp(1,3)
P23=del(2,1)/limp(2,3)
76
OUTPUT
xo =
0.4444 0.1778
0.1778 0.3111
del =
-0.0533
-0.3333
p=
0 0.4667 -0.0667
-0.4667 0 -0.8333
0.0667 0.8333 0
a=
0 0.4444 0.5556
-0.4444 0 0.4444
-0.5556 -0.4444 0
xo =
0.4444 0.1778
0.1778 0.3111
r1 = 0.6000
r2 = 0.4000
r3 = 0.8000
77
L12 = 1.0000
L23 = 1.0000
L13 = 1.0000
L23 = 0.5000
L12 = 1.0000
L13 = 1.0000
P12 = 0.2889
P13 = -0.2889
P23 = -1.0111
po =
-1.3000
xo =
0.4444 0.1778
0.1778 0.3111
del =
-0.2311
-0.4044
limp =
p12 = 0.2889
P13 = -0.2889
P23 = -1.0111
78
RESULT:
Thus the program to perform contingency analysis of the given 3- bus system and to
calculate the distribution factors for various line outages was completed.
79