Re: CPF stopping Criteria

2024-05-21 Thread Abhyankar, Shrirang G
Yes, CPF can stop at a given lambda value.

For example,

mpopt = mpoption;
mpopt.cpf.stop=1.0
runcpf(‘case9’,’case9target’,mpopt);

will stop the CPF when lambda reaches 1.0.

Shri

From: bounce-128220963-83436...@list.cornell.edu 
 on behalf of Ahmad Sadiq Abubakar 

Date: Tuesday, May 21, 2024 at 7:12 AM
To: MATPOWER discussion forum 
Subject: CPF stopping Criteria
Check twice before you click! This email originated from outside PNNL.

Dear all,

Please can the CPF stop at a target lambda value? If yes, What will be the 
field of this cpf_stop_at? I know for "FULL" and "NOSE" are to complete the cpf 
and stop at the nose point respectively.

In anticipation of your response

--
AHMAD Abubakar Sadiq (PhD)
Faculty Member Electrical and Electronics Engineering,
School of Electrical Engineering and Technology,
Team Lead PowerTech Research Unit
Advanced Engineering Innovation Research Group.
Federal University of Technology,
P.M.B, 65, Minna. Nigeria.
+2347068043665
+2348057879333



Re: Question regarding Matpower's continuation power flow

2022-11-01 Thread Abhyankar, Shrirang G
Hi Carlos,

Event:
   See MATPOWER manual section 5.5 for description of ‘events’ in MATPOWER. 
Basically, an event is a point on the continuation curve where some sort of 
limit or threshold is met. For example, a generator hitting its active/reactive 
power limit is an event. The full list of events MATPOWER supports is given in 
the manual. For each event located, MATPOWER saves information for the event 
(including a descriptive text) in its output struct (see results.cpf.event).

Rollback:
On detection of each event, MATPOWER locates or pinpoints the event using a 
‘rollback’ mechanism where the continuation step is reverted and the step-size 
reduced successively till the event is located, i.e., some tolerance is met for 
the event. MATPOWER prints whenever the step is reverted (or “rolled back”) 
during the event location process.

Look up Regular Falsi or False Position method on Google if you need additional 
details on event detection and location.

Hope this helps.

Shri
From: bounce-126939018-83436...@list.cornell.edu 
 on behalf of Carlos A. Castro 

Date: Monday, October 31, 2022 at 4:01 PM
To: MATPOWER-L@cornell.edu 
Subject: Question regarding Matpower's continuation power flow
Check twice before you click! This email originated from outside PNNL.

Dear friends

I have been running the continuation power flow for several networks.

In the case of "case2869pegase", I counted 92 rollbacks. However, "events" is a 
struct with dimension [1x98].

I was expecting that the dimension of "events" was [1x92], that is, the same as 
the number of rollbacks.

I would appreciate to hear from you regarding the relationship between 
rollbacks and events. What are those events specifically? Which events do not 
result in rollbacks?

Thanks a lot for your attention and help.

Regards,

Carlos A. Castro.

--
Prof. Carlos A. Castro
ccas...@ieee.org


Re: Base Case CPF - Reg

2021-09-21 Thread Abhyankar, Shrirang G
It is hard to say anything without knowing exactly what commands you ran. 
Please refer to the script on page 59 of the 
manual.

Thanks,
Shri
From:  on behalf of "A.K Samy" 

Reply-To: MATPOWER discussion forum 
Date: Tuesday, September 21, 2021 at 1:21 AM
To: "MATPOWER-L@cornell.edu" 
Subject: Base Case CPF - Reg

Check twice before you click! This email originated from outside PNNL.

Dear Ray,
As per manual the cpf is running based on 2.5 times increased load. But when i 
run with base case load (normal load) it gives errors
Unrecognized function or variable 'success'.

Error in runcpf (line 586)
mpct.success = success;

 Kindly clear my doubt about how to run a cpf for a normal case data.

--
Karuppa Samy.A, M.E.,(Ph.D).,
Research Scholar,
Department of Electrical and Electronics Engineering,
National Institute of Technology Puducherry,
Karaikal-609609.
Puducherry.(INDIA)
E.mail.ID.
 samydee...@gmail.com
Mobile Number: +91-9942325373




Re: Request for technical data - Reg

2021-09-16 Thread Abhyankar, Shrirang G
The load real power (Pd) for a lambda value (lam) is given by

Pd = (1-lam)*Pd_b + lam*Pd_t

Where Pd_b and Pd_t are the load real powers for the base and target case, 
respectively. Similar calculation applies for reactive power.

Shri


From:  on behalf of "A.K Samy" 

Reply-To: MATPOWER discussion forum 
Date: Thursday, September 16, 2021 at 6:01 AM
To: "MATPOWER-L@cornell.edu" 
Subject: Request for technical data - Reg

Check twice before you click! This email originated from outside PNNL.

Respected Sir,
   Myself I am Karuppa Samy from India, currently doing research in the 
area "VOLTAGE STABILITY ASSESSMENT IN DEREGULATED POWER SYSTEM" in NIT 
Puducherry.
In my research first I started with Voltage Stability margin and 
index monitoring using ANN sir, In this case I tried to generate input data for 
ANN through MATPOWER CPF but I did not get real power and reactive power output 
at every instant of lambda.
I request you, give methodology to take P & Q values for each loading parameter 
in CPF.
   Thank you sir.

--
Karuppa Samy.A, M.E.,(Ph.D).,
Research Scholar,
Department of Electrical and Electronics Engineering,
National Institute of Technology Puducherry,
Karaikal-609609.
Puducherry.(INDIA)
E.mail.ID.
 samydee...@gmail.com
Mobile Number: +91-9942325373




Re: Continuous power flow question

2021-06-01 Thread Abhyankar, Shrirang G
Hi Simone,
   See the FAQ on power flow 
divergence. It lists some useful 
tips to debug power flow divergence when using MATPOWER and how to run a 
continuation power flow to check if a power flow solution exists (point v).

Thanks,
Shri


From:  on behalf of Simone Fratton 

Reply-To: MATPOWER discussion forum 
Date: Tuesday, June 1, 2021 at 4:08 AM
To: "matpowe...@list.cornell.edu" 
Subject: Continuous power flow question

Check twice before you click! This email originated from outside PNNL.

Hi,
I would like to ask where I can find specific indications on the use of 
"continuous power flow" in Matpower? Maybe a video, an example Specifically 
I have a case (an electrical grid) for which Newton-Rapshon does not converge 
even if a solution exists and I thought of the "continuous power flow" to find 
this solution. I don't know if I can do it and also how to do it.
Thank you all and I apologize so much for the inconvenience.



Re: Two questions

2020-07-06 Thread Abhyankar, Shrirang G
  1.  neg_dSd_dVm is a diagonal matrix having partial derivatives (negative) of 
the load injection (Sd) w.r.t. voltage magnitude (Vm). The load is described by 
a ZIP load, Sd = alpha_p(q) + alpha_i .* Vm + alpha_z .* Vm.^2 where alpha_p, 
alpha_i, and alpha_z are the load fractions for the constant power, constant 
current, and constant impedance, respectively. By default, the load is assumed 
as a constant power load (hence neg_dSd_dVm is zero). You can change the load 
fractions via the options exp.sys_wide_zip_load.pw and exp.sys_wide_zip_load.qw 
(see mpoption) for real and reactive power, respectively.


From:  on behalf of Liang Chen 

Reply-To: MATPOWER discussion forum 
Date: Sunday, July 5, 2020 at 1:28 AM
To: "MATPOWER-L@cornell.edu" 
Subject: Two questions

Hello,

I have the following two questions and I'd appreciate some clarifications:
1.  What is the `neg_dSd_dVm` variable in newtonpf.m (at the top of the 
while loop, constructing the J part) do? With `runpf(case30)` it's a zero 
matrix, and I'm not sure physically what it is supposed to mean.
2.  I'm in the process of porting some of the power flow code to another 
language (with a fair amount of change, but the main blocks e.g., in newtonpf.m 
were largely the same other than the syntax differences). I was hoping to put 
it on Github for people to use, and certainly for myself to use in my research 
later on. What would I need to include in my LICENSE file to acknowledge the 
contribution of Matpower, other than a copy of Matpower's LICENSE file from 
Github? Would I have to stick with the 3-clause BSD license?
Thank you very much,

Liangjie



Re: CPF power flow did not converge

2019-07-11 Thread Abhyankar, Shrirang G
Cynthia,
   Please see this MATPOWER  FAQ 
on debugging power flow divergence. Also, you forgot to attach your case file.

Thanks,
Shri


From:  on behalf of W Ruoyu 

Reply-To: MATPOWER discussion forum 
Date: Thursday, July 11, 2019 at 10:54 AM
To: "MATPOWER-L@cornell.edu" 
Subject: CPF power flow did not converge

Hi all,

I am trying to analyse the influence of topology changes (like disconnect 
branches) on system voltage stability using the following code:

define_constants;



mpc =loadcase('FourAreaNetwork');   "
OutmailID: 123739424, List: 'matpower-l', MemberID: 83373175
SCRIPT: "load basecase
mac.branch(:,11)=[0,0,1,0,1,1,1,1,1,1];"
TCL MERGE ERROR ( 07/11/2019 13:54:03 ): "invalid command name 
"0,0,1,0,1,1,1,1,1,1"change branch status

mpopt = mpoption('out.all',0,'verbose',2,'out.bus',1);
mpopt=mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step',0.05);
mpct = mpc;  "
OutmailID: 123739424, List: 'matpower-l', MemberID: 83373175
SCRIPT: "set up target case with basecase
mpct.gen(:,[PG QG]) = mpc.gen(:,[PG QG])*2
mpct.bus(:,[PD QD]) = mpc.bus(:,[PD QD])*2
results = runcpf(mpc, mpct,mpopt);
After running this, I got the warning message ‘ CPF TERMINATION: Base case 
power flow did not converge.’
Then I decreased the size of cpf step, but still got the same warning.
Could you please suggest me how should I fix it? And I have attached the 
FourAreaNetwork case file.
Thanks in advance!
Best regards,
Cynthia
  --_000_CY4PR08MB2808DEF11DE25F2332D96BACDFF30CY4PR08MB2808namp_ Content-Type: 
text/html; charset="utf-8" Content-ID: 
<8f94c2354585e4468b909975c5f41...@namprd08.prod.outlook.com>
 Content-Transfer-Encoding: base64  




Hi all,

I am trying to analyse the 
influence of topology changes (like disconnect branches) on system voltage 
stability using the following code:




define_constants;

 

mpc =loadcase('FourAreaNetwork');  "
TCL MERGE ERROR ( 07/11/2019 13:54:03 ): "wrong # args: should be "set varName 
?newValue?" load basecase



mac.branch(:,11)=[0,0,1,0,1,1,1,1,1,1]; "
OutmailID: 123739522, List: 'matpower-l', MemberID: 82861091
SCRIPT: "change branch status
 
 
 
 mpopt = 
mpoption('out.all',0,'verbose',2,'out.bus',1); 
 mpopt=mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step',0.05); 
 
 
 mpct = mpc; 
         "
TCL MERGE ERROR ( 07/11/2019 14:30:28 ): "invalid command name "change" set up 
target case with basecase
mpct.gen(:,[PG QG]) = mpc.gen(:,[PG 
QG])*2
mpct.bus(:,[PD QD]) = mpc.bus(:,[PD 
QD])*2
results = runcpf(mpc, 
mpct,mpopt);


After running this, I got the warning 
message ‘ CPF TERMINATION: Base case
power flow did not converge.’
Then I decreased the size of cpf 
step, but still got the same warning.


Could you please suggest me 
how should I fix it? And I have attached the FourAreaNetwork
case file.


Thanks in advance!


Best regards,
Cynthia















--_000_CY4PR08MB2808DEF11DE25F2332D96BACDFF30CY4PR08MB2808namp_--

--_004_CY4PR08MB2808DEF11DE25F2332D96BACDFF30CY4PR08MB2808namp_
Content-Type: application/octet-stream; name="FourAreaNetwork.m"
Content-Description: FourAreaNetwork.m
Content-Disposition: attachment; filename=FourAreaNetwork.m; size=2432;
creation-date="Thu, 11 Jul 2019 17:53:49 GMT";
modification-date="Thu, 11 Jul 2019 17:53:49 GMT"
Content-ID: 
<0847624d7891e14eaaca0c3b07854...@namprd08.prod.outlook.com>
Content-Transfer-Encoding: base64

ZnVuY3Rpb24gbXBjID0gRm91ckFyZWFOZXR3b3JrCQkJCQkJCQkJCQkJCQkJCQkJCQkJDQptcGMu
dmVyc2lvbiA9ICcyJzsJCQkJCQkJCQkJCQkJCQkJCQkJCQkNCm1wYy5iYXNlTVZBID0gMTAwOwkJ
CQkJCQkJCQkJCQkJCQkJCQkJCQ0KDQolJSBCdXMgRGF0YQkJCQkJCQkJCQkJCQkJCQkJCQkJCQ0K
JQlidXNfaQl0eXBlCVBkCVFkCUdzCUJzCWFyZWEJVm0JVmEJYmFzZUtWCXpvbmUJVm1heAlWbWlu
CQkJCQkJCQkNCm1wYy5idXMgPSBbCQkJCQkJCQkJCQkJCQkJCQkJCQkJDQogICAgMSAgIAkyICAg
CTAJMAkwCTAJMQkxCTAJMjIJMQkxLjA1CTAuOTU7DQogICAgMiAgIAkxICAgCTI4MDAJMAkwCTAJ
MQkxCTAJNDAwCTEJMS4wNQkwLjk1Ow0KICAgIDMgICAJMSAgIAkxNzAwCTAJMAkwCTEJMQkwCTQw
MAkxCTEuMDUJMC45NTsNCiAgICA0ICAgCTIgICAJMAkwCTAJMAkxCTEJMAkyMgkxCTEuMDUJMC45
NTsNCiAgICA1ICAgCTIgICAJMAkwCTAJMAkxCTEJMAkxMy44CTEJMS4wNQkwLjk1Ow0KICAgIDYg
ICAJMSAgIAkxMzAwCTAJMAkwCTEJMQkwCTQwMAkxCTEuMDUJMC45NTsNCiAgICA3ICAgCTEgICAJ
MTcwMAkwCTAJMAkxCTEJMAk0MDAJMQkxLjA1CTAuOTU7DQogICAgOCAgIAkzICAgCTAJMAkwCTAJ
MQkxCTAJMTMuOAkxCTEuMDUJMC45NTsJCQkJCQkJCQ0KXTsJCQkJCQkJCQkJCQkJCQkJCQkJCQkN
CiUlIEdlbmVyYXRvciBEYXRhCQkJCQkJCQkJCQkJCQkJCQkJCQkJDQolCWJ1cwlQZwlRZwlRbWF4
CVFtaW4JVmcJbUJhc2UJc3RhdHVzCVBtYXgJUG1pbglQYzEJUGMyCVFjMW1pbglRYzFtYXgJUWMy
bWluCVFjMm1heAlyYW1wX2FnYwlyYW1wXzEwCXJhbXBfMzAJcmFtcF9xCWFwZg0KbXBjLmdlbiA9
IFsJCQkJCQkJCQkJCQkJCQkJCQkJCQkNCiAgICAxCTE3NDAJMAkxMjYzCS0xMjYzCTEJMTAwCTEJ
MjYwOC4yCTAJMAkwCTAJMAkwCTAJMAkwCTAJMAkwOw0KICAgIDQJMTgwMAkwCTEyNjMJLTEyNjMJ
MQkxMDAJMQkyNjA4LjIJMAkwCTAJMAkwCTAJMAkwCTAJMAkwCTA7DQogICAgNQkxOTYwCTAJMTE0
Mi4wMwktMTE0Mi4wMwkxCTEwMAkxCTIzNTgJMAkwCTAJ

Re: Question about CPF

2019-07-02 Thread Abhyankar, Shrirang G
See below.

Thanks,
Shri


From:  on behalf of W Ruoyu 

Reply-To: MATPOWER discussion forum 
Date: Monday, July 1, 2019 at 5:35 PM
To: MATPOWER discussion forum 
Subject: Re: Question about CPF

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?

