Re: Power Voltage curve using matpower

2015-02-09 Thread Natakorn Thasnas
Dear Ray,

Regarding your previous email. Could you please explain more detail with
example calculation  how to get the values of critical power? Because I am
new for continuation power flow.

Best Regards,

Natakorn Thasnas

2015-02-04 4:33 GMT+07:00 Ray Zimmerman :

> Hi Arun,
>
> Since MATPOWER’s continuation power flow transfer is set up in a very
> general fashion as the difference between a base and target case, which may
> involve changes at multiple buses, there isn’t a single “power” number
> associated with each step. However, you can recover any power of interest
> from the results.cpf.lam_p and/or results.cpf.lam_c values and transfer
> (target - base) vector from equation (5.3) in the manual. The lambda values
> are used to interpolate between the base injections (lambda = 0) and the
> target injections (lambda = 1).
>
> --
> Ray Zimmerman
> Senior Research Associate
> B30 Warren Hall, Cornell University, Ithaca, NY 14853  USA
> phone: (607) 255-9645
>
> On Feb 3, 2015, at 12:47 PM, arun s nair  wrote:
>
> Hi All
>
> I am trying to use matpower to evaluate IEEE 39 bus system. I am  able to
> plot the PV curve of load buses and was also able to get the critical power
> and voltage values.
>
> I would like to know if its possible to get the power values at each
> iterations along with the voltage values ?
>
>
> I am using runcpf, and used  the below code.
>
> mpopt = mpoption('out.all',0,'verbose',2,'out.bus',1);
> mpopt = mpoption(mpopt,'cpf.stop_at','nose','cpf.step',0.2);
> mpopt = mpoption(mpopt,'cpf.plot.bus',3,'cpf.plot.level',2);
>
> mpcb = loadcase('case39'); % load base case
> mpct = mpcb; % set up target case with
> %mpct.gen(:,[PG QG]) = mpcb.gen(:,[PG QG])*2.5;
> mpct.bus(3,PD) = mpcb.bus(3,PD)*2.5;
> results = runcpf(mpcb, mpct, mpopt);
>
> CriticalPower = results.bus(3,3)
> CriticalVoltage = results.bus(3,8)
>
>
> Thanking in advance
>
> With Regards.
>
> Arun Nair
>
>
>


Re: Transmission Cost Method Explanation

2015-02-09 Thread Ray Zimmerman
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: Power Voltage curve using matpower

2015-02-09 Thread Ray Zimmerman
Ok, using the example from Section 5.5 in the manual, after running the code in 
the example on p. 38 to solve the case …

>> base_load = total_load(mpcb.bus)

base_load =

   315

>> target_load = total_load(mpct.bus)

target_load =

  787.5000

>> results.cpf.max_lam

ans =

0.9876

>> critical_load = base_load + results.cpf.max_lam * (target_load - base_load)

critical_load =

  781.6386


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

> On Feb 9, 2015, at 3:55 AM, Natakorn Thasnas  wrote:
> 
> Dear Ray,
> 
> Regarding your previous email. Could you please explain more detail with 
> example calculation  how to get the values of critical power? Because I am 
> new for continuation power flow.
> 
> Best Regards,
> 
> Natakorn Thasnas
> 
> 2015-02-04 4:33 GMT+07:00 Ray Zimmerman  >:
> Hi Arun,
> 
> Since MATPOWER’s continuation power flow transfer is set up in a very general 
> fashion as the difference between a base and target case, which may involve 
> changes at multiple buses, there isn’t a single “power” number associated 
> with each step. However, you can recover any power of interest from the 
> results.cpf.lam_p and/or results.cpf.lam_c values and transfer (target - 
> base) vector from equation (5.3) in the manual. The lambda values are used to 
> interpolate between the base injections (lambda = 0) and the target 
> injections (lambda = 1).
> 
> -- 
> Ray Zimmerman
> Senior Research Associate
> B30 Warren Hall, Cornell University, Ithaca, NY 14853  USA
> phone: (607) 255-9645
> 
>> On Feb 3, 2015, at 12:47 PM, arun s nair > > wrote:
>> 
>> Hi All
>> 
>> I am trying to use matpower to evaluate IEEE 39 bus system. I am  able to 
>> plot the PV curve of load buses and was also able to get the critical power 
>> and voltage values.
>> 
>> I would like to know if its possible to get the power values at each 
>> iterations along with the voltage values ?
>> 
>> 
>> I am using runcpf, and used  the below code.
>> 
>> mpopt = mpoption('out.all',0,'verbose',2,'out.bus',1);
>> mpopt = mpoption(mpopt,'cpf.stop_at','nose','cpf.step',0.2);
>> mpopt = mpoption(mpopt,'cpf.plot.bus',3,'cpf.plot.level',2);
>> 
>> mpcb = loadcase('case39'); % load base case
>> mpct = mpcb; % set up target case with
>> %mpct.gen(:,[PG QG]) = mpcb.gen(:,[PG QG])*2.5;
>> mpct.bus(3,PD) = mpcb.bus(3,PD)*2.5;
>> results = runcpf(mpcb, mpct, mpopt);
>> 
>> CriticalPower = results.bus(3,3)
>> CriticalVoltage = results.bus(3,8)
>> 
>> 
>> Thanking in advance
>> 
>> With Regards.
>> 
>> Arun Nair
> 
> 



