Dear Professor Zimmerman,
thank you for your reply. Even though I had already figured out how to upload
profiles your hints gave me confirmation that my procedure is correct and that
potential issues that may occur in the bigger network I am working on wouldn’t
be due to the formulation, but to the network parameters themselves.
Best wishes,
Antonio L’Abbate.
Inviato da Posta per Windows 10
Da: Ray Zimmerman
Inviato: martedì 9 aprile 2019 17:04
A: MATPOWER discussion forum
Oggetto: Re: Adding RES and LOAD profiles in MOST.
Hi Antonio,
First, about CT_REP vs. CT_REL, see Table 9-3 in the MATPOWER User’s Manual.
Then, you should be able to start with the code from most_ex6.uc.m, namely …
mpc = loadcase(casefile);
xgd = loadxgendata('ex_xgd_uc', mpc);
[iwind, mpc, xgd] = addwind('ex_wind_uc', mpc, xgd);
profiles = getprofiles('ex_wind_profile_d', iwind);
profiles = getprofiles('ex_load_profile', profiles);
nt = size(profiles(1).values, 1); % number of periods
mdi = loadmd(mpc, nt, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
… and simply used modified versions of each of the input files. It looks like
this may be how you started.
Your version of ex_wind_uc.m will have 3 rows for the gen and xgd_table.data
fields, rather than one.
Your version of ex_load_profile.m should be very similar to the original,
assuming you want to scale all loads together. Simply set loadprofile.values(:,
1, 1) to your own 24 x 1 vector of values representing the total load in each
period. If you want to scale the loads separately, then you need to set
loadprofile.values(:, 1, :) to a 24 x 3 vector of values, and set
loadprofile.rows to [3;4;5], meaning that the 3 columns of
loadprofile.values(:, 1, :) should be applied to loads at buses 3, 4 and 5,
respectively.
Your version of ex_wind_profile_d.m should have windprofile.values(:, 1, :) set
to a 3 x 24 matrix of either scale factors (to scale the PMAX values set in
your ex_wind_uc) or absolute MW values (for chg_type = CT_REP). And
windprofile.rows should be set to [1;2;3], meaning that the 3 columns of
windprofile.values(:, 1, :) should be applied to wind generators 1, 2, and 3
respectively.
Hope this helps,
Ray
On Apr 2, 2019, at 5:01 AM, Antonio L'Abbate
<[email protected]> wrote:
Hello Community,
I am trying to run a multiperiod deterministic UC in a network which is based
on the example “most_ex6_uc”, but I haven’t been able to successfully implement
loads and res profiles so far. I have been following the manual, but it is not
clear to me which is the proper way to deal with profiles, since they won’t
vary with time unit (1:1:24 hrs).
My simplified network is composed of 5 buses, 3 traditional generators, 3 loads
modelled as negative gens (as showed in the abovementioned example) and 3 RES
generators: the traditional gens and the loads are described in the mpc case,
while the RES have been added in the xgd through the related loadxgendata
command.
I am attaching the relevant parts of the code in order to ease comprehension.
mpc.gen = [
1 1250 0 25 -25 1 100
1 200 60 0 0 0 0
0 0 0 250 250 0 0;
1 125 0 25 -25 1 100
1 200 65 0 0 0 0
0 0 0 250 250 0 0;
2 200 0 50 -50 1 100
1 500 60 0 0 0 0
0 0 0 600 600 0 0;
3 -400 0 0 0 1
100 1 0 -450 0 0 0 0
0 0 0 500 500 0 0;
4 -350 0 0 0 1 100 1 0 -350 0 0 0 0 0
0 0 500 500 0 0;
5 -300 0 0 0 1 100 1 0 -300 0 0 0 0 0
0 0 500 500 0 0;];
xgd_table.data = [
1 1 1 1 5 250 10 250 1e-9 1e-9 1e-6 250
1e-6 250;
1 1 3 1 1e-8 250 2e-8 250 1e-9 1e-9 1e-6 250
1e-6 250;
1 1 1 1 1.5 600 3 600 1e-9 1e-9 10 100
10 250;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;
2 1 1 1 1e-8 800 2e-8 800 1e-9 1e-9 1e-6 800
1e-6 800;];
%(Main script)
mpc = loadcase(casefile);
xgd = loadxgendata('ex_xgd_ucR', mpc);
[iwind, mpc, xgd] = addwind('ex_wind_ucR', mpc, xgd);
% create load profiles
aux1=ex_load_profileR; %extracting profiles through an auxiliary
variable
load_values=aux1.values;
load_values = load_values./repmat(max(load_values,[],2),1,24); %conversion
to pu
iload = 4:6;
for i = 1:size(load_values, 1)
wp = load_values(i,:)';
if i==1
profiles = getprofiles('ex_load_profile_d_R',iload(i));
else
profiles = getprofiles('ex_load_profile_d_R',profiles,iload(i));
end
end
% create res profiles
aux2=ex_wind_profileR;
RES_values=aux2.values;
for i = 1:1:size(RES_values,2)
wp = RES_values(:,i);
profiles = getprofiles('ex_wind_profile_d_R',profiles,iwind(i)); %
RES_values profiles
end
nt = 24;
mpc_full = mpc;
xgd_full = xgd;
mdi = loadmd(mpc, nt, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
if verbose
ms = most_summary(mdo);
end
%ex_load_profile (idx_gen & idx_ct defined)
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TLOAD, ...
'rows', 0, ...
'col', CT_LOAD_ALL_PQ, ...
'chgtype', CT_REP, ...
'values', [] );
tmp2=load('tload_profiles.mat');
tload_profiles=tmp2.three_load_profiles;
loadprofile.values = tload_profiles; %(3x24 matrix)
%ex_load_profile_d
global wp;
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
loadprofile.values(:, 1, :) = -wp;
%wind_profile (idx_gen & idx_ct defined)
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
tmp1=load('res_profiles.mat');
res_profiles=tmp1.three_res_profiles;
windprofile.values = res_profiles; %(24x3 matrix)
%ex_wind_profile_d
global wp;
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 0, ...
'col', PMAX, ...
'chgtype', CT_REP, ...
'values', [] );
windprofile.values(:, 1, :) = wp;
Only the first res profile is recognized, while the load ones are not uploaded
and only the Pmin values are given in the resulting optimased dispatch. I would
like to ask for advice and for further clarification about the use of CT_REP
and REL, since I cannot understand where and how to set these parameters and
for what extent.
Ps I set the Gurobi method as solver.
Thanks in advance,
Best Regards.
Antonio L’Abbate.
Inviato da Posta per Windows 10