powsybl / powsybl-core

A framework to build power system oriented software
https://www.powsybl.org
Mozilla Public License 2.0
126 stars 41 forks source link

Voltage/angle values lost on XIIDM export --> import for buses with no bus bar sections #735

Closed sylvlecl closed 4 years ago

sylvlecl commented 5 years ago

Ambiguous :)

In node-breaker representation of the network, voltage and angle are primarily associated to bus bar sections. In particular, when exported to XIIDM, only those voltages are exported.

It means that voltage and angle of electrical buses which do not contain any bus bar section are lost during the XIIDM export. When reimporting that file and recomputing buses from the node breaker topology, the corresponding buses will have unknown voltage and angle.

Load an XIIDM file which has 2 branches connected together through a voltage level internal connection (not a bus bar): the corresponding bus will have no associated voltage and angle value.

I would expected that after exporting and re-importing an XIIDM file, the voltage and angle of all buses are saved and reloaded.

Having complete load flow results in XIIDM files, to avoid having to run a new load flow or fill the holes before inspecting it safely (no NaN voltage value).

mathbagu commented 5 years ago

This bug and #556 are linked

It's a known bug: we have to change the IIDM format to store the voltages/angles not in the busbarSection element but elsewhere.

annetill commented 4 years ago

I have an issue proposal, please give me your feedback on it. A simple way to solve this issue could be to add something like:

<iidm:nodeBreakerTopology .. >
      <iidm:importedBus id="?" nodes={1, 7, 15}  v=v_value angle=angle_value> 
</iidm:nodeBreakerTopology> 

It could be optional in the export and defined in the import-export-parameters-default-value section of the config.yml. During the import process, we will have to check the consistency between the bus of the bus breaker view and the imported buses. All the v and angles values imported will have to be mapped in terminals, as we do for bus bar sections. What do you think about that ?

sylvlecl commented 4 years ago

Hi Anne, Thank you for the proposal, it looks good. I would propose the slightly modified version :

<iidm:nodeBreakerTopology .. >
      <iidm:bus nodes="1,7,15"  v="v_value" angle="angle_value"/> 
</iidm:nodeBreakerTopology> 

I don't think an ID is necessary or really useful, only the topological description is enough. Also:

mathbagu commented 4 years ago

Your proposal looks great. I’m not sure this is really standard to write the list of nodes like this but it should work!

jeandemanged commented 4 years ago

It might be useful to align with CIM/CGMES here. In terms of semantics bus would rather be called TopologicalNode. Also making the list of TopologicalNodes non "volatile" would be useful for planning-type models, therefore managing a TopologicalNode ID could be useful e.g. for CGMES interoperability.

Then as proposed the state variables voltage & angle are attached to the TopologicalNode.

From Entso-E docs:

For a detailed substation model a topological node is a set of connectivity nodes that, in the current network state, are connected together through any type of closed switches, including jumpers. Topological nodes change as the current network state changes (i.e., switches, breakers, etc. change state). For a planning model, switch statuses are not used to form topological nodes. Instead they are manually created or deleted in a model builder tool. Topological nodes maintained this way are also called "busses".

sylvlecl commented 4 years ago

I think the "bus branch" or "planning" model of CGMES is already supported in IIDM implementation, by the BusBreakerVoltageLevel. It relies on identifiable buses which are actually part of the model (see ConfiguredBusImpl), instead of being computed on demand based on an underlying topology.

Today, for those "bus breaker" voltage levels, the voltage/angle are already correctly associated to buses when exported. But it's not the case for the "node breaker" voltage levels, for which they are associated to bus bars, hence the proposition of this evolution to export a description of "volatile" buses also in this case.

Indeed the wording is not well in line with CGMES, but changing this would be a large breaking change! In any case it would be interesting to make this correspondance clear in the doc. It is still under work on the website: https://www.powsybl.org/docs/iidm/model/.