On running the continuation power flow via
results = runcpf(mpcb, mpct, mpopt);
MATPOWER returns a struct ‘results’ which is a superset of the MATPOWER case 
struct with some additional data specific for the continuation power flow. 
Please take a look at the format of the MATPOWER case struct 
(https://matpower.org/docs/ref/matpower5.1/caseformat.html) to know about the 
different values available.  If you want to use the real power load at each bus 
then use results.bus(:,PD), for real power generation use results.gen(:,PG)..

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?

results.bus in a matrix of size nbus X nbuscol where nbus is the number of 
buses in the system and nbuscol is the number of columns in the bus matrix. 
Similarly, results.gen is matrix of size ngen X gencol where ngen is the number 
of generators in the system

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?
You can change the step-size and other CPF options by setting the appropriate 
options in the mpopt struct. See help mpoption for the available options. For 
setting the CPF step size, do
mpopt = mpoption;
mpopt.cpf.step = 
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?
I think the step-size you are using above, 0.2, is probably too large. I tried 
the default step-size, 0.05, and the CPF do not see any convergence issues. You 
can also increase the number of corrector iterations via mpopt.pf.nr.max_it = 
.
Thank you

Regards,
Cynthia

>>


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

Hi Cynthia,

See responses to your questions below …

Ray



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



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;





Re: Maximum load limit for radial distribution cases.

2019-06-13 Thread Abhyankar, Shrirang G
For maximum loadability calculations, it is best to run a continuation power 
flow (CPF) rather than power flow with successive load increments. CPF avoids 
ill-conditioning of the matrix near collapse point which a simple power flow 
cannot. One can run a CPF in MATPOWER using the runcpf() function. Besides the 
maximum loadability calculation, CPF includes several features including 
step-control, real and reactive power limits, voltage and flow limits, 
user-defined callbacks, termination criteria, and others. For more info, see 
section 5 of the MATPOWER manual.

You can run a continuation power flow to find the maximum loading limit on the 
case33bw system with the following code.

mpcbase = runpf('case33bw');
mpctarget = mpcbase;
define_constants;
mpctarget.bus(:,PD) = mpctarget.bus(:,PD)*2;
mpctarget.bus(:,QD) = mpctarget.bus(:,QD)*2;
mpopt = mpoption;
mpopt.cpf.plot.level = 2;
results = runcpf(mpcbase,mpctarget,mpopt);

Thanks,
Shri

Note that CPF uses Newton’s method, not forward-backward sweep.


From:  on behalf of akhil 

Reply-To: MATPOWER discussion forum 
Date: Thursday, June 13, 2019 at 9:36 AM
To: "matpowe...@list.cornell.edu" 
Subject: Fwd: Maximum load limit for radial distribution cases.


-- Forwarded message -
From: akhil mailto:akhil...@gmail.com>>
Date: Thu, 13 Jun 2019 at 19:52
Subject: Maximum load limit for radial distribution cases.
To: mailto:matpowe...@list.cornell.edu>>

I am running the radial distribution power flow which is based on backward 
forward sweep algorithm. for the network data which is provided with matpower 
the radial load flow converges successfully. But to get the maximum load limit 
of the system, when I am running the load flow with increased load at each bus 
in a step of 1 % the radial load flow does not converge after some point.
The change in Load is as per Pnew=Lambda*P0 and Qnew=Lambda*Q0 with 1 % change 
in load at all buses simultaneously.
I am Trying to get the minimum bus voltage of the system after each change in 
load and running corresponding radial flow successively until the minimum 
voltage of the system (bus with minimum voltage) getting reduced smoothly.
The code which I run is attached herewith for your reference.




Thank you

Yours
Akhilesh K Barnwal
Ph.D. Research Scholar
IIT BHU Varanasi.
mail: akhileshkb.rs.ee...@iitbhu.ac.in


--




  @khil



Re: Question about power flow for a system with faulted bus

2019-06-05 Thread Abhyankar, Shrirang G
During faulted condition, the bus voltages are dictated by the fault impedance 
(and the system conditions). As such, CPF will not help here.

Shri


From:  on behalf of Ismael K 
Abdulrahman 
Reply-To: MATPOWER discussion forum 
Date: Saturday, June 1, 2019 at 8:03 AM
To: MATPOWER discussion forum 
Subject: Re: Question about power flow for a system with faulted bus

Thanks Shri for your reply and the nice trick you mentioned; I never thought 
about it.

How about using continuation power flow instead of a regular power flow? Is it 
possible to use it for this kind of problem? As you know, CPF is widely used to 
solve low voltage problem. Any idea?

Thank you once again.
Ismael



On Jun 1, 2019, at 7:38 AM, Abhyankar, Shrirang G 
mailto:shrirang.abhyan...@pnnl.gov>> wrote:
Ismael,
   Power flow with loads modeled as “constant power” faces convergence issue 
when the voltages are low. A common trick is to convert constant power loads to 
constant impedance loads for low voltages. In MATPOWER, you can convert all the 
loads to constant impedance using the options 'exp.sys_wide_zip_loads.pw' (real 
power) and 'exp.sys_wide_zip_loads.qw'. Here, pw and qw are fractions of 
constant power, constant current, and constant impedance load composition. For 
a constant impedance only load the fractions should be [0,0,1].

Shri



From: 
mailto:bounce-123652900-83373...@list.cornell.edu>>
 on behalf of Ismael K Abdulrahman 
mailto:ikabdulra...@students.tntech.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Saturday, June 1, 2019 at 1:17 AM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
mailto:matpower-l@cornell.edu>>
Subject: Question about power flow for a system with faulted bus


Dear Matpower community,



I am a Ph.D. student working in power system dynamic analysis. I use Matpower 
for computing the initial values of the system variables.

I want to find the initial values of the algebraic variables (voltage 
magnitude, voltage angle, generator current phasors...)  at the time of 
disturbance. The disturbance is a three phase fault at one bus in the system, 
usually a load or zero-injection bus. I tried to consider the faulted bus as a 
generator with zero power and zero voltage, but the problem cannot be solved. I 
was wondering if there is any way to get around this problem? I greatly 
appreciate your help.



Thanks in advance

Ismael



Re: Question about power flow for a system with faulted bus

2019-06-01 Thread Abhyankar, Shrirang G
Ismael,
   Power flow with loads modeled as “constant power” faces convergence issue 
when the voltages are low. A common trick is to convert constant power loads to 
constant impedance loads for low voltages. In MATPOWER, you can convert all the 
loads to constant impedance using the options 'exp.sys_wide_zip_loads.pw' (real 
power) and 'exp.sys_wide_zip_loads.qw'. Here, pw and qw are fractions of 
constant power, constant current, and constant impedance load composition. For 
a constant impedance only load the fractions should be [0,0,1].

Shri



From:  on behalf of Ismael K 
Abdulrahman 
Reply-To: MATPOWER discussion forum 
Date: Saturday, June 1, 2019 at 1:17 AM
To: "matpower-l@cornell.edu" 
Subject: Question about power flow for a system with faulted bus


Dear Matpower community,



I am a Ph.D. student working in power system dynamic analysis. I use Matpower 
for computing the initial values of the system variables.

I want to find the initial values of the algebraic variables (voltage 
magnitude, voltage angle, generator current phasors...)  at the time of 
disturbance. The disturbance is a three phase fault at one bus in the system, 
usually a load or zero-injection bus. I tried to consider the faulted bus as a 
generator with zero power and zero voltage, but the problem cannot be solved. I 
was wondering if there is any way to get around this problem? I greatly 
appreciate your help.



Thanks in advance

Ismael



Re: Continuation power flow_lambda

2019-05-12 Thread Abhyankar, Shrirang G
Lambda, a scalar quantity, represents the fraction of additional 
load/generation (transfer) on the network. The continuation power flow finds 
solutions starting from lambda = 0 (base loading/generation) to lambda_max 
(nose-point, max. loading/generation).

You can translate the lambda value to a loading value by

Sd_i = Sd_base + lambda_i*(Sd_target – Sd_base)

Where Sd_base and Sd_target are the base and target loads, respectively, and 
Sd_i is the load with lambda = lambda_i.

Shri

From:  on behalf of Meraj Fouad 

Reply-To: MATPOWER discussion forum 
Date: Sunday, May 12, 2019 at 12:17 AM
To: MATPOWER discussion forum 
Subject: Continuation power flow_lambda

Dear Matpower community,

what is the physical meaning of lambda in CPF? The plot shows ‘voltage vs 
lambda’ (the code in the manual -page 54)

Best regards
Fouad Hasan



Re: Isolated Bus - Power flow solution

2019-04-29 Thread Abhyankar, Shrirang G
John,
   MATPOWER’s power flow does not do a topology check to find isolated buses 
and islands. So, any isolated bus i needs to have its bus type set to None (4) 
-- mpc.bus(i, BUS_TYPE) = 4. If you want to find out which buses get isolated 
when the status of one or more lines changes then use the routines 
case_info()
 or 
find_islands().

Shri
From:  on behalf of John Cynn 

Reply-To: MATPOWER discussion forum 
Date: Sunday, April 28, 2019 at 9:39 AM
To: "MATPOWER-L@cornell.edu" 
Subject: Isolated Bus - Power flow solution

Hi All,

I had a question regarding matpower solution when a bus might get isolated. For 
example, changing the status of a line or lines causes a bus to be 
isolated/islanded. I think the power flow does not converge when such scenario 
occurs. Is there a way to handle this automatically and change bus status to 
isolated? Any suggestions on handling islands?

Thanks.
John



Re: Removing a Bus and Evaluating the New Network

2019-04-29 Thread Abhyankar, Shrirang G
Mitchell,
  See below.

Shri

From:  on behalf of "Dennis, 
Mitchell T." 
Reply-To: MATPOWER discussion forum 
Date: Friday, April 26, 2019 at 8:38 PM
To: "MATPOWER-L@cornell.edu" 
Subject: Removing a Bus and Evaluating the New Network

Dear All,

I have a question regarding convergence.

I am attempting see the effect of removing a node on a power network using 
MATPOWER.

To do this, I first evaluate the IEEE case with 300 nodes, and then I set the 
branches of one of the nodes to zero.

All isolated nodes (buses) should have bus type = 4. You can find which nodes 
are isolated and the islands formed using the function 
find_islands.

Doing this typically causes the network to no longer converge using the power 
flow equations, however in some cases it will still converge.

It’s highly unlikely that the power flow converges if there are isolated buses 
in the network. You might want to run the find_islands function to see if the 
network is connected or split.

In an attempt to make the diverging networks converge again, I systemically 
reduce the load by setting the bus Pd and Qd values 5% lower and then run the 
convergence test again.

Is there a better way to do this? Am I actually decreasing the load?

You can use MATPOWER’s continuation power flow (see the chapter in the manual) 
instead.

And will decreasing the load make the equations more likely to converge?

Also, how can I tell what is making the equations not converge? Is divergence 
only caused by a load imbalance where the load is too high?

See this FAQ on reasons a 
power flow may diverge and suggestions to try to make it converge.

Thanks in advance

Best Regards,
Mitchell T Dennis



Re: CPU time

2019-04-12 Thread Abhyankar, Shrirang G
Ahmad,
Can you be more specific with your question. How big of a system are you 
planning to solve? Do you need to perform the CPF run within some stipulated 
time?

CPF basically solves a series of power flow solutions given some transfer 
direction. Roughly, its computational complexity equals the number of power 
flow solutions (CPF steps) + an additional overhead for computing the tangent 
vector. There are a couple of things one can do to run the CPF faster:


i)Increase the step-size (mpopt.cpf.step): A larger 
step-size would result in fewer CPF steps and in turn fewer power flow 
solutions. However, increasing the step-size also means that the CPF may need 
to do additional iterations at each step.

ii)   Use step adaptivity (mpopt.cpf.adapt_step): The CPF will 
adaptively change the step-size when this option is turned ON. It will take 
larger steps on the flat portion of the PV curve and small steps for larger 
curvatures. One can limit the max. and min. step with the options 
mpopt.cpf.step_max and mpopt.cpf.step_min.

Shri


From:  on behalf of Ahmad Sadiq 
Abubakar 
Reply-To: MATPOWER discussion forum 
Date: Friday, April 12, 2019 at 12:44 AM
To: MATPOWER discussion forum 
Subject: CPU time

Hi all,

What do you think will be the effect of CPF run of a real power systems with 
large number of buses on CPU time?

I mean MATPOWER's continuation power flow (CPF)

Kind regards
Ahmad.



Re: case300 problem

2019-04-12 Thread Abhyankar, Shrirang G
Naime,
   The bus numbers given in the casefile, “external bus numbers”, need not be 
consecutive integers from 1..nbus. These can be any integers. Internally, 
MATPOWER converts them to “internal numbering” (consecutive integers from 
1..nbus).  If you want to operate with internal numbers then use the 
ext2int
 routine.

mpc = loadcase(‘casename’);
mpc_int = ext2int(mpc);

Shri

From:  on behalf of naime ahmadi 

Reply-To: MATPOWER discussion forum 
Date: Friday, April 12, 2019 at 12:13 AM
To: MATPOWER discussion forum 
Subject: case300 problem

Hi,
I have a question about 300 bus system. When I opened the case300, in bus data 
I saw 1190 as bus number. or in branch data, bus 9001 is connected to 9005. As 
case300 has only 300 bus so what is 1190 and 9001?
How can I fix this case?
Thanks,
Naime



Re: AC power flow not converge

2018-11-14 Thread Abhyankar, Shrirang G.
Hi,
   The AC power flow (runpf) is converging for your system, while the AC 
optimal power flow (runopf) does not. The reason being the line ratings (rateA, 
B, C) are less than the load they are supplying to. For instance, the load on 
bus 2 is 2.8 MW, but there is a single line 1-2 supplying power to this load 
and its rating is 1.5 MW. As such, the optimal power flow, which tries to 
adhere to the line limits, fails to converge. I suggest setting the line limits 
more than the load supplied at their ‘to’ buses.

Shri



From:  on behalf of Αμαλία 
Μαυρογιάννη 
Reply-To: MATPOWER discussion forum 
Date: Wednesday, November 14, 2018 at 5:53 AM
To: "matpowe...@list.cornell.edu" 
Subject: AC power flow not converge

I am working on an island system. I make a case where I depict the whole 
system. The lines are in 15KV and there are 3 generators in 5MW each. I run an 
AC power flow (runopf)and the message is Did not converge in 5 iterations. I 
have done the :

define_constants;

mpcbase = loadcase('casefile');

mpcbase.bus(:, PD) = 0;

mpcbase.bus(:, QD) = 0;

mpcbase.gen(:, PG) = 0;

mpctarget = loadcase('casefile');

results = runcpf(mpcbase, mpctarget);

results.cpf.max_lam


 and max_lam=10.5284.

The runcpf doesn't run at all.

The case is down.

Thanks
Amalia Mavrogianni



Re: Power Flow in Matpower

2018-03-16 Thread Abhyankar, Shrirang G.
See FAQ #5

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr



From:  on behalf of Mohammed 
Alhajri 
Reply-To: MATPOWER discussion forum 
Date: Friday, March 16, 2018 at 11:26 AM
To: MATPOWER discussion forum 
Subject: Re: Power Flow in Matpower

any answer to this question?

بتاريخ ٢٠١٨/٠٢/٢٥ ٧:١٨ م، كتب "Mohammed Alhajri" 
mailto:u106...@gmail.com>>:
Hello All,

I did the power flow for a 89-bus network and it converges using Hadi Sadat 
code after 17080 iterations. The accuracy was 1e-8 and the method is 
Gauss-Seidel Method.

But when I did the power flow using matpower it does not converge! I tried to 
increase the maximum iteration, I put it 10, and still did not cnvarge!

I have attached the data according to Hadi Sadat Code, can any one try to do 
the power flow using matpower?




Re: AC OPF Convergence Issue

2018-03-08 Thread Abhyankar, Shrirang G.



From:  on behalf of Aakanksha Dubey 

Reply-To: MATPOWER discussion forum 
Date: Wednesday, March 7, 2018 at 9:21 PM
To: MATPOWER discussion forum 
Subject: Re: AC OPF Convergence Issue

Thank You, Mirish and Shri for the guidance.

Shri, the model is converging now. I understand that Vmax and Vmin limits 
should have been more relaxed. I have a couple of quick follow-up questions:
· I had set the voltage magnitudes on per unit basis since the network 
voltages range from 69kV to 500kV. By now making Vm=1, wouldn't all voltages be 
set equal to 500kV?
I suggest referring to a book on per unit calculation. Here’s a simple example 
that may help get your started: 
http://peguru.com/2011/06/per-unit-system-practice-problem-solved-for-easy-understanding/
· Also, while relaxing line limits, what is the maximum acceptable 
percentage I should be increasing those values to?
There is no acceptable or unacceptable percentage. The line limits are relaxed 
simply to get the OPF to converge, but this may not be realistic for a 
practical solution.

Shri

sincerely,
Aakanksha Dubey


On Wed, Mar 7, 2018 at 7:25 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
The voltage magnitudes in MATPOWER data files, (bus(:,VM)), are given in per 
unit and are generally close to 1.0. You have very low voltages for many of the 
buses. Similarly, the VMAX and VMIN values are also in per unit and generally 
they are 1.0 and 0.95, respectively. The following code results in convergent 
OPF.

mpc = loadcase(‘Transmission3’);
define_constants;
mpc.bus(:,VM) = 1.0;
mpc.bus(:,VA) = 0.0;
mpc.bus(:,VMAX) = 1.1;
mpc.bus(:,VMIN) = 0.9;
runopf(mpc);

Also, note that when relaxing the limits set them to large values, not zeros.

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr<http://www.mcs.anl.gov/~abhyshr>
From: 
mailto:bounce-122357558-73493...@list.cornell.edu>>
 on behalf of Aakanksha Dubey mailto:aad...@lehigh.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, March 7, 2018 at 4:23 PM
To: "MATPOWER-L@cornell.edu<mailto:MATPOWER-L@cornell.edu>" 
mailto:MATPOWER-L@cornell.edu>>
Subject: AC OPF Convergence Issue

Hi All,

I am developing a model for transmission grid at Lehigh Valley. My model seems 
to converge for DC OPF but is unable to converge for AC. I have tried the 
following to make it converge but nothing works:

• Relaxed Vmax, Vmix, BR_R, Rate_A,Rate_B,Rate_C
• Checked the tap ratio, Qmax, Qmin,Pmax,Pmin
• Tried to change the OPF options by using opf.init_from_mpc
• Using mpoption I tried to change the solver to IPOPT& MINOPF but 
MATLAB keeps giving me an error that I need to download it. After downloading 
and connecting the path to MATLAB it gives me the same error.
I have attached my casefiles to this email. Please let me know if anyone can 
find an issue with the model.

Thank you!

Aakanksha





Re: AC OPF Convergence Issue

2018-03-07 Thread Abhyankar, Shrirang G.
The voltage magnitudes in MATPOWER data files, (bus(:,VM)), are given in per 
unit and are generally close to 1.0. You have very low voltages for many of the 
buses. Similarly, the VMAX and VMIN values are also in per unit and generally 
they are 1.0 and 0.95, respectively. The following code results in convergent 
OPF.

mpc = loadcase(‘Transmission3’);
define_constants;
mpc.bus(:,VM) = 1.0;
mpc.bus(:,VA) = 0.0;
mpc.bus(:,VMAX) = 1.1;
mpc.bus(:,VMIN) = 0.9;
runopf(mpc);

Also, note that when relaxing the limits set them to large values, not zeros.

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr
From:  on behalf of Aakanksha Dubey 

Reply-To: MATPOWER discussion forum 
Date: Wednesday, March 7, 2018 at 4:23 PM
To: "MATPOWER-L@cornell.edu" 
Subject: AC OPF Convergence Issue

Hi All,

I am developing a model for transmission grid at Lehigh Valley. My model seems 
to converge for DC OPF but is unable to converge for AC. I have tried the 
following to make it converge but nothing works:

· Relaxed Vmax, Vmix, BR_R, Rate_A,Rate_B,Rate_C
· Checked the tap ratio, Qmax, Qmin,Pmax,Pmin
· Tried to change the OPF options by using opf.init_from_mpc
· Using mpoption I tried to change the solver to IPOPT& MINOPF but 
MATLAB keeps giving me an error that I need to download it. After downloading 
and connecting the path to MATLAB it gives me the same error.
I have attached my casefiles to this email. Please let me know if anyone can 
find an issue with the model.

Thank you!

Aakanksha




Re: Introducing contingency in the network

2018-01-17 Thread Abhyankar, Shrirang G.
Don’t think there is an API, like total_load, that calculates total generation. 
You can do this easily by summing the active powers (PG column) in the mpc.gen 
array.

If you have any question on what API functions are available in MATPOWER then 
please refer to
http://www.pserc.cornell.edu//matpower/docs/ref/

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr<http://www.mcs.anl.gov/~abhyshr>



From:  on behalf of Zain Anwer 
Memon 
Reply-To: MATPOWER discussion forum 
Date: Wednesday, January 17, 2018 at 10:12 AM
To: MATPOWER discussion forum 
Subject: Re: Introducing contingency in the network

ok and how can I find total generation like we find total load through 
total_load?

On Wed, Jan 17, 2018 at 5:07 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
MATPOWER’s power flow does not enforce generator active power limits. To do so, 
run a dc optimal power flow (rundcopf).

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr<http://www.mcs.anl.gov/~abhyshr>



From: 
mailto:bounce-122200108-73493...@list.cornell.edu>>
 on behalf of Zain Anwer Memon 
mailto:zainanwerme...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, January 17, 2018 at 4:35 AM
To: "matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>" 
mailto:matpowe...@list.cornell.edu>>
Subject: Introducing contingency in the network

Hello everyone,

I am analyzing a simple case, that has 3 generators and liming the max power of 
all the generators to some limit.
If I turn off one generator, and run dc power flow, then one of the generator 
real power is increased by its own more than its MAX Power to meet the load 
requirement.
how generators real power becomes more than its max active power power limit?
I just want to have a difference in generation and demand so that I can 
implement a deterministic algorithm.

--
Zain Anwer Memon





--
Zain Anwer Memon





Re: load shedding by keeping load's power factor

2018-01-17 Thread Abhyankar, Shrirang G.
I don’t know of any straightforward way to do this in MATPOWER. You’ll need to 
add user-defined linear constraint to force the relationship between real and 
reactive power to keep the power factor constant.

Turns out this question has already been addressed on the MATPOWER forum.
https://www.mail-archive.com/matpower-l@cornell.edu/msg01084.html

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr



From:  on behalf of سید محمدرضا 
ساداتیان 
Reply-To: MATPOWER discussion forum 
Date: Tuesday, January 16, 2018 at 12:01 PM
To: "matpowe...@list.cornell.edu" 
Subject: load shedding by keeping load's power factor

Hi, everyone.

by use dispatchable load, we can have load shedding in OPF.
How can have load shedding by keeping power factor of loads?

Thank you so much for consideration and help.




Re: Introducing contingency in the network

2018-01-17 Thread Abhyankar, Shrirang G.
MATPOWER’s power flow does not enforce generator active power limits. To do so, 
run a dc optimal power flow (rundcopf).

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr



From:  on behalf of Zain Anwer 
Memon 
Reply-To: MATPOWER discussion forum 
Date: Wednesday, January 17, 2018 at 4:35 AM
To: "matpowe...@list.cornell.edu" 
Subject: Introducing contingency in the network

Hello everyone,

I am analyzing a simple case, that has 3 generators and liming the max power of 
all the generators to some limit.
If I turn off one generator, and run dc power flow, then one of the generator 
real power is increased by its own more than its MAX Power to meet the load 
requirement.
how generators real power becomes more than its max active power power limit?
I just want to have a difference in generation and demand so that I can 
implement a deterministic algorithm.

--
Zain Anwer Memon





Re: The question about extend OPF and the optimization tool

2018-01-17 Thread Abhyankar, Shrirang G.
Not sure if this is what you want, but here’s one way.

https://www.mail-archive.com/matpower-l@cornell.edu/msg00613.html

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr
From:  on behalf of 
"neuqxhlin...@163.com" 
Reply-To: MATPOWER discussion forum 
Date: Wednesday, January 17, 2018 at 4:46 AM
To: "matpowe...@list.cornell.edu" 
Subject: The question about extend OPF and the optimization tool

Hi,
I see. Can we add the power loss into objective function in runopf() ?

-
Best regards,
Wei Lin 林巍
Zhejiang University,
Zheda Road 38#, Hangzhou, P.R.China, 310027
+86-13675865210

发件人: Ray Zimmerman [mailto:r...@cornell.edu]
发送时间: 2018年1月11日 23:56
收件人: neuqxhlin...@163.com
主题: Re: The question about extend OPF and the optimization tool

(FYI, in the future, please address such questions to the MATPOWER-L mailing 
list, not 
to me directly)

Yes, it is possible to add user-defined costs to the OPF. Please see Sections 
6.3 and 6.4 and Chapter 7 in the MATPOWER User’s 
Manual. If 
you need general non-linear costs, you will need to use the latest development 
version of MATPOWER on GitHub  You can 
find the corresponding version of the manual 
here  
describing how to use the non-linear user-defined costs and constraints.

Regarding YALMIP, MATPOWER does not use it except when using SDP_PF, so you 
cannot use it to modify the problem normally solved by runopf().

   Ray


On Jan 10, 2018, at 9:54 PM, 
mailto:neuqxhlin...@163.com>> 
mailto:neuqxhlin...@163.com>> wrote:

Dear matpower:
Thanks for matpower solving lots of problem in my power simulation.
I have a question about the objective function in OPF. Can the system add some 
user-defined function expecting the generators cost, Like power loss , voltage 
deviation ?
And the matpower can be with some optimization tools like yalmip ? When I use 
yalmip , I define some variable but it can not be solve in matpower?
Code like:
  clc;clear;
x = sdpvar(14,1);
assign(x,ones(14,1));
mpc = loadcase('case14');
mpc.bus(:,4) = mpc.bus(:,4)  + value(x);
mpopt = mpoption('verbose',0,'out.all',0);
result = runpf(mpc,mpopt);
f = sum(abs(get_losses(result)));
F= [sum(x)<=50];
sdp_result = solvesdp(F,f);
   and the result show the yalmip is successfully sovled , but the result 
is not right.
Hope you can help me.

-
Best regards,
Wei Lin 林巍
Zhejiang University,
Zheda Road 38#, Hangzhou, P.R.China, 310027
+86-13675865210




Re: Question about the continuation power flow