Re: Power Voltage curve using matpower

2015-02-09 Thread Abhyankar, Shrirang G.
If you run a continuation power flow in MATPOWER, runcpf(), with the option 
'cpf_stop_at' set to NOSE then the CPF will terminate on reaching the nose 
point. runcpf() returns a mpc case struct that has details on the generation 
and loading at the critical point and the lambda (continuation parameter) and 
the predicted and corrected solutions at each continuation step. Please go 
through Chapter 5 in the MATPOWER 
manual for a discussion of 
the formulation, implementation, and the available options for MATPOWER's CPF.

Shri

From: Natakorn Thasnas mailto:natakorn.t...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Mon, 9 Feb 2015 15:55:31 +0700
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Re: Power Voltage curve using matpower

Dear Ray,

Regarding your previous email. Could you please explain more detail with 
example calculation  how to get the values of critical power? Because I am new 
for continuation power flow.

Best Regards,

Natakorn Thasnas

2015-02-04 4:33 GMT+07:00 Ray Zimmerman 
mailto:r...@cornell.edu>>:
Hi Arun,

Since MATPOWER’s continuation power flow transfer is set up in a very general 
fashion as the difference between a base and target case, which may involve 
changes at multiple buses, there isn’t a single “power” number associated with 
each step. However, you can recover any power of interest from the 
results.cpf.lam_p and/or results.cpf.lam_c values and transfer (target - base) 
vector from equation (5.3) in the manual. The lambda values are used to 
interpolate between the base injections (lambda = 0) and the target injections 
(lambda = 1).

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

On Feb 3, 2015, at 12:47 PM, arun s nair 
mailto:arunsnair...@gmail.com>> wrote:

Hi All

I am trying to use matpower to evaluate IEEE 39 bus system. I am  able to plot 
the PV curve of load buses and was also able to get the critical power and 
voltage values.

I would like to know if its possible to get the power values at each iterations 
along with the voltage values ?


I am using runcpf, and used  the below code.

mpopt = mpoption('out.all',0,'verbose',2,'out.bus',1);
mpopt = mpoption(mpopt,'cpf.stop_at','nose','cpf.step',0.2);
mpopt = mpoption(mpopt,'cpf.plot.bus',3,'cpf.plot.level',2);

mpcb = loadcase('case39'); % load base case
mpct = mpcb; % set up target case with
%mpct.gen(:,[PG QG]) = mpcb.gen(:,[PG QG])*2.5;
mpct.bus(3,PD) = mpcb.bus(3,PD)*2.5;
results = runcpf(mpcb, mpct, mpopt);

CriticalPower = results.bus(3,3)
CriticalVoltage = results.bus(3,8)


Thanking in advance

With Regards.

Arun Nair




Jacobian matrix of 5 bus system

2015-02-09 Thread Kanis

Hello,
i have the following test case and i'm trying to find the Jacobian 
matrix of NR method using the /makeJac/ function of matpower and a code 
that i have implemented in matlab.
However, the results between the two methods, which are attached below, 
are different and i think that my code shows the correct Jacobian. Can 
you please tell me if i implement wrong /makeJac /function. I write 
mpc=case5_v1; makeJac(mpc);



function mpc = case5_v1
mpc.version = '2';
%% system MVA base
mpc.baseMVA = 100;

%% bus data
%   bus_i   typePd  Qd  Gs  Bs  area Vm  
Va baseKV  zoneVmaxVmin

mpc.bus = [
1   3   0   0   0   0   1 1   
0   230 1   1.1 0.9;
2   1   300 100 0   0   1 1   
0   230 1   1.1 0.9;
3   2   300 100 0   0   1 1   
0   230 1   1.1 0.9;
4   2   300 100 0   0   1 1   
0   230 1   1.1 0.9;
5   2   0   0   0   0   1 1   
0   230 1   1.1 0.9;

];

