You are on page 1of 28

EXPERIMENT-1

1.Aim of the experiment:-


To develop a Y-Bus (Admittance) matrix for a given N-bus Power System.
2. Problem Statement:-
To develop a Y-Bus matrix for a given 4-bus Power System.

3.THEORY:-
Admittance is defined as reciprocal of impedance.
i.e., y=1/z.

1
Applying KCL at each bus
I1=y10V1+y12(V1-V2)+y13(V1-V3) ……….1
I2=y20V2+y12(V2-V1)+y23(V2-V3) ……….2
0=y13(V3-V1)+y23(V3-V2)+y34(V3-V4) ………..3
0=y34(V4-V3) ………..4
After rearranging the above equation we get,
I1=V1(y10+y12+y13)-y12V2-y13V3
I2=-y12V1+(y20+y12+y23)V2-y23V3
0=-y13V1-y23V2+(y13+y23+y34)V3-y34V4
0=y34V4-y34V
As, I=Y*V

y10+y12+y13 -y12 -y13 0


Y=
-y12 Y20+y12+y23 -y23 0

-y13 -y23 y13+y23+y34 -y34

0 0 -y34 y43

4. Pseudo Code:-
Step 1:- Read the values of number of buses and the number of lines of the
givensystem.
Step 2:-Read the self-admittance of each bus and the mutual admittance between
the buses.
Step 3:-Calculate the diagonal element term called the bus driving point
admittance, Yij ,which is the sum of the admittance connected to bus i.
Step 4:- The off-diagonal term called the transfer admittance Y ij, which is the
negativeof the admittance connected from bus i to bus j.
Step 5:-Check for the end of bus count and print the computed Y-bus matrix.

2
Step 6:-Compute the Y-bus matrix by inverting the Z-bus matrix.
Step 7:-Stop the program and print the results.
5. MATLAB CODE:-
clc;
clear all;
close all
% Y-BUS
A=[0 1 0 1;0 2 0 0.8;1 2 0 0.4;1 3 0 0.2;2 3 0 0.2;3 4 0 0.08];
c1=A(:,1);
c2=A(:,2);
R=A(:,3);
X=A(:,4);
z=R+j*X;
nor=length(A(:,1));
nbus=max(max(c1),max(c2));
y=ones(nor,1)./z;
Y=zeros(nbus,nbus);
for k=1:nor
if c1(k)>0 & c2(k)>0
Y(c1(k),c2(k))=Y(c1(k),c2(k))-y(k);
Y(c2(k),c1(k))=Y(c1(k),c2(k));
end
end
for n=1:nbus
for k=1:nor

3
if c1(k)==n | c2(k)==n
Y(n,n)=Y(n,n)+y(k)
else
end
end
end

6.OUTPUT:-
Y=
0.0000-8.5000i 0.0000+2.5000i 0.0000+5.0000i 0.0000+0.0000i
0.0000+2.5000i 0.0000-8.7500i 0.0000+5.0000i 0.0000+0.0000i
0.0000+5.0000i 0.0000+5.0000i 0.0000-22.5000i 0.0000+12.5000i
0.0000+0.0000i 0.0000+0.0000i 0.0000+12.5000i 0.0000-12.5000i
7.Conclusion:-
The Y-Bus(Admittance matrix) for the given 4-Bus Power System in the problem
was formed by using MATLAB.

4
EXPERIMENT-2
1. Aim of the experiment:-
To find the optimal scheduling of three thermal plants by using economic load
dispatch neglecting losses and generating limits.
2. Problem Statement:-
The fuel costsfunction for three thermal plants in $/hr are given by:-
C1=500+5.3P1+0.004P12
C2=400+5.5P2+0.006P22
C3=200+5.8P3+0.009P32
Where P1, P2 and P3 are in MW.
Total load is 800MW. Neglecting line losses and generator limits find the optimal
dispatch
3.THEORY:-
The Load sharing of total load among the existing different generating stations
economically is economic load dispatch.
Cost Equation can be expressed as,
Ci=αi+βiPi+γiPi2 -------- 1
Where Pi=Generating Power
Ci=Cost
dC i
The incremental cost is expressed as λ = d P i

λ− β i
P i= 2 γ i ---------
2
n

