Re: Question about state estimation in matpower

2019-01-10 Thread Ray Zimmerman
The state estimation code is contributed code (not a part of core MATPOWER), so 
if you don’t get help from others here, I suggest you try contacting the author 
directly.

Ray


> On Dec 26, 2018, at 11:11 AM, Mohsen Jorjani  wrote:
> 
> Hello
> I have a question regarding state estimation code in matpower. As you know, 
> the system measurements include line power flows, voltage magnitudes and bus 
> power injections. Bus in the code which is provided in matpower (in se folder 
> located under the extras), there is only the possibility to define generated 
> active and reactive power measurement at each bus instead of bus power 
> injection measurements. So consider we are going to define an active power 
> injection measurement(P_inj) of - 20 MW for a PQ bus with active power 
> consumption(P_L) of 18 MW. How should this measurement be define? Should I 
> define a generator in this bus and set the generated power(P_G) of this bus 
> to be -2 MW (Because P_inj= P_G-P_L)? Is that true?
> My other question is about the concept of state estimation. If we have 
> measurements of the sysytem and then replace measurement of  a part of the 
> system such that the new measurements in this part of the system obey KCL and 
> KVL, does the value of residual reduce?





Re: Question About Not To Display Mpopt

2018-11-26 Thread Ray Zimmerman
Yes.

And, in the future, when posting, please start a new thread (don’t just reply 
to an existing e-mail) with an appropriate subject line.

Ray


> On Nov 22, 2018, at 2:33 AM, Sarhan Hasan  wrote:
> 
> Hi  all 
> 
> Please can I runopf after add generator to load bus 
> 



Re: Question About Not To Display Mpopt

2018-11-22 Thread Sarhan Hasan
 Hi  all 
Please can I runopf after add generator to load bus 
On ‎Tuesday‎, ‎June‎ ‎19‎, ‎2018‎ ‎11‎:‎12‎:‎25‎ ‎PM‎ ‎MDT, Oguzhan Ceylan 
 wrote:  
 
 Yes, you are right, I reinstalled Matpower and now everything is fine. 
thank you very much.oguzhan
2018-06-19 20:23 GMT+03:00 Ray Zimmerman :

This is probably an indication that one (or more) of the files in your MATPOWER 
distribution have been modified from the original. I suggest re-installing a 
clean copy of MATPOWER.
    Ray


On Jun 18, 2018, at 1:37 PM, Oguzhan Ceylan  wrote:
Dear All, 

I have a simple problem. When I run power flow, I always 
see mppopt options as follows:
mpopt = 

 v: 12
 model: 'AC'
    pf: [1x1 struct]
   cpf: [1x1 struct]
   opf: [1x1 struct]
   verbose: 0
   out: [1x1 struct]
  mips: [1x1 struct]
   exp: [1x1 struct]
   fmincon: [1x1 struct]
    intlinprog: []
   linprog: []
  most: [1x1 struct]
  quadprog: []
    knitro: [1x1 struct]
 ipopt: [1x1 struct]
    minopf: [1x1 struct]
  sopf: [1x1 struct]
 pdipm: [1x1 struct]
 tralm: [1x1 struct]
 cplex: [1x1 struct]
 mosek: [1x1 struct]
    gurobi: [1x1 struct]
To overcome this problem I tried the following:
    opt = mpoption('VERBOSE',0,'OUT_ALL' ,0); % set o
and then running power flow:
runpf(mpc,opt);
I am missing some simple point, any help will be appreciated.
oguzhan




  

Question about "V0" and "initialguess" in state estimation

2018-11-10 Thread Shiva Moshtagh
Hello everyone

I'm trying to estimate the states of 30-bus system using run_se.m in
Matpower. I've already defined casename, measure, idx and sigma in MATLAB,
but I don't know how can I define *V0* and *initialguess*. What do they
actually mean?
I would appreciate any help.

Thank you,
Shiva


Re: question about matpower please help to me

2018-09-07 Thread Ray Zimmerman
I’m not sure I understand your question exactly, but the placement of 
generators in your system is defined in the case file. You can create your own 
case file by copying one of the existing ones (like case9.m) and editing it 
with data from your own system.

Ray


> On Sep 7, 2018, at 2:07 AM, amir ali Hosseini  wrote:
> 
> Hello
> may name is amir ali .I am student . I like work with MATPOWER  tool .
> because  MATPOWER is faster simulation in the MATLAB.
> my subject study is : 
> Distributed generation planning .and use TLBO , PSO algorithm for answers 
> Optimization .
> ok !
> so tow variables 1- where must be generation on the buses( place of 
> generator) 
> 2- how many product energy (capacity of generator)
> I have tow scope 1- the network parameters be better than last.
> 2-The who's have power plane ( DG ,PV, Wind, etc ) have Max benefit 
> so I do this
> I study TLBO and PSO .then give ones exercise of them.
> 
> In the MATPOWER  ues
> 
> The  create  M-file flow the below
> 
> clc;
> clear;
> close all;
> %% Power flow case9 IEEE
> mpc = loadcase('case9');% case load on the mpc
> results = runopf(mpc);% Optimiz power flow & put result on result metrix
>   I need  know! , where  put  a generator  on the which place ?
> 
> Can you Help me ?!
> 
> Thanks  a lot .!
> 



question about matpower please help to me

2018-09-07 Thread amir ali Hosseini
Hello
may name is amir ali .I am student . I like work with MATPOWER  tool .
because  MATPOWER is faster simulation in the MATLAB.
my subject study is :
Distributed generation planning .and use TLBO , PSO algorithm for answers
Optimization .
ok !
so tow variables 1- where must be generation on the buses( place of
generator)
2- how many product energy (capacity of generator)
I have tow scope 1- the network parameters be better than last.
2-The who's have power plane ( DG ,PV, Wind, etc ) have Max benefit

so I do this

I study TLBO and PSO .then give ones exercise of them.

In the MATPOWER  ues

The  create  M-file flow the below

clc;

clear;

close all;

%% Power flow case9 IEEE

mpc = loadcase('case9');% case load on the mpc

results = runopf(mpc);% Optimiz power flow & put result on result metrix

  I need  know! , where  put  a generator  on the which place ?

Can you Help me ?!

Thanks  a lot .!


Re: OPF gives higher PG output than corresponding PMAX - question

2018-08-31 Thread Ray Zimmerman
The power flow does not enforce any limits (generator, voltage or branch flow 
limits). The only exception is that it will attempt to enforce generator 
reactive limits if the pf.enforce_q_lims option is true, which it does by 
relaxing the voltage setpoint at the generator when the reactive limit is 
reached.

If you want a solution that respects all limits, you will need to use the OPF.

   Ray




> On Aug 28, 2018, at 4:03 AM, Mariusz Drabecki  wrote:
> 
> Dear All,
>  
> I ran Power Flow on slightly changed case Illinois 200 (PD of each node 
> augmented by 8%). The success flag is 1 and the PF fully converged. However, 
> when I look at the results I get situation shown below i.e.  PG output is 
> higher than its upper constraint PMAX of the slack bus. I know that the slack 
> bus’ power injection results from the situation in the grid, yet shouldn’t it 
> still be within acceptable limits? If not then what would you suggest to 
> force the PMAX limit?
>  
>  
> GEN_BUS   PG  QG QMAX  QMIN   VG MBASE
>  GEN_STATUSPMAX   PMIN
> 189 598,10 150,31   209,45   -46,67   1,07   
> 682,98   1 569,15 
>   170,75
>  
> Best,
> Mariusz



Re: Question on MATPOWER program....please reply to this email address.

2018-04-23 Thread Ray Zimmerman
You can use load2disp() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/load2disp.html> to 
convert loads to dispatchable. Solar generation can be modeled as a normal 
generator with a generation cost of zero. Assuming it is not dispatchable, you 
would also want to set PMIN equal to PMAX, both set to the desired production 
level for the OPF run in question.

   Ray


> On Apr 21, 2018, at 5:28 PM, Khawla Munawwer <khawlamunawwer...@gmail.com> 
> wrote:
> 
> Can someone help me with dispatching the load or how to add a solar to power 
> generation to limit the voltage violations.Following are the objectives:
> 
> I want to Run 24-­‐‑hour simulations and report the voltage, losses and line 
> loading. If the voltage violates the standard limits of 0.95 PU – 1.05 PU at 
> any bus, or the loading exceeds 100% during one or more time intervals 
> modifications
> to the network to overcome the problem.
> 
> I can include incorporating more dispatchable loads
> (i.e., converting some regular loads to dispatchable ones), and/or adding more
> renewable energy generation (adding new plants at new buses or enlarging
> existing ones)
> 
> 
> Deliverable:
> 
> • Describe any changes that you propose, if any, and report the following 
> plots
> for two cases: before and after modification.
> • Plot a 3D plot depicting the voltage magnitude at each bus over time.
> • Plot another 3D plot depicting the percent line loading through each branch
> throughout the day.
> • Plot a 2D plot showing the total losses throughout the day at every bus, and
> calculate the total losses across the entire network.
> 
> I have used following code but I am not able to use a code to dispatch loades 
> and use solar power...please help:
> 
> 
> 
> define_constants;
> mpc = loadcase('case30'); %load case30 to the variable mpc
> for a=1:30
>   PDdefault(a,1)=mpc.bus(a,PD);%store the default value of power demand 
> for each bus in case 30
> end
> for b = 1:24  %Repeat for 24 hours
> for a = 1:30  %Repeat for 30 buses
> mpc.bus(a, PD) = powers(a,b)*PDdefault(a,1);%Change the power 
> demand:multiply the p.u. value from the excel file to the default power 
> demand for each bus
> end
> 
> % add a line to indicate the time
> 
> time=[char(10),'---'];
> disp(time)
> time=[char(10),'Time=',num2str(b-1),':00'];
> disp(time)
> time=[char(10),'---'];
> disp(time)
> 
> 
> results=runopf(mpc);  %Run the optimum power flow and store the 
> results
> 
> 
> % Create 3 variables to store the value of voltage, loss and line
> % loading.
> 
> 
>for a = 1:30
>voltage(a,b) = results.bus(a,VM)*mpc.bus(a,BASE_KV); % p.u voltage 
> multiply base_KV
>end
> 
>for a = 1:41
> loss(a,b)=results.branch(a,PF)+results.branch(a,PT); % Difference between 
> from power injection and To power injection
>end
> 
>for a = 1:41
>  if 
> (sqrt(results.branch(a,PF)^2+results.branch(a,QF)^2)>=sqrt(results.branch(a,PT)^2+results.branch(a,QT)^2))
> 
> lineload(a,b)=sqrt(results.branch(a,PF)^2+results.branch(a,QF)^2)/mpc.branch(a,RATE_A)*100;
>  else 
> lineload(a,b)=sqrt(results.branch(a,PT)^2+results.branch(a,QT)^2)/mpc.branch(a,RATE_A)*100;
>  end
>end
> end
> 
> % Display the graph in the followings
> 
> surface(voltage);
> title('Voltage Magnitude at each bus')
> xlabel('Hour') % x-axis label
> ylabel('Bus') % y-axis label
> zlabel('Voltage(kV)') % z-axis label
> figure();
> mesh(lineload);
> title('Percent line loading for each branch')
> xlabel('Hour') % x-axis label
> ylabel('Branch') % y-axis label
> zlabel('Percent Line Loading') % z-axis label
> 
> 



Question on MATPOWER program....please reply to this email address.

2018-04-21 Thread Khawla Munawwer
Can someone help me with dispatching the load or how to add a solar to
power generation to limit the voltage violations.Following are the
objectives:

I want to Run 24-­‐‑hour simulations and report the voltage, losses and
line loading. If the voltage violates the standard limits of 0.95 PU – 1.05
PU at any bus, or the loading exceeds 100% during one or more time
intervals modifications
to the network to overcome the problem.

I can include incorporating more dispatchable loads
(i.e., converting some regular loads to dispatchable ones), and/or adding
more
renewable energy generation (adding new plants at new buses or enlarging
existing ones)


Deliverable:

• Describe any changes that you propose, if any, and report the following
plots
for two cases: before and after modification.
• Plot a 3D plot depicting the voltage magnitude at each bus over time.
• Plot another 3D plot depicting the percent line loading through each
branch
throughout the day.
• Plot a 2D plot showing the total losses throughout the day at every bus,
and
calculate the total losses across the entire network.

I have used following code but I am not able to use a code to dispatch
loades and use solar power...please help:



define_constants;
mpc = loadcase('case30'); %load case30 to the variable mpc
for a=1:30
  PDdefault(a,1)=mpc.bus(a,PD);%store the default value of power demand
for each bus in case 30
end
for b = 1:24  %Repeat for 24 hours
for a = 1:30  %Repeat for 30 buses
mpc.bus(a, PD) = powers(a,b)*PDdefault(a,1);%Change the power
demand:multiply the p.u. value from the excel file to the default power
demand for each bus
end

% add a line to indicate the time

time=[char(10),'---'];
disp(time)
time=[char(10),'Time=',num2str(b-1),':00'];
disp(time)
time=[char(10),'---'];
disp(time)


results=runopf(mpc);  %Run the optimum power flow and store the
results


% Create 3 variables to store the value of voltage, loss and line
% loading.


   for a = 1:30
   voltage(a,b) = results.bus(a,VM)*mpc.bus(a,BASE_KV); % p.u voltage
multiply base_KV
   end

   for a = 1:41
loss(a,b)=results.branch(a,PF)+results.branch(a,PT); % Difference
between from power injection and To power injection
   end

   for a = 1:41
 if
(sqrt(results.branch(a,PF)^2+results.branch(a,QF)^2)>=sqrt(results.branch(a,PT)^2+results.branch(a,QT)^2))

lineload(a,b)=sqrt(results.branch(a,PF)^2+results.branch(a,QF)^2)/mpc.branch(a,RATE_A)*100;
 else
lineload(a,b)=sqrt(results.branch(a,PT)^2+results.branch(a,QT)^2)/mpc.branch(a,RATE_A)*100;
 end
   end
end

% Display the graph in the followings

surface(voltage);
title('Voltage Magnitude at each bus')
xlabel('Hour') % x-axis label
ylabel('Bus') % y-axis label
zlabel('Voltage(kV)') % z-axis label
figure();
mesh(lineload);
title('Percent line loading for each branch')
xlabel('Hour') % x-axis label
ylabel('Branch') % y-axis label
zlabel('Percent Line Loading') % z-axis label


Re: Question about shadow price of line flow constraints in AC OPF

2018-04-19 Thread Ma Jin
Dear Ray,

Thank you very much! It is a very smart way to deal with that. How could I
not realize that in the first place? Thank you very much!

Kind regards,
Jin



2018-04-20 4:51 GMT+10:00 Ray Zimmerman <r...@cornell.edu>:

> Dear Jin,
>
> In response to your original question. You are correct. However, if the
> flow limit is binding (which it is when the shadow price is non-zero), then
> the apparent power flowing in the line is equal to RATE_A. So I just use
> RATE_A since it is readily available.
>
> Ray
>
>
>
> On Apr 12, 2018, at 11:45 PM, Ma Jin <maji...@gmail.com> wrote:
>
> Dear Sarmad,
>
> Thank you very much!  The caveats pointed by you are really helpful.
> Thanks!
>
> Kind regards,
> Jin
>
> 2018-04-13 13:16 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg>:
>
>> Dear Jin,
>>
>> Yes, you are right.
>>
>>
>>
>> However according to my experience, you have to be careful regarding the
>> calculation of Jacobian of voltage sensitivities which might be required to
>> translate Lagrange multipliers to LMP components.
>>
>> Matpower can give these sensitivities (Jacobian) from the function
>> makeJac().
>>
>> So if you calculate Jacobian like makeJac(mpc), then it will give you
>> sensitivity at the base case.
>>
>> Hence to get the updated Jacobian (representing the operating
>> conditions), you need to implement something like makeJac(results_pf),
>> where results_pf = runpf(mpc).
>>
>> Another issue, which I believe was corrected by Ray, was that if you have
>> generators in the grid they were taken by-default as PV while making the
>> Jacobian. So you might need to get the updated version of MATPOWER.
>>
>> Maybe Ray could shed some more light on making sure the steps for
>> correctly translating Lagrange multipliers to LMP components.
>>
>>
>>
>> Hope it helps.
>>
>> Best,
>>
>> Sarmad
>>
>> *From:* bounce-122459850-74036...@list.cornell.edu [mailto:
>> bounce-122459850-74036...@list.cornell.edu] *On Behalf Of *Ma Jin
>> *Sent:* Wednesday, 11 April, 2018 5:24 PM
>> *To:* MATPOWER discussion forum
>> *Subject:* Re: Question about shadow price of line flow constraints in
>> AC OPF
>>
>>
>>
>> Dear Sarmad,
>>
>>
>>
>> Thanks! Matpower provides the values of all Kuhn-tucker multipliers and
>> Lagrange multipliers. So it is really a powerful tool which makes
>> decomposition of the price possible if one wants to.
>>
>>
>>
>> Kind regards,
>>
>> Jin
>>
>>
>>
>> 2018-04-11 17:12 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg>:
>>
>> Hi Jin,
>>
>> I couldn’t understand the issue you reported. But according to my
>> knowledge, MATPOWER gives you the final price at the node, it doesn’t
>> calculate individual congestion, loss, energy components.
>>
>> Moreover, for ACOPF, MATPOWER gives you and active ($/MW) and reactive
>> power ($/MVar) marginal prices at respective nodes.
>>
>> Hope it helps.
>>
>>
>>
>> *From:* bounce-122459082-74036...@list.cornell.edu [mailto:
>> bounce-122459082-74036...@list.cornell.edu] *On Behalf Of *Ma Jin
>> *Sent:* Wednesday, 11 April, 2018 8:04 AM
>> *To:* MATPOWER-L@cornell.edu
>> *Subject:* Question about shadow price of line flow constraints in AC OPF
>>
>>
>>
>> Dear all,
>>
>>
>>
>> I feel confused about the unit of the shadow price of the line flow
>> constraints in AC based OPF. Since the square of the apparent power is used
>> when building the line flow constraints, the shadow price should be with a
>> unit of $/(MVA*MVA). When it is converted to the shadow price $/MVA,
>> MatPower times the RateA of that line, but for me, it more makes sense if
>> it is multiplied with the apparent power flowing through the line. What is
>> the reason behind multiplying that RateA. Thanks!
>>
>>
>>
>> Kind regards,
>>
>> Jin
>>
>>
>>
>
>
>


Re: Question about shadow price of line flow constraints in AC OPF

2018-04-19 Thread Ray Zimmerman
Dear Jin,

In response to your original question. You are correct. However, if the flow 
limit is binding (which it is when the shadow price is non-zero), then the 
apparent power flowing in the line is equal to RATE_A. So I just use RATE_A 
since it is readily available.

Ray



