Pecewse Lnear Approxmaton of Generators Cost Functons Usng Max-Affne Functons Hamed Ahmad José R. Martí School of Electrcal and Computer Engneerng Unversty of Brtsh Columba Vancouver, BC, Canada Emal: hameda@ece.ubc.ca, jrms@ece.ubc.ca Al Moshref BBA Vancouver, BC, Canada Emal: al.moshref@bba.ca Abstract Nonlnear functons are often encountered n power system optmzatons. In ths paper, an effectve pecewse lnear (PWL) approxmaton technque s ntroduced whch shows promsng performance n lnearzng the nonlnear functons. Ths method uses a seres of lnear functons, called max-affne functons, to lnearze a multvarate functon over a bounded doman. The mportant advantage of ths method s ts ablty to decde on the sze of the subspaces, whch other methods are not capable of. It s also shown that usng the PWL approxmaton, sgnfcant effcency s achevable n computaton burden of most power system optmzatons, such as unt commtment. NOMENCLATURE B Network susceptance matrx. D Matrx product of the susceptance and nodencdent matrces. a, b, c Quadratc cost functon coeffcents. C SDn Shutdown cost. C SUp Startup cost. C T System total cost. N b, N g Sets of buses and generators, respectvely. N l, N t Sets of lnes and tme horzon, respectvely. P Generator actve power. P max, P mn Upper/lower lmts on generator actve power. P d Actve power demand. P L Actve power flow lmt of Lne. P SDn Generator mnmum power lmt at shutdown. P SUp Generator maxmum power lmt at startup. R Dn Generator power ramp-down lmt. R Up Generator power ramp-up lmt. s Number of PWL parttons. SDn, SUp Auxlary varables for shutdown/startup cost. u Generator status (: Off, 1: On ). δ Bus voltage angle. I. INTRODUCTION The ncreasng demand on real-tme operaton of power systems has led to numerous research studes on enhancng the power system analyss methods. Due to large-scale problems that need to be solved for real-sze power systems, specal numercal methods have been developed and utlzed by power system experts. Amongst most computatonally expensve problems n power system analyss, optmzaton of system operaton s of crucal mportance. Most of the optmzaton problems n power systems are bascally nonlnear, thus nonlnear programmng (NLP) technques have been wdely appled to these problems. As an example for contnuous optmzaton, the optmal power flow problem consderng AC constrants s an NLP problem, for whch a varety of methods have been proposed n the lterature, e.g. Interor Pont Method [1] and Trust-Regon Method [2]. However, due to the nonconvexty of the orgnal problem, most of the methods would probably get trapped n a local mnmum. As an example of combnatoral optmzaton, the unt commtment problem s nonconvex due to the bnary varables assocated wth the generators status (on/off). Havng a quadratc cost functon and nonlnear constrants, one has to deal wth a mxed-nteger nonlnear programmng (MINLP) problem, whch s NP-hard, and up to now, there s no effcent method for solvng large-scale MINLP problems. Varous versons of the unt commtment problem have been formulated n the lterature, focusng on lnearzng the constrants as well as the objectve functon, e.g. [3], [4]. In [3], the quadratc cost functons are lnearzed wthn the generator s output power lmts whch leads to 2s + 2 new constrants and s + 1 new varables (s s the number of sectons assumed for lnearzaton). Besde ncreasng the sze of the problem, t s not clear how to choose the ntervals and, therefore, t mght not lead to the best possble pecewse lnear (PWL) approxmaton of the functon. In [4], the convex envelope of the quadratc functon s obtaned and usng the perspectve cut, the lnear parts are added to the problem. The problem wth ths method s that a dynamc constrant has to be added to the orgnal problem whch slows down the soluton process. In addton, a lnearzaton technque s used n [5] to teratvely solve the MILP problem by replacng the objectve by ts lnear approxmaton. The method s known as the Kelley s theorem on the cuttng plane method for convex programs. However, many teratons and cuts are requred to reach to the soluton and the number of requred cuts s not predctable beforehand. In a more recent work, a mathematcal approach s employed to fnd the PWL approxmaton of the quadratc cost functons [6]. Usng ths method, the length of the ntervals can
be selected optmally so that a good PWL approxmaton s obtaned. Although ths s beleved to be a tghter approxmaton comparng to the prevous methods, t s not necessarly the best PWL approxmaton. In addton to the quadratc cost functons of generators, there are more nstances of nonlnear functons n power system studes, many of whch could be a mult-varable functon. The problem of fttng a PWL approxmaton to a mult-dmensonal set of data (possbly obtaned by evaluatng a nonlnear functon at dfferent ponts) has been studed before. The least-squares and Neural Network methods are among the most-used approaches n curve-fttng. In order to fnd the best PWL approxmaton wth a fxed number of segments avalable, Magnan and Boyd have proposed a convex PWL fttng technque whch s based on the so-called Max-Affne functon [7]. Ths method s capable of provdng PWL approxmatons for multvarate functons. Ths approach has specfc applcaton n convex optmzaton. To the best of authors knowledge, ths s the frst tme n power system studes that the Max-Affne functons are used for PWL applcatons. The capabltes of ths method are shown through numercal examples. Ths s the startng pont for the numerous possbltes of these famly of PWL approxmatons n mathematcal programmng and optmzaton of power systems. The rest of the paper s organzed as follows. In Secton II, the PWL technques are revewed and llustratve examples are presented. In Secton III the applcaton of the PWL technque n unt commtment problem and ts mpact on the soluton qualty and computatonal effcency are evaluated. The paper s concluded by hghlghtng the man contrbutons and fndngs of the present study. II. PIECEWISE LINEAR APPROXIMATION OF MULTIVARIATE FUNCTIONS Assume a functon of mult varables, say f(x) wth x R n, s defned wthn a bound on x, say x D = {x x x x}. Dependng on the level of precson requred, f(x) can be approxmately expressed as PWL functons over small sub-ntervals nsde D. For nstance, consderng s ntervals, one can derve the followng as a PWL approxmaton of f(x): ˆf(x) = a T 1 x + b 1, x D 1 a T 2 x + b 2, x D 2. a T s x + b s, x D s n whch a R n, b R and the followng holds: D = D and D = (2) 1 s 1 s and on the borders of sequental D, the lnear segments are connected, whch means that ˆf(x) s contnuous. Although (1) sounds nterestng, there are real challenges n dervng ˆf(x). The frst challenge s how to mesh D nto ts subspaces D. The second possble challenge s how to choose the smallest s whle stll mantanng a good accuracy (1) n the approxmaton. In order to clarfy ths and wthout loss of generalty, let the dmenson of x be one. In the followng, the mentoned challenges are dscussed n more detals. A. PWL Approxmaton for Convex Quadratc Functons In ths secton, the dmenson of the problem s reduced to one for llustratve purposes. Assume that f(x) s a convex quadratc functon of the form f(x) = ax 2 + bx + c, a >, x x x (3) 1) Mathematcal Background: It s obvous that the most nterestng PWL approxmaton of f s the one wth the fewest lnear parts and hghest accuracy. It s also clear that havng more accuracy requres greater number of lnear parts. However, f the PWL approxmaton s gong to be used n, for example, an optmzaton problem, fewer segments s more nterestng. Therefore, practcal purposes lmt the maxmum number of segments one can use n the PWL approxmaton. Now, the queston that remans s havng a lmt on s, what s the best ˆf(x)? In order to answer the above queston, t should be recalled that ˆf(x) can be expressed n more compact form as (referred to as Max-Affne functon n [7]) ˆf(x) = max 1 s {α x + β } (4) whch surprsngly has no constrants on the subspaces on whch the lnear approxmatons are defned. The best ˆf(x), wth fxed s and m pont-wse functon evaluatons, can then be obtaned usng the followng least-squares problem: mn α,β m ( ) 2 max {α x k + β } f(x k ) (5) 1 s k=1 Unfortunately, ths problem s not convex [7]. However, an effcent method s proposed n [7] to fnd the soluton of (5). Ths method s based on choosng the ntal subspaces (.e. D ) and updatng them teratvely to fnd the best possble mesh on D. Besde that algorthm, there are commercal solvers capable of handlng these types of problems, whch are usually categorzed as non-smooth problems. Some nstances are CONOPT, MINOS, LGO and IPOPT, all avalable n GAMS under the opton nonlnear programmng wth dscontnuous dervatves [8]. The dscusson on the algorthms for solvng non-smooth optmzaton problems s beyond the scope of ths paper and the reader s referred to the software user manual. 2) Numercal Example: Here, a numercal example for PWL approxmaton of a cost functon for a thermal generaton unt s presented. The coeffcents n (3) are assumed to be a =.9, b = 1, c = 2, x = 1, x = 2. Assume that only two segments are allowed,.e. s = 2. Fgure 1 shows the orgnal quadratc functon, the PWL upper approxmaton (e.g. used n [3]) obtaned by halvng the space, and the PWL max-affne approxmaton. The followng remarks are observed:
Normalzzed Densty Normalzed Densty Normalzed Densty Normalzed Densty Cost ($/hour) Halvng the avalable space s not the optmum way of meshng (Ponts A and B n Fg. 1 are not equal). The PWL upper approxmaton has no ntersecton wth the orgnal functon wthn the ntervals but on the two ends. The PWL max-affne approxmaton has 2 ntersectons wth the orgnal functon wthn each nterval (P 1, P 2 n the frst nterval and P 3, P 4 n the second one n Fg. 1). The average of the relatve absolute errors for the PWL upper approxmaton s 32% whle ths value for the PWL max-affne approxmaton s 2%. 3.5 3 2.5 2 1.5 1.5 -.5 4 x 14 PWL max-affne Orgnal quadratc PWL upper approx. P 1 P 2 A B 2 4 6 8 1 12 14 16 18 2 P (MW) Fgure 1. Comparson between the PWL upper and max-affne approxmaton technques..8.6.4.2.8.6.4.2 s = 1 15 77 139 21 263 324 386 448 s = 3 2 12 22 31 41 5 6 69 Relatve Error (%).6.45.3.15.26.2.13.7. P 3 s = 2 P 4 3 17 3 44 57 71 84 98 s = 4.3 1.4 2.5 3.6 4.7 5.9 7. 8.1 Relatve Error (%) Fgure 2. Hstograms of relatve errors between the lnearzed and orgnal functons obtaned usng the PWL max-affne approxmaton..15.12.9.6.3.45.36.27.18.9 s = 1 8 39 71 12 133 165 196 227 s = 3 2 11 19 28 37 45 54 63 Relatve Error (%).3.24.18.12.6.5.4.3.2.1 s = 2 4 18 32 46 6 75 89 13 s = 4 1 7 13 19 25 31 37 43 Relatve Error (%) Fgure 3. Hstograms of relatve errors between the lnearzed and orgnal functons obtaned usng the PWL upper approxmaton. Table I AVERAGE OF THE RELATIVE ABSOLUTE ERRORS FOR DIFFERENT VALUES OF s OBTAINED BY TWO PWL TECHNIQUES PWL Technque Number of Parttons (s) 1 2 3 4 Average of relatve Upper Approxmaton 95.3 31.8 15.5 9.45 absolute errors (%) Max-Affne Functons 9.5 2.1 9.2 1.3 It s obvous that the PWL max-affne approxmaton s more effcent than the other method. Moreover, the method s able to decde the optmal length of the ntervals. Table I shows the average of relatve absolute errors for dfferent values of s. Also, Fgs. 2 and 3 depct the hstograms of the relatve absolute errors for dfferent values of s usng the PWL max-affne and upper approxmatons, respectvely. As can be seen, the average relatve error for the PWL max-affne approxmaton s sgnfcantly less than the same values for the PWL upper approxmaton. A. Mn-Max Optmzaton III. APPLICATIONS If the nonlnear functon happens to be n the objectve of a mnmzaton programmng, the PWL max-affne approxmaton leads to a lnear reformulaton of the objectve. Ths type of problems s referred to as Mn-Max optmzaton. Mathematcally, t s descrbed as mn max x D 1 s {αt x + β } (6) By ntroducng a new varable, z = max{α T x+β }, the above problem s reformulated as mn z x D subject to z α T x + β, = 1,..., s. (7a) (7b) Therefore, by ntroducng one extra varable and s extra nequaltes, the problem s reformulated as a lnear programmng (assumng other constrants to be lnear). Ths has tremendous applcatons n power system optmzaton. As an example, ths method s appled to the unt commtment problem n the followng. B. Unt Commtment Problem In ths secton, the lnearzaton technque s appled to the problem of unt commtment to show the mpact of the lnearzaton on computatonal effcency and qualty. The unt commtment problem s formulated here as follows (wthout loss of generalty, some of the constrants are not consdered here for smplcty). Mnmze C T = N g h N t ( ) z,h + SDn,h + SUp,h subject to the followng operatonal constrants: (8)
1) Actve Power Flow Equatons: P,h P d,h = Bj δ j (9) j N b 2) Lne Flow Lmts: P L 3) Generaton Lmts: j N b D,j δ j P L, N l (1) P mn u,h P,h P max u,h (11) 4) Shutdown/Startup Costs: SUp,h (u,h u,h 1 )C SUp, SUp,h (12) SDn,h (u,h 1 u,h )C SDn, SDn,h (13) 5) Ramp Lmts: P,h P,h 1 [u,h u,h 1 ]P SUp + [1 u,h ]P max P,h 1 P,h [u,h 1 u,h ]P SDn 6) System Reserve: ( u,h P max N g + [1 u,h 1 ]P max + u,h 1 R Up + u,h R Dn (14) (15) P,h ) P Res h (16) 7) Auxlary Constrants: These constrants correspond to the PWL of the quadratc terms n the objectve. z,h α,s P,h + β,s u,h (17) Note that when u,h =, t also follows that P,h =. Therefore, all the s nequaltes turn to be z,h, whch the solver chooses the zero value. It s trval to analyze the case of u,h = 1. C. Numercal Results In ths secton, the performance of the PWL approxmaton (.e. the qualty of the soluton and the effcency of the soluton process) s presented through two examples. A Sxbus system and the IEEE 118-bus test system are employed here for whch the unt commtment problem s solved. The system data can be found n [9]. In the sx-bus system, there are 3 generators and 7 branches. For the IEEE 118- bus system, there are 54 generators and 186 branches. Two approaches are used to solve the unt commtment problem. In the frst approach, the problem s formulated usng the orgnal quadratc cost functons, whch leads to a mxednteger quadratc programmng (MIQP) problem. There are commercal solvers capable of handlng MIQP problems, e.g. CPLEX [1]. In the second approach, the problem s formulated usng the PWL cost functons and assocated extra constrants, as gven n Secton III-B7. Ths leads to an MILP Table II UNITS SCHEDULES OBTAINED BY MIQP FOR THE SIX-BUS SYSTEM. Hour 1 2 3 4 5 6 7 8 G 1 14.6 1 1 1 1 1 13.7 16 G 2 - - - - - - - - G 6 84.2 78.1 71.1 66.8 67.2 73 83.2 85.5 Hour 9 1 11 12 13 14 15 16 G 1 11.9 123.1 146.5 125 128.3 129.1 131.9 135.6 G 2 - - - 29.5 32.8 33.6 36.4 4.1 G 6 9.4 1 1 1 1 1 1 1 Hour 17 18 19 2 21 22 23 24 G 1 135.7 13.7 13.3 125.7 125.7 123.2 115.9 115.7 G 2 4.2 35.2 34.8 3.2 3.2 27.7 - - G 6 1 1 1 1 1 1 95.4 95.2 Table III UNITS SCHEDULES OBTAINED BY MILP FOR THE SIX-BUS SYSTEM. Hour 1 2 3 4 5 6 7 8 G 1 1 1 1 1 1 1 1 1 G 2 - - - - - - - - G 6 88.9 78.1 71.1 66.8 67.2 73 86.9 91.5 Hour 9 1 11 12 13 14 15 16 G 1 11.4 123.1 146.5 124 124 124 124 13 G 2 - - - 3.5 37.1 38.6 44.3 46 G 6 1 1 1 1 1 1 1 1 Hour 17 18 19 2 21 22 23 24 G 1 13 124 124 124 124 124 111.2 11.9 G 2 46 42 41.2 31.9 31.8 26.8 - - G 6 1 1 1 1 1 1 1 1 problem, for whch there are effcent commercal solvers avalable, e.g. CPLEX [1]. All the problems are formulated n GAMS [8] and solved usng CPLEX [1] n ths paper. For the PWL procedure, four segments are chosen,.e. s = 4. Table II shows the unts schedules obtaned consderng the exact quadratc cost functons (MIQP). Table III shows the unts schedules for the sx-bus system obtaned usng the lnearzed objectve (MILP). As can be seen, the unt status ( on / off ) for both methods are dentcal. Also, the dfferences between the commtted generatons are mnor. The computatonal effcency of the two methods are compared n Table IV (obtaned usng an Intel Core 7-26 CPU @ 34 MHz). The relatve gap s defned as the relatve gap between the best objectve acheved up to the current teraton and the best lower bound. For the MIQP case, the solver could not reach to the zero relatve gap wthn the tme lmt of 1 s, whle for the MILP case, the proven optmal soluton has been acheved wthn a few seconds. The objectve value for the sx-bus system obtaned usng the MILP s hgher than the one obtaned by the MIQP. On the other hand, ths s the other way around for the IEEE 118-bus system. These results reveal that both methods would come up wth approxmately same objectve values. It s worthwhle to compare the problem sze wth the method proposed n [3]. The number of extra varables requred for PWL approxmaton for each generator n [3] s s + 1, whle n the mn-max formulaton, only one extra
Table IV COMPUTATIONAL EFFICIENCY OF MIQP AND MILP System Parameter MIQP MILP CPU Tme (s).63.13 Sx-bus Objectve Value ($/h) 15388 153975 Relatve Gap CPU Tme (s) 1 7.8 118-bus Objectve Value ($/h) 65433 65387 Relatve Gap.26 varable s needed. In addton, the number of constrants for each generator n [3] s 2s + 2, whle n the mn-max formulaton, only s constrants suffce. The applcatons of the PWL approxmaton s not lmted to the unt commtment problem. There are many other problems n power system optmzaton whch have a nonlnear objectve functon subject to some lnear constrants. For example, optmal power flow wth objectves such as mnmzng the cost or actve losses s one good example, especally when there s a need for multple run [11]. As another nstance, optmal transmsson lne swtchng for congeston management could be another applcaton [12]. [4] A. Frangon, C. Gentle, and F. Lacalandra, Tghter approxmated MILP formulatons for unt commtment problems, IEEE Trans. Power Syst., vol. 24, no. 1, pp. 15 113, Feb. 29. [5] A. Vana and J. P. Pedroso, A new MILP-based approach for unt commtment n power producton plannng, Int. Jour. Elect. Power & Energy Syst., vol. 44, no. 1, pp. 997 15, Jan. 213. [6] L. Wu, A tghter pecewse lnear approxmaton of quadratc cost curves for unt commtment problems, IEEE Trans. Power Syst., vol. 26, no. 4, pp. 2581 2583, Nov. 211. [7] A. Magnan and S. Boyd, Convex pecewse-lnear fttng, Optmzaton and Engneerng, vol. 1, no. 1, pp. 1 17, 29. [8] The General Algebrac Modelng System (GAMS). [Onlne]. Avalable: http://www.gams.com [9] Y. Fu, M. Shahdehpour, and Z. L, Securty-constraned unt commtment wth AC constrants*, IEEE Trans. Power Syst., vol. 2, no. 3, pp. 1538 155, Aug. 25. [1] IBM ILOG CPLEX optmzaton studo. [Onlne]. Avalable: http://www-1.bm.com/software/ntegraton/optmzaton/cplexoptmzaton-studo/ [11] H. Ahmad and H. Ghasem, Probablstc optmal power flow ncorporatng wnd power usng pont estmate methods, n 1th Int. Conf. Envr. Elec. Eng. (EEEIC), Rome, Italy, May 211, pp. 1 5. [12] M. Khanabad, H. Ghasem, and M. Doostzadeh, Optmal transmsson swtchng consderng voltage securty and N-1 contngency analyss, IEEE Trans. Power Syst., vol. Early Access, no. 99, pp. 1 9, 212. IV. CONCLUSION The nonlnear functons appearng n the objectve functon of mnmzaton problems are shown to be effcently lnearzable usng a pecewse lnearzaton (PWL) technque. The superorty of ths method over exstng PWL technques are demonstrated through examples. The man advantages of the ntroduced approach can be summarzed as follows: Hgher accuracy n lnearzaton s acheved by applyng the max-affne PWL technque. The sze of the subspaces (on whch the lnear approxmatons are defned) are selected optmally by ths method. The method s able to lnearze a multvarate functon n mult-dmensonal space. If the nonlnear functon s n the objectve, the advantage can be taken of by mnmzng a lnear functon subject to a few affne nequaltes. Sgnfcant savng n computaton tme can be acheved when transformng a mxed-nteger nonlnear programmng problem (wth only the objectve beng nonlnear) to a lnear verson. As future work, further research s undertaken to apply ths competent technque to other areas of power system optmzaton. REFERENCES [1] Y.-C. Wu, A. S. Debs, and R. E. Marsten, A drect nonlnear predctorcorrector prmal-dual nteror pont algorthm for optmal power flows, IEEE Trans. Power Syst., vol. 9, no. 2, pp. 876 883, May 1994. [2] A. A. Sousa, G. L. Torres, and C. A. Cañzares, Robust optmal power flow soluton usng trust regon and nteror-pont methods, IEEE Trans. Power Syst., vol. 26, no. 2, pp. 487 499, May 211. [3] M. Carron and J. M. Arroyo, A computatonally effcent mxed-nteger lnear formulaton for the thermal unt commtment problem, IEEE Trans. Power Syst., vol. 21, no. 3, pp. 1371 1378, Aug. 26.