ΔP = PD - ∑ P i --------- 3
i=1

Where PD = total power demand


ΔP = difference between total power generated and power demand

5
ΔP
n
Δλ = ------- 4
∑ 21γ i
i=1

Constraint to be satisfied is,


Total Power Generated = Total Power Demand i.e. ΔP = 0
4.Pseudo Code:-
Step-1- Assume any value of incremental fuel cost (lambda) and total power
demand (P_d).
Step-2- Initialize the value of operating efficiency (alpha), coefficients associated
with fuel cost and transmission losses beta and gamma respectively for three plants
in an array.
Step-3- While change in power (delta_p) is greater than or equal to 0.001
(i.) Pi= ((lambda-beta))./(2.*gamma));
delta_p=P_d-sum(Pi)
delta_lambda=(delta_p./sum(A));
lambda=lamda+delta_lambda;
(ii.) Print the values of delta_lambda, delta_p,lambda and Pi.
(iii.) Repeat step 3 till delta_p is less than 0.001.
5. MATLAB CODE:-
clc;
clear all;
close all;
lamda=input('enter the lamda value-');
alpha=[500 400 200];
beta=[5.3 5.5 5.8];
gamma=[0.004 0.006 0.009];
A=[1./0.008 1./0.012 1./0.018];

6
P_d=input('enter total load:-');
delta_p=0.001;
i=[0];
j=[1];
P=((lamda-beta)./(2.*gamma));
delta_p=P_d-sum(P);
delta_lamda=(delta_p./sum(A));
lamda=lamda+delta_lamda;
fprintf('iteration no:-%d\n',j);
j=j+1;
fprintf('P:-%f\n',P);
fprintf('delta p:-%f\n',delta_p);
fprintf('delta lamda:-%f\n',delta_lamda);
fprintf('lamda:-%f\n',lamda);
end
6. OUTPUT:-
enter the lamda value-6
enter total load:-800
iteration no:-2
P:-400.000000
P:-250.000000
P:-150.000000
delta_p:-0.000000
delta_lamda:-0.000000

7
7. Conclusion:-
In this experiment, the optimal scheduling of three thermal generating plants using
economic load dispatch neglecting losses and generating limits was found out in a
rather easier way by using iterative technique. This gave more accurate results and
took comparatively less time than what a manual calculation would require.

8
EXPERIMENT-3
1. Aim of the experiment:-
To find the optimal scheduling of three thermal plants by using economic load
dispatch neglecting losses and including generating limits.
2. Problem statement:-
The fuel costs function for three thermal plants in $/hr are given by:-
C1=500+5.3P1+0.004P12
C2=400+5.5P2+0.006P22
C3=200+5.8P3+0.009P32
Where P1, P2 and P3 are in MW.
The generating limits are:-
200<≤P1≤450
150≤P2≤350
100≤P3≤225
Total load is 975MW. Neglecting line losses and including generator limits find
the optimal dispatch
3.THEORY:-
The Load sharing of total load among the existing different generating stations
economically is economic load dispatch.
The power output of any generator should not exceed its rating nor should it be
below that necessary for stable operation.
Cost Equation can be expressed as,
Ci=αi+βiPi+γiPi2 -------- 1
Where Pi=Generating Power
9
Ci=Cost
dC i
The incremental cost is expressed as λ = d P i

λ− β i
P i= 2 γ i ---------
2
n

ΔP = PD - ∑ P i --------- 3
i=1

Where PD = total power demand


ΔP = difference between total power generated and power demand
ΔP
n
Δλ = ------- 4
∑ 21γ i
i=1

Constraint to be satisfied is,


Total Power Generated = Total Power Demand i.e. ΔP = 0
Pi(min)<=Pi<=Pi(max)
if Pi>Pi(max) make Pi=Pi(max)
if Pi<Pi(min) make Pi=Pi(min)
4.Pseudo Code:-
Step-1- Assume any value of incremental fuel cost (lambda) and total power
demand (P_d).
Step-2- Initialize the value of operating efficiency (alpha), coefficients associated
with fuel cost and transmission losses beta and gamma respectively for three plants
in an array.
Step-3- While change in power (delta_p) is greater than or equal to 0.001
(i.) Pi= ((lambda-beta))./(2.*gamma));
delta_p=P_d-sum(Pi)
delta_lambda=(delta_p./sum(A));
lambda=lamda+delta_lambda;