> On Apr 12, 2018, at 11:45 PM, Ma Jin <maji...@gmail.com> wrote:
> 
> Dear Sarmad,
> 
> Thank you very much!  The caveats pointed by you are really helpful. Thanks!
> 
> Kind regards,
> Jin
> 
> 2018-04-13 13:16 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg 
> <mailto:sarmad.ha...@tum-create.edu.sg>>:
> Dear Jin,
> 
> Yes, you are right.
> 
>  
> 
> However according to my experience, you have to be careful regarding the 
> calculation of Jacobian of voltage sensitivities which might be required to 
> translate Lagrange multipliers to LMP components.
> 
> Matpower can give these sensitivities (Jacobian) from the function makeJac().
> 
> So if you calculate Jacobian like makeJac(mpc), then it will give you 
> sensitivity at the base case.
> 
> Hence to get the updated Jacobian (representing the operating conditions), 
> you need to implement something like makeJac(results_pf), where results_pf = 
> runpf(mpc).
> 
> Another issue, which I believe was corrected by Ray, was that if you have 
> generators in the grid they were taken by-default as PV while making the 
> Jacobian. So you might need to get the updated version of MATPOWER.
> 
> Maybe Ray could shed some more light on making sure the steps for correctly 
> translating Lagrange multipliers to LMP components.
> 
>  
> 
> Hope it helps.
> 
> Best,
> 
> Sarmad
> 
> From: bounce-122459850-74036...@list.cornell.edu 
> <mailto:bounce-122459850-74036...@list.cornell.edu> 
> [mailto:bounce-122459850-74036...@list.cornell.edu 
> <mailto:bounce-122459850-74036...@list.cornell.edu>] On Behalf Of Ma Jin
> Sent: Wednesday, 11 April, 2018 5:24 PM
> To: MATPOWER discussion forum
> Subject: Re: Question about shadow price of line flow constraints in AC OPF
> 
>  
> 
> Dear Sarmad,
> 
>  
> 
> Thanks! Matpower provides the values of all Kuhn-tucker multipliers and 
> Lagrange multipliers. So it is really a powerful tool which makes 
> decomposition of the price possible if one wants to.
> 
>  
> 
> Kind regards,
> 
> Jin
> 
>  
> 
> 2018-04-11 17:12 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg 
> <mailto:sarmad.ha...@tum-create.edu.sg>>:
> 
> Hi Jin,
> 
> I couldn’t understand the issue you reported. But according to my knowledge, 
> MATPOWER gives you the final price at the node, it doesn’t calculate 
> individual congestion, loss, energy components.
> 
> Moreover, for ACOPF, MATPOWER gives you and active ($/MW) and reactive power 
> ($/MVar) marginal prices at respective nodes.
> 
> Hope it helps.
> 
>  
> 
> From: bounce-122459082-74036...@list.cornell.edu 
> <mailto:bounce-122459082-74036...@list.cornell.edu> 
> [mailto:bounce-122459082-74036...@list.cornell.edu 
> <mailto:bounce-122459082-74036...@list.cornell.edu>] On Behalf Of Ma Jin
> Sent: Wednesday, 11 April, 2018 8:04 AM
> To: MATPOWER-L@cornell.edu <mailto:MATPOWER-L@cornell.edu>
> Subject: Question about shadow price of line flow constraints in AC OPF
> 
>  
> 
> Dear all,
> 
>  
> 
> I feel confused about the unit of the shadow price of the line flow 
> constraints in AC based OPF. Since the square of the apparent power is used 
> when building the line flow constraints, the shadow price should be with a 
> unit of $/(MVA*MVA). When it is converted to the shadow price $/MVA, MatPower 
> times the RateA of that line, but for me, it more makes sense if it is 
> multiplied with the apparent power flowing through the line. What is the 
> reason behind multiplying that RateA. Thanks!
> 
>  
> 
> Kind regards,
> 
> Jin
> 
>  
> 
> 



Re: Question about shadow price of line flow constraints in AC OPF

2018-04-12 Thread Ma Jin
Dear Sarmad,

Thank you very much!  The caveats pointed by you are really helpful. Thanks!

Kind regards,
Jin

2018-04-13 13:16 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg>:

> Dear Jin,
>
> Yes, you are right.
>
>
>
> However according to my experience, you have to be careful regarding the
> calculation of Jacobian of voltage sensitivities which might be required to
> translate Lagrange multipliers to LMP components.
>
> Matpower can give these sensitivities (Jacobian) from the function
> makeJac().
>
> So if you calculate Jacobian like makeJac(mpc), then it will give you
> sensitivity at the base case.
>
> Hence to get the updated Jacobian (representing the operating conditions),
> you need to implement something like makeJac(results_pf), where results_pf
> = runpf(mpc).
>
> Another issue, which I believe was corrected by Ray, was that if you have
> generators in the grid they were taken by-default as PV while making the
> Jacobian. So you might need to get the updated version of MATPOWER.
>
> Maybe Ray could shed some more light on making sure the steps for
> correctly translating Lagrange multipliers to LMP components.
>
>
>
> Hope it helps.
>
> Best,
>
> Sarmad
>
> *From:* bounce-122459850-74036...@list.cornell.edu [mailto:
> bounce-122459850-74036...@list.cornell.edu] *On Behalf Of *Ma Jin
> *Sent:* Wednesday, 11 April, 2018 5:24 PM
> *To:* MATPOWER discussion forum
> *Subject:* Re: Question about shadow price of line flow constraints in AC
> OPF
>
>
>
> Dear Sarmad,
>
>
>
> Thanks! Matpower provides the values of all Kuhn-tucker multipliers and
> Lagrange multipliers. So it is really a powerful tool which makes
> decomposition of the price possible if one wants to.
>
>
>
> Kind regards,
>
> Jin
>
>
>
> 2018-04-11 17:12 GMT+10:00 Sarmad Hanif <sarmad.ha...@tum-create.edu.sg>:
>
> Hi Jin,
>
> I couldn’t understand the issue you reported. But according to my
> knowledge, MATPOWER gives you the final price at the node, it doesn’t
> calculate individual congestion, loss, energy components.
>
> Moreover, for ACOPF, MATPOWER gives you and active ($/MW) and reactive
> power ($/MVar) marginal prices at respective nodes.
>
> Hope it helps.
>
>
>
> *From:* bounce-122459082-74036...@list.cornell.edu [mailto:
> bounce-122459082-74036...@list.cornell.edu] *On Behalf Of *Ma Jin
> *Sent:* Wednesday, 11 April, 2018 8:04 AM
> *To:* MATPOWER-L@cornell.edu
> *Subject:* Question about shadow price of line flow constraints in AC OPF
>
>
>
> Dear all,
>
>
>
> I feel confused about the unit of the shadow price of the line flow
> constraints in AC based OPF. Since the square of the apparent power is used
> when building the line flow constraints, the shadow price should be with a
> unit of $/(MVA*MVA). When it is converted to the shadow price $/MVA,
> MatPower times the RateA of that line, but for me, it more makes sense if
> it is multiplied with the apparent power flowing through the line. What is
> the reason behind multiplying that RateA. Thanks!
>
>
>
> Kind regards,
>
> Jin
>
>
>


RE: Question about shadow price of line flow constraints in AC OPF

2018-04-12 Thread Sarmad Hanif
Dear Jin,
Yes, you are right.

However according to my experience, you have to be careful regarding the 
calculation of Jacobian of voltage sensitivities which might be required to 
translate Lagrange multipliers to LMP components.
Matpower can give these sensitivities (Jacobian) from the function makeJac().
So if you calculate Jacobian like makeJac(mpc), then it will give you 
sensitivity at the base case.
Hence to get the updated Jacobian (representing the operating conditions), you 
need to implement something like makeJac(results_pf), where results_pf = 
runpf(mpc).
Another issue, which I believe was corrected by Ray, was that if you have 
generators in the grid they were taken by-default as PV while making the 
Jacobian. So you might need to get the updated version of MATPOWER.
Maybe Ray could shed some more light on making sure the steps for correctly 
translating Lagrange multipliers to LMP components.

Hope it helps.
Best,
Sarmad
From: bounce-122459850-74036...@list.cornell.edu 
[mailto:bounce-122459850-74036...@list.cornell.edu] On Behalf Of Ma Jin
Sent: Wednesday, 11 April, 2018 5:24 PM
To: MATPOWER discussion forum
Subject: Re: Question about shadow price of line flow constraints in AC OPF

Dear Sarmad,

Thanks! Matpower provides the values of all Kuhn-tucker multipliers and 
Lagrange multipliers. So it is really a powerful tool which makes decomposition 
of the price possible if one wants to.

Kind regards,
Jin

2018-04-11 17:12 GMT+10:00 Sarmad Hanif 
<sarmad.ha...@tum-create.edu.sg<mailto:sarmad.ha...@tum-create.edu.sg>>:
Hi Jin,
I couldn’t understand the issue you reported. But according to my knowledge, 
MATPOWER gives you the final price at the node, it doesn’t calculate individual 
congestion, loss, energy components.
Moreover, for ACOPF, MATPOWER gives you and active ($/MW) and reactive power 
($/MVar) marginal prices at respective nodes.
Hope it helps.

From: 
bounce-122459082-74036...@list.cornell.edu<mailto:bounce-122459082-74036...@list.cornell.edu>
 
[mailto:bounce-122459082-74036...@list.cornell.edu<mailto:bounce-122459082-74036...@list.cornell.edu>]
 On Behalf Of Ma Jin
Sent: Wednesday, 11 April, 2018 8:04 AM
To: MATPOWER-L@cornell.edu<mailto:MATPOWER-L@cornell.edu>
Subject: Question about shadow price of line flow constraints in AC OPF

Dear all,

I feel confused about the unit of the shadow price of the line flow constraints 
in AC based OPF. Since the square of the apparent power is used when building 
the line flow constraints, the shadow price should be with a unit of 
$/(MVA*MVA). When it is converted to the shadow price $/MVA, MatPower times the 
RateA of that line, but for me, it more makes sense if it is multiplied with 
the apparent power flowing through the line. What is the reason behind 
multiplying that RateA. Thanks!

Kind regards,
Jin




RE: Question about shadow price of line flow constraints in AC OPF

2018-04-11 Thread Sarmad Hanif
Hi Jin,
I couldn’t understand the issue you reported. But according to my knowledge, 
MATPOWER gives you the final price at the node, it doesn’t calculate individual 
congestion, loss, energy components.
Moreover, for ACOPF, MATPOWER gives you and active ($/MW) and reactive power 
($/MVar) marginal prices at respective nodes.
Hope it helps.

From: bounce-122459082-74036...@list.cornell.edu 
[mailto:bounce-122459082-74036...@list.cornell.edu] On Behalf Of Ma Jin
Sent: Wednesday, 11 April, 2018 8:04 AM
To: MATPOWER-L@cornell.edu
Subject: Question about shadow price of line flow constraints in AC OPF

Dear all,

I feel confused about the unit of the shadow price of the line flow constraints 
in AC based OPF. Since the square of the apparent power is used when building 
the line flow constraints, the shadow price should be with a unit of 
$/(MVA*MVA). When it is converted to the shadow price $/MVA, MatPower times the 
RateA of that line, but for me, it more makes sense if it is multiplied with 
the apparent power flowing through the line. What is the reason behind 
multiplying that RateA. Thanks!

Kind regards,
Jin



Re: Question on Storage in MOST UC

2018-02-01 Thread Ray Zimmerman
Currently, I believe the only way to dissipate energy from the storage (as 
opposed to discharging into the grid) is via the LossFactor described in Table 
5-2. This factor can be modified per period using a profile, but it’s defines 
the fraction of the stored energy that is dissipated, as opposed to a specified 
fixed amount, which is what it sounds like you want.

While I haven’t ever tried it, I suppose it should be possible to change the 
network location using a profile to change the GEN_BUS of the generator that 
corresponds to the storage unit. Have you tried that?

If that works, it may even be possible to create a separate island in your 
network, where you connect your EV and a pre-specified demand to represent the 
discharge from driving.

Actually, I just checked the code in apply_changes() 
 
and it looks like to change GEN_BUS with a profile you’ll need to modify lines 
150-151 to add GEN_BUS to the list of valid columns.

This seems like a creative use of MOST. I’d love to hear how it works out.

Ray


> On Feb 1, 2018, at 9:45 AM, Mark Jenkins  wrote:
> 
> Hello,
> 
> I am looking to model a more ‘portable’ storage unit (like an EV) in MOSTs UC 
> (stochastic). I am using the ‘commitKey’ to simulate that the storage is 
> disconnected, or at least not available during that time period. During this 
> time period, I would like to reduce the SoC of the storage by a determined 
> amount (without it being dissipated onto the network). Is there a way in the 
> time varying  ‘profiles’ to change the SoC of the battery (maybe this can be 
> done elsewhere)?
> 
> Also, can you suggest a way in which I can change the location of the battery 
> during the UC simulation?
> 
> Any advice you offer me on this would be greatly appreciated!
> 
> Many thanks,
> 
> Mark Jenkins
> University of Strathclyde.



Question on Storage in MOST UC

2018-02-01 Thread Mark Jenkins
Hello,

I am looking to model a more ‘portable’ storage unit (like an EV) in MOSTs UC 
(stochastic). I am using the ‘commitKey’ to simulate that the storage is 
disconnected, or at least not available during that time period. During this 
time period, I would like to reduce the SoC of the storage by a determined 
amount (without it being dissipated onto the network). Is there a way in the 
time varying  ‘profiles’ to change the SoC of the battery (maybe this can be 
done elsewhere)?

Also, can you suggest a way in which I can change the location of the battery 
during the UC simulation?

Any advice you offer me on this would be greatly appreciated!

Many thanks,

Mark Jenkins
University of Strathclyde.


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<http://www.mcs.anl.gov/~abhyshr>
From: <bounce-122200120-73493...@list.cornell.edu> on behalf of 
"neuqxhlin...@163.com" <neuqxhlin...@163.com>
Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
Date: Wednesday, January 17, 2018 at 4:46 AM
To: "matpowe...@list.cornell.edu" <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<mailto: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<http://www.pserc.cornell.edu/matpower/mailinglists.html#discusslist>, 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<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf>. If 
you need general non-linear costs, you will need to use the latest development 
version of MATPOWER on GitHub<https://github.com/MATPOWER/matpower/>  You can 
find the corresponding version of the manual 
here<https://www.dropbox.com/s/3qkji1cuyi075uj/MATPOWER-manual.pdf?dl=0>  
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, 
<neuqxhlin...@163.com<mailto:neuqxhlin...@163.com>> 
<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




The question about extend OPF and the optimization tool

2018-01-17 Thread neuqxhlinwei
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 <mailto:neuqxhlin...@163.com> 
主题: Re: The question about extend OPF and the optimization tool

 