%% generator data
%   bus Pg  Qg  QmaxQminVg  mBase status  
PmaxPminPc1 Pc2 Qc1min  Qc1max  Qc2min Qc2max  ramp_agc  
ramp_10 ramp_30 ramp_q  apf

mpc.gen = [
1   0 0   30  -30 1   100 1
0 0   0   0   0   0   0 0   0   0   
0   0   0;
3   0 0   390 -3901   100 1
0 0   0   0   0   0   0 0   0   0   
0   0   0;
4   0 0   150 -1501   100 1
0 0   0   0   0   0   0 0   0   0   
0   0   0;
5   0 0   450 -4501   100 1
0 0   0   0   0   0   0 0   0   0   
0   0   0;

];

%% branch data
%   fbustbusr   x   b   rateA rateB   
rateC   ratio   angle   status  angmin  angmax

mpc.branch = [
1   2   0.00281 0.0281  0   999 999 999 
0   0   1   -360360;
1   4   0.00304 0.0304  0   999 999 999 
0   0   1   -360360;
1   5   0.00064 0.0064  0   999 999 999 
0   0   1   -360360;
2   3   0.00108 0.0108  0   999 999 999 
0   0   1   -360360;
3   4   0.00297 0.0297  0   999 999 999 
0   0   1   -360360;
4   5   0.00297 0.0297  0   240 240 240 
0   0   1   -360360;

];


*Results with matpower:*
  125.0125  -33.3367   0  -91.6758   -9.1676
  -33.3367   99.2424  -33.33670   0
0  -33.3367  188.0396  0 0
  -91.675800  126.9107   12.6911
9.1676 0 0  -12.6911  126.9107

*Results of my code:*
  126.9107  -91.6758  0  0   12.6911
  -91.6758  125.0125   -33.3367   0   -9.1676
 0-33.3367 99.2424  -33.3367   0
 0 0  -33.3367   188.0396  0
  -12.69119.1676  0 0 126.9107

Thank you in advance for your interest.




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


Re: Different kinds of loads on a bus

2015-02-09 Thread arun s nair
Hi Ray ,

Thanks for the reply.

With Regards

Nair

On Fri, Feb 6, 2015 at 1:54 PM, Ray Zimmerman  wrote:

> Currently MATPOWER only handles constant power loads. You could
> technically model a constant impedance load as well by putting the
> appropriate values in the GS and BS columns of the bus matrix, but these
> are not explicitly reported as loads, so you would have to manually compute
> the corresponding power draw at the solution.
>
>Ray
>
>
> > On Feb 6, 2015, at 3:25 PM, arun s nair  wrote:
> >
> > Hi
> >
> > I am trying to study the behavior of different kinds of loads on buses.
> >
> > Is there anyway in Matpower by which I can try different type of load
> models like a ZIP load model,Voltage dependent loads ,Exponential load etc
> on a bus to study the variations?
> >
> > (I have read that in the cpf method we use just constant power loads, is
> there a way I can do the same with a different load?)
> >
> > Thanking in advance
> >
> > With Regards
> >
> > Nair
>
>
>
>


Re: Jacobian matrix of 5 bus system

2015-02-09 Thread Ray Zimmerman
It looks to me like your matrix simply uses a different ordering of the rows 
and columns. My ordering places all PV buses before PQ buses for the real power 
rows and voltage angle columns, since that’s the way the variables and 
mismatches are ordered in newtonpf(). Looks like you have the same rows/cols, 
but ordered simply by bus number.

   Ray


