PF Convergance

2015-08-14 Thread Syed, Waqas Ahmad Raazi
Hi everyone,

So, I was having trouble with PF convergance and then I looked into Faq#5 Why 
does MATPOWER power flow not 
converge?http://www.pserc.cornell.edu//matpower/#pfconvergence


Now in that FAQ, I am having trouble with point number 5. When I try to run the 
CPF from 0 load and generation to the target case, I get following errors and 
warnings:

step   1 : lambda =NaN, corrector did not converge in 10 iterations
NaN's cannot be converted to logicals.

Error in printpf (line 175)
nzld = find((bus(:, PD) | bus(:, QD))  bus(:, BUS_TYPE) ~= NONE);

Error in runcpf (line 392)
printpf(results, 1, mpopt);

Error in Wildpoldsried_Extraction (line 236)
results = runcpf(mpcbase, mpctarget);


Warnings:
Warning: Matrix is singular to working precision.
 In newtonpf at 89
  In runcpf at 203
  In Wildpoldsried_Extraction at 236
Warning: Matrix is singular to working precision.
 In cpf_predictor at 71
  In runcpf at 249
  In Wildpoldsried_Extraction at 236


Kindly let me know if you guys have any idea on how to address these issues.


Kind Regards,
Waqas


Re: convergence problem in runpf.

2015-08-14 Thread Abhyankar, Shrirang G.
Jose,
  Would it be fine with you if the steps you’ve mentioned below are added to 
MATPOWER FAQ#5 http://www.pserc.cornell.edu//matpower/#pfconvergence  Many a 
times, useful and detailed suggestions, such as what you’ve enumerated, get 
lost in email exchanges and someone trying to pull up this information has to 
resort to digging it out of the archive. It’ll be good to have your steps up on 
the FAQ.

Thanks,
Shri

From: Jose Luis Marin mari...@gridquant.commailto:mari...@gridquant.com
Reply-To: MATPOWER discussion forum 
matpowe...@list.cornell.edumailto:matpowe...@list.cornell.edu
Date: Wednesday, August 12, 2015 at 2:42 AM
To: MATPOWER discussion forum 
matpowe...@list.cornell.edumailto:matpowe...@list.cornell.edu
Subject: Re: convergence problem in runpf.

Mirish,

I couldn't help notice that you're building this model from scratch (well, from 
a database) and you mentioned To make the problem simple I used all buses as 
PQ buses except one slack bus.   This actually makes it harder to converge, 
unless you have *very* accurate data on what the reactive injections Q (on 
generator buses) should be.

May I suggest a different, incremental approach:

  1.  Start by keeping all generator buses you can as PV, instead of PQ. They 
will help holding up the voltage profile.  After all, a PV node is a slack bus 
in what regards the reactive power injection.
  2.  For the loads, start by zeroing out PD (real power demand), but keeping 
QD (reactive demand)
  3.  For generators, set the scheduled PG to zero
  4.  For lines  transformers, zero out the resistance R
  5.  The resulting network will be a purely reactive power model. Now run a 
powerflow.  If this doesn't have a feasible powerflow solution, it is because 
some branches have an X parameter that is too large (or equivalently, some load 
QD is too large).  Ramp down the profile of QD until you see convergence.
  6.  Look at the resulting Q flows across branches, and try to detect 
anomalously large values (i.e. clear outliers). They will help you uncover 
values of X that may be wrong (too large).  Also, keep an eye on negative X 
coming from equivalents such as 3-winding transformers; they may also be wrong.
  7.  Once you get that working, ramp up the values of PD on loads and PG on 
generators (keeping an eye on the swing's resulting PG, in order to 
redistribute big excesses).
  8.  Finally ramp up the resistance on lines.

The whole idea is based on the fact that, for transmission networks (lines with 
RX), the reactive flows are like the backbone on which real power flows can 
sort of ride on.  Get a healthy backbone first, and then you can start 
transporting real power.

Hope it helps,

--
Jose L. Marin
Gridquant España SL
Grupo AIA


On Wed, Aug 12, 2015 at 2:36 AM, Mirish Thakur 
mirishtha...@gmail.commailto:mirishtha...@gmail.com wrote:
Dear Mr.Shree,

Thank you very much for your help. As per your suggestion and FAQ I tried to 
find out the problems.
The results I got-
1) Fast-decoupled power flow did not converge in 30 iterations.
2) By following   http://www.pserc.cornell.edu/matpower/#pfconvergence  I tried 
to runcpf to get good  initial guess and i got results like
step   1 : lambda =  0.084, corrector did not converge in 10 iterations. Where 
lambda is  1 and for reducing steady state loading limitation I reduced demand 
less than 60 % which also failed to converge the power flow.
3) Also I tried to run an optimal power flow according to Dr. Ray's explanation 
 given in following link-

https://www.mail-archive.com/search?l=matpower-l@cornell.eduq=subject:%22Re%5C%3A+%5C%5BMatpower%5C%5D+3500+bus+simulation%22o=newest

but got the results like-