(FYI, in the future, please address such questions to the  
<http://www.pserc.cornell.edu/matpower/mailinglists.html#discusslist> 
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 
<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> ’s Manual. 
If you need general non-linear costs, you will need to use the latest 
development version of MATPOWER on GitHub 
<https://github.com/MATPOWER/matpower/>   You can find the corresponding 
version of the manual here 
<https://www.dropbox.com/s/3qkji1cuyi075uj/MATPOWER-manual.pdf?dl=0>   
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, <neuqxhlin...@163.com 
<mailto:neuqxhlin...@163.com> > <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

 



转发: The question about extend OPF and the optimization tool

2018-01-11 Thread neuqxhlinwei
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  
<http://www.pserc.cornell.edu/matpower/mailinglists.html#discusslist> 
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 
<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> . If you 
need general non-linear costs, you will need to use the latest development 
version of MATPOWER on GitHub <https://github.com/MATPOWER/matpower/>   You can 
find the corresponding version of the manual here 
<https://www.dropbox.com/s/3qkji1cuyi075uj/MATPOWER-manual.pdf?dl=0>   
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, <neuqxhlin...@163.com 
<mailto:neuqxhlin...@163.com> > <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<http://www.mcs.anl.gov/~abhyshr>
From: <bounce-122159463-73493...@list.cornell.edu> on behalf of Young-Hwan Lee 
<le...@umbc.edu>
Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
Date: Thursday, December 28, 2017 at 10:13 AM
To: "MATPOWER-L@cornell.edu" <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



Question about the continuation power flow

2017-12-28 Thread Young-Hwan Lee
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: A question about the CPF program of matpower 6.0.

2017-08-17 Thread Ray Zimmerman
The targetcasedata is simply the basecasedata with a different load / 
generation pattern. As the continuation parameter lambda is varied from 0 to 1, 
the system load/generations vary from those of basecasedata to those of 
targetcasedata. See the example at the end of the CPF chapter in the manual 
where the target case is simply the base case with generation and load 
increased by a factor of 2.5.

 Ray


> On Aug 17, 2017, at 8:30 AM, hushuai1...@foxmail.com wrote:
> 
> I want to ask a question about the CPF program of matpower 6.0.
> <Catch(08-17-20-30-05).jpg>
> As show in picture above, 
> my doubt :
>  What is different between basecasedata and tragetcasedata? 
>  What is the meaning of tragetcasedata?
> I still cannot understand after i read the examle in manual, thanks for give 
> me some pointing.
> Have a nice day!



Re: question about mpc case model

2017-07-12 Thread Xian Guo
Hi Gang,


Thanks for your reply. I tried that, and it can work quite well.



Thanks again.

2017-07-12 11:42 GMT-04:00 Gang Huang <gondorhu...@gmail.com>:

> Hi Xian,
>
> For both of your questions, yes!
>
> To model multiple generators connected to the same bus, just create a new
> row in "mpc.gen" (note: please do not forget the corresponding row in
> "mpc.gencost") and fill it with the data of a new generator. To model
> multiple loads, you can add them up to the corresponding bus in "mpc.bus".
> For your second question, please keep in mind that a slack bus could have
> both generators and loads.
>
> Best regards,
>
> Gang
>
> On Wed, Jul 12, 2017 at 7:10 PM, Xian Guo <guoxian2...@gmail.com> wrote:
>
>> Hi,
>>
>> I have a quick question about the mpc case modelling file.
>>
>> Could I have multiple generators and loads connecting  to the same bus?
>> If so, how to model this in "mpc.bus", "mpc.gen", "mpc,gencost" matrix?
>> Also, for the slack bus, if I have both generators and load connected to
>> that, should the bus type still be "3"?
>>
>>
>>
>> Thanks a lot.  Really appreciate your help.
>>
>> --
>> —
>> Thanks & Regards
>> Xian Guo
>> Iowa State University
>> Research Assistant in Electric Power and Energy System
>> ECpE
>> 1207 Coover Hall
>>
>
>


-- 
—
Thanks & Regards
Xian Guo
Iowa State University
Research Assistant in Electric Power and Energy System
ECpE
1207 Coover Hall


Re: question about mpc case model

2017-07-12 Thread Gang Huang
Hi Xian,

For both of your questions, yes!

To model multiple generators connected to the same bus, just create a new
row in "mpc.gen" (note: please do not forget the corresponding row in
"mpc.gencost") and fill it with the data of a new generator. To model
multiple loads, you can add them up to the corresponding bus in "mpc.bus".
For your second question, please keep in mind that a slack bus could have
both generators and loads.

Best regards,

Gang

On Wed, Jul 12, 2017 at 7:10 PM, Xian Guo <guoxian2...@gmail.com> wrote:

> Hi,
>
> I have a quick question about the mpc case modelling file.
>
> Could I have multiple generators and loads connecting  to the same bus?
> If so, how to model this in "mpc.bus", "mpc.gen", "mpc,gencost" matrix?
> Also, for the slack bus, if I have both generators and load connected to
> that, should the bus type still be "3"?
>
>
>
> Thanks a lot.  Really appreciate your help.
>
> --
> —
> Thanks & Regards
> Xian Guo
> Iowa State University
> Research Assistant in Electric Power and Energy System
> ECpE
> 1207 Coover Hall
>


question about mpc case model

2017-07-12 Thread Xian Guo
Hi,

I have a quick question about the mpc case modelling file.

Could I have multiple generators and loads connecting  to the same bus?  If
so, how to model this in "mpc.bus", "mpc.gen", "mpc,gencost" matrix?  Also,
for the slack bus, if I have both generators and load connected to that,
should the bus type still be "3"?



Thanks a lot.  Really appreciate your help.

-- 
—
Thanks & Regards
Xian Guo
Iowa State University
Research Assistant in Electric Power and Energy System
ECpE
1207 Coover Hall


Re: question about co-simulation

2017-05-30 Thread Ray Zimmerman
What I would recommend is making a slight modification to newtonpf.m 
, 
where you insert at line 102 a call to a function defined by you, to which you 
pass the complex bus voltage vector V and anything else you need (e.g. Ybus, 
Sbus, etc.).  Inside that function you do whatever you need to to interface 
with OpenDSS.

Ray


> On May 29, 2017, at 11:31 PM, Jose Hector Vivas Navas  wrote:
> 
> Dear users, 
> 
> I have interest in perform a transmission (Matpower) - distribution (OpenDSS) 
> load flow by means of co-simulation. Is there anybody who knows how can I 
> access to each iteration of Matpower?
> 
> Thanks in advance.
> 
> Jose Vivas
> 
> École de Technologie Supérieure
> Montréal, Canada



question about co-simulation

2017-05-29 Thread Jose Hector Vivas Navas
Dear users,

I have interest in perform a transmission (Matpower) - distribution
(OpenDSS) load flow by means of co-simulation. Is there anybody who knows
how can I access to each iteration of Matpower?

Thanks in advance.

Jose Vivas

École de Technologie Supérieure
Montréal, Canada


Re: question ask about calculate UC problem in matpower

2017-04-26 Thread Ray Zimmerman
Dear Stephanie,

Please see the Gurobi documentation for the meaning of the -4 exit code. 
According to the Status Codes on p. 621 of 
http://www.gurobi.com/documentation/7.0/refman.pdf, it looks like it means 
infeasible or unbounded. My guess is that the problem is somehow infeasible. 
There are many possible reasons it could be infeasible, either because the 
problem for an individual hour is infeasible (e.g. insufficient generation to 
meet demand) or the hour-to-hour constraints make it infeasible (e.g. ramp 
rates too small).

I would probably begin by trying to construct the 24 individual single hour 
problems to see if they solve. If so, try relaxing ramp rates.

Also, it seems as though you figured out how to set the load profile, but just 
in case, here’s the response I wrote to the question you sent me off-list the 
other day, in case it’s useful …

You definitely do not need to call getprofiles() 20 times. You simply need to 
define a single profile that modifies all of the loads as desired. The load 
profile defined in ex_load_profile.m is already set to do this ('rows' = 0, 
'col' = CT_LOAD_ALL_PQ). It uses a target quantity ('chgtype' = CT_REP) rather 
than a direct scale factor ('chgtype' = CT_REL). To understand the meaning of 
the various fields in a profile, you need to become familiar, first, with 
apply_changes() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/apply_changes.html> 
which is used to implement profiles, and then with apply_profile() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/apply_profile.html>
 (see also idx_ct 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/idx_ct.html> and 
idx_profile 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/idx_profile.html>).
 More information is available in Section 9.3.5 in the MATPOWER User’s Manual 
<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> and 
Section 5.1.6 in the MOST User’s Manual 
<http://www.pserc.cornell.edu/matpower/docs/MOST-manual-1.0.pdf>.

Hope this helps,

Ray






> On Apr 25, 2017, at 1:22 PM, 陈丽霞 <myvog...@gmail.com> wrote:
> 
> Dear professor:
> 
> I try to use matpower to calculate the Unit Commitment problem of a load 
> profile of 24h in IEEE30 bus. And I refer to the example of 3 buses in 
> most_ex6_uc.m, and change the case file to case30 and write the code in the 
> following way to set the load profile:
> 
> profiles = getprofiles('load_profile');
> 
> profiles.rows=load_index';
> 
> profiles.values(:,1,:)=PLOAD’;
> 
> where load_index is the bus index which loads are in, and PLOAD is the load 
> of each bus at each hour, and I just run the Base:No Network situation. But 
> it turns out that:
> 
> MOST: MIQP solver 'GUROBI' failed with exit flag = -4
> 
> You can query the workspace to debug.
> 
> When finished, type the word "return" to continue.
> 
> I don’t know how this kind of error will appear, has anyone ever met this 
> problem? Is there anything else need to be set? 
> 
> Attached are my codes, I would be most appreciated if you can reply. Thanks 
> in advance.
> 
> 
> 
> Best wishes
> 
> Sincerely, yours
> 
> Stephanie
> 
> <2017.txt><2017.txt>



question ask about calculate UC problem in matpower

2017-04-25 Thread 陈丽霞
Dear professor:

I try to use matpower to calculate the Unit Commitment problem of a load
profile of 24h in IEEE30 bus. And I refer to the example of 3 buses in
most_ex6_uc.m, and change the case file to case30 and write the code in the
following way to set the load profile:

profiles = getprofiles('load_profile');

profiles.rows=load_index';

profiles.values(:,1,:)=PLOAD’;

where load_index is the bus index which loads are in, and PLOAD is the load
of each bus at each hour, and I just run the Base:No Network situation. But
it turns out that:

MOST: MIQP solver 'GUROBI' failed with exit flag = -4

You can query the workspace to debug.

When finished, type the word "return" to continue.

I don’t know how this kind of error will appear, has anyone ever met this
problem? Is there anything else need to be set?

Attached are my codes, I would be most appreciated if you can reply. Thanks
in advance.


Best wishes

Sincerely, yours

Stephanie
03/30/17,100,24165,4370,9663,1599,12005,1189,7727,6483,2396,1046
03/30/17,200,23531,4350,9289,1530,11700,1153,7489,6351,2304,1010
03/30/17,300,23358,4330,9094,1518,11528,1145,7392,6268,2267,1008
03/30/17,400,23526,4332,8978,1503,11614,1140,7492,6219,2252,991
03/30/17,500,24400,4514,8994,1552,11898,1170,7778,6352,2301,1017
03/30/17,600,26661,4859,9182,1644,12509,1249,8573,6759,2425,1104
03/30/17,700,30307,5422,9869,1864,13864,1385,9890,7413,2735,1262
03/30/17,800,31802,5667,10918,1967,14781,1464,10461,7870,2879,1332
03/30/17,900,31672,5635,11405,1986,14745,1493,10349,8018,2857,1242
03/30/17,1000,30932,5687,11584,1985,14747,1505,10199,8168,2873,1257
03/30/17,1100,30508,5604,11719,1992,14654,1527,9920,8290,2896,1221
03/30/17,1200,30066,5526,11884,1982,14576,1536,9778,8285,2917,1200
03/30/17,1300,29562,5451,12020,1953,14395,1518,9587,8231,2934,1227
03/30/17,1400,29396,5433,12010,1960,14301,1514,9535,8189,2955,1182
03/30/17,1500,29511,5353,12053,1924,14233,1529,9433,7971,2954,1184
03/30/17,1600,29583,5277,11890,1893,14014,1494,9406,7832,2927,1181
03/30/17,1700,30102,5266,11540,1885,13958,1466,9588,7771,2896,1245
03/30/17,1800,30789,5361,11318,1871,13840,1454,9780,7728,2870,1250
03/30/17,1900,31239,5418,11316,1864,13897,1460,9991,7668,2852,1281
03/30/17,2000,32283,5629,11310,1865,14170,1489,10491,7754,2838,1315
03/30/17,2100,32184,5778,11584,1927,14361,1515,10623,7946,2941,1409
03/30/17,2200,30872,5545,11417,1871,14450,1457,10168,7698,2854,1344
03/30/17,2300,28674,5143,10992,1738,13350,1356,9428,7259,2668,1250
03/30/17,2400,26711,4811,10364,1621,12537,1282,8717,6877,2458,1117
03/29/17,100,23890,4325,9504,1612,12023,1207,7631,6648,2371,1015
03/29/17,200,23014,4245,9064,1562,11662,1184,7293,6505,2321,1021
03/29/17,300,22635,4216,8898,1532,11488,1170,7140,6487,2275,1004
03/29/17,400,22593,4189,8713,1533,11567,1162,7109,6457,2264,1000
03/29/17,500,23293,4311,8727,1568,11864,1189,7264,6617,2317,1051
03/29/17,600,25264,4595,9054,1698,12509,1271,7933,6997,2477,1108
03/29/17,700,28667,5129,9788,1894,13772,1400,9075,7628,2753,1314
03/29/17,800,30366,5406,10766,2034,14474,1466,9538,7937,2925,1363
03/29/17,900,30267,5388,11189,2053,14503,1498,9513,8066,2950,1284
03/29/17,1000,29697,5384,11264,2079,14501,1505,9418,8014,2950,1249
03/29/17,1100,29073,5350,11228,2065,14443,1499,9397,7927,2989,1235
03/29/17,1200,28385,5201,11160,2025,14282,1493,9329,7780,2953,1224
03/29/17,1300,27867,5173,11167,1991,14153,1497,9341,7693,2916,1202
03/29/17,1400,27650,5150,11158,1965,14056,1490,9360,7647,2890,1203
03/29/17,1500,27317,4990,11201,1917,13846,1472,9390,7513,2845,1186
03/29/17,1600,27236,4917,11225,1874,13689,1472,9405,7360,2810,1154
03/29/17,1700,27540,4903,11140,1844,13590,1459,9462,7345,2761,1211
03/29/17,1800,27963,4927,11136,1840,13503,1439,9536,7313,2755,1235
03/29/17,1900,28392,4990,11193,1821,13539,1411,9569,7257,2762,1253
03/29/17,2000,29726,5085,11254,1826,13718,1411,9870,7449,2760,1292
03/29/17,2100,30557,5428,11340,1926,14461,1462,10194,7813,2928,1370
03/29/17,2200,29477,5187,11138,1875,14160,1421,9682,7618,2865,1367
03/29/17,2300,27349,4895,10826,1773,13288,1321,8932,7126,2692,1216
03/29/17,2400,25534,4598,10249,1660,12637,1239,8148,6726,2517,1125
03/28/17,100,23498,4240,9293,1547,11637,1156,7675,6263,2346,1044
03/28/17,200,22652,4095,8859,1497,11449,1136,7301,6090,2237,999
03/28/17,300,22285,4027,8595,1453,11153,1108,7120,5987,2202,966
03/28/17,400,22150,4057,8514,1451,11150,1104,7067,5946,2186,945
03/28/17,500,22741,4219,8518,1476,11404,1125,7272,6070,2226,996
03/28/17,600,24683,4525,8835,1582,12067,1198,7906,6410,2377,1070
03/28/17,700,28106,5003,9543,1768,13346,1328,9020,7093,2658,1271
03/28/17,800,29909,5231,10544,1923,14166,1416,9607,7655,2816,1289
03/28/17,900,30251,5246,10926,1938,14231,1469,9678,7852,2858,1258
03/28/17,1000,30542,5287,11187,1948,14325,1487,9703,7966,2908,1217
03/28/17,1100,30797,5372,11276,1974,14342,1514,9780,8046,2957,1226
03/28/17,1200,30701,5334,11292,1976,14351,1531,9811,8076,2963,1256
03/28/17,1300,30558,5298,11235,1961,14272,1533,9831,8012,2961,1242

Re: MOST Question regarding Quadratic Gen Costs

2017-04-12 Thread Akash Tyagi
Hello everyone,
I am working on the continuation power flow technique.
I have used the given 30 bus data for the continuation power flow and i
have increased all the loads by a factor of 5, which results in the
decreased in the voltage magnitude and the lowest voltage is found to be at
bus 8.
Now after this i want to place Static Var Compensator at bus 8 i.e. i want
to increase the reactive power generation at bus 8 by placing the SVC to
improve the voltage magnitudes, and making the status of the generatoe ON.
I have tried the following code, but it is not giving results,

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);

Below i have attached the following case for which i am doing all this..




On Mon, Apr 10, 2017 at 9:47 PM, Ray Zimmerman  wrote:

> This is a solver issue. See footnote 5 on page 10 of the MOST User’s
> Manual .
> For MIQP problems, that is, unit commitment problems with quadratic
> generator costs and/or ramping wear and tear costs, you will need Gurobi,
> CPLEX or MOSEK. I recommend Gurobi.
>
> Ray
>
>
> On Apr 3, 2017, at 3:52 PM, Stephen Suffian 
> wrote:
>
> Hello all,
>
> I have been able to succesfully run MOST for several days, but I recently
> came across a problem when attempting to load cost data into mpc.gencost. I
> My original gencost was below:
>
> mpc.gencost = [
> 20022000;
> 20023000;
> 20025000;
> 200210000;
> ];
>
> When I changed it to quadratic, it works as long as the first term is 0.
>
> mpc.gencost = [
> 2003   02000;
> 2003   03000;
> 2003   05000;
> 2003   010000;
> ];
>
> However, when I change the first term to a non-zero value:
>
> mpc.gencost = [
> 2003   0.0042000;
> 2003   03000;
> 2003   05000;
> 2003   010000;
> ];
>
> I get the following error.
>
> error: mpopt2qpopt: Sorry, no solver available for MIQP models
> error: called from
> mpopt2qpopt at line 92 column 13
> most at line 2065 column 14
> test at line 41 column 5
>
> I am using the glpk solver. Does anyone know if this is a solver issue, a
> human error (on my part) issue, or otherwise?
>
> Thanks!
> Stephen Suffian
>
>
>


case30aaa.m
Description: Binary data


Re: MOST Question regarding Quadratic Gen Costs

2017-04-10 Thread Ray Zimmerman
This is a solver issue. See footnote 5 on page 10 of the MOST User’s Manual 
. For MIQP 
problems, that is, unit commitment problems with quadratic generator costs 
and/or ramping wear and tear costs, you will need Gurobi, CPLEX or MOSEK. I 
recommend Gurobi.

Ray


> On Apr 3, 2017, at 3:52 PM, Stephen Suffian  wrote:
> 
> Hello all,
> 
> I have been able to succesfully run MOST for several days, but I recently
> came across a problem when attempting to load cost data into mpc.gencost. I
> My original gencost was below:
> 
> mpc.gencost = [
> 20022000;
> 20023000;
> 20025000;
> 200210000;
> ];
> 
> When I changed it to quadratic, it works as long as the first term is 0.
> 
> mpc.gencost = [
> 2003   02000;
> 2003   03000;
> 2003   05000;
> 2003   010000;
> ];
> 
> However, when I change the first term to a non-zero value:
> 
> mpc.gencost = [
> 2003   0.0042000;
> 2003   03000;
> 2003   05000;
> 2003   010000;
> ];
> 
> I get the following error.
> 
> error: mpopt2qpopt: Sorry, no solver available for MIQP models
> error: called from
> mpopt2qpopt at line 92 column 13
> most at line 2065 column 14
> test at line 41 column 5
> 
> I am using the glpk solver. Does anyone know if this is a solver issue, a
> human error (on my part) issue, or otherwise?
> 
> Thanks!
> Stephen Suffian



MOST Question regarding Quadratic Gen Costs

2017-04-03 Thread Stephen Suffian
Hello all,

I have been able to succesfully run MOST for several days, but I recently
came across a problem when attempting to load cost data into mpc.gencost. I
My original gencost was below:

mpc.gencost = [
20022000;
20023000;
20025000;
200210000;
];

When I changed it to quadratic, it works as long as the first term is 0.

mpc.gencost = [
2003   02000;
2003   03000;
2003   05000;
2003   010000;
];

However, when I change the first term to a non-zero value:

mpc.gencost = [
2003   0.0042000;
2003   03000;
2003   05000;
2003   010000;
];

I get the following error.

error: mpopt2qpopt: Sorry, no solver available for MIQP models
error: called from
mpopt2qpopt at line 92 column 13
most at line 2065 column 14
test at line 41 column 5

I am using the glpk solver. Does anyone know if this is a solver issue, a
human error (on my part) issue, or otherwise?

Thanks!
Stephen Suffian


Re: Question about the Unit of the Jacobian Matrix

2017-03-23 Thread Ray Zimmerman
Everything is in p.u. except voltage angles which are in radians. So, (c) and 
(d). I’ll add a note to clarify this in the help text for the function.

   Ray


> On Mar 21, 2017, at 5:32 PM, Steven Geng <steven.geng.2...@gmail.com> wrote:
> 
> Dear Matpower Users/Developers,
> I have a question about the Jacobian Matrix that makeJac() returns, could you 
> please help me with it? Thanks a lot!
> 
> The question is about the unit of the Jacobian matrix. For example, for the  
> part, is it (a)  MW / p.u.; or (b) MW / Volt; or (c) p.u. / p.u.; or (d) p.u. 
> / Volt?
> 
> Similarly, for the  part, is it (a)  MVar / degree; or (b) MVar / rad; or (c) 
> p.u. / degree; or (d) p.u. / rad?
> 
> Thanks for your time and apologize if this is a naive question.
> 
> Best,
> Steven



Re: Question about how to set load-profile in dynamic optimal power fow

2017-03-21 Thread Akash Tyagi
Hello sir,
I just want to ask you a silly question..
I tried a lot, but i m not able to understand, hoe the savecase function
work.?
Can you please explain with an appropriate exapmle.?

On Tue, Mar 21, 2017 at 9:29 PM, Ray Zimmerman <r...@cornell.edu> wrote:

> At the moment, there is only the MATPOWER
> <http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> and MOST
> User’s Manuals
> <http://www.pserc.cornell.edu/matpower/docs/MOST-manual-1.0.pdf>, the
> built-in help for each function (also available in the Online Function
> Reference <http://www.pserc.cornell.edu/matpower/docs/ref/>), and finally
> the code itself, especially the examples and tests.
>
> I realize this is sometimes still inadequate, and I welcome contributions
> from others to improve the documentation.
>
> Were you able to get your load profile working as you expect? Section
> 5.1.6 in the MOST User’s Manual should have the details, but you’ll also
> need to be familiar with MATPOWER's apply_changes()
> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/apply_changes.html>
>  function, described in Section 9.3.5 of the MATPOWER User’s Manual.
>
> Feel free to continue to ask specific questions here. And once you
> understand how it works, if you have suggestions for changes to the
> documentation that would help point others in the right direction, that’d
> be appreciated.
>
> Ray
>
>
>
> On Mar 21, 2017, at 7:48 AM, Akash Tyagi <akashtyagi0...@gmail.com> wrote:
>
> Hello sir,
> Is there any other reference book of MATPOWER, in which the detailed
> information is given...?
> Thanks.
>
> On Mon, Mar 20, 2017 at 9:00 PM, Ray Zimmerman <r...@cornell.edu> wrote:
>
>> Sorry, that was supposed to be …
>>
>> loadprofile.values(:, 1, :) = [
>> 100120   110;
>> 120140   125;
>> 150150   135;
>> 140155   130;
>> …
>> ]
>>
>> On Mar 17, 2017, at 8:45 PM, 田其生 <921542...@qq.com> wrote:
>>
>> Dear Ray
>>   thanks for your help. I may know the direction about how to set the
>> load profiles.yet,there may be something wrong in the example which provied
>> in the e-mail. In the example,the dimension of  loadprofile.values(:, 1,
>> 1)(it is 1) doesn't match the dimension of load-martrix(it is 2). when I
>> change the loadprofile.values(:, 1, 1) to loadprofile.values(:, :, 1) or 
>> loadprofile.values(:,
>> :, 1 ,1),although the dimension matched,the MOST alos will give me
>> an eeror(loadmd: scenarios dimension of profiles(1).values (2) must be 1
>> or nj_max = 1).
>>   Is there anything I forget to set?
>>   the attachment is the program which i rewrited.
>>
>>   thanks
>>   Tian
>>   March 18, 2017
>>
>>
>> -- 原始邮件 --
>> *发件人:* "Ray Zimmerman";<r...@cornell.edu>;
>> *发送时间:* 2017年3月17日(星期五) 晚上11:05
>> *收件人:* "MATPOWER Discussion List"<matpower-l@cornell.edu>;
>> *主题:* Re: Question about how to set load-profile in dynamic optimal
>> power fow
>>
>> The example in most_ex5_mpopf()
>> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/most_ex5_mpopf.html>
>>  uses
>> the load profile from ex_load_profile()
>> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/ex_load_profile.html>
>>  which
>> scales all loads at the same time (since rows is set to 0). If you want
>> to scale loads individually, you need to set rows to a vector of bus
>> indices and add columns for each to the values field. For example, a
>> load profile with something like the following, would scale loads at buses
>> 1, 3 and 5 according to the values in the 3 columns of the values field
>> ...
>>
>> loadprofile = struct( ...
>> 'type', 'mpcData', ...
>> 'table', CT_TLOAD, ...
>> 'rows', [1 3 5], ...
>> 'col', CT_LOAD_ALL_PQ, ...
>> 'chgtype', CT_REP, ...
>> 'values', [] );
>> loadprofile.values(:, 1, 1) = [
>> 100120   110;
>> 120140   125;
>> 150150   135;
>> 140155   130;
>> ...
>> ]
>>
>> You can also scale the load by areas, as opposed to by individual load,
>> by setting table to 'CT TAREALOAD’.
>>
>> Hope this helps,
>>
>> Ray
>>
>>
>> On Mar 14, 2017, at 9:57 PM, 田其生 <921542...@qq.com> wrote:
>>
>> Dear all
>>  I need help about dealing with the dynamic optimal power flow
>> through most. if  there are not only one bus load which are varying with
>> time,how to set the  load-profile (for example in ex_load_profile).It will
>> be much better and clearer,if i get a simple example.
>>
>>  thanks
>>
>>  Qisheng Tian
>>
>>  March 15, 2017
>>
>>
>> 
>>
>>
>>
>
>


Re: Question about how to set load-profile in dynamic optimal power fow

2017-03-21 Thread Ray Zimmerman
At the moment, there is only the MATPOWER 
<http://www.pserc.cornell.edu/matpower/docs/MATPOWER-manual-6.0.pdf> and MOST 
User’s Manuals 
<http://www.pserc.cornell.edu/matpower/docs/MOST-manual-1.0.pdf>, the built-in 
help for each function (also available in the Online Function Reference 
<http://www.pserc.cornell.edu/matpower/docs/ref/>), and finally the code 
itself, especially the examples and tests.

I realize this is sometimes still inadequate, and I welcome contributions from 
others to improve the documentation.

Were you able to get your load profile working as you expect? Section 5.1.6 in 
the MOST User’s Manual should have the details, but you’ll also need to be 
familiar with MATPOWER's apply_changes() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/apply_changes.html> 
function, described in Section 9.3.5 of the MATPOWER User’s Manual.

Feel free to continue to ask specific questions here. And once you understand 
how it works, if you have suggestions for changes to the documentation that 
would help point others in the right direction, that’d be appreciated.

Ray



> On Mar 21, 2017, at 7:48 AM, Akash Tyagi <akashtyagi0...@gmail.com> wrote:
> 
> Hello sir,
> Is there any other reference book of MATPOWER, in which the detailed 
> information is given...?
> Thanks.
> 
> On Mon, Mar 20, 2017 at 9:00 PM, Ray Zimmerman <r...@cornell.edu 
> <mailto:r...@cornell.edu>> wrote:
> Sorry, that was supposed to be …
> 
> loadprofile.values(:, 1, :) = [
> 100120   110;
> 120140   125;
> 150150   135;
> 140155   130;
> …
> ]
> 
>> On Mar 17, 2017, at 8:45 PM, 田其生 <921542...@qq.com 
>> <mailto:921542...@qq.com>> wrote:
>> 
>> Dear Ray
>>   thanks for your help. I may know the direction about how to set the 
>> load profiles.yet,there may be something wrong in the example which provied 
>> in the e-mail. In the example,the dimension of  loadprofile.values(:, 1, 
>> 1)(it is 1) doesn't match the dimension of load-martrix(it is 2). when I 
>> change the loadprofile.values(:, 1, 1) to loadprofile.values(:, :, 1) or 
>> loadprofile.values(:, :, 1 ,1),although the dimension matched,the MOST alos 
>> will give me an eeror(loadmd: scenarios dimension of profiles(1).values (2) 
>> must be 1 or nj_max = 1).
>>   Is there anything I forget to set?
>>   the attachment is the program which i rewrited. 
>> 
>>   thanks 
>>   Tian
>>   March 18, 2017
>>   
>> 
>> -- 原始邮件 --
>> 发件人: "Ray Zimmerman";<r...@cornell.edu <mailto:r...@cornell.edu>>;
>> 发送时间: 2017年3月17日(星期五) 晚上11:05
>> 收件人: "MATPOWER Discussion List"<matpower-l@cornell.edu 
>> <mailto:matpower-l@cornell.edu>>;
>> 主题: Re: Question about how to set load-profile in dynamic optimal power fow
>> 
>> The example in most_ex5_mpopf() 
>> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/most_ex5_mpopf.html>
>>  uses the load profile from ex_load_profile() 
>> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/ex_load_profile.html>
>>  which scales all loads at the same time (since rows is set to 0). If you 
>> want to scale loads individually, you need to set rows to a vector of bus 
>> indices and add columns for each to the values field. For example, a load 
>> profile with something like the following, would scale loads at buses 1, 3 
>> and 5 according to the values in the 3 columns of the values field ...
>> 
>> loadprofile = struct( ...
>> 'type', 'mpcData', ...
>> 'table', CT_TLOAD, ...
>> 'rows', [1 3 5], ...
>> 'col', CT_LOAD_ALL_PQ, ...
>> 'chgtype', CT_REP, ...
>> 'values', [] );
>> loadprofile.values(:, 1, 1) = [
>> 100120   110;
>> 120140   125;
>> 150150   135;
>> 140155   130;
>> ...
>> ]
>> 
>> You can also scale the load by areas, as opposed to by individual load, by 
>> setting table to 'CT TAREALOAD’.
>> 
>> Hope this helps,
>> 
>> Ray
>> 
>> 
>>> On Mar 14, 2017, at 9:57 PM, 田其生 <921542...@qq.com 
>>> <mailto:921542...@qq.com>> wrote:
>>> 
>>> Dear all
>>>  I need help about dealing with the dynamic optimal power flow through 
>>> most. if  there are not only one bus load which are varying with time,how 
>>> to set the  load-profile (for example in ex_load_profile).It will be much 
>>> better and clearer,if i get a simple example.
>>> 
>>>  thanks
>>>  
>>>  Qisheng Tian
>>> 
>>>  March 15, 2017
>> 
>> 
> 
> 



Re: Question about how to set load-profile in dynamic optimal power fow

2017-03-21 Thread Akash Tyagi
Hello sir,
Is there any other reference book of MATPOWER, in which the detailed
information is given...?
Thanks.

On Mon, Mar 20, 2017 at 9:00 PM, Ray Zimmerman <r...@cornell.edu> wrote:

> Sorry, that was supposed to be …
>
> loadprofile.values(:, 1, :) = [
> 100120   110;
> 120140   125;
> 150150   135;
> 140155   130;
> …
> ]
>
> On Mar 17, 2017, at 8:45 PM, 田其生 <921542...@qq.com> wrote:
>
> Dear Ray
>   thanks for your help. I may know the direction about how to set the
> load profiles.yet,there may be something wrong in the example which provied
> in the e-mail. In the example,the dimension of  loadprofile.values(:, 1,
> 1)(it is 1) doesn't match the dimension of load-martrix(it is 2). when I
> change the loadprofile.values(:, 1, 1) to loadprofile.values(:, :, 1) or 
> loadprofile.values(:,
> :, 1 ,1),although the dimension matched,the MOST alos will give me
> an eeror(loadmd: scenarios dimension of profiles(1).values (2) must be 1
> or nj_max = 1).
>   Is there anything I forget to set?
>   the attachment is the program which i rewrited.
>
>   thanks
>   Tian
>   March 18, 2017
>
>
> -- 原始邮件 --
> *发件人:* "Ray Zimmerman";<r...@cornell.edu>;
> *发送时间:* 2017年3月17日(星期五) 晚上11:05
> *收件人:* "MATPOWER Discussion List"<matpower-l@cornell.edu>;
> *主题:* Re: Question about how to set load-profile in dynamic optimal power
> fow
>
> The example in most_ex5_mpopf()
> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/most_ex5_mpopf.html>
>  uses
> the load profile from ex_load_profile()
> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/ex_load_profile.html>
>  which
> scales all loads at the same time (since rows is set to 0). If you want
> to scale loads individually, you need to set rows to a vector of bus
> indices and add columns for each to the values field. For example, a load
> profile with something like the following, would scale loads at buses 1, 3
> and 5 according to the values in the 3 columns of the values field ...
>
> loadprofile = struct( ...
> 'type', 'mpcData', ...
> 'table', CT_TLOAD, ...
> 'rows', [1 3 5], ...
> 'col', CT_LOAD_ALL_PQ, ...
> 'chgtype', CT_REP, ...
> 'values', [] );
> loadprofile.values(:, 1, 1) = [
> 100120   110;
> 120140   125;
> 150150   135;
> 140155   130;
> ...
> ]
>
> You can also scale the load by areas, as opposed to by individual load, by
> setting table to 'CT TAREALOAD’.
>
> Hope this helps,
>
> Ray
>
>
> On Mar 14, 2017, at 9:57 PM, 田其生 <921542...@qq.com> wrote:
>
> Dear all
>  I need help about dealing with the dynamic optimal power flow through
> most. if  there are not only one bus load which are varying with time,how
> to set the  load-profile (for example in ex_load_profile).It will be much
> better and clearer,if i get a simple example.
>
>  thanks
>
>  Qisheng Tian
>
>  March 15, 2017
>
>
> 
>
>
>


Re: Question about how to set load-profile in dynamic optimal power fow

2017-03-20 Thread Ray Zimmerman
Sorry, that was supposed to be …

loadprofile.values(:, 1, :) = [
100120   110;
120140   125;
150150   135;
140155   130;
…
]

> On Mar 17, 2017, at 8:45 PM, 田其生 <921542...@qq.com> wrote:
> 
> Dear Ray
>   thanks for your help. I may know the direction about how to set the 
> load profiles.yet,there may be something wrong in the example which provied 
> in the e-mail. In the example,the dimension of  loadprofile.values(:, 1, 
> 1)(it is 1) doesn't match the dimension of load-martrix(it is 2). when I 
> change the loadprofile.values(:, 1, 1) to loadprofile.values(:, :, 1) or 
> loadprofile.values(:, :, 1 ,1),although the dimension matched,the MOST alos 
> will give me an eeror(loadmd: scenarios dimension of profiles(1).values (2) 
> must be 1 or nj_max = 1).
>   Is there anything I forget to set?
>   the attachment is the program which i rewrited. 
> 
>   thanks 
>   Tian
>   March 18, 2017
>   
> 
> -- 原始邮件 --
> 发件人: "Ray Zimmerman";<r...@cornell.edu>;
> 发送时间: 2017年3月17日(星期五) 晚上11:05
> 收件人: "MATPOWER Discussion List"<matpower-l@cornell.edu>;
> 主题: Re: Question about how to set load-profile in dynamic optimal power fow
> 
> The example in most_ex5_mpopf() 
> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/most_ex5_mpopf.html>
>  uses the load profile from ex_load_profile() 
> <http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0/most/t/ex_load_profile.html>
>  which scales all loads at the same time (since rows is set to 0). If you 
> want to scale loads individually, you need to set rows to a vector of bus 
> indices and add columns for each to the values field. For example, a load 
> profile with something like the following, would scale loads at buses 1, 3 
> and 5 according to the values in the 3 columns of the values field ...
> 
> loadprofile = struct( ...
> 'type', 'mpcData', ...
> 'table', CT_TLOAD, ...
> 'rows', [1 3 5], ...
> 'col', CT_LOAD_ALL_PQ, ...
> 'chgtype', CT_REP, ...
> 'values', [] );
> loadprofile.values(:, 1, 1) = [
> 100120   110;
> 120140   125;
> 150150   135;
> 140155   130;
> ...
> ]
> 
> You can also scale the load by areas, as opposed to by individual load, by 
> setting table to 'CT TAREALOAD’.
> 
> Hope this helps,
> 
> Ray
> 
> 
>> On Mar 14, 2017, at 9:57 PM, 田其生 <921542...@qq.com 
>> <mailto:921542...@qq.com>> wrote:
>> 
>> Dear all
>>  I need help about dealing with the dynamic optimal power flow through 
>> most. if  there are not only one bus load which are varying with time,how to 
>> set the  load-profile (for example in ex_load_profile).It will be much 
>> better and clearer,if i get a simple example.
>> 
>>  thanks
>>  
>>  Qisheng Tian
>> 
>>  March 15, 2017
> 
> 



Question about how to set load-profile in dynamic optimal power fow

2017-03-14 Thread ??????
Dear all I need help about dealing with the dynamic optimal power flow 
through most. if  there are not only one bus load which are varying with 
time,how to set the  load-profile (for example in ex_load_profile).It will be 
much better and clearer,if i get a simple example.


 thanks
 
 Qisheng Tian


 March 15, 2017


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,<bus#>);

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

Shri

From: Aaqib Peerzada <peerz...@tamu.edu<mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Sunday, March 5, 2017 at 1:37 PM
To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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. 
<abhy...@anl.gov<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 <peerz...@tamu.edu<mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Friday, March 3, 2017 at 9:10 PM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
<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 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 Aaqib Peerzada
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. <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 <peerz...@tamu.edu>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Friday, March 3, 2017 at 9:10 PM
> To: "matpower-l@cornell.edu" <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 University*
*College Station, Texas*
*United States.*
*Phone # 979-739-2799*
*Email: peerz...@tamu.edu <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 <peerz...@tamu.edu<mailto:peerz...@tamu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Friday, March 3, 2017 at 9:10 PM
To: "matpower-l@cornell.edu<mailto:matpower-l@cornell.edu>" 
<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




CPF Question

2017-03-03 Thread Aaqib Peerzada
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: question about psse2mpc

2016-12-13 Thread Ray Zimmerman
All MATPOWER functions contain their own documentation, available by typing, 
for example ‘help ext2int’. Or you can look it up in the MATPOWER Online 
Function Reference <http://www.pserc.cornell.edu/matpower/docs/ref/> listed in 
the documentation section of the MATPOWER home page 
<http://www.pserc.cornell.edu/matpower/>.

Here’s the direct link for ext2int.m: 
http://www.pserc.cornell.edu/matpower/docs/ref/matpower6.0b2/ext2int.html

The differing dimensions has to do with the fact that (from the above docs):

"all isolated buses, off-line generators and branches are removed along with 
any generators or branches connected to isolated buses"

Ray


> On Dec 11, 2016, at 11:02 PM, 郭贤 <guoxian2...@gmail.com> wrote:
> 
> Hi,
> 
> Sorry to bother you. I have a question regarding "psse2mpc".  After taking 
> psse data to mpc format, I use "MPC=ext2int(mpc)". It seems that mpc and MPC 
> have different dimensions, as shown in the Figure. 
> 
>
> 
> I cannot understand why the bus and branch dimensions are different.  Is 
> there any documententation about how MATPOWER do the "ext2int" process?
> 
> 
> 
> Thanks a lot. I really appreciate it. 
> 
> 
> -- 
> —
> Thanks & Regards
> Xian Guo
> 



question about psse2mpc

2016-12-11 Thread 郭贤
Hi,

Sorry to bother you. I have a question regarding "psse2mpc".  After taking
psse data to mpc format, I use "MPC=ext2int(mpc)". It seems that mpc and
MPC have different dimensions, as shown in the Figure.

[image: 内嵌图片 1]   [image: 内嵌图片 2]

I cannot understand why the bus and branch dimensions are different.  Is
there any documententation about how MATPOWER do the "ext2int" process?



Thanks a lot. I really appreciate it.


-- 
—
Thanks & Regards
Xian Guo


Re: Question about warning message

2016-10-25 Thread Tatiana Carolina Cantillo Garcia
Thank you very much,
Tatiana




2016-10-25 9:54 GMT-05:00 Ray Zimmerman :

> Most MIP solvers do not return constraint shadow prices. So in order to
> get those prices, the default is to re-solve the problem with a simple LP
> (or QP) solver with the integer variables fixed at the values returned by
> the MIP solver. Sometimes there is a mismatch in the solution between the
> MILP and the LP, which results in the warning you mention. Normally it can
> be ignored. You can also also make the tolerance larger using the
> 'most.price_stage_warn_tol' option, or turn off the computation of the
> prices completely using 'most.skip_prices’.
>
>Ray
>
>
>
> On Oct 21, 2016, at 5:23 PM, Tatiana Carolina Cantillo Garcia <
> tcanti...@uninorte.edu.co> wrote:
>
> Der Dr Zimmerman and Dr Murillo,
>
> I am working with MOST, and I receive a warning message which says the
> following:
>  "miqps_cplex: max relative mismatch in x from price computation stage =
> 0.24733"
>
> What does it means?
>
> Thank you very much in advance,
> Tatiana Cantillo
>
>
>
>  Enviado con Mailtrack
> 
>
> *Este correo no representa opinión o consentimiento oficial de la
> Universidad del Norte, por lo que esta no adquiere ninguna responsabilidad
> por su contenido, salvo en el caso de funcionarios en ejercicio de
> atribuciones reglamentarias. Puede provenir de una cuenta ofrecida a
> funcionarios o estudiantes, como parte del ejercicio educativo, evento en
> el cual tanto el mensaje como sus anexos son estrictamente confidenciales.
> Ha sido analizado con software antivirus; no obstante, no se garantiza que
> sea seguro o no contenga errores o virus, por lo que la Universidad del
> Norte no se hace responsable de su transmisión.*
>
>
>

-- 
*Este correo no representa opinión o consentimiento oficial de la 
Universidad del Norte, por lo que esta no adquiere ninguna responsabilidad 
por su contenido, salvo en el caso de funcionarios en ejercicio de 
atribuciones reglamentarias. Puede provenir de una cuenta ofrecida a 
funcionarios o estudiantes, como parte del ejercicio educativo, evento en 
el cual tanto el mensaje como sus anexos son estrictamente confidenciales. 
Ha sido analizado con software antivirus; no obstante, no se garantiza que 
sea seguro o no contenga errores o virus, por lo que la Universidad del 
Norte no se hace responsable de su transmisión.*


Re: Question about warning message

2016-10-25 Thread Ray Zimmerman
Most MIP solvers do not return constraint shadow prices. So in order to get 
those prices, the default is to re-solve the problem with a simple LP (or QP) 
solver with the integer variables fixed at the values returned by the MIP 
solver. Sometimes there is a mismatch in the solution between the MILP and the 
LP, which results in the warning you mention. Normally it can be ignored. You 
can also also make the tolerance larger using the 'most.price_stage_warn_tol' 
option, or turn off the computation of the prices completely using 
'most.skip_prices’.

   Ray



> On Oct 21, 2016, at 5:23 PM, Tatiana Carolina Cantillo Garcia 
>  wrote:
> 
> Der Dr Zimmerman and Dr Murillo, 
> 
> I am working with MOST, and I receive a warning message which says the 
> following: 
>  "miqps_cplex: max relative mismatch in x from price computation stage = 
> 0.24733" 
> 
> What does it means? 
> 
> Thank you very much in advance,
> Tatiana Cantillo
> 
> 
> 
>  Enviado con Mailtrack 
> 
> Este correo no representa opinión o consentimiento oficial de la Universidad 
> del Norte, por lo que esta no adquiere ninguna responsabilidad por su 
> contenido, salvo en el caso de funcionarios en ejercicio de atribuciones 
> reglamentarias. Puede provenir de una cuenta ofrecida a funcionarios o 
> estudiantes, como parte del ejercicio educativo, evento en el cual tanto el 
> mensaje como sus anexos son estrictamente confidenciales. Ha sido analizado 
> con software antivirus; no obstante, no se garantiza que sea seguro o no 
> contenga errores o virus, por lo que la Universidad del Norte no se hace 
> responsable de su transmisión.



Question about warning message

2016-10-21 Thread Tatiana Carolina Cantillo Garcia
Der Dr Zimmerman and Dr Murillo,

I am working with MOST, and I receive a warning message which says the
following:
 "miqps_cplex: max relative mismatch in x from price computation stage =
0.24733"

What does it means?

Thank you very much in advance,
Tatiana Cantillo



 Enviado con Mailtrack


-- 
*Este correo no representa opinión o consentimiento oficial de la 
Universidad del Norte, por lo que esta no adquiere ninguna responsabilidad 
por su contenido, salvo en el caso de funcionarios en ejercicio de 
atribuciones reglamentarias. Puede provenir de una cuenta ofrecida a 
funcionarios o estudiantes, como parte del ejercicio educativo, evento en 
el cual tanto el mensaje como sus anexos son estrictamente confidenciales. 
Ha sido analizado con software antivirus; no obstante, no se garantiza que 
sea seguro o no contenga errores o virus, por lo que la Universidad del 
Norte no se hace responsable de su transmisión.*


?????? a question about MOST

2016-10-03 Thread YE lei
Excuse me for interrupting you once again.I have another question.I noticed 
that if I set quadratic term coefficient of generating cost as non-zero number, 
it will shows "Sorry, no solver available for MIQP models". So,In MOST,Does it 
have to be zero? 







--  --
??: "rz10";<r...@cornell.edu>;
: 2016??10??4??(??) 3:01
??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; 

: Re: a question about MOST



If the RAMP_30 column of the gen matrix is set to zero this means that the 
generator cannot change its dispatch from one period to the next, since it has 
zero ramp capability. I think it should work if you set reasonable ramp rates.


Ray





On Oct 3, 2016, at 1:26 PM, YE lei <470411...@qq.com> wrote:

  Thanks a lot, now I try to edit load_profile like follow. After I ran MOST, 
the result was still incorrect??it showed "No feasible solution found"??but in 
this load value I can run the command of "runopf" successfully?? The load bus 
is 4,5,6.


function loadprofile = ex160929_load_profile
[CT_LABEL, CT_PROB, CT_TABLE, CT_TBUS, CT_TGEN, CT_TBRCH, CT_TAREABUS, ...
CT_TAREAGEN, CT_TAREABRCH, CT_ROW, CT_COL, CT_CHGTYPE, CT_REP, ...
CT_REL, CT_ADD, CT_NEWVAL, CT_TLOAD, CT_TAREALOAD,BUS_I...
BUS_TYPE,PD,QD] = idx_ct;
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TBUS, ...
'rows', [4;5;6], ...
'col', PD, ...
'chgtype', CT_REP, ...
'values', [] );
loadprofile.values(:, 1, 1) = [
45;
43;
40;
40;
39;
41;
]-1e-3;
loadprofile.values(:, 1, 2) = [
97;
92;
89;
85;
87;
90;
]-1e-3;
loadprofile.values(:, 1, 3) = [
36;
33;
32;
32;
32;
32;
]-1e-3;
 
  Did I modify load_profile right? I do not know what goes wrong...orz





--  --
??: "Ray Zimmerman";<r...@cornell.edu>;
: 2016??10??4??(??) 1:04
??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; 

: Re: a question about MOST



The 3rd dimension of loadprofile.values is only 3, corresponding to the length 
of loadprofile.rows. So when you assign the data it should be to 
loadprofile.values(:, 1, 1), loadprofile.values(:, 1, 2), and 
loadprofile.values(:, 1, 3), not indexes 4, 5 and 6.


   Ray



On Sep 29, 2016, at 1:21 PM, YE lei <470411...@qq.com> wrote:

Recently, I was learning MOST in the MATPOWER, and I got a question.
When I wanted to do an experiment, I found that I do not know how to modify the 
load value of each load bus in each period. The example only have one load bus 
in MOST manual. If I have 3 load bus("case6ww.m" file on the root directory of 
MATPOWER) and load value series as fig-1, how to edit "ex_load_profile.m" 
file(D:\MatLab\toolbox\matpower6.0b1\most\t) ?


<2C09F7FC@A2D49B31.824DED57> fig-1
I edited ex_load_profile.m like fig-2, and it can not run correctly.
<2E02FAFC@A2D49B31.824DED57> fig-2


Could you help me to edit ex_load_profile.m correctly??


?????? a question about MOST

2016-10-03 Thread YE lei
Ah,yes,I forgot! Thank you very much! I got the right result!




--  --
??: "rz10"<r...@cornell.edu>; 
: 2016??10??4??(??) 3:01
??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; 
: Re: a question about MOST



If the RAMP_30 column of the gen matrix is set to zero this means that the 
generator cannot change its dispatch from one period to the next, since it has 
zero ramp capability. I think it should work if you set reasonable ramp rates.


Ray





On Oct 3, 2016, at 1:26 PM, YE lei <470411...@qq.com> wrote:

  Thanks a lot, now I try to edit load_profile like follow. After I ran MOST, 
the result was still incorrect??it showed "No feasible solution found"??but in 
this load value I can run the command of "runopf" successfully?? The load bus 
is 4,5,6.


function loadprofile = ex160929_load_profile
[CT_LABEL, CT_PROB, CT_TABLE, CT_TBUS, CT_TGEN, CT_TBRCH, CT_TAREABUS, ...
CT_TAREAGEN, CT_TAREABRCH, CT_ROW, CT_COL, CT_CHGTYPE, CT_REP, ...
CT_REL, CT_ADD, CT_NEWVAL, CT_TLOAD, CT_TAREALOAD,BUS_I...
BUS_TYPE,PD,QD] = idx_ct;
loadprofile = struct( ...
'type', 'mpcData', ...
'table', CT_TBUS, ...
'rows', [4;5;6], ...
'col', PD, ...
'chgtype', CT_REP, ...
'values', [] );
loadprofile.values(:, 1, 1) = [
45;
43;
40;
40;
39;
41;
]-1e-3;
loadprofile.values(:, 1, 2) = [
97;
92;
89;
85;
87;
90;
]-1e-3;
loadprofile.values(:, 1, 3) = [
36;
33;
32;
32;
32;
32;
]-1e-3;
 
  Did I modify load_profile right? I do not know what goes wrong...orz





--  --
??: "Ray Zimmerman";<r...@cornell.edu>;
: 2016??10??4??(??) 1:04
??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; 

: Re: a question about MOST



The 3rd dimension of loadprofile.values is only 3, corresponding to the length 
of loadprofile.rows. So when you assign the data it should be to 
loadprofile.values(:, 1, 1), loadprofile.values(:, 1, 2), and 
loadprofile.values(:, 1, 3), not indexes 4, 5 and 6.


   Ray



On Sep 29, 2016, at 1:21 PM, YE lei <470411...@qq.com> wrote:

Recently, I was learning MOST in the MATPOWER, and I got a question.
When I wanted to do an experiment, I found that I do not know how to modify the 
load value of each load bus in each period. The example only have one load bus 
in MOST manual. If I have 3 load bus("case6ww.m" file on the root directory of 
MATPOWER) and load value series as fig-1, how to edit "ex_load_profile.m" 
file(D:\MatLab\toolbox\matpower6.0b1\most\t) ?


<2C09F7FC@A2D49B31.824DED57> fig-1
I edited ex_load_profile.m like fig-2, and it can not run correctly.
<2E02FAFC@A2D49B31.824DED57> fig-2


Could you help me to edit ex_load_profile.m correctly??


a question about MOST

2016-09-29 Thread YE lei
Recently, I was learning MOST in the MATPOWER, and I got a question.
When I wanted to do an experiment, I found that I do not know how to modify the 
load value of each load bus in each period. The example only have one load bus 
in MOST manual. If I have 3 load bus("case6ww.m" file on the root directory of 
MATPOWER) and load value series as fig-1, how to edit "ex_load_profile.m" 
file(D:\MatLab\toolbox\matpower6.0b1\most\t) ?


 fig-1
I edited ex_load_profile.m like fig-2, and it can not run correctly.
 fig-2


Could you help me to edit ex_load_profile.m correctly??


2E02FAFC@A2D49B31.824DED57
Description: Binary data


2C09F7FC@A2D49B31.824DED57
Description: Binary data


?????? AC power flow question

2016-06-08 Thread ????
Dear Dr.Zimmerman:
 It is my pleasure to get your response! I find that even if we don't turn 
off those generators whose reactive power is out of the limit, just only 
adjusting their output to a reasonable value is also feasible. When we adjust a 
generator, we run the power flow again, if we find there is a generator 
exceeding the limit, we again adjust the output until the all generators' 
reactive outputs are under the limit. No matter how, it is really a perfect 
experience for me to get the response by yourself. When I see the matpoer code, 
I am sur that I am one of your fans! Thank you very much!
  

 

 --  --
  ??: "Ray Zimmerman";<r...@cornell.edu>;
 : 2016??6??3??(??) 0:09
 ??: "MATPOWER discussion forum"<matpowe...@list.cornell.edu>; 
 
 : Re: AC power flow question

 

If you look more carefully at the code (and the comments) you??ll see that the 
generator is turned off temporarily in line 267, and the load is adjusted to 
include the injection. Later in line 307, the process is reversed, turning the 
generator back on. Without studying the code in more detail, I don??t remember 
why it was done this way, but I suspect it has something to do with multiple 
generators at a bus.

 Ray


> On Jun 2, 2016, at 10:05 AM,  <1499730...@qq.com> wrote:
> 
> Dear Sir/Madam,
> I have a question with the AC power flow calculation. In Matpower 
> 5.1, when AC power flow is calculated, if the q_limt is used, as the manual 
> states that "If any generator has a violated reactive power limit, its 
> reactive injection is fixed at the limit, the corresponding bus is converted 
> to a PQ bus and the power flow is solved again. This procedure is repeated 
> until there are no more violations". Obviously, we can find that all 
> generators violating the reactive power limit will be regared as PQ bus, then 
> the power flow will be recalculated. However, when I opened the file runpf.m, 
>  I fund that the states of all generators violating the reactive power limit 
> are set to be zero, that is, "gen(mx, GEN_STATUS) = 0";. That means the 
> generation is turned off in the next power flow re-calculation. This isn't 
> included in the manual. It seems unreasonable. So I want to know the reason 
> why turn off all these generators.


Re: AC power flow question

2016-06-02 Thread Ray Zimmerman
If you look more carefully at the code (and the comments) you’ll see that the 
generator is turned off temporarily in line 267, and the load is adjusted to 
include the injection. Later in line 307, the process is reversed, turning the 
generator back on. Without studying the code in more detail, I don’t remember 
why it was done this way, but I suspect it has something to do with multiple 
generators at a bus.

 Ray


> On Jun 2, 2016, at 10:05 AM, 严超 <1499730...@qq.com> wrote:
> 
> Dear Sir/Madam,
> I have a question with the AC power flow calculation. In Matpower 
> 5.1, when AC power flow is calculated, if the q_limt is used, as the manual 
> states that "If any generator has a violated reactive power limit, its 
> reactive injection is fixed at the limit, the corresponding bus is converted 
> to a PQ bus and the power flow is solved again. This procedure is repeated 
> until there are no more violations". Obviously, we can find that all 
> generators violating the reactive power limit will be regared as PQ bus, then 
> the power flow will be recalculated. However, when I opened the file runpf.m, 
>  I fund that the states of all generators violating the reactive power limit 
> are set to be zero, that is, "gen(mx, GEN_STATUS) = 0";. That means the 
> generation is turned off in the next power flow re-calculation. This isn't 
> included in the manual. It seems unreasonable. So I want to know the reason 
> why turn off all these generators. 





AC power flow question

2016-06-02 Thread ????
Dear Sir/Madam,
 I have a question with the AC power flow calculation. In Matpower 5.1, 
when AC power flow is calculated, if the q_limt is used, as the manual states 
that "If any generator has a violated reactive power limit, its reactive 
injection is fixed at the limit, the corresponding bus is converted to a PQ bus 
and the power flow is solved again. This procedure is repeated until there are 
no more violations". Obviously, we can find that all generators violating the 
reactive power limit will be regared as PQ bus, then the power flow will be 
recalculated. However, when I opened the file runpf.m,  I fund that the states 
of all generators violating the reactive power limit are set to be zero, that 
is, "gen(mx, GEN_STATUS) = 0";. That means the generation is turned off in the 
next power flow re-calculation. This isn't included in the manual. It seems 
unreasonable. So I want to know the reason why turn off all these generators.


Re: A question about transformer modeling with uk, ur

2016-05-13 Thread Shuo Chen

Hi Jose,

the link you posted helps a lot, I've been working on this issue these days.

Earliear I also found a paper about the difference between transformer  
model of Netomac and matpower, it shows something simuliar to this  
psse transformer modeling issue. Since that paper was published 15  
year ago, I didn't pay much attention to it (in the paper it is said  
that psse and netomac also used different transformer models, i guess  
there are using the same one now).


