Hi, I don't understand the need for running an OPF since there is only one generator in your test case. You can instead simply run a power flow with the appropriate set point voltage for the generator bus. The OPF and the power flow "WILL" yield the same result if the case is feasible and solvable (no voltage/flow limits exceeded and loading less than the maximum limit). Running a power flow on your case shows that there are many buses whose voltage is below the min. voltage limit of 0.9 pu. This explains the divergence of the OPF. Shri Begin forwarded message: For the radial network, the OPF is not converging because of the reason explained above. For the meshed system, the OPF does converge presumably because the bus voltages are within the set limits. |
function mpc = singular
\%% MATPOWER Case Format : Version 2
mpc.version = '2';
\%% 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
33 1 1.1 0.9;
2 2 13.6 1.938 0 0 1 1 0
33 1 1.1 0.9;
3 2 0 0 0 0 1 1 0
33 1 1.1 0.9;
4 2 13.6 1.938 0 0 1 1 0 33
1 1.1 0.9;
5 2 13.6 1.938 0 0 1 1 0
33 1 1.1 0.9;
6 2 0 0 0 0 1 1 0 33 1
1.1 0.9;
7 2 13.6 1.938 0 0 1 1 0 33
1 1.1 0.9;
8 2 13.6 1.938 0 0 1 1 0 33
1 1.1 0.9;
9 2 0 0 0 0 1 1 0 33 1
1.1 0.9;
10 2 13.6 1.938 0 0 1 1 0 33
1 1.1 0.9;
11 1 0 0 0 0 1 1 0 33 1
1.1 0.9;
];
\%% generator data
% bus Pg Qg Qmax Qmin Vg mBase status Pmax
Pmin
mpc.gen = [
1 0 0 1000 0 1 100 1 1000 0
];
\%% branch data
% fbus tbus r x b rateA rateB rateC ratio
angle status
mpc.branch = [
1 2 0.06 0.02 0 1000 1000 1000
0 0 1 ;
2 3 0.06 0.02 0 1000 1000 1000
0 0 1 ;
3 4 0.06 0.02 0 1000 1000 1000
0 0 1 ;
3 5 0.06 0.02 0 1000 1000 1000
0 0 1 ;
5 6 0.06 0.02 0 1000 1000 1000
0 0 1 ;
6 7 0.06 0.02 0 1000 1000 1000
0 0 1 ;
6 8 0.06 0.02 0 1000 1000 1000
0 0 1 ;
8 9 0.06 0.02 0 1000 1000 1000 0
0 1 ;
9 10 0.06 0.02 0 1000 1000 1000 0
0 1 ;
9 11 0.06 0.02 0 1000 1000 1000 0
0 1 ;
];
\%% generator cost data
% 1 startup shutdown n x1 y1 ... xn
yn
% 2 startup shutdown n c(n-1) ... c0
mpc.gencost = [
2 0 0 2 80 0 ;
];
