MATPOWER / matpower

MATPOWER – steady state power flow simulation and optimization for MATLAB and Octave
https://matpower.org
Other
417 stars 150 forks source link

Bug in var limiting in CPF #4

Closed sdraoasu closed 7 years ago

sdraoasu commented 7 years ago

I noticed for case300, while the maximum generator var limits were being respected, the minimum var limit of one generator was being violated at the LIB. The generator at bus number 76 (generator status is 1), has a QG of 0 MVAr at the LIB whereas its minimum QG is 12 MVAr. Hence, the violation was greater than the default tolerance for limit detection (0.01 MVAr).

Also, for a larger test case with 6000 buses,, 33 generators were violating the max. var limit, while 61 generators were violating the min. var limit out of 531 committed generators.

Here is a sample code I used: mpcb=loadcase('case300'); mpct = mpcb; % set up target case with mpct.bus(:, PD) = mpcb.bus(:, PD)5; % and increased load mpct.bus(:, QD) = mpcb.bus(:, QD)5; % and increased load mpct.gen(:, PG) = mpcb.gen(:, PG)*5; % and increased gen mpopt = mpoption('cpf.stop_at', 'NOSE','cpf.enforce_q_lims',1,'cpf.enforce_p_lims',0); results = runcpf(mpcb, mpct, mpopt);

rdzman commented 7 years ago

(copied from MATPOWER-L post)

I haven’t finished tracking it down, but it looks like it’s related to the fact that the bus gets converted to a PQ bus during the initial power flow, before the continuation even starts. Then, for some reason, the solved reactive power setting (which is equal to Qmax at 35 MVAr) is not carried over to the target case. So, when the continuation begins, the target case has Qg = 0, the base case has Qg = 35 and in both cases it is a PQ bus.