10
(ii.) Print the values of delta_lambda, delta_p, lambda and Pi.
(iii.) if P is greater than max limit P=Pmax else P=Pmin
( iv.) Repeat step 3 till delta_p is less than 0.001.

5. MATLAB CODE:-
clc;
clear all;
close all;
lamda=input('enter the lamda value-');
alpha=[500 400 200];
beta=[5.3 5.5 5.8];
gamma=[0.004 0.006 0.009];
A=[1./0.008 1./0.012 1./0.018];
P_d=input('enter total load:-');
delta_p=0.001;
i=[0];
j=[1];
while(delta_p>=0.0001)
P=((lamda-beta)./(2.*gamma));
i=i+1;
if(i>1)
if(P(1)>450) P(1)=450;
elseif(P(1)<200) P(1)=200;
end
if(P(2)>350) P(2)=350;
elseif(P(2)<150) P(2)=150;
11
end
if(P(3)>225) P(3)=225;
elseif(P(3)<100) P(3)=100;
end
end
delta_p=P_d-sum(P);
delta_lamda=(delta_p./sum(A));
lamda=lamda+delta_lamda;
fprintf('iteration no:-%d\n',j);
j=j+1;
fprintf('P:-%f\n',P);
fprintf('delta p:-%f\n',delta_p);
fprintf('delta lamda:-%f\n',delta_lamda);
fprintf('lamda:-%f\n',lamda);
end
6. OUTPUT:-
enter the lamda value-6
enter total load:-800
iteration no:-20
P:-450.000000
P:-324.999972
P:-199.999981
delta_p:-0.000047
delta_lamda:-0.000000
lamda:-9.400000

12
7. Conclusion:-
In this experiment, the optimal scheduling of three thermal generating plants using
economic load dispatch neglecting losses and including generating limits was
found out in a rather easier way by using iterative technique. This gave more
accurate results and took comparatively less time than what a manual calculation
would require.

13
EXPERIMENT-4
1.Aim of the experiment:-
Economic load dispatch with loss and with generation limit.
2.Problem Statement.
Determine the optimal power generation schedule for the generating units with
following fuel cost functions, alongwith the generation limits:
F1 = 510 + 7.2P1 + 0.00142 P21 ; 150 MW ≤ P1 ≤ 600 MW
F2 = 310 + 7.85P2 + 0.00194 P22 ; 100 MW ≤ P2 ≤ 400 MW
F3 = 78 + 7.97P3 + 0.00482 P23 ; 50 MW ≤ P1 ≤ 200 MW
where the losses are neglected with a load demand of 850 MW and loss in the
system is
PL = 0.00003 P21 + 0.00009 P22 + 0.00012 P23.
3.Theory:-
Cost Equation can be expressed as,
Ci=αi+βiPi+γiPi2 -------- 1
Where Pi=Generating Power
Ci=Cost
According to Kron’s formula,the transmission loss can be expressed as:-
n n

PL=∑ ∑ PiBijPj
i=1 j=1

Where,
N=no. of generating station.

For a system with losses present, the equations get modified as follows
λ−β i
Pi = 2(γ + λ B )
i ii

14
∆P
∆λ= γ +B
∑ 12 × ( γ +i λ Bii )2
i ii

Constraints are,
PG = P D + P L
1
( 1−
∂P. L
∂ Pi
)* ∂ Ci
∂ Pi

Where, λ=incremental fuel cost


4. .Pseudo Code:-
Step-1:-enter the value of lambda and initialize values of α as x, β as y, γ as z and
coefficients of loss equation as B.
Step-2:- A=(1/2)*((z+(y.*B))./((z+L.*B).^2))
STEP-3:-initialize the value of PD and set dP=0.001,i=0,j=1,count=0.
STEP-4:- while(dP>=0.0001)
1.P=(L-y)./(2*(z+L.*B));
i=i+1;
2. if(i>1)
if(P(1)>600) P(1)=600;
elseif(P(1)<150) P(1)=150;

