Open SimonRubenDrauz opened 3 years ago
Okay, I found a reason why this causes a problem. If I set the shift_degree of the trafo, which is 150, equal to zero it works. Do you know why?
We checked it with AMPL. It seems that the pypower OPF implementation/solver got some problems when it needs to consider the angles as well
Hi! I am looking now at this issue and I wonder whether I face a similar one, with my issue #1526. I also have 4 transformers and I changed the shift_degree to zero but still, it does not converge. Any help on what I could check? I have tried all the obvious actions (changing the limits of transformers and lines, reducing the load/gen, increasing the limits of reactive power ) but nothing works.
Thank you SimonRubenDrauz, your workaround worked for my problem, too.
Also, I tried working out the problem with an example similar to the tutorial (https://github.com/FlorianShepherd/pandapower-youtube/blob/master/scripts/simple_opf.py). It had convergence issues as well. While it did converge under specific settings, it resulted in odd voltage levels near 0 pu and a loss of 5 mw in the trafo. Since a converged problem might help to solve the problem, I will link it below.
import pandapower as pp
net = pp.create_empty_network()
#create buses
bus1 = pp.create_bus(net, vn_kv=110.)
bus2 = pp.create_bus(net, vn_kv=20.)
bus3 = pp.create_bus(net, vn_kv=20.)
bus4 = pp.create_bus(net, vn_kv=20)
#create 110/20 kV transformer
pp.create_transformer(net, 0, 1, std_type="40 MVA 110/20 kV")
#create 20 kV lines
pp.create_line(net, 1, 2, length_km=10., std_type='NA2XS2Y 1x95 RM/25 12/20 kV')
pp.create_line(net, 2, 3, length_km=10., std_type='NA2XS2Y 1x95 RM/25 12/20 kV')
pp.create_line(net, 3, 1, length_km=10., std_type='NA2XS2Y 1x95 RM/25 12/20 kV')
#create loads
pp.create_load(net, 1, p_mw=6, controllable=False)
pp.create_load(net, 2, p_mw=7, controllable=False)
pp.create_load(net, 3, p_mw=1, controllable=False)
#create generators
eg = pp.create_ext_grid(net, 0, min_p_mw=-100, max_p_mw=100, min_q_mvar=-1000, max_q_mvar=1000)
g1 = pp.create_sgen(net, 2, p_mw=8, min_p_mw=0, max_p_mw=8, min_q_mvar=0, max_q_mvar=0, controllable=True)
g2 = pp.create_sgen(net, 3, p_mw=10, min_p_mw=0, max_p_mw=10, min_q_mvar=0, max_q_mvar=0, controllable=True)
s0 = pp.create_storage(net, 1, p_mw=0, min_p_mw=-6, max_p_mw=6, min_q_mvar=0, max_q_mvar=0, soc_percent=0, min_e_mwh=0, max_e_mwh=10, controllable=True)
costeg = pp.create_poly_cost(net, 0, 'ext_grid', cp1_eur_per_mw=0, cp2_eur_per_mw2=10)
pp.runopp(net, delta=1e-16)
net.res_bus.vm_pu
0 1.000000e+00
1 8.331277e-13
2 5.377548e-07
3 7.110324e-07
Name: vm_pu, dtype: float64
net.res_trafo.pl_mw
0 5.186637
Name: pl_mw, dtype: float64
It seems like a grid having a trafo is not converging when performing an OPF. See following example:
The OPF is not converging. However, as soon as I set the trafo out of service and connect the generator to b2, it works:
net.trafo.in_service=False net.gen.bus = b2
Is there a good reason for this behavior? (In both cases runpp is working)