After several tests, I found out that there's still nothing I can do  
based on the model. For a system with 1 generator and 1 transformer(or  
2 gen and 2 transformers), netomac and matpower will just give me  
exactly the same power flow results. When I added more generators or  
transformers to that system, the two simulators start to differ a  
little bit, i'm still looking for the reason for that.


Maybe different kinds of transformer models do make things different,  
but at least they have no effect on small power systems. For further  
information i might need to contact the tech guys from Siemens.


Hopefully this could be helpful to those who have confusion about the  
transformer model in matpowr.


Best regards
Shuo


Zitat von Jose Luis Marín <mari...@aia.es>:


Certainly, testing with a small system is the only way to find out what the
internal model *really* is (since you can't inspect the code in this
case).  Anyway, I would add another suggestion: export from Netomac to
PSS/E RAW format, and inspect the transformer records very carefully.  Read
the specs of the RAW format (the specific version of the format used), and
have a look at the internal model used by PSS/E (I'd assume that Netomac
uses the same, but who knows).  You can find it here:


http://w3.usa.siemens.com/datapool/us/SmartGrid/docs/pti/2009July/PDFs/Modeling_of_two_winding_voltage_regulating_transformers.pdf

Compare this model with the one use by MATPOWER (page 22 of the PDF
manual).  You'll see they're not exactly the same.  You said you're not
using magnetizing branches (Bs), which simplifies things a lot.  But pay
attention to the tap ratios (both sides!), just in case.

--
Jose L. Marin
Grupo AIA



2016-05-10 13:50 GMT+02:00 Chris Prokop <christophprok...@gmail.com>:


Dear Shuo,

I'd try to simulate a simply network with 1 reference bus with 1
transformer and 1 subsequent load to test the behaviour between Matpower
and netomac.

I'm not used to netomac, so can't help here directly.

Nice regards,
Chris

2016-05-10 13:22 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:


Dear Chris,

thanks for your reply, actually we are getting the same transformer data.
In my power system  uk is far more larger than ur (more than 50:1), so it
can be assumed that ux = uk.

i'm wondering whether there is any little difference between netomac and
matpower by modeling the transformer, so that even if I give them the same
input, PF results could still differ.

best regards
Shuo

Zitat von Chris Prokop <christophprok...@gmail.com>:

Dear Shuo Chen,


I'm used to similar data and calculate r and x as (ur, uk in p.u.,
base_MVA
and S_transformer in MVA):
- r = ur * base_MVA / S_transformer
- x = sqrt(uk^2 - ur^2) * base_MVA / S_transformer
- ratio = 1 (in your case, where rated = nominal voltage)
- angle = 0 (in your case, without phase shifting)

Maybe one of your problems is using uk instead of ux (uk^2 = ux^2 +
ur^2)?

Nice regards,
Chris

2016-05-10 0:33 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:



Dear Ray and matpower users,

i'm writing my thesis about a data-converter for two power system
simulation softwares: PSSE@Netomac from Siemens and matpower. Here is a
problem with transformer modeling, i've read a lot in this archive but
still can't solve it, so i decide to post my question here.

My goal is to get the same or a simular power flow convergency using the
Newton's method after converting the net topology from one to the other.
However, I'm stucked when I try to convert a Netomac net into a matpower
case. Comparing the PF results of the 2 softwares, there is always a big
deviation (by bus voltage magnitude, bus voltage angle and branch P/Q
injection). More specifically, the bus voltages in pu of matpower are
all
lower than those of Netomac, the deviation could be up to 5%, like 0.977
instead of 0.997 in Netomac.

I simply grab all the bus/gen/branch parameters from Netomac except for
the transformer impedance, so I guess there might be a mistake when the
transformer model is built in matpower.
The transformers have 2-windings and no tap changer

The parameters I could get from Netomac are:

- Rated voltage of HV side winding (Un1)
- Nominal network voltage HV side (UB1? the value is equal to Un1)
- Rated voltage of LV side winding (Un2)
- Nominal network voltage LV side (UB2? the value is equal to Un2)
- Rated apparent power (equal to baseMVA)
- ur in % (may not be zero)
- uk in % (must be larger than ur)
- P0 and I0 ar

Re: A question about transformer modeling with uk, ur

2016-05-10 Thread Jose Luis Marín
Certainly, testing with a small system is the only way to find out what the
internal model *really* is (since you can't inspect the code in this
case).  Anyway, I would add another suggestion: export from Netomac to
PSS/E RAW format, and inspect the transformer records very carefully.  Read
the specs of the RAW format (the specific version of the format used), and
have a look at the internal model used by PSS/E (I'd assume that Netomac
uses the same, but who knows).  You can find it here:


http://w3.usa.siemens.com/datapool/us/SmartGrid/docs/pti/2009July/PDFs/Modeling_of_two_winding_voltage_regulating_transformers.pdf

Compare this model with the one use by MATPOWER (page 22 of the PDF
manual).  You'll see they're not exactly the same.  You said you're not
using magnetizing branches (Bs), which simplifies things a lot.  But pay
attention to the tap ratios (both sides!), just in case.

-- 
Jose L. Marin
Grupo AIA



2016-05-10 13:50 GMT+02:00 Chris Prokop <christophprok...@gmail.com>:

> Dear Shuo,
>
> I'd try to simulate a simply network with 1 reference bus with 1
> transformer and 1 subsequent load to test the behaviour between Matpower
> and netomac.
>
> I'm not used to netomac, so can't help here directly.
>
> Nice regards,
> Chris
>
> 2016-05-10 13:22 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:
>
>> Dear Chris,
>>
>> thanks for your reply, actually we are getting the same transformer data.
>> In my power system  uk is far more larger than ur (more than 50:1), so it
>> can be assumed that ux = uk.
>>
>> i'm wondering whether there is any little difference between netomac and
>> matpower by modeling the transformer, so that even if I give them the same
>> input, PF results could still differ.
>>
>> best regards
>> Shuo
>>
>> Zitat von Chris Prokop <christophprok...@gmail.com>:
>>
>> Dear Shuo Chen,
>>>
>>> I'm used to similar data and calculate r and x as (ur, uk in p.u.,
>>> base_MVA
>>> and S_transformer in MVA):
>>> - r = ur * base_MVA / S_transformer
>>> - x = sqrt(uk^2 - ur^2) * base_MVA / S_transformer
>>> - ratio = 1 (in your case, where rated = nominal voltage)
>>> - angle = 0 (in your case, without phase shifting)
>>>
>>> Maybe one of your problems is using uk instead of ux (uk^2 = ux^2 +
>>> ur^2)?
>>>
>>> Nice regards,
>>> Chris
>>>
>>> 2016-05-10 0:33 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:
>>>
>>>
>>>> Dear Ray and matpower users,
>>>>
>>>> i'm writing my thesis about a data-converter for two power system
>>>> simulation softwares: PSSE@Netomac from Siemens and matpower. Here is a
>>>> problem with transformer modeling, i've read a lot in this archive but
>>>> still can't solve it, so i decide to post my question here.
>>>>
>>>> My goal is to get the same or a simular power flow convergency using the
>>>> Newton's method after converting the net topology from one to the other.
>>>> However, I'm stucked when I try to convert a Netomac net into a matpower
>>>> case. Comparing the PF results of the 2 softwares, there is always a big
>>>> deviation (by bus voltage magnitude, bus voltage angle and branch P/Q
>>>> injection). More specifically, the bus voltages in pu of matpower are
>>>> all
>>>> lower than those of Netomac, the deviation could be up to 5%, like 0.977
>>>> instead of 0.997 in Netomac.
>>>>
>>>> I simply grab all the bus/gen/branch parameters from Netomac except for
>>>> the transformer impedance, so I guess there might be a mistake when the
>>>> transformer model is built in matpower.
>>>> The transformers have 2-windings and no tap changer
>>>>
>>>> The parameters I could get from Netomac are:
>>>>
>>>> - Rated voltage of HV side winding (Un1)
>>>> - Nominal network voltage HV side (UB1? the value is equal to Un1)
>>>> - Rated voltage of LV side winding (Un2)
>>>> - Nominal network voltage LV side (UB2? the value is equal to Un2)
>>>> - Rated apparent power (equal to baseMVA)
>>>> - ur in % (may not be zero)
>>>> - uk in % (must be larger than ur)
>>>> - P0 and I0 are not given
>>>> - vector group YY0
>>>> in matpower a transformer is treated as a transmission line, where
>>>> r(p.u.)
>>>> and x(p.u.) are needed for the power flow calculation. (b is omitted in
>>>> my
>>>> case)
>>>> According to 

Re: A question about transformer modeling with uk, ur

2016-05-10 Thread Chris Prokop
Dear Shuo,

I'd try to simulate a simply network with 1 reference bus with 1
transformer and 1 subsequent load to test the behaviour between Matpower
and netomac.

I'm not used to netomac, so can't help here directly.

Nice regards,
Chris

2016-05-10 13:22 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:

> Dear Chris,
>
> thanks for your reply, actually we are getting the same transformer data.
> In my power system  uk is far more larger than ur (more than 50:1), so it
> can be assumed that ux = uk.
>
> i'm wondering whether there is any little difference between netomac and
> matpower by modeling the transformer, so that even if I give them the same
> input, PF results could still differ.
>
> best regards
> Shuo
>
> Zitat von Chris Prokop <christophprok...@gmail.com>:
>
> Dear Shuo Chen,
>>
>> I'm used to similar data and calculate r and x as (ur, uk in p.u.,
>> base_MVA
>> and S_transformer in MVA):
>> - r = ur * base_MVA / S_transformer
>> - x = sqrt(uk^2 - ur^2) * base_MVA / S_transformer
>> - ratio = 1 (in your case, where rated = nominal voltage)
>> - angle = 0 (in your case, without phase shifting)
>>
>> Maybe one of your problems is using uk instead of ux (uk^2 = ux^2 + ur^2)?
>>
>> Nice regards,
>> Chris
>>
>> 2016-05-10 0:33 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:
>>
>>
>>> Dear Ray and matpower users,
>>>
>>> i'm writing my thesis about a data-converter for two power system
>>> simulation softwares: PSSE@Netomac from Siemens and matpower. Here is a
>>> problem with transformer modeling, i've read a lot in this archive but
>>> still can't solve it, so i decide to post my question here.
>>>
>>> My goal is to get the same or a simular power flow convergency using the
>>> Newton's method after converting the net topology from one to the other.
>>> However, I'm stucked when I try to convert a Netomac net into a matpower
>>> case. Comparing the PF results of the 2 softwares, there is always a big
>>> deviation (by bus voltage magnitude, bus voltage angle and branch P/Q
>>> injection). More specifically, the bus voltages in pu of matpower are all
>>> lower than those of Netomac, the deviation could be up to 5%, like 0.977
>>> instead of 0.997 in Netomac.
>>>
>>> I simply grab all the bus/gen/branch parameters from Netomac except for
>>> the transformer impedance, so I guess there might be a mistake when the
>>> transformer model is built in matpower.
>>> The transformers have 2-windings and no tap changer
>>>
>>> The parameters I could get from Netomac are:
>>>
>>> - Rated voltage of HV side winding (Un1)
>>> - Nominal network voltage HV side (UB1? the value is equal to Un1)
>>> - Rated voltage of LV side winding (Un2)
>>> - Nominal network voltage LV side (UB2? the value is equal to Un2)
>>> - Rated apparent power (equal to baseMVA)
>>> - ur in % (may not be zero)
>>> - uk in % (must be larger than ur)
>>> - P0 and I0 are not given
>>> - vector group YY0
>>> in matpower a transformer is treated as a transmission line, where
>>> r(p.u.)
>>> and x(p.u.) are needed for the power flow calculation. (b is omitted in
>>> my
>>> case)
>>> According to the formels:
>>>
>>> z_pu = uk% / 100
>>> x_pu = uk% *(Un/UB).^2 * (SB/Sn) / 100
>>> r_pu = sqrt(z_pu.^2 - x_pu.^2) (here r_pu = ur%/ 100)
>>>
>>> Since in my case Un/UB = 1, SB/Sn = 1, so x = uk%/100, r = ur%/100, b = 0
>>> I set ratio = 1 and angle = 0, status = 1, angmin/max = +-360
>>> other values are set to 0
>>>
>>> Netomac can also export a .raw file for PSSE, the conversion above will
>>> generate equivalent r and x values as the exported .raw file.
>>> Theoretically, with the same net topology and P/Q accuracy, the PF
>>> convergency of the two simulation tools should be almost the same.
>>>
>>> Here is one more hint, as far as I know, the transformer impedance in
>>> matpower is modeled at "to" side, while in Netomac it's modeled at "HV"
>>> side (which is the "from" side), so there could be a difference between
>>> the
>>> two models but i got no clue how to unify them.
>>>
>>>
>>> Has anyone ever met this kind of problem before? Or the transformer is
>>> converted in a right way, but there could be something wrong in other
>>> parts?
>>> I know this is a tough one, hopefully I could get some hints here. Many
>>> thanks for all!
>>>
>>> Best Regards
>>> Shuo
>>>
>>>
>>>
>>>
>>>
>
>
>
>


Re: A question about transformer modeling with uk, ur

2016-05-10 Thread Shuo Chen

Dear Chris,

thanks for your reply, actually we are getting the same transformer  
data. In my power system  uk is far more larger than ur (more than  
50:1), so it can be assumed that ux = uk.


i'm wondering whether there is any little difference between netomac  
and matpower by modeling the transformer, so that even if I give them  
the same input, PF results could still differ.


best regards
Shuo

Zitat von Chris Prokop <christophprok...@gmail.com>:


Dear Shuo Chen,

I'm used to similar data and calculate r and x as (ur, uk in p.u., base_MVA
and S_transformer in MVA):
- r = ur * base_MVA / S_transformer
- x = sqrt(uk^2 - ur^2) * base_MVA / S_transformer
- ratio = 1 (in your case, where rated = nominal voltage)
- angle = 0 (in your case, without phase shifting)

Maybe one of your problems is using uk instead of ux (uk^2 = ux^2 + ur^2)?

Nice regards,
Chris

2016-05-10 0:33 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:



Dear Ray and matpower users,

i'm writing my thesis about a data-converter for two power system
simulation softwares: PSSE@Netomac from Siemens and matpower. Here is a
problem with transformer modeling, i've read a lot in this archive but
still can't solve it, so i decide to post my question here.

My goal is to get the same or a simular power flow convergency using the
Newton's method after converting the net topology from one to the other.
However, I'm stucked when I try to convert a Netomac net into a matpower
case. Comparing the PF results of the 2 softwares, there is always a big
deviation (by bus voltage magnitude, bus voltage angle and branch P/Q
injection). More specifically, the bus voltages in pu of matpower are all
lower than those of Netomac, the deviation could be up to 5%, like 0.977
instead of 0.997 in Netomac.

I simply grab all the bus/gen/branch parameters from Netomac except for
the transformer impedance, so I guess there might be a mistake when the
transformer model is built in matpower.
The transformers have 2-windings and no tap changer

The parameters I could get from Netomac are:

- Rated voltage of HV side winding (Un1)
- Nominal network voltage HV side (UB1? the value is equal to Un1)
- Rated voltage of LV side winding (Un2)
- Nominal network voltage LV side (UB2? the value is equal to Un2)
- Rated apparent power (equal to baseMVA)
- ur in % (may not be zero)
- uk in % (must be larger than ur)
- P0 and I0 are not given
- vector group YY0
in matpower a transformer is treated as a transmission line, where r(p.u.)
and x(p.u.) are needed for the power flow calculation. (b is omitted in my
case)
According to the formels:

z_pu = uk% / 100
x_pu = uk% *(Un/UB).^2 * (SB/Sn) / 100
r_pu = sqrt(z_pu.^2 - x_pu.^2) (here r_pu = ur%/ 100)

Since in my case Un/UB = 1, SB/Sn = 1, so x = uk%/100, r = ur%/100, b = 0
I set ratio = 1 and angle = 0, status = 1, angmin/max = +-360
other values are set to 0

Netomac can also export a .raw file for PSSE, the conversion above will
generate equivalent r and x values as the exported .raw file.
Theoretically, with the same net topology and P/Q accuracy, the PF
convergency of the two simulation tools should be almost the same.

Here is one more hint, as far as I know, the transformer impedance in
matpower is modeled at "to" side, while in Netomac it's modeled at "HV"
side (which is the "from" side), so there could be a difference between the
two models but i got no clue how to unify them.


Has anyone ever met this kind of problem before? Or the transformer is
converted in a right way, but there could be something wrong in other parts?
I know this is a tough one, hopefully I could get some hints here. Many
thanks for all!

Best Regards
Shuo











Re: A question about transformer modeling with uk, ur

2016-05-10 Thread Chris Prokop
Dear Shuo Chen,

I'm used to similar data and calculate r and x as (ur, uk in p.u., base_MVA
and S_transformer in MVA):
- r = ur * base_MVA / S_transformer
- x = sqrt(uk^2 - ur^2) * base_MVA / S_transformer
- ratio = 1 (in your case, where rated = nominal voltage)
- angle = 0 (in your case, without phase shifting)

Maybe one of your problems is using uk instead of ux (uk^2 = ux^2 + ur^2)?

Nice regards,
Chris

2016-05-10 0:33 GMT+02:00 Shuo Chen <shuo.c...@st.ovgu.de>:

>
> Dear Ray and matpower users,
>
> i'm writing my thesis about a data-converter for two power system
> simulation softwares: PSSE@Netomac from Siemens and matpower. Here is a
> problem with transformer modeling, i've read a lot in this archive but
> still can't solve it, so i decide to post my question here.
>
> My goal is to get the same or a simular power flow convergency using the
> Newton's method after converting the net topology from one to the other.
> However, I'm stucked when I try to convert a Netomac net into a matpower
> case. Comparing the PF results of the 2 softwares, there is always a big
> deviation (by bus voltage magnitude, bus voltage angle and branch P/Q
> injection). More specifically, the bus voltages in pu of matpower are all
> lower than those of Netomac, the deviation could be up to 5%, like 0.977
> instead of 0.997 in Netomac.
>
> I simply grab all the bus/gen/branch parameters from Netomac except for
> the transformer impedance, so I guess there might be a mistake when the
> transformer model is built in matpower.
> The transformers have 2-windings and no tap changer
>
> The parameters I could get from Netomac are:
>
> - Rated voltage of HV side winding (Un1)
> - Nominal network voltage HV side (UB1? the value is equal to Un1)
> - Rated voltage of LV side winding (Un2)
> - Nominal network voltage LV side (UB2? the value is equal to Un2)
> - Rated apparent power (equal to baseMVA)
> - ur in % (may not be zero)
> - uk in % (must be larger than ur)
> - P0 and I0 are not given
> - vector group YY0
> in matpower a transformer is treated as a transmission line, where r(p.u.)
> and x(p.u.) are needed for the power flow calculation. (b is omitted in my
> case)
> According to the formels:
>
> z_pu = uk% / 100
> x_pu = uk% *(Un/UB).^2 * (SB/Sn) / 100
> r_pu = sqrt(z_pu.^2 - x_pu.^2) (here r_pu = ur%/ 100)
>
> Since in my case Un/UB = 1, SB/Sn = 1, so x = uk%/100, r = ur%/100, b = 0
> I set ratio = 1 and angle = 0, status = 1, angmin/max = +-360
> other values are set to 0
>
> Netomac can also export a .raw file for PSSE, the conversion above will
> generate equivalent r and x values as the exported .raw file.
> Theoretically, with the same net topology and P/Q accuracy, the PF
> convergency of the two simulation tools should be almost the same.
>
> Here is one more hint, as far as I know, the transformer impedance in
> matpower is modeled at "to" side, while in Netomac it's modeled at "HV"
> side (which is the "from" side), so there could be a difference between the
> two models but i got no clue how to unify them.
>
>
> Has anyone ever met this kind of problem before? Or the transformer is
> converted in a right way, but there could be something wrong in other parts?
> I know this is a tough one, hopefully I could get some hints here. Many
> thanks for all!
>
> Best Regards
> Shuo
>
>
>
>


A question about transformer modeling with uk, ur

2016-05-09 Thread Shuo Chen


Dear Ray and matpower users,

i'm writing my thesis about a data-converter for two power system  
simulation softwares: PSSE@Netomac from Siemens and matpower. Here is  
a problem with transformer modeling, i've read a lot in this archive  
but still can't solve it, so i decide to post my question here.


My goal is to get the same or a simular power flow convergency using  
the Newton's method after converting the net topology from one to the  
other. However, I'm stucked when I try to convert a Netomac net into a  
matpower case. Comparing the PF results of the 2 softwares, there is  
always a big deviation (by bus voltage magnitude, bus voltage angle  
and branch P/Q injection). More specifically, the bus voltages in pu  
of matpower are all lower than those of Netomac, the deviation could  
be up to 5%, like 0.977 instead of 0.997 in Netomac.


I simply grab all the bus/gen/branch parameters from Netomac except  
for the transformer impedance, so I guess there might be a mistake  
when the transformer model is built in matpower.

The transformers have 2-windings and no tap changer

The parameters I could get from Netomac are:

- Rated voltage of HV side winding (Un1)
- Nominal network voltage HV side (UB1? the value is equal to Un1)
- Rated voltage of LV side winding (Un2)
- Nominal network voltage LV side (UB2? the value is equal to Un2)
- Rated apparent power (equal to baseMVA)
- ur in % (may not be zero)
- uk in % (must be larger than ur)
- P0 and I0 are not given
- vector group YY0
in matpower a transformer is treated as a transmission line, where  
r(p.u.) and x(p.u.) are needed for the power flow calculation. (b is  
omitted in my case)

According to the formels:

z_pu = uk% / 100
x_pu = uk% *(Un/UB).^2 * (SB/Sn) / 100
r_pu = sqrt(z_pu.^2 - x_pu.^2) (here r_pu = ur%/ 100)

Since in my case Un/UB = 1, SB/Sn = 1, so x = uk%/100, r = ur%/100, b = 0
I set ratio = 1 and angle = 0, status = 1, angmin/max = +-360
other values are set to 0

Netomac can also export a .raw file for PSSE, the conversion above  
will generate equivalent r and x values as the exported .raw file.  
Theoretically, with the same net topology and P/Q accuracy, the PF  
convergency of the two simulation tools should be almost the same.


Here is one more hint, as far as I know, the transformer impedance in  
matpower is modeled at "to" side, while in Netomac it's modeled at  
"HV" side (which is the "from" side), so there could be a difference  
between the two models but i got no clue how to unify them.



Has anyone ever met this kind of problem before? Or the transformer is  
converted in a right way, but there could be something wrong in other  
parts?
I know this is a tough one, hopefully I could get some hints here.  
Many thanks for all!


Best Regards
Shuo





Re: Question

2016-04-04 Thread Ray Zimmerman
If you look at the formulation in equations (7.2)–(7.5) it should be clear that 
runopf_w_res() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower5.1/runopf_w_res.html> 
only deals with upward spinning reserves. In order to deal with downward 
spinning reserves–or any other class of reserves, for that matter–you would 
need to implement an additional set of reserve variables, costs and 
requirements. So, it could be done in the same way as the upward spinning 
reserves, but would require writing an OPF extension that implements multiple 
reserve types. This would be a very straightforward modification to the 
existing toggle_reserves() 
<http://www.pserc.cornell.edu/matpower/docs/ref/matpower5.1/toggle_reserves.html>.

   Ray



> On Apr 2, 2016, at 5:53 PM, pourahmad...@ee.sharif.edu wrote:
> 
> Thanks for your response Dr. Zimmerman. I have another question about using 
> RUNOPF_W_RES. Since the value of reserve must be non-negative in this 
> function, how can I consider downward spinning reserve? Can I consider upward 
> and downward reserves simultaneously?
> 
> Best Regards,
> 
> Farzaneh
> 
>  
>  
>  
> > I’m not sure what you mean by “completely non-convex”, but yes, you can
> > use LAM_P as the LMP. It is simply the sensitivity of overall objective
> > function to a change in the load at the bus. Of course this is at the OPF
> > solution, which in a non-convex problem is not guaranteed to be a global
> > solution.
> >
> > Ray
> >
> >
> >> On Mar 25, 2016, at 5:46 AM, pourahmad...@ee.sharif.edu wrote:
> >>
> >> Hi,
> >>
> >> I want to run an AC optimal power flow with fixed zonal reserves and
> >> co-optimize reserves and energy via using MATPOWER5.1. RUNOPF_W_RES. I
> >> have a question about obtaining locational marginal price (LMP).
> >> As this problem used in MATOPWER is completely non-convex, is it valid
> >> to
> >> take Lagrangian from the non-convex problem?
> >> In user's manual, it is stated that Lam_P is Lagrange multiplier on
> >> real power mismatch.
> >> Can I use Lam_P as LMP?
> >>
> >> I would appreciate if you help me.
> >>
> >> Best Regards
> >
> >
> 



Re: question about losses

2016-04-04 Thread Jose Luis Marin
Hello Houssem,

I don't know the reason why line Q-losses are reported that way in
MATPOWER, but heuristically, if voltages are kept within reasonable bounds
(say 0.9 to 1.10 in pu) then you can see that Q injections from line
Bshunts will remain also bounded, as they are equal to Bs·V^2.  By
contrast, the transmission part of Q-losses (I^2·X) can vary orders of
magnitude, depending on the load on the transmission network.

-- 
Jose L. Marin
Grupo AIA


On Mon, Apr 4, 2016 at 3:22 AM, Houssem <bouchekara.hous...@gmail.com>
wrote:

>
> Thanks Gang for your answer. This confirms my thoughts because it is
> written I^2*Z above losses. Therefore, these losses are power loss in the
> series portion of the pi-model of the transmission line.
> However, in an OPF problem where the objective is to minimize reactive
> power transmission losses, reactive losses are computed taking into account
> both portions of the transmission line (i.e. line charging capacitance
> portions of the pi-model are also included). So what is the goal of
> calculating losses in matpower including only the series portion? Is there
> any advantages of doing so?
>
> Regards
>
> Houssem
>
>
>
> On 03/04/2016 11:59 PM, Gang Huang wrote:
>
> Dear Houssem,
>
>
>
> Please note that transmission lines have charging susceptance (i.e.,
> mpc.branch(:, BR_B)), and its contribution to the reactive power is not
> listed in the pretty-printed output.
>
>
>
> Best regards,
>
>
>
> Gang
>
>
>
> *From:* bounce-120330262-73377...@list.cornell.edu [
> mailto:bounce-120330262-73377...@list.cornell.edu
> <bounce-120330262-73377...@list.cornell.edu>] *On Behalf Of *Houssem
> *Sent:* Sunday, April 03, 2016 11:29 AM
> *To:* MATPOWER discussion forum
> *Subject:* question about losses
>
>
>
> Dear All
> I have a small question about losses in matpower .
> I have run a small program with 3 buses in matpower 4.1.
> The obtained results are:
>
> 
> | Branch
> Data  |
>
> 
> Brnch   From   ToFrom Bus Injection   To Bus Injection Loss (I^2 *
> Z)
>   # BusBusP (MW)   Q (MVAr)   P (MW)   Q (MVAr)   P (MW)   Q
> (MVAr)
> -  -  -          
> 
>1  1  2  179.33 116.79 -170.96
> -102.71   8.369   16.74
>*2  1  3  39.0320.69  -38.85
> -22.980.1830.55*
>3  2  3-229.04 -147.29  238.85  166.92
>9.813   19.63
>  
> 
> Total:18.365
> 36.91
>
> my question is, in line 2 Qlosses should be (20.69)+(-22.98) =-2.29 MVar.
> However matpower displays 0.55MVar !!! is there any explanation to that?
> same for branch 1.
> Regards
> Houssem
>
>
>


Re: question about losses

2016-04-03 Thread Houssem


Thanks Gang for your answer. This confirms my thoughts because it is 
written I^2*Z above losses. Therefore, these losses are power loss in 
the series portion of the pi-model of the transmission line.
However, in an OPF problem where the objective is to minimize reactive 
power transmission losses, reactive losses are computed taking into 
account both portions of the transmission line (i.e. line charging 
capacitance portions of the pi-model are also included). So what is the 
goal of calculating losses in matpower including only the series 
portion? Is there any advantages of doing so?


Regards

Houssem


On 03/04/2016 11:59 PM, Gang Huang wrote:


Dear Houssem,

Please note that transmission lines have charging susceptance (i.e., 
mpc.branch(:, BR_B)), and its contribution to the reactive power is 
not listed in the pretty-printed output.


Best regards,

Gang

*From:*bounce-120330262-73377...@list.cornell.edu 
[mailto:bounce-120330262-73377...@list.cornell.edu] *On Behalf Of *Houssem

*Sent:* Sunday, April 03, 2016 11:29 AM
*To:* MATPOWER discussion forum
*Subject:* question about losses

Dear All
I have a small question about losses in matpower .
I have run a small program with 3 buses in matpower 4.1.
The obtained results are:

| Branch Data |

Brnch   From   ToFrom Bus Injection   To Bus Injection Loss 
(I^2 * Z)
  # BusBusP (MW)   Q (MVAr)   P (MW)   Q (MVAr)   P (MW)   
Q (MVAr)
-  -  -           

   1  1  2  179.33 116.79 -170.96 
-102.71   8.369   16.74
*2  1  3  39.03 20.69  -38.85 
-22.980.1830.55*
   3  2  3-229.04 -147.29 238.85  166.92 
   9.813   19.63

  
Total:18.365 36.91

my question is, in line 2 Qlosses should be (20.69)+(-22.98) =-2.29 
MVar. However matpower displays 0.55MVar !!! is there any explanation 
to that?

same for branch 1.
Regards
Houssem





question about losses

2016-04-03 Thread Houssem

Dear All
I have a small question about losses in matpower .
I have run a small program with 3 buses in matpower 4.1.
The obtained results are:

| Branch Data |

Brnch   From   ToFrom Bus Injection   To Bus Injection Loss (I^2 * Z)
  # BusBusP (MW)   Q (MVAr)   P (MW)   Q (MVAr)   P (MW)   
Q (MVAr)
-  -  -           

   1  1  2  179.33 116.79 -170.96 -102.71   
8.369   16.74
*2  1  3  39.03 20.69  -38.85 -22.98
0.1830.55*
   3  2  3-229.04 -147.29  238.85 166.92
9.813   19.63

  
Total: 18.365 36.91

my question is, in line 2 Qlosses should be (20.69)+(-22.98) =-2.29 
MVar. However matpower displays 0.55MVar !!! is there any explanation to 
that?

same for branch 1.
Regards
Houssem



Re: Question

2016-04-02 Thread pourahmadi_f




Thanks for your response Dr. Zimmerman. I have another question about
using�RUNOPF_W_RES. Since the value of reserve must be non-negative
in this function, how can I consider downward spinning reserve? Can I
consider upward and downward reserves simultaneously?


