Well … QPratio * Pg(i) - Qg(i) is not the power factor. So limiting it to a 
range ...

-0.95 <= QPratio * Pg(i) - Qg(i) <= 0.95

… does *not* limit power factor to that range. You want a linear constraint on 
Pg and Qg that is equivalent to abs(pf) <= 0.95. Just plug in the correct 
definition of power factor in terms of Pg and Qg and do some algebra to get the 
correct constraints.

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



On Jan 10, 2014, at 4:34 AM, Dailan Xu <[email protected]> wrote:

> Dear Dr. Zimmerman,
> 
> Thank you. It gives the same results as before. Nothing is changed. I want to 
> replace zero "0" in upper and lower limits with -0.95 and 0.95 (-0.95 <= 
> QPratio * Pg(i) - Qg(i) <= 0.95). I know what is power factor.  If possible, 
> please help me. I will be very grateful.
> 
> 
> In previous post you explained it as follow:
> 
> "The A matrix is from equation (5.25) in the User's Manual, where x is 
> defined in (5.5). So as it says in the example code I provided you, the 
> constraint we want to implement is ...
> 
> 0 <= QPratio * Pg(i) - Qg(i) <= 0
> 
> This is an equality constraint that forces a constant ratio between Qg(i) and 
> Pg(i), in other words, a constant power factor. So we need to define A such 
> that A * x = QPratio * Pg(i) - Qg(i), which means that A needs to have 
> QPratio in the column corresponding to Pg(i) and -1 in the column 
> corresponding to Qg(i). If you look at equation (5.5), you'll see that Pg(i) 
> is found in element (2*nb + i) of x and Qg(i) in element (2*nb+ng+i). The 
> sparse statement constructs this A matrix, and l and u from (5.25) are set to 
> zero."
> 
> Best regards,
>  
> 

Reply via email to