2017-12-28 Thread Abhyankar, Shrirang G.
The base case (with PD = QD = PG = 0) is not converging because some of the 
generators have high Qmin limits. You’ll also need to relax the generator Qmin 
limits for your base case.

Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr
From:  on behalf of Young-Hwan Lee 

Reply-To: MATPOWER discussion forum 
Date: Thursday, December 28, 2017 at 10:13 AM
To: "MATPOWER-L@cornell.edu" 
Subject: Question about the continuation power flow

To whom it may concern,

I'm trying to solve an easy problem with case39 using the continuation power 
flow. I set the base case as origin, which is PG, PD, QD are all zero. I do not 
change any values for the target case, which means I just use the initial 
values. In addition, I set the reactive power limit using the option 
"cpf.enforce_q_lims." However, it didn't work and I got the message "CPF 
TERMINATION: Base case power flow did not converge." If I don't set the 
reactive power limit, the continuation power flow can solve this problem. If I 
change the base case as more than 0.7 times initial values, it worked. Could 
you explain why the continuation power flow cannot converge when setting the 
reactive power limit with origin base case, please?

Thank you in advance.

Regards,
Young-hwan Lee



Re: PF did not converge

2017-12-14 Thread Abhyankar, Shrirang G.
Try the suggestions in FAQ 
#5


Thanks,
Shri
Ph: (630) 252 0219
www.mcs.anl.gov/~abhyshr



From:  on behalf of Mohammed 
Alhajri 
Reply-To: MATPOWER discussion forum 
Date: Thursday, December 14, 2017 at 11:55 AM
To: MATPOWER discussion forum 
Subject: PF did not converge

Hello

i tried to do a PF for a system whose data is attached, but PF did not converge!

Please help me, although i have tried my best to follow the manual, but the 
problem is still there.

regards



Re: How to find max-load ability for each bus of power system

2017-11-30 Thread Abhyankar, Shrirang G.



From:  on behalf of Electric 

Reply-To: MATPOWER discussion forum 
Date: Thursday, November 30, 2017 at 2:42 AM
To: MATPOWER discussion forum 
Subject: Re: How to find max-load ability for each bus of power system

Thank you for your hint Ray,
I two questions about CPF, would be glad if someone reply.

  1.  What is the specifics of the bus that CPF plots itself? Does it means the 
voltage at that bus has been violated more than the others?

When the option cpf.plot.level is set to greater than 0, CPF plots the bus 
voltage magnitude for a given bus if the bus number is provided via the option 
cpf.plot.bus. If this option is not used then it plots the voltage magnitude 
for the bus (type PQ) with the largest transfer.

2) I calculate the voltage violation as follows:
absV=abs(res.cpf.V);  % nb* nitr
last_itr=size(absV,2);
voltage_dev= max(absV') - min(absV');   % voltage violation
figure(2)
bar ( voltage_dev)

Is this correct?
Looks fine to me for what you are trying to do.

 the curve that cpf plots is not always the same as the index of the bus 
corresponding to max(voltage_dev)

See my above point on which bus CPF selects for plotting.

Thanks.


On Tue, Nov 28, 2017 at 5:43 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
You may also want to consider the code in extras/maxloadlim which uses an OPF 
to find the maximum loadability. You can find the manual for this code on 
GitHub 
here<https://github.com/MATPOWER/matpower-extras/blob/master/maxloadlim/manual/maxloadlim_manual.pdf>.

   Ray



On Nov 28, 2017, at 5:45 AM, Electric 
mailto:electricaltranslat...@gmail.com>> wrote:

Thank you for your informative answer. If I only increase the load at a single 
bus, i, in the target case, does Max lambda indicates vulnerability of bus i, 
for voltage stability of power system.
In other words, does it mean that bus is critical for voltage stability studies?

On Mon, Nov 27, 2017 at 11:22 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hello,
  MATPOWER’s CPF requires two data files; the first one having the base 
loading/generation, called basecasedata, and the other that has the target 
loading/generation, called targetcasedata. The CPF traces the trajectory of 
solutions along increasing lambda direction, with lambda = 0 at the base-case 
solution and lambda = 1 at the targetcase. Lambda can go beyond or less than 1 
depending on where the system collapses (maximum loadability limit).

From your question, it seems like you want to increase the load at a single 
bus. For this, you merely need to modify the load for the given bus in the 
targetcase data and run the CPF.

Shri
From: 
mailto:bounce-122078874-73493...@list.cornell.edu>>
 on behalf of Electric 
mailto:electricaltranslat...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, November 27, 2017 at 4:23 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Fwd: How to find max-load ability for each bus of power system


I am interested to find the max load-ability at each bus in order to find the 
most critical buses in a power system in aspect of voltage stability.  How is 
it doable?
I thought of cpf, but it merely returns the max lambda which is an index for 
whole system.







Re: How to find max-load ability for each bus of power system

2017-11-27 Thread Abhyankar, Shrirang G.
Hello,
  MATPOWER’s CPF requires two data files; the first one having the base 
loading/generation, called basecasedata, and the other that has the target 
loading/generation, called targetcasedata. The CPF traces the trajectory of 
solutions along increasing lambda direction, with lambda = 0 at the base-case 
solution and lambda = 1 at the targetcase. Lambda can go beyond or less than 1 
depending on where the system collapses (maximum loadability limit).

From your question, it seems like you want to increase the load at a single 
bus. For this, you merely need to modify the load for the given bus in the 
targetcase data and run the CPF.

Shri
From:  on behalf of Electric 

Reply-To: MATPOWER discussion forum 
Date: Monday, November 27, 2017 at 4:23 AM
To: MATPOWER discussion forum 
Subject: Fwd: How to find max-load ability for each bus of power system


I am interested to find the max load-ability at each bus in order to find the 
most critical buses in a power system in aspect of voltage stability.  How is 
it doable?
I thought of cpf, but it merely returns the max lambda which is an index for 
whole system.




Re: PF and OPF did not converge

2017-10-03 Thread Abhyankar, Shrirang G.
http://www.pserc.cornell.edu/matpower/#pfconvergence

From:  on behalf of Charalambos 
Ioannou 
Reply-To: MATPOWER discussion forum 
Date: Tuesday, October 3, 2017 at 9:12 AM
To: "MATPOWER-L@cornell.edu" 
Subject: PF and OPF did not converge


Dear Ray,



I am trying to run PF and OPF for the following case but every time it doesnt 
converged the system. Please can you give me any advice??



The system consist 62 buses, 23 transformers, 8 photo voltaic plants and 1 
Natural gus generator.



I consider all the buses as Type 1(PQ) and the natural gas generator as Type 2 
(PV). The real power demand (Pd) for the photo voltaic plants i gave them a 
negative sign.


function mpc = IsleExample3()

TCL MERGE ERROR ( 10/03/2017 10:44:16 ): "invalid command name "MATPOWER""
OutmailID: 121902634, List: 'matpower-l', MemberID: 75174736
SCRIPT: "MATPOWER Case Format : Version 2
 mpc.version = '2';"
-  Power Flow Data  - system MVA base
mpc.baseMVA = 100;
TCL MERGE ERROR ( 10/03/2017 10:44:16 ): "invalid command name "1""
OutmailID: 121902634, List: 'matpower-l', MemberID: 75174736
SCRIPT: "bus data
 % bus_i  type Pd  Qd Gs Bs
 area Vm
 Va baseKV
 zone Vmax
 Vmin
 mpc.bus = [
 1   3   30.4   14.7   0   0   1   1   0   132 1   1.060.94;
 2   1   30.4   14.7   0   0   1   1   0   132 1   1.060.94;
 3   1   22.8   22.8   0   0   1   1   0   132 1   1.060.94;
 4   1   22.8   22.8   0   0   1   1   0   132 1   1.060.94;
 5   1   11355 0   0   1   1   0   132 1   1.060.94;
 6   1   11355 0   0   1   1   0   132 1   1.060.94;
 7   1   0   0   0   0   1   1   0   132 1   1.060.94;
 8   1   11355 0   0   1   1   0   132 1   1.060.94;
 9   1   11355 0   0   1   1   0   132 1   1.060.94;
 10  1   11355 0   0   1   1   0   33  1   1.060.94;
 11  1   19 9  0   0   1   1   0   11  1   1.060.94;
 12  1   11355 0   0   1   1   0   33  1   1.060.94;
 13  1   -6.89  0  0   0   1   1   0   33  1   1.060.94;
 14  1   -5.00  0  0   0   1   1   0   33  1   1.060.94;
 15  1   0   0   0   0   1   1   0   33  1   1.060.94;
 16  1   0   0   0   0   1   1   0   33  1   1.060.94;
 17  1   0   0   0   0   1   1   0   33  1   1.060.94;
 18  1   6   3   0   0   1   1   0   11  1   1.060.94;
 19  1   0   0   0   0   1   1   0   33  1   1.060.94;
 20  1   0   0   0   0   1   1   0   33  1   1.060.94;
 21  1   0   0   0   0   1   1   0   33  1   1.060.94;
 22  1   -9.20   0 0   0   1   1   0   33  1   1.060.94;
 23  1   0   0   0   0   1   1   0   33  1   1.060.94;
 24  1   0   0   0   0   1   1   0   33  1   1.060.94;
 25  1   0   0   0   0   1   1   0   33  1   1.060.94;
 26  1   0   0   0   0   1   1   0   33  1   1.060.94;
 27  1   0   0   0   0   1   1   0   33  1   1.060.94;
 28  1   17  8   0   0   1   1   0   11  1   1.060.94;
 29  1   0   0   0   0   1   1   0   33  1   1.060.94;
 30  1   -5.00   0 0   0   1   1   0   33  1   1.060.94;
 31  1   0   0   0   0   1   1   0   33  1   1.060.94;
 32  1   0   0   0   0   1   1   0   33  1   1.060.94;
 33  1   -5.00   0 0   0   1   1   0   33  1   1.060.94;
 34  1   0   0   0   0   1   1   0   33  1   1.060.94;
 35  1   6   3   0   0   1   1   0   11  1   1.060.94;
 36  1   0   0   0   0   1   1   0   33  1   1.060.94;
 37  1   -7.00   0 0   0   1   1   0   33  1   1.060.94;
 38  1   0   0   0   0   1   1   0   33  1   1.060.94;
 39  1   6   3   0   0   1   1   0   11  1   1.060.94;
 40  1   -1.50 0   0   1   1   0   33  1   1.060.94;
 41  1   0   0   0   0   1   1   0   33  1   1.060.94;
 42  1   0   0   0   0   1   1   0   33  1   1.060.94;
 43  1   0   0   0   0   1   1   0   33  1   1.060.94;
 44  1   27  13  0   0   1   1   0   11  1   1.060.94;
 45  1   27  13  0   0   1   1   0   11  1   1.060.94;
 46  1   -5.00   0   0   0   1   1   0   33  1   1.060.94;
 47  1   0   0   0   0   1   1   0   33  1   1.060.94;
 48  1   0   0   0   0   1   1   0   33  1   1.060.94;
 49  1   0   0   0   0   1   1   0   33  1   1.060.94;
 50  1   8   4   0   0   1   1   0   11  1   1.060.94;
 51  1   0   0   0   0   1   1   0   33  1   1.060.94;
 52  1   0   0   0   0   1   1   0   33  1   1.060.94;
 53  1   0   0   0   0   1   1   0   33  1   1.060.94;
 54  1   0   0   0   0   1   1   0   33  1   1.060.94;
 55  1   0   0   0   0   1   1   0   33  1   1.060.94;
 56  1   12  6   0   0   1   1   0   11  1   1.060.94;
 57  1   0   0   0   0   1   1   0   33  1   1.060.94;
 58  1   0   0   0   0   1   1   0   33  1   1.060.94;
 59  1   0   0   0   0   1   1   0  

Re: Tap ratios set to 0, run OPF with tap changers

2017-09-25 Thread Abhyankar, Shrirang G.

Dear Matpower users,

I have some questions about tap ratios in Matpwer.

What does it mean if the tap ratios TAP are set to 0?
Tap ratio=0 is used to indicate that the branch is a non-transformer branch, 
while 1 indicates a transformer branch. Even if you set the tap ratio = 0 for a 
transformer, MATPOWER internally uses a unity tap ratio meaning a 1:1 voltage 
transformation.
 I have previously run some power flows without caring about the tap ratios 
(TAP = 0). Now I set them to 1, and got quite different results.
I don’t think this should happen. With 0 or 1, the power flow results should be 
same.
I can't see that the admittance matrix in Figure 3.1 in the manual is well 
defined for zero tap ratio, so I thought setting them to 0 was like 
deactivating them.

Also, if I want to run an OPF with active tap changers, would it be best to 
include the tap ratios directly in the optimization constraints or to change 
the tap ratios in a callback function? Or maybe I can run several OPFs and 
change the tap ratios manually between each?

Incorporating tap changers in OPF is a non-trivial task. Moreover, I don’t 
think there is a callback function in PF or OPF.
Here are some relevant discussions from the mailing list.
https://www.mail-archive.com/matpower-l@cornell.edu/msg04162.html
https://www.mail-archive.com/matpower-l@cornell.edu/msg03339.html
Note that there is a pending pull request for this feature. You can try that 
out if you like.
Shri

Regards,
Elis Nycander



Re: branch_lims

2017-08-03 Thread Abhyankar, Shrirang G.
That's great! This would be a good addition to runcpf. You can contribute 
directly to MATPOWER
https://github.com/MATPOWER/matpower/blob/master/CONTRIBUTING.md. Alternately, 
you can send me (cc Ray) the code offline.

Thanks,
Shri
On Aug 3, 2017, at 1:35 AM, Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>> wrote:

Hi, I have some codes which enforce branch lims for runcpf.

If you are interested indicate.

On Aug 3, 2017 1:48 AM, 
"wgneu.katzenma...@t-online.de" 
mailto:wgneu.katzenma...@t-online.de>> wrote:

I am searching for an opportunity to let runpf enforce the branch limits.

Like enforce_q or enforce_p in moption.

Hopefully someone can help me.





Kind regards.






Gesendet mit Telekom Mail - kostenlos und 
sicher für alle!



Re: Calculation of r, x, b from PF results

2017-08-03 Thread Abhyankar, Shrirang G.
This is an inverse problem. You'll need to use a nonlinear least squares solver 
(lsqnonlin in MATLAB) to compute the line parameters given the different 
measurements. MATPOWER does not have an explicit function to do what you want, 
but you can use its different functions (or extract code from them) to set up 
the pieces you want.

Shri

On Aug 3, 2017, at 8:53 AM, Ehsan Hejri 
mailto:ehsan.hejri@gmail.com>> wrote:

Yes I need lumped form. I have only PF results and there is no data for 
branches apart from their configurations (How the buses connect together)

On Thu, Aug 3, 2017 at 3:44 PM, Sarmad Hanif 
mailto:sarmad.ha...@tum-create.edu.sg>> wrote:
Aren’t these values (in lumped form, which I guess you require) already defined 
in the branch data of the mpc case files ?

From: 
bounce-121697935-74036...@list.cornell.edu
 
[mailto:bounce-121697935-74036...@list.cornell.edu]
 On Behalf Of Ehsan Hejri
Sent: Thursday, 3 August, 2017 7:02 PM
To: MATPOWER-L@cornell.edu
Subject: Calculation of r, x, b from PF results

Hi community,
I have access to the following data:

1. Topology (connections)
2. Voltage magnitude in all buses
3. Voltage angle in all buses
4. P and Q from (all transmission lines)
5. P and Q to (all transmission lines)
6. P and Q (Generation)
7. P and Q (Demands)

Now i want to calculate r, x and b of all transmission lines . The transmission 
line model is pi.
Is there any way to calculate them fast by Matpower ?

Best Wishes,
Ehsan




Re: Objective Functions

2017-07-15 Thread Abhyankar, Shrirang G.
MATPOWER supports two types of generator cost curves: quadratic and piece-wise 
linear. I don’t think there is support for user-defined cost curves, Ray would 
be able to provide a more definitive answer. So, I think there is an no easy 
way to implement the objective you need. You’ll need to modify the MATPOWER 
code in order to implement what you want and there may be substantial coding 
you may need to do.

Shri

From:  on behalf of Akash Tyagi 

Reply-To: MATPOWER discussion forum 
Date: Saturday, July 15, 2017 at 8:10 AM
To: MATPOWER discussion forum 
Subject: Re: Objective Functions

Yeah,
Thanks so much sir.
Do you have any idea of how of to add valve point effect in the mpc.gencost 
data?
Presently, our Objective function is mainly a*P^2+b*P+c.
But if we want to include the valve point effect i.e. 
a*P(i)^2+b*P(i)+c+abs(e(i)*sin(f(i)(Pmin(i)-P(i))).
Can this be added in the MATPOWER??

On Sat, Jul 15, 2017 at 6:25 PM, Sarmad Hanif 
mailto:sarmad.ha...@tum-create.edu.sg>> wrote:
I would not say real power minimization, I think it is better to say active 
power cost minimization.
From: 
bounce-121659167-74036...@list.cornell.edu
 
[mailto:bounce-121659167-74036...@list.cornell.edu]
 On Behalf Of Akash Tyagi
Sent: Saturday, 15 July, 2017 8:51 PM

To: MATPOWER discussion forum
Subject: Re: Objective Functions

Thanks a lot.
It is working now.
The last thing I want to ask is if we don't add reactive cost data to case, 
then it is considering only the real power minimization??

On Sat, Jul 15, 2017 at 6:01 PM, Sarmad Hanif 
mailto:sarmad.ha...@tum-create.edu.sg>> wrote:
From Generator Cost Data table of the MATPOWER manual:
“If gen has ng rows, then the first ng rows of gencost contain the costs for 
active power produced by the
corresponding generators. If gencost has 2ng rows, then rows ng + 1 through 2ng 
contain the reactive
power costs in the same format.”

Since there are only active power cost terms in the case file and you have put 
all active power cost terms to zero, your cost function will evaluate to zero.
First add reactive power cost term rows and then specify their marginal values 
to be able for MATPOWER to consider them.
Hope it helps.
Sarmad

From: 
bounce-121659136-74036...@list.cornell.edu
 
[mailto:bounce-121659136-74036...@list.cornell.edu]
 On Behalf Of Akash Tyagi
Sent: Saturday, 15 July, 2017 7:46 PM

To: MATPOWER discussion forum
Subject: Re: Objective Functions

After putting the cost term of the real power to zero in the mpc.gencost field, 
as attached the case below-
Then after running the optimal power flow by using the following code-
clc
clear
close all;
define_constants;
mpc=loadcase(newcase5);
results=runopf(mpc);
The objective function is coming zero.??
I am not getting this??

On Sat, Jul 15, 2017 at 10:19 AM, Sarmad Hanif 
mailto:sarmad.ha...@tum-create.edu.sg>> wrote:
Hi,
Mr. Kardos already gave the references for you to explore the cost functions in 
detail.
A quick fix:
If you just want to minimize reactive power, then just put cost terms of the 
real power to zero in its approriate mpc.gencost field ☺

Btw, minimizing objective function can mean anything, as it depends on your 
“function”. It cannot always mean considering only the reactive power, as you 
mentioned in your previous email.

Thanks,
Sarmad

From: 
bounce-121652404-74036...@list.cornell.edu
 
[mailto:bounce-121652404-74036...@list.cornell.edu]
 On Behalf Of Akash Tyagi
Sent: Wednesday, 12 July, 2017 4:59 PM
To: MATPOWER discussion forum
Subject: Re: Objective Functions

Hello,
The obj_func mainly minimizes the cost including the real and reactive power.
But I have to only minimize objective function i.e. cost considering only the 
reactive power.
I tried the way explained by you above but I am not able to do this.?
Can you help?
basically, my goal is to change the objective function.
Thanks

On Wed, Jul 12, 2017 at 1:49 PM, Akash Tyagi 
mailto:akashtyagi0...@gmail.com>> wrote:
ok, thanks

On Wed, Jul 12, 2017 at 1:40 PM, Kardoš Juraj 
mailto:juraj.kar...@usi.ch>> wrote:
Try to have a look in the code in opf_costfcn.m and compare it with the 
objective function definition in the manual 
(http://www.pserc.cornell.edu/matpower/manual.pdf) section 6.1 equation (6.6). 
You will find the function implemented in the code, as well as its gradient and 
Hessian w.r.t. vector x (equation 6.5). If you have problems with derivatives, 
have a look at section 6 in this document 
http://www.pserc.cornell.edu/matpower/TN2-OPF-Derivatives.pdf. It describes how 
the first and second derivatives can be computed. Good luck!
==
Juraj Kardos
Advanced Computing Laboratory
Institute of Computational S

Re: Get_losses

2017-07-15 Thread Abhyankar, Shrirang G.
dloss_dv is the partial derivative of the losses w.r.t. voltage angle. It is an 
optional output argument. If you do not need it then don’t use it.

FYI: MATPOWER has an online function 
reference where you can see 
the usage of all of its functions. Suggest going through this first and then 
sending questions to the list if something is not clear. Here’s the reference 
for the 
get_losses
 function.

Shri

From:  on behalf of Akash Tyagi 

Reply-To: MATPOWER discussion forum 
Date: Saturday, July 15, 2017 at 2:04 AM
To: MATPOWER discussion forum 
Subject: Get_losses

Hello everyone, I am trying to use get_losses command and it's quite easy but i 
am not getting one thing in that command,
mpc=loadcase(case5);
results=runpf(mpc);
[loss,fchg,tchg,dloss_dv]=get_losses(results);
what is 'dloss_dv' given means??



Re: Compare case

2017-07-15 Thread Abhyankar, Shrirang G.
compare_case() cannot be used on two different networks. It compares the 
runpf() (or runopf()) outputs for two different scenarios on the “same” network.

For example,
mpc1 = runpf(‘case9’);% run power flow on 9-bus network
mpc2 = loadcase(‘case9’);% load 9-bus network
mpc2.branch(8,11) = 0;  % Turn off branch 8-9
mpc2 = runpf(mpc2);   % run power flow on the modified 9-bus network
compare_case(mpc1,mpc2);   TCL MERGE ERROR ( 07/15/2017 11:42:22 ): "invalid 
command name "compare""
OutmailID: 121659301, List: 'matpower-l', MemberID: 75174736
SCRIPT: "compare the power flow outputs
 
   --  --  --  -
 matrix / col case 1  case 2difference row
   --  --  --  -
 bus
   VM  0.9576210.890468   0.0671533  9
   VA   9.66874 31.9688 22.3001  2 *
 
 gen
   PG   71.9547 81.1538 9.19907  1
   QG24.069 84.4959 60.4269  1 *
 
 branch
   BR_STATUS  1   0   1  8
   PF   86.5044   0 86.5044  8 *
   QF24.069 84.4959 60.4269  1
   PT   76.4956 163 86.5044  6
   QT   -20.753  -76.59 55.8369  1
 
 compare_case() results show the non-zero differences in the bus, gen, and 
branch arrays.
 
 Shri
 
 From:  on behalf of Akash Tyagi 

 Reply-To: MATPOWER discussion forum 
 Date: Saturday, July 15, 2017 at 1:33 AM
 To: MATPOWER discussion forum 
 Subject: Compare case
 
 hello to everyone,
 I am studying the compare_case function and while I am comparing the two case 
i.e. case5 and case9 by using the following command-
 mpc1=loadcase(case5);
 mpc2=loadcase(case9);
 compare_case(mpc1,mpc2)
 It is giving the following error-
 Error using  -
 Matrix dimensions must agree.
 
 Error in compare_case (line 127)
 [temp, i] = max(abs(bus1(:, 1:Nb) - bus2(:, 1:Nb)));
 
 How this function used??
 
  --_000_0C01F930478B4F6EB4E7AE908094027Canlgov_ Content-Type: text/html;   
charset="utf-8" Content-ID: 
 
Content-Transfer-Encoding: base64  http://schemas.microsoft.com/office/2004/12/omml"; 
xmlns="http://www.w3.org/TR/REC-html40";>
 
 
 
 
 
 
 
 
 
 compare_case() cannot be used 
on two different networks. It compares the runpf() (or runopf()) outputs for 
two different scenarios on the “same” network.
  
 For 
example,
 mpc1 = runpf(‘case9’);  
  % run power flow on 9-bus 
network
 mpc2 = loadcase(‘case9’);  
  % load 9-bus network
 mpc2.branch(8,11) = 0;  % 
Turn off branch 8-9
 
 mpc2 = runpf(mpc2); 
  % run power flow on the modified 9-bus network
 compare_case(mpc1,mpc2); 
  "
 compare the power flow outputs
 
  
--  --  --  
-
matrix / 
col case 
1  case 
2    difference 
row

  
--  --  --  
-
bus
  
VM 
 0.957621    
0.890468   
0.0671533  9
  
VA  
 9.66874    
 31.9688 
22.3001  2 *
 
gen
  
PG  
 71.9547 
81.1538 
9.19907  1
  
QG   
 24.069 
84.4959 
60.4269  1 *
 
branch
  
BR_STATUS 
 
1  
 
0  
 1  8
  
PF  
 
86.5044  
 0 
86.5044  8 *
  
QF   
 24.069 
84.4959 
60.4269  1
  
PT  
 
76.4956 
163 
86.5044  6
  
QT  
 -20.753  
-76.59

Re: multi-period AC Power Flow (not OPF)

2017-07-15 Thread Abhyankar, Shrirang G.
Using a loop would be the easiest way. Alternately, you could concatenate all 
the mpc bus, gen, etc. arrays into one giant mpc case and then solve it via a 
single runpf(). However, this is more complicated (changing of bus,gen, branch 
numbers for the later time-steps) compared to using a loop.

Shri

From:  on behalf of Sarmad Hanif 

Reply-To: MATPOWER discussion forum 
Date: Friday, July 14, 2017 at 11:52 PM
To: "matpowe...@list.cornell.edu" 
Subject: multi-period AC Power Flow (not OPF)

Dear all,
Just a quick question, I am running a simple loop to run an AC power flow with 
changing P,Q (loads) and (P,V) generator values at each step.
Is there a procedure to do it in one shot ?

Best,
Sarmad

M.Sc. Sarmad Hanif
Research Associate, ESTL – Electrification Suite and Test Lab
TUM CREATE Ltd.
1 CREATE Way, #10-02, CREATE Tower, Singapore 138602
T: +65 905 333 25
W: www.tum-create.edu.sg






Re: CPF Callback Functions

2017-07-05 Thread Abhyankar, Shrirang G.
Here’s an 
example
 of a CPF call back function. The callback function can be set through MATPOWER 
options struct

mpopt = 
mpoption(mpopt,
 'cpf.user_callback', );

Shri

From:  on behalf of Majid 
Mehdizadeh 
Reply-To: MATPOWER discussion forum 
Date: Wednesday, July 5, 2017 at 10:58 AM
To: "matpower-l@cornell.edu" 
Subject: CPF Callback Functions


​Hi ,I can not use the call back functions in cpf code , Any body can bring me 
an example of using a call back function. i want to access the tangent vector 
in each iteration. Thanks ​

--
Best Regards
Majid Mehdizadeh

Ph.D Student,  Department of Electrical Engineering,
Faculty of Engineering, Ferdowsi University of Mashhad

Substation and Transmission Line Expert, Engineering office,
Khorasan Regional Electric Co.

Tel: +98 5136103594 Fax: +98 5136103509

http://mehdizadeh.majid.student.um.ac.ir




Re: Load increase in one busbar using runcpf

2017-05-14 Thread Abhyankar, Shrirang G.
Assuming 101 is the row number in the mpc.bus array for bus 101:

define_constants;
mpopt = mpoption('out.all', 1, 'verbose', 2);
mpopt = mpoption(mpopt, 'cpf.stop_at', 'FULL', 'cpf.step', 
0.2,’cpf.plot.bus’,101);
mpopt = mpoption(mpopt, 'cpf.plot.level', 2);
mpcb = loadcase('Case_04'); % load base case
mpct = mpcb; % set up target case with
mpct.bus(101, [PD QD]) = mpcb.bus(101, [PD QD]) * 2.5 ; % and increased load
results = runcpf(mpcb, mpct, mpopt);
Shri


From: "aws...@yahoo.com" 
mailto:aws...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Saturday, May 13, 2017 at 10:31 PM
To: "matpowe...@list.cornell.edu" 
mailto:matpowe...@list.cornell.edu>>
Subject: Load increase in one busbar using runcpf

Dear all

Can anyone tell me what command I can use to increase a load in a specific 
busbar (let’s say bus 101) and get the P-V curve on that busbar please ?

I have these commands to increase overall load 2.5 times increased:
define_constants;
mpopt = mpoption('out.all', 1, 'verbose', 2);
mpopt = mpoption(mpopt, 'cpf.stop_at', 'FULL', 'cpf.step', 0.2);
mpopt = mpoption(mpopt, 'cpf.plot.level', 2);
mpcb = loadcase('Case_04'); % load base case
mpct = mpcb; % set up target case with
mpct.bus(:, [PD QD]) = mpcb.bus(:, [PD QD]) * 2.5 ; % and increased load
results = runcpf(mpcb, mpct, mpopt);

Best Regards
Kawsar



Re: CPF termination

2017-05-10 Thread Abhyankar, Shrirang G.
Thanks for agreeing to contribute your code. I believe it would be a great 
addition to MATPOWER’s CPF.

It would be good if you can write separate functions for each event type. If 
its too much for you, then you can write one event function for now. We can 
work on splitting it later.

Shri

From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, May 10, 2017 at 12:15 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF termination

Hi Shrirang,
Thanks once again.
Yes, I will be honoured to contribute my codes to matpower once it's ready.
To implement my written event function for cpf termination, (e.g. 
cpf_Vlimit_event or cpf_Llimit_event) does each of these need a separate 
callback function?

Alternatively, I thought of implementing this in similar manner as the 
cpf.enforce_q_lims. Kindly advice

On May 10, 2017 5:25 PM, "Abhyankar, Shrirang G." 
mailto:abhy...@anl.gov>> wrote:
Hi Ahmad,
  If you are referring to cpf_default_callback.m then NO, you do need to modify 
it. The callback function(s) are basically “post-step” that do not alter the 
cpf. They are meant to be used for tracking system states for logging, 
visualization, or other similar needs.

Would you be willing to contribute your code to MATPOWER? I can work with you 
on cleaning up the code once it is ready.

Thanks,
Shri


From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, May 10, 2017 at 7:44 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF termination

Hi Shrirang,

Thank you for the insight. I try to use cpf_target_lam_event as template, do I 
also need to write a callback function for my Vlimts and Llimits event? or 
modify the default callback function for cpf termination?

Kindly excuse my too basic questions, I am novice in coding.

In anticipation of your reply


On Apr 25, 2017 6:45 PM, "Abhyankar, Shrirang G." 
mailto:abhy...@anl.gov>> wrote:
Ahmad,
  You need to implement an event function (see section 5.5 of the manual) for 
cpf with logic on how you want cpf to terminate. There are a few event 
functions currently implemented — nose point detection, target limit, 
active/reactive power limits — but there is no user-defined event function 
support yet. So, here’s what you’ll need to do:

i) Use cpf_nose_event.m or cpf_target_lam_event as a template to write your own 
event function.
I) Modify runcpf code to register your event function (see lines 173-190 on how 
different event functions are registered).

Let us know if you need more help.

Shri

From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, April 25, 2017 at 1:22 PM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
mailto:matpower-l@cornell.edu>>
Subject: CPF termination

Hi,
I want to run cpf such that, it stops either at Vmax, Vmin, or ratedA, ratedB 
and ratedC. In other words, cpf termination should respect bus voltage limits 
and line thermal limit constraints.

Kindly assist on how to implement the codes.


Re: CPF termination

2017-05-10 Thread Abhyankar, Shrirang G.
Hi Ahmad,
  If you are referring to cpf_default_callback.m then NO, you do need to modify 
it. The callback function(s) are basically “post-step” that do not alter the 
cpf. They are meant to be used for tracking system states for logging, 
visualization, or other similar needs.

Would you be willing to contribute your code to MATPOWER? I can work with you 
on cleaning up the code once it is ready.

Thanks,
Shri


From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, May 10, 2017 at 7:44 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF termination

Hi Shrirang,

Thank you for the insight. I try to use cpf_target_lam_event as template, do I 
also need to write a callback function for my Vlimts and Llimits event? or 
modify the default callback function for cpf termination?

Kindly excuse my too basic questions, I am novice in coding.

In anticipation of your reply


On Apr 25, 2017 6:45 PM, "Abhyankar, Shrirang G." 
mailto:abhy...@anl.gov>> wrote:
Ahmad,
  You need to implement an event function (see section 5.5 of the manual) for 
cpf with logic on how you want cpf to terminate. There are a few event 
functions currently implemented — nose point detection, target limit, 
active/reactive power limits — but there is no user-defined event function 
support yet. So, here’s what you’ll need to do:

i) Use cpf_nose_event.m or cpf_target_lam_event as a template to write your own 
event function.
I) Modify runcpf code to register your event function (see lines 173-190 on how 
different event functions are registered).

