get_simbench_net creates transformers without setting tap_changer_type.
Since pandapower 3.0, _calc_tap_from_dataframe only applies a transformer's tap_pos when tap_changer_type is set ("Ratio", "Symmetrical", "Ideal", or "Tabular" via tap_dependency_table).
With the default None the tap position is silently ignored. Because of this, every SimBench grid runs at neutral tap ratio regardless of
the tappos values in the dataset.
The converter still writes the pre-3.0 field tap_phase_shifter = False in _inscribe_fix_values, but that field no longer controls tap
application. Pandapower only reads it as a deprecated fallback when the tap_changer_type column is absent, which it never is here. Passing the old field through the create API would even trigger pandapower's migration and a deprecation warning, but the converter writes the column directly into the dataframe, bypassing both.
For reference see:
MWE
import simbench as sb
import pandapower as pp
net = sb.get_simbench_net("1-MV-urban--1-no_sw")
print(net.trafo.tap_pos.tolist()) # [-1.0, -1.0]
print(net.trafo.tap_changer_type.tolist()) # [None, None]
pp.runpp(net, calculate_voltage_angles=True)
vm_ignored = net.res_bus.vm_pu.copy()
print(net._ppc["branch"][-2:, 8].real) # [1. 1.] <- tap NOT applied
net.trafo["tap_changer_type"] = "Ratio"
pp.runpp(net, calculate_voltage_angles=True)
print(net._ppc["branch"][-2:, 8].real) # [0.985 0.985] <- tap applied
print((net.res_bus.vm_pu - vm_ignored).abs().max()) # 0.0165
Suggested fix
Apply the same classification pandapower's own convert_trafo_pst_logic migration uses. tap_step_percent set and tap_step_degree != 90 means "Ratio". Every SimBench transformer type has dVa = 0 and a nonzero dVm, so they all classify as "Ratio". Setting that for tappable transformers, e.g. in _inscribe_fix_values, restores the pandapower 2 results.
A workaround until then:
net.trafo["tap_changer_type"] = "Ratio"
Environment
- simbench 1.6.2
- pandapower 3.5.4
- Python 3.14
get_simbench_netcreates transformers without settingtap_changer_type.Since pandapower 3.0,
_calc_tap_from_dataframeonly applies a transformer'stap_poswhentap_changer_typeis set ("Ratio","Symmetrical","Ideal", or"Tabular"viatap_dependency_table).With the default
Nonethe tap position is silently ignored. Because of this, every SimBench grid runs at neutral tap ratio regardless ofthe
tapposvalues in the dataset.The converter still writes the pre-3.0 field
tap_phase_shifter = Falsein_inscribe_fix_values, but that field no longer controls tapapplication. Pandapower only reads it as a deprecated fallback when the
tap_changer_typecolumn is absent, which it never is here. Passing the old field through the create API would even trigger pandapower's migration and a deprecation warning, but the converter writes the column directly into the dataframe, bypassing both.For reference see:
[ADDED] tap_changer_type,[REMOVED] tap_phase_shiftercreate_transformer_from_parametersdocstring definesNoneas "no tap changer".convert_trafo_pst_logic, which derivestap_changer_typefrom the old fields.MWE
Suggested fix
Apply the same classification pandapower's own
convert_trafo_pst_logicmigration uses.tap_step_percentset andtap_step_degree != 90means"Ratio". Every SimBench transformer type hasdVa = 0and a nonzerodVm, so they all classify as"Ratio". Setting that for tappable transformers, e.g. in_inscribe_fix_values, restores the pandapower 2 results.A workaround until then:
Environment