MATPOWER Version 5.1, 20-Mar-2015 -- AC Optimal Power Flow
MATLAB Interior Point Solver -- MIPS, Version 1.2, 20-Mar-2015
 (using built-in linear solver)
 itobjective   step size   feascond gradcond compcond costcond
   -    
  0 1200199.7 2.41677 0.71  536.7620
  1 946197.39 15.531   1.3682  1.75871  525.914 0.209885
  2 954529.91 15.405 0.766107 0.203773  297.341   0.00871422
  3  954849.8 12.849 0.7277120.0545952  258.471   0.00033166
  4 954629.03  13035  0.69114 0.107402  258.048  0.000228815
  5 954614.88  33406 0.692682 0.255673  257.828  1.46744e-05
  6 954525.69  14111 0.579613 0.143897  256.765  9.24569e-05
  7 954539.42  61648 0.581139 0.501345  255.994  1.42362e-05
  8 954518.93  22452 0.573652 0.478609  255.465  2.12443e-05
  9 954494.92 8540.4 0.556318 0.403754  254.653  2.48944e-05
 10 954523.58  20366 0.556265 0.570707  254.104  2.97206e-05
 11 954522.07 6142.4 0.554989 0.647881  256.561  1.57288e-06
 12 954573.42 

Re: convergence problem in runpf.

2015-08-14 Thread Mirish Thakur
Dear Jose and Shree,

Thank you very much for your guidance. I followed the step as you suggested
and runpf converged in 8 iterations. Actually there were three PQ buses
 which had excessive Q demand and when I reduced the Q demand for those
buses then it converged properly.

Nice regards
Mirish Thakur
KIT University.



On Wed, Aug 12, 2015 at 9:42 AM, Jose Luis Marin mari...@gridquant.com
wrote:

 Mirish,

 I couldn't help notice that you're building this model from scratch (well,
 from a database) and you mentioned ***To make the problem simple I used
 all buses as PQ buses except one slack bus*.   This actually makes it
 harder to converge, unless you have *very* accurate data on what the
 reactive injections Q (on generator buses) should be.

 May I suggest a different, incremental approach:

1. Start by keeping all generator buses you can as PV, instead of PQ.
They will help holding up the voltage profile.  After all, a PV node is a
slack bus in what regards the reactive power injection.
2. For the loads, start by zeroing out PD (real power demand), but
keeping QD (reactive demand)
3. For generators, set the scheduled PG to zero
4. For lines  transformers, zero out the resistance R
5. The resulting network will be a purely reactive power model. Now
run a powerflow.  If this doesn't have a feasible powerflow solution, it is
because some branches have an X parameter that is too large (or
equivalently, some load QD is too large).  Ramp down the profile of QD
until you see convergence.
6. Look at the resulting Q flows across branches, and try to detect
anomalously large values (i.e. clear outliers). They will help you uncover
values of X that may be wrong (too large).  Also, keep an eye on negative X
coming from equivalents such as 3-winding transformers; they may also be
wrong.
7. Once you get that working, ramp up the values of PD on loads and PG
on generators (keeping an eye on the swing's resulting PG, in order to
redistribute big excesses).
8. Finally ramp up the resistance on lines.

 The whole idea is based on the fact that, for transmission networks (lines
 with RX), the reactive flows are like the backbone on which real power
 flows can sort of ride on.  Get a healthy backbone first, and then you
 can start transporting real power.

 Hope it helps,

 --
 Jose L. Marin
 Gridquant España SL
 Grupo AIA


 On Wed, Aug 12, 2015 at 2:36 AM, Mirish Thakur mirishtha...@gmail.com
 wrote:

 Dear Mr.Shree,

 Thank you very much for your help. As per your suggestion and FAQ I tried
 to find out the problems.
 The results I got-
 1) Fast-decoupled power flow did not converge in 30 iterations.
 2) By following   http://www.pserc.cornell.edu/matpower/#pfconvergence
 I tried to runcpf to get good  initial guess and i got results like
 step   1 : lambda =  0.084, corrector did not converge in 10 iterations.
 Where lambda is  1 and for reducing steady state loading limitation I
 reduced demand less than 60 % which also failed to converge the power flow.
 3) Also I tried to run an optimal power flow according to Dr. Ray's
 explanation  given in following link-


 *https://www.mail-archive.com/search?l=matpower-l@cornell.eduq=subject:%22Re%5C%3A+%5C%5BMatpower%5C%5D+3500+bus+simulation%22o=newest
 https://www.mail-archive.com/search?l=matpower-l@cornell.eduq=subject:%22Re%5C%3A+%5C%5BMatpower%5C%5D+3500+bus+simulation%22o=newest*

 but got the results like-

 MATPOWER Version 5.1, 20-Mar-2015 -- AC Optimal Power Flow
 MATLAB Interior Point Solver -- MIPS, Version 1.2, 20-Mar-2015
  (using built-in linear solver)
  itobjective   step size   feascond gradcond compcond
 costcond
    -   
 
   0 1200199.7 2.41677 0.71  536.762
  0
   1 946197.39 15.531   1.3682  1.75871  525.914
 0.209885
   2 954529.91 15.405 0.766107 0.203773  297.341
 0.00871422
   3  954849.8 12.849 0.7277120.0545952  258.471
 0.00033166
   4 954629.03  13035  0.69114 0.107402  258.048
  0.000228815
   5 954614.88  33406 0.692682 0.255673  257.828
  1.46744e-05
   6 954525.69  14111 0.579613 0.143897  256.765
  9.24569e-05
   7 954539.42  61648 0.581139 0.501345  255.994
  1.42362e-05
   8 954518.93  22452 0.573652 0.478609  255.465
  2.12443e-05
   9 954494.92 8540.4 0.556318 0.403754  254.653
  2.48944e-05
  10 954523.58  20366 0.556265 0.570707  254.104
  2.97206e-05
  11 954522.07 6142.4 0.554989 0.647881  256.561
  1.57288e-06
  12 954573.42 6192.9 0.513972 0.716706  253.604
  5.32434e-05
  13 954575.97 5912.1 0.509457 0.699751  252.612
  2.64406e-06
  14 954576.23  16534