Let us know if you need more help.

Shri

From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, April 25, 2017 at 1:22 PM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
mailto:matpower-l@cornell.edu>>
Subject: CPF termination

Hi,
I want to run cpf such that, it stops either at Vmax, Vmin, or ratedA, ratedB 
and ratedC. In other words, cpf termination should respect bus voltage limits 
and line thermal limit constraints.

Kindly assist on how to implement the codes.


FW: MATPOWER, 9 bus System, Need help solving

2017-04-29 Thread Abhyankar, Shrirang G.
Dear Saad,
  It is always best to send your querries on the MATPOWER mailing list than to 
direct it to individual members. You will multiple and much better responses by 
mailing the list. I don’t think MATPOWER has a function that can do the state 
estimation as you’ve described in the document. However, it has all the 
necessary building blocks needed for you to write the code. I would suggest to 
go through the list of MATPOWER 
functions and the 
manual as a first 
step.

Shri

From: Saad Waheed Abbasi 
mailto:saad.waheed.abb...@outlook.com>>
Date: Saturday, April 29, 2017 at 7:34 AM
To: Shri mailto:abhy...@anl.gov>>
Subject: MATPOWER, 9 bus System, Need help solving


Hello,

Hope you will be doing good. I am doing a research in smart grids in which I 
have to use MATPOWER for DC load analysis of 9 bus system. Where I have to find 
the Jacobian MATRIX. The Mathematical Model is attached with the email. I will 
appreciate your help.

Regards.

Saad Abbasi.
Sent from Mail for Windows 10



model.docx
Description: model.docx


Re: CPF termination

2017-04-25 Thread Abhyankar, Shrirang G.
Ahmad,
  You need to implement an event function (see section 5.5 of the manual) for 
cpf with logic on how you want cpf to terminate. There are a few event 
functions currently implemented — nose point detection, target limit, 
active/reactive power limits — but there is no user-defined event function 
support yet. So, here’s what you’ll need to do:

i) Use cpf_nose_event.m or cpf_target_lam_event as a template to write your own 
event function.
I) Modify runcpf code to register your event function (see lines 173-190 on how 
different event functions are registered).

Let us know if you need more help.

Shri

From: Ahmad Sadiq Abubakar 
mailto:ahmad.abuba...@futminna.edu.ng>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, April 25, 2017 at 1:22 PM
To: "matpower-l@cornell.edu" 
mailto:matpower-l@cornell.edu>>
Subject: CPF termination

Hi,
I want to run cpf such that, it stops either at Vmax, Vmin, or ratedA, ratedB 
and ratedC. In other words, cpf termination should respect bus voltage limits 
and line thermal limit constraints.

Kindly assist on how to implement the codes.


Re: Line loading limit

2017-04-19 Thread Abhyankar, Shrirang G.
rundcopf also enforces line limits, albeit only MW flow due to DC modeling.

Suggest reading Chapter 6 of the MATPOWER 
manual<http://www.pserc.cornell.edu/matpower/manual.pdf>

Shri

From: Akash Tyagi mailto:akashtyagi0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, April 19, 2017 at 1:32 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Line loading limit

and what in case of 'rundcopf'

On Wed, Apr 19, 2017 at 11:39 AM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
runpf does not enforce any line limits. You need to run optimal power flow 
(runopf).

Shri

From: Akash Tyagi mailto:akashtyagi0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, April 18, 2017 at 9:57 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Line loading limit

Hello everyone,
I want to ask a simple concept of line loading limit, As i have asked earlier 
also the rate A variable is only used in MATPOWER to limit the line. Other two 
rates are of no use.
I am trying to make a line congested by limiting its limit.
here is my following case-
define_constants;
mpc=loadcase(case30)
mpc.branch(:,RATE_A)=10;
results=runpf(mpc);

I firstly i run the above code without limiting the rate and then after 
limiting the rate, but the power loss is  not changing at all in any of the 
cases..
help me out.
thanks in advance.:)



Re: Line loading limit

2017-04-18 Thread Abhyankar, Shrirang G.
runpf does not enforce any line limits. You need to run optimal power flow 
(runopf).

Shri

From: Akash Tyagi mailto:akashtyagi0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, April 18, 2017 at 9:57 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Line loading limit

Hello everyone,
I want to ask a simple concept of line loading limit, As i have asked earlier 
also the rate A variable is only used in MATPOWER to limit the line. Other two 
rates are of no use.
I am trying to make a line congested by limiting its limit.
here is my following case-
define_constants;
mpc=loadcase(case30)
mpc.branch(:,RATE_A)=10;
results=runpf(mpc);

I firstly i run the above code without limiting the rate and then after 
limiting the rate, but the power loss is  not changing at all in any of the 
cases..
help me out.
thanks in advance.:)


Re: regarding CPF

2017-04-13 Thread Abhyankar, Shrirang G.
I think the base case has the generator at bus 8 turned off, while the target 
case has it ON. My guess is this is causing problems in the CPF when creating 
the transfer vectors due to differences in sizes of the Pg/Qg. Can you keep the 
generator ON at bus 8 in the base case with zero real and reactive power output 
to mimic an OFF generator and rerun your code.

Btw, please ALWAYS copy/paste the ENTIRE error message MATLAB dumps out. This 
will be helpful in debugging the problem.

Shri

From: Akash Tyagi mailto:akashtyagi0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Thursday, April 13, 2017 at 12:36 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: regarding CPF

Thanks for solving the problem.
Now my CPF is running, but there is one more problem.
I have successfully run the CPF for my case30aaa and i found the the minimum 
bus voltage is at bus-8, and now i want to inject reactive power at this bus in 
order to reduce the losses, and make the status of the generatoe ON.
I did the following steps, but it fails.

clc
clear
close all;
define_constants;
mpopt=mpoption('out.all',-1,'verbose',2);
mpopt=mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step',0.2);
mpopt=mpoption(mpopt,'cpf.plot.level',2);
mpcb=loadcase(case30aaa);
mpct=mpcb;
mpct.bus(:,[PD,QD])=mpcb.bus(:,[PD,QD])*5; % increasing the load by 5
mpct.gen(8,QG)=mpcb.gen(8,QG)+10;
mpcb.gen(8,GEN_STATUS)=1;
runopf(mpcb)
[results,success]=runcpf(mpcb,mpct,mpopt);


Re: False Data Detection in State Estimation

2017-04-02 Thread Abhyankar, Shrirang G.
MATPOWER assumes the network is balanced so only a positive sequence power flow 
calculation is performed for transmission and distribution. If you’d like to do 
an unbalanced distribution power flow calculation then you’ll need to use other 
tools like OpenDSS or GridLab-D.

Shri

From: Akash Tyagi mailto:akashtyagi0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, April 2, 2017 at 2:15 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: False Data Detection in State Estimation

Hello everyone,

I got familiar with the distribution power flow and power flow in MATPOWER, but 
i want to know about the phases.?

The power flow we are doing in for single phase??

And if it is for single phase than i want to know, how power flow for three 
phase is solved using MATPOWER?

Thanks in advance.

On Thu, Mar 23, 2017 at 11:00 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
First, please send your MATPOWER questions to the MATPOWER-L list at 
MATPOWER-L@cornell.edu (not to the list owner).

The state estimation code in MATPOWER is contributed code that is not a 
supported part of the main MATPOWER functionality. So, all I can do is point 
you to the included documentation and suggest you follow up with the original 
author Rui Bo if you have questions.

I would start by checking out the contents of the extras/se directory in 
MATPOWER. In particular, you’ll want to have a look at the se_intro.pdf 
document there that describes the code.

Ray


On Mar 23, 2017, at 10:20 AM, Saeed Ahmed 
mailto:saeed.ahme...@gmail.com>> wrote:

Respected All,
I am doing research on the topic of "Detection of false data injection on Power 
State Estimation". I have installed MATPOWER 6.0 and need guidance to start 
work. After reading some literature I have build up an understanding as follows:

1) State estimation  in DC/Linear power network is to estimate the phase angles 
by observing the measurements
2) Voltage magnitudes are assumed 1pu

Now starting with the simplest case of 9 buses, how can I initiate the state 
estimation using MATPOWER?

Regards
Saeed Ahmed




Re: Continuation Power Flow - Target case data

2017-04-02 Thread Abhyankar, Shrirang G.
The target case lets one set the power transfer direction along which the 
steady state loading limit needs to be determined. Different target 
generation/loading will yield different nose points.

Shri

From: Sanjay Rajendran 
mailto:sanjay.rajendran0...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, April 2, 2017 at 12:46 AM
To: "matpowe...@list.cornell.edu" 
mailto:matpowe...@list.cornell.edu>>
Subject: Continuation Power Flow - Target case data

Hi,

 Forgive me for asking but I'm quite new to CPF. What I don't get is the 
concept of target case data. As I far I can understand, the CPF helps us 
identify the point of voltage collapse in a network, so what is the relevance 
of a target case data ?

Thank You,
Sanjay




Re: CPF Question

2017-03-06 Thread Abhyankar, Shrirang G.
Hi Aqeeb,
  The ‘mu’ you mention is the same as the load scaling factor ‘lambda’ in 
MATPOWER’s continuation power flow. Lambda = 0 denotes a base-case 
generation/loading scenario, while lambda=1 is the target generation/loading 
scenario.

For plotting the lambda (or mu)-voltage curve for a specific bus you merely 
need to use the option ‘cpf.plot.bus’.

