I am also getting this problem even after doing the changes you
suggested.... I think now Dr. Ray should help us now


Have a nice day

Regards,
FIAZ AHMAD
PhD Student,
FENS Sabanci University,
Istanbul Turkey



On Thu, May 5, 2016 at 4:31 PM, Jovan Ilic <[email protected]> wrote:

>
> Fiaz,
>
> I get an error when running runpf function on your data using Matlab 2015b
> and MatPower 5.1:
>
> >> runpf(case33_dis)
> Subscript indices must either be real positive integers or logicals.
>
> Error in ext2int (line 149)
>             brs = ( mpc.branch(:, BR_STATUS) & ...  %% branch status
>
> Error in runpf (line 111)
> mpc = ext2int(mpc);
>
> >>
>
> Test cases that came with MatPower 5.1 run without a problem.  The mpc
> structure seems to be read correctly.  Maybe Ray (the developer) can
> help with this.
>
> I would suggest deleting extra generators (2-8) and corresponding cost
> functions.  I would also use mBase = 1, the same as system mBase at the
> beginning.   Make sure that matpower directory is in the path and just run
> runpf(case33_dis) in the directory that contains case33_dis.m file.
>
> Jovan
>
>
> On Thu, May 5, 2016 at 8:14 AM, Fiaz Ahmad <[email protected]>
> wrote:
>
>> %% MATPOWER Case Format : Version 2
>> mpc.version = '2';
>>
>> %%-----  Power Flow Data  -----%%
>> %% system MVA base
>> mpc.baseMVA = 1;
>>
>> %% bus data
>> % bus_i type Pd      Qd      Gs      Bs      area Vm      Va      baseKV
>>      zone Vmax        Vmin
>> mpc.bus = [
>> 1    3    0       0       0       0       1       1.0     0         11
>>         1 1.02 0.98;
>> 2       1      100      60      0       0       1       1.0     0
>>  0           1 1.02 0.98;
>> 3       1      90        40     0       0       1       1.0     0
>>  0           1 1.02 0.98;
>> 4       1      120       80 0       0       1       1.0     0          0
>>           1 1.02 0.98;
>> 5       1      60        30     0       0       1       1.0     0
>>  0           1 1.02 0.98;
>> 6       1      60        20      0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 7       1      200       100     0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 8       1      200       100     0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 9       1      60        20 0       19      1       1.0     0          0
>>           1 1.02 0.98;
>> 10      1      60        20      0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 11      1      45        30     0       0       1       1.0     0
>>  0            1 1.02 0.98;
>> 12      1      60        35      0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 13      1      60        35      0       0       1      1.0     0
>>  0           1 1.02 0.98;
>> 15      1      60        10     0       0       1       1.0     0
>>  0           1 1.02 0.98;
>>     16      1      60        20     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     17      1      60        20     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     18      1      90        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     19      1      90        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     20      1      90        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     21      1      90        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     22      1      90        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     23      1      90        50     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     24      1      420       200     0       0       1      1.0     0
>>      0           1 1.02 0.98;
>>     25      1      420       200     0       0       1      1.0     0
>>      0           1 1.02 0.98;
>>     26      1      60        25     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     27      1      60        25     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     28      1      60        20     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     29      1      120       70      0       0       1      1.0     0
>>      0           1 1.02 0.98;
>>     30      1      200       600     0       0       1      1.0     0
>>      0           1 1.02 0.98;
>>     31      1      150       70     0       0       1       1.0     0
>>      0           1 1.02 0.98;
>>     32      1      210       100     0       0       1      1.0     0
>>      0           1 1.02 0.98;
>>     33      1      60        40     0       0       1       1.0     0
>>      0           1 1.02 0.98;];
>>
>> %% generator data
>> % bus Pg        Qg Qmax Qmin Vg      mBase status Pmax Pmin Pc1 Pc2
>> Qc1min Qc1max Qc2min Qc2max ramp_agc ramp_10 ramp_30 ramp_q apf
>> mpc.gen = [
>> 1 *5500* *3500* 0      0       1.0 100     1       0 0        0 0 0
>>   0       0       0         0           0           0       0 0;
>> 2 0        0    0      0       1.0 100     1       0     0       0 0 0
>>     0       0       0       0           0           0       0 0;
>> 3 0        0    0      0       1.0 100     1       0     0       0 0 0
>>     0       0       0       0           0           0       0 0;
>> 6 0        0    0      0       1.0 100     1       0     0       0 0 0
>>     0       0       0       0           0           0       0 0;
>> 8 0        0    0      0       1.0 100     1       0     0       0 0 0
>>     0       0       0       0           0           0       0 0;
>> ];
>>
>> %% branch data
>> % fbus tbus r       x       b rateA rateB rateC ratio angle status angmin
>> angmax
>> mpc.branch = [
>> 1      2     0.0922    0.0470 0   0       0       0       0       0
>>   1 -360 360;
>> 2      3     0.4930    0.2511 0       0       0       0       0       0
>>       1 -360 360;
>> 3      4     0.3660    0.1864 0       0       0       0       0       0
>>       1 -360 360;
>> 4      5     0.3811    0.1941   0       0       0       0       0
>> 0       1 -360 360;
>> 5      6     0.8190    0.7070 0       0       0       0       0       0
>>       1 -360 360;
>> 6      7     0.1872    0.6188 0       0       0       0       0       0
>>       1 -360 360;
>> 7      8     0.7114    0.2351 0       0       0       0       0       0
>>       1 -360 360;
>> 8      9     1.0300    0.7400 0       0       0       0       0       0
>>       1 -360 360;
>> 9      10    1.0440    0.7400 0       0       0       0       0       0
>>       1 -360 360;
>> 10     11    0.1966    0.0650 0       0       0       0       0       0
>>       1 -360 360;
>> 11     12    0.3744    0.1238 0       0       0       0       0       0
>>       1 -360 360;
>> 12     13    1.4680    1.1550   0       0       0       0       0
>> 0       1 -360 360;
>> 13     14    0.5416    0.7129 0       0       0       0       0       0
>>       1 -360 360;
>> 14     15    0.5910    0.5260 0       0       0       0       0       0
>>       1 -360 360;
>> 15     16    0.7463    0.5450 0       0       0       0       0       0
>>       1 -360 360;
>> 16     17    1.2890    1.7210 0       0       0       0       0       0
>>       1 -360 360;
>> 17     18    0.7320    0.5740 0       0       0       0       0       0
>>       1 -360 360;
>> 2     19    0.1640    0.1565 0       0       0       0       0       0
>>     1 -360 360;
>> 19     20    1.5042    1.3554 0       0       0       0       0       0
>>       1 -360 360;
>> 20     21    0.4095    0.4784 0       0       0       0       0       0
>>       1 -360 360;
>> 21     22    0.7089    0.9373       0       0       0       0       0
>>   0       1 -360 360;
>> 3     23    0.4512    0.3083        0       0       0       0       0
>>   0       1 -360 360;
>> 23     24    0.8980    0.7091       0       0       0       0       0
>>   0       1 -360 360;
>> 24     25    0.8960    0.7011       0       0       0       0       0
>>   0       1 -360 360;
>> 6     26    0.2030    0.1034        0       0       0       0       0
>>   0       1 -360 360;
>> 26     27    0.2842    0.1447       0       0       0       0       0
>>   0       1 -360 360;
>> 27     28    1.0590    0.9337       0       0       0       0       0
>>   0       1 -360 360;
>> 28     29    0.8042    0.7006       0       0       0       0       0
>>   0       1 -360 360;
>> 29     30    0.5075    0.2585       0       0       0       0       0
>>   0       1 -360 360;
>> 30     31    0.9744    0.9630       0       0       0       0       0
>>   0       1 -360 360;
>> 31     32    0.3105    0.3619       0       0       0       0       0
>>   0       1 -360 360;
>> 32     33    0.3410    0.5302       0       0       0       0       0
>>   0       1 -360 360;
>> ];
>>
>>
>> Have a nice day
>>
>> Regards,
>> FIAZ AHMAD
>> PhD Student,
>> FENS Sabanci University,
>> Istanbul Turkey
>>
>>
>>
>> On Thu, May 5, 2016 at 3:11 PM, Jovan Ilic <[email protected]> wrote:
>>
>>>
>>> Where did you add P=5000W and Q = 3500VAR in your data, it is not in the
>>> data you
>>> posted?  If I remember well the default MVA base in MatPower is 100MVA;
>>>  your
>>> P and Q data seems to be in W and VAR .  Also, if I remember well, if
>>> you specify 0
>>> for Pmax and Pmin and Qmax and Qmin there will be no limits on P and Q.
>>>
>>> It seems that you need to read the MatPower Users Manual and look at the
>>> case files
>>> that come with the package.  The User's Manual has very good description
>>> of the data
>>> format used.
>>>
>>> Jovan
>>>
>>>
>>> On Thu, May 5, 2016 at 7:54 AM, Fiaz Ahmad <[email protected]>
>>> wrote:
>>>
>>>> I am putting P=5000W and Q=3500VARs as a substation. How can I make P Q
>>>> unlimited? Any suggestion
>>>> On May 5, 2016 2:48 PM, "Jovan Ilic" <[email protected]> wrote:
>>>>
>>>>>
>>>>> Fiaz,
>>>>>
>>>>> If you are using the data in your original post only, there are no
>>>>> generators in
>>>>> that data set.  You should put a (unlimited P and Q) generator where
>>>>> the substation
>>>>> would be in your system.
>>>>>
>>>>> Jovan
>>>>>
>>>>>
>>>>> On Thu, May 5, 2016 at 7:29 AM, Fiaz Ahmad <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Yes I m using balanced three phase but how can I do it with matpower.
>>>>>> I changed the bus data and gen.data matrices but I couldn't get the power
>>>>>> flows.
>>>>>> On May 5, 2016 2:24 PM, "Jovan Ilic" <[email protected]> wrote:
>>>>>>
>>>>>>>
>>>>>>> You could use Matpower to simulate distribution systems if you are
>>>>>>> only
>>>>>>> interested in balanced 3 phase without mutual line coupling systems.
>>>>>>>
>>>>>>> Jovan
>>>>>>>
>>>>>>>
>>>>>>> On Thu, May 5, 2016 at 3:41 AM, Ji Chen <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Shri,
>>>>>>>>     I am interested in power flows for distribution networks
>>>>>>>> recently. Do you mean that Matpower is not a good chioce for
>>>>>>>> distribution networks simulation or it just can not do distribution
>>>>>>>> networks simulation?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Ji
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> At 2016-05-04 23:02:50, "Abhyankar, Shrirang G." <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> http://ewh.ieee.org/soc/pes/dsacom/testfeeders/index.html
>>>>>>>>
>>>>>>>> However, as Jovan mentioned, MATPOWER is for solving balanced
>>>>>>>> three-phase transmission systems. If you are interested in solving
>>>>>>>> unbalanced three-phase power flows for distribution networks then 
>>>>>>>> refer to
>>>>>>>> either OpenDSS or GridLAB-D.
>>>>>>>>
>>>>>>>> Shri
>>>>>>>>
>>>>>>>> From: Fiaz Ahmad <[email protected]>
>>>>>>>> Reply-To: MATPOWER discussion forum <[email protected]>
>>>>>>>> Date: Wednesday, May 4, 2016 at 8:49 AM
>>>>>>>> To: MATPOWER discussion forum <[email protected]>, "
>>>>>>>> [email protected]" <[email protected]>
>>>>>>>> Subject: Re: modification on Matpower case.m file for power flow
>>>>>>>> of distribution system
>>>>>>>>
>>>>>>>> Thanks Jovan,
>>>>>>>>
>>>>>>>> In Matpower there are no test cases for distribution systems...
>>>>>>>> Where can i find IEEE distribution system test cases?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>>
>>>>>>>>
>>>>>>>> Have a nice day
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> FIAZ AHMAD
>>>>>>>> PhD Student,
>>>>>>>> FENS Sabanci University,
>>>>>>>> Istanbul Turkey
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, May 4, 2016 at 4:46 PM, Jovan Ilic <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Fiaz,
>>>>>>>>>
>>>>>>>>> You are missing lots of data here.  I suggest looking at IEEE
>>>>>>>>> distribution system
>>>>>>>>> test cases to see what is involved.  Matpower is used for
>>>>>>>>> transmission systems
>>>>>>>>> not distribution systems.
>>>>>>>>>
>>>>>>>>> Jovan
>>>>>>>>>
>>>>>>>>> On Wed, May 4, 2016 at 3:45 AM, Fiaz Ahmad <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> Hi. i have the following data files for ieee 33 bus radial
>>>>>>>>>> distribution system. i want to modify the case33.m file in matpower 
>>>>>>>>>> to
>>>>>>>>>> carry out the power flow of the above distribution system. Please 
>>>>>>>>>> guide me
>>>>>>>>>> how can i achieve that.
>>>>>>>>>>
>>>>>>>>>> linedata33
>>>>>>>>>> %        Bus   fbus   tbus   R         X
>>>>>>>>>>           1    1      2     0.0922    0.0470
>>>>>>>>>>           2    2      3     0.4930    0.2511
>>>>>>>>>>           3    3      4     0.3660    0.1864
>>>>>>>>>>           4    4      5     0.3811    0.1941
>>>>>>>>>>           4    5      6     0.8190    0.7070
>>>>>>>>>>           6    6      7     0.1872    0.6188
>>>>>>>>>>           7    7      8     0.7114    0.2351
>>>>>>>>>>           8    8      9     1.0300    0.7400
>>>>>>>>>>           9    9      10    1.0440    0.7400
>>>>>>>>>>          10    10     11    0.1966    0.0650
>>>>>>>>>>          11    11     12    0.3744    0.1238
>>>>>>>>>>          12    12     13    1.4680    1.1550
>>>>>>>>>>          13    13     14    0.5416    0.7129
>>>>>>>>>>          14    14     15    0.5910    0.5260
>>>>>>>>>>          15    15     16    0.7463    0.5450
>>>>>>>>>>          16    16     17    1.2890    1.7210
>>>>>>>>>>          17    17     18    0.7320    0.5740
>>>>>>>>>>          18     2     19    0.1640    0.1565
>>>>>>>>>>          19    19     20    1.5042    1.3554
>>>>>>>>>>          20    20     21    0.4095    0.4784
>>>>>>>>>>          21    21     22    0.7089    0.9373
>>>>>>>>>>          22     3     23    0.4512    0.3083
>>>>>>>>>>          23    23     24    0.8980    0.7091
>>>>>>>>>>          24    24     25    0.8960    0.7011
>>>>>>>>>>          25     6     26    0.2030    0.1034
>>>>>>>>>>          26    26     27    0.2842    0.1447
>>>>>>>>>>          27    27     28    1.0590    0.9337
>>>>>>>>>>          28    28     29    0.8042    0.7006
>>>>>>>>>>          29    29     30    0.5075    0.2585
>>>>>>>>>>          30    30     31    0.9744    0.9630
>>>>>>>>>>          31    31     32    0.3105    0.3619
>>>>>>>>>>          32    32     33    0.3410    0.5302
>>>>>>>>>>
>>>>>>>>>> loaddata33
>>>>>>>>>> %Bus P         Q
>>>>>>>>>>     1 0         0    0
>>>>>>>>>>     2 100       60   0
>>>>>>>>>>     3 90        40          0
>>>>>>>>>>     4 120       80  0
>>>>>>>>>>     5 60        30  0
>>>>>>>>>>     6 60        20      0
>>>>>>>>>>     7 200       100  0
>>>>>>>>>>     8 200       100  0
>>>>>>>>>>     9 60        20      0
>>>>>>>>>>     10 60        20   0
>>>>>>>>>>     11 45        30   0
>>>>>>>>>>     12 60        35      0
>>>>>>>>>>     13 60        35      0
>>>>>>>>>>     14 120       80      0
>>>>>>>>>>     15 60        10      0
>>>>>>>>>>     16 60        20      0
>>>>>>>>>>     17 60        20      0
>>>>>>>>>>     18 90        40      0
>>>>>>>>>>     19 90        40      0
>>>>>>>>>>     20 90        40      0
>>>>>>>>>>     21 90        40      0
>>>>>>>>>>     22 90        40      0
>>>>>>>>>>     23 90        50      0
>>>>>>>>>>     24 420       200  0
>>>>>>>>>>     25 420       200  0
>>>>>>>>>>     26 60        25      0
>>>>>>>>>>     27 60        25      0
>>>>>>>>>>     28 60        20      0
>>>>>>>>>>     29 120       70      0
>>>>>>>>>>     30 200       600  0
>>>>>>>>>>     31 150       70      0
>>>>>>>>>>     32 210       100  0
>>>>>>>>>>     33 60        40      0
>>>>>>>>>>
>>>>>>>>>> Please help and guide.... Thanks
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>

Reply via email to