out of bound

2013-07-23 Thread iman
Dear All, I am trying to run OPF for a case. I receive this error: Attempted to access branch(:,9); index out of bounds because size(branch)=[30,7]. Those good with coding in Matlab ,could you give me some hints where could I have made a mistake? Thank you

RE: out of bound

2013-07-23 Thread angelina sirri
This error appears because you are trying to access the 9th column but from the information in size(branch) it seems that you only have 7 columns in the branch matrix so you cannot access a column that does not exist. Hope this helps.Angelina Date: Tue, 23 Jul 2013 16:18:43 +0100 Subject: out

OPF on matpower

2013-07-23 Thread spyros gian
Dear Dr Zimmerman, Running an OPF in matpower means that 1. Bus types play no role (eg slack, PV, PQ etc) 2. All values for Real Power generation and reactive power generation are unknown 3. All values for bus_voltages and voltage phase angles in buses, are unknown as well 4. As a result, al

Re: OPF on matpower

2013-07-23 Thread Shri
On Jul 23, 2013, at 9:42 AM, spyros gian wrote: > Dear Dr Zimmerman, > > Running an OPF in matpower means that > > 1. Bus types play no role (eg slack, PV, PQ etc) Yes. > 2. All values for Real Power generation and reactive power generation are > unknown Yes. > 3. All values for bus_volta

Re: out of bound

2013-07-23 Thread Shri
Make sure that the data format that you are using is compliant with MatPower. Take a look at how the MatPower data files are written and create your data file accordingly. Shri On Jul 23, 2013, at 8:23 AM, angelina sirri wrote: > > This error appears because you are trying to access the 9th

RE: OPF on matpower

2013-07-23 Thread spyros gian
fmincon finds local optima. However, I have the impression that interior point methods find global optima. I am not sure though. 1.Does matpower use fmincon in its source code to do a non-linear ACOPF? 2.Does matpower use interior point method for the non-linear ACOPF ? 3. Since DC-OPF is linea

Re: OPF on matpower

2013-07-23 Thread Ray Zimmerman
Shri is correct … with some *very* minor tweaks … the only bus type that matters is the REF bus which determines the voltage reference for the system, and the voltage angle at that bus is set to the corresponding value in the bus matrix, which is usually set to 0, but need not be. And, yes, the

Re: OPF on matpower

2013-07-23 Thread Ray Zimmerman
1. If you set OPF_ALG = 520, MATPOWER will use fmincon (which now uses an interior point method by default). 2. MATPOWER's default solver is an interior point solver (see Section 5.5 in the User's Manual). 3. Depending on the cost function, the DC OPF can be a QP or an LP, and yes, the optimum s

RE: OPF on matpower

2013-07-23 Thread spyros gian
Thank you Dr Zimmerman. I am running an ACOPF in matpower. In the mpc.bus I set for bus 13: Vm=1 , Va = 0, type = 3. So bus 13 is my reference bus. This means that in the results I will take that voltage at bus 13 has an angle of 0 degrees, and a magnitude of 1 pu? Ie , in your reply you wro

Re: OPF on matpower

2013-07-23 Thread Yi Liang
>From my understanding, For the AC electricity, the matter is not the absolute value of the voltage angle, the differences between different bus voltage angles are what you want to know. So people set one bus as the reference bus and usually set the angle as 0. I believe that Vm here is from the

Question about matpower with Simulink

2013-07-23 Thread Fang-Yu Liu
Hi all, I'm trying to add power flow analysis to my simulink model. I added a MATLAB function in simulink and run matpower command such as load case, runpf, eta. However, I received this errors: Try and catch are not supported for code generation. Function 'loadcase.m' (#54.4881.5039), line 12

Re: Question about matpower with Simulink

2013-07-23 Thread Shri
This stackoverflow post states that some functions, these could be even matlab built-in functions, cannot generate auto-code. It suggests the use of 'extrinsic' to avoid this issue. Shri On Jul 23, 2013, at 5:31 PM, Fang-Yu Liu wrote: > Hi all, > > I'm trying to add power flow analysis to my

Re: Question about matpower with Simulink

2013-07-23 Thread Fang-Yu Liu
Hi Shri, Thanks for your prompt respond. But what do you mean by use 'extrinsic'? How can I do that? Thanks, Fang-Yu Shri 於 2013/7/23 下午9:12 寫道: > This stackoverflow post states that some functions, these could be even > matlab built-in functions, cannot generate auto-code. It suggests the use