Best Regards,


Farzaneh


�


�


�


> Im not sure what you mean by completely
non-convex, but yes, you can

> use LAM_P as the LMP. It is simply the sensitivity of overall
objective

> function to a change in the load at the bus. Of course this is at
the OPF

> solution, which in a non-convex problem is not guaranteed to be a
global

> solution.

>

> Ray

>

>

>> On Mar 25, 2016, at 5:46 AM, pourahmad...@ee.sharif.edu
wrote:

>>

>> Hi,

>>

>> I want to run an AC optimal power flow with fixed zonal reserves
and

>> co-optimize reserves and energy via using MATPOWER5.1.
RUNOPF_W_RES. I

>> have a question about obtaining locational marginal price
(LMP).

>> As this problem used in MATOPWER is completely non-convex, is it
valid

>> to

>> take Lagrangian from the non-convex problem?

>> In users manual, it is stated that Lam_P is Lagrange
multiplier on

>> real power mismatch.

>> Can I use Lam_P as LMP?

>>

>> I would appreciate if you help me.

>>

>> Best Regards

>

>



Question

2016-03-25 Thread pourahmadi_f



Hi,

I want to run an AC optimal power flow with fixed zonal reserves and
co-optimize reserves and energy via using MATPOWER5.1. RUNOPF_W_RES. I
have a question about obtaining locational marginal price (LMP).
As this problem used in MATOPWER is completely non-convex, is it valid to
take Lagrangian from the non-convex problem?


In users manual, it is stated that Lam_P is Lagrange multiplier on
real power mismatch.
Can I use Lam_P as LMP?

I would appreciate if you help me.

Best Regards



Re: power flow question

2016-02-18 Thread Ray Zimmerman
Good idea. That should probably be an option though.

Ray

> On Feb 18, 2016, at 11:58 AM, Abhyankar, Shrirang G. <abhy...@anl.gov> wrote:
> 
> 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 <r...@cornell.edu <mailto:r...@cornell.edu>>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <mailto:matpowe...@list.cornell.edu>>
> Date: Thursday, February 18, 2016 at 10:34 AM
> To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <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 <jovan.i...@gmail.com 
>> <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 <mari...@gridquant.com 
>> <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 <jovan.i...@gmail.com 
>> <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 <santiago.i...@gmail.com 
>> <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" <wenlei_...@baylor.edu 
>> <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-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 <r...@cornell.edu<mailto:r...@cornell.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
List-Post: matpower-l@cornell.edu
Date: Thursday, February 18, 2016 at 10:34 AM
To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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 
<jovan.i...@gmail.com<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 
<mari...@gridquant.com<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 
<jovan.i...@gmail.com<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 
<santiago.i...@gmail.com<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" 
<wenlei_...@baylor.edu<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-18 Thread Jose Luis Marin
Hi Jovan,

Sorry, I see I misundertood.  I had read your proposal as consisting in
adding an *equality* constraint, instead of an *inequality* constraint.

But as you say, I suspect that such thing would be equivalent to just
adding a simple post-calculation check and a warning to the user when PG is
out of bounds (PMIN, PMAX).

-- 
Jose L. Marin
Grupo AIA


On Thu, Feb 18, 2016 at 2:05 PM, Jovan Ilic  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 
> 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 
>> 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 <
>>> 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" 
 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-18 Thread Jovan Ilic
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 
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  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 > > 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"  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-18 Thread Jose Luis Marin
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  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 
> 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"  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 Jovan Ilic
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 
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"  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 Santiago Torres
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"  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 <wenlei_...@baylor.edu<mailto:wenlei_...@baylor.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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>" 
<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



power flow question

2016-02-17 Thread Bai, Wenlei
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



Question about islands.

2016-01-21 Thread Mirish Thakur
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: Question about LMP

2015-11-20 Thread Victor Hugo Hinojosa M.
Dear Carlos and Sarmad,

Thank you very much for this explanation. I really agree with the derivation of 
the Lagrangian function. My doubt was for the printing information (LPM) after 
a DCOPF is carried out. When there’s congestion, the LMP are correct, but we 
need to include the shadow price whether a generation is constrained.

Best Regards,

Vh

 

De: bounce-119916284-12657...@list.cornell.edu 
[mailto:bounce-119916284-12657...@list.cornell.edu] En nombre de Sarmad Hanif
Enviado el: jueves, 19 de noviembre de 2015 20:59
Para: MATPOWER discussion forum
Asunto: RE: Question about LMP

 

Dear Vh,

 

Regarding your question: why LMP doesn’t include the Lagrange multipliers 
related to generation inequality constraints

 

The answer is it does!! As Carlos explained: 

 

f'(Pg1) + mu_+ - mu_-- \lambda_P1 = 0

or \lambda_P1 = f'(Pg1) + mu_+ - mu_-

Your dual problem should also state the same.

 

As far as the interpretation goes for the LMP, quoting Ray’s response for an 
uncongested case:

 

LMP will equal the marginal cost of generation plus (minus) the shadow price on 
the binding upper (lower) generation constraint.

 

 

Regarding the book “ Spot pricing of electricity”, I haven’t read it yet. 
Hopefully, I will get my hands on it soon!

 

I hope this clears.

 

Regards,

 

Sarmad

 

 

 

 

 

From: bounce-119913453-74036...@list.cornell.edu 
[mailto:bounce-119913453-74036...@list.cornell.edu] On Behalf Of Victor Hugo 
Hinojosa M.
Sent: Thursday, 19 November, 2015 9:28 PM
To: 'MATPOWER discussion forum'
Subject: RE: Question about LMP

 

Dear Jovan and Sarmad,

I agree with your comments about LMP. In this analysis I’m not considered the 
congestion. If the generation inequality constraints aren’t active, Matpower 
prints this information correctly, and It’s possible to realize different 
prices when the lines is congested. Sarmad, I’ve verified your idea. Despite 
the fact that the shadow price for the minimum or maximum is active, the LMP 
shown are the same for all buses. 

My question is about why LMP doesn’t include the Lagrange multipliers related 
to generation inequality constraints. I did a model using the dual problem for 
the DCOPF, and I realized that dual constraints are the prices for each buses. 
It’s very clear in those constraints that those “prices” take into account the 
marginal cost, the congestion cost through the partial transmission 
distribution factors (PTDF) and the generation constraints. 

In the technical literature for the DCOPF (losses are neglected), the LPM are 
modeled considering energy cost and congestion cost. However, in the book “Spot 
pricing of electricity” from F. Schweppe et all, authors include these shadow 
prices in order to compute the spot prices.

I’d like to know your feedback about these comments.

Regards,

Vh

 

De: bounce-119912654-12657...@list.cornell.edu 
[mailto:bounce-119912654-12657...@list.co 
<mailto:bounce-119912654-12657...@list.cornell.edu> rnell.edu] En nombre de 
Jovan Ilic
Enviado el: jueves, 19 de noviembre de 2015 1:13
Para: MATPOWER discussion forum
Asunto: Re: Question about LMP

 

 

Dear Victor,

 

If there is no congestion in the network, there is the same LMP at all the 
nodes. 

The LMP consists of loss, congestion, and energy costs. DCOPF has no 

losses, and if there is no congestion only the energy cost is accounted for. 

You can think of it as if since there is no congestion or loss cost the energy 
can

be distributed to all nodes at the same price. 

 

Regards, 

Jovan Ilic

 

On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. 
<victor.hinoj...@usm.cl> wrote:

Dear Prof. Zimmerman,

I have a question about Local Marginal Prices (LMP) that are shown in
Matpower.

The definition of the LMP is the marginal cost of supplying, at least cost,
the next increment of electric demand at a specific location (node) on the
electric power network, taking into account both supply (generation/import)
bids and demand (load/export) offers and the physical aspects of the
transmission system including transmission and other operational
constraints.

When it is performed a DCOPF, Matpower shows LMP for each bus considering
the marginal cost (energy cost) and the congestion cost so that I'd like to
know why the generation constraints (maximum and minimum power) aren't
considered in the LMP.

Thank you so much for your ideas and comments.

Regards,

Vh

 



Re: Question about LMP

2015-11-19 Thread Kanis Kanis

Dear all,

I would like to ask something more about LMPs. Is there any function 
like DCOPF that incorporates the impact of losses in
the calculation of LMPs, like the models (that are now applied in PJM, 
NYISO etc.) which explicitly balance the losses in the energy balance 
equation?


Thank for your comments.

Regards Gregory.




On 11/19/2015 6:12 AM, Jovan Ilic wrote:


Dear Victor,

If there is no congestion in the network, there is the same LMP at all 
the nodes.

The LMP consists of loss, congestion, and energy costs. DCOPF has no
losses, and if there is no congestion only the energy cost is 
accounted for.
You can think of it as if since there is no congestion or loss cost 
the energy can

be distributed to all nodes at the same price.

Regards,
Jovan Ilic

On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. 
<victor.hinoj...@usm.cl <mailto:victor.hinoj...@usm.cl>> wrote:


Dear Prof. Zimmerman,

    I have a question about Local Marginal Prices (LMP) that are shown in
Matpower.

The definition of the LMP is the marginal cost of supplying, at
least cost,
the next increment of electric demand at a specific location
(node) on the
electric power network, taking into account both supply
(generation/import)
bids and demand (load/export) offers and the physical aspects of the
transmission system including transmission and other operational
constraints.

When it is performed a DCOPF, Matpower shows LMP for each bus
considering
the marginal cost (energy cost) and the congestion cost so that
I'd like to
know why the generation constraints (maximum and minimum power) aren't
considered in the LMP.

Thank you so much for your ideas and comments.

Regards,

Vh







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


RE: Question about LMP

2015-11-19 Thread Sarmad Hanif
Dear Vh,

Regarding your question: why LMP doesn’t include the Lagrange multipliers 
related to generation inequality constraints

The answer is it does!! As Carlos explained:

f'(Pg1) + mu_+ - mu_-- \lambda_P1 = 0

or \lambda_P1 = f'(Pg1) + mu_+ - mu_-

Your dual problem should also state the same.

As far as the interpretation goes for the LMP, quoting Ray’s response for an 
uncongested case:

LMP will equal the marginal cost of generation plus (minus) the shadow price on 
the binding upper (lower) generation constraint.


Regarding the book “ Spot pricing of electricity”, I haven’t read it yet. 
Hopefully, I will get my hands on it soon!

I hope this clears.

Regards,

Sarmad





From: bounce-119913453-74036...@list.cornell.edu 
[mailto:bounce-119913453-74036...@list.cornell.edu] On Behalf Of Victor Hugo 
Hinojosa M.
Sent: Thursday, 19 November, 2015 9:28 PM
To: 'MATPOWER discussion forum'
Subject: RE: Question about LMP

Dear Jovan and Sarmad,
I agree with your comments about LMP. In this analysis I’m not considered the 
congestion. If the generation inequality constraints aren’t active, Matpower 
prints this information correctly, and It’s possible to realize different 
prices when the lines is congested. Sarmad, I’ve verified your idea. Despite 
the fact that the shadow price for the minimum or maximum is active, the LMP 
shown are the same for all buses.
My question is about why LMP doesn’t include the Lagrange multipliers related 
to generation inequality constraints. I did a model using the dual problem for 
the DCOPF, and I realized that dual constraints are the prices for each buses. 
It’s very clear in those constraints that those “prices” take into account the 
marginal cost, the congestion cost through the partial transmission 
distribution factors (PTDF) and the generation constraints.
In the technical literature for the DCOPF (losses are neglected), the LPM are 
modeled considering energy cost and congestion cost. However, in the book “Spot 
pricing of electricity” from F. Schweppe et all, authors include these shadow 
prices in order to compute the spot prices.
I’d like to know your feedback about these comments.
Regards,
Vh

De: 
bounce-119912654-12657...@list.cornell.edu<mailto:bounce-119912654-12657...@list.cornell.edu>
 [mailto:bounce-119912654-12657...@list.cornell.edu] En nombre de Jovan Ilic
Enviado el: jueves, 19 de noviembre de 2015 1:13
Para: MATPOWER discussion forum
Asunto: Re: Question about LMP


Dear Victor,

If there is no congestion in the network, there is the same LMP at all the 
nodes.
The LMP consists of loss, congestion, and energy costs. DCOPF has no
losses, and if there is no congestion only the energy cost is accounted for.
You can think of it as if since there is no congestion or loss cost the energy 
can
be distributed to all nodes at the same price.

Regards,
Jovan Ilic

On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. 
<victor.hinoj...@usm.cl<mailto:victor.hinoj...@usm.cl>> wrote:
Dear Prof. Zimmerman,

I have a question about Local Marginal Prices (LMP) that are shown in
Matpower.

The definition of the LMP is the marginal cost of supplying, at least cost,
the next increment of electric demand at a specific location (node) on the
electric power network, taking into account both supply (generation/import)
bids and demand (load/export) offers and the physical aspects of the
transmission system including transmission and other operational
constraints.

When it is performed a DCOPF, Matpower shows LMP for each bus considering
the marginal cost (energy cost) and the congestion cost so that I'd like to
know why the generation constraints (maximum and minimum power) aren't
considered in the LMP.

Thank you so much for your ideas and comments.

Regards,

Vh




Re: Question about LMP

2015-11-19 Thread Ray Zimmerman
I think your question is whether MATPOWER includes a solver for a DCOPF with 
losses. The answer is that currently it does not.

   Ray


> On Nov 19, 2015, at 4:55 AM, Kanis Kanis <kaniskanis...@gmail.com> wrote:
> 
> Dear all,
> 
> I would like to ask something more about LMPs. Is there any function like 
> DCOPF that incorporates the impact of losses in 
> the calculation of LMPs, like the models (that are now applied in PJM, NYISO 
> etc.) which explicitly balance the losses in the energy balance equation?
> 
> Thank for your comments.
> 
> Regards Gregory.
> 
> 
> 
> 
> On 11/19/2015 6:12 AM, Jovan Ilic wrote:
>> 
>> Dear Victor,
>> 
>> If there is no congestion in the network, there is the same LMP at all the 
>> nodes. 
>> The LMP consists of loss, congestion, and energy costs. DCOPF has no 
>> losses, and if there is no congestion only the energy cost is accounted for. 
>> You can think of it as if since there is no congestion or loss cost the 
>> energy can
>> be distributed to all nodes at the same price. 
>> 
>> Regards, 
>> Jovan Ilic
>> 
>> On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. < 
>> <mailto:victor.hinoj...@usm.cl>victor.hinoj...@usm.cl 
>> <mailto:victor.hinoj...@usm.cl>> wrote:
>> Dear Prof. Zimmerman,
>> 
>> I have a question about Local Marginal Prices (LMP) that are shown in
>> Matpower.
>> 
>> The definition of the LMP is the marginal cost of supplying, at least cost,
>> the next increment of electric demand at a specific location (node) on the
>> electric power network, taking into account both supply (generation/import)
>> bids and demand (load/export) offers and the physical aspects of the
>> transmission system including transmission and other operational
>> constraints.
>> 
>> When it is performed a DCOPF, Matpower shows LMP for each bus considering
>> the marginal cost (energy cost) and the congestion cost so that I'd like to
>> know why the generation constraints (maximum and minimum power) aren't
>> considered in the LMP.
>> 
>> Thank you so much for your ideas and comments.
>> 
>> Regards,
>> 
>> Vh
>> 
>> 
>> 
> 
> 
> 
>   <https://www.avast.com/antivirus>   
> This email has been checked for viruses by Avast antivirus software. 
> www.avast.com <https://www.avast.com/antivirus>



Re: Question about LMP

2015-11-19 Thread Ray Zimmerman
The LMPs for a DC OPF problem do incorporate any generator limits as well as 
generation cost. Consider the case with no congestion, where the LMPs are 
uniform at all nodes. For nodes with generators that are dispatched between 
their lower and upper limits, the LMP equals their marginal cost of generation. 
For a node with a generator at a binding upper (lower) limit, the LMP will 
equal the marginal cost of generation plus (minus) the shadow price on the 
binding upper (lower) generation constraint.

   Ray

> On Nov 19, 2015, at 8:27 AM, Victor Hugo Hinojosa M. <victor.hinoj...@usm.cl> 
> wrote:
> 
> Dear Jovan and Sarmad,
> I agree with your comments about LMP. In this analysis I’m not considered the 
> congestion. If the generation inequality constraints aren’t active, Matpower 
> prints this information correctly, and It’s possible to realize different 
> prices when the lines is congested. Sarmad, I’ve verified your idea. Despite 
> the fact that the shadow price for the minimum or maximum is active, the LMP 
> shown are the same for all buses.
> My question is about why LMP doesn’t include the Lagrange multipliers related 
> to generation inequality constraints. I did a model using the dual problem 
> for the DCOPF, and I realized that dual constraints are the prices for each 
> buses. It’s very clear in those constraints that those “prices” take into 
> account the marginal cost, the congestion cost through the partial 
> transmission distribution factors (PTDF) and the generation constraints.
> In the technical literature for the DCOPF (losses are neglected), the LPM are 
> modeled considering energy cost and congestion cost. However, in the book 
> “Spot pricing of electricity” from F. Schweppe et all, authors include these 
> shadow prices in order to compute the spot prices.
> I’d like to know your feedback about these comments.
> Regards,
> Vh
>  
> De: bounce-119912654-12657...@list.cornell.edu 
> [mailto:bounce-119912654-12657...@list.cornell.edu] En nombre de Jovan Ilic
> Enviado el: jueves, 19 de noviembre de 2015 1:13
> Para: MATPOWER discussion forum
> Asunto: Re: Question about LMP
>  
>  
> Dear Victor,
>  
> If there is no congestion in the network, there is the same LMP at all the 
> nodes. 
> The LMP consists of loss, congestion, and energy costs. DCOPF has no 
> losses, and if there is no congestion only the energy cost is accounted for. 
> You can think of it as if since there is no congestion or loss cost the 
> energy can
> be distributed to all nodes at the same price. 
>  
> Regards, 
> Jovan Ilic
>  
> On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. 
> <victor.hinoj...@usm.cl <mailto:victor.hinoj...@usm.cl>> wrote:
> Dear Prof. Zimmerman,
> 
> I have a question about Local Marginal Prices (LMP) that are shown in
> Matpower.
> 
> The definition of the LMP is the marginal cost of supplying, at least cost,
> the next increment of electric demand at a specific location (node) on the
> electric power network, taking into account both supply (generation/import)
> bids and demand (load/export) offers and the physical aspects of the
> transmission system including transmission and other operational
> constraints.
> 
> When it is performed a DCOPF, Matpower shows LMP for each bus considering
> the marginal cost (energy cost) and the congestion cost so that I'd like to
> know why the generation constraints (maximum and minimum power) aren't
> considered in the LMP.
> 
> Thank you so much for your ideas and comments.
> 
> Regards,
> 
> Vh
> 
> 
>  



RE: Question about LMP

2015-11-19 Thread Victor Hugo Hinojosa M.
Dear Jovan and Sarmad,

I agree with your comments about LMP. In this analysis I’m not considered the 
congestion. If the generation inequality constraints aren’t active, Matpower 
prints this information correctly, and It’s possible to realize different 
prices when the lines is congested. Sarmad, I’ve verified your idea. Despite 
the fact that the shadow price for the minimum or maximum is active, the LMP 
shown are the same for all buses. 

My question is about why LMP doesn’t include the Lagrange multipliers related 
to generation inequality constraints. I did a model using the dual problem for 
the DCOPF, and I realized that dual constraints are the prices for each buses. 
It’s very clear in those constraints that those “prices” take into account the 
marginal cost, the congestion cost through the partial transmission 
distribution factors (PTDF) and the generation constraints. 

In the technical literature for the DCOPF (losses are neglected), the LPM are 
modeled considering energy cost and congestion cost. However, in the book “Spot 
pricing of electricity” from F. Schweppe et all, authors include these shadow 
prices in order to compute the spot prices.

I’d like to know your feedback about these comments.

Regards,

Vh

 

De: bounce-119912654-12657...@list.cornell.edu 
[mailto:bounce-119912654-12657...@list.cornell.edu] En nombre de Jovan Ilic
Enviado el: jueves, 19 de noviembre de 2015 1:13
Para: MATPOWER discussion forum
Asunto: Re: Question about LMP

 

 

Dear Victor,

 

If there is no congestion in the network, there is the same LMP at all the 
nodes. 

