The problem is infeasible. Try relaxing the flow constraint and you'll see that it becomes feasible. As you decrease the flow constraint, generation begins to shift from generator 1 to generator 2. Somewhere between a flow limit of 54 and 53 MW, generator 2 reaches it's upper limit of 10MW, beyond which the problem becomes infeasible.
Just because all of the other lines have plenty of capacity, does not mean that the system can be dispatched in a way that the power will flow along the paths you would like. Remember, the flows follow Kirchhoff's laws, even no matter where the available line capacity is. -- Ray Zimmerman Senior Research Associate 419A Warren Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 On Nov 23, 2012, at 3:37 AM, Willi David <[email protected]> wrote: > 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. > > >
