Pe Lab Record-Final
Pe Lab Record-Final
CONTENTS
CHARACTERISTICS OF SOLAR PV
7. 08-02-21 36 SYSTEM
CHARACTERISTICS OF WIND
8. 15-02-21 40 ENERGY CONVERSION SYSTEM
2
DIGITAL OVERCURRENT
11. 22-03-21 59 RELAY SETTING AND RELAY
COORDINATION
3
Ex. No. 1
18/01/2021
2. Formulae:
1. Real Power at bus ‘i’:
𝑛
𝑃𝑖 = ∑ |𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗=1
2. Reactive Power at bus ‘i’:
𝑛
𝑄𝑖 = − ∑ |𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗=1
3. Real and Reactive Power Mismatch:
Δ𝑃𝑖 = 𝑃𝑠𝑐ℎ𝑑 − 𝑃𝑖,𝑐𝑎𝑙𝑐
Δ𝑄𝑖 = 𝑄𝑠𝑐ℎ𝑑 − 𝑄𝑖,𝑐𝑎𝑙𝑐
4. Correction Matrix:
Δ𝛿 𝐽 𝐽2 −1 Δ𝑃
[ ]=[1 ] ∗[ ]
Δ|𝑉| 𝐽3 𝐽4 Δ𝑄
5. Jacobian:
5.1 J1 :
𝜕𝑃𝑖
Diagonal: = ∑𝑛𝑗=1;|𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝜕𝛿𝑖
𝑗≠𝑖
𝜕𝑃𝑖
Non-Diagonal: 𝜕𝛿 = −|𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗
5.2 J2 :
𝜕𝑃𝑖
Diagonal: = (2 ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑖 | ∗ cos 𝜃𝑖𝑖 ) + ∑𝑛𝑗=1;|𝑉𝑗 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝜕𝑉𝑖
𝑗≠𝑖
𝜕𝑃𝑖
Non-Diagonal: 𝜕𝑉 = |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗
5.3 J3 :
𝜕𝑄𝑖
Diagonal: = ∑𝑛𝑗=1;|𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝜕𝛿𝑖
𝑗≠𝑖
𝜕𝑄𝑖
Non-Diagonal: 𝜕𝛿 = −|𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗
5.4 J4 :
𝜕𝑄𝑖
Diagonal: = (−2 ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑖 | ∗ sin 𝜃𝑖𝑖 ) − ∑𝑛𝑗=1;|𝑉𝑗 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝜕𝑉𝑖
𝑗≠𝑖
𝜕𝑄𝑖
Non-Diagonal: 𝜕𝑉 = −|𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗
6. Line Flows:
4
𝑆𝐿,𝑖𝑗 = 𝑆𝑖𝑗 + 𝑆𝑗𝑖 𝑆𝑖𝑗 = 𝑉𝑖 ∗ 𝐼𝑖𝑗∗ 𝑆𝑗𝑖 = 𝑉𝑗 ∗ 𝐼𝑗𝑖∗
𝐼𝑖𝑗 = (𝑉𝑖 − 𝑉𝑗 ) ∗ 𝑦𝑖𝑗 𝐼𝑗𝑖 = −𝐼𝑖𝑗
3. Algorithm:
Step-1: Start
Step-4: Set the iteration count ‘k’ to 0 and initialize the bus voltages to 1∠0 for PQ bus and voltage
angle (δ) to 0 for PV bus.
Δ𝑃𝑘
[ ]≤ 𝜀
Δ𝑄 𝑘
Step-8: Check for Q limit violation. If there is a violation, convert those PV buses to PQ buses.
Step-12: Compute the power loss, reactive power generation and line flows.
4. System Data:
Base MVA=100MVA
Line Details:
5
Bus Details:
Pg Pd Qg Qd
1 Slack - - - - 1.05 0
2 PQ 0 4 0 2.5 - -
3 PV 2 0 - - 1.04 -
5. Program:
clc
% sb eb r x
linedata = [1 2 0.02 0.04
1 3 0.01 0.03
2 3 0.0125 0.025];
% bus type V del Pg Qg Pd Qd Qmin Qmax
busdata = [ 1 1 1.05 0 0 0 0 0 0 0;
2 2 1 0 0 0 4 2.5 0 100;
3 3 1.04 0 2 0 0 0 0 0];
%Ybus matrix
sb = linedata(:,1);
eb = linedata(:,2);
r = linedata(:,3);
x = linedata(:,4);
z = r + 1i*x;
y = 1./z;
nbus = 3;
nl = max(eb);
Y = zeros(nbus,nbus);
for k = 1:nl
Y(sb(k),eb(k)) = Y(sb(k),eb(k)) - y(k);
Y(eb(k),sb(k)) = Y(eb(k),sb(k))-y(k);
6
Y(sb(k),sb(k))= Y(sb(k),sb(k))+y(k);
Y(eb(k),eb(k))= Y(eb(k),eb(k))+y(k);
end
Y
bus= busdata(:,1);
type= busdata(:,2);
V = busdata(:,3);
del = busdata(:,4);
Pg = busdata(:,5);
Qg = busdata(:,6);
Pl = busdata(:,7);
Ql = busdata(:,8);
Qmin = busdata(:,9);
Qmax = busdata(:,10);
Psp = Pg - Pl;
Qsp = Qg - Ql;
G= real(Y);
B= imag(Y);
pv = find(type == 3);
pq = find(type == 2);
npv = 1;
npq = 1;
Tol=0.001;
Iter=1;
while(Tol>0.0001)
Iter=Iter
Vcomp=zeros(nbus,1);
P= zeros(nbus,1);
S= zeros(nbus,1);
for i = 1:nbus
Vcomp(i)= V(i)*exp(i*del(i));
end
Q= zeros(nbus,1);
for i= 2:nbus %to calculate Pcal and Qcal
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))));
S(i)= S(i)+ conj(Vcomp(i))*Vcomp(k)*Y(i,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
end
delP=Psp-P;
delQ=Qsp-Q;
k = 1;
dQ = zeros(npq,1);
for i = 1:nbus
if type(i) == 2
dQ(k,1) = delQ(i);
k = k+1;
end
end
dP= delP(2:nbus);
M=[dP;dQ]; %delta P and delta Q
7
M
%J1
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
J2 = zeros(nbus-1,npq);
for i = 1:(nbus-1)
m = i+1;
for k = 1:npq
n = pq(k);
if n == m
for n = 1:nbus
J2(i,k) = J2(i,k) + V(n)*(G(m,n)*cos(del(m)-del(n)) +
B(m,n)*sin(del(m)-del(n)));
end
J2(i,k) = J2(i,k) + V(m)*G(m,m);
else
J2(i,k) = V(m)*(G(m,n)*cos(del(m)-del(n)) + B(m,n)*sin(del(m)-
del(n)));
end
end
end
% J3
J3 = zeros(npq,nbus-1);
for i = 1:npq
m = pq(i);
for k = 1:(nbus-1)
n = k+1;
if n == m
for n = 1:nbus
J3(i,k) = J3(i,k) + V(m)* V(n)*(G(m,n)*cos(del(m)-del(n)) +
B(m,n)*sin(del(m)-del(n)));
end
J3(i,k) = J3(i,k) - V(m)^2*G(m,m);
else
J3(i,k) = V(m)* V(n)*(-G(m,n)*cos(del(m)-del(n)) -
B(m,n)*sin(del(m)-del(n)));
end
end
end
% J4
J4 = zeros(npq,npq);
for i = 1:npq
8
m = pq(i);
for k = 1:npq
n = pq(k);
if n == m
for n = 1:nbus
J4(i,k) = J4(i,k) + V(n)*(G(m,n)*sin(del(m)-del(n)) -
B(m,n)*cos(del(m)-del(n)));
end
J4(i,k) = J4(i,k) - V(m)*B(m,m);
else
J4(i,k) = V(m)*(G(m,n)*sin(del(m)-del(n)) - B(m,n)*cos(del(m)-
del(n)));
end
end
end
9
Pij = real(Sij);
Qij = imag(Sij);
% Line Losses..
Lij = zeros(nl,1);
for m = 1:nl
p = sb(m); q = eb(m);
Lij(p,q) = Sij(p,q) + Sij(q,p);
end
Lij
Lpij = real(Lij);
Lqij = imag(Lij);
%slack bus power
SBP=0;
for i=1
for j=2:nl
SBP=SBP+Sij(i,j);
end
end
SBP
6. Output:
Ybus matrix:
Iteration 1:
Mismatch
-2.8600
1.4384
-0.2200
Jacobian
54.2800 -33.2800 24.8600
State Vector
-0.0453
-0.0077
-0.0265
New Delta
0
-0.0453
-0.0077
10
1.0500
0.9735
1.0400
Iteration 2:
Mismatch
-0.0992
0.0217
-0.0509
Jacobian
51.7247 -31.7656 21.3026
State Vector
-0.0018
-0.0010
-0.0018
New Delta
0
-0.0471
-0.0087
Jacobian
51.5992 -31.6954 21.1499
State Vector
1.0e-04*
-0.0385
-0.0239
-0.5133
New Delta
11
0
-0.0471
-0.0087
-0.3076
0.2228
-0.6971
Jacobian
51.5965 -31.6937 21.1472
State Vector
1.0e-05 *
-0.0001
-0.0001
-0.1454
New Delta
0
-0.0471
-0.0087
Line Losses:
SL12 SL13 SL23
12
-2.1862 - 1.4078i
7. Result:
MATLAB code to solve load flow problem using Newton Raphson has been successfully executed and
reactive power support for maintaining voltage profile is also determined.
13
Ex. No. 2
25/01/21
2. Formulae:
7. Real Power at bus ‘i’:
𝑛
𝑃𝑖 = ∑ |𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ cos(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗=1
8. Reactive Power at bus ‘i’:
𝑛
𝑄𝑖 = − ∑ |𝑉𝑗 | ∗ |𝑉𝑖 | ∗ |𝑌𝑖𝑗 | ∗ sin(𝜃𝑖𝑗 + 𝛿𝑗 − 𝛿𝑖 )
𝑗=1
9. Real and Reactive Power Mismatch:
Δ𝑃𝑖 = 𝑃𝑠𝑐ℎ𝑑 − 𝑃𝑖,𝑐𝑎𝑙𝑐
Δ𝑄𝑖 = 𝑄𝑠𝑐ℎ𝑑 − 𝑄𝑖,𝑐𝑎𝑙𝑐
10. Correction Matrix:
[Δ𝛿] = [𝐵′]−1 ∗ [∆𝑃/|𝑉|]
[Δ𝑉] = [𝐵"]−1 ∗ [∆𝑄/|𝑉|]
B' corresponds to suceptances of all buses except slack bus.
B'' corresponds to susceptances of PQ buses.
11. Line Flows:
𝑆𝐿,𝑖𝑗 = 𝑆𝑖𝑗 + 𝑆𝑗𝑖 𝑆𝑖𝑗 = 𝑉𝑖 ∗ 𝐼𝑖𝑗∗ 𝑆𝑗𝑖 = 𝑉𝑗 ∗ 𝐼𝑗𝑖∗
𝐼𝑖𝑗 = (𝑉𝑖 − 𝑉𝑗 ) ∗ 𝑦𝑖𝑗 𝐼𝑗𝑖 = −𝐼𝑖𝑗
3. Algorithm:
Step-1: Start
Step-5: Set the iteration count ‘k’ to 0 and initialize the bus voltages to 1∠0 for PQ bus and voltage
angle (δ) to 0 for PV bus.
∆𝑃𝑘
[ 𝑘] ≤ ε
∆𝑄
14
Step-8: Compute Qi for all PV buses.
Step-9: Check for Q limit violation. If there is a violation, convert those PV buses to PQ
buses.
Step-12: Compute the power loss, reactive power generation and line flows
4. System Data:
Base MVA=100MVA
Line Details:
Bus Details:
1 1 1.05 0 - - - - - -
2 2 1 0 0 0 4 2.5 - -
3 3 1.04 0 2 0 0 0 0 100
15
Line data:
1 2 0.02 0.04
2 3 0.01 0.03
1 3 0.0125 0.025
5. Program:
clc
% sb eb R X
linedata = [ 1 2 0.02 0.04
1 3 0.01 0.03
2 3 0.0125 0.025];
% Bus Type V del Pg Qg Pl Ql Qmin Qmax
busdata = [1 1 1.05 0 0 0 0 0 0
0;
2 2 1 0 0 0 4 2.5 0
100;
3 3 1.04 0 2 0 0 0 0
0];
sb = linedata(:,1);
eb = linedata(:,2);
r = linedata(:,3);
x = linedata(:,4);
z = r + 1i*x;
y = 1./z;
nbus = 3;
nl = max(eb); %no of lines
Y = zeros(nbus,nbus);
for k = 1:nl
Y(sb(k),sb(k))= Y(sb(k),sb(k))+y(k);
Y(eb(k),eb(k))= Y(eb(k),eb(k))+y(k);
Y(sb(k),eb(k)) = Y(sb(k),eb(k))- y(k);
Y(eb(k),sb(k)) = Y(eb(k),sb(k))-y(k);
end
bus= busdata(:,1);
type= busdata(:,2);
V = busdata(:,3);
del = busdata(:,4);
Pg = busdata(:,5);
Qg = busdata(:,6);
Pl = busdata(:,7);
Ql = busdata(:,8);
Qmin = busdata(:,9);
Qmax = busdata(:,10);
Psp = Pg - Pl;
Qsp = Qg - Ql;
16
slackbus= find(bus==1);
pv = find(bus == 3);
pq = find(bus == 2);
npv = 1;
npq = 1;
Tol=0.001
Iter=1;
while(Tol>0.0001)
Iter=Iter
Vcomp=zeros(nbus,1);
P= zeros(nbus,1);
for i=1:nbus
Vcomp(i)= V(i)*exp(i*del(i));
end
for i= 2: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))));
end
end
%finding del P by V
for i=1:nbus
delP(i,1)= (Psp(i)-P(i));
dPbyV(i,1)= delP(i,1)/V(i,1);
end
delPbyV=dPbyV(2:3);
delPbyV
%B prime
bp= -B;
bp(slackbus,:) = [];
bp(:,slackbus) = [];
bp
xdel=inv(bp)*delPbyV;
xdel
%Update state vector
del(2:nbus)=del(2:nbus)+xdel
ddel=del(2:nbus)*(180/pi)
%to calculate Qcal
Q= zeros(nbus,1);
for i= 2:nbus
for k= 1:nbus
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
end
%finding del Q by v
c=0;
for i=1:nbus
if type(i)==2
c=c+1;
delQ(c,1)= (Qsp(i)-Q(i));
dQbyV(c,1)= delQ(c,1)/V(i,1);
end
end
dQbyV
%to find B double prime
bpp= -B;
K=[find(type==1);find(type==3)];
bpp(K,:)=[];
bpp(:,K)=[];
bpp
cVmag= inv(bpp)*dQbyV;
cVmag
%update the state vector
k = 1;
for i = 2:nbus
if type(i) == 2
V(i) = cVmag(k) + V(i)
17
k = k+1;
end
end
M=[xdel;cVmag];
M
Tol=max(abs(M));
Iter=Iter+1;
end
% Bus Current Injections
Iij = zeros(nbus,nbus);
Sij = zeros(nbus,nbus);
6. Output:
Ybus Matrix
20.0000 -50.0000i -10.0000 +20.0000i -10.0000 +30.0000i
18
B prime
52 −32
[ ]
−32 −6
B double prime
[ 52 ]
Iteration results
Iteratio Del P by V Change in delta Del Q by Change in
n no (in radians) V Voltage
Δ𝑃2 /𝑉2 Δ𝑃3 /𝑉3 Δ𝛿2 Δ𝛿3 Δ𝑄2 /𝑉2 Magnitude
𝑉3𝑛𝑒𝑤 = 𝑉3𝑜𝑙𝑑 +
Δ𝑉3
Line Losses
SL12 SL13 SL23
-0.0840 - 0.1680i -0.0018 - 0.0055i -0.0985 - 0.1971i
-2.1850 - 1.4085i
7. Result:
MATLAB code to solve load flow problem using Fast Decoupled has been successfully executed and
reactive power support for maintaining voltage profile is also determined.
19
Ex. No. 3 01/02/2021
Distributed Load Flow Analysis by Ladder Iterative Method
1. Aim:
To write MATLAB code to solve distributed load flow problem using ladder iterative method.
2. Formulae:
Backward sweep:
Node Current:
𝐼∗ = 𝑆 ∗/ 𝑉 ∗
Forward sweep:
Line drop
𝑉𝐿 = 𝐼𝐿 x 𝑍𝐿
Step 1 : Start
Step 2 : Set the iteration count 'k' equal to 0.Initialize the initial current to zero and Initial voltage
to 1+j0.
Step 7 : Check for convergence: if V≤ 𝜀,if converged got to next step or set k=k+1 and
go to step-3
4. System Data:
LINE DATA:
1 1 0 0.6 0.2
20
3 0.98 0 0.3 0.1
5. Program:
clc
% sb eb R X
linedata= [ 1 2 0.08 0.06;
2 3 0.1 0.09;
2 4 0.12 0.1];
% Bus Type V del Pg Qg Pd Qd Qmin
Qmax
busdata = [1 1 1 0 0 0 0.6 0.2 0 0;
2 2 0.98 0 0 0 0.5 0.2 0 0;
3 2 0.98 0 0 0 0.3 0.1 0 0;
4 2 0.98 0 0 0 0.5 0.2 0 0];
sb= linedata(:,1);
eb= linedata(:,2);
R=linedata(:,3);
X=linedata(:,4);
Z= R+1i*X;
Y= 1./Z;
V= busdata(:,3);
del= busdata(:,4);
Pd= busdata(:,7);
Qd= busdata(:,8);
S=Pd+1i*Qd;
nline=size(linedata);
nline=nline(1);%no of lines
nbus= size(busdata);
nbus=nbus(1);%no of buses
Iter=1;
while(Iter<5)
Iter=Iter
Iij=zeros(nline,1);
I=conj(S./V);
I
for i=nline:-1:1
crb=eb(i);%current recieving bus
icrb=find(sb==crb);%Current recieving bus as sending bus
Iij(i)=I(crb)+sum(Iij(icrb));
end
Iij
Voldmag=V
for i=2:nbus
cbus=find(eb==i);%currentbus/recieving bus
s_cbus=sb(cbus);%currentbus as sending bus
V(i)=V(s_cbus)-(Iij(cbus).*Z(cbus));
end
V %New Voltage
if(all(abs((Voldmag-V)./Voldmag)<0.001))
21
break;
end
Iter=Iter+1;
end
%Line Current FLow
Iij=zeros(nbus,1);
for i=1:nline
p=sb(i);
q=eb(i);
Y=inv(Z(i));
Iij(p,q)=(V(p)-V(q)).*Y;
Iij(q,p)=(V(q)-V(p)).*Y;
end
cIij=conj(Iij)
%Line Power Flow
Sij=zeros(nbus,1);
for i=1:nline
p=sb(i);
q=eb(i);
Sij(p,q)= V(p).*(cIij(p,q));
Sij(q,p)= V(q).*(cIij(q,p));
end
Sij
%Line Losses
Lij=zeros(nbus,nbus);
for i=1:nline
p=sb(i);
q=eb(i);
Lij(p,q)=Sij(p,q)+Sij(q,p);
end
Lij
6. Output:
Bus Current
Iteration 𝐼2 𝐼3 𝐼4
1 0.5102 - 0.3061 - 0.5102 -
0.2041i 0.1020i 0.2041i
2 0.5676 - 0.3544 - 0.6140 -
0.2572i 0.1456i 0.3072i
3 0.5879 - 0.3715 - 0.6579 -
0.2646i 0.1521i 0.3279i
4 0.5932 - 0.3758 - 0.6697 -
0.2691i 0.1560i 0.3400i
Branch Current
Iteration 𝐼12
1 1.3265 - 0.5102i
2 1.5361 - 0.7099i
3 1.6173 - 0.7446i
4 1.6387 - 0.7650i
Voltage Magnitude
22
Iteration 𝑉2 𝑉3 𝑉4
1 0.8633 - 0.0388i 0.8235 - 0.0561i 0.7816 - 0.0653i
2 0.8345 - 0.0354i 0.7860 - 0.0527i 0.7301 - 0.0599i
3 0.8259 - 0.0375i 0.7751 - 0.0557i 0.7142 - 0.0639i
4 0.8230 - 0.0371i 0.7714 - 0.0553i 0.7086 - 0.0633i
Line Losses
𝐿12 𝐿23 𝐿24
0.2616 + 0.1962i 0.0166 + 0.0149i 0.0677 + 0.0564i
7. Result:
The distribution load flow analysis of a given network is performed using Ladder iterative method
in MATLAB.
1) The Bus voltages.
2) Line flows.
3) Line losses are determined.
23
Ex no. 4
08/02/2021
2. Theory:
a. Introduction
The extraction of electrical energy directly from the sun without any intermediate process is known as solar
energy. A solar cell is a semiconductor device used to capture the light from sun. The working of solar cell
depends on photovoltaic effect, hence a solar cell is known as photovoltaic cell. It is independent of incident
light striking on it but the current capacity is almost proportional to the intensity of incident light as well as
to the area of the cell that is exposed to the light.
The equivalent circuit of a PV cell consists of a diode in parallel with an ideal current source along with shunt
and series resistors to account for the loss.
𝑰𝑳 = current from the ideal current source
𝑰𝑫 = diode current
𝑰𝒔𝒉 = shunt current
𝑰 = output current
𝑹𝒔𝒉 = shunt resistor
𝑹𝒔 = series resistor
I = IL - ID - Ish
The ideal current source delivers current proportional to amount of solar light falling on the cell. There are
two conditions for the actual PV cell and for the equivalent circuit working, which are:
a. Current that flows when the terminals are short circuited (short circuit current, 𝐼𝑠𝑐 )
b. Voltage across the terminals when the terminals are left open (open-circuit voltage,𝑉𝑂𝐶 )
The maximum current that a solar cell can deliver when short circuiting the output terminals at the most
optimised condition for producing maximum output. The optimised condition here means the maximum
amount of light a cell can capture at a particular position and angle, as the current production depends on the
surface area of the cell exposed to light. This current is known as Maximum Current Density expressed by
𝐽𝑠𝑐 = 𝐼𝑠𝑐 / A
24
Open-circuit Voltage (𝑽𝑶𝑪 )
The open-circuit voltage is measured by measuring the voltage at the terminals when no load is connected
across it. The voltage doesn’t depend on the intensity of the light and the area of the cell. Normally the open-
circuit voltage of a solar cell is approximately 0.5 to 0.6V.
The solar cell I-V characteristics are plotted by first noting the open-circuit voltage (𝑉𝑂𝐶 ). A load is then connected
and gradually increased, hence some amount of current starts flowing. Load voltage is noted down for each load
current. Then the cell is short circuited and corresponding short circuit voltage is noted. P-V characteristics are
obtained multiplying each value of PV cell voltage with corresponding current flowing through it.
From the characteristics, the maximum power occurs for one particular value of terminal voltage and current. It
will occur at the bend point of the characteristic curve.
Fill Factor is defined as the ratio of product of current and voltage at maximum power point to the product of
short circuit current and open-circuit voltage.
The efficiency of solar cell is defined as ratio of maximum electrical power output to the radiation power input in
the cell. The radiation power is considered as 1000 watt/square meter. If the exposed area of the cell is A, then
total radiation power of the cell will be 1000 A watts.
3. MATLAB Model
25
4. Output
I-V Characteristics:
P-V Characteristics:
26
5. Result:
Solar Cell has been modelled and the I-V, P-V characteristics are obtained through simulation in MATLAB.
27
Ex no. 5
08/02/2021
3. Theory:
c. Introduction
The kinetic energy available in wind is captured and converted in rotational mechanical energy by wind
turbine. This mechanical energy of wind turbine is given to generator which converts the mechanical energy
into electrical energy.
Where,
ρair(kg/m3) is the density of air,
Rblade (m) is the radius of the blade,
Ablade (m2) is the area covered by the blade,
Cp is the coefficient of performance of turbine,
β (degree) is the pitch angle,
λ is the tip speed ratio, ωw (rad/s) is the wind speed,
ωr(rad/s) is the turbine rotor speed.
d. Types of WECS
e. Parts of WECS
1. Rotor Blade
2. Rotor Hub
3. Nacelle
4. Generator
5. Pitch Control
6. Yaw Control
7. Anemometer
8. Gear Box
f. Definitions
28
1. Cut-in Speed: This is the minimum wind speed required for the wind turbine to start rotating for
power production.
2. Cut-Out Speed: This is the maximum wind speed above which the turbine is completely stopped so
that the turbine is within safe operating conditions.
3. Betz's coefficient: This is the theoretical maximum ratio of power that can be extracted from the wind
energy by wind turbine. Theoretically this value is 16/27 (59.3%).
4. Tip Speed Ratio: It is the ratio of tangential velocity of tip of wind turbine blade to the wind speed. It
is denoted by lambda.
5. Pitch Angle: It is the angle at which wind contacts the blades of the wind turbine. It is denoted by
beta.
6. Co-efficient of Performance: It is the ratio of power output of the unit to the power available in the
wind. It is a function of tip-speed ratio and pitch angle.
To extract maximum power from wind, the wind turbine should run at optimal value of coefficient of
performance. This optimal value of coefficient of performance is obtained at optimal tip speed ratio which
in turn depends on rotor speed for a particular wind speed. This optimal tip speed ratio is constant for all
wind speeds for a given turbine. So, for a particular wind speed the rotor must rotate at a particular optimal
value. Thus rotor speed must be varied continuously for each wind speed so that Cp is always at its optimal
maximum value.
Since the generator's rotor speed is varied, the frequency of the AC output varies. So it cannot be
interfaced directly to grid. For this reason, a back to back converter is employed to convert variable
frequency AC to DC and then inverting this DC to AC of grid frequency.
29
3. MATLAB Model:
4. Output:
30
𝑉𝑎𝑏𝑐 and 𝐼𝑎𝑏𝑐 characteristics
31
Generator Characteristics
5. Result:
MATLAB-SIMULINK is used to create a Permanent Magnet Synchronous Generator based Wind Energy
Conversion System model and the results are obtained.
32
Ex no. 6
15/02/2021
4. Theory:
a. Introduction
Fuel cells are electrochemical cells which convert chemical energy into electrical energy. The raw material
used is 𝐻2 and the base product is water and heat. The efficiency of conversion in fuel cells is around 70%.
1. Anode: The negative terminal of the fuel cell where oxidation takes place is called as Anode. It
conducts the electrons that are freed from hydrogen molecules so that they can be used in an external
circuit.
2. Cathode: The positive terminal of the fuel cell is called Cathode. It distributes the oxygen to the
surface of the catalyst. Not only that, it conducts electrons back from the external circuit to the
catalyst, where they can recombine with the hydrogen ions and oxygen to form water.
3. Catalyst: A chemical substance which increases the rate of reaction. It is made of platinum powder
very thinly coated onto carbon paper or cloth.
4. Electrolyte: It is otherwise known as Proton Exchange Membrane. A substance that conducts charged
ions from one electrode to the other in a fuel cell. It conducts only positively charged ions.
33
As shown, fuel cell I-V characteristic curve is divided into three regions: R-1, R-2, and R-3. The point at
the boundary of regions R-2 and R-3 is known as maximum power density point or knee/optimum
point. Loading the fuel cells above the maximum power point (MPP) current will shift the operating point
right of the optimum point (region R-3) causing a sudden collapse of the fuel cell voltage to zero.
Therefore, no power could be drawn from the cell. Extended operation in region R-3 may damage the fuel
cell. Fuel cells are generally operated in the region R-2 of the characteristics shown in the figure.
3. MATLAB Model:
4. Output:
34
5. Result:
Thus the Characteristics of Fuel Cell based Energy Sources using MATLAB/Simulink is simulated and
obtained.
35
Ex. No. 7 27/11/2019
1. Aim: To simulate and obtain the Characteristics of Hybrid Power System using MATLAB.
2. Theory:
A hybrid system is a dynamical system that exhibits both continuous and discrete dynamic behaviour – a system
that can both flow (described by a differential equation) and jump (described by a state machine or automaton).
Often, the term "hybrid dynamical system" is used, to distinguish over hybrid systems such as those that combine
neural nets and fuzzy logic, or electrical and mechanical drivelines. A hybrid system has the benefit of
encompassing a larger class of systems within its structure, allowing for more flexibility in modelling dynamic
phenomena.
In general, the state of a hybrid system is defined by the values of the continuous variables and a discrete mode.
The state changes either continuously, according to a flow condition, or discretely according to a control graph.
Continuous flow is permitted as long as so-called invariants hold, while discrete transitions can occur as soon as
given jump conditions are satisfied. Discrete transitions may be associated with events.
With the rapid increase in demand of energy due to the increasing of load, it is very difficult for the electrical grid
to fulfil the energy demand. For supplying the power and to avoid the failure of grid, the grid system does the
load shedding and fulfils the energy demand. But this process is obvious and fails to fulfil the energy demand of
each and every customer. By doing so, the electrical grid system will be free from the stress of fulfilling the
energy demand by performing the load shedding. This hybrid system is connected with the electrical grid near
the load to fulfil the load demand by supplying the power from the electrical grid to the load.
The hybrid power solution allows for the integration of one or more renewable power generation assets with
tailored energy storage systems. When there is a high demand in load and generation is not sufficient, this storage
system can deliver power to the load thus maintaining stability. Also when there is high generation and demand
is low, the same storage system can absorb excess generated power.
3. MATLAB Model:
36
Subsystem:
4. Output:
Battery SOC,Voltage and Current
37
Grid Voltage and Current
38
5. RESULT: MATLAB-SIMULINK is used to model a Hybrid Power System and the required output is
obtained.
39
Ex. No.8
06/03/2021
Voltage Stability: PV and VQ Curves
1. Aim:
To analysis the voltage stability by obtaining the PV and QV curves using MATLAB programming.
2. Theory:
Voltage stability in the power system is defined as the ability of a power system to maintain
acceptable voltages at all bus in the system under normal condition and after being subjected to a
disturbance. Voltage instability stems from the attempt of load dynamics to restore power
consumption beyond the capability of the combined transmission and generation system. Loads are
the driving force of voltage instability, and for this reason this phenomenon has also been called load
instability.
a. Power-Voltage Relationships
For a given load power below the maximum, there are two solutions: one with higher voltage and lower current,
the other with lower voltage and higher current. The former corresponds to "normal" operating conditions, with
voltage V closer to the generator voltage E. Permanent operation at the lower solutions is unacceptable. As the
load is more and more compensated (which corresponds to smaller tan φ), the maximum power increases.
However, the voltage at which this maximum occurs also increases. This situation is dangerous in the sense that
maximum transfer capability may be reached at voltages close to normal operation values. Also, for a high degree
of compensation and a load power close to the maximum, the two voltage solutions are close to each other and
without further analysis it may be difficult to decide if a given solution is the "normal" one. For over-compensated
loads (tan φ < 0), there is a portion of the upper PV curve along which the voltage increases with the load power.
The explanation is that under negative tan φ, when more active power is consumed, more reactive power is
produced by the load. At low load, the voltage drop due to the former is offset by the voltage increase due to the
latter. The more negative tan φ is, the larger is the portion of the PV curve where this takes place.
Generator Reactive Power Requirement
40
Generators are treated as voltage sources of constant magnitude. The main defect of this assumption lies
in the limited reactive power capability of generators. It is therefore of interest to determine how the
reactive generation increases with load.
In the lossless case R = 0, the generator reactive production as the sum of the load and the network
losses:
These curves are similar to the PV curves, except that normal operating points now lie on the lower
part of the curves. Starting from open-circuit conditions (P = 0, 𝑄𝑔 = 0) and increasing the load, the
reactive generation increases nonlinearly with P up to the maximum power. Beyond this point, P
decreases while reactive losses continue to increase, up to the point (P = 0, 𝑄𝑔 = E2/x) which
The line current I relates to the generator apparent power Sg through:
short circuit
corresponds to a short circuit at the load bus. Note finally that all the maximum power points are
characterized by:
The reactive power to be absorbed or inject to reach the operating point should be calculated.
3. Program:
41
PV curve program
%PV curve
clear all
X=0.8;
E=1;
tanpf=-0.2;
temp=1;
temp1=54;
for i=1:1
for P=0:0.03:0.78
Q=P* tanpf;
Vx =sqrt((E^2/4) -(P*X)^2-(X*Q*E^2));
Vhv=sqrt((E^2/2) -(Q* X)+Vx);
Vlv =sqrt((E^2/2) -(Q*X)-Vx);
x1(temp)=P*X/(E^2);
x1(temp1)=P*X/(E^2);
y1(temp)=Vhv/E;
y1(temp1)= Vlv /E;
temp=temp+1;
temp1=temp1 -1;
end
tanpf=tanpf+0.2;
end
plot(x1,y1) ;
legend(" Real Power ");
ylabel("Voltage");
xlabel("Power");
VQ curve program
%VQ curve
clc
clear all
P=0;
E=1;
X=0.1;
V=0.0001;
for j=1:3
P=P+2;
Q=P*tan((25.84*3.1416/180));
V=0.0001;
for i=1:22
theta=asin(P*X/E*V);
42
Qc=Q+(V*V/X)-(E*V/X)*cos(theta);
V=V+0.05;
x1(j,i)=V/E;
y1(j,i)=Qc*X/(E*E);
yy(i)=0;
end
end
plot(x1(1,:),yy,x1(1,:),y1(1,:),x1(2,:),y1(2,:),x1(3,:),y1(3,:));
legend('Reactive Power','V1','V2','V3')
ylabel("Voltage")
xlabel("Reactive Power")
4. Output:
OUTPUT GRAPH FOR PV CURVE
43
5. Result:
A MATLAB program for analysing voltage stability is coded and the following graphs are obtained.
1. P-V Curve.
2. Q-V Curve.
44
Ex no. 9 08/02/2021
5. Formula Used:
ΔX=
3. Algorithm:
45
4. System Data:
LINE DATA:
Line From To Resistance Reactance
1 1 2 0 0.1000
2 2 3 0 0.2500
METER DATA:
5. Program:
clc
% sb eb r x
linedata = [1 2 0.01 0.03
1 3 0.02 0.05
2 3 0.03 0.08];
% bus type V
busdata = [ 1 1 1.00
2 2 1.0
3 3 1.00];
% Measurement,i Type Value(p.u) From To Rii
measurementdata= [ 1 1 0.888 1 2 0.008
2 1 1.173 1 3 0.008
3 2 -0.501 2 0 0.010
4 3 0.568 1 2 0.008
5 3 0.663 1 3 0.008
6 4 -0.268 2 0 0.010
7 5 1.006 1 0 0.004
8 5 0.968 2 0 0.004];
%Ybus matrix
sb = linedata(:,1);
eb = linedata(:,2);
r = linedata(:,3);
x = linedata(:,4);
z = r + 1i*x;
y = 1./z;
46
nbus = 3;
nl = max(eb);
Y = zeros(nbus,nbus);
for k = 1:nl
Y(sb(k),eb(k)) = Y(sb(k),eb(k)) - y(k);
Y(eb(k),sb(k)) = Y(eb(k),sb(k))-y(k);
Y(sb(k),sb(k))= Y(sb(k),sb(k))+y(k);
Y(eb(k),eb(k))= Y(eb(k),eb(k))+y(k);
end
Y
%JACOBIAN MATRIX%
%To calculate Pij
H(1,1)=-V1MAG*V2MAG*((g(1,2)*sin(DEL1-DEL2))-(b(1,2)*cos(DEL1-DEL2)));
H(1,3)=-V2MAG*((g(1,2)*cos(DEL1DEL2))+(b(1,2)*sin(DEL1-DEL2)))+2*(g(1,2)+GS1)*V1MAG;
H(1,4)=-V1MAG*(g(1,2)*cos(DEL1-DEL2)+(b(1,2)*sin(DEL1-DEL2)));
H(2,2)=-V1MAG*V3MAG*((g(1,3)*sin(DEL1-DEL3))-(b(1,3)*cos(DEL1-DEL3)));
H(2,3)=-V3MAG*((g(1,3)*cos(DEL1-DEL3))+(b(1,3)*sin(DEL1-DEL3)))+2*(g(1,3)+GS1)*V1MAG;
47
H(2,5)=-V1MAG*(g(1,3)*cos(DEL1-DEL3)+(b(1,3)*sin(DEL1-DEL3)));
%To calculate Pi
H(3,1)=V2MAG*V1MAG*(-G(2,1)*sin(DEL2-DEL1))+(B(2,1)*cos(DEL2-
DEL1))+V2MAG*V2MAG*(-G(2,2)*sin(DEL2-DEL2))+(B(2,2)*cos(DEL2-
DEL2))+V2MAG*V3MAG*(-G(2,3)*sin(DEL2-DEL3))+(B(2,3)*cos(DEL2-DEL3))-
(V2MAG*V2MAG*B(2,2));
H(3,2)=-V2MAG*V3MAG*(G(2,3)*sin(DEL2-DEL3)+B(2,3)*cos(DEL2-DEL3));
H(3,3)=V2MAG*(G(2,1)*cos(DEL2-DEL1)-B(2,1)*sin(DEL2-DEL1));
H(3,4)=(V1MAG*(G(2,1)*cos(DEL2-DEL1)+B(2,1)*sin(DEL2-DEL1)))+(V2MAG*(G(2,2)*cos(DEL2-
DEL2)+B(2,2)*sin(DEL2-DEL2)))+(V3MAG*(G(2,3)*cos(DEL2-DEL3)+B(2,3)*sin(DEL2-
DEL3)))+(V2MAG*G(2,2));
H(3,5)=(V2MAG*(G(2,3)*cos(DEL2-DEL3)+B(2,3)*sin(DEL2-DEL3)));
%To calculate Qij
H(4,1)=V1MAG*V2MAG*((g(1,2)*cos(DEL1-DEL2))+(b(1,2)*sin(DEL1-DEL2)));
H(4,3)=-V2MAG*((g(1,2)*sin(DEL1-DEL2))-(b(1,2)*cos(DEL1-DEL2)))-2*(b(1,2)+BS1)*V1MAG;
H(4,4)=-V1MAG*(g(1,2)*sin(DEL1-DEL2)-(b(1,2)*cos(DEL1-DEL2)));
H(5,2)=V1MAG*V3MAG*((g(1,3)*cos(DEL1-DEL3))+(b(1,3)*sin(DEL1-DEL3)));
H(5,3)=-V3MAG*((g(1,3)*sin(DEL1-DEL3))-(b(1,3)*cos(DEL1-DEL3)))-2*(b(1,3)+BS1)*V1MAG;
H(5,5)=-V1MAG*(g(1,3)*sin(DEL1-DEL3)-(b(1,3)*cos(DEL1-DEL3)));
%To calculate Qi
H(6,1)=(V2MAG*V1MAG*(G(2,1)*cos(DEL2-DEL1))+(B(2,1)*sin(DEL2-
DEL1)))+(V2MAG*V2MAG*(G(2,2)*cos(DEL2-DEL2))+(B(2,2)*sin(DEL2-
DEL2))+(V2MAG*V3MAG*(G(2,3)*cos(DEL2-DEL3))+(B(2,3)*sin(DEL2-DEL3))-
(V2MAG*V2MAG*G(2,2))));
H(6,2)=-V2MAG*V3MAG*(G(2,3)*cos(DEL2-DEL3)+B(2,3)*sin(DEL2-DEL3));
H(6,3)=V2MAG*(G(2,1)*sin(DEL2-DEL1)-B(2,1)*cos(DEL2-DEL1));
H(6,4)=(V1MAG*(G(2,1)*sin(DEL2-DEL1)-B(2,1)*cos(DEL2-DEL1)))+(V2MAG*(G(2,2)*sin(DEL2-
DEL2)-B(2,2)*cos(DEL2-DEL2)))+(V3MAG*(G(2,3)*sin(DEL2-DEL3)-B(2,3)*cos(DEL2-DEL3)))-
(V2MAG*B(2,2));
H(6,5)=V2MAG*(G(2,3)*sin(DEL2-DEL3)-B(2,3)*cos(DEL2-DEL3));
%To find Voltage
H(7,3)=V1MAG;
H(8,4)=V2MAG;
H
48
r(6,1)=Q2-(V2MAG*V1MAG*(G(2,1)*sin(DEL2-DEL1)+B(2,1)*cos(DEL2-DEL1)))-
(V2MAG*V2MAG*(G(2,2)*sin(DEL2-DEL2)+B(2,2)*cos(DEL2-DEL2)))-
(V2MAG*V3MAG*(G(2,3)*sin(DEL2-DEL3)+B(2,3)*cos(DEL2-DEL3)));
r(7,1)=V1-V1MAG;
r(8,1)=V2-V2MAG;
r
%To calculate right hand side vector t
t=H1*R1*r
DELX=inv(G1)*t
%updating values for next iteration
X=DELX+X0
V1MAG=X(3,1)
V2MAG=X(4,1)
V3MAG=X(5,1)
Iter=Iter+1;
end
6. Output:
Ybus Matrix
16.8966 -47.2414i -10.0000 +30.0000i -6.8966 +17.2414i
Iteration 1:
G
107
3.4392 -0.5068 0.0137 0.0000 -0.0137
T
105
-4.9489
-1.9987
8.4052
-5.8746
-2.5469
∆x
49
-0.0213
-0.0452
-0.0004
-0.0256
-0.0576
X (STATE VARIABLE)
-0.0213
-0.0452
0.9996
0.9744
0.9424
Iteration 2:
G
107
3.1770 -0.4423 0.0161 -0.0039 -0.0114
T
105
-3.7776
-2.1627
2.3973
-3.2546
0.8903
∆x
-0.0189
-0.0505
50
0.0048
-0.0038
0.0119
X (STATE VARIABLE)
-0.0189
-0.0505
1.0048
0.9962
1.0119
Iteration 3:
G
107
3.4179 -0.5076 0.0180 -0.0061 -0.0119
T
105
-3.7231
-2.3780
8.5902
-6.0304
-2.5426
∆x
-0.0181
-0.0470
51
-0.0004
-0.0263
-0.0572
X (STATE VARIABLE)
-0.0181
-0.0470
0.9996
0.9737
0.9428
7. Result:
A MATLAB program for state estimation has been coded and the residual and 𝑋𝑒𝑠𝑡 value is obtained.
52
Ex. No.10 8/03/2021
Contingency Analysis: Generation Shift Factors and Line Outage Distribution Factors
AIM: To perform contingency analysis for Generator shift factors and line outage distribution factor.
FORMULAE:
[X]=[B’]-1
θ= XP
2. PTDF:
3. LODF:
ALGORITHM:
Step 10: Check any bus voltage outside limit. If yes end the process. If no set l=l+1 and go to Step 8.
53
SYSTEM DATA:
clc
%FROM TO REACTANCE MW LIMIT
linedata=[1 2 0.20 35.0
1 3 0.30 35.0
1 4 0.30 25.0
2 3 0.30 40.0
3 4 0.40 25.0 ];
% sb eb R X Half MW Limit Line Line Gen Power_Shift
% charge outage No Change
busdata=[1 2 0 0.2 0 0.35 0 1 0 1
1 3 0 0.3 0 0.35 0 2 1 0
1 4 0 0.3 0 0.25 0 3 0 0
2 3 0 0.3 0 0.4 0 4 0 0
3 4 0 0.4 0 0.25 0 5 0 0 ];
s = linedata(:,1);
e = linedata(:,2);
54
x = linedata(:,3);
z = 1i*x;
y = 1./z;
nbus = max(max(busdata(:,1)),max(busdata(:,2))) %no of bus
nl = max(e)+1; %no of lines
Y = zeros(nbus,nbus);
for k = 1:nl
Y(s(k),s(k))= Y(s(k),s(k))+y(k);
Y(e(k),e(k))= Y(e(k),e(k))+y(k);
Y(s(k),e(k)) = Y(s(k),e(k))- y(k);
Y(e(k),s(k)) = Y(e(k),s(k))-y(k);
end
sb=busdata(:,1);
eb=busdata(:,2);
L=busdata(:,6); %MW Limit
Gsh=busdata(:,9); %Gen Change
ne=length(busdata(:,1));%number of branches in system
ns=max(linedata(:,1));
type= linedata(:,2);
pv=find(type==2|type==3);
slackbus=min(sb);
P=[ 0.30;-0.30;-0.30];
%B prime
bp= -B;
bp(slackbus,:) = [];
bp(:,slackbus) = [];
bp
X= inv(bp)
del= X*P
for i=1:length(sb)
n=sb(i);
m=eb(i);
Pline(i)=(del(n)-del(m))/x(i)*100;
end
Pline
Xd=zeros(nbus,nbus);
for i=2:nbus
for k=2:nbus
Xd(i,k)=Xd(i,k)+X(i-1,k-1);
55
end
end
Xd
b=1./x
ptdf=zeros(ne,ne); %PTDF
for i=1:ne
for k=1:ne
ptdf(i,k)=b(i)*((Xd(sb(i),sb(k))- Xd(sb(i),eb(k)))-(Xd(eb(i),sb(k))-Xd(eb(i),eb(k))));
end
end
ptdf
lodf=zeros(ne,ne); %LODF
for i=1:ne
for k=1:ne
lodf(i,k) = ptdf(i,k)/(1-b(k)*((Xd(sb(k),sb(k))-Xd(sb(k),eb(k)))-(Xd(eb(k),sb(k))-Xd(eb(k),eb(k)))));
end
end
for i=1:ne
lodf(i,i)=-1;
end
lodf
%change in flow with putage of line 1-2
cif= zeros(ne,1);
cif= Pline(1,1)*lodf(:,1)
net_flow= zeros(ne,1);
net_flow(1,1)=0;
net_flow(2,1)=Pline(1,2)+cif(2,1);
net_flow(3,1)=Pline(1,3)+cif(3,1);
net_flow(4,1)=Pline(1,4)+cif(4,1);
net_flow(5,1)=Pline(1,5)+cif(5,1);
net_flow
if(net_flow>linedata(:,4))
fprintf('There is a limit violation');
else
fprintf('There is no limit violation');
end
%Limit violation in the line 3-4
df=linedata(5,4)-net_flow(5,1);
dP14=df/(-ptdf(5,3))+ptdf(5,4)*lodf(5,1)
fprintf('amount of gen reduced= 3.3558');
OUTPUT:
Ybus
56
B Prime
Del
0.0177
-0.0456
-0.0710
Pline =
PTDF
LODF
57
0.3000 0.4167 0.0000 0.3000 1.0000
Net Flow
0.0000
9.0050
21.0117
29.9500
9.0050
dP14 = -47.2805
RESULT:
A MATLAB program to perform contingency analysis for Generator shift factors and line outage distribution
factor is coded and output is verified.
58
EX.No 11
DIGITAL OVER CURRENT RELAY SETTING AND RELAY COORDINATION
AIM:
To study about over current relay setting and relay co-ordination using MATLAB software.
SOFTWARE USED:
MATLAB
THEORY:
In an over current relay or o/c relay the actuating quantity is only current. There is only one current operated
element in the relay, no voltage coil etc. are required to construct this protective relay.
In an over current relay, there would be essentially a current coil. When normal current flows through this
coil, the magnetic effect generated by the coil is not sufficient to move the moving element of the relay, as in this
condition the restraining force is greater than deflecting force. But when the current through the coil increases,
the magnetic effect increases, and after a certain level of current, the deflecting force generated by the magnetic
effect of the coil, crosses the restraining force. As a result, the moving element starts moving to change the
contact position in the relay. Although there are different types of overcurrent relays but basic working principle
of overcurrent relay is more or less same for all.
Depending upon time of operation, there are various types of Over Current relays, such as,
Inverse time over current relay or simply inverse OC relay is again subdivided as inverse definite minimum
time (IDMT), very inverse time, extremely inverse time over current relay or OC relay.
Construction and working principle of instantaneous over current relay is quite simple. Here generally
a magnetic core is wound by a current coil. A piece of iron is so fitted by hinge support and restraining spring in
the relay, that when there is not sufficient current in the coil, the NO contacts remain open. When the current in
the coil crosses a pre-set value, the attractive force becomes enough to pull the iron piece towards the magnetic
core, and consequently, the no contacts get closed.
We refer the pre-set value of current in the relay coil as pickup setting current. This relay is referred as
instantaneous over current relay, as ideally, the relay operates as soon as the current in the coil gets higher than
pick upsetting current. There is no intentional time delay applied. But there is always an inherent time delay
59
which we cannot avoid practically. In practice, the operating time of an instantaneous relay is of the order of a
few milliseconds.
RELAY CO-ORDINATION:
The relay co-ordination is nothing but a tripping of protecting relay in a sequence or order in electrical
power system. Relay coordination is very difficult task for relay engineers. Relay co- ordination is required to
isolate the faulty part with minimized relay & circuit breaker operation.
All the substation relays current, voltage setting and time setting values will be noted and tabulated.
Check the current setting and operating time of the relay which is associated with the fault. i.e. if you are
coordinating for earth fault means, you should consider all the earth fault setting. Adjust the setting i.e. the
substation D should have minimum operating time and current or voltage setting. Then only substation D
operates. If the value is higher than the remaining substation, the substation D relay does not operate under fault
60
condition. The coordinated setting values would be substation A > Substation B > substation C > Substation D.
Also, the setting value of substation should not be exceeded its safe limit.
PROGRAM:
secondary_of_ct= 5; plug_setting_R1= 1;
plug_setting_R2= 1.25;
TSM_R1= 0.3;
TSM_R2= 1;
Relay_current_setting_R1= plug_setting_R1*secondary_of_ct;
Relay_current_setting_R2= plug_setting_R2*secondary_of_ct;
CT_secondary_current= fault_current*(secondary_of_ct/primary_of_ct);
PSM_R1=(CT_secondary_current/Relay_current_setting_R1);
PSM_R2=(CT_secondary_current/Relay_current_setting_R2);
STANDARD INVERSE')
T1=TSM_R1*(0.14/((PSM_R1)^0.02-1))
t2=TSM_R2*(0.14/((PSM_R2)^0.02-1));
T2=T1+Time_margin
T1=TSM_R1*(13.5/(PSM_R1-1))
t2=TSM_R2*(13.5/(PSM_R2-1));
TSM_R2*(80/((PSM_R2)^2-1));
61
T2=T1+Time_margin TMS_R2= T2/t2 end if
T1=TSM_R1*(120/(PSM_R1-1))
t2=TSM_R2*(120/(PSM_R2-1));
T2=T1+Time_margin
OUTPUT:
enter no1
T1 = 1.2839
T2 =1.7839
TMS_R2 = 0.3582
enter no2
VERY INVERSE
T1 = 1.0125
T2 = 1.5125
TMS_R2 = 0.3361
enter no3
EXTREMELY INVERSE
T1 = 1
T2 =1.5000
TMS_R2 = 0.2813
enter no4
T1 =9
62
T2 = 9.5000
TMS_R2 = 0.2375
RESULT: MATLAB software is used to design and study over current relay setting and relay coordination
63