The LMP consists of loss, congestion, and energy costs. DCOPF has no 

losses, and if there is no congestion only the energy cost is accounted for. 

You can think of it as if since there is no congestion or loss cost the energy 
can

be distributed to all nodes at the same price. 

 

Regards, 

Jovan Ilic

 

On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. 
<victor.hinoj...@usm.cl> wrote:

Dear Prof. Zimmerman,

I have a question about Local Marginal Prices (LMP) that are shown in
Matpower.

The definition of the LMP is the marginal cost of supplying, at least cost,
the next increment of electric demand at a specific location (node) on the
electric power network, taking into account both supply (generation/import)
bids and demand (load/export) offers and the physical aspects of the
transmission system including transmission and other operational
constraints.

When it is performed a DCOPF, Matpower shows LMP for each bus considering
the marginal cost (energy cost) and the congestion cost so that I'd like to
know why the generation constraints (maximum and minimum power) aren't
considered in the LMP.

Thank you so much for your ideas and comments.

Regards,

Vh



 



Question about LMP

2015-11-18 Thread Victor Hugo Hinojosa M.
Dear Prof. Zimmerman,

I have a question about Local Marginal Prices (LMP) that are shown in
Matpower. 

The definition of the LMP is the marginal cost of supplying, at least cost,
the next increment of electric demand at a specific location (node) on the
electric power network, taking into account both supply (generation/import)
bids and demand (load/export) offers and the physical aspects of the
transmission system including transmission and other operational
constraints.

When it is performed a DCOPF, Matpower shows LMP for each bus considering
the marginal cost (energy cost) and the congestion cost so that I'd like to
know why the generation constraints (maximum and minimum power) aren't
considered in the LMP.

Thank you so much for your ideas and comments.

Regards,

Vh




Re: Question about LMP

2015-11-18 Thread Jovan Ilic
Dear Victor,

If there is no congestion in the network, there is the same LMP at all the
nodes.
The LMP consists of loss, congestion, and energy costs. DCOPF has no
losses, and if there is no congestion only the energy cost is accounted
for.
You can think of it as if since there is no congestion or loss cost the
energy can
be distributed to all nodes at the same price.

Regards,
Jovan Ilic

On Wed, Nov 18, 2015 at 4:37 PM, Victor Hugo Hinojosa M. <
victor.hinoj...@usm.cl> wrote:

> Dear Prof. Zimmerman,
>
> I have a question about Local Marginal Prices (LMP) that are shown in
> Matpower.
>
> The definition of the LMP is the marginal cost of supplying, at least cost,
> the next increment of electric demand at a specific location (node) on the
> electric power network, taking into account both supply (generation/import)
> bids and demand (load/export) offers and the physical aspects of the
> transmission system including transmission and other operational
> constraints.
>
> When it is performed a DCOPF, Matpower shows LMP for each bus considering
> the marginal cost (energy cost) and the congestion cost so that I'd like to
> know why the generation constraints (maximum and minimum power) aren't
> considered in the LMP.
>
> Thank you so much for your ideas and comments.
>
> Regards,
>
> Vh
>
>
>


Re: Question about sparsity-based implementation in MATPower

2015-10-23 Thread Shruti Rao
Thank you again, for taking the time out to respond to my enquiry.

Shruti

On Fri, Oct 23, 2015 at 3:06 AM, Jose Luis Marin <mari...@gridquant.com>
wrote:

> Hi Shruti,
>
> In that case I was refering to our C implementation of HELM, but yes, we
> do the factorization just once and save the triangular factors, in order to
> use them repeatedly.
>
> You can actually see how this is also done in MATPOWER, in the Fast
> Decoupled methods (fdpf.m). These methods factorize the matrices just once
> and keep them constant throughout the iterations.  The Matlab function
> you're looking for is lu(), see Lines 80--104 and 129--135 in
> http://www.pserc.cornell.edu//matpower/docs/ref/matpower5.1/fdpf.html
>
>
> Regards,
>
> --
> Jose L. Marin
> Gridquant España SL
> Grupo AIA
>
>
> On Fri, Oct 23, 2015 at 5:22 AM, Shruti Rao <sra...@asu.edu> wrote:
>
>> Greetings Dr. Marin,
>>
>> In the variant of HELM, do you use backslash as well? The reason I ask
>> this question is, one of the advantages of the HELM is that the matrix does
>> not change for a given static problem (not considering bus-type switching
>> and tap changing etc.). As far as I know and I might be wrong, but
>> backslash will perform the matrix factorization every time we use it. But
>> if the matrix does not change, won't we save a lot of computation time by
>> doing the factorization only once and then doing only forward and backward
>> substitutions for finding the higher order series terms?
>>
>>
>> Regards,
>> Shruti
>>
>> On Thu, Oct 22, 2015 at 1:01 AM, Jose Luis Marin <mari...@gridquant.com>
>> wrote:
>>
>>> Hello Shri,
>>>
>>> Most of the testing we did was on CHOLMOD, as the matrices in our
>>> problem (from a variant of our HELM algorithm) were symmetric. We found
>>> that the simplicial option was always much faster than the supernodal one,
>>> since the "supernodes" were always too small.  We never got around to test
>>> KLU properly, sorry.  What is the PETSc linear solver that you're comparing
>>> to? Is it direct or iterative?  What is the storage format for sparse
>>> matrices in PETSc?  One wild guess at why you may be seeing this large
>>> difference is that there could be an overhead in converting back and forth
>>> to the compressed-sparse-column format used by KLU.  Another easy thing to
>>> test is to just deactivate the BTF step in KLU, and see if it helps with
>>> power system matrices.  If I had the time I would like to also benchmark
>>> the LU solver from CXSparse, which seems to be the simplest, barebones
>>> implementation of a simplicial sparse solver.
>>>
>>> --
>>> Jose L. Marin
>>> Gridquant España SL
>>> Grupo AIA
>>>
>>>
>>>
>>> On Wed, Oct 21, 2015 at 3:19 AM, Abhyankar, Shrirang G. <abhy...@anl.gov
>>> > wrote:
>>>
>>>> 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 thr

Re: Question about sparsity-based implementation in MATPower

2015-10-22 Thread Jose Luis Marin
Hello Shri,

Most of the testing we did was on CHOLMOD, as the matrices in our problem
(from a variant of our HELM algorithm) were symmetric. We found that the
simplicial option was always much faster than the supernodal one, since the
"supernodes" were always too small.  We never got around to test KLU
properly, sorry.  What is the PETSc linear solver that you're comparing to?
Is it direct or iterative?  What is the storage format for sparse matrices
in PETSc?  One wild guess at why you may be seeing this large difference is
that there could be an overhead in converting back and forth to the
compressed-sparse-column format used by KLU.  Another easy thing to test is
to just deactivate the BTF step in KLU, and see if it helps with power
system matrices.  If I had the time I would like to also benchmark the LU
solver from CXSparse, which seems to be the simplest, barebones
implementation of a simplicial sparse solver.

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



On Wed, Oct 21, 2015 at 3:19 AM, Abhyankar, Shrirang G. <abhy...@anl.gov>
wrote:

> 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 <mari...@gridquant.com>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Monday, October 19, 2015 at 12:15 PM
>
> To: MATPOWER discussion forum <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 <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 PARDIS

Re: Question about sparsity-based implementation in MATPower

2015-10-22 Thread Shruti Rao
Greetings Dr. Marin,

In the variant of HELM, do you use backslash as well? The reason I ask this
question is, one of the advantages of the HELM is that the matrix does not
change for a given static problem (not considering bus-type switching and
tap changing etc.). As far as I know and I might be wrong, but backslash
will perform the matrix factorization every time we use it. But if the
matrix does not change, won't we save a lot of computation time by doing
the factorization only once and then doing only forward and backward
substitutions for finding the higher order series terms?


Regards,
Shruti

On Thu, Oct 22, 2015 at 1:01 AM, Jose Luis Marin <mari...@gridquant.com>
wrote:

> Hello Shri,
>
> Most of the testing we did was on CHOLMOD, as the matrices in our problem
> (from a variant of our HELM algorithm) were symmetric. We found that the
> simplicial option was always much faster than the supernodal one, since the
> "supernodes" were always too small.  We never got around to test KLU
> properly, sorry.  What is the PETSc linear solver that you're comparing to?
> Is it direct or iterative?  What is the storage format for sparse matrices
> in PETSc?  One wild guess at why you may be seeing this large difference is
> that there could be an overhead in converting back and forth to the
> compressed-sparse-column format used by KLU.  Another easy thing to test is
> to just deactivate the BTF step in KLU, and see if it helps with power
> system matrices.  If I had the time I would like to also benchmark the LU
> solver from CXSparse, which seems to be the simplest, barebones
> implementation of a simplicial sparse solver.
>
> --
> Jose L. Marin
> Gridquant España SL
> Grupo AIA
>
>
>
> On Wed, Oct 21, 2015 at 3:19 AM, Abhyankar, Shrirang G. <abhy...@anl.gov>
> wrote:
>
>> 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 <mari...@gridquant.com>
>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>> Date: Monday, October 19, 2015 at 12:15 PM
>>
>> To: MATPOWER discussion forum <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 essenti

Re: Question about sparsity-based implementation in MATPower

2015-10-19 Thread Ray Zimmerman
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 <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. <abhy...@anl.gov 
> <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 <sra...@asu.edu <mailto:sra...@asu.edu>>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <mailto:matpowe...@list.cornell.edu>>
> Date: Sunday, October 18, 2015 at 8:31 PM
> To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <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. <abhy...@anl.gov 
> <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 <sra...@asu.edu <mailto:sra...@asu.edu>>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <mailto:matpowe...@list.cornell.edu>>
> Date: Sunday, October 18, 2015 at 5:37 PM
> To: MATPOWER discussion forum <matpowe...@list.cornell.edu 
> <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 <tel:650%20996%200116>
> 
> 
> -- 
> Best Regards,
> Shruti Dwarkanath Rao
> 
> Graduate Research Assistant
> School of Electrical, Computer and Energy Engineering
> Arizona State University
> Tempe, AZ, 85281
> 650 996 0116 <tel:650%20996%200116>
> 
> 
> -- 
> 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-19 Thread Shruti Rao
Thank you Dr. Zimmerman and Dr. Marin. I greatly appreciate your valuable
inputs.

Cheers!

Shruti

On Mon, Oct 19, 2015 at 10:15 AM, Jose Luis Marin <mari...@gridquant.com>
wrote:

>
> 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 <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 <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. <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 <sra...@asu.edu>
>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>> Date: Sunday, October 18, 2015 at 8:31 PM
>>> To: MATPOWER discussion forum <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. <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 <sra...@asu.edu>
>>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu&g

Re: Question about sparsity-based implementation in MATPower

2015-10-19 Thread Jose Luis Marin
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 <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 <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. <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 <sra...@asu.edu>
>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>> Date: Sunday, October 18, 2015 at 8:31 PM
>> To: MATPOWER discussion forum <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. <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 <sra...@asu.edu>
>>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>>> Date: Sunday, October 18, 2015 at 5:37 PM
>>> To: MATPOWER discussion forum <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

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 <sra...@asu.edu<mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 5:37 PM
To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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


Question about sparsity-based implementation in MATPower

2015-10-18 Thread Shruti Rao
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: Question about sparsity-based implementation in MATPower

2015-10-18 Thread Shruti Rao
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. <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 <sra...@asu.edu>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Sunday, October 18, 2015 at 5:37 PM
> To: MATPOWER discussion forum <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.
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 <sra...@asu.edu<mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 8:31 PM
To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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. 
<abhy...@anl.gov<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 <sra...@asu.edu<mailto:sra...@asu.edu>>
Reply-To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<mailto:matpowe...@list.cornell.edu>>
Date: Sunday, October 18, 2015 at 5:37 PM
To: MATPOWER discussion forum 
<matpowe...@list.cornell.edu<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<tel:650%20996%200116>



--
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 Shruti Rao
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. <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 <sra...@asu.edu>
> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
> Date: Sunday, October 18, 2015 at 8:31 PM
> To: MATPOWER discussion forum <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. <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 <sra...@asu.edu>
>> Reply-To: MATPOWER discussion forum <matpowe...@list.cornell.edu>
>> Date: Sunday, October 18, 2015 at 5:37 PM
>> To: MATPOWER discussion forum <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
>
>


-- 
Best Regards,
Shruti Dwarkanath Rao

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


Question about the user defined cost constraints

2015-08-07 Thread Jun Hao
Dear Professor:

I am a Matpower beginner. I have read some of the emails in Email Archive.
And I've learned a lot from those email. But I still have some questions to
ask.
1) There is not a lot description about matrix A in 6.3.2 user-defined
constraints. Could you please give me a further description about building
matrix A. Assume  there is a 16 buses system with 6 generations and I want
to add one constraint to ensure that power generation equals to the loads.
2) By far, dispatchable loads is the only way to simulate renewable energy?

Thank you very much.

Best,
Jun Hao


OPF question convergence

2015-08-03 Thread Gamze Dogan

Dear all,
I have a very strange problem using the matpower function runuopf.

I launch several iteration of runuopf and one case give me a non convergent 
solution (success flag is zero).

Within my code, I save the values the runuopf function uses, so it goes:
save casefileresultsOPF = runuopf(casefile,mpoption('OUT_ALL', 0, 'VERBOSE', 0, 
'OPF_FLOW_LIM', 2)); 
So then, after the simulation ends, I wanted to see why the OPF did not 
converge, but, when I opened matlab and loaded the casefile, this one 
succeeded So I just did:
load casefile;resultsOPF3 = runuopf(casefile,mpoption('OUT_ALL', 0, 'VERBOSE', 
0, 'OPF_FLOW_LIM', 2)); 
But this one succeeds which is not consistent with the results I got from the 
function within the whole simulation.

Did anyone ever had that kind of problem?

Here, you can fin attached, the casefile (datacase), the results within the 
simulation, which does not converge (resultsSIM) and the results after the 
simulation, using the casefile, and which does converge (results)

Any suggestion on how to explain and/or avoid this, is wellcome, thank you very 
much,
G.D.  

datacase.mat
Description: Binary data


resultsSIM.mat
Description: Binary data


results.mat
Description: Binary data


Question regarding scaling the loads and generation in MATPower

2015-04-13 Thread Shruti Rao
Hi all,

I was trying to scale the loads and generation in MATPower using the
following lines:

clc;clear all;
define_constants;
mpcb = loadcase('case118'); % load base case
mpct = mpcb; % set up target case with
mpct.bus(:, VM) = 1;
mpct.bus(:, VA) = 0;
mpct.gen(:, VG) = 1;
mpopt = mpoption('pf.tol', 1e-3,'pf.nr.max_it',
100,'pf.enforce_q_lims',1,'out.all', 1, 'verbose', 3);
mpct.gen(:,PG)=mpct.gen(:,PG)*1.82736;
mpct.gen(:,QG)=mpct.gen(:,QG)*1.82736;
mpct.bus(:, PD) = mpcb.bus(:, PD)*1.82736; % and increased load
mpct.bus(:, QD) = mpcb.bus(:, PD)*1.82736; % and increased load
results = runpf(mpct, mpopt);

The above code said that the power flow did not converge at that scaled
loading level. However, on changing the order of the scaling (with the rest
of the code remaining same) as follows, I got a solution:

mpct.bus(:,PD)=mpcb.bus(:,PD)*1.82736;
mpct.gen(:,PG)=mpcb.gen(:,PG)*1.82736;
mpct.bus(:,QD)=mpcb.bus(:,QD)*1.82736;
mpct.gen(:,QG)=mpcb.gen(:,QG)*1.82736;

 I have attached my published MATLAB code with the results.

Why should the two codes give different results? Is there a reason behind
having to follow a particular order? Which order should we follow?

Thank you!
-- 
Best Regards,
Shruti Dwarkanath Rao

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


MATPower_Conflicting_solutions.pdf
Description: Adobe PDF document


Re: Question regarding scaling the loads and generation in MATPower

2015-04-13 Thread Shruti Rao
I am extremely sorry about this. Thank you!

On Mon, Apr 13, 2015 at 4:48 PM, Ray Zimmerman r...@cornell.edu wrote:

 I almost started to become superstitious …

 … then I noticed a typo in the last line before the call to runpf().
 Left-hand side has QD, right-hand side has PD.

Ray


 On Apr 13, 2015, at 3:58 PM, Shruti Rao sra...@asu.edu wrote:

 Hi all,

 I was trying to scale the loads and generation in MATPower using the
 following lines:

 clc;clear all;
 define_constants;
 mpcb = loadcase('case118'); % load base case
 mpct = mpcb; % set up target case with
 mpct.bus(:, VM) = 1;
 mpct.bus(:, VA) = 0;
 mpct.gen(:, VG) = 1;
 mpopt = mpoption('pf.tol', 1e-3,'pf.nr.max_it',
 100,'pf.enforce_q_lims',1,'out.all', 1, 'verbose', 3);
 mpct.gen(:,PG)=mpct.gen(:,PG)*1.82736;
 mpct.gen(:,QG)=mpct.gen(:,QG)*1.82736;
 mpct.bus(:, PD) = mpcb.bus(:, PD)*1.82736; % and increased load
 mpct.bus(:, QD) = mpcb.bus(:, PD)*1.82736; % and increased load
 results = runpf(mpct, mpopt);

 The above code said that the power flow did not converge at that scaled
 loading level. However, on changing the order of the scaling (with the rest
 of the code remaining same) as follows, I got a solution:

 mpct.bus(:,PD)=mpcb.bus(:,PD)*1.82736;
 mpct.gen(:,PG)=mpcb.gen(:,PG)*1.82736;
 mpct.bus(:,QD)=mpcb.bus(:,QD)*1.82736;
 mpct.gen(:,QG)=mpcb.gen(:,QG)*1.82736;

  I have attached my published MATLAB code with the results.

 Why should the two codes give different results? Is there a reason behind
 having to follow a particular order? Which order should we follow?

 Thank you!
 --
 Best Regards,
 Shruti Dwarkanath Rao

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





-- 
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 regarding scaling the loads and generation in MATPower

2015-04-13 Thread Ray Zimmerman
I almost started to become superstitious …

… then I noticed a typo in the last line before the call to runpf(). Left-hand 
side has QD, right-hand side has PD.

   Ray


 On Apr 13, 2015, at 3:58 PM, Shruti Rao sra...@asu.edu wrote:
 
 Hi all,
 
 I was trying to scale the loads and generation in MATPower using the 
 following lines:
 
 clc;clear all;
 define_constants;
 mpcb = loadcase('case118'); % load base case
 mpct = mpcb; % set up target case with
 mpct.bus(:, VM) = 1;
 mpct.bus(:, VA) = 0;
 mpct.gen(:, VG) = 1;
 mpopt = mpoption('pf.tol', 1e-3,'pf.nr.max_it', 
 100,'pf.enforce_q_lims',1,'out.all', 1, 'verbose', 3);
 mpct.gen(:,PG)=mpct.gen(:,PG)*1.82736;
 mpct.gen(:,QG)=mpct.gen(:,QG)*1.82736;
 mpct.bus(:, PD) = mpcb.bus(:, PD)*1.82736; % and increased load
 mpct.bus(:, QD) = mpcb.bus(:, PD)*1.82736; % and increased load
 results = runpf(mpct, mpopt);
 
 The above code said that the power flow did not converge at that scaled 
 loading level. However, on changing the order of the scaling (with the rest 
 of the code remaining same) as follows, I got a solution:
 
 mpct.bus(:,PD)=mpcb.bus(:,PD)*1.82736;
 mpct.gen(:,PG)=mpcb.gen(:,PG)*1.82736;
 mpct.bus(:,QD)=mpcb.bus(:,QD)*1.82736;
 mpct.gen(:,QG)=mpcb.gen(:,QG)*1.82736;
 
  I have attached my published MATLAB code with the results.
 
 Why should the two codes give different results? Is there a reason behind 
 having to follow a particular order? Which order should we follow?
 
 Thank you!
 -- 
 Best Regards,
 Shruti Dwarkanath Rao
 
 Graduate Research Assistant
 School of Electrical, Computer and Energy Engineering
 Arizona State University
 Tempe, AZ, 85281
 650 996 0116
 MATPower_Conflicting_solutions.pdf



One Question

2014-10-05 Thread iran iet
Hi, everyone
Is MATPOWER able to analysis unbalanced load flow?
I have many unbalanced load in a distribution system and i want to run load
flow.
Thanks


<    1   2   3   4   5   >