Re: Continuation Power Flow

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

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

where cpf_user_callback is the name of your callback routine.

Read pages 38 - 40 of the manual.

Shri


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


Thanku so much sir for your help.

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

Sent from Yahoo Mail on 
Android


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

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

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

   Ray


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

thanku so much sir...

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




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


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

   Ray


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

Dear all,

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

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


Best Regards,

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








Re: Need help in ACOPF problem

2015-12-02 Thread Ray Zimmerman
1) It looks like you are setting up gencost correctly. The negative objective 
function value results from the fact that the curtailable loads are being 
modeled as negative generation, with negative costs (positive benefits). So 
rather than simply minimizing generating cost, the OPF is now minimizing the 
negative of the net benefits (i.e. maximizing the net benefits). The objective 
function value is then the negative of the net benefits, so we expect it to be 
a large negative number.

2) Yes. But to be precise, these curtailments and redispatches are not given 
directly by res.gen(:, PG), but by the deviation of res.gen(:, PG) from the 
corresponding nominal value, i.e. res.gen(:, PMAX) for renewables, res.gen(:, 
PMIN) for dispatchable loads, and the original dispatch reference point for 
conventional generators.

Ray



> On Dec 1, 2015, at 8:19 PM, Mirish Thakur  wrote:
> 
> Dear Prof. Ray Zimmerman,
> 
> 
> 
> Thank you very much for your help. I have implemented your suggestion of 
> relaxing constraints over conventional power plants and got successful 
> convergence on both model.  While doing so  in 2# model I kept minimum value 
> of generation Pmin=0, and instead of using single slack generator output to 
> supply system losses I increased all conventional generators output by 2% 
> means Pmax=(Original Pmax)*1.02. So that losses will be contributed by all 
> generators. But I want to clarify some doubts.
> 
> 
> 
> 1) My Objective Function Value = -243875269.94 $/hr is highly negative after 
> convergence, that I don’t understand why it’s highly negative. After 
> mpc=load2disp(mycase) I checked mpc.gencost matrix. In my case conventional 
> generators variable cost function is linear e.g.  [2  0  0  3  0  10.91  0] 
> and renewable generators and cross border generators cost is zero e.g. [2  0  
> 0  3  0  0  0] and for dispatchable loads I set linear cost function [2  0  0 
>  3  0  5000  0]. Am I using correct values in mpc.gencost matrix? Or I have 
> to use  for conventional power plants =  [2  0  0  3  0  0  0] and for both 
> renewables and dispatchable loads= [2  0  0  3  0  5000  0] ? Both approach 
> gives negative objective function value.
> 
> 
> 
> 2) When I perform successfully res=runopf(mpc) all curtailments on renewable 
> / loads / redispatch of conventional power plants  will be seen in 
> res.gen(:,2) column (second column of res.gen matrix) right? Thank you very 
> much for your time.
> 
> 
> Regards
> Mirish Thakur
> 
> On Mon, Nov 30, 2015 at 5:54 PM, Ray Zimmerman  > wrote:
> Hi Mirish,
> 
> There is no way to see the load or renewable curtailment until you get a 
> converging OPF. It is possible that you will also have to redispatch the 
> conventional generators in order to get a feasible solution. I would suggest 
> that you combine your option #2 with curtailable loads, relax the active 
> power dispatch constraints on the conventional generators (to their normal 
> limits) and assign piecewise linear costs to those generators with negative 
> or zero marginal cost up to Pg and large positive marginal cost above Pg. 
> This will attempt to minimize deviations from the original dispatch pattern, 
> hopefully moving only those generators necessary to relieve the line 
> overloads.
> 
> Ray
> 
>> On Nov 29, 2015, at 7:31 PM, Mirish Thakur > > wrote:
>> 
>> Hello friends,
>> 
>> 
>> 
>> I’m working on (1000 bus system) reactive power dispatch problem. I have 
>> modeled grid into matpower case file and I’m getting the results of runpf. 
>> But when I use ACOPF it fails to converge.
>> I have modeled grid into two methods
>> 1) I used all renewable energy sources generation, pump storage power plant 
>> and cross border energy transfer as negative load. And all conventional 
>> power plants as generators.  Dispatch of conventional generators is equal to 
>> residual load so demand is equal to generation. Further I have increased 
>> limits of slack generator to supply system losses and kept rest of 
>> generators dispatch constant by Pmax=Pmin=Pg. Also RATE_A limits should be 
>> unchanged. (Necessary condition for project).
>> 
>> 2) In other way all renewable energy sources generation, pump storage power 
>> plant and cross border energy transfer are modeled as generators and put 
>> next to all conventional power plants. And in gencost matrix I used zero 
>> variable cost for renewable generation. Slack generator and rest of the 
>> conditions are set as it is in first approach.
>> 
>> 
>> 
>> My question is in both modeling I got runpf successfully converged but I’m 
>> not getting convergence for ACOPF. So, I checked branch limits on some 
>> branches which I found overloaded by analyzing results of res= runpf 
>> (mymodel).  To avoid such overloading I want to change distribution pattern 
>> of load which might be cause of overloading of branches. I tried load2disp 
>> function to get curtailment on

