There is not an easy way to do piecewise non-linear cost functions for a single 
generator.

The easiest approach is probably to split the single generator into two, each 
with a quadratic cost. If this is not practical for some reason, you’ll 
probably have to do it via an extension using callbacks.

Another alternative might be to use a piecewise linear function to approximate 
your piecewise quadratic.

FWIW, if my memory serves me, I pretty sure there was a version of MATPOWER 
many, many years ago (maybe version 2.0?) that included piecewise quadratic 
costs implemented similar to the current approach with piecewise linear 
functions. That is, it used a cost variable constrained below by a set of 
quadratic constraints.

    Ray


On Apr 27, 2023, at 2:24 PM, Mario Daniel Baquedano Aguilar 
<mariodaniel...@gmail.com> wrote:


Hi all,

After aggregating several generating units of the same type, I approximated the 
corresponding cost function (of the aggregated units).

The best approximation that I could get turned out to be a piecewise 
-quadratic-function (See snapshot below).
<image.png>

My question is:
Does anyone have any ideas on how to model a piecewise cost function for a 
single generating unit in MATPOWER?

I've been reading the MATPOWER Manual Section 7.2 on Callback Functions and 
Section 6.3 on Extended OPF Formulation for modeling user-defined cost terms, 
but it is yet not very clear to me.

On the other hand, I could approximate the above cost functions using the 
smoothed price-power curve approach suggested in the manual (then referencing 
[1]), but again, I  would have the same issue with how to implement it using 
MATPOWER since the resulting cost function might end up being nonlinear.

Any suggestion or hint will be highly appreciated.

Ref.
[1] Wang, H., Murillo-Sanchez, C.E., Zimmerman, R.D. and Thomas, R.J., 2007. On 
computational issues of market-based optimal power flow. IEEE Transactions on 
power Systems, 22(3), pp.1185-1193.


Fondly,


Mario Daniel Baquedano Aguilar, Ph.D. Candidate, E.E.
ECE University of Florida - Fulbright Scholar
DAAD Alumni - M.Sc. in Electrical Engineering
IEEE Power & Energy Magazine - Editor
IEEE Power & Energy Society - Gainesville Chapter - Chair
 m.baquedanoag...@ufl.edu<mailto:m.baquedanoag...@ufl.edu>; 
mariodaniel...@ieee.org<mailto:mariodaniel...@ieee.org>
+1 (352) 745-9542



Reply via email to