Dear Ray, Thank you so much for your help.
Regards, Charalampos On 21 Nov 2017, at 15:17, Ray Zimmerman <r...@cornell.edu<mailto:r...@cornell.edu>> wrote: The total load in your system is 643.3 MW, but your generators have maximum active power outputs of 0 and 15 MW, respectively. Min and max reactive output from both are also zero. Clearly there is no feasible solution to such a problem. The OPF solves just fine if you use appropriate values for the generator limits. Ray On Nov 20, 2017, at 12:58 PM, Charalambos Ioannou <xaralambo...@hotmail.com<mailto:xaralambo...@hotmail.com>> wrote: Hello everyone, The following shows a case study which i am trying to run optimal power flow. It works perfectly for power flow but it does not converge the system for optimal power flow. Please can you help me?? function mpc = IsleExample() %% 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 30.4 14.7 0 0 1 1 0 132 1 1.06 0.94; 2 1 25.1 3.2 0 0 1 1 0 132 1 1.06 0.94; 3 1 25.1 3.2 0 0 1 1 0 132 1 1.06 0.94; 4 1 113 54.8 0 0 1 1 0 132 1 1.06 0.94; 5 1 113 54.8 0 0 1 1 0 132 1 1.06 0.94; 6 1 113 54.8 0 0 1 1 0 33 1 1.06 0.94; 7 1 5.76 2.8 0 0 1 1 0 33 1 1.06 0.94; 8 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 9 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 10 1 17.01 8.23 0 0 1 1 0 33 1 1.06 0.94; 11 1 113 54.8 0 0 1 1 0 33 1 1.06 0.94; 12 1 19.2 9.3 0 0 1 1 0 33 1 1.06 0.94; 13 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 14 1 5.6 2.9 0 0 1 1 0 33 1 1.06 0.94; 15 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 16 1 5.76 2.8 0 0 1 1 0 33 1 1.06 0.94; 17 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 18 1 26.8 13 0 0 1 1 0 33 1 1.06 0.94; 19 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 20 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 21 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 22 1 8.3 4 0 0 1 1 0 33 1 1.06 0.94; 23 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 24 1 10.7 5.2 0 0 1 1 0 33 1 1.06 0.94; 25 2 0 0 0 0 1 1 0 33 1 1.06 0.94; 26 1 0 0 0 0 1 1 0 33 1 1.06 0.94; 27 1 11.6 5.6 0 0 1 1 0 33 1 1.06 0.94; ]; %% 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 0 0 1 100 1 0 0 0 0 0 0 0 0 0 0 0 0 0; %Slack Bus 25 0 0 0 0 1 100 1 15 0 0 0 0 0 0 0 0 0 0 0 0; %Natural Gas Generator with 15 MW maximum capacity ]; %% branch data % fbus tbus r x b rateA rateB rateC ratio angle status angmin angmax mpc.branch = [ 1 2 0.0008 0.0013 0.0409 0 0 0 0 0 1 -360 360; 1 3 0.0007 0.0012 0.0391 0 0 0 0 0 1 -360 360; 4 1 0.0101 0.0181 0.2147 0 0 0 0 0 1 -360 360; 2 5 0.0146 0.0303 0.0830 0 0 0 0 0 1 -360 360; 3 5 0.0145 0.0303 0.0808 0 0 0 0 0 1 -360 360; 4 5 0.0019 0.0101 0.0174 0 0 0 0 0 1 -360 360; 4 5 0.0026 0.0078 0.0184 0 0 0 0 0 1 -360 360; 5 6 0 0.2482 0 0 0 0 0.95 0 1 -360 360; 5 6 0 0.2501 0 0 0 0 0.95 0 1 -360 360; 6 7 0.0398 0.1333 0.0002 0 0 0 0 0 1 -360 360; 6 7 0.0389 0.1302 0.0002 0 0 0 0 0 1 -360 360; 7 8 0.0315 0.1054 0.0001 0 0 0 0 0 1 -360 360; 10 8 0.0093 0.0310 0.0000 0 0 0 0 0 1 -360 360; 7 9 0.0398 0.1333 0.0002 0 0 0 0 0 1 -360 360; 10 9 0.0093 0.0310 0.0000 0 0 0 0 0 1 -360 360; 4 11 0 0.2813 0 0 0 0 0.95 0 1 -360 360; 4 11 0 0.2771 0 0 0 0 0.95 0 1 -360 360; 11 6 0.0944 0.1853 0.0002 0 0 0 0 0 1 -360 360; 11 6 0.0912 0.1790 0.0002 0 0 0 0 0 1 -360 360; 11 12 0.0087 0.0037 0.0002 0 0 0 0 0 1 -360 360; 11 12 0.0087 0.0037 0.0002 0 0 0 0 0 1 -360 360; 12 13 0.1005 0.2384 0.0010 0 0 0 0 0 1 -360 360; 14 13 0.0672 0.1601 0.0002 0 0 0 0 0 1 -360 360; 14 15 0.0320 0.0628 0.0001 0 0 0 0 0 1 -360 360; 16 15 0.0844 0.1555 0.0012 0 0 0 0 0 1 -360 360; 14 17 0.0843 0.1655 0.0002 0 0 0 0 0 1 -360 360; 16 17 0.0261 0.0379 0.0015 0 0 0 0 0 1 -360 360; 14 18 0.0268 0.3173 0.0004 0 0 0 0 0 1 -360 360; 6 18 0.0445 0.0730 0.0018 0 0 0 0 0 1 -360 360; 6 18 0.0397 0.0683 0.0035 0 0 0 0 0 1 -360 360; 18 19 0.0586 0.1024 0.0029 0 0 0 0 0 1 -360 360; 6 20 0.0481 0.1612 0.0002 0 0 0 0 0 1 -360 360; 20 19 0.0199 0.0368 0.0003 0 0 0 0 0 1 -360 360; 20 21 0.0667 0.1289 0.0004 0 0 0 0 0 1 -360 360; 21 27 0.0368 0.0722 0.0001 0 0 0 0 0 1 -360 360; 21 22 0.1870 0.2211 0.0003 0 0 0 0 0 1 -360 360; 6 26 0.1168 0.2780 0.0003 0 0 0 0 0 1 -360 360; 26 27 0.0278 0.0662 0.0001 0 0 0 0 0 1 -360 360; 24 26 0.0676 0.1313 0.0006 0 0 0 0 0 1 -360 360; 6 25 0.0629 0.2108 0.0003 0 0 0 0 0 1 -360 360; 23 25 0.0111 0.0372 0.0000 0 0 0 0 0 1 -360 360; 23 22 0.1980 0.2343 0.0003 0 0 0 0 0 1 -360 360; 23 24 0.0789 0.1688 0.0007 0 0 0 0 0 1 -360 360; ]; %% Generator Cost Data % model Startup Shutdown n x1 y1 y2 mpc.gencost = [ 2 0 0 3 0 1 0; 2 0 0 3 0 1 0; ]; Thanks Regards, Charalampos