results = 
runcpf(,,mpoption(‘cpf.plot.level’,2,cpf.plot.bus,);

Please read the Continuation Power Flow chapter in the MATPOWER manual for a 
list of all the available options.

Shri

From: Aaqib Peerzada mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, March 5, 2017 at 1:37 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF Question

Hello Shri

Thanks for getting back.

 I'd like to make my situation more clear. My work involves scaling up the all 
the loads in a power network in an incremental fashion up until the power flow 
equations become unfeasible. So I progressively stress the system by increasing 
all the loads through a load multiplier factor, lets call it mu. As I do this, 
the system will not converge for some value of mu, in case of 39 bus system, 
mu=1.239, which means the system collapses when all loads are scaled up by a 
factor of 1.239 Now I'd like to plot the nose curve (FULL) of any arbitrary bus 
using the CPF in MATPOWER. So ideally what I want is bus voltage plotted with 
mu.

Can i get additional insights in to how can I modify the default callback 
function keeping in view my requirements?

Thanks,
Aaqib

On Sun, Mar 5, 2017 at 12:22 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hello Aaqib,
  There is no in-built function in MATPOWER to plot what you need. However, you 
can do so easily in two ways:

  1.  Modify the default callback function, cpf_default_callback.m, to plot the 
active power - voltage curve. Currently, it is set to plot lambda-voltage curve 
(both predicted and corrected).
  2.  runcpf’s output struct stores all the states for each continuation step 
in its cpf field (results.cpf). You can use these values to create the active 
power-voltage curve.

Hope this helps,
Shri

From: Aaqib Peerzada mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Friday, March 3, 2017 at 9:10 PM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
mailto:matpower-l@cornell.edu>>
Subject: CPF Question

Dear Dr. Zimmerman and Friends

I have a question regarding CPF in Matpower. In matpower the CPF algorithm 
plots the bus voltage against the continuation parameter (λ). However I'd like 
to plot the voltage against the active power at a bus(abscissa ). Is there any 
specific function that can let me do that or do i need to write some  
additional code for accomplishing this?

Thanks

--
Aaqib A Peerzada





--
Aaqib A Peerzada
Graduate Student
Department of Electrical and Computer Engineering
Wisenbaker Engineering Research Center
Texas A&M University
College Station, Texas
United States.
Phone # 979-739-2799
Email: peerz...@tamu.edu<mailto:peerz...@tamu.edu>



Re: CPF Question

2017-03-05 Thread Abhyankar, Shrirang G.
Hello Aaqib,
  There is no in-built function in MATPOWER to plot what you need. However, you 
can do so easily in two ways:

  1.  Modify the default callback function, cpf_default_callback.m, to plot the 
active power - voltage curve. Currently, it is set to plot lambda-voltage curve 
(both predicted and corrected).
  2.  runcpf’s output struct stores all the states for each continuation step 
in its cpf field (results.cpf). You can use these values to create the active 
power-voltage curve.

Hope this helps,
Shri

From: Aaqib Peerzada mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Friday, March 3, 2017 at 9:10 PM
To: "matpower-l@cornell.edu" 
mailto:matpower-l@cornell.edu>>
Subject: CPF Question

Dear Dr. Zimmerman and Friends

I have a question regarding CPF in Matpower. In matpower the CPF algorithm 
plots the bus voltage against the continuation parameter (λ). However I'd like 
to plot the voltage against the active power at a bus(abscissa ). Is there any 
specific function that can let me do that or do i need to write some  
additional code for accomplishing this?

Thanks

--
Aaqib A Peerzada




Re: CPF with Matpower

2017-03-02 Thread Abhyankar, Shrirang G.
Sorry for the delay in replying. I did not get any error while running this 
case.

define_constants;
basecase = loadcase('case14_index_70’);
targetcase = basecase;
targetcase.gen(:,PG) = targetcase.gen(:,PG)*3.0;
targetcase.gen(:,PG) = targetcase.gen(:,PG)*3.0;
targetcase.bus(:,PD) = targetcase.bus(:,PD)*3.0;
targetcase.bus(:,QD) = targetcase.bus(:,QD)*3.0;
results = runcpf(basecase,targetcase,mpoption('cpf.plot.level',2));

The nose-point for this case is at lambda = 1.447.

Shri



From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, February 27, 2017 at 7:07 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF with Matpower

Hi Shri,
Here is attached file. Last time I hyperlinked with my google drive.

bests-
Mahi

On Mon, Feb 27, 2017 at 8:03 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hi Mahi,
 No file was attached with your email.

Shri

From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, February 27, 2017 at 6:52 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF with Matpower

Hi Shri,
Thanks for the very helpful response. Yes, I got it working. One problem I am 
facing, is that for some cases after the running of the cpf, it is saying "CPF 
TERMINATION: Corrector did not converge in 10 iterations", suppose in the 
attached <https://drive.google.com/open?id=0BzHW_Oh9YrAfY0gwQ0xTNGJHVzg> case 
(modified 14 bus case, only the line impedances are changed).

So in this case is there anyway I can increase the number of steps for the cpf?

Thanks
Mahi

On Wed, Feb 22, 2017 at 11:16 AM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hello Mahi,
  basecasedata is a MATPOWER data struct that has the base case 
loading/generation, while targetcasedata has that for the target 
loading/generation. A continuation power flow traces power flow solutions 
starting from the base case to the target case, if it can be reached.

Please see the example on Page 46 of the 
manual<http://www.pserc.cornell.edu/matpower/manual.pdf>. It has an 
illustrative example demonstrating how to run a continuation power flow..

CPF can plot the PV curve by setting the cpf.plot.level MATPOWER option. 
Additionally, you can choose specific bus(es) with the option cpf.plot.bus (see 
Table 5.2 in the manual)

MATPOWER does not directly transfer the continuation power flow results to 
Excel, you can do so using the appropriate MATPOWER commands for exporting 
data. The continuation power flow results are stored in the ouput results 
struct of the continuation power flow. The description of the various fields of 
this struct are given in Table 5.1.

Hope this helps.

Shri

From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, February 21, 2017 at 4:50 PM
To: "MATPOWER-L@cornell.edu<mailto:MATPOWER-L@cornell.edu>" 
mailto:MATPOWER-L@cornell.edu>>
Subject: CPF with Matpower

Hello,
I apologize for a very basic question. I want to run CPF using matpower and 
finding no way to do it. In the manual it says that I need to do the following

 results = runcpf(basecasedata, targetcasedata)

But, suppose I want to do CPF for the 14 bus - 'case14'. What do I need to do 
for that? Is the case14 would be the basecasedata in this case? What would be 
the targetcasedata?

Once, these are solved can I transfer all P-V results to excel file in order to 
draw the PV curve?

Thanks in advance.


Bests-
Mahi




Re: CPF with Matpower

2017-02-27 Thread Abhyankar, Shrirang G.
Hi Mahi,
 No file was attached with your email.

Shri

From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, February 27, 2017 at 6:52 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: CPF with Matpower

Hi Shri,
Thanks for the very helpful response. Yes, I got it working. One problem I am 
facing, is that for some cases after the running of the cpf, it is saying "CPF 
TERMINATION: Corrector did not converge in 10 iterations", suppose in the 
attached <https://drive.google.com/open?id=0BzHW_Oh9YrAfY0gwQ0xTNGJHVzg> case 
(modified 14 bus case, only the line impedances are changed).

So in this case is there anyway I can increase the number of steps for the cpf?

Thanks
Mahi

On Wed, Feb 22, 2017 at 11:16 AM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hello Mahi,
  basecasedata is a MATPOWER data struct that has the base case 
loading/generation, while targetcasedata has that for the target 
loading/generation. A continuation power flow traces power flow solutions 
starting from the base case to the target case, if it can be reached.

Please see the example on Page 46 of the 
manual<http://www.pserc.cornell.edu/matpower/manual.pdf>. It has an 
illustrative example demonstrating how to run a continuation power flow..

CPF can plot the PV curve by setting the cpf.plot.level MATPOWER option. 
Additionally, you can choose specific bus(es) with the option cpf.plot.bus (see 
Table 5.2 in the manual)

MATPOWER does not directly transfer the continuation power flow results to 
Excel, you can do so using the appropriate MATPOWER commands for exporting 
data. The continuation power flow results are stored in the ouput results 
struct of the continuation power flow. The description of the various fields of 
this struct are given in Table 5.1.

Hope this helps.

Shri

From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, February 21, 2017 at 4:50 PM
To: "MATPOWER-L@cornell.edu<mailto:MATPOWER-L@cornell.edu>" 
mailto:MATPOWER-L@cornell.edu>>
Subject: CPF with Matpower

Hello,
I apologize for a very basic question. I want to run CPF using matpower and 
finding no way to do it. In the manual it says that I need to do the following

 results = runcpf(basecasedata, targetcasedata)

But, suppose I want to do CPF for the 14 bus - 'case14'. What do I need to do 
for that? Is the case14 would be the basecasedata in this case? What would be 
the targetcasedata?

Once, these are solved can I transfer all P-V results to excel file in order to 
draw the PV curve?

Thanks in advance.


Bests-
Mahi



Re: bus view

2017-02-24 Thread Abhyankar, Shrirang G.
Try http://immersive.erc.monash.edu.au/stac/

Shri

From: Matt Carmell 
mailto:matt.carm...@scylla-energy.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Friday, February 24, 2017 at 12:21 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: bus view


Does anyone know if there are any graphical tools compatible with Matpower able 
to view/inspect a case at the bus level?  I'm looking for something analogous 
to the "bus view" that is available in Powerworld.


[Inline image 1]
--
Matt Carmell



Re: CPF with Matpower

2017-02-22 Thread Abhyankar, Shrirang G.
Hello Mahi,
  basecasedata is a MATPOWER data struct that has the base case 
loading/generation, while targetcasedata has that for the target 
loading/generation. A continuation power flow traces power flow solutions 
starting from the base case to the target case, if it can be reached.

Please see the example on Page 46 of the 
manual. It has an 
illustrative example demonstrating how to run a continuation power flow..

CPF can plot the PV curve by setting the cpf.plot.level MATPOWER option. 
Additionally, you can choose specific bus(es) with the option cpf.plot.bus (see 
Table 5.2 in the manual)

MATPOWER does not directly transfer the continuation power flow results to 
Excel, you can do so using the appropriate MATPOWER commands for exporting 
data. The continuation power flow results are stored in the ouput results 
struct of the continuation power flow. The description of the various fields of 
this struct are given in Table 5.1.

Hope this helps.

Shri

From: Mahbubur R mailto:tanim.3...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, February 21, 2017 at 4:50 PM
To: "MATPOWER-L@cornell.edu" 
mailto:MATPOWER-L@cornell.edu>>
Subject: CPF with Matpower

Hello,
I apologize for a very basic question. I want to run CPF using matpower and 
finding no way to do it. In the manual it says that I need to do the following

 results = runcpf(basecasedata, targetcasedata)

But, suppose I want to do CPF for the 14 bus - 'case14'. What do I need to do 
for that? Is the case14 would be the basecasedata in this case? What would be 
the targetcasedata?

Once, these are solved can I transfer all P-V results to excel file in order to 
draw the PV curve?

Thanks in advance.


Bests-
Mahi


Re: load reduction in continuation power flow (CPF)

2017-02-16 Thread Abhyankar, Shrirang G.
I agree with Ray. The base case dispatch being updated by OPF causes a 
reduction in generation, commensurate to the load reduction, and hence you are 
seeing a decrease in the load margin. What happens when you decrease the load 
at some other buses? Do you get the same behavior?

Shri

From: Ray Zimmerman mailto:r...@cornell.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Thursday, February 16, 2017 at 8:28 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: load reduction in continuation power flow (CPF)

The code looks correct to me. I’m not sure why the load margin decreases, but 
the changes in load (from positive to equally negative) may be forcing the OPF 
solution into generator dispatch solutions that somehow reduce the load margin.

Ray


On Feb 15, 2017, at 10:45 PM, Majid Mehdizadeh 
mailto:majidmeh@gmail.com>> wrote:

Dear sir and matpower committee
It is very strange for me that when the load of some PQ buses in IEEE 39 bus 
test system are reduced and then cpf is performed then the load margin of the 
system is becoming lower . It should be noted that i use the following code to 
estimate the load margin of the system using maximum lambda.:
clc
clear all
a=0;
for ii=1:20
mpcb = loadcase(case39); % load base case
for v=[1 3 4 7];
mpcb.bus(v,3)=mpcb.bus(v,3)-a*mpcb.bus(v,3);
end
mpopt = mpoption('verbose',0,'out.all',0); %default
result=runopf(mpcb,mpopt);%bayad print ro disable koni
mpcb.gen(:,2)=result.gen(:,2);
load=sum(mpcb.bus(:,3))
generation=sum(mpcb.gen(:,2))
mpopt = mpoption('out.all',0,'verbose',0);
mpopt = mpoption(mpopt,'cpf.stop_at','NOSE','cpf.step', 0.2);
mpopt = mpoption(mpopt,'cpf.plot.level',0,'cpf.plot.bus',8);
mpct = mpcb; % set up target case with
mpct.gen(:,[2 3]) = mpcb.gen(:,[2 3]) * 3.5; % increased generation
mpct.bus(:,[3 4]) = mpcb.bus(:,[3 4]) * 3.5; % and increased load
results = runcpf(mpcb, mpct, mpopt);
landa(ii)=results.cpf.max_lam;%
Pf= mpcb.bus(:,3) +landa(ii)*(mpct.bus(:,3)-mpcb.bus(:,3));
Pinitial(ii)=sum(mpcb.bus(:,3));
Pfinal(ii)=sum(Pf);
loadmargin(ii)=Pfinal(ii)-Pinitial(ii);
a=a+0.1;
end
bar(loadmargin)



Is there any wrong calculation of final or initial load with maximum lambda? as 
you see, the load margin is final load minus the initial load:
 Pf= mpcb.bus(:,3) +landa(ii)*(mpct.bus(:,3)-mpcb.bus(:,3));
Pinitial(ii)=sum(mpcb.bus(:,3));
Pfinal(ii)=sum(Pf);
loadmargin(ii)=Pfinal(ii)-Pinitial(ii);

--

Best Regards
Majid Mehdizadeh

Ph.D Student of electrical engineering, Power Department,
Ferdowsi University of Mashhad

Substation and Transmission Line Expert, Engineering office,
Khorasan Regional Electric Co.

http://mehdizadeh.majid.student.um.ac.ir





Re: AW: Bus Voltage Constraints

2017-01-27 Thread Abhyankar, Shrirang G.
You can make an OPF mimic a PF by relaxing the constraints (line flow, voltage 
constraints) and setting the cost function to zero. (by setting values in 
mpc.gencost = 0)

Shri

From: siddique tomal 
mailto:siddiquetoma...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Friday, January 27, 2017 at 7:26 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: AW: Bus Voltage Constraints

Dear Leon Thurber,
Thanks again . the cause behind I don't want to use OPF is I want to optimize 
the cost funtion by my own developed program. Here I just need simple load flow 
to study the developed program.
Thanks

On Jan 27, 2017 7:21 PM, "Leon Thurner" 
mailto:leon.thur...@uni-kassel.de>> wrote:
Dear Siddique Tomal,

again, that sounds exactly like a problem that one would solve with an optimal 
power flow. The OPF allows yout to define costs for active/reactive power, 
constraints for vmin/vmax and then to find the network state that minimizes the 
cost function while complying with all constraints. What is the reason you 
don’t want to or can’t use an OPF for this?

Best
Leon

Von:bounce-121180632-77019...@list.cornell.edu
 
[mailto:bounce-121180632-77019...@list.cornell.edu]
 Im Auftrag von siddique tomal
Gesendet: Freitag, 27. Januar 2017 13:57
An: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Betreff: Re: Bus Voltage Constraints

Dear Leon Thurner,
Thanks for the reply. Actually in my work the active and reactive wont be 
fixed. I will change the value of both power more specifically the reactive 
power frequently to have a best value my cost function. And as the power is not 
fixed here so bus voltage is changeable. And here i want to put a limit for the 
change of bus voltage. Hope you understand and help me to find a way to solve.
Thanks

On Fri, Jan 27, 2017 at 6:46 PM, Leon Thurner 
mailto:leon.thur...@uni-kassel.de>> wrote:
Dear Siddique Tomal,

having constraints for bus voltages is only possible if you have flexibilities 
that allow you to keep those constraints. In a normal power flow you do not 
have these flexibilties, since active and reactive power is fixed at most 
buses. What you ask for is only possible with an OPF and is in fact exactly 
what the OPF is designed to do.

Regards
Leon

Von:bounce-121180596-77019...@list.cornell.edu
 
[mailto:bounce-121180596-77019...@list.cornell.edu]
 Im Auftrag von siddique tomal
Gesendet: Freitag, 27. Januar 2017 13:33
An: matpower-l@cornell.edu
Betreff: Bus Voltage Constraints

Dear all,
i have a query about bus voltage constraints in normal power flow. I want to 
set a limit for every bus voltage (+-5%). So I’m asking help regarding this 
fact. It is just like 'vmax' and 'vmin' column in bus data matrix works only in 
optimal power flow. but i need this feature for normal power flow.
Thanks



Re: runpf help

2016-10-05 Thread Abhyankar, Shrirang G.
results=runpf(this_case,mpopt);
J=full(makeJac(results));


> On Oct 5, 2016, at 6:05 PM, Aaqib Peerzada  wrote:
> 
> results=runpf(this_case,mpopt);
> J=full(makeJac(this_case));




Re: Problem with runcpf

2016-09-08 Thread Abhyankar, Shrirang G.
Please send me your case file (off-list) and I'll try to figure out the issue.

Shri

On Sep 8, 2016, at 7:47 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Thank you for your answer,


I double check and my OPF does really converge. I also checked the buses and 
all my generators are PV and all my non-generators buses are PQ .
I have zero island. If anyone else has an idea why I do not converge even if my 
opf converge?

Thank you,


Regards,


Dogan



De : 
bounce-120759695-68616...@list.cornell.edu<mailto:bounce-120759695-68616...@list.cornell.edu>
 
mailto:bounce-120759695-68616...@list.cornell.edu>>
 de la part de Abhyankar, Shrirang G. mailto:abhy...@anl.gov>>
Envoyé : mercredi 7 septembre 2016 14:16
À : MATPOWER discussion forum
Objet : Re: Problem with runcpf

Are you sure the OPF converged? If it did, then I guess you are not setting the 
bus types correctly or there is still some error in your system data. Note that 
the first step of a continuation power flow is running a load flow. So if the 
load flow does not converge then continuation power flow will not either.

On Sep 5, 2016, at 9:52 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Thank you for your answer,


I actually had an island, but the problem remains. Now I am sure that there are 
no island.

The load flow does not converge.
I tried to launch a fast decoupled, but it does not converge.
The OPF converged and I used the results of Vm and Va as the initial guess to 
relauch my load flow, but it still does not converge.



I tried to check the system load using runcpf, but it does not converge, here 
is the message:


MATPOWER Version 5.1, 20-Mar-2015 -- AC Continuation Power Flow
step   1 : lambda = 26502.011, corrector did not converge in 10 iterations

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


Do you have any suggestion on how I can make it converge?

Thank you,

Dogan



De : 
bounce-120746902-68616...@list.cornell.edu<mailto:bounce-120746902-68616...@list.cornell.edu>
 
mailto:bounce-120746902-68616...@list.cornell.edu>>
 de la part de Abhyankar, Shrirang G. mailto:abhy...@anl.gov>>
Envoyé : vendredi 2 septembre 2016 13:42
À : MATPOWER discussion forum
Objet : Re: Problem with runcpf

I suspect you have isolated buses or islands that do not have a swing bus. Have 
you tried I-iv in MatPower faq on power flow divergence.

http://www.pserc.cornell.edu/matpower/#pfconvergence

Shri

On Sep 2, 2016, at 6:51 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Dear all,

I have a problem when using runpf which does not converge. Therefore, I tried 
to check if the system load exceeded the steady-state loading limit (as 
mentionned on the website)

define_constants;
mpcbase = loadcase('casefile');
mpcbase.bus(:, PD) = 0;
mpcbase.bus(:, QD) = 0;
mpcbase.gen(:, PG) = 0;
mpctarget = loadcase('casefile');
results = runcpf(mpcbase, mpctarget);
results.cpf.max_lam

But I have a problem using the function runcpf, it gives me the following error 
message:

Warning: Matrix is singular to working precision.
> In cpf_corrector at 124
  In runcpf at 257
step   1 : lambda =NaN, corrector did not converge in 10 iterations
??? NaN's cannot be converted to logicals.

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

Error in ==> runcpf at 392
printpf(results, 1, mpopt);

I do not understand what the problem is. Any suggestion is wellcome.

Thank you,

G. Dogan




Re: Problem with runcpf

2016-09-07 Thread Abhyankar, Shrirang G.
Are you sure the OPF converged? If it did, then I guess you are not setting the 
bus types correctly or there is still some error in your system data. Note that 
the first step of a continuation power flow is running a load flow. So if the 
load flow does not converge then continuation power flow will not either.

On Sep 5, 2016, at 9:52 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Thank you for your answer,


I actually had an island, but the problem remains. Now I am sure that there are 
no island.

The load flow does not converge.
I tried to launch a fast decoupled, but it does not converge.
The OPF converged and I used the results of Vm and Va as the initial guess to 
relauch my load flow, but it still does not converge.



I tried to check the system load using runcpf, but it does not converge, here 
is the message:


MATPOWER Version 5.1, 20-Mar-2015 -- AC Continuation Power Flow
step   1 : lambda = 26502.011, corrector did not converge in 10 iterations

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


Do you have any suggestion on how I can make it converge?

Thank you,

Dogan



De : 
bounce-120746902-68616...@list.cornell.edu<mailto:bounce-120746902-68616...@list.cornell.edu>
 
mailto:bounce-120746902-68616...@list.cornell.edu>>
 de la part de Abhyankar, Shrirang G. mailto:abhy...@anl.gov>>
Envoyé : vendredi 2 septembre 2016 13:42
À : MATPOWER discussion forum
Objet : Re: Problem with runcpf

I suspect you have isolated buses or islands that do not have a swing bus. Have 
you tried I-iv in MatPower faq on power flow divergence.

http://www.pserc.cornell.edu/matpower/#pfconvergence

Shri

On Sep 2, 2016, at 6:51 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Dear all,

I have a problem when using runpf which does not converge. Therefore, I tried 
to check if the system load exceeded the steady-state loading limit (as 
mentionned on the website)

define_constants;
mpcbase = loadcase('casefile');
mpcbase.bus(:, PD) = 0;
mpcbase.bus(:, QD) = 0;
mpcbase.gen(:, PG) = 0;
mpctarget = loadcase('casefile');
results = runcpf(mpcbase, mpctarget);
results.cpf.max_lam

But I have a problem using the function runcpf, it gives me the following error 
message:

Warning: Matrix is singular to working precision.
> In cpf_corrector at 124
  In runcpf at 257
step   1 : lambda =NaN, corrector did not converge in 10 iterations
??? NaN's cannot be converted to logicals.

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

Error in ==> runcpf at 392
printpf(results, 1, mpopt);

I do not understand what the problem is. Any suggestion is wellcome.

Thank you,

G. Dogan




Re: Problem with runcpf

2016-09-02 Thread Abhyankar, Shrirang G.
I suspect you have isolated buses or islands that do not have a swing bus. Have 
you tried I-iv in MatPower faq on power flow divergence.

http://www.pserc.cornell.edu/matpower/#pfconvergence

Shri

On Sep 2, 2016, at 6:51 AM, Gamze Dogan 
mailto:gamgam...@hotmail.com>> wrote:


Dear all,

I have a problem when using runpf which does not converge. Therefore, I tried 
to check if the system load exceeded the steady-state loading limit (as 
mentionned on the website)

define_constants;
mpcbase = loadcase('casefile');
mpcbase.bus(:, PD) = 0;
mpcbase.bus(:, QD) = 0;
mpcbase.gen(:, PG) = 0;
mpctarget = loadcase('casefile');
results = runcpf(mpcbase, mpctarget);
results.cpf.max_lam

But I have a problem using the function runcpf, it gives me the following error 
message:

Warning: Matrix is singular to working precision.
> In cpf_corrector at 124
  In runcpf at 257
step   1 : lambda =NaN, corrector did not converge in 10 iterations
??? NaN's cannot be converted to logicals.

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

Error in ==> runcpf at 392
printpf(results, 1, mpopt);

I do not understand what the problem is. Any suggestion is wellcome.

Thank you,

G. Dogan




Re: Admittance formula for branches with transformers

2016-08-26 Thread Abhyankar, Shrirang G.
Please take a look at the function makeYbus(). 

> On Aug 26, 2016, at 10:05 AM, davor sutic  wrote:
> 
> I'm trying to understand the effects of having a transformer connected to a 
> branch on the implicated admittance matrix. In the MatPower manual, section 
> 3.2, equation 3.2 describes such a relation for a 2x2 branch admittance 
> matrix.
> 
> I'm interested in the general form of the (diagonal and off-diagonal) 
> elements of an admittance matrix, when multiple branches have transformers 
> attached. Particularly the diagonal elements are confusing, how are the 
> elements summed up, if multiple have transformers?
> 
> Further, in the test case files, the absence of a transformer is indicated 
> with its ratio and angle set to 0. In the mentioned equation (3.2) that would 
> cause problems when dividing with 0. So another question is how are those 
> elements treated in the light of formula 3.2?
> 
> Thanks a lot.




Re: How do I print the reduced Ybus matrix

2016-07-27 Thread Abhyankar, Shrirang G.

1. You need to have the MATPOWER directory on your MATLAB path.  
http://www.mathworks.com/help/matlab/matlab_env/add-remove-or-reorder-folders-on-the-search-path.html
2. YBUS, YF, YT] = makeYbus(mpc) should be YBUS, YF, YT] = makeYbus(mpcreduced);

