Assignment Program To Solve Economic Load Dispatch Problem On Matlab
Assignment Program To Solve Economic Load Dispatch Problem On Matlab
disp('Example 3H ')
disp('___________')
disp('P1 P2 P3 Lambda Power.Lost')
disp(['Power of Unit 1: ' num2str(P4)])
disp(['Power of Unit 2: ' num2str(P5)])
disp(['Power of Unit 3: ' num2str(P6)])
disp(['Total power lost: ' num2str(PL)])
disp(['Lambda of first iteration:' num2str(Lambda)])
Output
Example 3H
___________
P1 P2 P3 Lambda power.Lost
Power of Unit 1: 440.6515
Power of Unit 2: 299.1854
Power of Unit 3: 125.7565
Total power lost: 15.6
Lambda of first iteration:9.5252
Function File:
function F = funny(x)
global P1 P2 P3 Lambda
global P1min P2min P3min P1max P2max P3max
% define Pi_min and Pi_max
P1min = 150;
P2min = 100;
P3min = 50;
P1max = 600;
P2max = 400;
P3max = 200;
% Unknown variables
P1 = x(1);
P2 = x(2);
P3 = x(3);
Lambda = z(4);
if P3 < P3min
P3 = P3min;
else
if P3 > P3max
P3 = P3max;
end
end
if P2 < P2min
P2 = P2min;
else
if P2 > P2max
P2 = P2max;
end
end
if P1 < P1min
P1 = P1min;
else
if P1 > P1max
P1 = P1max;
end
end