Dear all,

I'm trying to run an AC OPF for the following small and simple case (consisting 
of 5 buses, 2 generators and 5 branches) which includes a limit for the active 
power flow of 10 MW for the branch connecting bus 1 and bus 2.

---
function mpc = Mycase

%% MATPOWER Case Format : Version 2
mpc.version = '2';

%%-----  Power Flow Data  -----%%
%% system MVA base
mpc.baseMVA = 100;

%% 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    345    1    1.1    0.9;
    2    1    25    5    0    0    1    1    0    345    1    1.1    0.9;
    3    1    50    12.5    0    0    1    1    0    345    1    1.1    0.9;
    4    1    50    10    0    0    1    1    0    345    1    1.1    0.9;
    5    2    0    0    0    0    1    1    0    345    1    1.1    0.9;
];

%% 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    0    0    300    -300    1    100    1    200    0    0    0    0    0 
   0    0    0    0    0    0    0;
    5    0    0    300    -300    1    100    1    10    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.001    0.01    0.1    10    10    10    0    0    1    -360    
360;
    2    3    0.001    0.01    0.1    500    500    500    0    0    1    -360  
  360;
    3    4    0.001    0.01    0.1    500    500    500    0    0    1    -360  
  360;
    4    5    0.001    0.01    0.1    500    500    500    0    0    1    -360  
  360;
    4    1    0.001    0.01    0.1    500    500    500    0    0    1    -360  
  360;
];

%% generator cost data
%    1    startup    shutdown    n    x1    y1    ...    xn    yn
%    2    startup    shutdown    n    c(n-1)    ...    c0
mpc.gencost = [
    2    0    0    3    0    4.5    0;
    2    0    0    3    0    5.5    0;
];

opt = mpoption('OPF_FLOW_LIM', 1);
runopf('Mycase', opt);
---

The limit for the active power flow for the branch connecting bus 1 and bus 2 
is set deliberately low. My problem is that the case does not converge. 
However, I do not think that the case is infeasible. The power demanded at bus 
2 & 3 could be rerouted over bus 4 where there is enough branch flow capacity 
available. As AC OPF alogorithm I'm using MIPS, but I have also tried fmincon 
with the same result that the case does not converge.

Can anybody tell me what I'm doing wrong?
Many thanks for your replies/comments.



Reply via email to