e2nIEE / pandapower

Convenient Power System Modelling and Analysis based on PYPOWER and pandas
https://www.pandapower.org
Other
847 stars 478 forks source link

Consistency for 3 phase power-flow for transformer #1646

Open nitbharambe opened 2 years ago

nitbharambe commented 2 years ago

Hi all, I have bumped into a case where the power-flow in and out of a node in case of transformer is not close to zero. Below is a minimal example of that case.

Configuration is as such: ext_grid---(bus1)---trafo---(bus2)---line---(bus3)--asym_load

The powerflow out of the transformer and into the line is not zero. The difference is around 1kw and I was not able to figure out why it is so. Thanks again for your help!

import pandapower as pp

net = pp.create_empty_network()
bus1 = pp.create_bus(net, vn_kv=20, name="Bus 1")
bus2 = pp.create_bus(net, vn_kv=0.4, name="Bus 2")
bus3 = pp.create_bus(net, vn_kv=0.4, name="Bus 3")

ext_grid = pp.create_ext_grid(net, bus=bus1, vm_pu=1.0, s_sc_max_mva=10, rx_max=0.1, x0x_max=1, r0x0_max=0.1)

trafo = pp.create_transformer_from_parameters(net, hv_bus=bus1, lv_bus=bus2, sn_mva=30,
        vn_lv_kv=0.4, vn_hv_kv=20, vkr_percent=1.58, vk_percent=4,
        pfe_kw=0.8, i0_percent=0.32, vector_group='Dyn',
        vk0_percent=4, vkr0_percent=0.158, mag0_percent=50,
        mag0_rx=0.1, tap_phase_shifter=False,
        si0_hv_partial=0.9, in_service=True, shift_degree=150)
line = pp.create_line_from_parameters(net, from_bus= bus2, to_bus=bus3, length_km=10,
                r0_ohm_per_km=0.642, x0_ohm_per_km=0.083, c0_nf_per_km=210.0,
                r_ohm_per_km=0.642, x_ohm_per_km=0.083, c_nf_per_km=210.0, max_i_ka=0.142)
asym_load = pp.create_asymmetric_load(net, bus3, p_a_mw=0.1, p_b_mw= 0.09, p_c_mw=0.08,
                                       type='wye')

pp.runpp_3ph(net, tolerance_mva=1e-8, numba=False)

print("Consistency")
print("Trafo-line a: %.8f" % (net.res_trafo_3ph["p_a_lv_mw"][trafo] + net.res_line_3ph["p_a_from_mw"][line]))
print("Trafo-line b: %.8f" % (net.res_trafo_3ph["p_b_lv_mw"][trafo] + net.res_line_3ph["p_b_from_mw"][line]))
print("Trafo-line c: %.8f" % (net.res_trafo_3ph["p_c_lv_mw"][trafo] + net.res_line_3ph["p_c_from_mw"][line]))

Output:

image

AnkurArohi commented 2 years ago

are you sure with the shift degree attribute in trafo?

nitbharambe commented 2 years ago

are you sure with the shift degree attribute in trafo?

Hi. I apologize, I'm not quite sure. Can the shift degree make consistency invalid?