I’m working on a Python-based power flow analysis using the Pandapower library, but I’ve run into some issues related to the diagnostic tool and transformer loading calculations that seem to be linked to potential bugs or misinterpretations within the Pandapower framework.
Project: I’m using Pandapower to model a small distribution network with 16 buses, several lines, and a 0.25 MVA transformer connecting the network to the medium-voltage grid.
Objective: I need to accurately simulate power flow and transformer loading under different load conditions.
Encountered Issues:
A. The network includes a transformer rated at 0.25 MVA (20/0.4 kV). I’ve set up loads across multiple buses and expected the transformer loading to vary with changes in load.
Regardless of significant changes in load (e.g., increasing each house connection load from 0.01 MW to 0.1 MW), the transformer loading percentage remains nearly constant and unrealistically low.
enter image description here
B. I manually input impedance values for the lines using the following parameters:
import pandapower as pp
# Define impedance values
r_ohm_per_km = 0.322097
x_ohm_per_km = 0.073199
# Example line creation
pp.create_line_from_parameters(net, from_bus, to_bus, length_km=0.1, r_ohm_per_km=r_ohm_per_km, x_ohm_per_km=x_ohm_per_km, c_nf_per_km=210, max_i_ka=0.24)
Despite these correct values, Pandapower’s diagnostic tool flags several lines as having impedance values close to zero (r_ohm <= 0.001 or x_ohm <= 0.001
). This occurs after running the power flow calculation, although the values remain unchanged in the network model.
steps I tried:
-
I’ve tried isolate the issue, changing also to different transformer types etc.
-
I’ve checked the impedance values immediately after importing them, and they are correctly set in the Pandapower model. The issue only appears after running the diagnostic tool. Additionally, after running the power flow calculation, the values remain correct, but the diagnostic tool still reports the same problem. I found out that when I change the line length the impedance problem doesn’t occur, so it has to be some calculation in the background that gets to small, but 15m is not that unusually short. I wonder which code changes could help that.
-
I’ve used both the old (
pp.runpp()
) and new (pp.run.runpp_pgm()
) power flow calculation functions in Pandapower, with similar results.request for help:
-
Is there more options for log files in pandapower?
-
I am quite new to python programming, is there another option to search for errors?
-
For me the transformer loading problem is the more important one as with wrong values here the whole solution sadly is not usable
thank you!