Russ Patterson wrote:

Hi friends,

 

Per Table 4-2 in the manual, I want to increase the number of iterations to solve my power flow.  So, I added a line to my .m file as you see below.  But, it seems to be ignored as I only get 10 iterations.  Is this the proper place to specify?

 

 

%% MATPOWER Case Format : Version 2

mpc.version = '2';

%

%% Try to run more than the default 10 iterations

%pf.alg = 'NR';

pf.nr.max_it = 30;

 

Here was result:

 

Newton's method power flow (power balance, polar) did not converge in 10 iterations.

 

>>>>>  Did NOT converge (3.60 seconds)  <<<<<

 

 

Thank you,

russ

 

p.s. Just fyi, when I search the pdf manual on “pf.nr.max” it works fine.  Searching on “pf.nr.max_it” finds nothing.   If I replace the underscore with a space then search will find occurences of pf.nr.max_it just fine (“pf.nr.max it”). Weird!

Russ:

The options structure must be passed along as an optional argument to runpf().  Something along these lines:

method 1: tell mpoption to modify a specific field in the returned structure
>> myoptions = mpoption('pf.nr.max_it', 20)
>> mpc_out = runpf('case30', myoptions);

method 2: create a default options structure and manually modify a field in it:
>> myoptions = mpoption;
>> myoptions.pf.nr.max_it = 20;
>> mpc_out = runpf('case30', myoptions);

Note that all MATPOWER functions also use the traditional MATLAB "help" documentation;  I suggest that you do these at least:

>> help caseformat
>> help mpoption
>> help idx_bus
>> help idx_gen
>> help idx_brch
>> help idx_cost
>> help runpf

carlos.


Reply via email to