if(P(2)>400) P(2)=400;
elseif(P(2)<100) P(2)=100;

if(P(3)>200) P(3)=200;
elseif(P(3)<50) P(3)=50;

3. PL=B.*(P.^2);
dP=PD+sum(PL)-sum(P);
4.dL=(dP/sum(A));
5. L=L+dL;
j=j+1;
count=count+1;
6.Repeat step-3
Step-4:-Print values L=lambda,P=power generated and F=total cost
5. MATLAB Code:-
clc;
clear all;
close all;

15
L=input('Enter Lambda Value: ');
x=[510;310;78];
y=[7.2;7.85;7.97];
z=[0.00142;0.00194;0.00482];
c=[0.9;1.0;1.0];
B=[0.00003;0.00009;0.00012];
x=x.*c;
y=y.*c;
z=z.*c;
A=(1/2)*((z+(y.*B))./((z+L.*B).^2));
PD=850;
dP=0.001;
i=[0];
j=[1];
count=0;
while(dP>=0.0001)
P=(L-y)./(2*(z+L.*B));
i=i+1;
if(i>1)
if(P(1)>600) P(1)=600;
elseif(P(1)<150) P(1)=150;
end
if(P(2)>400) P(2)=400;
elseif(P(2)<100) P(2)=100;
end
if(P(3)>200) P(3)=200;
elseif(P(3)<50) P(3)=50;
end
end
PL=B.*(P.^2);
dP=PD+sum(PL)-sum(P);
dL=(dP/sum(A));
L=L+dL;
j=j+1;
count=count+1;
end
F=x+(y.*P)+(z.*P.*P);
F=sum(F);
L
P
16
count
F
6.OUTPUT:-
Enter Lambda Value: 8

L=

8.8775

P=

600.0000
187.5776
77.1024

count =

27

F=

7.3790e+03

7.Conclusion:-
From this experiment, we conclude that, we can calculate the optimal generating
schedule for a power system containing ‘n’ number of generators, for given
generating limits and the loss function for the system, for respective generating
units, and fixed load demand, using Lagrangian function and incremental fuel cost.

17
EXPERIMENT-5
1. Aim of the experiment:-
To find the optimal scheduling and minimum cost of generation of two thermal
plants by using economic load dispatch neglecting losses and generating limits in
which the total power demand for two plants varies every hour in 1 day(24 hours).
2. Problem Statement:-
Assume that the fuel input for two units are given by:-
F1=80+8P1+0.024P12
F2=120+6P1+0.04P22
P1 and P2 are in MW.
The minimum and maximum loads on the units are 10MW and 100 MW
respectively. Determine the minimum cost of generation when the following load
is supplied with cost of the fuel is Rs. 20/hr.
Hours of Day Load in MW
1 50
2 40
3 50
4 50
5 50
6 40
7 60
8 70
9 70
10 80
11 80
12 100
13 100

18
14 100
15 60
16 60
17 60
18 60
19 80
20 80
21 50
22 50
23 50
24 50

3.THEORY:-
The Load sharing of total load among the existing different generating stations
economically is economic load dispatch.
Cost Equation can be expressed as,
Ci=αi+βiPi+γiPi2 -------- 1
Where Pi=Generating Power
Ci=Cost
dC i
The incremental cost is expressed as λ = d P i

λ− β i
P i= 2 γ i ---------
2
n

ΔP = PD - ∑ P i --------- 3
i=1

Where PD = total power demand


ΔP = difference between total power generated and power demand
ΔP
n
Δλ = ------- 4
∑ 21γ i
i=1

Constraint to be satisfied is,

19
Total Power Generated = Total Power Demand i.e. ΔP = 0
Pi(min)<=Pi<=Pi(max)
if Pi>Pi(max) make Pi=Pi(max)
if Pi<Pi(min) make Pi=Pi(min)
Total cost can be calculated by,
n

Ctotal=∑ C i
i=1

Where, n=no. of generating station.


4. Pseudo code:-
Step-1- Assume any value of incremental fuel cost (lambda) and the total power
demand (P_d) should be entered in an array as P_d varies every hour.
Step-2- Initialize the value of operating efficiency (alpha), coefficients associated
with fuel cost and transmission losses beta and gamma respectively for two units in
an array. Initialize first hour (i=1).
Step-3- While time (i) <=24
(i.) A=[0.08,-0.048;1,1];
B=[2;P_D(i)];
X=inv(A)*B
P1(1,i)=X(1,1);
P2(1,i)=X(2,1);
i=i+1;