Re: Need help in ACOPF problem

2015-12-02 Thread Mirish Thakur
Dear Prof. Ray,

Thanks a lot for clarifying my doubts. Actually I forgot to see that loads
are modeled as negative generator, instead I was focusing on energy prices
only. And in second one I didn't elaborate properly but I was thinking in
the same way. Thank you very much for your time.

Regards
Mirish Thakur

On Wed, Dec 2, 2015 at 6:02 PM, Ray Zimmerman  wrote:

> 1) It looks like you are setting up gencost correctly. The negative
> objective function value results from the fact that the curtailable loads
> are being modeled as negative generation, with negative costs (positive
> benefits). So rather than simply minimizing generating cost, the OPF is now
> minimizing the negative of the net benefits (i.e. maximizing the net
> benefits). The objective function value is then the negative of the net
> benefits, so we expect it to be a large negative number.
>
> 2) Yes. But to be precise, these curtailments and redispatches are not
> given directly by res.gen(:, PG), but by the deviation of res.gen(:, PG) from
> the corresponding nominal value, i.e. res.gen(:, PMAX) for renewables, 
> res.gen(:,
> PMIN) for dispatchable loads, and the original dispatch reference point
> for conventional generators.
>
> Ray
>
>
>
> On Dec 1, 2015, at 8:19 PM, Mirish Thakur  wrote:
>
> Dear Prof. Ray Zimmerman,
>
>
> Thank you very much for your help. I have implemented your suggestion of
> relaxing constraints over conventional power plants and got successful
> convergence on both model.  While doing so  in 2# model I kept minimum
> value of generation Pmin=0, and instead of using single slack generator
> output to supply system losses I increased all conventional generators
> output by 2% means Pmax=(Original Pmax)*1.02. So that losses will be
> contributed by all generators. But I want to clarify some doubts.
>
>
> 1) My *Objective Function Value = -243875269.94 $/hr* is highly negative
> after convergence, that I don’t understand why it’s highly negative. After
> *mpc=load2disp(mycase)* I checked mpc.gencost matrix. In my case
> conventional generators variable cost function is linear e.g.  [2  0  0  3
>  0  10.91  0] and renewable generators and cross border generators cost is
> zero e.g. [2  0  0  3  0  0  0] and for dispatchable loads I set linear
> cost function [2  0  0  3  0  5000  0]. Am I using correct values in
> mpc.gencost matrix? Or I have to use  for conventional power plants =  [2
>  0  0  3  0  0  0] and for both renewables and dispatchable loads= [2  0  0
>  3  0  5000  0] ? Both approach gives negative objective function value.
>
>
> 2) When I perform successfully *res=runopf(mpc) *all curtailments on
> renewable / loads / redispatch of conventional power plants  will be seen
> in *res.gen(:,2)* column (second column of res.gen matrix) right? Thank
> you very much for your time.
>
>
> Regards
>
> Mirish Thakur
>
> On Mon, Nov 30, 2015 at 5:54 PM, Ray Zimmerman  wrote:
>
>> Hi Mirish,
>>
>> There is no way to see the load or renewable curtailment until you get a
>> converging OPF. It is possible that you will also have to redispatch the
>> conventional generators in order to get a feasible solution. I would
>> suggest that you combine your option #2 with curtailable loads, relax the
>> active power dispatch constraints on the conventional generators (to their
>> normal limits) and assign piecewise linear costs to those generators with
>> negative or zero marginal cost up to Pg and large positive marginal cost
>> above Pg. This will attempt to minimize deviations from the original
>> dispatch pattern, hopefully moving only those generators necessary to
>> relieve the line overloads.
>>
>> Ray
>>
>> On Nov 29, 2015, at 7:31 PM, Mirish Thakur 
>> wrote:
>>
>> Hello friends,
>>
>>
>> I’m working on (1000 bus system) reactive power dispatch problem. I have
>> modeled grid into matpower case file and I’m getting the results of
>> *runpf*. But when I use *ACOPF* it fails to converge.
>>
>> I have modeled grid into two methods
>>
>> 1) I used all renewable energy sources generation, pump storage power
>> plant and cross border energy transfer as negative load. And all
>> conventional power plants as generators.  Dispatch of conventional
>> generators is equal to residual load so demand is equal to generation.
>> Further I have increased limits of slack generator to supply system losses
>> and kept rest of generators dispatch constant by *Pmax=Pmin=Pg*. Also
>> *RATE_A* limits should be unchanged. (Necessary condition for project).
>>
>>
>> 2) In other way all renewable energy sources generation, pump storage
>> power plant and cross border energy transfer are modeled as generators and
>> put next to all conventional power plants. And in *gencost *matrix I
>> used zero variable cost for renewable generation. Slack generator and rest
>> of the conditions are set as it is in first approach.
>>
>>
>> My question is in both modeling I got *runpf* successfully converged but
>> I’m not getting convergence for *A