They are the constraint violation variables described in Section 7.6.4 of the
MATPOWER User’s Manual<https://matpower.org/docs/MATPOWER-manual-7.1.pdf>. If
they are all that small, then it would appear that the problem is, strictly
speaking, feasible. However, it would appear that there is still something
about the feasible region that makes the standard formulation (w/ hard
constraints) numerically challenging.
It might be interesting to explicitly relax (turn on soft limits for) specific
constraints, one at a time, to attempt to determine which one is the
problematic one. I’m just wondering if you may have over-constrained the
problem in some way so that the feasible region is a single point, with no real
degrees of freedom for the optimization. Another approach would be to make
small changing in some binding constraint to see how the solution varies or how
it affects soft limit violations. If a small change in a binding constraint
forces a soft limit violation, then the problem is probably over-constrained.
Ray
On Oct 20, 2020, at 3:37 AM, Davide Maglione
<[email protected]<mailto:[email protected]>> wrote:
Hi Ray,
i turned on the toggle_softlims and the opf now converges and also the results
are really more realistic! That helped me a lot, thank you so much.
I have noticed that now (with toggle_softlims on) there are new variables added
to my optimization “x”:
results.var.val.s_vmax
results.var.val.s_vmin
results.var.val.s_pmax
results.var.val.s_pmin
results.var.val.s_qmax
results.var.val.s_qmin
results.var.val.s_rate_a
those are all extremely low numbers ( 10^-9) but i can’t find on the manual
where do they come from or what they mean, do you have any indications?
Thank you again for your patience and support,
Davide
Da: Ray Daniel Zimmerman<mailto:[email protected]>
Inviato: lunedì 19 ottobre 2020 16:17
A: MATPOWER-L<mailto:[email protected]>
Oggetto: Re: Bus, Loads and Generators question
You should not have to modify opf.violation if the problem is feasible. One
thing you might try is to turn on OPF soft limits (see toggle_softlims). If it
converges then you can see which limits had to be violated in order to solve
the problem.
From what I can tell, it appears you are using the dispatchable loads
correctly, except it looks like you have a typo in the line that assignes PMIN.
Also, if you are constraining the voltage at the dispatchable load to the
voltage setpoint using opf.use_vg, just make sure that you specify
gen(disploadbus, VG) in p.u.
Ray
On Oct 15, 2020, at 12:46 PM, Davide Maglione
<[email protected]<mailto:[email protected]>> wrote:
Yes you are assuming correctly, i am trying to optimize the cost only to
maximize the dispatchable load absorption. So i have currently :
f(p) = c1 *p
with p = Active power absorbed by the disp. Load. The Vm are constrained within
the constraint values of the italian transmission network. I have not put
constraints on Va. And the Pg and Qg (generators active and reactive power) are
constrained within the production profiles i give them.
I am having issues primarly with the V values. MIPS doesn’t converge because Vm
and also the dispatchable P exceeds the constraints.
The opf currently converges if i use “FMINCON” with an opf.violation set at
9*10^(-1) but i am noticing the results.var.val.Vm patterns being strange when
i activate the dispatchable load
mycase.gen(disploadbus,6)= V(disploadbus)/mycase.baseKVLL;
mycase.gen(disploadbus,7)= mygen.baseMVA;
mycase.gen(disploadbus,8) = 1 ;
mycase.gen(disploadbus,9) = 0 ;
mycase.gen(disploadbus i,10) = - 40 ;
mycase.gencost(disploadbus,5) = c1;
mycase.gencost(disploadbus ,6) = 0;
I am simulating a storage device that activates when there are contingencies in
the network, in order to avoid wind power curtailment. But little variation of
the P injected results in too high variations of Vm during the opf simulations.
Am i using the dispatchable load feature correctly?
Thank you in advance for your kindness Ray, Best regards.
Davide
Da: Ray Daniel Zimmerman<mailto:[email protected]>
Inviato: martedì 13 ottobre 2020 16:06
A: MATPOWER-L<mailto:[email protected]>
Oggetto: Re: Bus, Loads and Generators question
Yes, the P absorbed by the dispatchable load appears as a negative generation,
so the cost is evaluated using a negative quantity.
I’m not sure what you mean by optimize Va, V, and P absorbed by the loads, but
not other Pg and Qg. I assume you mean that they are all free variables, but
the cost you are optimizing is simply to maximize the load served (and possibly
some cost on voltage?). If so, then yes, you can set the other generator costs
to zero. You could also simply set the costs to a positive constant that is
small relative to the value of the load. That essentially says that there is no
preference to use one generator over another.
It’s likely that the problem as defined is infeasible, but just to be sure, it
could be useful to attempt another solver, like IPOPT.
Ray
On Oct 12, 2020, at 1:13 PM, Davide Maglione
<[email protected]<mailto:[email protected]>> wrote:
Thank you for the time spent in answering my questions.
I probably don’t need to add a new variable in my current scenario. I have done
several tests with my network but i still have some issues.
The P absorbed by the dispatchable load is treated as negative in the equation
of the costs, am i right? If i want to optimize Va,Vm and P absorbed by the
dispatchable loads , but not the other Pg and Qg, is it enough to put 0s in the
respective gencost matrix’s rows?
Unfortunatelly with the default options the program doesn’t converge, i have a
numerical failure using MIPS. The P absorbed by the disp. Loads exceeds the
constraints, and the Vm of the buses does it too, but i think that thanks to
your help i am moving in the right direction.
Thank you again,
Davide
Da: Ray Daniel Zimmerman<mailto:[email protected]>
Inviato: venerdì 9 ottobre 2020 15:56
A: MATPOWER-L<mailto:[email protected]>
Oggetto: Re: Bus, Loads and Generators question
The P absorbed by the dispatchable load is already an optimization variable,
included in Pg, since dispatchable loads are modeled as negative generators. So
you may not even need to add a variable. Furthermore, you can already impose
costs on those variables via the gencost matrix.
If you simply want to maximize the power absorbed by the dispatchable loads,
you just need to make sure that you use a large enough negative cost (on the
negative injection). You may find
load2disp()<https://matpower.org/docs/ref/matpower7.0/lib/load2disp.html> to be
helpful.
If you do need a new variable, it is introduced through the A matrix in the
user-defined linear constraints. You simply define linear constraints that
include extra columns corresponding to the new variables. They are related to
the existing variables through this constraint matrix whose existing columns
correspond to Va, Vm, Pg, Qg, for the standard formulation. See equations (6.5)
and (6.38), (6.39) in the manual.
Ray
On Oct 8, 2020, at 11:09 AM, Davide Maglione
<[email protected]<mailto:[email protected]>> wrote:
Hi Ray
Thank you for your kind and fast response!
I think your suggestion is right, i should lean toward the direct
specification. I will try to be more clear about what i am trying to do.
I have only one specific case, but i have to see what happens in different
periods of time. I would like to initialize dispatchable loads in specific
times inside my loop, and during those times i am trying to optimize (maximize)
the surplus energy absorbed, coming from the generators.
So what i have in mind, and i am sure it’s possible to do with your software,
is to create a new variable (the P absorbed by the disp. Loads), add some
constraints based on the maximum demand and voltage of the dispatchable Load’s
bus and finally add the cost function (function of the P absorbed by the loads
and the maximum surplus available in that time) to be minimized by the
algorithm.
Am i on the right direction using the direct specification? When i add a new
variable how can i refer it specifically to a variable in the mpc (for example
the P absorbed by a load)?
Sincerely, thank you again for all your help,
Davide
Da: Ray Daniel Zimmerman<mailto:[email protected]>
Inviato: giovedì 8 ottobre 2020 16:02
A: MATPOWER-L<mailto:[email protected]>
Oggetto: Re: Bus, Loads and Generators question
H
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Mail priva di virus.
www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>