Simulation slow down due to addition of DC lines

2015-04-13 Thread Eser Patrick
Dear MATPOWER community,

I have a question regarding adding DC lines to an AC system with the 
“toggle_dcline" command.

I am running a 1100-bus system, using IPOPT as solver. When I solve the 
standard ACOPF system, the simulation converges within 7 seconds (40 
iterations). Now when I add one DC line of 10 MW capacity, applying the 
“toggle_dcline” command, the system needs 38 seconds (310 iterations) to 
converge. Since I have not really changed the system with adding one single 10 
MW DC line, the results between both cases are 99.99% identical.

So why is it, that the DC-line case needs so much more iterations to converge 
(factor 5 more)? The parameters of my fictitious DC line are:

PMAX = +10 MW
PMIN = -10 MW
QMINF, QMINT both = -10 MVAr
QMAXF, QMAXT both = +10 MVAr
VF, VT both = 1.0 p.u.
LOSS0 = 0.1
LOSS1 = 0 (since I want to enable the code to use the DC in both directions, 
following a comment in the MATPOWER manual)

Have I messed up the definition of the DC line? If not, is there a workaround 
to bring individual DC lines into a predominantly AC system without having a 
runtime penalty of factor of 3-5? Or do I just need to re-adjust several 
parameters of the IPOPT solver to set it up for new constraints of the type 
“lower bound only”? In the AC-only system, I only have “both lower and upper 
bound” constraints, so maybe my IPOPT is set up to handle only those 
constraints properly?

Any hints would appreciated. Thanks a lot.

Best,

Patrick Eser


Re: Transmission Cost Method Explanation

2015-04-13 Thread Ray Zimmerman
I don’t understand your question. But to reiterate, MATPOWER does not include 
any SQP algorithm code.

   Ray


> On Apr 11, 2015, at 4:19 AM, Rurizwan Syahru Wibisana  
> wrote:
> 
> is it you have manual calculation in simple case for sqp algorithm for 
> optimal power flow?
> 
> On Mon, Feb 9, 2015 at 8:39 PM, Rurizwan Syahru Wibisana 
> mailto:rurizwa...@gmail.com>> wrote:
> is fmincon solver equal to SQP solver?
> 
> On Mon, Feb 9, 2015 at 8:19 AM, Ray Zimmerman  > wrote:
> Please see FAQ #2 . The LMP 
> from an OPF solution can be found in the LAM_P column of results.bus (see 
> Table 6-1 in the User’s Manual 
> ). MATPOWER does not 
> implement any SQP solvers.
> 
>Ray
> 
> 
>> On Feb 7, 2015, at 4:29 AM, Rurizwan Syahru Wibisana > > wrote:
>> 
>> Dear All
>>  I have Final Project about transmission cost optimization,please help me to 
>> describe how to use Locational Marginal Price and Sequential Quadratic 
>> Programming in matpower.
>> Thanks for your time, I hope anyone can help me.
> 
> 
> 



Re: Simulation slow down due to addition of DC lines

2015-04-13 Thread Ray Zimmerman
I suppose this is a bit unusual, but I don’t think you are doing anything 
wrong. The most likely explanation is simply that adding a dispatchable DC line 
where you did somehow makes the problem numerically much more difficult to 
solve. You might try changing the from and to bus parameters for the line (i.e. 
moving it around the network). My guess is that you’ll find some cases solve 
just as quick as the original and some (like your original location) take much 
longer. I’d be curious to know whether you see the same sort of variation in 
solve times when using a different solver (such as MIPS, fmincon or Knitro).

-- 
Ray Zimmerman
Senior Research Associate
B30 Warren Hall, Cornell University, Ithaca, NY 14853  USA
phone: (607) 255-9645

> On Apr 13, 2015, at 7:51 AM, Eser Patrick  wrote:
> 
> Dear MATPOWER community,
> 
> I have a question regarding adding DC lines to an AC system with the 
> “toggle_dcline" command.
> 
> I am running a 1100-bus system, using IPOPT as solver. When I solve the 
> standard ACOPF system, the simulation converges within 7 seconds (40 
> iterations). Now when I add one DC line of 10 MW capacity, applying the 
> “toggle_dcline” command, the system needs 38 seconds (310 iterations) to 
> converge. Since I have not really changed the system with adding one single 
> 10 MW DC line, the results between both cases are 99.99% identical.
> 
> So why is it, that the DC-line case needs so much more iterations to converge 
> (factor 5 more)? The parameters of my fictitious DC line are:
> 
> PMAX = +10 MW
> PMIN = -10 MW
> QMINF, QMINT both = -10 MVAr
> QMAXF, QMAXT both = +10 MVAr
> VF, VT both = 1.0 p.u.
> LOSS0 = 0.1
> LOSS1 = 0 (since I want to enable the code to use the DC in both directions, 
> following a comment in the MATPOWER manual)
> 
> Have I messed up the definition of the DC line? If not, is there a workaround 
> to bring individual DC lines into a predominantly AC system without having a 
> runtime penalty of factor of 3-5? Or do I just need to re-adjust several 
> parameters of the IPOPT solver to set it up for new constraints of the type 
> “lower bound only”? In the AC-only system, I only have “both lower and upper 
> bound” constraints, so maybe my IPOPT is set up to handle only those 
> constraints properly?
> 
> Any hints would appreciated. Thanks a lot.
> 
> Best,
> 
> Patrick Eser



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



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


-- 
Best Regards,
Shruti Dwarkanath Rao

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