Dirk's suggestion is fine for a simple power flow. But if you want to run an OPF, where the generator dispatch is to be determined by the optimization, but subject to a constant power factor constraint, then you will need to supply an additional user-defined linear constraint. For example, if you want to run case9 with a constant power factor constraint of 0.95 on the first generator, you could do it like this ...

define_constants;
mpc = loadcase('case9');
nb = size(mpc.bus, 1);
ng = size(mpc.gen, 1);
pf = 0.95;
QPratio = sqrt(1/pf^2 -1);
%% add constraint that QPratio * Pg(1) - Qg(1) = 0
mpc.A = sparse([1; 1], [2*nb+1; 2*nb+ng+1], [QPratio; -1], 1, 2*nb+2*ng);
mpc.l = 0;
mpc.u = 0;
r = runopf(mpc);
resulting_pf = r.gen(1, PG) / sqrt(r.gen(1, PG)^2 + r.gen(1, QG)^2)

The important part here is defining the A matrix properly, where the columns correspond to voltage angles, voltage magnitudes, generator real injections, and generator reactive injections (2*nb + 2*ng columns in all). So the coefficients for our constraint co in the columns corresponding to Pg(1) and Qg(1).

-- 
Ray Zimmerman
Senior Research Associate
211 Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645

Attachment: pf_constraint_eg.m
Description: Binary data


On Mar 11, 2011, at 9:50 AM, Dirk Van Hertem wrote:

You model your generator as a load, so it is not represented in your gen matrix. Of course, if you want model your generator in a unit commitment, this may not be trivial...

Dirk

On 03/11/2011 12:32 PM, Roberto Carvalini wrote:
Thank you

How can I add? my problem is this

Best Wishes

Roberto 


On Fri, Mar 11, 2011 at 12:22, Dirk Van Hertem <[email protected]> wrote:
You can just define them as a PQ bus with negative power... (negative load)

Dirk


On 03/11/2011 12:11 PM, Roberto Carvalini wrote:
Hi

How can I define constant power factor in MAPOWER for example, for generators PF=0.9?

Please help me

Regards

Roberto




--
Dirk Van Hertem                       [email protected]
Electrical Engineering Department  http://www.esat.kuleuven.be/electa
K.U. Leuven, ESAT-ELECTA                     GSM: +32-(O)498-61.74.98
10, Kasteelpark Arenberg, B-3001 Heverlee        fax: +32-16-32.19.85





-- 
Dirk Van Hertem                       [email protected]
Electrical Engineering Department  http://www.esat.kuleuven.be/electa
K.U. Leuven, ESAT-ELECTA                     GSM: +32-(O)498-61.74.98
10, Kasteelpark Arenberg, B-3001 Heverlee        fax: +32-16-32.19.85 


Reply via email to