6.3 Extended OPF Formulation

Matpower employs an extensible OPF structure to allow the user to modify or augment the problem formulation without rewriting the portions that are shared with the standard OPF formulation described above. The standard formulation is modified by introducing additional variables, user-defined costs, and/or user-defined constraints. The full extended formulation can be written as follows:

min f(x) + fu(ˆx)
 ˆx
(6.34)

subject to

    ˆg(ˆx) = 0                               (6.35)
    ˆ
    h(ˆx) ≤ 0                               (6.36)
ˆxmin ≤ ˆx ≤ ˆxmax                            (6.37)

  l ≤ A ˆx ≤ u                              (6.38)

The first difference to note is that the optimization variable x  from the standard OPF formulation has been augmented with additional variables z  to form a new optimization variable ˆx  , and likewise with the lower and upper bounds.

     [   ]          [      ]          [       ]
       x              xmin               xmax
xˆ=    z     ˆxmin =   zmin     ˆxmax =    zmax
(6.39)

Second, there is an additional user-defined cost term fu(ˆx)  in the objective function. This cost consists of three pieces that will be described in more detail below.

fu(ˆx) = fq(ˆx) + fnln(ˆx) + flegacy(ˆx)
(6.40)

Third, the nonlinear constraints g  and h  are augmented with user defined additions gu  and hu  to give gˆ  and ˆh  .

       [        ]           [       ]
ˆg(ˆx ) =   g(x)   ,  ˆh (ˆx) =   h (x)                   (6.41)
          gu(ˆx)               hu(ˆx)
And finally, a new set of linear constraints are included in (6.38).

Up through version 6.0 of Matpower, the OPF extensions were handled via optional input parameters that define any additional variables,35 linear constraints,36 and costs of the pre-specified form defined by f
 legacy   .37 This preserved the ability to use solvers that employ pre-compiled MEX files to compute all of the costs and constraints. This is referred to as Matpower’s legacy extended OPF formulation [27].

For the AC OPF, subsequent versions also include the general nonlinear constraints gu  and hu  , and the quadratic and general nonlinear costs fq   and fnln   . The new quadratic cost terms can be handled by all of Matpower’s AC OPF solvers, but the general nonlinear costs and constraints require a solver that uses Matlab code to implement the function, gradient and Hessian evaluations.38

Section 7 describes the mechanisms available to the user for taking advantage of the extensible formulation described here.

6.3.1 User-defined Variables

The creation of additional user-defined z  variables can be done explicitly or implicitly based on the difference between the number of columns in A  and the dimension of the standard OPF optimization variable x  . The optional vectors zmin   and zmax   are available to impose lower and upper bounds on z  , respectively.

6.3.2 User-defined Constraints

6.3.3 User-defined Costs

The user-defined cost function fu  consists of three terms for three different types of costs: quadratic, general nonlinear, and legacy. Each term is a simple summation over all of the cost sets of that type.

           ∑    j
   fq(ˆx ) =   j fq(ˆx)                          (6.44)
  fnln(xˆ) = ∑  fj  (xˆ)                         (6.45)
            ∑ j nln
flegacy(xˆ) =   j fjlegacy(ˆx)                      (6.46)