DR. B. R.
AMBEDKAR NATIONAL INSTITUTE
OF TECHNOLOGY, JALANDHAR
Power System Operation and Control
Laboratory
COURSE CODE: EEPC-421
SUBMITTED BY:
NAME: KAMBLE SAURAV BAPUDEV
ROLL NO: 20126031
DEPARTMENT: ELECTRICAL ENGINEERING (7TH SEMESTER)
SUBMITTED TO:
DR. NAVIN KUMAR NANDAN
DEPARTMENT: ELECTRICAL ENGINEERING (NITJ)
1 Economic dispatch problem
for three generator system
using iterative method
neglecting losses and
generator limits
2 Economic dispatch problem for
three generator system using
iterative method neglecting losses
and including generator limits.
3 Economic dispatch problem for
three generator system using
iterative method with losses and
neglecting generator limits.
4 Economic dispatch problem
for three generator system
using iterative method with
losses and including
generator limits
5 Numerical Solution of Hydrothermal
Scheduling without inflow and without
loss
6 Numerical Solution of Hydrothermal
Scheduling with inflow and without
loss
7 Numerical Solution of
Hydrothermal Scheduling
without inflow and with
loss.
8 Numerical Solution of Hydrothermal
Scheduling with inflow and with loss.
EXPERIMENT-1
AIM: To develop a MATLAB program to solve Economic dispatch problem for three
generator system using iterative method neglecting losses and generator limits.
Brief Theory:
Economic Load Dispatch (ELD) is a critical optimization problem in power systems that
aims to allocate the generation output of power plants to meet the demand while
minimizing operational costs. It ensures efficient utilization of available generation
resources by determining the optimal power output for each generator, considering
factors like fuel costs, transmission losses, and operational constraints.
The ELD problem can be mathematically formulated as a nonlinear constrained
optimization task. Various techniques, such as gradient-based methods, evolutionary
algorithms, and metaheuristic approaches, are employed to solve it. Solutions to ELD
provide guidelines for power plant operators to adjust generation levels in real-time to
achieve economic efficiency and grid stability.
In modern power systems, ELD plays a pivotal role in achieving cost-effective and
reliable electricity supply. With the integration of renewable energy sources, the ELD
problem becomes even more complex, requiring innovative algorithms to
accommodate the variability and intermittency of these sources while maintaining
economic operation.
MATLAB Code:
columnName = {'uno', 'a', 'b', 'd', 'pmin', 'pmax'};
costdata =[ 1 400 8.4 0.006;
2 600 8.93 0.0042;
3 650 6.78 0.004];
ng = length (costdata(:,1));
for i = 1:ng
uno(i) = costdata (i,1);
a(i) = costdata (i,2);
b(i) = costdata (i,3);
d(i) = costdata (i,4);
end
lambda = 9.0;
pd = 550 ;
delp = 0.1;
dellambda = 0;
iter = 0 ;
while(abs(delp)> 0.001)
iter = iter + 1 ;
lambda = lambda + dellambda;
sum =0;
totgam=0;
for i = 1:ng
p(i) = (lambda-b(i))/(2*d(i));
sum = sum + p(i);
totgam = totgam + 0.5*(1/d(i));
ifc(i) = lambda ;
end
delp = pd-sum ;
dellambda = delp/totgam;
end
totgencost = 0;
for i = 1:ng
totgencost = totgencost + (a(i) + b(i)*p(i) + d(i)*p(i)*p(i));
end
disp('OUTPUT OF MATLAB PROGRAM dispatch1.m');
lambda
disp ('GENERATING UNIT OPTIMAL GENERATION (MW)');
[uno; p ]'
disp('INCREMENTAL FUEL COST');
ifc(1)
disp('TOTAL GENERATION COST');
totgencost
RESULTS:
OUTPUT OF MATLAB PROGRAM dispatch1.m
Lambda:
9.6542
GENERATING UNIT OPTIMAL GENERATION(MW)
1.0000 104.5152
2.0000 86.2121
3.0000 359.2727
INCREMENTAL FUEL COST(Rs./MWhr)
9.6542
TOTAL GENERATION COST(Rs./hr)
6.3467e+03
EXPERIMENT-2
AIM: To develop a MATLAB program to solve Economic dispatch problem for three
generator system using iterative method neglecting losses and including generator
limits.
Brief Theory:
The output power of any generator should neither exceed its rating nor should it be below
that necessary for the stable operation of a boiler. Thus, the generations are restricted to lie
within given minimum and maximum limits. The problem is to find the active power
generation of each plant such that the objective function (i.e., total production cost) is
minimum, subject to the equality constraint, and the inequality constraints are respectively.
If any generating unit violates the above inequality constraints, set its generation at its
respective limit as given below. In addition, the balance of the load is then shared between
the remaining units on the basis of equal incremental cost. The necessary conditions for
optimal dispatch when losses are neglected:
FLOWCHART:
MATLAB Code:
columnName = {'uno', 'a', 'b', 'd', 'pmin', 'pmax'};
cost_data = [1 400 8.4 0.006 100 600;
2 600 8.93 0.0042 60 300;
3 650 6.78 0.004 300 650];
ng = length(cost_data(:,1));
uno = zeros(1, ng);
a = zeros(1, ng);
b = zeros(1, ng);
d = zeros(1, ng);
pmin = zeros(1, ng);
pmax = zeros(1, ng);
for i = 1:ng
uno(i) = cost_data(i, 1);
a(i) = cost_data(i, 2);
b(i) = cost_data(i, 3);
d(i) = cost_data(i, 4);
pmin(i) = cost_data(i, 5);
pmax(i) = cost_data(i, 6);
end
lambda = 9.0;
pd = 550;
delp = 0.1;
dellambda = 0;
pv = zeros(1, ng);
pvfin = zeros(1, ng);
p = zeros(1, ng);
while abs(delp) >= 0.0001
lambda = lambda + dellambda;
sum = 0;
totgam = 0;
for i = 1:ng
p(i) = (lambda - b(i)) / (2 * d(i));
sum = sum + p(i);
totgam = totgam + 0.5 * (1 / d(i));
end
delp = pd - sum;
dellambda = delp / totgam;
end
limvio = 0;
for i = 1:ng
if p(i) < pmin(i) || p(i) > pmax(i)
limvio = 1;
break;
end
end
if limvio == 0
disp('GENERATION IS WITHIN THE LIMITS');
else
disp('GENERATION IS NOT WITHIN THE LIMITS');
disp('VIOLATED GENERATOR NUMBER');
if p(i) < pmin(i)
disp('GENERATION OF VIOLATED UNIT (MW)');
disp(p(i));
disp('CORRESPONDING VIOLATED LIMIT IS pmin');
elseif p(i) > pmax(i)
disp('GENERATION OF VIOLATED UNIT (MW)');
disp(p(i));
disp('CORRESPONDING VIOLATED LIMIT IS pmax');
end
% Adjust and recalculate
loprep = 1;
while abs(delp) >= 0.01 && loprep == 1
sum = 0;
totgam = 0;
for i = 1:ng
pv(i) = 0;
end
for i = 1:ng
if p(i) < pmin(i) || p(i) > pmax(i)
if p(i) < pmin(i)
p(i) = pmin(i);
else
p(i) = pmax(i);
end
pv(i) = 1;
pvfin(i) = 1;
break;
end
end
for i = 1:ng
sum = sum + p(i);
if pvfin(i) ~= 1
totgam = totgam + 0.5 * (1 / d(i));
end
end
delp = pd - sum;
dellambda = delp / totgam;
lambda = lambda + dellambda;
% Recalculate p(i) for non-violating generators
for i = 1:ng
if pvfin(i) ~= 1
p(i) = (lambda - b(i)) / (2 * d(i));
end
sum = sum + p(i);
end
delp = pd - sum;
loprep = 0;
for i = 1:ng
if p(i) < pmin(i) || p(i) > pmax(i)
loprep = 1;
break;
end
end
end
end
% Total generation cost calculation
totgencost = 0;
for i = 1:ng
totgencost = totgencost + (a(i) + b(i) * p(i) + d(i) * p(i)^2);
end
% Display results
disp('FINAL OUTPUT OF MATLAB PROGRAM dispatch2.m');
disp('Lambda:');
disp(lambda);
disp('GENERATING UNIT OPTIMAL GENERATION(MW)');
disp([uno; p]');
disp('INCREMENTAL FUEL COST(Rs./MWhr)');
disp(lambda);
disp('TOTAL GENERATION COST(Rs./hr)');
disp(totgencost);
RESULTS:
(i) Pd = 550 MW:
GENERATION IS WITHIN THE LIMITS
FINAL OUTPUT OF MATLAB PROGRAM dispatch2.m
Lambda:
9.6542
GENERATING UNIT OPTIMAL GENERATION(MW)
1.0000 104.5152
2.0000 86.2121
3.0000 359.2727
INCREMENTAL FUEL COST(Rs./MWhr)
9.6542
TOTAL GENERATION COST(Rs./hr)
6.3467e+03
(ii) Pd = 1,500 MW:
GENERATION IS NOT WITHIN THE LIMITS
VIOLATED GENERATOR NUMBER = 2
GENERATION OF VIOLATED UNIT (MW) = 431.6667
CORRESPONDING VIOLATED LIMIT IS pmax
GENERATION IS NOT WITHIN THE LIMITS
VIOLATED GENERATOR NUMBER = 3
GENERATION OF VIOLATED UNIT (MW) = 801 CORRESPONDING VIOLATED LIMIT IS pmax
FINAL OUTPUT OF MATLAB PROGRAM dispatch2.m
lambda = 15
EXPERIMENT-3
AIM: To develop a MATLAB program to solve Economic dispatch problem for three
generator system using iterative method with losses and neglecting generator
limits.V
Brief Theory:
The Economic Load Dispatch (ELD) problem focuses on distributing the total power demand among
multiple generators in a way that minimizes the total fuel cost of generation. For a three-generator
system, this involves determining the optimal power output of each generator while considering the
power balance requirement and transmission losses.
The process begins with an initial allocation of power to each generator, ensuring that the total
generation matches the load demand plus transmission losses. Using an iterative approach, the
power outputs are adjusted step by step to minimize costs, ensuring that the incremental cost of all
generators is equal. Transmission losses are calculated using system-specific loss coefficients.
This method does not consider generator limits and aims to achieve cost-effective power generation
while maintaining system constraints.
Flowchart:
MATLAB Code:
clc;clear;
costdata = [1 420 9.2 0.004;
2 350 8.5 0.0029];
lossdata = [0.0346 0.00643];
ng = length(costdata(:,1));
for i = 1:ng
uno(i) = costdata(i,1);
d(i) = costdata(i,2);
b(i) = costdata(i,3);
a(i) = costdata(i,4);
end
pd = 640.82;
lambda = 12;
delp = 0.1;
dellambda = 0;
totgencost = 0;
B(1) = lossdata(1);
B(2) = lossdata(2);
iter = 0;
disp('iter lambda pg1 pg2 ploss');
while (abs(delp) >= 0.001)
iter = iter + 1;
lambda=lambda+dellambda;
pl = 0;
sum = 0;
delpla = 0;
for i = 1:ng
den = 2 * (a(i) + lambda * B(i) * 0.01);
p(i) = (lambda - b(i)) / den;
pl = pl + (B(i) * 0.01 * p(i) * p(i));
sum = sum + p(i);
end
delp = pd + pl - sum;
for i = 1:ng
den = 2*(a(i) + lambda*B(i)*0.01)^2;
delpla = delpla + (a(i) + B(i)*0.01*b(i))/den;
end
dellambda = delp/delpla;
disp([iter, lambda, p(1), p(2), pl]);
end
for i = 1:ng
den = 1-(B(i)*p(i)*2*0.01);
l(i)=1/den;
end
totgencost=0;
for i=1:ng
totgencost = totgencost + (d(i) + p(i) * b(i) + a(i)* p(i)*p(i));
ifc(i) = 2 * a(i) * p(i) + b(i);
end
disp('FINAL OUTPUT OF MATLAB PROGRAM dispatch3.m');
disp(lambda);
disp('GENERATING UNIT OPTIMALGENERATION(MW)');
disp([uno; p]);
disp('INCREMENTAL FUEL COST AND PENALTY FACTORS ARE');
disp('UNIT NO. IFC L');
disp([uno; ifc ; l]);
disp('CHECK LAMBDA = IFC*L');
disp('UNIT NO. LAMBDA');
disp([uno; ifc.*l]);
disp('Total generation cost (Rs./hr) = ');
disp(totgencost);
RESULTS:
iter lambda pg1 pg2 ploss
1.0000 12.0000 171.7370 476.6314 24.8123
2.0000 12.0949 176.8464 488.7452 26.1805
3.0000 12.1027 177.2635 489.7367 26.2940
4.0000 12.1033 177.2972 489.8168 26.3032
5.0000 12.1034 177.2999 489.8232 26.3039
FINAL OUTPUT OF MATLAB PROGRAM dispatch3.m
12.1034
GENERATING UNIT OPTIMALGENERATION(MW)
1.0000 2.0000
177.2999 489.8232
INCREMENTAL FUEL COST AND PENALTY FACTORS ARE
UNIT NO. IFC L
1.0000 2.0000
10.6184 11.3410
1.1398 1.0672
CHECK LAMBDA = IFC*L
UNIT NO. LAMBDA
1.0000 2.0000
12.1034 12.1034
Total generation cost (Rs./hr) =
7.3862e+03
EXPERIMENT-4
AIM: To develop a MATLAB program to solve Economic dispatch problem for three
generator system using iterative method with losses and including generator limits.
Brief Theory:
The Economic Load Dispatch (ELD) problem aims to distribute the load demand among multiple
generators to minimize the total fuel cost while adhering to system constraints. For a three-
generator system, the goal is to determine the optimal power output of each generator while
accounting for transmission losses and generator operating limits.
The iterative method is used to solve the problem by starting with an initial allocation of power to
the generators. Adjustments are made iteratively to balance the incremental cost of generation
across all generators. Transmission losses are included in the calculations using predefined
coefficients. Additionally, generator limits, such as minimum and maximum power output, are
enforced during the optimization process.
This approach ensures that the total generation cost is minimized while meeting the load demand
and maintaining operational constraints on the generators.
MATLAB Code:
clc; clear;
costdata = [1 420 9.2 0.004 100 200;
2 350 8.5 0.0029 150 500];
lossdata = [0.0346 0.00643];
ng = length(costdata(:,1));
for i = 1:ng
uno(i) = costdata(i,1);
d(i) = costdata(i,2);
b(i) = costdata(i,3);
a(i) = costdata(i,4);
pmin(i) = costdata(i,5);
pmax(i) = costdata(i,6);
end
pd = 640.82;
lambda = 12;
delp = 0.1;
dellambda = 0;
totgencost = 0;
for i=1:ng
B(i)=lossdata(1,i);
end
while (abs(delp) >= 0.001)
lambda=lambda+dellambda;
pl = 0;
sum = 0;
delpla = 0;
for i = 1:ng
den = 2 * (a(i) + lambda * B(i) * 0.01);
p(i) = (lambda - b(i)) / den;
pl = pl + (B(i) * 0.01 * p(i) * p(i));
sum = sum + p(i);
end
delp = pd + pl - sum;
for i = 1:ng
den = 2*(a(i) + lambda*B(i)*0.01)^2;
delpla = delpla + (a(i) + B(i)*0.01*b(i))/den;
end
dellambda = delp/delpla;
end
dellambda = 0;
for i = 1:ng
pv(i)=0;
pvfin(i)=0;
end
limvio=0;
for i=1:ng
if p(i)<pmin(i) | p(i)>pmax(i)
limvio=1;
break;
end
end
if limvio == 0
disp('GENERATION IS WITHIN THE LIMITS');
end
delp=0.1;
if limvio == 1
while (abs(delp)>=0.01)
disp('GENERATION IS NOT WITHIN THE LIMITS');
disp('VIOLATED GENERATOR NUMBER');
disp(i);
if p(i)<pmin(i)
disp('GENERATION OF VIOLATED UNIT(MW)');
disp(p(i));
disp('CORRESPONDING VIOLATED LIMIT IS pmin');
elseif p(i)>pmax(i)
disp('GENERATION OF VIOLATED UNIT(MW)');
disp(p(i));
disp('CORRESPONDING VIOLATED LIMIT IS pmax');
end
pl=0;
sum=0;
delpla=0;
for i=1:ng
pv(i)=0;
end
for i=1:ng
if p(i)<pmin(i) | p(i)>pmax(i)
pv(i)=1;
pvfin(i)=1;
if p(i)<pmin(i)
p(i)=pmin(i);
end
if p(i)>pmax(i)
p(i)=pmax(i);
end
end
end
for i=1:ng
if pvfin(i) ~= 1
den = 2*(a(i)+lambda*B(i)*0.01)^2;
delpla=delpla+(a(i)+B(i)*0.01*b(i))/den;
end
sum=sum+p(i);
end
delp = pd+pl-sum;
dellambda = delp/delpla;
lambda = lambda+dellambda;
sum=0;
for i=1:ng
if pvfin(i)~=1
den = 2*(a(i)+lambda*B(i)*0.01);
p(i)=(lambda-b(i))/den;
end
pl = pl+(B(i)*0.01*p(i)*p(i));
sum=sum+p(i);
end
delp = pd+pl-sum;
end
end
for i=1:ng
den = 1-(B(i)*p(i)*2*0.01);
l(i)=1/den;
end
totgencost=0;
for i=1:ng
totgencost = totgencost + (d(i) + p(i) * b(i) + a(i)* p(i)*p(i));
ifc(i) = 2 * a(i) * p(i) + b(i);
end
disp('FINAL OUTPUT OF MATLAB PROGRAM dispatch4.m');
disp(lambda);
disp('GENERATING UNIT OPTIMALGENERATION(MW)');
disp([uno; p]);
disp('INCREMENTAL FUEL COST AND PENALTY FACTORS ARE');
disp('UNIT NO. IFC L');
disp([uno; ifc ; l]);
disp('CHECK LAMBDA = IFC*L');
disp('UNIT NO. LAMBDA');
disp([uno; ifc.*l]);
disp('Total generation cost (Rs./hr) = ');
disp(totgencost);
RESULTS:
GENERATION IS WITHIN THE LIMITS
FINAL OUTPUT OF MATLAB PROGRAM dispatch4.m
12.1034
GENERATING UNIT OPTIMALGENERATION(MW)
1.0000 2.0000
177.2999 489.8232
INCREMENTAL FUEL COST AND PENALTY FACTORS ARE
UNIT NO. IFC L
1.0000 2.0000
10.6184 11.3410
1.1398 1.0672
CHECK LAMBDA = IFC*L
UNIT NO. LAMBDA
1.0000 2.0000
12.1034 12.1034
Total generation cost (Rs./hr) =
7.3862e+03
EXPERIMENT-5
AIM: To develop a MATLAB program to solve Numerical Solution of Hydrothermal
Scheduling without inflow and without loss.
Brief Theory:
Hydrothermal scheduling aims to determine the optimal power generation schedule for a
combination of hydroelectric and thermal power plants to minimize the total operating cost over a
specified period. In this problem, the hydro plants operate without considering water inflow, and
transmission losses are neglected.
The objective is to balance the power generated by hydro and thermal units to meet the load
demand efficiently. Thermal plants have fuel costs that need to be minimized, while hydro plants
utilize water resources, which are constrained by the reservoir capacity. The scheduling process
involves allocating generation from each plant type while adhering to constraints like power
balance, reservoir storage, and generator limits.
By neglecting inflow and losses, the problem simplifies to optimizing the use of available water in
hydro plants and fuel in thermal plants, ensuring cost-effective and reliable power generation.
Problem Statement: Find the optimum generation for a hydro-thermal system for a typical day, wherein
load varies in three steps of 8 hr each as 15, 25, and 8 MW, respectively. There is no water inflow into the
reservoir of the hydro-plant. The initial water storage in the reservoir is 180 m3/s and the final water
storage should be 100 m3/s. The basic head is 35 m and the water-head correction factor e is 0.005.
Assume for simplicity that the reservoir is rectangular so that ρ does not change with water storage. Let
the non-effective water discharge be assumed as 4 m3/s. The incremental fuel cost (IFC) of the thermal
power plant is 2.0Pgt + 25.0Rs/hr . Further transmission losses may be neglected.
MATLAB Code:
clc;
clear all;
load=[15;25;8];
time=[8;8;8];
ni=length(load(:,1));
x(1)=180;
x(ni+1)=100;
h0=35;
e=0.005;
r0=4;
ifc=[2.0 25.0];
delt=time(1);
alpha=0.5;
q(2)=20;
q(3)=22;
maxgrad=1;
iter=0;
while(maxgrad>0.1)
iter=iter+1;
sumq=0;
for i=2:ni
sumq=sumq+q(i);
end
q(1)=x(1)-x(ni+1)-sumq;
for i=2:ni
x(i)=x(i-1)-q(i-1);
end
for i=1:ni
pd(i)=load(i,1);
pgh(i)=9.81*0.001*h0*(1+0.5*e*(x(i)+x(i+1)))*(q(i)-r0);
if pgh(i)>pd(i)
pgh(i)=pd(i);
pgt(i)=0;
else
pgt(i)=pd(i)-pgh(i);
end
lambda1(i)=ifc(1,1)*pgt(i)+ifc(1,2);
lambda3(i)=lambda1(i);
if i==1
lambda2(i)=lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+r0));
else
lambda2(i)=lambda2(i-1)-0.5*9.81*0.001*h0*e*(lambda3(i-1)*(q(i-1)-r0) + lambda3(i)*(q(i)-r0));
end
if i~=1
grad(i)=lambda2(i)-lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+r0));
end
end
maxgrad=max(abs(grad));
for i=2:ni
q(i)=q(i)-alpha*(grad(i));
end
end
pgh
pgt
iter
RESULTS:
pgh =
12.4706 21.8178 5.4672
pgt =
2.5294 3.1822 2.5328
iter =
15
EXPERIMENT-6
AIM: To develop a MATLAB program to solve Numerical Solution of Hydrothermal
Scheduling with inflow and without loss.
Brief Theory:
Hydrothermal scheduling determines the optimal power generation schedule for a system
comprising hydro and thermal power plants to minimize operating costs while meeting load
demand. In this case, water inflows to the hydro reservoirs are considered, but transmission losses
are neglected.
The hydro plants use water resources, constrained by reservoir limits and inflow rates, while
thermal plants incur fuel costs that must be minimized. The objective is to efficiently allocate
power generation between hydro and thermal units over a scheduling period, ensuring the total
power generated matches the demand.
The inclusion of inflow accounts for natural water replenishment in hydro reservoirs, making the
problem more dynamic. This requires balancing water usage across multiple time intervals to
optimize both cost and resource sustainability, while meeting operational and power balance
constraints.
Problem Statement: Find the optimum generation for a hydro thermal system for a typical day,
wherein load varies in three steps of 8 hr each as 15, 25, and 8 MW, respectively. There is water
inflow into the reservoir of the hydro-plant in three intervals of 2, 4, and 3 m3/s. The initial water
storage in the reservoir is 180 m3/s and the final water storage should be 100 m3/s. The basic
head is 35–m and the water-head correction factor e is 0.005. Assume for simplicity that the
reservoir is rectangular so that ρ does not change with water storage. Let the non-effective water
discharge be assumed as 4 m3/s. The IFC of the thermal power plant is 2.0 Pgt + 25.0Rs/hr. Further
transmission losses may be neglected.
MATLAB Code:
clc;
clear all;
load=[15;25;8];
time=[8;8;8];
ni=length(load(:,1));
x(1)=180;
x(ni+1)=100;
h0=35;
e=0.005;
r0=4;
ifc=[2.0 25.0];
delt=time(1);
alpha=0.5;
J=[2;4;3];
q(2)=20;
q(3)=22;
maxgrad=1;
iter=0;
while(maxgrad>0.1)
iter=iter+1;
sumq=0;
sumj=0;
for i=2:ni
sumq=sumq+q(i);
end
for i=1:ni
sumj=sumj+J(i,1);
end
q(1)=x(1)-x(ni+1)-sumq+sumj;
for i=2:ni
x(i)=x(i-1)-q(i-1)+J(i,1);
end
for i=1:ni
pd(i)=load(i,1);
pgh(i)=9.81*0.001*h0*(1+0.5*e*(x(i)+x(i+1)))*(q(i)-r0);
if pgh(i)>pd(i)
pgh(i)=pd(i);
pgt(i)=0;
else
pgt(i)=pd(i)-pgh(i);
end
lambda1(i)=ifc(1,1)*pgt(i)+ifc(1,2);
lambda3(i)=lambda1(i);
if i==1
lambda2(i)=lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+J(i,1)+r0));
else
lambda2(i)=lambda2(i-1)-0.5*9.81*0.001*h0*e*(lambda3(i-1)*(q(i-1)-r0));
end
if i~=1
grad(i)=lambda2(i)-lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+J(i,1)+r0));
end
end
maxgrad=max(abs(grad));
for i=2:ni
q(i)=q(i)-alpha*(grad(i));
end
end
pgh
pgt
iter
RESULTS:
pgh =
14.6875 23.4858 6.8898
pgt =
0.3125 1.5142 1.1102
iter =
16
EXPERIMENT-7
AIM: To develop a MATLAB program to solve Numerical Solution of Hydrothermal
Scheduling without inflow and with loss.
Brief Theory:
Hydrothermal scheduling involves optimizing power generation from hydro and thermal plants to
minimize overall operating costs while meeting load demand. In this case, water inflow to hydro
reservoirs is not considered, but transmission losses in the system are included.
The hydro plants utilize a fixed amount of water stored in reservoirs, constrained by capacity
limits, while thermal plants generate power at a cost associated with fuel usage. The objective is to
allocate power generation between hydro and thermal units while considering transmission losses,
which are calculated using system-specific loss coefficients.
This formulation ensures that the generation schedule minimizes costs while maintaining the
power balance, accounting for losses, and adhering to hydro reservoir and thermal generator
limits.
Problem Statement: Find the optimum generation for a hydro thermal system for a typical day,
wherein load varies in three steps of 8 hr each as 15, 25, and 8 MW, respectively. There is no water
inflow into the reservoir of the hydro-plant. The initial water storage in the reservoir is 180 m3/s
and the final water storage should be 100 m3/s. The basic head is 35 m and the water-head
correction factor e is 0.005. Assume for simplicity that the reservoir is rectangular so that ρ does
not change with water storage. Let the non-effective water discharge be assumed as 4 m3/s. The
IFC of the thermal power plant is 2.0Pgt + 25.0Rs/hr.
Further transmission losses are considered and are taken as (1 – dPl^k/dPgt^k) = 0.85.
MATLAB Code:
clc;
clear all;
load=[15;25;8];
time=[8;8;8];
ni=length(load(:,1));
x(1)=180;
x(ni+1)=100;
h0=35;
e=0.005;
r0=4;
ifc=[2.0 25.0];
delt=time(1);
alpha=0.5;
dpl=0.5;
q(2)=20;
q(3)=22;
maxgrad=1;
iter=0;
while(maxgrad>0.1)
iter=iter+1;
sumq=0;
for i=2:ni
sumq=sumq+q(i);
end
q(1)=x(1)-x(ni+1)-sumq;
for i=2:ni
x(i)=x(i-1)-q(i-1);
end
for i=1:ni
pd(i)=load(i,1);
pgh(i)=9.81*0.001*h0*(1+0.5*e*(x(i)+x(i+1)))*(q(i)-r0);
if pgh(i)>pd(i)
pgh(i)=pd(i);
pgt(i)=0;
else
pgt(i)=pd(i)-pgh(i);
end
lambda1(i)=(ifc(1,1)*pgt(i)+ifc(1,2))/(1-dpl);
lambda3(i)=lambda1(i)*(1-dpl);
if i==1
lambda2(i)=lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+r0));
else
lambda2(i)=lambda2(i-1)-0.5*9.81*0.001*h0*e*(lambda3(i-1)*(q(i-1)-r0) + lambda3(i)*(q(i)-r0));
end
if i~=1
grad(i)=lambda2(i)-lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+r0));
end
end
maxgrad=max(abs(grad));
for i=2:ni
q(i)=q(i)-alpha*(grad(i));
end
end
pgh
pgt
grad
iter
RESULTS:
pgh =
12.4706 21.8178 5.4672
pgt =
2.5294 3.1822 2.5328
grad =
0 -0.0765 0.0826
iter =
15
EXPERIMENT-8
AIM: To develop a MATLAB program to solve Numerical Solution of Hydrothermal
Scheduling with inflow and with loss.
Brief Theory:
Hydrothermal scheduling aims to optimize power generation from hydro and thermal plants to
minimize total operating costs while satisfying load demand. In this scenario, both water inflows to
hydro reservoirs and transmission losses are considered, adding complexity to the problem.
Hydro plants use water resources replenished by natural inflows, constrained by reservoir limits,
while thermal plants generate power at a cost associated with fuel consumption. Transmission
losses are accounted for using system-specific loss coefficients. The scheduling process involves
balancing power generation across hydro and thermal units to minimize costs.
By incorporating inflows, the problem considers dynamic water resource management over
multiple time intervals. Including losses ensures realistic power system operation, adhering to
reservoir, generator, and system constraints. This approach achieves efficient and sustainable
energy dispatch.
Problem Statement: Find the optimum generation for a hydro-thermal system for a typical day,
wherein load varies in three steps of 8 hr each as 15, 25 and 8 MW, respectively. There is water
inflow into the reservoir of the hydro-plant in three intervals of 2, 4, 3 m3/s. The initial water
storage in the reservoir is 180 m3/s and the final water storage should be 100 m3/s. The basic
head is 35 m and the water-head correction factor e is 0.005. Assume for simplicity that the
reservoir is rectangular so that ρ does not change with water storage. Let the non-effective water
discharge be assumed as 4 m3/s. The IFC of the thermal power plant is 2.0Pgt + 25.0Rs/hr.
Further transmission losses are considered and are taken as (1 – dPl^k/dPgt^k) = 0.85.
MATLAB Code:
clc;
clear all;
load=[15;25;8];
time=[8;8;8];
ni=length(load(:,1));
x(1)=180;
x(ni+1)=100;
h0=35;
e=0.005;
r0=4;
ifc=[2.0 25.0];
delt=time(1);
alpha=0.5;
J=[2;4;3];
dpl=0.15;
q(2)=20;
q(3)=22;
maxgrad=1;
iter=0;
while(maxgrad>0.1)
iter=iter+1;
sumq=0;
sumj=0;
for i=2:ni
sumq=sumq+q(i);
end
for i=1:ni
sumj=sumj+J(i,1);
end
q(1)=x(1)-x(ni+1)-sumq+sumj;
for i=2:ni
x(i)=x(i-1)-q(i-1)+J(i,1);
end
for i=1:ni
pd(i)=load(i,1);
pgh(i)=9.81*0.001*h0*(1+0.5*e*(x(i)+x(i+1)))*(q(i)-r0);
if pgh(i)>pd(i)
pgh(i)=pd(i);
pgt(i)=0;
else
pgt(i)=pd(i)-pgh(i);
end
lambda1(i)=(ifc(1,1)*pgt(i)+ifc(1,2))/(1-dpl);
lambda3(i)=lambda1(i)*(1-dpl);
if i==1
lambda2(i)=lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+J(i,1)+r0));
else
lambda2(i)=lambda2(i-1)-0.5*9.81*0.001*h0*e*(lambda3(i-1)*(q(i-1)-r0) + lambda3(i)*(q(i)-r0));
end
if i~=1
grad(i)=lambda2(i)-lambda3(i)*9.81*0.001*h0*(1+0.5*e*(2*x(i)-2*q(i)+J(i,1)+r0));
end
end
maxgrad=max(abs(grad));
for i=2:ni
q(i)=q(i)-alpha*(grad(i));
end
end
pgh
pgt
iter
RESULTS:
pgh =
14.0553 23.6463 7.3583
pgt =
0.9447 1.3537 0.6417
iter = 17