Stephen,
Thank you so much! That works a treat!
Regards,
Josh
From: Stephen Suffian
Sent: Saturday, 23 September 2017 3:03 AM
To: MATPOWER discussion forum
Subject: Re: Adding Wind Generation to Profiles
Check out the 'help get_profile'. Much like you pass the previous profiles
object on the load profile line, you can pass the previous profiles object on
the other lines:
profiles = getprofiles('wind_profile1',iwind);
profiles = getprofiles('wind_profile2',profiles,iwind);
profiles = getprofiles('load_profile_30',profiles)
See if that works!
On Thu, Sep 21, 2017 at 7:24 PM, Joshua Sebben <[email protected]> wrote:
Stephen,
Thank you for your reply.
casefile = 'case30_modified_MedPen';
mpc = loadcase(casefile);
xgd = loadxgendata('xgd_uc_30_MedPen', mpc);
[iwind, mpc, xgd] = addwind('wind_uc_30_MedPen', mpc, xgd);
profiles = getprofiles('wind_profile1', iwind);
profiles = getprofiles('wind_profile2', iwind);
profiles = getprofiles('wind_profile3', iwind);
profiles = getprofiles('wind_profile4', iwind);
profiles = getprofiles('wind_profile5', iwind);
profiles = getprofiles('wind_profile6', iwind);
profiles = getprofiles('wind_profile7', iwind);
profiles = getprofiles('load_profile_30', profiles);
nt = size(profiles(1).values, 1); % number of periods
I created the 7 wind profiles with each of the row counts changed to 1 to 7 for
their respective generators.
This would then change my main code assuming to the snippet above?
This again also has the problem of only changing the last generator in the list
as each of the previous wind profile changes are overwritten by the new
getprofile?
Regards,
Josh
On 22 September 2017 at 04:02, Stephen Suffian <[email protected]> wrote:
I also couldn't figure it out, but I got around it by adding a separate profile
for each generator and changing the rows value. So if a wind generator is in
row 5, you would have the struct look like this below.
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 5, ...
'col', PMAX, ...
'chgtype', CT_REL, ...
'values', [] );
And then for row 6 you would add another profile with the struct looking tlike
this:
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 6, ...
'col', PMAX, ...
'chgtype', CT_REL, ...
'values', [] );
It is a bit of a work around, but I believe it should work (I did something
similar to set the Pmax for each conventional generator in a profile, so I
imagine it will work the same).
On Thu, Sep 21, 2017 at 1:52 PM, Stephen Suffian <[email protected]>
wrote:
I also couldn't figure it out, but I got around it by adding a separate profile
for each generator and changing the rows value. So if a wind generator is in
row 5, you would have the struct look like this below.
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 5, ...
'col', PMAX, ...
'chgtype', CT_REL, ...
'values', [] );
And then for row 6 you would add another profile with the struct looking tlike
this:
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 6, ...
'col', PMAX, ...
'chgtype', CT_REL, ...
'values', [] );
It is a bit of a work around, but I believe it should work (I did something
similar to set the Pmax for each conventional generator in a profile, so I
imagine it will work the same).
On Thu, Sep 21, 2017 at 5:39 AM, Joshua Sebben <[email protected]> wrote:
By the way,
I have also tried setting the row count to [1 2 3 4 5 6 7] for my 7 extra
generators that I want to add, however when I run my code I get an error:
Error using apply_profile (line 148)
apply_profile: third dimension of profile.values should match length of pro=
file.rows
Error in loadmd (line 508)
optab =3D apply_profile(profiles(p), optab);
Error in Test (line 33)
mdi =3D loadmd(mpc, transmat, xgd, [], [], profiles);
Regards,
Josh
On 20 September 2017 at 22:17, Joshua Sebben <[email protected]> wrote:
Currently working on adding wind generator units to my model. I am working off
the 30 bus example case in MOST. I am trying to run the following code
casefile = 'case30';
mpc = loadcase(casefile);
xgd = loadxgendata('xgd_uc', mpc);
[iwind, mpc, xgd] = addwind('wind_uc_30', mpc, xgd);
profiles = getprofiles('wind_profile', iwind);
profiles = getprofiles('load_profile', profiles);
nt = size(profiles(1).values, 1); % number of periods
%%----- Full Transition Probabilities -----
transmat = ex_transmat(nt);
mdi = loadmd(mpc, transmat, xgd, [], [], profiles);
mdo = most(mdi, mpopt);
if verbose
ms = most_summary(mdo);
end
However the added generator units of which there are 7 of them in wind_uc_30
don't seem to get the profile set to them in the output. Instead only the first
Generator unit gets the profile while the rest of them are set at PMAX.
windprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TGEN, ...
'rows', 1, ...
'col', PMAX, ...
'chgtype', CT_REL, ...
'values', [] );
windprofile.values(:, :, 1) = [
0.80;
0.65;
0.60;
0.82;
1.00;
0.70;
0.50;
0.85;
1.00;
1.10;
1.06;
0.95;
Above is a snippet from the wind_profile. I am assuming it has something to do
with the row count, however, I haven't been able to find a solution.
Could I please get some help. to ensure all the generator units receive the
load profile.
Thankyou,
--
J.Sebben
--
J.Sebben
--
J.Sebben
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus