Vids, It looks correct to me. Are you sure that it isn’t just that a large amount of negative VArs are needed to satisfy all of the voltage and line flow constraints?
Ray > On Oct 17, 2014, at 3:59 PM, vids <vidaj...@gmail.com> wrote: > > Dear Dr Ray, > > I was able to implement what i wanted when I said I was trying to > implement an OPF where the real power dispatch is > pre-determined (as in the case of an energy market where the Q > schedules are managed separately by the transmission operator), by > fixing the Pmin=Pmax equal to the energy schedules, and allowing only > one "slack" bus to move, since the real power variation was only > minimal. > > Now I am trying to determine an optimum "reactive power schedule" by > trying to simulate the given the current ancillary service payment > arrangement here in our country. The reactive power outputs of > generators beyond 0.9 lead and 0.85 lag are paid with fixed 4$/kVAr > cost. All reactive power generated within these limits are not > compensated. > > So i tried to model this scenario by using a piecewise linear cost > function for generators. The cost function below is for one specific > generator in my data. > > 1 0 0 5 -78 4000 -51.82 -0.000001 0 0 > 66.3 0.000001 102 4000; > > Please see attached figure for the cost function I wanted to achieve. > Basically I wanted the solution of the OPF to schedule as much MVArs > in region A. However it seems that because of the (-) negative term > for the reactive power absorption, it tends to schedule more MVArs in > region B. > > Did I use the piecewise linear function correctly? How can I improve > my cost function model to achieve the least amount of VArs shceduled > outside region A? Thank you very much Sir. > > Vids > > On Fri, Oct 17, 2014 at 2:52 AM, Ray Zimmerman <r...@cornell.edu> wrote: >> If you used the A, l and u fields of the MATPOWER case struct (mpc) to >> specify the constraints, then the multipliers are in … >> >> results.lin.mu.l.usr >> results.lin.mu.u.usr >> >> Note that these will be relative to power in p.u. not in MW, so you’ll have >> to divide by baseMVA to get prices in $/MW. >> >> -- >> Ray Zimmerman >> Senior Research Associate >> B30 Warren Hall, Cornell University, Ithaca, NY 14853 USA >> phone: (607) 255-9645 >> >> >> On Oct 16, 2014, at 12:52 PM, vids <vidaj...@gmail.com> wrote: >> >> Hi Dr Zimmerman, >> How do i access the multipliers for the additional constraint that I >> added? thank you >> >> On Tue, Sep 2, 2014 at 10:26 PM, Ray Zimmerman <r...@cornell.edu> wrote: >> >> Can you accomplish what you want simply by including the base dispatch in >> the PD column of the bus matrix (where injections would appears as negative >> loads)? >> >> -- >> Ray Zimmerman >> Senior Research Associate >> B30 Warren Hall, Cornell University, Ithaca, NY 14853 USA >> phone: (607) 255-9645 >> >> On Aug 28, 2014, at 10:10 PM, vids <vidaj...@gmail.com> wrote: >> >> Thank you very much, Dr. Shri. Yes i think your suggestion about >> making the delta Pg as the control variables is a great idea. However >> I am new to Matpower. Can you help me/ direct me to some examples on >> how i can accomplish this? Thank you very much... >> >> On Thu, Aug 28, 2014 at 12:23 AM, Abhyankar, Shrirang G. >> <abhy...@mcs.anl.gov> wrote: >> >> Vids, >> Implementing your reformulated OPF equations, written in complementarity >> form, is non-trivial in MATPOWER as it will require modifying the >> variable/equation sizes and muddling with the OPF data structures. Note >> that you'll also need additional equations, perhaps expressed in >> semi-smooth form, relating your upward/downward balancing service to >> generator power deviation. You will have to spend some time to understand >> the OPF data structures and how they are used in the various OPF routines. >> >> One other possible way (that I think will work) is by using the real power >> generator deviation \Delta{Pg} as the control variable instead of Pg (see >> the attached equations). This will keep the sizes of the >> variables/equations for the reformulated OPF same as the original one. >> However, you will have to modify the cost function, gradient, Hessian, and >> the generator real power limits accordingly. >> >> Shri >> >> -----Original Message----- >> From: vids <vidaj...@gmail.com> >> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu> >> Date: Wed, 27 Aug 2014 16:18:14 +0800 >> To: <matpower-l@cornell.edu> >> Subject: Modifying the Power Balance Equations >> >> Hi Dr Zimmerman and Matpower Community, >> >> I am trying implement an OPF where the real power dispatch is >> pre-determined (as in the case of an energy market where the Q >> schedules are managed separately by the transmission operator). >> >> Is it possible to implement it in Matpower? My idea is to add "slack" >> variables in the nodal energy equations >> >> Pgi - ΔPgi + Pb1i - Pb2i - Pdi = ΣViVjYij(cos(θij + δi -δj) >> >> Pgi - fixed/predetermined real power generated at node i >> ΔPgi - real power 're-scheduling' due to the reactive power dispatch >> Pb1i - upward balancing service at node i >> Pb2i - downward balancing service at node i >> >> Pb1i and Pb2 will have non-zero values when ΔPgi is nonzero, prompting >> other generators to compensate the real power 're-scheduling' when >> needed. >> >> This is the formulation in the dissertation of Dr. El-Samahy, and I >> am wondering if this can be implemented in matpower. >> >> Any ideas would greatly be appreciated. Thank you very much. >> >> -- >> 2 Cor 12:9 >> Each time he said, "My grace is all you need. My power works best in >> weakness." So now I am glad to boast about my weakness, so that the >> power of Christ can work through me. >> >> >> >> >> >> >> -- >> 2 Cor 12:9 >> Each time he said, "My grace is all you need. My power works best in >> weakness." So now I am glad to boast about my weakness, so that the >> power of Christ can work through me. >> >> >> >> >> >> >> -- >> 2 Cor 12:9 >> Each time he said, "My grace is all you need. My power works best in >> weakness." So now I am glad to boast about my weakness, so that the >> power of Christ can work through me. >> >> >> > > > > -- > 2 Cor 12:9 > Each time he said, "My grace is all you need. My power works best in > weakness." So now I am glad to boast about my weakness, so that the > power of Christ can work through me. > <cost function.jpg>