Any one clear my idea to implement prohibited operation zone vector for 6 generators to get economic dispatch solution?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am also facing the problem of implementing these Prohibited operation zone values as; Pg1-> [210 240] [350 380]; Pg2-> [90 110] [140 160]; Pg3-> [150 170] [210 240]; Pg4-> [80 90] [110 120]; Pg5-> [90 110] [140 150]; Pg6-> [75 85] [100 105]; for 6 generators using LSA. My problem is that I want to try these vector values with ramp limit coefficients. kindly help me in this to implement POZ values in LSA Code;
0 Kommentare
Antworten (1)
Abhishek Kumar Singh
am 28 Dez. 2023
Bearbeitet: Abhishek Kumar Singh
am 28 Dez. 2023
Hello Asif,
To incorporate the Prohibited Operation Zones (POZs) constraints, you need to modify the Lambda Search Algorithm (LSA), which I assume you are referring to.
You can begin by defining the POZs and modify the objective functions to ensure that POZs are treated as additional constraints within this function. During the optimization process, check if the proposed generation level for each generator falls within any of its POZs.
Continue iterating, and check that all generation levels are feasible and comply with ramp rates.
Here's a highly simplified code for illustration purpose you can refer to. In a practical scenario, you'd likely use a more sophisticated optimization.
function economic_dispatch_with_POZ
% Define the demand
demand = 1000; % Total demand in MW
% Define the generator max and min outputs (in MW)
Pmax = [600, 400, 300, 200, 150, 100];
Pmin = [100, 50, 80, 50, 30, 20];
% Define the prohibited operation zones (POZs) for each generator
POZ = {
[210, 240; 350, 380], % POZs for generator 1
[90, 110; 140, 160], % POZs for generator 2
[150, 170; 210, 240], % POZs for generator 3
[80, 90; 110, 120], % POZs for generator 4
[90, 110; 140, 150], % POZs for generator 5
[75, 85; 100, 105] % POZs for generator 6
};
% Define ramp rate limits (in MW/h)
ramp_up_limit = [40, 30, 35, 25, 20, 15];
ramp_down_limit = [40, 30, 35, 25, 20, 15];
% Initialize lambda (cost coefficient)
lambda = 10; % Starting value for lambda
lambda_increment = 0.1; % Increment value for lambda
% Initialize generation outputs
Pg = Pmin;
% Start the lambda iteration
iteration_limit = 1000; % Limit to prevent infinite loop
iteration_count = 0;
% Start the lambda iteration
while iteration_count < iteration_limit
iteration_count = iteration_count + 1;
% Calculate total generation
total_generation = sum(Pg);
% Check if total generation meets demand
if abs(total_generation - demand) < 1e-1
% Demand is met, check for convergence of last three Pg values
if all(abs(Pg(end-2:end) - previous_Pg(end-2:end)) < 1e-3)
% Convergence criteria met, break the loop
disp(['Optimal numbers found at iteration: ', num2str(iteration_count)]);
break;
end
end
% Adjust lambda based on whether we need more or less total generation
if total_generation < demand
lambda = lambda + lambda_increment;
else
lambda = lambda - lambda_increment;
end
% Update generation outputs based on lambda
for i = 1:length(Pg)
% Calculate new generation output
new_Pg = calculate_generation_output(lambda, Pmin(i), Pmax(i));
% Check ramp rate limits
new_Pg = max(Pg(i) - ramp_down_limit(i), min(new_Pg, Pg(i) + ramp_up_limit(i)));
% Check POZs and adjust generation output if necessary
for j = 1:size(POZ{i}, 1)
if new_Pg > POZ{i}(j, 1) && new_Pg < POZ{i}(j, 2)
if abs(new_Pg - POZ{i}(j, 1)) < abs(new_Pg - POZ{i}(j, 2))
new_Pg = POZ{i}(j, 1); % Adjust to just below POZ lower bound
else
new_Pg = POZ{i}(j, 2); % Adjust to just above POZ upper bound
end
end
end
% Update generation output
Pg(i) = new_Pg;
end
end
% Display the final generation outputs
disp('Final generation outputs (MW):');
disp(Pg);
end
Below is a helper function to calcaulate generation output based on lambda. Kindly note that this is just a placeholder for the actual cost function and in practical scenario, cost curves of the generators will be used. For simplicity, a linear relationship between generation output and lambda is assumed.
function Pg = calculate_generation_output(lambda, Pmin, Pmax)
% Helper function to calculate generation output
Pg = lambda * (Pmax - Pmin) + Pmin;
Pg = min(max(Pg, Pmin), Pmax);
end
I hope this helps clarify the approach to implementing POZs in an economic dispatch solution.
Thanks!
3 Kommentare
Abhishek Kumar Singh
am 28 Dez. 2023
You can refer to the attached M file for reference.
Siehe auch
Kategorien
Mehr zu Direct Search finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!