PSA-II Manual 2016scheme
PSA-II Manual 2016scheme
1
Instructions to students:
1. All the programs are developed in MATLAB/Simulink and MiPOWER and ETAP
software package.
2. The students are instructed to go through the algorithm, understand the logic and the
corresponding Matlab code, before coming to the lab class and answer the oral questions
asked by the teacher in charge.
3. The students are instructed to write the programs in the data sheet along with input given
in the manual before coming to the lab class.
4. The students are instructed to write algorithm/flowcharts on the L.H.S of the record book
along with input and corresponding output. Program and the relevant theory can be
written on R.H.S.
5. If a student is absent to a class he/she has to come prepared for the regular program
instead of the missed program. A maximum of two of the missed programs can be
completed in the repetition class.
****************
2
CONTENTS
Expt. Week Description Page
No. No.
Formation of Y-BUS (Matlab)
a) Formation of Y-BUS with off-nominal turns ratio by 5
1 1 direct method
b) Formation of Y-BUS using singular transformation
(i) with half line charging admittance 6
(ii) with mutual coupling 9
2 Load Flow Analysis
2 a) LFA by Gauss-Siedel method using MATLAB 11
3 b) Determination of Bus currents, Bus power and Line 14
flows using MATLAB
4 3 c) LFA by GS, NR and FDLF methods using MiPower 17
software package
5 4 d) LFA by GS, NR and FDLF methods using ETAP 18
software package
6 5 Short Circuit Studies (software package)
Short circuit studies using MiPower software package 19
7 6 Transient Stability Studies (MATLAB + software
package)
a) Transient Stability Studies using MiPower software 20
package
8 7 b) Swing Curve using Euler’s method in MATLAB 22
9 c) Swing Curve using Runge Kutta method in MATLAB 24
10 8 Economic Operation (MATLAB)
a) Economic operation without transmission losses and 27
with generator limits
b) Economic operation with transmission losses 28
11 9 ALFC Operation (Simulink)
a) Step Response of ALFC for variable R and D 31
b) Transient response of first order approximation of 32
ALFC
12 10 Modeling of PV Module using MATLAB/Simulink
a) Modeling with constant I0 and ISC 35
b) Modeling with constant I0 & variable ISC 36
c) Modeling of actual PV module 36
3
4
Formation of Y bus
EXPERIMENT 1
a) Formation of Y bus with off-nominal turns ratio by direct method
Algorithm:
1. Read the no. of buses(nbus) and no. of lines (nline)
2. Read from bus no, to bus no, line impedance and half line charging admittance(hlc) and off-
nominal turns ratio(a) of each line
3. Convert line impedance to admittance(y) of each line
4. Repeat step i to iii for K=1 to nline
i. P = from bus no. q=to bus no.
ii. Set y = y/a
iii. Diagonal elements: Ypp = Ypp + y + hlc+((1-a)/a)*y
Yqq = Yqq + y + hlc+(a-1)*y
iv. Off diagonal elements: Ypq = Ypq – y
Yqp = Ypq
5. Display Y bus
6. Stop
% pq z hlc(y/2) a
5
Y(p,q)=Y(p,q)-y(k);
Y(q,p)=Y(p,q);
end
Ybus=Y
Exercise:
1. Repeat the exercise for the same data with transformers replaced by transmission lines
2. Modify the program without half line charging admittances.
3. Determine Y-bus for the following data
Line No. Between Line Half line
buses impedance charging
admittance
1 1-4 0.08+ j0.37 0.007
2 1-6 0.123+j0.518 0.010
3 2-3 0.723 + j1.05 0.0
4 2-5 0.282 +j0.64 0.0
5 4-3 0.0 + j0.133 0.0
6 4-6 0.097+ j0.407 0.0076
7 6-5 0.0+ j0.3 0.0
4.Determine Ybus in data given in the program if a shunt capacitor of admittance j0.008 is
connected at bus no 3.
5.Modify Ybus if an identical parallel line is added between 2-3.
Algorithm:
1. Read no. of buses( nbus) and no. of lines( nline).
2. Initialize shunt admittance matrix to zeros.
3. Repeat step no i. to step no iv for I=1 to nline.
i. Read line data i.e., frombusno, tobus no, Zseries, half line charging.
ii. Shunt admittance [from bus]=shunt admittance [from bus]+half line charging.
iii. Shunt admittance [to bus]=shunt admittance [to bus]+half line charging.
iv. Series admittance [I]=1/series impedance [I].
4. Form the incidence matrix A
(i) Initialize all the elements of matrix A of size [(nbus + nline) x nbus] to zeros
AI
(ii) Form A = AA Where AI is identity matrix of size (nbus x nbus)
6
AA is a matrix of size (nline x nbus) and elements of AA = [aij] Where aij = 0 if ith branch is not
incident on jth bus.
aij = 1 if ith branch is incident
th
to and oriented away from jth bus. aij = -1 if ith branch is incident to
and oriented away from j bus.
5. Form Yprimitive matrix
Initialize all elements of matrix Ypr of size (nbus+nline x nbus+nline) to zeros
Program:
formation of ybus using singular transformation method
without mutual coupling:
% p q Z hlc(Adm)
Z= [1 2 0.02+0.06i 0.03i
1 3 0.08+0.24i 0.025i
2 3 0.06+0.18i 0.02i
2 4 0.06+0.18i 0.02i
2 5 0.04+0.12i 0.015i
3 4 0.01+0.03i 0.01i
4 5 0.08+0.24i 0.025i
fb=z(:,1);
tb=z(:,2);
Z=z(:,3);
hlcy=z(:,4);
y=1./Z;
nbus=max(max(fb),max(tb));
Y=zeros(nbus);
nline=length(fb);
nlb=nline+nbus;
A=zeros(nlb,nbus);
for k=1:nbus
A(k,k)=1;
7
end
for k=1:nline
A(nbus+k,fb(k))=1;
A(nbus+k,tb(k))=-1;
end
sh=zeros(nbus);
for k=1:nline
sh(fb(k))=sh(fb(k))+hlcy(k);
sh(tb(k))=sh(tb(k))+hlcy(k);
end
ypr=zeros(nlb,nlb);
for k=1:nbus
ypr(k,k)=sh(k);
end
for k=1:nline
ypr(nbus+k,nbus+k)=y(k);
end
format short;
Ybus=A'*ypr*A
Exercise:
1. Can this method be used with transformers? Justify.
2. Determine Ybus for data of exercise 2 in first program and compare results with that obtained
by direct method.
3. Determine Ybus for the following data
Line R X hlc
1-2 0.05 0.15 0.0025
1-3 0.1 0.3 0.03
2-3 0.15 0.45 0.05
2-4 0.10 0.30 0.0
3-4 0.05 0.15 0.0125
8
c) Formation of Ybus Using Singular Transformation Method with Mutual
Coupling.
Algorithm:
1. Read no. of buses( nbus) and no. of lines (nline).
2. Road line data i.e., Frombus no, tobus no, Zseries, mutual line no, Zmutual at all lines.
3. Form bus incidence matrix A
(i) Initialize all the elements of A of size (nline x nline) to zeros
(ii) Form A = [aij]
Where aij = 0 if ith branch is not incident on jth bus.
aij = 1 if ith branch is incident to and oriented away from jth bus. aij = -1 if ith branch is incident
to and oriented away from jth bus.
Program:
formation of ybus using singular transformation method with mutual coupling &
without line charging:
9
p=z(:,1);
q=z(:,2);
z=z(:,3);
mno=z(:,4);
zmc=z(:,5);
nbus=max(max(p),max(q));
Y=zeros(nbus);
nline=length(p);
A=zeros(nline,nbus);
for k=1:nline,
if(q(k)==0)
A(k,p(k))=1;
elseif(p(k)==0)
A(k,q(k))=-1;
end
if(p(k)~=0 & q(k)~=0)
A(k,p(k))=1;
A(k,q(k))=-1;
end
end
zpr=zeros(nline,nline);
for k=1:nline
zpr(k,k)=Z(k);
if(mno(k))
zpr(k,mno(k))=zmc(k);
zpr(mno(k),k)=zmc(k);
end
end
ypr=inv(zpr);
format short;
Ybus=A'*ypr*A
Exercise:
1. Form the Ybus for the data given.
2. Data =[ slno fb tb z m zm ]
Slno-serial no of line ; fb-from bus; tb –to bus; z – line impedance, m – the sl no of line to
which it is coupled; zm – mutual impedance
10
Load Flow Analysis
(Matlab + software package)
EXPERIMENT 2
a) Load Flow Analysis by Gauss-Siedel method for both PQ and PV buses
using Matlab
Algorithm:
1. Read Ybus, number of buses (nbus)
(Assume bus 1 as slack bus)
No. of PQ buses (Npq), No. of PV buses (Npv)
Voltage at slack bus (Vi)
Real power (P) and reactive power (Q) at all pq buses
Real power (P) and specified voltage (Vsp) and Qlimits (Qmin and Qmax) at PV buses.
Convergence criteria ().
2. Set iteration count k = 1.
3. Calculate voltages at all the pq buses (p = 2 to Npq + 1), using,
1 Pp Q p
p 1 nbus
V pk
Y pp V p*
Y pqVqk 1 Y pqVq
k
q p 1
p where,
QC Im V p* I p
Ip Y pqVq
Find 1
If QCp is within Qmin and Qmax, treat the bus p as pv bus and calculate
1 Pp Q p p 1 nbus
V pk
Y pp
V p*
Y pqVqk 1 Y pqVqk
q p 1
where, Vp = |Vsp| at an angle p corresponding to
previous iteration.
Else if QCp violates Qmin, treat bus p as pq bus and if QCp < Qmin, set Qp = Qmin else set Qp = Qmax
1 Pp Q p
p 1 nbus
V pk
Y pp V p*
Y pqVqk 1 Y pqVq
k
and find q p 1
where, Vp = Vp corresponding to previous
iteration.
5. Display voltages at all buses and QCp at pv buses
p p V V V k V k 1
6. Determine the largest absolute value of max
.
7. If |V|max <= acc go to next step otherwise set k = k + 1 and go to step no. 3.
8. Stop
Program:
ybus=[-9i 5i 4i
5i -9i 4i
4i 4i -8i];
11
bus=busdata(:,1);
type=busdata(:,2);
V=busdata(:,3);
th=busdata(:,4);
GMW=busdata(:,5);
GMVAR=busdata(:,6);
LMW=busdata(:,7);
LMVAR=busdata(:,8);
Qmin=busdata(:,9);
Qmax=busdata(:,10);
nbus=max(bus);
P=GMW-LMW;
Q=GMVAR-LMVAR;
Vprev=V;
toler=1;
k=1;
while(toler>0.001)
for p=2:nbus
sumyv=0;
for q=1:nbus
if p~=q
sumyv=sumyv+ybus(p,q)*V(q);
end
end
if type(p)==2
Q(p)=-imag(conj(V(p))*(sumyv+ybus(p,p)*V(p)));
if(Q(p)>Qmax(p)||Q(p)<Qmin(p))
if Q(p)<Qmin(p)
Q(p)=Qmin(p);
else
Q(p)=Qmax(p);
end
type(p)=3;
end
end
V(p)=(1/ybus(p,p))*((P(p)-j*Q(p))/conj(V(p))-sumyv);
if type(p)==2
realv(p)=abs(Vprev(p))*cos(angle(V(p)));
imagv(p)=abs(Vprev(p))*sin(angle(V(p)));
V(p)=complex(realv(p),imagv(p));
end
% to find the votages at all buses and Q at pv busses
fprintf('\n The votages at all buses and Q at pv busses after iteration no %d' ,k);
if type(p)==3
fprintf('\n V(%d)=%.4f at %.2fdeg', p, abs(V(p)), angle(V(p))*180/pi);
else
fprintf('\n V(%d)=%.4f at %.2fdeg , Q(%d)= %+.3f\n' , p, abs(V(p)) ,
angle(V(p))*180/pi , p, Q(p));
12
end
end
k=k+1;
toler=max(abs(abs(V)-abs(Vprev)));
Vprev=V;
end
Exercise:
1. Repeat the above problem with limits on Q removed
2. Obtain the voltages at all the buses using GS method for the power system with the following
data
Line data
R X
SB EB
(pu) (pu)
1 2 0.10 0.40
1 4 0.15 0.60
1 5 0.05 0.20
2 3 0.05 0.20
2 4 0.10 0.40
3 5 0.05 0.20
Bus data
2 - - 0.60 0.30 - PQ
3 1.0 - - - 1.04 PV
4 - - 0.40 0.10 - PQ
5 - - 0.60 0.20 - PQ
No Q-limits are specified.
3. Obtain the load flow result for standard IEEE 14-bus system
13
EXPERIMENT 3
b) Determination of Bus currents, Bus power and Line flows using MATLAB
Algorithm:
1. Read the following line data at each line from bus no(p), to bus no(q), line impedance(Zpq) and
half line charging admittance(Ychpq) Read voltages at all buses
2. Convert line impedance to admittance of each line Ypq
3. Repeat step i to x for K=1 to no. of lines
i. p = from bus no q = to bus no
ii. Line current, Ipq = (Vp-Vq)Ypq + Vp * Ychpq
iii. Bus current IIp=IIp+Ipq
iv. Line flow, SLpq =Vp * Ipq*
v. Generation at bus p, SGp = SGp + SLpq
vi. Line current, Iqp = (Vq-Vp)Ypq + Vq x Ychqp
vii.Bus current, IIq = IIq + Iqp
viii. Line flow, SLqp = Vq * Iqp*
ix. Loss of line k, Loss k= SLpq + SLqp
x. Total loss = Total loss + Loss k
4. Display current at each bus
Display line flows and line loss at each line
Display generations at each bus
Display the total losses
5. Stop
Program:
% p q z hlc(ADM)
z= [5 4 0.02+0.06i 0.03i
5 1 0.08+0.24i 0.025i
4 1 0.06+0.18i 0.02i
4 2 0.06+0.18i 0.02i
4 3 0.04+0.12i 0.015i
1 2 0.01+0.03i 0.01i
2 3 0.08+0.24i 0.025i];
14
p=fb(k);q=tb(k);
I(p,q)=(v(p)-v(q))*y(k)+v(p)*ysh(k);
II(p)=II(p)+I(p,q);
SL(p,q)=v(p)*conj(I(p,q));
SG(p)=SG(p)+SL(p,q);
I(q,p)=(v(q)-v(p))*y(k)+v(q)*ysh(k);
II(q)=II(q)+I(q,p);
SL(q,p)=v(q)*conj(I(q,p));
SG(q)=SG(q)+SL(q,p);
loss(k)=SL(p,q)+SL(q,p);
totloss=totloss+loss(k);
end
fprintf('bus currents');
fprintf('\nBus no Current');
for k=1:nbus
fprintf('\n %d %10.4f %+10.4fi',k,real(II(k)),imag(II(k)));
end
fprintf('\nLine flows');
fprintf('\nFrom bus To bus Lineflows Line Loss');
for k=1:nline
p=fb(k);
q=tb(k);
fprintf('\n %d %d %10.4f%+10.4fi %10.4f%+10.4fi', p,q, real(SL(p,q)) ,
imag(SL(p,q)) , real(loss(k)) ,imag(loss(k)));
fprintf('\n %d %d %10.4f%+10.4fi %10.4f%+10.4fi',
q,p ,real(SL(q,p)) ,imag(SL(q,p)) ,real(loss(k)),imag(loss(k)));
end
fprintf('\nBus Generations');
fprintf('\nBus no Generation');
for k=1:nbus
fprintf('\n%d %10.4f%+10.4fi',k,real(SG(k)),imag(SG(k)));
end
fprintf('\n\nTotal Losses=%10.4f%+10.4fi',real(totloss),imag(totloss));
Excercise
1. Obtain the line flows for the following data: The system has three lines connected between 1-
2, 1-3 and 2-3. Each line has a series impedance of 0.02+j0.08 pu, total shunt admittance of j0.02
pu. The specified quantities of the buses are tabulated in the next page on 100MVA base.
15
Bus Real Load Reactive Real Power Reactive Voltage
demand Load Gen Power Gen Specification
PD demand PG QG
QD
1 2pu 1 pu Unspecified Unspecified 1.04 ∟00
Slack
2 0 0 0.5 1 PQ bus
3 1.5pu 0.6 pu 0 QG3 1.04 (PV)
16
EXPERIMENT 4
c) Load flow analysis using Gauss-Siedel, Newton-Raphson & Fast Decoupled
methods for both PQ and PV buses, using MiPOWER software package
Line data
Line Bus Code Line parameters
No. P Q
R pu X pu B/2 pu
1 5 4 0.02 0.06 0.03
2 5 1 0.08 0.24 0.025
3 4 1 0.06 0.18 0.02
4 4 2 0.06 0.18 0.02
5 4 3 0.04 0.12 0.015
6 1 2 0.01 0.03 0.01
7 2 3 0.08 0.24 0.025
Bus data
1 - - 0 0 0.45 0.15 PQ
2 - - 0 0 0.4 0.05 PQ
3 - - 0 0 0.6 0.1 PQ
4 1.0476 - 0.4 0.2 0.1 PV
5 1.06 00 - - - - slack
17
EXPERIMENT 5
d) Load flow analysis using Gauss-Siedel, Newton-Raphson & Fast Decoupled
methods for both PQ and PV buses, using ETAP software package.
Following data are to be used:
Line data
Line Bus Code Line parameters
No. P Q
R pu X pu B/2 pu
1 5 4 0.02 0.06 0.03
2 5 1 0.08 0.24 0.025
3 4 1 0.06 0.18 0.02
4 4 2 0.06 0.18 0.02
5 4 3 0.04 0.12 0.015
6 1 2 0.01 0.03 0.01
7 2 3 0.08 0.24 0.025
Bus data
1 - - 0 0 0.45 0.15 PQ
2 - - 0 0 0.4 0.05 PQ
3 - - 0 0 0.6 0.1 PQ
4 1.0476 - 0.4 0.2 0.1 PV
5 1.06 00 - - - - slack
18
Short circuit studies
(software package)
EXPERIMENT 6
Short circuit studies using MiPOWER software package (To refer to
MiPOWER software package manual).
If a 3 - phase to ground fault occurs at bus 5 - find the fault MVA. The Transmission line
data is given below.
Generator details
MVA Rating of G1 & G2 = 100 MVA, 11 kV with X'd = 10 %
Transformer details
KV Rating of T1 & T2 = 11/110 kV, 100 MVA, leakage reactance x = 5 %
** All impedances are on 100 MVA base
19
Transient Stability Studies
(Matlab + software package)
EXPERIMENT 7
a) Transient Stability Studies using MiPower software package
Figure shows a single line diagram of a 5-bus system with three generating units, four lines and
two transformers and two loads. Per-unit transmission line series impedances and shunt
susceptances are given on 100 MVA base, generator's transient impedance and transformer
leakage reactances are given in the accompanying table.
If a 3 - phase fault occurs on line 4 - 5 near bus 4 and the fault is cleared by simultaneously
opening the circuit breaker at the ends of the line 4-5 at 0.225 seconds (fault clearing time), plot
the swing curve and comment on stability of machine 1 and machine 2
Transformer Details:
T1 = 20/230 kV 400 MVA with Leakage reactance = 0.022 pu
T2 = 18/230 kV 250 MVA with Leakage reactance = 0.040 pu
20
Generator Details:
G1 = 400 MVA, 20 kV, X’d = 0.067 pu, H = 11.2 MJ / MVA
G2 = 250 MVA, 18 kV, X'd = 0.10 pu, H = 8.0 MJ / MVA
G3 = 1000 MVA, 230 kV, X'd = 0.00001 pu, H = 1000 MJ / MVA (Infinite Bus Modelling)
21
EXPERIMENT 8
b) Swing curve using Euler’s Method
Algorithm
1.Read maximum power before fault, during fault and post fault
2.Read the power transferred and the clearing time
3.Read H and frequency
4.Calculate initial value of δ. Initial ω is zero.
5.Calculate derivatives and intermediate values using following equations
D1 = o
P Pmax sin 0
D2 m
M
P
0 D1t
P 0 D2 t
D1P P
Pm Pmax sin P
D2 P
M
6.Update δ and ω
D D1P
1 0 1 t
2
D D2 P
1 0 2 t
2
7.Continue for the required time of simulation
Program
clear
pmax1=input('enter the maximum power before fault\n');
pmax2=input('enter the maximum power during fault\n');
pmax3=input('enter the maximum power after fault\n');
power=input('enter the value of power transferred\n')
tcl=input('enter clearing time\n')
H=input('enter value of interial constant H\n') freq=input('enter frequency\n')
delta0=asin(power/pmax1); % Initial angle depends on pre-fault maximum power
omega0=0.0;
M=H/(pi*freq);
delta_t=0.01; % Time step. Change the value to test for different time steps
pmax=pmax2; % At t=0, fault occurs and hence we start with the maximum power during
fault y1=[];
z1=[];
for t=0.0:delta_t:0.5
if(t>tcl)
pmax=pmax3; % If time is greater than fault clearing time, use post-fault maximum power
end
D1=omega0;
22
D2=(power-pmax*sin(delta0))/M;
delp=delta0+D1*delta_t; % Intermediate values of delta and omega
omegp=omega0+D2*delta_t;
D1p=omegp;
D2p=(power-pmax*sin(delp))/M; delta0=delta0+(D1+D1p)/2*delta_t; omega0=omega0+
(D2+D2p)/2*delta_t;
delta=delta0*180/pi; % Convert to delta to degrees
omega=omega0;
y=[t D1 D2 D1p D2p ]; % to display values of time and derivatives
z=[t pmax delta omega];
y1=[y1;y];
z1=[z1;z];
plot(t,delta,'r')
hold on
end
disp(y1)
disp(z1)
Data
Pmax1=1.714 pu
Pmax2=0.63 pu
Pmax3=1.333 pu
Power transferred =0.8 pu
Fault clearing time =0.125 secs
Frequency=50 Hz
Exercise
1.Simulate for sustained fault and determine critical clearing time graphically
23
EXPERIMENT 9
c) Solution of Swing curve using Runge-Kutta method
k1 0 t
P P sin 0
l1 m max t
M
l
k2 0 1 t
2
k1
Pm Pmax sin 0
2
l2 t
M
l
k3 0 2 t
2
k2
Pm Pmax sin 0
2 t
l3
M
k4 0 l3 t
24
Pm Pmax sin 0 k3
l4 t
M
1
1 0 k1 2k2 2k3 k4
6
1
1 0 l1 2l2 2l3 l4
6
Program
clear
pmax1=input('enter the maximum power before fault\n');
pmax2=input('enter the maximum power during fault\n');
pmax3=input('enter the maximum power after fault\n');
power=input('enter the value of power transferred\n')
tcl=input('enter clearing time\n')
H=input('enter value of interial constant H\n') freq=input('enterfrequency\n') delta0=asin(power/
pmax1);
omega0=0.0; M=H/(pi*freq); delta_t=0.05;
pmax=pmax2;
y1=[];
z1=[];
for t=0.0:delta_t:0.5 if(t>tcl)
pmax=pmax3;
end
k1=omega0*delta_t; % Calculate the coefficients
l1=(power-pmax*sin(delta0))/M*delta_t;
k2=(omega0+l1/2)*delta_t;
l2=(power-pmax*sin(delta0+k1/2))/M*delta_t;
k3=(omega0+l2/2)*delta_t;
l3=(power-pmax*sin(delta0+k2/2))/M*delta_t;
k4=(omega0+l3)*delta_t;
l4=(power-pmax*sin(delta0+k3))/M*delta_t;
delta0=delta0+(k1+2*k2+2*k3+k4)/6;
omega0=omega0+(l1+2*l2+2*l3+l4)/6;
delta=delta0*180/pi;
omega=omega0;
y=[t k1 l1 k2 l2 k3 l3 k4 l4 ];
z=[t pmax delta omega]; y1=[y1;y];
z1=[z1;z];
plot(t,delta,'*-r')
hold on
end
disp(y1)
disp(z1)
Data
Pmax1=1.714 pu
25
Pmax2=0.63 pu
Pmax3=1.333 pu
Power transferred =0.8 pu
Fault clearing time =0.125 secs
Frequency=50 Hz
Exercise
1. Execute the program for step size of 0.001 s.
2. Simulate a sustained fault
3. Determine critical clearing time from direct simulation
26
Economic Load Dispatch (Matlab)
EXPERIMENT 10
a)Economic load dispatch without losses and generator limits included
This program is for economic dispatch without losses with generator limits included. The input
is given through a file eco_wol_genlit_in. The cost function is given by F i=ai+biPGi+ciPGi2 . Cost
coeffecients are read in a matrix in the order ci, bi, ai for each generator in a line.
Algorithm
1. Read cost coefficients, Power demand, Initial lambda and generator limits from file.
2. Start iteration count = 1
a Calculate generator powers using
bi
PGi
2ci
3. Check for violations of any generator limits. If any limit is violated peg generation at the limit.
4. Calculate ∆P = PD – (sum of PGi )
5. If ∆P is less than tolerance stop. Else
6. Calculate change in λ in any iteration using
P
r
n
r
g
1
i 1
2 ci
7. Update λ r+1 = λ(r) + ∆λ(r)
8. Increment iteration count and go to step 3.
Program
clear;
diary('wer.txt')
y1=[];
[cost_coeff,PD,Ini_lam,gen_lim]=eco_wol_genlit_in; %Read input from file
Delp=100;
n=length(cost_coeff(:,1)); %Get number of generators
lam=Ini_lam; %Initial value of Lambda
while(abs(Delp)>0.001)
iter=iter+1; %Update iteration count
for i=1:n
P(i)=(lam-cost_coeff(i,2))/(2*cost_coeff(i,1)); %Compute PGi
end
for i=1:n
if (P(i)<gen_lim(i,1)) % Check for generator limit violations
P(i)=gen_lim(i,1);
end
if (P(i)>gen_lim(i,2))
27
P(i)=gen_lim(i,2);
end
end
Ptotal=sum(P); %Total generation
Delp=PD-Ptotal; %Demand - Generation
sigma_a=sum(1./(2.*cost_coeff(:,1)));
lam=lam+Delp/sigma_a; %Update Lambda
y=[iter P Ptotal Delp lam];
y1=[y1;y];
end
disp(y1)
diary('wer.txt')
Data file
function[cost_coeff,PD,Ini_lam,gen_lim]=eco_wol_genlit_in();
cost_coeff=[0.004 7.2 350
0.0025 7.3 500
0.003 6.74 600];
PD=450;
Ini_lam=6.0;
gen_lim=[125 300
125 300
125 300];
end
Excercise
1. Repeat the problem with different values of initial λ and compare results.
2. Run the program for PD=300 and PD=650
3. Modify program to display cost of generation.
4. Modify program to compare cost of optimal generation with cost of equal generation.
This program is for economic dispatch with losses. The input is given through a file
eco_wol_input. The cost function is given by Fi=ai+biPgi+ciPgi2 . Cost coefficients are read in a
matrix with ci, bi, ai for each generator in a line . The loss (B) coefficients are also read as part of
data. The off-diagonal elements of B matrix are neglected.
Algorithm
28
3) Solve for PL(r) (Loss) using PL = [PG][B][PG]T
r
dPGi
d
4) Compute for all i, using
r
dPGi ci bi Bii
d
2
2 ci Bii
r
r
6) Compute using
P
r
r
ng r
dPGi
d
i 1
r 1 r r
7)
8) Go to step 2 till ∆P(r) ≤ Є
Program
clear; diary('wer.txt') y1=[];
[cost_coef,PD,b_coef,lam]=eco_wl_in; %Read input from file
ci_coef=cost_coef(:,1);
bi_coef=cost_coef(:,2);
cdiag=diag(ci_coef);
iter=0; %Iteration count = 0
Delp=100;
n=length(cost_coef(:,1)); %Get number of generators
b_coef=b_coef./100 % Convert B coefficients to MW-1
while(abs(Delp)>0.001)
iter=iter+1; %Update iteration count
P1=lam-bi_coef;
for i=1:n
P2(i)=2*(ci_coef(i)+lam*b_coef(i,i));
P(i)=P1(i)/P2(i);
end
Ploss =P*b_coef*P';
for i=1:n
m1(i)=ci_coef(i)+b_coef(i,i)*bi_coef(i);
m2(i)=2*(ci_coef(i)+lam*b_coef(i,i))*(ci_coef(i)+lam*b_coef(i,i));
m(i)=m1(i)/m2(i);
end
29
Delp=PD+Ploss-sum(P);
Dellam=Delp/sum(m);
lam=lam+Dellam; %Update Lambda
Ptotal=sum(P);
y=[iter P Ptotal Delp lam];
y1=[y1;y];
end
disp(y1)
disp('Demand')
Data file
function[cost_coeff,PD,b_coef,lam]=eco_wl_in();
cost_coeff=[0.008 7.0 200
0.009 6.3 180
0.007 6.8 140];
PD=500;
b_coef=[ 0.0218 0.0 0.0;
0.0 0.0228 0.0;
0.0 0.0 0.0179;]
lam=8;
Exercise :
1. Obtain optimal schedule for the following data:
The fuel cost of two plants is given by
F1=200+10.333PG1+0.00889PG12 Rs/h
F2=240+10.833PG2+0.00741PG22 Rs/h
Determine the economic schedule to meet a demand of 150MW, corresponding cost and loss.
The transmission loss is given by , Ploss=0.001 PG12 +0.002 PG22 .
30
ALFC Operation (Simulink)
EXPERIMENT 11
a) To obtain the step response of an isolated ALFC unit with the following
parameters: TTR = 0.3s, TG = 0.2s, M = 10s (or H = 5), D = 10, R = 0.05
For a unit-step decrease in PL, plot the step response and comment on the effect of change in D
and R, respectively, if other parameters remain unchanged.
Model:
for the given parameters,
Δ w ( s) ( 1+0.2 s )( 1+0.3 s )
= T(s) =
− Δ PL ( s ) ( 10 s+1.0 )( 1+0.2 s )( 1+0.3 s )+20
The steady state frequency deviation for step change in input is,
− Δ PL 1.0
Δ w ( s )= = =4.762 x 10−2 pu=0.23 Hz
D+ ( ) ( )
1
R
1+
1
0.05
31
The step response for D=1 and D=0.5 is as shown below
32
Model:
The block diagram and the first order approximations are shown in figures (a) and (b) below.
(b)
The transfer function is,
33
With the first order model, the response is exponentially decaying, since we have only one time
constant. In both cases, the steady state frequency deviation is -0.476Hz.
34
Modeling of PV module using Simulink
EXPERIMENT 12
Model a PV module to plot the I-V and P-V curves for the following three
cases:
a) with constant I0 and Isc
b) with constant I0 and variable Isc
c) with constant I0 and variable Isc (Actual PV module model)
Main Circuit
35
b) With Constant I0
c) Actual PV Module
36
LAB Question Bank
Question-1
1. Give the algorithm for determination of bus admittance matrix by direct method.
2. Determine Bus Admittance matrix by direct method for a power system with following data
Question-2
1. Give algorithm to determine bus admittance matrix using singular transformation.
2. Obtain Ybus using singular transformation for the following data.
Line R X hlc
1-2 0.05 0.15 0.0025
1-3 0.1 0.3 0.03
2-3 0.15 0.45 0.05
2-4 0.10 0.30 0.0
3-4 0.05 0.15 0.0125
37
Question-3
1. A) Using singular transformation technique, determine Ybus for the given test system using
MATLAB
B) Determine line flows and line losses, using MATLAB, for system with following data.
Question-4
1. For the given system form the Ybus. Draw the one line diagram of the system
From To X Type
2 1 0.25 1
3 2 0.10 2
4 2 0.1 2
3 1 0.25 3
3 4 0.1 4
38
Question-5
1. Draw the flow chart for the GS method of power flow solution.
2. Using the available software package, determine the voltage at all the buses for the data
given below, using GS method.
Line data
Bus data
Bus Bus Voltages Generation Load Type
No of
. bus
Magnitude Phase Real Reactive Real Reactive
Angle
1 - - 0 0 0.45 0.15 PQ
2 - - 0 0 0.4 0.05 PQ
3 - - 0 0 0.6 0.1 PQ
4 1.0476 - 0.4 - 0.2 0.1 PV
5 1.06 00 - - - - slack
Question-6
1. Load flow analysis using Gauss-Siedel method for both PQ and PV buses, using Matlab.
The system has three lines connected between 1-2,1-3 and 2-3. Each line has a series impedance
of 0.02+j0.08 pu, total shunt admittance of j0.02 pu. The specified quantities of the buses are
tabulated below on 100MVA base. Obtain the Bus Voltages.
39
Bus Real Load Reactive Real power Reactive Voltage
demand load demand Gen power Gen Specification
PD QD PG QG
2. In the above system, the scheduled real power at bus 3 is changed to 1.0pu. Determine the new
bus voltages and comment on the results.
Question-7
1. Draw the flow chart for the NR method of power flow solution.
2. Using the available software package, determine the voltage at all the buses for the data
given below, using NR method.
Line data
Bus data
Bus Bus Voltages Generation Load Type
No of
. bus
Magnitude Phase Real Reactive Real Reactive
Angle
1 - - 0 0 0.45 0.15 PQ
2 - - 0 0 0.4 0.05 PQ
3 - - 0 0 0.6 0.1 PQ
4 1.0476 - 0.4 - 0.2 0.1 PV
5 1.06 00 - - - - slack
40
Question-8
1. For the figure below draw the sequence networks.
2. Draw the connections of the sequence networks for a single line to ground fault at bus number 4.
3. Using MiPower, simulate the SLG fault at (i) bus no 4 (ii) bus no 3.
Compare the fault currents in the two cases.
4. Analyze the results of the simulation study in terms of sequence currents, line currents and line
voltages.
5. Compare the fault currents for SLG and 3-phase symmetrical fault at bus no 3.
Question-9
1. The cost functions of three plants in Rs/h is given by
F1= 350 + 7.2 PG1+ 0.004 PG12
F2= 500 + 7.3 PG2+ 0.0025 PG22
F3= 600 + 6.74 PG3+ 0.003 PG32
The generation is in MW in the above functions. The generator limits are the same for all the
plants and given by
125≤ PG ≤ 300 MW
Write a program in MATLAB to determine the optimal economic dispatch for a demand of (i)
450 MW (ii) 600 MW using an initial λ of 6.
2. Repeat the problem with another initial value of λ. Comment on the result.
3. Compare the cost of optimal dispatch with that when the demand is shared equally between the
plants.
Question-10
1. Write a program in MATLAB to obtain optimal economic schedule for the following data:
The fuel cost of two plants is given by
F1=200+10.333PG1+0.00889PG12Rs/h
F2=240+10.833PG2+0.00741PG22Rs/h
41
The demandis 150MW. The transmission loss is given by
Ploss=0.001PG12+0.002PG22
2. What is the schedule if loss is neglected?
3. Repeat question 1, for a demand of 200MW.
Question-11
1. Write the swing equation as two first order differential equations.
2. Give equations for solving the above using modified Euler’s method
3. Write a program in MATLAB to solve the swing equation using Modified Euler’s method with
following data.
Pmax1=1.714 pu
Pmax2=0.63 pu
Pmax3=1.333 pu
Power transferred =0.8 pu
H= 5.2
Fault clearing time =0.125 secs
Frequency=50 Hz
Question-12
1. Write the swing equation as two first order differential equations.
2. Give equations for solving the above using RK 4th order method
3. Write a program in MATLAB to solve the swing equation using RK 4 th order method with
following data.
Pmax1=1.714 pu
Pmax2=0.63 pu
Pmax3=1.333 pu
Power transferred =0.8 pu
H= 5.2
Fault clearing time =0.125 secs
Frequency=50 Hz
42
VIVA VOICE
1. What is single line diagram?
A single line diagram is a diagrammatic representation of power system in which the
components are represented by their symbols and the interconnection between them are
shown by a single straight line.
43
The neutral reactance are neglected.
The shunt branches in equivalent circuit of induction motor are neglected.
The resistances are neglected.
All static loads and induction motor are neglected.
The capacitances of the transmission lines are neglected.
9.Give the equations for transforming base kV on LV side to HV side and viceversa.
Base kV on HT side = Base kV on LT side * (HT voltage rating / LT voltage rating)
Base kV on LT side = Base kV on HT side * (LT voltage rating / HT voltage rating)
12. Name the diagonal and off-diagonal elements of bus admittance matrix.
The diagonal elements of bus admittance matrix are called self admittances of the matrix and
off-diagonal elements are called mutual admittances of the buses.
14. Write the equation to find the elements of new bus admittance matrix after eliminating
nth row and column in a n*n matrix.
Yjk = Yjk-(YjnYnk / Ynn)
15. What is bus impedance matrix?
The matrix consisting of driving point impedances and transfer impedances of the network of
a power system is called bus impedance matrix.
16. Name the diagonal and off-diagonal elements of bus impedance matrix.
The diagonal elements of bus impedance matrix are called driving point impedances of the
buses and off-diagonal elements are called transfer impedances of the buses.
17. What are the methods available for forming bus impedances matrix?
(1)Form the bus admittances matrix and then take its inverse to get bus impedance matrix.
(2)Directly form the bus impedance matrix from the reactance diagram. This method utilizes
the techniques of modification of existing bus impedance matrix due to addition of new bus.
44
18. Write the four ways of adding an impedance to an existing system so as to modify bus
impedance matrix.
Case 1:Adding a branch impedance Zb from a new bus P to the reference bus.
Case 2:Adding a branch impedance Zb from a new bus P to the existing bus q.
Case 3:Adding a branch impedance Zb from a existing bus q to the reference
bus.
Case 4:Adding a branch impedance Zb between two existing bus h and q.
45
26.Different types of buses in a power system
30. Write the most important mode of operation of power system and mention the major
problems encountered with it.
Symmetrical steady state is the most important mode of operation of power system. Three
major problems are encountered in this mode of operation. They are, 1) Load flow problem
2) Optimal load scheduling problem
3) Systems control problem
46
The study of various methods of solution to power system network is referred to as load study.
The solution provides the voltages at various buses, power flowing in Various lines and line
losses.
37.How will you account for voltage controlled buses in the load flow algorithm?
The acceleration factor is a real quantity and it modifies the magnitude of bus voltage alone.
Since in voltage controlled bus, the magnitude of bus voltage is not allowed to change, the
acceleration factor is not used for voltage controlled bus.
47
a. Calculations are simple and so the programming task is less
b. The memory requirement is less
c. Useful for small systems.
43. What is Jacobian matrix? How the elements of Jacobian matrix are computed?
The matrix formed from the derivates of load flow equations is called Jacobian matrix and it is
denoted by J.
The elements of Jacobian matrix will change in every iteration. In each iteration, the elements
of the Jacobian matrix are obtained by partially differentiating the load flow equations with
respect o unknown variable and then evaluating the first derivates using the solution of
previous iteration.
48
c. In N-R method, the convergence is not affected by the choice of slack bus.
49
= -1, if ith element is incident to but oriented towards the kth node.
= 0, if ith element is not incident to the kth node.
50
Examples of large disturbances are transmission system faults, sudden load changes, loss of
generating units and line switching.
51
67. What are the factors that affect the transient stability?
The transient stability is generally affected by two factors namely,
1.Type of fault 2. Location of fault.
68.List the methods of improving the transient stability limit of a power system.
1.Increase of system voltage, use of AVR.
2.Use of high speed excitation systems.
3.Reduction in system transfer reactance.
4.Use of high speed reclosing breakers.
75.For a fault at a given location, rank the various faults in the order of severity.
In a power system, the most severe fault is three phase fault and less severe fault is open
conductor fault. The various faults in the order of decreasing severity are,
1.3 phase fault
2)Double line-to-ground fault
3)Line-to-line fault
52
4)Single line-to-ground fault
5)Open conductor fault
81.Write the equation for subtransient and transient internal voltage of the generator.
The equation for subtransient internal voltage is,
Eg '' =Vt + jIL X d ''
53
Transient internal voltage is,
Eg ' =Vt + jI L X d '
where
Eg’’ = Subtransient internal voltage of generator
Eg’ = Transient internal voltage of generator
Vt = Terminal voltage
IL = Load current
Xd’’ =Direct axis subtransient reactance
Xd’ =Direct axis transient reactance
82.Write the equation for subtransient and transient internal voltage of the motor. The
equation for subtransient internal voltage is,
54
An unbalanced system of N related vectors can be resolved into N systems of balanced
vectors called symmetrical components. Positive sequence components Negative sequence
component Zero sequence components.
90.Give the expression for swing equation. Explain each term along with their units.
55
1) Mechanical power input to the machine remains constant during the period of
electromechanical transient of interest.
2) Rotor speed changes are insignificant that had already been ignored in formulating
the swing equations.
3) Effect of voltage regulating loop during the transient are ignored.
94.What are the systems design strategies aimed at lowering system reactance?
The system design strategies aimed at lowering system reactance are:
a. Minimum transformer reactance
b.Series capacitor compensation of lines
c.Additional transmission lines.
95.What are coherent machines? (APR/MAY 2004)
Machines which swing together are called coherent machines. When both ωs and δ are
expressed in electrical degrees or radians, the swing equations for coherent machines can be
combined together even though the rated speeds are different. This is used in stability studies
involving many machines.
97.What are various faults that increase severity of equal area criterion?
The various faults that increases severity of equal area criterion are,
A Single line to ground fault
A Line to line fault
A Double line to ground fault
A Three phase fault
56
98.List the types of disturbances that may occur in a single machine infinite bus bar system
of the equal area criterion stability
The types of disturbances that may occur are,
Sudden change in mechanical input
Effect of clearing time on stability
Sudden loss of one of parallel lines
Sudden short circuit on one of parallel lines
i) Short circuit at one end of line
ii) Short circuit away from line ends
iii) Reclosure
101. What are the assumptions that are made inorder to simplify the computational task in
stability studies?
The assumptions are,
• The D.C offset currents and harmonic components are neglected. The currents
and voltages are assumed to have fundamental component alone.
• The symmetrical components are used for the representation of unbalanced
faults.
• It is assumed that the machine speed variations will not affect the generated
voltage.
57
The connection or disconnection of a single small machine on a large system would not
affect the magnitude and phase of the voltage and frequency. Such a system of constant voltage
and constant frequency regardless of the load is called infinite bus bar system or infinite bus.
58