Shri

From:  Philip Adedotun Olaniyi mailto:polan...@unm.edu>>
Date:  Wednesday, July 27, 2016 at 9:34 AM
To:  Shri mailto:abhy...@anl.gov>>
Subject:  Re: How do I print the reduced Ybus matrix


Hi Abhyankar,
Thank yo so much for your help. I tried using makeYbus function as you 
suggested, but I keep getting error messages. Please see them below;
When I tried;
mpc = loadcase('case9');
ExBus=[1,5,8]';
[mpcreduced, Link, BCIRCr] = MPReduction(mpc,ExBus,0)
[YBUS, YF, YT] = makeYbus(mpc,ExBus,0)
I got the message;
Error using makeYbus (line 45)
makeYbus: buses must be numbered consecutively in bus matrix; use ext2int() to 
convert to internal ordering

When I tried;
mpc = loadcase('case9');
ExBus=[1,5,8]';
[mpcreduced, Link, BCIRCr] = MPReduction(mpc,ExBus,0)
[YBUS, YF, YT] = makeYbus(mpc)
I got the message;
Undefined function or variable 'makeYbus'.
I don’t know any other thing to try. I would appreciate your further assistance.

Thank you.


Re: How do I print the reduced Ybus matrix

2016-07-27 Thread Abhyankar, Shrirang G.
Use makeYbus() to create the admittance matrix for the reduced network.
http://www.pserc.cornell.edu/matpower/docs/ref/matpower5.0/makeYbus.html

Shri
On Jul 26, 2016, at 10:19 PM, Philip Adedotun Olaniyi 
mailto:polan...@unm.edu>> wrote:


Good day sir,


I am trying to extract the reduced Y matrix (admittance matrix) for case9, 
using the example provided in the network reduction toolbox. I followed the 
procedure outlined but all I get is a reduction summary of the reduced network 
and not the network's matrix itself. Please, is there a way of seeing this 
matrix? Below is the summary I got.

**Generator Placement Results**
External generator on bus 1 is moved to 4

mpcreduced =

version: '2'
baseMVA: 100
bus: [6x13 double]
gen: [3x21 double]
 branch: [7x13 double]
gencost: [3x7 double]


Thank you sir.



Best Regards.

Philip Olaniyi

Graduate Research Assistant

Electrical and Computer Engineering Department

University of New Mexico

Albuquerque

USA.


Re: Query about LMP function

2016-06-29 Thread Abhyankar, Shrirang G.
http://www.pserc.cornell.edu//matpower/docs/ref/matpower6.0b1/scale_load.ht
ml

FYI: The list of available MATPOWER functions can be found here
 http://www.pserc.cornell.edu//matpower/docs/ref/


Shri


From:  Priyanka Shinde 
Reply-To:  MATPOWER discussion forum 
Date:  Wednesday, June 29, 2016 at 7:48 AM
To:  MATPOWER discussion forum 
Subject:  Re: Query about LMP function


>Thank you :)
>
>I want to dynamically change the load data through an optimization
>algorithm. In MATPOWER is there any inbuilt function to modify load data
>in any system data (like IEEE 30 bus)?
>
>
>On Wed, Jun 29, 2016 at 3:39 PM, Mirish Thakur
> wrote:
>
>When you perform opf operation on your casefile then see the column no.
>14 and 15 of bus matrix, you will see the lambda values for both active
>and reactive power. e.g. res=runopf(case30) then see the
>res.bus matrix.
>
>regards
>Mirish
>
>
>On Wed, Jun 29, 2016 at 9:33 AM, Priyanka Shinde
> wrote:
>
>I am using 'case 30' to solve O.P.F., I have got the results but I want
>to use the value of LMPs in a self derived function so I want to know
>where are the values of LMP stored so that I can call that function.
>
>-- 
>Regards,
>
>Priyanka Shinde
>
>Master of Science,
>
>Indian Institute of Technology,Madras
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>-- 
>Regards,
>
>Priyanka Shinde
>
>First year M.S.,
>
>Indian Institute of Technology,Madras
>





Re: AW: CPF - Functionality

2016-06-10 Thread Abhyankar, Shrirang G.
Hi Thomas,
  Sorry for the late reply. Yes, it does not matter how big Sxfr is.

Shri

On Jun 9, 2016, at 12:39 PM, Thomas Jäckel 
mailto:jaeckel.tho...@gmx.net>> wrote:

Thank you ver much for your quick answer.


1. Just to be sure: So in the end it doesn’t matter how big the Sxfr is. 
Important is only the relation between the different rows of the vector?


Thomas

Von: 
bounce-120551126-75986...@list.cornell.edu<mailto:bounce-120551126-75986...@list.cornell.edu>
 [mailto:bounce-120551126-75986...@list.cornell.edu] Im Auftrag von Abhyankar, 
Shrirang G.
Gesendet: Donnerstag, 9. Juni 2016 16:54
An: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Betreff: Re: CPF - Functionality

1. Yes.
2. CPF with generator active and reactive power limits should be hopefully 
available in the upcoming version of MATPOWER. Checking for min. or max. bus 
voltages is not available in CPF. With some modifications in the CPF code, you 
should be able to check voltages. We were working on user-defined callbacks for 
CPF to enforce limits, check voltages, or any other user-defined operation. 
But, we decided to not add in the MatPower code base for now. Hopefully, we can 
have that feature available in the future.

Shri

On Jun 9, 2016, at 8:15 AM, Thomas Jäckel 
mailto:jaeckel.tho...@gmx.net>> wrote:
Hallo,

I have a two questions concerning the functionality of the runcpf-function.
1.If I get it correctly, it can be used the following way: You have to 
import a basescenario and a targetscenario. Then the tool calculates the 
difference (Sxfr) between the base-power and target-power at every bus. Based 
on these datas the actual cpf starts and determines the maximum value for 
lambda, whereby the maximum transmitted power equals lambda*Sxfr. Is this 
correct?
2.Is there any way to limit the maximum or minimum voltage per bus or to 
limit the reactive power generation per generator?
Thank you very much
Thomas


Re: CPF - Functionality

2016-06-09 Thread Abhyankar, Shrirang G.
1. Yes.
2. CPF with generator active and reactive power limits should be hopefully 
available in the upcoming version of MATPOWER. Checking for min. or max. bus 
voltages is not available in CPF. With some modifications in the CPF code, you 
should be able to check voltages. We were working on user-defined callbacks for 
CPF to enforce limits, check voltages, or any other user-defined operation. 
But, we decided to not add in the MatPower code base for now. Hopefully, we can 
have that feature available in the future.

Shri

On Jun 9, 2016, at 8:15 AM, Thomas Jäckel 
mailto:jaeckel.tho...@gmx.net>> wrote:

Hallo,

I have a two questions concerning the functionality of the runcpf-function.

  1.  If I get it correctly, it can be used the following way: You have to 
import a basescenario and a targetscenario. Then the tool calculates the 
difference (Sxfr) between the base-power and target-power at every bus. Based 
on these datas the actual cpf starts and determines the maximum value for 
lambda, whereby the maximum transmitted power equals lambda*Sxfr. Is this 
correct?
  2.  Is there any way to limit the maximum or minimum voltage per bus or to 
limit the reactive power generation per generator?

Thank you very much
Thomas


Re: Wind generation

2016-05-22 Thread Abhyankar, Shrirang G.
No.

> On May 22, 2016, at 5:25 PM, Mohamed Taleb  wrote:
> 
> Dears,
> 
> Greetings,
> I there any modeling for the wind turbine that simulates its behavior?
> 
> Regards,
> Mohamed Taleb




Re: modification on Matpower case.m file for power flow of distribution system

2016-05-04 Thread Abhyankar, Shrirang G.
http://ewh.ieee.org/soc/pes/dsacom/testfeeders/index.html

However, as Jovan mentioned, MATPOWER is for solving balanced three-phase 
transmission systems. If you are interested in solving unbalanced three-phase 
power flows for distribution networks then refer to either OpenDSS or GridLAB-D.

Shri

From: Fiaz Ahmad mailto:fiazah...@sabanciuniv.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, May 4, 2016 at 8:49 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>, 
"jovan.i...@gmail.com" 
mailto:jovan.i...@gmail.com>>
Subject: Re: modification on Matpower case.m file for power flow of 
distribution system

Thanks Jovan,

In Matpower there are no test cases for distribution systems... Where can i 
find IEEE distribution system test cases?

Regards


Have a nice day

Regards,
FIAZ AHMAD
PhD Student,
FENS Sabanci University,
Istanbul Turkey



On Wed, May 4, 2016 at 4:46 PM, Jovan Ilic 
mailto:jovan.i...@gmail.com>> wrote:

Fiaz,

You are missing lots of data here.  I suggest looking at IEEE distribution 
system
test cases to see what is involved.  Matpower is used for transmission systems
not distribution systems.

Jovan

On Wed, May 4, 2016 at 3:45 AM, Fiaz Ahmad 
mailto:fiazah...@sabanciuniv.edu>> wrote:
Hi. i have the following data files for ieee 33 bus radial distribution system. 
i want to modify the case33.m file in matpower to carry out the power flow of 
the above distribution system. Please guide me how can i achieve that.

linedata33
%Bus   fbus   tbus   R X
  11  2 0.09220.0470
  22  3 0.49300.2511
  33  4 0.36600.1864
  44  5 0.38110.1941
  45  6 0.81900.7070
  66  7 0.18720.6188
  77  8 0.71140.2351
  88  9 1.03000.7400
  99  101.04400.7400
 1010 110.19660.0650
 1111 120.37440.1238
 1212 131.46801.1550
 1313 140.54160.7129
 1414 150.59100.5260
 1515 160.74630.5450
 1616 171.28901.7210
 1717 180.73200.5740
 18 2 190.16400.1565
 1919 201.50421.3554
 2020 210.40950.4784
 2121 220.70890.9373
 22 3 230.45120.3083
 2323 240.89800.7091
 2424 250.89600.7011
 25 6 260.20300.1034
 2626 270.28420.1447
 2727 281.05900.9337
 2828 290.80420.7006
 2929 300.50750.2585
 3030 310.97440.9630
 3131 320.31050.3619
 3232 330.34100.5302

loaddata33
%Bus P Q
1 0 00
2 100   60   0
3 9040  0
4 120   80  0
5 6030  0
6 6020  0
7 200   100  0
8 200   100  0
9 6020  0
10 6020   0
11 4530   0
12 6035  0
13 6035  0
14 120   80  0
15 6010  0
16 6020  0
17 6020  0
18 9040  0
19 9040  0
20 9040  0
21 9040  0
22 9040  0
23 9050  0
24 420   200  0
25 420   200  0
26 6025  0
27 6025  0
28 6020  0
29 120   70  0
30 200   600  0
31 150   70  0
32 210   100  0
33 6040  0

Please help and guide Thanks








Re: scaleload

