diff --git a/pandapower/pf/create_jacobian_facts.py b/pandapower/pf/create_jacobian_facts.py index 12881fd1e..d23bba8ad 100644 --- a/pandapower/pf/create_jacobian_facts.py +++ b/pandapower/pf/create_jacobian_facts.py @@ -8,7 +8,7 @@ from scipy.sparse import csr_matrix, lil_matrix, diags from pandapower.pf.makeYbus_facts import calc_y_svc_pu -SMALL_NUMBER = 1e-20 +SMALL_NUMBER = 1e-9 def create_J_modification_svc(J, svc_buses, pvpq, pq, pq_lookup, V, x_control, svc_x_l_pu, svc_x_cvar_pu, nsvc, nsvc_controllable, svc_controllable): diff --git a/pandapower/pypower/newtonpf.py b/pandapower/pypower/newtonpf.py index b1d0d0256..efbeea6df 100644 --- a/pandapower/pypower/newtonpf.py +++ b/pandapower/pypower/newtonpf.py @@ -621,7 +621,7 @@ def _evaluate_Fx_facts(V,pq ,svc_buses=None, svc_set_vm_pu=None, tcsc_controllab old_F[-len(pq)+pq_lookup[vsc_tb[ac_mode_v]]] = mis_vsc_v ac_mode_q = vsc_mode_ac == 1 Sbus_vsc = V * conj(Ybus_vsc * V) - mis_vsc_q = Sbus_vsc[vsc_fb[ac_mode_q]].imag - vsc_value_ac[ac_mode_q] + mis_vsc_q = Sbus_vsc[vsc_fb[ac_mode_q]].imag * 0.5 - vsc_value_ac[ac_mode_q] # todo test for when they share same bus old_F[-len(pq) + pq_lookup[vsc_tb[ac_mode_q]]] = mis_vsc_q @@ -652,7 +652,7 @@ def _evaluate_Fx_facts(V,pq ,svc_buses=None, svc_set_vm_pu=None, tcsc_controllab # a configuration of B2B bus connecting also with DC lines could be implemented here in the future if needed: if len(dc_p): # vsc_set_p_pu[vsc_p] = -P_dc[dc_p][dc_p_lookup[vsc_dc_p_bus]] - vsc_set_p_pu[vsc_p] = vsc_value_dc[vsc_p] + vsc_set_p_pu[vsc_p] = vsc_value_dc[vsc_p] # todo test for when they share same bus if len(dc_ref): # vsc_set_p_pu[vsc_mode_dc == 1] = -P_dc[dc_ref][dc_ref_lookup[vsc_dc_ref_bus]] # dc_p vsc_set_p_pu[vsc_ref] = -Pbus_hvdc[dc_ref][dc_ref_lookup[vsc_dc_ref_bus]] / count_ref[vsc_dc_bus[vsc_ref]] diff --git a/pandapower/test/loadflow/test_facts.py b/pandapower/test/loadflow/test_facts.py index b04e2d7e6..05b0f777f 100644 --- a/pandapower/test/loadflow/test_facts.py +++ b/pandapower/test/loadflow/test_facts.py @@ -1651,7 +1651,7 @@ def test_simple_vsc_hvdc(): def test_simple_2vsc_hvdc1(): - np.set_printoptions(linewidth=1000, suppress=True, precision=3) + # np.set_printoptions(linewidth=1000, suppress=True, precision=3) net = pp.create_empty_network() # AC part pp.create_buses(net, 3, 110, geodata=((0, 0), (100, 0), (200, 0))) @@ -1680,7 +1680,7 @@ def test_simple_2vsc_hvdc1(): def test_simple_2vsc_hvdc2(): - np.set_printoptions(linewidth=1000, suppress=True, precision=3) + # np.set_printoptions(linewidth=1000, suppress=True, precision=3) net = pp.create_empty_network() # AC part pp.create_buses(net, 3, 110, geodata=((0, 0), (100, 0), (200, 0)))