Escolar Documentos
Profissional Documentos
Cultura Documentos
CONTROL
LAB
M.TECH
1st year
POWER SYSTEMS
3141604
PROGRAM 1
% ECONOMIC LOAD DISPATCH USING OPTIMIZATION TOOLBOX
% USING FMINCON % USE ACTIVE SET ALGORITHM
c = [561 310 78];
b = [7.92 7.85 7.97];
a = [0.0016 0.00194 0.00482];
% c = [459 310 78]; % for 0.9 fuel cost of unit 1
% b = [6.48 7.85 7.97];
% a = [0.00128 0.00194 0.00482];
pmin = [150; 100; 50];P0 = [400; 300; 150];
pmax = [600; 400; 200]; pd = 850 ;
ngen = length(a);Aeq = [1 1 1];Beq = 850;
Bl = [0.00003;0.00009;0.00012];
options = optimset('Algorithm','Active-Set');
% Following command gives ED solution WITH LOSSES taking account of
% @(P)eldcon(P,pd)
[x3, fval3, flag3,output3,lambda3] = fmincon(@(P)eld(a,b,c,P),P0,[],[],[],
[],pmin,pmax,@(P)eldcon(P,pd),options)
Ploss = Bl(1)*x3(1)^2 + Bl(2)*x3(2)^2 + Bl(3)*x3(3)^2 ;
% Following command gives ED solution WITH OUT GENERATOR LIMITS & WITH OUT
% LOSSES BASIC ED WITH ONLY POWER BALANCE
[x1, fval1, flag1,output1,lambda1] = fmincon(@(P)eld(a,b,c,P),P0,[],
[],Aeq,Beq,[],[],[],options)
function [c, ceq] = eldcon(P,pd)
c = [];
Bl = [0.00003;0.00009;0.00012];
ceq = [1 1 1]* [P(1);P(2);P(3)] - pd - [Bl(1) Bl(2)
Bl(3)]*[P(1)^2;P(2)^2;P(3)^2] ;
function [f, df, d2f] = eld(a,b,c,P)
f = 0;
for i = 1:3
f = f + a(i)*P(i)^2 + b(i)*P(i) + c(i);
end
for i = 1:3
df(i,1) = 2*a(i)*P(i) + b(i) ;
end
d2f = [2*a(1) 0 0;0 2*a(2) 0;0 0 2*a(3)] ;
RESULT
ED_OPT
Local minimum possible. Constraints satisfied.
fmincon stopped because the predicted change in the objective
function
is less than the default value of the function tolerance and
constraints
are satisfied to within the default value of the constraint
tolerance.
<stopping criteria details>
No active inequalities.
x3 =
430.9312
302.9153
132.0759
fval3 =
8.3517e+03
flag3 =
5
output3 =
iterations:
funcCount:
lssteplength:
stepsize:
algorithm:
search'
11
44
1
1.7493e-04
'medium-scale: SQP, Quasi-Newton, line-
firstorderopt: 1.1177e-06
constrviolation: 3.4584e-09
message: [1x772 char]
lambda3 =
lower:
upper:
eqlin:
eqnonlin:
ineqlin:
ineqnonlin:
[3x1 double]
[3x1 double]
[0x1 double]
9.5458
[0x1 double]
[0x1 double]
iterations:
funcCount:
lssteplength:
stepsize:
algorithm:
7
28
1
0.0049
'medium-scale: SQP, Quasi-Newton, line-
search'
firstorderopt: 1.4674e-05
constrviolation: 1.1369e-13
message: [1x772 char]
lambda2 =
lower:
upper:
eqlin:
eqnonlin:
ineqlin:
ineqnonlin:
[3x1 double]
[3x1 double]
9.1621
[0x1 double]
[0x1 double]
[0x1 double]
5
output1 =
iterations:
funcCount:
lssteplength:
stepsize:
algorithm:
7
28
1
0.0049
'medium-scale: SQP, Quasi-Newton, line-
search'
firstorderopt: 1.4674e-05
constrviolation: 1.1369e-13
message: [1x772 char]
lambda1 =
lower:
upper:
eqlin:
eqnonlin:
ineqlin:
ineqnonlin:
[3x1 double]
[3x1 double]
9.1621
[1x0 double]
[1x0 double]
[1x0 double]
PROGRAM 2
Economic load dispatch using Lambda iterative technique
a = [561 310 78]; % a = [459 310 78]; % for 0.9 fuel cost of unit 1
b = [7.92 7.85 7.97]; % b = [6.48 7.85 7.97];
c = [0.0016 0.00194 0.00482]; % c = [0.00128 0.00194 0.00482];
pmin = [150 100 50];
pmax = [600 400 200];
ngen = length(a);
% calculating maximim and minimum incremental costs
ICmin = 10^6; ICmax = 0; % initialisation of maximum and minimum incremental
costs of the system % IC is Incremental Cost
for i = 1:ngen
icmin(i) = b(i) + 2*c(i)*pmin(i);
icmax(i) = b(i) + 2*c(i)*pmax(i);
if(icmin(i) < ICmin)
ICmin = icmin(i);
end
if(icmax(i) > ICmax)
ICmax = icmax(i);
end
end
icrange = ICmax - ICmin ;
icdel = icrange/2 ;
icinitial = ICmin + icdel ;
lambda = icinitial ;
pg = 0 ; % total generation initial
totalcost = 0;
pd = 850; tol = 0.01; iter = 0;
while (abs(pg - pd) > tol)
pg = 0;
totalcost = 0;
for i = 1:ngen
if lambda < icmin(i)
p(i) = pmin(i);
elseif lambda > icmax(i)
p(i) = pmax(i);
else
p(i) = (lambda - b(i))/(2*c(i));
end
pg = pg + p(i) ;
totalcost = totalcost + a(i) + b(i)*p(i) + c(i)*p(i)^2;
end
if pg < pd
lambda = lambda + icdel ;
icdel = icdel/2 ;
end
end
if pg > pd
lambda = lambda - icdel;
icdel = icdel/2;
end
iter = iter + 1;
disp(' p1
disp([ p(1)
p2
p(2)
p3
p(3)
Lambda ');
lambda ]) ;
Result
p1
388.1640
p2
338.1765
p3
123.6644
Lambda
9.1621
PROGRAM 3
Economic Load dispatch using Newton method
RESULT
enter initial guess of lambda 6
1.0e+03 *
p1
Lambda
p2
-0.6000
0.0092
-0.4768
388.1617
9.1621
338.1746
p3
delP
-0.2044
2.1312
123.6636
-0.0000
EXPERIMENT 4
AIM
To determine the frequency deviation of an isolated single area
system with respect to changing load, without considering the
governor effect.
Data
Turbine time constant 0.5 sec
Generator and load time constant 10 sec
Change in load is 0.2 pu
Regulation coefficient is 1/20
Result
EXPERIMENT 5
AIM
To determine the frequency deviation with the load change
including the governor effect
Data
Turbine time constant 0.5 sec
Generator and load time constant 10 sec
Change in load is 0.2 pu
Regulation coefficient is 1/20
Governor time constant 0.2 sec
Result
EXPERIMENT 6
AIM
To determine the frequency deviation with respect to change in
load demand with the effect of PI controller in the feed back loop
Data
Turbine time constant 0.5 sec
Generator and load time constant 10 sec
Change in load is 0.2 pu
Regulation coefficient is 1/20
Governor time constant 0.2 sec
Integrator gain 7
Result