2016-02-23 Thread Abhyankar, Shrirang G.

 mpc=loadcase('case14o’);
for t=1:2
mpc(t)=mpc;

mpc(t).bus = scale_load(0.5, mpc(t).bus);

The error is in the third line of your code. You are resizing the mpc struct 
created in the first line and hence getting the structure resizing error. Use 
the following code.

mpc0=loadcase('case14o’);
for t=1:2
mpc(t)=mpc0;
mpc(t).bus = scale_load(0.5, mpc(t).bus);


Also, please please please send the ENTIRE error message when asking for help 
in the future.

Shri


From: Ray Zimmerman mailto:r...@cornell.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, February 23, 2016 at 9:28 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: scaleload

It looks to me like when you go to store the return value of runopf() in 
results it is finding that the existing results struct has different fields 
than the one being returned by runopf(). Try clearing the results variable 
first and if that doesn’t work, you can probably work around it by storing the 
results in a cell array instead of a struct array. That is, use …

results = cell(nt, 1);
results{t} = runopf(...);

— Ray


On Feb 20, 2016, at 9:33 AM, VANJARAPU VENKATARAONAIDU 
mailto:venkataraovanjar...@gmail.com>> wrote:

sir
when using the scaleload function,when run the opf its showing the error 
attached below.what is the problem,how can i rectify it.




Re: power flow question

2016-02-18 Thread Abhyankar, Shrirang G.
I agree. Having the warnings for all generators, voltages, etc. would be 
helpful for the cases when users are also varying the generation on PV buses. I 
would even like MATPOWER fixing the active power at PV buses to the max. or 
min. limit, if the generation exceeds these limits, and informing the users via 
a warning.

Shri

From: Ray Zimmerman mailto:r...@cornell.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Thursday, February 18, 2016 at 10:34 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: power flow question

I agree that checking for exceeded limits and warning about them would be a 
nice feature to add to the the power flow. I see no reason, though, why it 
should be limited to the swing bus power injection … why not include all of the 
other generator, voltage and branch flow limits, all of which can be violated 
in a converged power flow solution.

I’ll put it on the “to do” list.

   Ray


On Feb 18, 2016, at 8:05 AM, Jovan Ilic 
mailto:jovan.i...@gmail.com>> wrote:


Jose,

I did not suggest to turn the swing bus into a PV bus. There should be at least 
one swing bus
in the system unless you formulate your PF problem as ACOPF problem which does 
not need
any slack buses.

I understand what you are saying and you are right. I'd keep the swing bus as 
it is just
to provide the angle reference (admittance matrix is rarely singular) and add 
to Jacobian a
constraint on the sum of P and Q flows on the lines connected to the swing bus. 
 The sum
of all these lines out flows must be less than the power injection capability 
of the swing bus,
both P and Q. If the constraint is violated the power flow does not converge. 
The original
poster was concerned with the convergence when there is not enough generation, 
so
no convergence would give them a really stern "warning" and leave them guessing 
what went
wrong.  Or you can just keep it simple and have PF implementation just print 
out a warning
that the slack bus exceeded its capacity.  Modifying the Jacobian was the first 
thing that
came to my mind but I am not sure if it provides anything in addition of a 
warning to user.

Jovan


On Thu, Feb 18, 2016 at 3:25 AM, Jose Luis Marin 
mailto:mari...@gridquant.com>> wrote:
But you did that, it would no longer be a powerflow calculation.  There are 
good mathematical reasons why the standard powerflow calculation is formulated 
so that there should be at least one swing bus (where you specify both V and A, 
leaving P and Q "free").  If you specified V, A, and Pgen at the swing, this 
would yield an overdetermined system.  You could theoretically formulate a 
powerflow in which the swing bus specified only A (the global angle reference) 
and Pgen, leaving Vref and Qgen free, but this would yield a system of 
equations with a severe pathology, namely a near-singular Jacobian (this 
originates from the fact that the full transmission admittance matrix, being a 
Laplacian matrix, always has a zero eigenvalue, which corresponds to a 
translation symmetry consisting in uniformly shifting all voltages;  pinning 
down at least one voltage is what breaks this symmetry and recovers 
invertibility).

However, I think you're right it would be a good idea to *warn* the user when 
the swing generator(s) have gone over their PMAX (or below their PMIN!).

--
Jose L. Marin
Grupo AIA


On Thu, Feb 18, 2016 at 12:08 AM, Jovan Ilic 
mailto:jovan.i...@gmail.com>> wrote:

Good point, maybe we should trow a Pgen constraint on the swing buses in the 
Jacobian.



On Wed, Feb 17, 2016 at 5:30 PM, Santiago Torres 
mailto:santiago.i...@gmail.com>> wrote:

Because the exceding generation is supplied by the swing bus. Normal power flow 
does not check power generation limits.

El 17 feb. 2016 1:58 PM, "Bai, Wenlei" 
mailto:wenlei_...@baylor.edu>> escribió:
Dear Ray,
I tried to modified load of ‘case9’ to exceed the total generation capacity 
purposely.
To my surprise, power flow still converges.  More specifically,  the total 
generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is 920.8MW
Why the actual generation can be larger than its capacity?

Blessings,
Wenlei







Re: power flow question

2016-02-17 Thread Abhyankar, Shrirang G.
Wenlei,
  The power flow routine in MATPOWER does not enforce generation limits on real 
power. Exceeding the capacity does not necessarily imply a divergence of the 
power flow.

Shri

From: , Wenlei mailto:wenlei_...@baylor.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Wednesday, February 17, 2016 at 12:57 PM
To: "matpower-l@cornell.edu" 
mailto:matpower-l@cornell.edu>>
Subject: power flow question

Dear Ray,
I tried to modified load of ‘case9’ to exceed the total generation capacity 
purposely.
To my surprise, power flow still converges.  More specifically,  the total 
generator ‘on-line capacity’ is 820MW, while the ‘actual generation’ is 920.8MW
Why the actual generation can be larger than its capacity?

Blessings,
Wenlei



Re: price sensitive loads

2016-02-16 Thread Abhyankar, Shrirang G.
The file name needs to be a string.

mpc = load2disp(mpc0,’mo’);


From: VANJARAPU VENKATARAONAIDU 
mailto:venkataraovanjar...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Tuesday, February 16, 2016 at 7:47 AM
To: "MATPOWER-L@cornell.edu" 
mailto:MATPOWER-L@cornell.edu>>
Subject: price sensitive loads

 when i tried to use load2disp function using fname.i am getting like this.how 
to use fname and savecase.please quote with a small example.i tried somany 
times but i didn't get.


file='D:\matpower\mo.txt';
>> [pathstr,fname,ext]=fileparts(file)

pathstr =

D:\matpower


fname =

mo


ext =

.txt

>> mpc0=loadcase(case14);
>> mpc=load2disp(mpc0);
>> mpc=load2disp(mpc0,mo);
Undefined function or variable 'mo'.

Did you mean:
>> mpc=load2disp(mpc0,mod);


Re: Generating Larger Test Cases from existing Matpower Cases

2016-02-15 Thread Abhyankar, Shrirang G.
Paul, 
   To add to this discussion, I recall Carlos mentioning that one needs to
be careful when trying to ³stitch² together different systems due to the
large angle differences at the interconnection buses, which might lead to
solver infeasibility. The following email threads might be helpful in this
regard.

https://www.mail-archive.com/matpower-l%40cornell.edu/msg03427.html

https://www.mail-archive.com/matpower-l%40cornell.edu/msg01857.html


Some time ago, I had written the attached script to create larger MATPOWER
test cases for one of my papers. It creates a 2-d grid with each grid
point representing a MATPOWER test case. The adjacent grid points are then
connected through tie lines. As Ray mentioned, this has a repeated block
structure so I don¹t think it creates a realistic case, but it may be
useful to you (?)

However, to achieve your target of over 1M + bus power flow problem, I
don¹t think the above approach is suitable simply because all the test
cases only represent high-voltage transmission network (69KV and above her
in the U.S., if I am not mistaken). Interconnecting these networks will
not get you to 1M+ bus. For example, if you create a larger test case
comprising the transmission power flow cases of three U.S. major
interconnections (Eastern, Western, and ERCOT), it will still be way less
than 1M buses. 
Instead, I think, you should try to create larger test systems by
incorporating the low-voltage distribution networks. One possible approach
is to use the topologies for various distribution feeders available
through the IEEE¹s distribution test feeder working group
http://ewh.ieee.org/soc/pes/dsacom/testfeeders/index.html. So, you could
these test feeders to replace the lumped PQ loads. This entails a lot of
development work and careful attention to details, but I think it is the
right first move.

With respect to linear solvers for power flow, the following references
may be helpful.

http://www.mcs.anl.gov/petsc/petsc-20/conference/Lahaye_D.pdf

http://ta.twi.tudelft.nl/users/vuik/numanal/idema_thesis.pdf

http://www.mcs.anl.gov/~abhyshr/downloads/papers/HiPCNA_2013.pdf


Good luck!
Shri


-Original Message-
From: Ray Zimmerman 
Reply-To: MATPOWER discussion forum 
List-Post: matpower-l@cornell.edu
Date: Monday, February 15, 2016 at 10:23 AM
To: MATPOWER discussion forum 
Subject: Re: Generating Larger Test Cases from existing Matpower Cases

>This is not a trivial problem. I have created larger cases by ³stacking²
>existing systems, essentially treating them as islands in a larger
>system, with additional constraints tying them together, but this is not
>completely comparable to a larger real system since it has a repeated
>block structure to it.
>
>Ray
>
>
>
>> On Feb 15, 2016, at 9:39 AM, Paul Grigoras 
>>wrote:
>> 
>> Hi,
>> 
>> I'm fairly new to Matpower and Power Systems in general, I'm
>>approaching this domain more from a performance optimisation angle -
>>trying to optimise the sparse linear and nonlinear solvers used in power
>>flow problems.
>> 
>> I'd like to generate larger test cases (1M+ buses) so I can benchmark
>>the performance and scalability of some existing solvers as well as my
>>own.  
>> 
>> I was wondering if anyone could suggest a method or some texts which
>>explain clearly how to generate a large test case either completely
>>synthetic (but with some reasonable resemblance to real life data) or by
>>scaling existing IEEE test cases. If anyone can suggest how to do this
>>in Matpower or Pypower that would be even more helpful.
>> 
>> Kind regards,
>> Paul 
>
>
>



Create_PF_data.m
Description: Binary data


Re: demand response

2016-02-14 Thread Abhyankar, Shrirang G.
Please ALWAYS send the code you were trying to run and the entire error message.

Shri

On Feb 13, 2016, at 11:16 PM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:

when i tried for case9 or case5 ,its getting error.what is the reason

On Wed, Feb 10, 2016 at 6:29 PM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:
thanq very much for answering.

On Wed, Feb 10, 2016 at 3:46 AM, Mirish Thakur 
mailto:mirishtha...@gmail.com>> wrote:
Hello Mounika,

If I'm not wrong are you interested in this one -
mpc=case_ieee30; % load case_ieee30
mpc1=load2disp(mpc); % make all loads dispatchable
r=runopf(mpc1); % perform opf operation on mpc1 casefile.
You can observe all loads are modeled as negative generators in mpc1.gen matrix.
In r.gen(:,2)  field you will see all dispatchable loads. But now I can see  
283.4 of 283.4  dispatchable loads. I think its because of no congestion in 
network and generation is suffice to meet demand.

Thanks and regards
Mirish



On Tue, Feb 9, 2016 at 6:17 PM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:
sir i dont know basics in matpower.i want to know how to write the code for 
converting fixed loads to dispatchable loads taking a small example.for example 
an ieee 30 bus taking some are dispatchable.





Re: save losses

2016-02-13 Thread Abhyankar, Shrirang G.
The two error messages you’ve sent look unrelated to me. Are these from two 
different runs?

In any case, most likely, you are using an older version of MATPOWER. Download 
the latest version from here http://www.pserc.cornell.edu//matpower/. If you 
are still getting errors, please send the “entire" error message.

Shri

From: Fereshteh Moghateli mailto:f.moghat...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Saturday, February 13, 2016 at 7:24 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: save losses

when i run this command:

[MVAbase, bus, gen, branch, success, et]=runpf('case30');
loss=get_losses(baseMVA, bus, branch);

or this:
  r = runpf(mpc);

losses(k) = sum(get_losses(r))
these messages appear

??? Undefined function or method 'get_losses' for input arguments of type 
'double'.

OR
??? Error using ==> runpf
Too many output arguments.

Where do u think there exist the problem?

thank you

On Sat, Feb 13, 2016 at 1:58 AM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
Are you using the latest MATPOWER release (v5.1)? Type mpver to find out what 
version you have.

Ray


On Feb 12, 2016, at 4:33 PM, Fereshteh Moghateli 
mailto:f.moghat...@gmail.com>> wrote:

this command gives this error " ??? Undefined function or method 'get_losses' 
for input arguments of type 'struct'."

thank you

On Sat, Feb 13, 2016 at 12:28 AM, Shruti Rao 
mailto:sra...@asu.edu>> wrote:
Hi Fereshteh,

get_losses is an inbuilt MATPower function that computes the branch losses and 
can also compute the reactive injections from line charging. It can also 
compute the derivatives with respect to voltage etc. , the details can be found 
in the manual in Chapter 9.


Shruti

On Fri, Feb 12, 2016 at 1:52 PM, Fereshteh Moghateli 
mailto:f.moghat...@gmail.com>> wrote:
What do you mean by (get_losses)?
thank you

On Sat, Feb 13, 2016 at 12:05 AM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
I’m not sure what you mean by “save losses” and “50 PF iteration”. If you mean 
something like record the value of total branch active power losses for 50 
different power flow runs, then you could do something like the following:

losses = zeros(50, 1);
mpc = loadcase();
for k = 1:50

r = runpf(mpc);
losses(k) = sum(get_losses(r));
end

Then the losses will be stored in the losses vector.

   Ray



On Feb 12, 2016, at 1:41 PM, Fereshteh Moghateli 
mailto:f.moghat...@gmail.com>> wrote:

hi community
how to save losses in matpower in for example 50 PF iteration?





--
Regards,
Shruti Dwarkanath Rao

Graduate Research Associate, Arizona State University
Co-Vice-Chair: IEEE PES ASU Student Chapter
Tempe, AZ, 85281
650 996 0116





Re: How to model a substation in Matpower

2016-02-12 Thread Abhyankar, Shrirang G.

Dear Matpowers,

Hope you are doing great. We are trying to run PF for a distribution network in 
Matpower. Since the R/X ratio is acceptable we tried NR. It did converge, 
however, the loss is not correct.

The loss formulae used in MATPOWER are given in section 9.2.4 of the manual 
http://www.pserc.cornell.edu/matpower/manual.pdf. I would also suggest to take 
a look at the branch models used in MATPOWER in Section 3.2. My guess is either 
you are using different branch models or using a different formula for 
calculating the losses.

We think we have a difficulty on how to include substation into the code. We 
modeled it as a huge generator but it did not work. Since Matpower has been 
designed for transmission systems and there is no substation in the original 
model we were wondering if you could give us some hints with regard to the way 
we may consider the first bus as substation.

It really depends on how detailed you want to make the substation model. The 
simplest model for substation would be using a generator at the first bus and 
specify it as a swing bus. Another approximate model is to use a transformer in 
series with the swing generator.

Shri



Best regards,

Haneen Aburub


Re: demand reponse

2016-02-02 Thread Abhyankar, Shrirang G.
I'm afraid there is no easy way do what you want. You'll have to outage 
generators and lines one at a time and rank the contingencies using some 
metric. Matpower has a utility function checklimits() that can help to identify 
the generators/lines that exceed their limits.

Shri

On Feb 2, 2016, at 10:55 AM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:

actually i want to create congestion to my system.for that i have to select the 
most congested line.so removing each line or generator and checking the limits 
is very difficult.in<http://difficult.in> which way i can know which is most 
preferrable outage by contingency analysis using matpower.

On Tue, Feb 2, 2016 at 10:18 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Each generator, branch has a status that you can change to simulate a 
contingency. See the functions idx_brch() and idx_gen() for the appropriate 
columns for the status flag in the branch and generator data, respectively.

Shri

From: Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Tuesday, February 2, 2016 at 10:37 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: demand reponse

thanq for replying sir .another question is how we can do contingency analysis 
in matpower.

On Tue, Feb 2, 2016 at 8:33 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
Check out Section 6.4.2 on Dispatchable Loads (i.e. price responsive or 
curtailable loads) in the User’s 
Manual<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-5.1.pdf>.

Ray

On Feb 2, 2016, at 9:18 AM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:

can we implement demand response concept using matpower.if yes how we
can.can anybody give an idea?






Re: demand reponse

2016-02-02 Thread Abhyankar, Shrirang G.
Each generator, branch has a status that you can change to simulate a 
contingency. See the functions idx_brch() and idx_gen() for the appropriate 
columns for the status flag in the branch and generator data, respectively.

Shri

From: Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Tuesday, February 2, 2016 at 10:37 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: demand reponse

thanq for replying sir .another question is how we can do contingency analysis 
in matpower.

On Tue, Feb 2, 2016 at 8:33 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
Check out Section 6.4.2 on Dispatchable Loads (i.e. price responsive or 
curtailable loads) in the User’s 
Manual.

Ray

On Feb 2, 2016, at 9:18 AM, Mounika Vanjarapu 
mailto:mounikavanjar...@gmail.com>> wrote:

can we implement demand response concept using matpower.if yes how we
can.can anybody give an idea?





Re: Question about islands.

2016-01-21 Thread Abhyankar, Shrirang G.
Mirish,
Before moving further, I would suggest you to review the practicality of 
the assumptions you are making.
1) Does it make sense to move the loads, generation to a higher voltage level?
2) For a utility engineer working on a real system, would he/she add dummy 
branches to make the analysis converge/feasible?

I don't much about the problem you are trying to solve, but I feel, based on 
the description below, that you should first define the problem clearly with a 
set of assumptions conforming reality.

Shri

> On Jan 21, 2016, at 10:48 AM, Mirish Thakur  wrote:
> 
> Dear all,
> 
> I'm working on network reduction problem, in which I moved loads,all 
> renewable generation and conventional power plants from 110 KV buses to 
> respective connected branches (220 KV or  380 KV). I have modeled network 
> such that distribution of load or generation will be 50 % if more than one 
> branches are connected to 110 KV bus. And after I made branch status 0 of  
> the branches which are connected to 110 KV buses.  When I checked for islands 
> (case_info)  in my file  I found 2 islands and 336 isolated buses. Also I 
> verified it by [group, isolated]=find_island ('myfile'). My question is how 
> to get a full system? I found three buses where generation and load does 
> exist and are completely isolated  and two islands. Also I tried to get full 
> system by putting dummy branches to connect isolated buses and a small island 
> but i'm not sure how to select branch parameters so that problem will be 
> feasible.
> 
> Thanks and regards
> Mirish Thakur



Re: How to Show Voltage Constraints and Branch Flow Constraints

2016-01-07 Thread Abhyankar, Shrirang G.
You are running a power flow (runpf), not an optimal power flow (runopf). The 
branch limits (and the voltage constraints) are ignored for power flow 
calculations. If the power flow does not converge then most likely the optimal 
power flow may not converge either. Please take a look at 
http://www.pserc.cornell.edu//matpower/#pfconvergence for some useful hints on 
getting the power flow to converge.

Shri

From: , Falah 
mailto:alana...@oregonstate.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Thursday, January 7, 2016 at 1:22 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: How to Show Voltage Constraints and Branch Flow Constraints

Dear professor Ray,


I eliminated the branch flow limits but still the solution didn't converge.

also I checked the mpc values and the limits it seems ok. In addition, I tried 
to change some of the limits  but still did not work

I attached my data in case that may be helpful to find the problem.


On Tue, Jan 5, 2016 at 1:30 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
There are many possible reasons for a non-convergent OPF. One of the first 
things I always try is to eliminate the branch flow limits. E.g.

define_constants;
mpc= loadcase ('WECC179_3Area.mat');.
mpopt = mpoption('out.lim.all',2)
mpc.branch(:, RATE_A) = 0;
results = runopf(mpc, mpopt);

If that converges, then you likely have an infeasible problem, where some 
branch flow limit can’t be satisfied without violating something else. In that 
case, you can try multiplying the limits by some large factor that you 
gradually reduce toward 1 and observe which constraints (including voltage, 
reactive generation) bind hardest. They may show you which are your conflicting 
constraints.

Hope these ideas help point you in the right direction ...

Ray


On Jan 5, 2016, at 12:42 PM, Alanazi, Falah 
mailto:alana...@oregonstate.edu>> wrote:

Dear Ray,

I was running AC PF and it was working but when I tried to run AC OPF the 
solution did not converge.
This is my code.

define_constants;
mpc= loadcase ('WECC179_3Area.mat');.
mpopt = mpoption('out.lim.all',2)
results = runopf(mpc, mpopt);

best regards

Falah




On Tue, Jan 5, 2016 at 5:40 AM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
The options you are using should work when running an AC OPF. Is that what you 
are running?

Two other notes, regarding your options …
1. The ENFORCE_Q_LIMS option is only for power flow, not OPF, and that the 
VERBOSE option only affects display of solution progress, not final results.
2. You are mixing old-style option names (all caps) in your first line, with 
new-style options in the second. This still works, but the old-style options 
are deprecated. The new versions of ENFORCE_Q_LIMS and VERBOSE are 
pf.enforce_q_lims and verbose, respectively.

— Ray



On Jan 4, 2016, at 5:09 PM, Alanazi, Falah 
mailto:alana...@oregonstate.edu>> wrote:

Dear Sir,

I would like to know how I can show the voltage constraints  and  the branch 
flow constraints when I run OPF.

When I used the matpower cases both constraints  showes up but when I used the 
WECC data they do not show up. I tried to use

mpopt = mpoption('ENFORCE_Q_LIMS',0,'VERBOSE',3);
mpopt = mpoption(mpopt,'out.lim.all',2)

best regards

Falah






Re: Running Available Transfer Capability (ATC-Power System)

2016-01-04 Thread Abhyankar, Shrirang G.
The number of input arguments to runpf() is incorrect. Please send the error 
log (output in the command window).

Shri

From: abde wahab naser 
mailto:abdewahab_na...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, January 4, 2016 at 5:11 AM
To: "matpower-l@cornell.edu" 
mailto:matpower-l@cornell.edu>>
Subject: Running Available Transfer Capability (ATC-Power System)

I could not run this attached code which is designed to calculate the ATC using 
MATPOWER 2.0 version. So I tried on both versions (i.e. earlier 2002 version 
and latest 5.1 version) to avoid any version incompatibility. Despite that, my 
error is still the same. Kindly experiment with the attached code. And I would 
be very glad to receive your kind assistance in solving the bug within the 
code. Thank you very much indeed for your assistance.

Regards,
Abu Ibrahim


Re: ask in matpower 3.2

2015-12-31 Thread Abhyankar, Shrirang G.
You can calculate the branch currents (from and to end) using the real and 
reactive power flows (from the branch data) and the bus voltages (in the bus 
data). See the function idx_brch() and idx_bus() for the location of the flows 
and voltages.

Shri

From: Mahmoud Abdallah 
mailto:mahmoud_abdallah2...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Thursday, December 31, 2015 at 1:03 PM
To: "MATPOWER-L@cornell.edu" 
mailto:MATPOWER-L@cornell.edu>>
Subject: ask in matpower 3.2

Dear professor
i use matpower version 3.2
i want to return only vector of current flow in each branch after Runpf 
calculation separably from the results of Runpf.

can you please help in that
thank you in advance

Kind regards,
 Dr. Mahmoud Abdallah Attia
 Electrical Power & Machines Department
 Faculty of Engineering,  Ain Shams University
 Reviewer in Ain Shams Engineering Journal (ASEJ)
 Reviewer in Electric Power Components & Systems Journal
 Reviewer in International Transactions on Electrical Energy Systems
 Member of "Continuous Improvement & Quality Assurance Unit"
 Abdo Basha square, Abbassia, 11517 Cairo, Egypt


Re: Difference between System and Load Losses

2015-12-29 Thread Abhyankar, Shrirang G.
Arun,
  I don’t think there is a “load losses” function in MATPOWER that returns how 
much load is lost akin to a LOLE calculation. If you want to calculate loss of 
load for reliability or restoration calculations, then you can run an optimal 
power flow with dispatchable loads. (set very high price coefficients for the 
loads so that they are not curtailed unless there is a system need). Read 
section 6.4.2 of the MATPOWER manual. 
http://www.pserc.cornell.edu/matpower/manual.pdf

Shri

From: , Arun 
mailto:arun.veeram...@pnnl.gov>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Tuesday, December 29, 2015 at 11:48 AM
To: "MATPOWER-L@cornell.edu" 
mailto:MATPOWER-L@cornell.edu>>
Subject: Difference between System and Load Losses

Hi,

>From the manual, I see that get_losses() returns branch series losses (system 
>losses).
Is there an equivalent method to compute “load losses” that represents in 
understandable units (e.g. total MW), the consequence of loss of one or more 
transformers?

This unit would be convenient to measure how much load capacity is at loss and 
how gradual recovery of transformers brings back the entire system to original 
working state after a few days.

Thanks


Re: 39-bus system

2015-12-20 Thread Abhyankar, Shrirang G.
Yes. However, note that each area needs to have enough generation capacity to 
supply the load.

Shri

> On Dec 19, 2015, at 12:42 PM, "Owusuboateng, Prince Charles" 
>  wrote:
> 
> Hello,
> 
> I have the 39 bus system divided into 4 independent areas. Can I run 
> individual optimal power flow analysis on each of these areas independently?
> 
> thank you




Re: Continuation Power Flow

2015-12-02 Thread Abhyankar, Shrirang G.
You need to create a callback routine for CPF that plots what you need and set 
it in the options struct.

mpopt = mpoption(‘cpf.user_callback’,’cpf_user_callback’);

where cpf_user_callback is the name of your callback routine.

Read pages 38 - 40 of the manual.

Shri


From: Anjali Sharma 
mailto:sharma_anjal...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, December 2, 2015 at 9:09 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Continuation Power Flow


Thanku so much sir for your help.

But how can i plot real power flow at each iteration of cpf.

Sent from Yahoo Mail on 
Android


From:"Ray Zimmerman" mailto:r...@cornell.edu>>
Date:Mon, 30 Nov, 2015 at 10:12 pm
Subject:Re: Continuation Power Flow

If by “real power flow” you mean the power transfer, then you can compute it 
from the lambda and the base and target power injections (loads, generations) 
according to equations (5.2)–(5.4) in the User’s 
Manual. The 
lambdas after each predictor and corrector step, respectively, are returned in 
results.cpf.lam_p and results.cpf.lam_c.

If you mean the full power flow solution, then you’ll have to use the 
appropriate lambda to set set up the injections for the case, according to 
equations (5.2)–(5.4), and initialize the power flow with the corresponding bus 
voltages (from results.cpf.V_p or results.cpf.V_c) and run a simple power flow.

   Ray


On Nov 29, 2015, at 3:10 AM, sharma_anjal...@yahoo.com wrote:

thanku so much sir...

i need one more help, which command can be used for CPF IN IEEE 14 BUS TEST 
SYSTEM so as to obtain real power flow after each corrector predictor step in 
the graph.




On Thursday, 26 November 2015 2:03 AM, Ray Zimmerman 
> wrote:


I don’t think there is anything special about the number of buses. These are 
just systems whose data has been published and then used by many researchers.

   Ray


On Nov 24, 2015, at 6:22 PM, Yogess H Singh 
> wrote:

Dear all,

I am wondering if someone can explain the reason behind choosing the certain 
number of buses such as 9 bus, 14 bus, 39 bus and so on for the standard test 
systems?
I know these systems represent some portions of existing power grid networks 
for example IEEE-14 Bus system is a portion of American Electric Power System 
(in the Midwestern US) as of February, 1962.

But other than this is there any other reason of standardization of the test 
systems?


Best Regards,

