Download Matpower 4.0 User`s Manual - Power Systems Engineering
Transcript
The sections below will describe each stage and the input and output arguments for the corresponding callback function, which vary depending on the stage. An example that employs additional variables, constraints and costs will be used for illustration. Consider the problem of jointly optimizing the allocation of both energy and reserves, where the reserve requirements are defined as a set of nrz fixed zonal MW quantities. Let Zk be the set of generators in zone k and Rk be the MW reserve requirement for zone k. A new set of variables r are introduced representing the reserves provided by each generator. The value ri , for generator i, must be nonnegative and is limited above by a user-provided upper bound rimax (e.g. a reserve offer quantity) as well as the physical ramp rate ∆i . 0 ≤ ri ≤ min(rimax , ∆i ), i = 1 . . . ng (6.2) If the vector c contains the marginal cost of reserves for each generator, the user defined cost term from (5.21) is simply fu (x, z) = cT r. (6.3) There are two additional sets of constraints needed. The first ensures that, for each generator, the total amount of energy plus reserve provided does not exceed the capacity of the unit. pig + ri ≤ pi,max , i = 1 . . . ng (6.4) g The second requires that the sum of the reserve allocated within each zone k meets the stated requirements. X ri ≥ Rk , k = 1 . . . nrz (6.5) i∈Zk Table 6-1 describes some of the variables and names that are used in the example callback function listings in the sections below. 6.2.1 ext2int Callback Before doing any simulation of a case, Matpower performs some data conversion on the case struct in order to achieve a consistent internal structure, by calling the following. mpc = ext2int(mpc); 46