(ii.) Print the values of P1 and P2.


(iii.) F1=(8.*P1+0.024.*(P1.^2)+80)
F2=(6.*P2+0.04.*(P2.^2)+120)
Sum1=sum(F1).*20
Sum2=sum(F2).*20

(iv.) Print the cost for units 1 and 2 every hour and plot a graph between
(P1,time(hrs.)),(P2,time(hrs.)) and (P_d, time(hrs.)).

5. MATLAB CODE:-

20
clc;
clear all;
close all;
lamda=input('enter the lamda value-');
alpha=[80 120];
beta=[8 6];
gamma=[0.024 0.04];
m=[1:24];
P_D=[50,40,50,50,50,40,60,70,70,80,80,100,100,100,60,60,60,60,80,80,50,50,50,5
0];
P1=zeros(1,24);
P2=zeros(1,24);
i=1;
while(i<=24)
A=[0.08,-0.048;1,1];
B=[2;P_D(i)];
X=inv(A)*B
P1(1,i)=X(1,1);
P2(1,i)=X(2,1);
i=i+1;
end
P1
P2
F1=(8.*P1+0.024.*(P1.^2)+80)
F2=(6.*P2+0.04.*(P2.^2)+120)
Sum1=sum(F1).*20

21
Sum2=sum(F2).*20
plot(m,P1)
hold on
plot(m,P2)
hold on
plot(m,P_D)

6. OUTPUT:-

7. Conclusion:-
In this experiment, the optimal scheduling and minimum cost of two thermal units
using economic load dispatch neglecting losses and generating limits was found
out in a rather easier way by considering the load demand to be variable every
hour. This gave more accurate results and took comparatively less time than what a
manual calculation would require.

22
EXPERIMENT-6
1.Aim of the experiment:-
Develop a code for load flow analysis using Gauss-seidel technique.
2.Problem Statement:-
Busno Type V angle Pgen Qgen Ploss Qloss Qmin Qmax min max
.
1 1 1 0 0 0 0 0 0 0 0 0
2 2 1 0 50 0 0 0 -500 +500 0 0
3 2 1 0 100 0 0 0 -500 +500 0 0
4 3 1 0 0 0 115 60 -500 +500 0 0
5 3 1 0 0 0 85 40 -500 +500 sum 0

Perform Load-flow analysis using Gauss-seidel method for above bus data.
3.Theory:-
If we want to represent the bus admittance in term of bus admittance matrix then
the voltage equation can be expressed as
n
Pi− jQi
Vi= V i∗(k ) ∑
+ Y ij V j k
j=1 ………1
Y ii

From equation 7 we can calculate the Pi=net real power in p.u and Qi=net reactive
power in p.u value as

23
n