> On Feb 9, 2015, at 12:11 PM, Kanis  wrote:
> 
> Hello, 
> i have the following test case and i'm trying to find the Jacobian matrix of 
> NR method using the makeJac function of matpower and a code that i have 
> implemented in matlab.
> However, the results between the two methods, which are attached below, are 
> different and i think that my code shows the correct Jacobian. Can you please 
> tell me if i implement wrong makeJac function. I write mpc=case5_v1; 
> makeJac(mpc); 
> 
> 
> function mpc = case5_v1
> mpc.version = '2';
> %% system MVA base
> mpc.baseMVA = 100;
> 
> %% bus data
> %   bus_i   typePd  Qd  Gs  Bs  areaVm  Va
>  baseKV  zoneVmaxVmin
> mpc.bus = [
> 1   3   0   0   0   0   1   1   0 
>   230 1   1.1 0.9;
> 2   1   300 100 0   0   1   1   0 
>   230 1   1.1 0.9;
> 3   2   300 100 0   0   1   1   0 
>   230 1   1.1 0.9;
> 4   2   300 100 0   0   1   1   0 
>   230 1   1.1 0.9;
> 5   2   0   0   0   0   1   1   0 
>   230 1   1.1 0.9;
> ];
> 
> %% generator data
> %   bus Pg  Qg  QmaxQminVg  mBase   status  Pmax  
>   PminPc1 Pc2 Qc1min  Qc1max  Qc2min  Qc2max  ramp_agc  ramp_10 
> ramp_30 ramp_q  apf
> mpc.gen = [
> 1   0 0   30  -30 1   100 10 
> 0   0   0   0   0   0   0   0   0   0 
>   0   0;
> 3   0 0   390 -3901   100 10 
> 0   0   0   0   0   0   0   0   0   0 
>   0   0;
> 4   0 0   150 -1501   100 10 
> 0   0   0   0   0   0   0   0   0   0 
>   0   0;
> 5   0 0   450 -4501   100 10 
> 0   0   0   0   0   0   0   0   0   0 
>   0   0;
> ];
> 
> %% branch data
> %   fbustbusr   x   b   rateA   rateB   rateC 
>   ratio   angle   status  angmin  angmax
> mpc.branch = [
> 1   2   0.00281 0.0281  0   999 999 999 0 
>   0   1   -360360;
> 1   4   0.00304 0.0304  0   999 999 999 0 
>   0   1   -360360;
> 1   5   0.00064 0.0064  0   999 999 999 0 
>   0   1   -360360;
> 2   3   0.00108 0.0108  0   999 999 999 0 
>   0   1   -360360;
> 3   4   0.00297 0.0297  0   999 999 999 0 
>   0   1   -360360;
> 4   5   0.00297 0.0297  0   240 240 240 0 
>   0   1   -360360;
> ];
> 
> 
> Results with matpower:
>   125.0125  -33.3367   0  -91.6758   -9.1676
>   -33.3367   99.2424  -33.33670   0
> 0  -33.3367  188.0396  0   0
>   -91.675800  126.9107   12.6911
> 9.1676 0 0  -12.6911  126.9107
> 
> Results of my code:
>   126.9107  -91.6758  0  0   12.6911
>   -91.6758  125.0125   -33.3367   0   -9.1676
>  0-33.3367 99.2424  -33.3367   0
>  0 0  -33.3367   188.0396   0
>   -12.69119.1676  0 0  126.9107
> 
> Thank you in advance for your interest.
> 
> 
> 
> 
>    
> This email has been checked for viruses by Avast antivirus software. 
> www.avast.com 



Re: Transmission Cost Method Explanation

2015-02-09 Thread Rurizwan Syahru Wibisana
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.
>
>
>


Effect of loads in IEEE 39 bus system

2015-02-09 Thread arun s nair
Hi All

I need to analyse the effect of different kinds of load models  (like ZIP
load model, composite load model, exponential load model etc ) in IEEE 39
bus system, its for my graduate research.

Is it possible to do it Matpower, or is there any other way to do it?

Your help will be greatly appreciated.

Thanks & Regards

Nair


Re: Transmission Cost Method Explanation

2015-02-09 Thread Carleton Coffrin
Hi Rurizwan,

fmincon is more general than SQP as it supports more general non-linear 
functions.  Also, fmincon and an SQP solver likely implement very different 
algorithms.  So in those senesces they are quite different.

On the other hand, if my understanding of the underlying algorithms is correct, 
if you are solving a convex quadratic problem, these two methods should produce 
to the same optimal objective values.

Cheers,
-Carleton


On Feb 10, 2015, at 3: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 
mailto:r...@cornell.edu>> 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 
mailto:rurizwa...@gmail.com>> 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.






The information in this e-mail may be confidential and subject to legal 
professional privilege and/or copyright. National ICT Australia Limited accepts 
no liability for any damage caused by this email or its attachments.



Re: Effect of loads in IEEE 39 bus system

2015-02-09 Thread Abhyankar, Shrirang G.
What sort of analysis do you want to run? Such load models are typically used 
in system dynamics studies, not for steady-state analysis. If you want to do 
dynamics assessment, then MATPOWER is not the tool for you as it is a 
steady-state analysis tool.

Shri
From: arun s nair mailto:arunsnair...@gmail.com>>
Reply-To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Date: Mon, 9 Feb 2015 22:10:19 -0700
To: MATPOWER discussion forum 
mailto:matpowe...@list.cornell.edu>>
Subject: Effect of loads in IEEE 39 bus system

Hi All

I need to analyse the effect of different kinds of load models  (like ZIP load 
model, composite load model, exponential load model etc ) in IEEE 39 bus 
system, its for my graduate research.

Is it possible to do it Matpower, or is there any other way to do it?

Your help will be greatly appreciated.

Thanks & Regards

Nair