Yogesh Kumar
Graduate Research Assistant
NE 2042, EECS Department
University of Toledo, OH 43507
+1 (419)530-8295
[https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif]








Re: ACOPF constraints

2015-11-30 Thread Abhyankar, Shrirang G.
Rectangular.

> On Nov 30, 2015, at 5:10 AM, "Vladimir Frolov" 
>  wrote:
> 
> Dear Matpower community,
> 
> Do you know if opportunity cost constraint is used in the ACOPF formulation 
> of Matpower?
> In other words, does an allowed P,Q area for generator is just a rectangular 
> with Pmax, Pmin, Qmax, Qmin or something more complicated with limited 
> apparent power generator output?
> 
> Best,
> Vladimir




Re: Question about sparsity-based implementation in MATPower

2015-10-20 Thread Abhyankar, Shrirang G.
I concur with Jose’s observations on KLU, but I don’t think MATLAB will make 
KLU as its default solver. It’ll be great to have a KLU linear solver option 
for 
mplinsolve()<http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>

I recently added an interface to KLU in PETSc<http://www.mcs.anl.gov/petsc/> 
and compared PETSc and KLU’s linear solvers on a bunch of MATPOWER test cases. 
I was surprised to note that PETSc’s linear solver was actually faster than KLU 
(on all the test cases) by a factor of 1.5 - 3 times. I did experiment with the 
available solver and reordering schemes available with KLU, but did not find 
any option that beats PETSc. I’ll appreciate pointers from anyone who has used 
KLU on the KLU options they’ve used for solving their application. My power 
flow example code is available with the PETSc distribution 
https://bitbucket.org/petsc/petsc.git in the directory 
src/snes/examples/tutorials/network/pflow for anyone who wants to test it.

I am not surprised that PARDISO was found to be slower than ‘\'. Most of the 
power system test cases in MATPOWER are so small that having a multi-threaded 
linear solver may not yield any appreciable speedup. The thread launch and 
synchronization would most likely dominate. In addition, one needs to be 
cognizant of issues such as thread affinity and first touch when dealing with 
threads, which makes it harder for performance optimization.

Shri

From: Jose Luis Marin mailto:mari...@gridquant.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Monday, October 19, 2015 at 12:15 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Question about sparsity-based implementation in MATPower


I'd like to add that Matlab keeps incorporating the latest sparse direct 
solvers coming from Tim Davis and his group from TAMU / U. of Florida 
(SuiteSparse<http://faculty.cse.tamu.edu/davis/suitesparse.html>) into their 
new versions.  I believe that if the Jacobian is symmetric, current versions of 
MATLAB will use CHOLMOD, while if it's not, they will use UMFPACK.

This is great because these are solid, state of the art direct solvers; 
however, as far as I know, there is still no way in Matlab to tune the spparms 
in order to deactivate their multifrontal / supernodal variants and just use 
the "simplicial" variants instead.  In some testing we did a while ago on the C 
version of SuiteSparse, the multifrontal and supernodal approaches performed 
worse on the kind matrices that one typically obtains in power networks.  It 
made sense, because those techniques are essentially trying to find denser 
blocks in order to use the BLAS, and power systems matrices are just too sparse 
for that approach to pay off.  I hope Matlab implements the KLU solver as an 
option some day, because my hunch is that KLU is the fastest solver for power 
systems problems (it was used on Xyce, a SPICE-like simulator).


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


On Mon, Oct 19, 2015 at 3:04 PM, Ray Zimmerman 
mailto:r...@cornell.edu>> wrote:
I would also mention, for those who are interested, that version 5.1 of 
MATPOWER includes a wrapper function 
mplinsolve()<http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>
 that allows you to choose between different linear solvers for computing the 
Newton update step in the MIPS interior-point OPF algorithm. Currently this 
includes only Matlab’s built-in \ operator or the optional PARDISO.

If I remember correctly, for the Newton-Raphson power flow, I stuck with using 
Matlab’s \ operator directly rather than 
mplinsolve()<http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/mplinsolve.html>,
 because even for the largest systems I tried, there was little or no advantage 
to PARDISO, and the extra overhead was noticeable on small systems.

   Ray


On Oct 19, 2015, at 1:05 AM, Shruti Rao mailto:sra...@asu.edu>> 
wrote:

Thank you Dr. Abhyankar for the guidance. I appreciate your time and effort.

Shruti

On Sun, Oct 18, 2015 at 10:02 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Shruti,
  MATPOWER does use “\” operator for the linear solves. However note that, 
internally, MATLAB does perform some sort of matrix reordering to reduce the 
fill-ins in the factored matrix. For instance, UMFPACK uses an approximate 
minimum degree reordering scheme by default.

Shri

From: Shruti Rao mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 8:31 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Question about sparsity-based implementation in MATPower

Thank you Dr. Abhyakar,

My main aim was to confirm that MATPower uses the inbuilt "\" to solve the 
matrix equations and not Ti

Re: VSC-Multiple Terminals

2015-10-20 Thread Abhyankar, Shrirang G.
You can run a load flow with MATPOWER, but it does not have small signal 
analysis capability yet.

Shri

On Oct 20, 2015, at 12:08 PM, "Rajesh Vaid" 
mailto:umv...@myumanitoba.ca>> wrote:


Hello Matpower community,

I am working on DC grid system where in the system is based on multiple VSC=
 converters connected with each other on DC side while connected to AC syst=
em on other side. I was wondering if Matpower can provide me load flow and =
small signal analysis for the system?


I am aware about Matacdc for load flow, which I am utilizing however, is th=
ere any way of getting small signal analysis? Pls suggest .


Thank you in advance.



_
Rajesh Vaid,
PhD Student
Office: E3-574
EITC
University of Manitoba


Re: Question about sparsity-based implementation in MATPower

2015-10-18 Thread Abhyankar, Shrirang G.
Shruti,
  MATPOWER does use “\” operator for the linear solves. However note that, 
internally, MATLAB does perform some sort of matrix reordering to reduce the 
fill-ins in the factored matrix. For instance, UMFPACK uses an approximate 
minimum degree reordering scheme by default.

Shri

From: Shruti Rao mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 8:31 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Question about sparsity-based implementation in MATPower

Thank you Dr. Abhyakar,

My main aim was to confirm that MATPower uses the inbuilt "\" to solve the 
matrix equations and not Tinney or some other form of reordering  and then LU 
factorization followed by forward,backward substitutions. From your response I 
assume that it is true that MATpower uses "\" right?

Thank you for your response.



On Sun, Oct 18, 2015 at 6:27 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Hi Shruti,
  The direct linear solver used by MATLAB depends on the symmetry of the 
Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians (due to 
inactive taps), a Cholesky factorization is used (LL^T = A). For cases that 
lead to non-symmetric Jacobian, MATLAB uses UMFPACK for performing the linear 
solve.

Shri

From: Shruti Rao mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 5:37 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Question about sparsity-based implementation in MATPower

Greetings MATPower community,

I had a question about the way sparsity-based techniques are used in the 
Newton-Raphson solver of the power flow algorithm in MATPower.

I ran the code step-by-step and from my understanding, the way the sparsity of 
the Jacobian matrix is exploited is that it is created as a MATLAB "sparse" 
matrix wherein only the non-zeros are stored with the respective matrix 
positions and then the MATLAB operator "\" is invoked while calculating dx = 
-(J \ F); where J is the Jacobian and F is the vector of mismatches.

MATLAB "\" by default exploits the sparsity of the matrix by using a LU solver. 
The kind of solver "\" uses actually depends on the matrix structure if it is 
diagonal/tridiagonal/banded and so on (Flowchart obtained from Mathworks 
website attached in the email). I assume based on the typical  structure of the 
Jacobian that an LU solver is most likely to be chosen.

Is my understanding correct or am I missing something out? Thank you for your 
time and effort.


--
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116



--
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Question about sparsity-based implementation in MATPower

2015-10-18 Thread Abhyankar, Shrirang G.
Hi Shruti,
  The direct linear solver used by MATLAB depends on the symmetry of the 
Jacobian matrix. For MATPOWER test cases that have symmetric Jacobians (due to 
inactive taps), a Cholesky factorization is used (LL^T = A). For cases that 
lead to non-symmetric Jacobian, MATLAB uses UMFPACK for performing the linear 
solve.

Shri

From: Shruti Rao mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 5:37 PM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Question about sparsity-based implementation in MATPower

Greetings MATPower community,

I had a question about the way sparsity-based techniques are used in the 
Newton-Raphson solver of the power flow algorithm in MATPower.

I ran the code step-by-step and from my understanding, the way the sparsity of 
the Jacobian matrix is exploited is that it is created as a MATLAB "sparse" 
matrix wherein only the non-zeros are stored with the respective matrix 
positions and then the MATLAB operator "\" is invoked while calculating dx = 
-(J \ F); where J is the Jacobian and F is the vector of mismatches.

MATLAB "\" by default exploits the sparsity of the matrix by using a LU solver. 
The kind of solver "\" uses actually depends on the matrix structure if it is 
diagonal/tridiagonal/banded and so on (Flowchart obtained from Mathworks 
website attached in the email). I assume based on the typical  structure of the 
Jacobian that an LU solver is most likely to be chosen.

Is my understanding correct or am I missing something out? Thank you for your 
time and effort.


--
Best Regards,
Shruti Dwarkanath Rao

Graduate Research Assistant
School of Electrical, Computer and Energy Engineering
Arizona State University
Tempe, AZ, 85281
650 996 0116


Re: Computing "A" matrix for Eigenvalue analysis

2015-09-29 Thread Abhyankar, Shrirang G.
I think you want to calculate the eigen values the Jacobian matrix for the
AC-DC power flow. You need to get in touch with MATACDC developers to find
out what API is provided for obtaining the Jacobian matrix. MATPOWER has
the function makeJac()
http://www.pserc.cornell.edu/matpower/docs/ref/matpower5.0/makeJac.html
for returning the power flow Jacobian. MATACDC should be having something
similar. Once you get the matrix, MATLAB has eigen value solver (help
eigs) that you can use to calculate the eigen values.

Good luck,
Shri

-Original Message-
From: "umv...@cc.umanitoba.ca" 
Reply-To: MATPOWER discussion forum 
Date: Monday, September 28, 2015 at 10:13 AM
To: matpower-l 
Subject: Computing "A" matrix for Eigenvalue analysis

>Prof. zimmerman,
>
>1. I have been trying to compute 'A' matrix for the 39-bus case with
>multi-terminal DC (VSC) at bus 25, 26 & 16 after computing acdc
>loadflow (using matacdcpf of Matacdc1.0).
>
>2. Can you pls throw some light as to how I can do it. I would be
>grateful.
>
>Thank you.
>
>--
>Rajesh Vaid
>





Re: Constraint types and its effect on OPF convergence

2015-09-10 Thread Abhyankar, Shrirang G.
I am not sure there is a clear obvious way to tell which constraints pose the 
most problem for the optimization. Perhaps doing some sensitivity analysis 
might help, but with different operating conditions you will get different 
sensitivities. There are a few papers published on convergence behavior of 
interior point algorithms, I haven't read them yet, that may be of help.

It is an interesting question. I hope some of the folks working on OPF and 
related problems can shed some light.

Shri

Sent from my iPad

On Sep 9, 2015, at 8:25 AM, Arun Shrestha 
mailto:yours.a...@gmail.com>> wrote:


Hello MATPOWER Community,

I am trying to understand how various constraint types can affect OPF 
convergence. Are some constraints easy to satisfy than others? Is there a way 
to figure out the effect of constraints type (in terms of total number of 
loadflow iteration or convergence time)  on OPF convergence?

For Example:
Let's assume a small power system with four generating stations. The solution 
of an unconstrained OPF is shown below:

Gen Active Power: P1gen_0, P2gen_0, P3gen_0, P4gen_0
Gen Reactive Power: Q1gen_0, Q2gen_0, Q3gen_0, Q4gen_0
Gen voltage Magnitude:  V1gen_0, V2gen_0, V3gen_0, V4gen_0
Gen Voltage Angle: TH1gen_0, TH2gen_0, TH3gen_0, TH4gen_0

Next I add a user defined constraints as shown below, one at a time.

Constraint #1: P1gen + P2gen <= P_const OR
Constraint #2: Q1gen + Q2gen <= Q_constOR
Constraint #3: V1gen + V2gen <= V_const  OR
Constraint #4: TH1gen + TH2gen <= TH_const

I would like to know which constraint (out of 4) will result in the fastest OPF 
convergence.

Since runopf function uses Newton Method (by default), I think P and Q 
constraints will converge faster than V and TH constraints (based on how power 
flow is solved). Is there any mathematical derivation which shows the effect of 
the constraints on OPF convergence? Or the OPF convergence solely depends upon 
the power system model/cost function used?

Any help on this topic is highly appreciated.

Thank you,
Arun


Re: Jacobian matrix

2015-09-07 Thread Abhyankar, Shrirang G.
The size of the square Jacobian matrix, returned by makeJac(), in MATPOWER
is 2*npv + npq, where npv is the number of PV buses and npq is number of
PQ buses. You can create appropriate permutation vectors to reorganize the
matrix entries. However, from what I understand, you want to put the
entries in a matrix with a different size. You¹ll have to create the
appropriate transformation matrix that maps the original matrix to your
new matrix for doing what you want.

Shri

-Original Message-
From: Kanis Kanis 
Reply-To: MATPOWER discussion forum 
Date: Sunday, September 6, 2015 at 2:36 PM
To: MATPOWER discussion forum 
Subject: Jacobian matrix

>Hello,
>the Jacobian matrix from full(makeJac) function is a matrix which
>elements are placed, all PV buses before PQ buses for the real power
>rows and voltage angle columns. Is there any way to reform the matrix in
>a (n-1+m)x(n-1+m) matrix, where n the number of buses and m the number
>of PQ buses;
>
>Thanks in advance for your interest.
>
>
>---
>This email has been checked for viruses by Avast antivirus software.
>https://www.avast.com/antivirus
>
>





Re: REQUEST

2015-09-03 Thread Abhyankar, Shrirang G.
If you need the adjacency matrix of the graph then you can use the Ybus matrix 
which is a weighted Laplacian. You can obtain the Ybus of a given power grid 
network by the makeYbus function. 
http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/makeYbus.html

Shri

From: Mohamed-Larbi Rebaiaia 
mailto:mohamed-larbi.rebaiai...@ulaval.ca>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Wednesday, September 2, 2015 at 11:52 AM
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: RE: REQUEST

A network is a graph G(X, V)  where X is a finite set of  nodes (or vertices) 
and  V a finite set of  edges for undirected orientation (or arcs for directed 
orientation). We consider here stochastic networks where nodes and edges could 
fail or functioning with a  probability value which corresponds to the 
performance in term of reliability,

Here a simple network:

[cid:633a20ba-4ce4-4b42-9196-dc87f5b6caa7]

Sincerely
​

Med-Larbi.


De : 
bounce-119603272-72988...@list.cornell.edu<mailto:bounce-119603272-72988...@list.cornell.edu>
 
mailto:bounce-119603272-72988...@list.cornell.edu>>
 de la part de Abhyankar, Shrirang G. mailto:abhy...@anl.gov>>
Envoyé : 2 septembre 2015 08:24
À : MATPOWER discussion forum
Objet : Re: REQUEST

What do you mean by 'simple (direct or undirect) network'?

Shri

On Aug 31, 2015, at 9:06 PM, "Mohamed-Larbi Rebaiaia" 
mailto:mohamed-larbi.rebaiai...@ulaval.ca>> 
wrote:


Hi...

I would like to proceed to the transformation of an electric network ( e.g. 
Network39bus​) into a simple (direct or undirect) network to determine its 
reliability.

Does anyone know how to do, or is there any rules to follow.

Thank you very much.



Med-Larbi



Re: REQUEST

2015-09-02 Thread Abhyankar, Shrirang G.
What do you mean by 'simple (direct or undirect) network'?

Shri

On Aug 31, 2015, at 9:06 PM, "Mohamed-Larbi Rebaiaia" 
mailto:mohamed-larbi.rebaiai...@ulaval.ca>> 
wrote:


Hi...

I would like to proceed to the transformation of an electric network ( e.g. 
Network39bus​) into a simple (direct or undirect) network to determine its 
reliability.

Does anyone know how to do, or is there any rules to follow.

Thank you very much.



Med-Larbi



Re: REQUEST

2015-08-31 Thread Abhyankar, Shrirang G.
Can you please let us know what you've tried till now, along with any errors, 
and what specific part(s) of the CPF chapter you did not understand. There is 
also an example run at the end of that chapter that you may tweak for your 
application.

Shri

On Aug 31, 2015, at 3:38 PM, "Owusuboateng, Prince Charles" 
mailto:powusuboateng8...@mytu.tuskegee.edu>>
 wrote:

Please it has not been of help. I am looking to load each of the 4 regions 
independently and perform power flows on each one of them.

On Mon, Aug 31, 2015 at 2:58 PM, Abhyankar, Shrirang G. 
mailto:abhy...@anl.gov>> wrote:
Please take a look at the continuation power flow chapter in the MAtPOWER 
manual.

Shri

On Aug 31, 2015, at 11:05 AM, "Owusuboateng, Prince Charles" 
mailto:powusuboateng8...@mytu.tuskegee.edu>>
 wrote:

Hi All,
I have a divided the IEE 39bus system in 4 areas. I will like to load each of 
the 4 areas independently and perform load flow analysis and plot a P-V curve 
with this. Can I get help with this?
Thanks



Re: REQUEST

2015-08-31 Thread Abhyankar, Shrirang G.
Please take a look at the continuation power flow chapter in the MAtPOWER 
manual.

Shri

On Aug 31, 2015, at 11:05 AM, "Owusuboateng, Prince Charles" 
mailto:powusuboateng8...@mytu.tuskegee.edu>>
 wrote:

Hi All,
I have a divided the IEE 39bus system in 4 areas. I will like to load each of 
the 4 areas independently and perform load flow analysis and plot a P-V curve 
with this. Can I get help with this?
Thanks


Re: transformers and tap coefficients

2015-08-26 Thread Abhyankar, Shrirang G.
Yes, it is a typo. It should be r =b =0.

Shri

> On Aug 26, 2015, at 6:47 AM, "Vladimir Frolov" 
>  wrote:
> 
> Dear Matpower community,
> 
> My question is about tap coefficients. It is said in the data description 
> that branch includes transformer if r=x=0. But actually in cases r and b =0. 
> Is it misprint in data description or should I consider given values for x as 
> b.
> 
> Best,
> Vladimir
> 




Re: About three winding transformers and contingency analysis

2015-08-23 Thread Abhyankar, Shrirang G.
It would be hard to find which branches in the MATPOWER data constitute a 
three-winding transformer if you don’t have the original cases. I guess you’ll 
just have to choose sets of three branches and assume they constitute 
three-winding transformers.

Shri



From: Jesus Maria Lopez Lezama 
mailto:jesusmarialop...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Saturday, August 22, 2015 at 4:47 PM
To: MATPOWER Discussion Forum 
mailto:matpowe...@list.cornell.edu>>, MATPOWER 
Discussion List mailto:matpower-l@cornell.edu>>
Subject: About three winding transformers and contingency analysis

Dear all

I want to run a contingency analysis (n-1) using Matpower 5.1
The code I have is automated to take out one branch at a time.
However, three winding transformers are modelled as three different branches. 
So, If I want to simulate the outage of such a transformer I must take three 
braches at a time.
The problem consists on identifying the three winding transformers.
How do I identify a three winding transformers within the mpc.branch matrix?
I tried to do it by checking different baseKV in mpc.bus; however all baseKV 
values are the same.

Has anyone had the same inquiry?
Can anyone give me some hints?

Best regards,
Jesús López



Re: Add a load as a variable to the extended optimal power

2015-08-21 Thread Abhyankar, Shrirang G.
See section 6.4.2 on ‘dispatchable loads’ in the MATPOWER manual.

Shri

From: Mahdi Kiaee mailto:meh19...@yahoo.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Friday, August 21, 2015 at 1:35 PM
To: "MATPOWER-L@cornell.edu" 
mailto:MATPOWER-L@cornell.edu>>
Subject: Add a load as a variable to the extended optimal power

Hi there,
I have got a question regarding the extended optimal power flow feature in 
MATPOWER. Is there any way to add a variable to the extended optimal power flow 
while that variable is the load of a bus on the power system at the same time? 
In other words, I want the load of a bus to be considered as an optimisation 
variable.
Thank you in advance.
Mahdi



Re: Matpower Opf with tap changer

2015-08-20 Thread Abhyankar, Shrirang G.
Here’s a relevant discussion from the MATPOWER mail archive.

 https://www.mail-archive.com/matpower-l@cornell.edu/msg04162.html

Shri

From: "Chen, Hengsi" mailto:h...@iaew.rwth-aachen.de>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Thursday, August 20, 2015 at 2:56 AM
To: "'MATPOWER-L@cornell.edu'" 
mailto:MATPOWER-L@cornell.edu>>
Subject: Matpower Opf with tap changer

Dear Sir or Madam,

Firstly, thanks a lot for the effort. The Matpower has really helped me a lot. 
I am working with Matpower and would like to do opf considering the 
optimization of tap changer, which is still not considered as far as I know. I 
have seen, you wrote anywhere that you might include this functionality if you 
find time. May I ask, is it in process? When could it be released?
If not, could you please give me some advices, how can I implement by myself?
Thanks a lot!

Best wishes
Hengsi


  1   2   3   >