Pi (k+1)
=R[ Vi *(k)
[Vi Yii –∑ Y ij Vjk ]
(k+1)
……….2
j=1

n
Qi(k+1) = -QI[Vi*(k) [Vi(k+1)Yii –∑ Y ij Vjk ] ………..3
j=1

Since both components of voltage are specified for the slack bus there are 2(n-1)
n=no of bus
by iterative method
For the Gauss sedal method,an initial voltage of the bus can be assumed as (1+j0)
pu(1<0)
For PQ buses,the real and reactive power
Starting with an initial estimate eq-(7) is to be solved to calculate the unknown
parameters
For the voltage controlled bus(PV bus) where Pisch & |Vi | are specified,first we
have to calculate Qi(k+1) from eq-9 and then we have to calculate Qi(k+1) from eq-9 &
then calculate Vi(k+1) by using eq-7
Let voltage of bus i can be represent as
[Vi]2 =[ei(k+1) ]2 +[ fi(k+1)]2 …………………4
Where ei(k+1) and fi(k+1) are the real power and reactive components of it's voltage
Vi(k+1) in iterative sequence
The rate of convergence is increased by applying an acceleration factor to the
approximate solution obtained from each iteration.
Vi(k+1) = Vi(k) + α[Vicalk-Vik] …………………5
Where α is acceleration factor, it's value depends upon the system the range of α is
between 1.3 to 1.7
The process is continued until the changes in real and imaginary bus component of
bus voltages between successive iteration are within a specified accuracy.
Constraints ei(k+1)-ei(k) <= €

4.Pseudo code:-

24
Step-1:-text read bus data from gslfdata1 and call the ybus1 function.
Step-2:-initialise e=1
Step-3:- while e>10E-12
1-for i=2 to no.of buses
initialize sumyv=1
for k=1 to no. of buses
if (i~=k)
sumyv=sumyv+(ybus(i,k)*v(k));

2.if (type(i)==2)//if it is a PV bus


Q(i)=-imag(conj(v(i))*(sumyv+ybus(i,i)*v(i)));//find reactive power
if (Q(i)>qmax(i)||Q(i)<qmin(i))
if (Q(i)>qmax(i))
Q(i)=qmax(i);
else
Q(i)=qmin(i);

3.type(i)=3;
v(i)=(1/ybus(i,i))*(((P(i)-j*Q(i))/conj(v(i)))-sumyv);
if (type(i)==2)
v(i)=abs(vprev(i))*cos(angle(v(i)))+j*(abs(vprev(i))*sin(angle(v(i))));

4.e=max(abs(abs(v)-abs(vprev)));
vprev=v;
itr=itr+1;
itr
5. Repeat step-3.
5.Matlab code:-
gslfdata1:-
1 1 1 0 0 0 0 0 0 0 0 0
2 2 1 0 50 0 0 0 -500 500 0 0
3 2 1 0 100 0 0 0 -500 500 0 0
4 3 1 0 0 0 115 60 -500 500 0 0
5 3 1 0 0 0 85 40 -500 500 0 0

close all
clear all

25
clc
bdata=textread('gslfdata1.m');
bno=bdata(:,1);
type=bdata(:,2);
v=bdata(:,3)
theta=bdata(:,4)*(pi/180);
pg=bdata(:,5);
qg=bdata(:,6);
pl=bdata(:,7);
ql=bdata(:,8);
nob=max(bno);
qmin=bdata(:,9)/100;
qmax=bdata(:,10)/100;
P=(pg-pl)/100;
Q=(qg-ql)/100;
ybus=ybus2
itr=0;
vprev=v;
e=1;
while(e>10E-12)
for i=2:nob
sumyv=0;
for k=1:nob
if (i~=k)
sumyv=sumyv+(ybus(i,k)*v(k));
end
end
if (type(i)==2)
Q(i)=-imag(conj(v(i))*(sumyv+ybus(i,i)*v(i)));
if (Q(i)>qmax(i)||Q(i)<qmin(i))
if (Q(i)>qmax(i))
Q(i)=qmax(i);
else
Q(i)=qmin(i);
end
type(i)=3;
end
end
v(i)=(1/ybus(i,i))*(((P(i)-j*Q(i))/conj(v(i)))-sumyv);
if (type(i)==2)
26
v(i)=abs(vprev(i))*cos(angle(v(i)))+j*(abs(vprev(i))*sin(angle(v(i))));
end
e=max(abs(abs(v)-abs(vprev)));
vprev=v;
end
itr=itr+1;
itr
end
Vmag=abs(v)
Theta=angle(v)*(180/pi)
sum=0;
for k=1:nob
if(k~=1)
sum=sum+(ybus(1,k)*v(k));
end
end
P(1,1)=real(conj(v(1))*(sum+(ybus(1,1))*v(1)));
Q(1,1)=-imag(conj(v(1))*(sum+(ybus(1,1))*v(1)));
P
Q
6.OUTPUT:-
Vmag =
1.0000
1.0000
1.0000
0.9554
0.9538
Theta =
0
3.2705
3.2693
-1.9069
-48.2686

27
P=
-0.4278
0.5000
1.0000
-1.1500
-0.8500
Q=
1.0122
1.2500
0.0081
-0.6000
-0.4000
7.CONCLUSION:-
The Load flow analysis using Gauss-siedel method for the given 5-Bus Power
System in the problem was formed by using MATLAB

28

You might also like