Hi,
Thanks for the reply ! That really helps. But I still have a little questions.
To output the maximum active power at the Nose Point for each bus, I think I 
should use results.bus( : , PD) rather than results.gen( : , PG), is that 
correct? Cause when I use results.gen( : , PG) for buses that no generators are 
connected to,  it shows Index in position 1 exceeds array bounds (must not 
exceed 3). But if I use results.bus( : , PD) for buses  4 & 6 & 8 for ‘case9’, 
the output P_max is 0. Could you please help me with that?


define_constants;
mpopt = mpoption('out.all',0,'verbose',2,'out.bus',1); 
mpopt=mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step',0.2);
mpopt=mpoption(mpopt,'cpf.plot.bus',6,'cpf.plot.level',2);
mpcb = loadcase('case9'); % load base case
mpct = mpcb; % set up target case with
mpct.gen(:,[PG QG]) = mpcb.gen(:,[PG QG])*2
mpct.bus(:,[PD QD]) = mpcb.bus(:,[PD QD])*2
results = runcpf(mpcb, mpct, mpopt);
Vm = results.bus(6,8)   % 8 means Vm in idx_bus
P_max = results.bus(6,3)   % 2 means PG in idx_gen.m ; 3 means PD in idx_bus.m

And could you please tell me how to set the indicator(like cps.step or the 
multiple-factor) for the target case? Cause I have tried to write the target 
case for case4gs and case5, it always shows that Corrector did not converge in 
10 iterations, How should I change it?
Thank you!!!!

Regards,
Cynthia

>>

在 2019年7月1日,20:33,Ray Zimmerman <r...@cornell.edu<mailto:r...@cornell.edu>> 写道:

Hi Cynthia,

See responses to your questions below …

    Ray


On Jun 30, 2019, at 5:06 PM, W Ruoyu 
<cynthiaw1...@hotmail.com<mailto:cynthiaw1...@hotmail.com>> wrote:

<snip>

Could you please tell me the meaning of Vm = results.bus(:,8)? Why would it 
output the voltage magnitude at the nose point for all the buses?

This is simply to demonstrate how to extract the vector of bus voltage 
magnitudes at the nose point, in case you were interested in that information.

and how could I output the maximum real power at the nose point?

When setting the cpf.stop_at option to 'NOSE' (and yes, case does matter), the 
results struct contains the solution at the nose point where the continuation 
procedure terminates. So you can get the vector of power generation from 
results.gen(:, PG).

If the final result I need is (maximum P - initial P)/(maximum P), should I use 
the maxloadlim function?

The maxloadlim() function is another approach to finding the nose point, via 
OPF instead of CPF, so there’s no need to use it if CPF is finding the nose 
point without trouble. You would simply use something like …

initP = sum(    mpc.gen(:, PG));
maxP  = sum(results.gen(:, PG));
desired_result = (maxP - initP) / maxP;



Reply via email to