[X] Browse the tutorials and tests for usefull code snippets and examples of use
Issue
I'm trying to test the state estimation on MV networks from the simbench database. I have added P, Q, V and voltage angle measurements for every bus and P, Q measurement for every line. The measured values are the values from the power flow calculation. Despite the amount of measurements and the accurate values the state estimation is failing.
Thanks in advance!
Estimation failed! Pandapower network failed to update!
import simbench as sb
import pandapower as pp
name = "1-MV-rural--2-no-sw"
net = sb.get_simbench_net(name)
net.measurement.drop(net.measurement.index, inplace=True)
pp.runpp(net)
# Iterate over each bus to add measurements
for index, bus in net.bus.iterrows():
# Active power measurement
pp.create_measurement(net, "p", "bus", net.res_bus.at[index, "p_mw"], 10, element=index, name=bus["name"],voltLvl=bus["voltLvl"],subnet=bus["subnet"])
# Reactive power measurement
pp.create_measurement(net, "q", "bus", net.res_bus.at[index, "q_mvar"], 10, element=index, name=bus["name"],voltLvl=bus["voltLvl"],subnet=bus["subnet"])
# Voltage magnitude measurement
pp.create_measurement(net, "v", "bus", net.res_bus.at[index, "vm_pu"], 10, element=index, name=bus["name"],voltLvl=bus["voltLvl"],subnet=bus["subnet"])
# Voltage angle measurement
pp.create_measurement(net, "va", "bus", net.res_bus.at[index, "va_degree"], 10, element=index, name=bus["name"],voltLvl=bus["voltLvl"],subnet=bus["subnet"])
for index, line in net.line.iterrows():
# Active power "from" side measurement
pp.create_measurement(net, "p", "line", net.res_line.at[index, "p_from_mw"], 10, element=index, side="from", name=f"Line {index} P from",voltLvl=line["voltLvl"],subnet=line["subnet"])
# Reactive power "from" side measurement
pp.create_measurement(net, "q", "line", net.res_line.at[index, "q_from_mvar"], 10, element=index, side="from", name=f"Line {index} Q from",voltLvl=line["voltLvl"],subnet=line["subnet"])
# Active power "to" side measurement
pp.create_measurement(net, "p", "line", net.res_line.at[index, "p_to_mw"], 10, element=index, side="to", name=f"Line {index} P to",voltLvl=line["voltLvl"],subnet=line["subnet"])
# Reactive power "to" side measurement
pp.create_measurement(net, "q", "line", net.res_line.at[index, "q_to_mvar"], 10, element=index, side="to", name=f"Line {index} Q to",voltLvl=line["voltLvl"],subnet=line["subnet"])
success = pp.estimation.estimate(net, init="flat")
The state estimation is working and returning the right result if calculate_voltage_angles = False. I don't understand why this matters, but it's good enough for me.
Feature Checklist
[X] Searched the issues page for similar reports
[X] Read the relevant sections of the documentation
[X] Browse the tutorials and tests for usefull code snippets and examples of use
Issue
I'm trying to test the state estimation on MV networks from the simbench database. I have added P, Q, V and voltage angle measurements for every bus and P, Q measurement for every line. The measured values are the values from the power flow calculation. Despite the amount of measurements and the accurate values the state estimation is failing. Thanks in advance!
Label