CIM-CGMES
The CGMES (Common Grid Model Exchange Specification) is an IEC technical specification (TS 61970-600-1, TS 61970-600-2) based on the IEC CIM (Common Information Model) family of standards. It was developed to meet necessary requirements for TSO data exchanges in the areas of system development and system operation. In this scenario the agents (the Modelling Authorities) generate their Individual Grid Models (IGM) that can be assembled to build broader Common Grid Models (CGM). Boundaries between IGMs are well defined: the boundary data is shared between the modelling agents and contain all boundary points required for a given grid model exchange.
In CGMES an electric power system model is described by data grouped in different subsets (profiles) and exchanged as CIM/XML files, with each file associated to a given profile. The profiles considered in PowSyBl are:
EQ
Equipment. Contains data that describes the equipment present in the network and its physical characteristics.SSH
Steady State Hypothesis. Required input parameters to perform power flow analysis; e.g., energy injections and consumptions and setpoint values for regulating controls.TP
Topology. Describe how the equipment is electrically connected. Contains the definition of power flow buses.SV
State Variables. Contains all the information required to describe a steady-state power flow solution over the network.EQBD
Equipment Boundary. Contains definitions of the equipment in the boundary.TPBD
Topology Boundary. Topology information associated to the boundary.DL
Diagram Layout. Contains information about diagram positions.GL
Geographical Layout. Contains information about geographical positions.
CGMES model connectivity can be defined at two different levels of detail:
Node/breaker
This is the level of detail required for Operation. The EQ
contains Connectivity Nodes where the conducting equipment are attached through its Terminals. All switching devices (breakers, disconnectors, …) are modelled. The contents of the TP
file must be the result of the topology processing over the graph defined by connectivity nodes and switching devices, taking into account its open/closed status.
Bus/branch
No Connectivity Nodes are present in the EQ
file. The association of every equipment to a bus is defined directly in the TP
file, that must be provided.
Format specification
Current supported versions of CGMES are 2.4.15 and 3.0. To learn more about the standard, read the documents in the Common Grid Model Exchange Standard (CGMES) Library.
Triple store
A triplestore or RDF store is a purpose-built database for the storage and retrieval of triples through semantic queries. A triple is a data entity composed of subject-predicate-object such as “Generator is in France”, or in RDF/XML:
<rdf:description rdf:about="generator">
<generator:in>France</generator:in>
</rdf:description>
Input CGMES data read from CIM/XML files is stored natively in a purpose specific database for RDF statements (a Triplestore). There are multiple open-source implementations of Triplestore engines that could be easily plugged in PowSyBl. The only supported Triplestore engine used by PowSyBl is RDF4J. Loading from RDF/XML files to the Triplestore is highly optimized by these engines. Furthermore, the Triplestore repository can be configured to use an in-memory store, allowing faster access to data.
In-memory Rdf4j
Eclipse RDF4J™ is an open source modular Java framework for working with RDF data. This includes parsing, storing, inferencing and querying of/over such data. It offers an easy-to-use API that can be connected to all leading RDF storage solutions. It allows you to connect with SPARQL endpoints and create applications that leverage the power of Linked Data and Semantic Web.
Its in-memory implementation is the default triplestore engine use by PowSyBl for CIM-CGMES import.
Import
The CGMES importer reads and converts a CGMES model to the PowSyBl grid model. The import process is performed in two steps:
- Read input files into a triplestore
- Convert CGMES data retrieved by SPARQL requests from the created triplestore to PowSyBl grid model
The data in input CIM/XML files uses RDF (Resource Description Framework) syntax. In RDF, data is described making statements about resources using triplet expressions: (subject, predicate, object). To describe the conversion from CGMES to PowSyBl we first introduce some generic considerations about the level of detail of the model (node/breaker or bus/branch), the identity of the equipments and equipment containment in substations and voltage levels. After that, the conversion for every CGMES relevant class is explained. Consistency checks and validations performed during the conversion are mentioned in the corresponding sections.
Levels of detail: node/breaker and bus/branch
CGMES models defined at node/breaker level of detail will be mapped to PowSyBl node/breaker topology level. CGMES models defined at bus/branch level will be mapped to PowSyBl bus/breaker topology level.
For each equipment in the PowSyBl grid model it is necessary to specify how it should be connected to the network.
If the model is specified at the bus/breaker level, a Bus
must be specified for the equipment.
If the voltage level is built at node/breaker level, a Node
must be specified when adding the equipment to PowSyBl. The conversion will create a different Node
in PowSyBl for each equipment connection.
Using the Node
or Bus
information, PowSyBl creates a Terminal
that will be used to manage the point of connection of the equipment to the network.
Some equipment, like switches, lines or transformers, have more than one point of connection to the Network.
In PowSyBl, a Node
can have zero or one terminal. In CGMES, the ConnectivityNode
objects may have more than one associated terminals. To be able to represent this in PowSyBl, the conversion process will automatically create internal connections between the PowSyBl nodes that represent equipment connections and the nodes created to map CGMES ConnectivityNode
objects.
Identity of model equipments
Almost all the equipments of the PowSyBl grid model require a unique identifier Id
and may optionally have a human readable Name
. Whenever possible, these attributes will be directly copied from original CGMES attributes.
Terminals are used by CGMES and PowSyBl to define the points of connection of the equipment to the network. CGMES terminals have unique identifiers. PowSyBl does not allow terminals to have an associated identifier. Information about original CGMES terminal identifiers is stored in each PowSyBl object using aliases.
Equipment containers: substations and voltage levels
The PowSyBl grid model establishes the substation as a required container of voltage levels and transformers (two and three windings transformers and phase shifters). Voltage levels are the required container of the rest network equipments, except for the AC and DC transmission lines that establish connections between substations and are associated directly to the network model. All buses at transformer ends should be kept at the same substation.
The CGMES model does not guarantee these hierarchical constraints, so the first step in the conversion process is to identify all the transformers with ends in different substations and all the breakers and switches with ends in different voltage levels. All the voltage levels connected by breakers or switches should be mapped to a single voltage level in the PowSyBl grid model. The first CGMES voltage level, in alphabetical order, will be the representative voltage level associated to the PowSyBl voltage level. The same criterion is used for substations, and the first CGMES substation will be the representative substation associated to the PowSyBl one. The joined voltage levels and substations information is used almost in every step of the mapping between CGMES and PowSyBl models, and it is recorded in the Context
conversion class, that keeps data throughout the overall conversion process.
Conversion from CGMES to PowSyBl grid model
The following sections describe in detail how each supported CGMES network component is converted to PowSyBl network model objects.
Substation
For each substation (considering only the representative substation if they are connected by transformers) in the CGMES model a new substation is created in the PowSyBl grid model with the following attributes created as such:
Country
It is obtained from theregionName
property as first option, fromsubRegionName
as second option. Otherwise, is assigned tonull
.GeographicalTags
It is obtained from theSubRegion
property.
VoltageLevel
As in the substations, for each voltage level (considering only the representative voltage level if they are connected by switches) in the CGMES model a new voltage level is created in the PowSyBl grid model with the following attributes created as such:
NominalV
It is copied from thenominalVoltage
property of the CGMES voltage level.TopologyKind
It will beNODE_BREAKER
orBUS_BREAKER
depending on the level of detail of the CGMES grid model.LowVoltageLimit
It is copied from thelowVoltageLimit
property.HighVoltageLimit
It is copied from thehighVoltageLimit
property.
ConnectivityNode
If the CGMES model is a node/breaker model then ConnectivityNode
objects are present in the CGMES input files, and for each of them a new Node
is created in the corresponding PowSyBl voltage level. A Node
in the PowSyBl model is an integer identifier that is unique by voltage level.
If the import option iidm.import.cgmes.create-busbar-section-for-every-connectivity-node
is true
an additional busbar section is also created in the same voltage level. This option is used to debug the conversion and facilitate the comparison of the topology present in the CGMES input files and the topology computed by PowSyBl. The attributes of the busbar section are created as such:
- Identity attributes
Id
andName
are copied from theConnectivityNode
. Node
The sameNode
assigned to the mappedConnectivityNode
.
TopologicalNode
If the CGMES model is defined at bus/branch detail, then CGMES TopologicalNode
objects are used in the conversion, and for each of them a Bus
is created in the PowSyBl grid model inside the corresponding voltage level container, at the PowSyBl bus/breaker topology level. The created Bus
has the following attributes:
- Identity attributes
Id
andName
are copied from theTopologicalNode
. V
The voltage of theTopologicalNode
is copied if it is valid (greater than0
).Angle
The angle theTopologicalNode
is copied if the previous voltage is valid.
BusbarSection
Busbar sections can be created in PowSyBl grid model only at node/breaker level.
CGMES Busbar sections are mapped to PowSyBl busbar sections only if CGMES is node/breaker and the import option iidm.import.cgmes.create-busbar-section-for-every-connectivity-node
is set to false
. In this case, a BusbarSection
is created in the PowSyBl grid model for each BusbarSection
of the CGMES model, with the attributes created as such:
- Identity attributes
Id
andName
are copied from the CGMESBusbarSection
. Node
A newNode
in the corresponding voltage level.
EnergyConsumer
Every EnergyConsumer
object in the CGMES model creates a new Load
in PowSyBl. The attributes are created as such:
P0
,Q0
are set from CGMES values taken fromSSH
,SV
, orEQ
data depending on which are defined.LoadType
It will beFICTITIOUS
if theId
of theenergyConsumer
contains the patternfict
. OtherwiseUNDEFINED
.LoadDetail
Additional information about conform and non-conform loads is added as an extension of theLoad
object (for more details about the extension).
The LoadDetail
extension attributes depend on the type
property of the CGMES EnergyConsumer
. For a conform load:
withFixedActivePower
is always0
.withFixedReactivePower
is always0
.withVariableActivePower
is set to the LoadP0
.withVariableReactivePower
is set to the LoadQ0
.
When the type is a non-conform load:
withFixedActivePower
is set to the LoadP0
.withFixedReactivePower
is set to the LoadQ0
.withVariableActivePower
is set to0
.withVariableReactivePower
is set to0
.
EnergySource
A CGMES EnergySource
is a generic equivalent for an energy supplier, with the injection given using load sign convention.
For each EnergySource
object in the CGMES model a new PowSyBl Load
is created, with attributes created as such:
P0
,Q0
set fromSSH
orSV
values depending on which are defined.LoadType
It will beFICTITIOUS
if theId
of theenergySource
contains the patternfict
. OtherwiseUNDEFINED
.
SvInjection
CMES uses SvInjection
objects to report mismatches on calculated buses: they record the calculated bus injection minus the sum of the terminal flows. According to the documentation, the values will thus follow generator sign convention: positive sign means injection into the bus. Note that all the reference cases used for development follow load sign convention to report these mismatches, so we have decided to follow this load sign convention as a first approach.
For each SvInjection
in the CGMES network model a new PowSyBl Load
with attributes created as such:
P0
,Q0
are set fromSvInjection.pInjection/qInjection
.LoadType
is always set toFICTITIOUS
.Fictitious
is set totrue
.
EquivalentInjection
The mapping of a CGMES EquivalentInjection
depends on its location relative to the boundary area.
If the EquivalentInjection
is outside the boundary area, it will be mapped to a PowSyBl Generator
.
If the EquivalentInjection
is at the boundary area, its regulating voltage data will be mapped to the generation data inside the PowSyBl DanglingLine
created at the boundary point and its values for P
, Q
will be used to define the DanglingLine P0
, Q0
. Please note that the said DanglingLine
can be created from an ACLineSegment
, a Switch
,
an EquivalentBranch
or a PowerTransformer
.
Attributes of the PowSyBl generator or of the PowSyBl dangling line’s generation are created as such:
MinP
/MaxP
are copied from CGMESminP
/maxP
if defined, otherwise they are set to-Double.MAX_VALUE
/Double.MAX_VALUE
.TargetP
/TargetQ
are set fromSSH
orSV
values depending on which are defined. CGMES values forp
/q
are given with load sign convention, so a change in sign is applied when copying them toTargetP
/TargetQ
.TargetV
TheregulationTarget
property is copied if it is not equal to zero. Otherwise, the nominal voltage associated to the connected terminal of theequivalentInjection
is assigned. For CGMES Equivalent Injections the voltage regulation is allowed only at the point of connection.VoltageRegulatorOn
It is assigned totrue
if both properties,regulationCapability
andregulationStatus
aretrue
and the terminal is connected.EnergySource
is set toOTHER
.
ACLineSegment
CGMES ACLineSegments
’ mapping depends on its location relative to the boundary area.
If the ACLineSegment
is outside the boundary area, it will be mapped to a PowSyBl Line
.
If the ACLineSegment
is completely inside the boundary area, if the boundaries are not imported, it is ignored. Otherwise, it is mapped to a PowSyBl Line
.
If the ACLineSegment
has one side inside the boundary area and one side outside the boundary area, the importer checks if another ACLineSegment
is linked to the same CGMES TopologicalNode
in the boundary area.
- If it is the only one
ACLineSegment
linked to thisTopologicalNode
, it is mapped to a PowSyBlDanglingLine
. - If there are one or more other
ACLineSegment
linked to thisTopologicalNode
and they all are in the sameSubGeographicalRegion
, they are all mapped to PowSyBlDanglingLines
. - If there is exactly one other
ACLineSegment
linked to thisTopologicalNode
in anotherSubGeographicalRegion
, they are both mapped to PowSyblHalfLines
, part of the same PowSyBlTieLine
. - If there are two or more other
ACLineSegment
linked to thisTopologicalNode
in differentSubGeographicalRegions
:- If there are only two
ACLineSegments
with their boundary terminal connected and in differentSubGeographicalRegion
, they are both mapped to PowSyblHalfLines
, part of the same PowSyBlTieLine
and all otherACLineSegments
are mapped to PowSyBlDanglingLines
. - Otherwise, they are all mapped to PowSyBl
DanglingLines
.
- If there are only two
If the ACLineSegment
is mapped to a PowSyBl Line
:
R
is copied from CGMESr
X
is copied from CGMESx
G1
is calculated as half of CMGESgch
if defined,0.0
otherwiseG2
is calculated as half of CGMESgch
if defined,0.0
otherwiseB1
is calculated as half of CGMESbch
B2
is calculated as half of CGMESbch
If the ACLineSegment
is mapped to a PowSyBl DanglingLine
:
R
is copied from CGMESr
X
is copied from CGMESx
G
is copied from CMGESgch
if defined,0.0
otherwiseB
is copied from CGMESbch
UcteXnodeCode
is copied from the name of theTopologicalNode
or theConnectivityNode
(respectively inNODE-BREAKER
orBUS-BRANCH
) inside boundariesP0
is copied from CGMESP
of the terminal at boundary sideQ0
is copied from CGMESQ
of the terminal at boundary side
If the ACLineSegment
is mapped to a PowSyBl HalfLine
:
R
is copied from CGMESr
X
is copied from CGMESx
G1
is0.0
is the Half Line is on sideONE
of the Tie Line. If the Half Line is on sideTWO
of the Tie Line, it is copied from CGMESgch
if defined,0.0
otherwise.G2
is0.0
is the Half Line is on sideTWO
of the Tie Line. If the Half Line is on sideONE
of the Tie Line, it is copied from CGMESgch
if defined,0.0
otherwise.B1
is0.0
is the Half Line is on sideONE
of the Tie Line. If the Half Line is on sideTWO
of the Tie Line, it is copied from CGMESbch
.B2
is0.0
is the Half Line is on sideTWO
of the Tie Line. If the Half Line is on sideONE
of the Tie Line, it is copied from CGMESbch
.UcteXnodeCode
is copied from the name of theTopologicalNode
or theConnectivityNode
(respectively inNODE-BREAKER
orBUS-BRANCH
) inside boundaries
EquivalentBranch
CGMES EquivalentBranches
’ mapping depends on its location relative to the boundary area.
If the EquivalentBranch
is outside the boundary area, it will be mapped to a PowSyBl Line
.
If the EquivalentBranch
is completely inside the boundary area, if the boundaries are not imported, it is ignored. Otherwise, it is mapped to a PowSyBl Line
.
If the EquivalentBranch
has one side inside the boundary area and one side outside the boundary area, the importer checks if another EquivalentBranch
is linked to the same CGMES TopologicalNode
in the boundary area.
- If it is the only one
EquivalentBranch
linked to thisTopologicalNode
, it is mapped to a PowSyBlDanglingLine
. - If there are one or more other
EquivalentBranch
linked to thisTopologicalNode
and they all are in the sameSubGeographicalRegion
, they are all mapped to PowSyBlDanglingLines
. - If there is exactly one other
EquivalentBranch
linked to thisTopologicalNode
in anotherSubGeographicalRegion
, they are both mapped to PowSyblHalfLines
, part of the same PowSyBlTieLine
. - If there are two or more other
EquivalentBranches
linked to thisTopologicalNode
in differentSubGeographicalRegions
:- If there are only two
EquivalentBranches
with their boundary terminal connected and in differentSubGeographicalRegion
, they are both mapped to PowSyblHalfLines
, part of the same PowSyBlTieLine
and all otherEquivalentBranches
are mapped to PowSyBlDanglingLines
. - Otherwise, they are all mapped to PowSyBl
DanglingLines
.
- If there are only two
If the EquivalentBranch
is mapped to a PowSyBl Line
:
R
is copied from CGMESr
X
is copied from CGMESx
G1
is0.0
G2
is0.0
B1
is0.0
B2
is0.0
If the EquivalentBranch
is mapped to a PowSyBl DanglingLine
:
R
is copied from CGMESr
X
is copied from CGMESx
G
is0.0
B
is0.0
UcteXnodeCode
is copied from the name of theTopologicalNode
or theConnectivityNode
(respectively inNODE-BREAKER
orBUS-BRANCH
) inside boundariesP0
is copied from CGMESP
of the terminal at boundary sideQ0
is copied from CGMESQ
of the terminal at boundary side
If the EquivalentBranch
is mapped to a PowSyBl HalfLine
:
R
is copied from CGMESr
X
is copied from CGMESx
G1
is0.0
G2
is0.0
B1
is0.0
B2
is0.0
UcteXnodeCode
is copied from the name of theTopologicalNode
or theConnectivityNode
(respectively inNODE-BREAKER
orBUS-BRANCH
) inside boundaries
AsychronousMachine
CGMES AsynchronousMachines
represent rotating machines whose shaft rotates asynchronously with the electrical field.
It can be motor or generator; no distinction is made for the conversion of these two types.
A CGMES AsynchronousMachine
is mapped to a PowSyBl Load
with attributes created as described below:
P0
,Q0
are set from CGMES values taken fromSSH
orSV
data depending on which are defined. If there is no defined data, it is0.0
.LoadType
isFICTITIOUS
if the CGMES ID contains “fict
”. Otherwise, it isUNDEFINED
.
SynchronousMachine
CGMES SynchronousMachines
represent rotating machines whose shaft rotates synchronously with the electrical field.
It can be motor or generator; no distinction is made for the conversion of these two types.
A CGMES SynchronousMachine
is mapped to a PowSyBl Generator
with attributes created as described below:
MinP
is set from CGMESGeneratingUnit.minOperatingP
on theGeneratingUnit
associated with theSynchronousMachine
. If invalid,MinP
is-Double.MAX_VALUE
.MaxP
is set from CGMESGeneratingUnit.maxOperatingP
on theGeneratingUnit
associated with theSynchronousMachine
. If invalid,MaxP
isDouble.MAX_VALUE
.ratedS
is copied from CGMESratedS
. If it is strictly lower than 0, it is considered undefined.EnergySource
is defined from the CGMESGeneratingUnit
class of theGeneratingUnit
associated with theSynchronousMachine
- If it is a
HydroGeneratingUnit
,EnergySource
isHYDRO
- If it is a
NuclearGeneratingUnit
,EnergySource
isNUCLEAR
- If it is a
ThermalGeneratingUnit
,EnergySource
isTHERMAL
- If it is a
WindGeneratingUnit
,EnergySource
isWIND
- If it is a
SolarGeneratingUnit
,EnergySource
isSOLAR
- Else,
EnergySource
isOTHER
- If it is a
TargetP
/TargetQ
are set fromSSH
orSV
values depending on which are defined. CGMES values forp
/q
are given with load sign convention, so a change in sign is applied when copying them toTargetP
/TargetQ
. If undefined,TargetP
is set from CGMESGeneratingUnit.initialP
from theGeneratingUnit
associated to theSynchronousMachine
andTargetQ
is set to0
.
TODO reactive limits
TODO regulation
TODO normalPF
EquivalentShunt
A CGMES EquivalentShunt
is mapped to a PowSyBl linear ShuntCompensator
. A linear shunt compensator has banks or sections with equal admittance values.
Its attributes are created as described below:
SectionCount
is1
if theEquivalentShunt
CGMESTerminal
is connected, else it is0
.BPerSection
is copied from CGMESb
MaximumSectionCount
is set to1
ExternalNetworkInjection
CGMES ExternalNetworkInjections
are injections representing the flows from an entire external network.
A CGMES ExternalNetworkinjection
is mapped to a PowSyBl Generator
with attributes created as described below:
MinP
is copied from CGMESminP
MaxP
is copied from CGMESmaxP
TargetP
/TargetQ
are set fromSSH
orSV
values depending on which are defined. CGMES values forp
/q
are given with load sign convention, so a change in sign is applied when copying them toTargetP
/TargetQ
. If undefined, they are set to0
.EnergySource
is set asOTHER
TODO reactive limits
TODO regulation
LinearShuntCompensator
CGMES LinearShuntCompensators
represent shunt compensators with banks or sections with equal admittance values.
A CGMES LinearShuntCompensator
is mapped to a PowSybl ShuntCompensator
with SectionCount
copied from CGMES SSH sections
or CGMES SvShuntCompensatorSections.sections
, depending on the import option. If none is defined, it is copied from CGMES normalSections
.
The created PowSyBl shunt compensator is linear and its attributes are defined as described below:
BPerSection
is copied from CGMESbPerSection
if defined. Else, it isFloat.MIN_VALUE
.GPerSection
is copied from CGMESgPerSection
if defined. Else, it is left undefined.MaximumSectionCount
is copied from CGMESmaximumSections
.
TODO regulation
NonlinearShuntCompensator
CGMES NonlinearShuntCompensators
represent shunt compensators with banks or section addmittance values that differs.
A CGMES NonlinearShuntCompensator
is mapped to a PowSyBl ShuntCompensator
with SectionCount
copied from CGMES SSH sections
or CGMES SvShuntCompensatorSections.sections
, depending on the import option. If none is defined, it is copied from CGMES normalSections
.
The created PowSyBl shunt compensator is non linear and has as many Sections
as there are CGMES NonlinearShuntCompensatorPoint
associated with the CGMES NonlinearShuntCompensator
it is mapped to.
Sections are created from the lowest CGMES sectionNumber
to the highest and each section has its attributes created as describe below:
B
is calculated as the sum of all CGMESb
ofNonlinearShuntCompensatorPoints
withsectionNumber
lower or equal to itssectionNumber
G
is calculated as the sum of all CGMESg
ofNonlinearShuntCompensatorPoints
withsectionNumber
lower or equal to itssectionNumber
TODO regulation
OperationalLimit
TODO
PowerTransformer
TODO
SeriesCompensator
CGMES SeriesCompensators
represent series capacitors or reactors or AC transmission lines without charging susceptance.
If a CGMES SeriesCompensator
has both its ends inside the same voltage level, it is mapped to a PowSyBl Switch
. In this case,
all its CGMES electrical attributes are ignored. It is considered as closed, fictitious and, if it is in a node-breaker voltage level, retained. Its SwitchKind
is BREAKER
.
If a CGMES SeriesCompensator
has its ends inside different voltage levels, it is mapped to a PowSyBl Line
with attributes as described below:
R
is copied from CGMESr
X
is copied from CGMESx
G1
,G2
,B1
andB2
are set to0
StaticVarCompensator
CGMES StaticVarCompensators
represent a facility for providing variable and controllable shunt reactive power.
A CGMES StaticVarCompensator
is mapped to a PowSyBl StaticVarCompensator
with attributes as described below:
Bmin
is calculated from CGMESinductiveRating
: if it is defined and not equals to0
,Bmin
is1 / inductiveRating
. Else, it is-Double.MAX_VALUE
.Bmax
is calculated from CGMEScapacitiveRating
: if it defined and not equals to0
,Bmax
is1 / capacitiveRating
. Else, it isDouble.MAX_VALUE
.
A PowSyBl VoltagePerReactivePowerControl
extension is also created from the CGMES StaticVarCompensator
and linked to the PowSyBl StaticVarCompensator
with its slope
attribute copied from CGMES slope
if the latter is 0
or positive.
TODO regulation
Switch (Switch, Breaker, Disconnector, LoadBreakSwitch, ProtectedSwitch, GroundDisconnector)
CGMES Switches
, Breakers
, Disconnectors
, LoadBreakSwitches
, ProtectedSwitches
and GroundDisconnectors
are
all imported in the same manner. For convenience purpose, we will now use CGMES Switch
as a say but keep in mind that this section is valid for all these CGMES classes.
If the CGMES Switch
has its ends both inside the same voltage level, it is mapped to a PowSyBl Switch
with attributes as described below:
SwitchKind
is defined depending on the CGMES class- If it is a CGMES
Breaker
, it isBREAKER
- If it is a CGMES
Disconnector
, it isDISCONNECTOR
- If it is a CGMES
LoadBreakSwitch
, it isLOAD_BREAK_SWITCH
- Otherwise, it is
BREAKER
- If it is a CGMES
Retained
is copied from CGMESretained
if defined in node-breaker. Else, it isfalse
.Open
is copied from CGMES SSHopen
if defined. Else, it is copied from CGMESnormalOpen
. If neither are defined, it isfalse
.
If the CGMES Switch
has its ends in different voltage levels inside the same IGM, it is mapped to a Switch
but the voltage levels, and potentially the substations, that contain its ends are merged: they are mapped to only one voltage level and/or substation.
The created PowSyBl Switch
has its attributes defined as described above.
If the CGMES Switch
has one of its end in the boundary area, it is mapped to a PowSybl DanglingLine
with attributes as described below:
R
,X
,G
,B
are0.0
.UcteXnodeCode
is copied from the name of theTopologicalNode
or theConnectivityNode
(respectively inNODE-BREAKER
orBUS-BRANCH
) inside boundaries.P0
is copied from CGMESP
of the terminal at boundary sideQ0
is copied from CGMESQ
of the terminal at boundary side
Extensions
TODO
Options
These properties can be defined in the configuration file in the import-export-parameters-default-value module.
iidm.import.cgmes.allow-unsupported-tap-changers
The iidm.import.cgmes.allow-unsupported-tap-changers
property is an optional property that determines if every tap changer is read in order to be converted in best effort or if only supported tap changers are read and converted. By default, its value is true
.
iidm.import.cgmes.boundary-location
The iidm.import.cgmes.boundary-location
property is an optional property that defines the directory path where the CGMES importer can find the boundary files (EQBD
and TPBD
profiles) if they are not present in the imported zip file. By default, its value is <ITOOLS_CONFIG_DIR>/CGMES/boundary
.
iidm.import.cgmes.change-sign-for-shunt-reactive-power-flow-initial-state
The iidm.import.cgmes.change-sign-for-shunt-reactive-power-flow-initial-state
property is an optional property
that defines if the CGMES importer inverts the sign of reactive power flows for shunt compensators. Its default value is false
.
iidm.import.cgmes.convert-boundary
The iidm.import.cgmes.convert-boundary
property is an optional property that defines if the CGMES importer imports equipments that are located inside the boundaries or not. Its default value is false
.
iidm.import.cgmes.convert-sv-injections
The iidm.import.cgmes.convert-sv-injections
property is an optional property that defines if SV injections are imported as loads. Its default value is true
.
iidm.import.cgmes.create-active-power-control-extension
The iidm.import.cgmes.create-active-power-control-extension
property is an optional property that defines if active power extensions are created for CGMES normalPF
attribute.
Its default value is false
.
iidm.import.cgmes.create-busbar-section-for-every-connectivity-node
The iidm.import.cgmes.create-busbar-section-for-every-connectivity-node
property is an optional property that defines if the CGMES importer creates an IIDM Busbar Section for each CGMES connectivity node. Its default value is false
.
iidm.import.cgmes.create-fictitious-switches-for-disconnected-terminals-mode
The iidm.import.cgmes.create-fictitious-switches-for-disconnected-terminals-mode
property is an optional property that defines if fictitious switches are created when terminals are described as disconnected in CGMES node-breaker networks.
Three modes are available:
ALWAYS
: fictitious switches are created at every disconnected terminalALWAYS_EXCEPT_SWITCHES
: fictitious switches are created at every disconnected terminal that is not a switch terminalNEVER
: no fictitious switch is created at disconnected terminals Its default value isALWAYS
.
iidm.import.cgmes.decode-escaped-identifiers
The iidm.import.cgmes.decode-escaped-identifiers
property is an optional property that defines if identifiers with characters escaped during the triplestore creation are decoded.
Its default value is true
.
iidm.import.cgmes.ensure-id-alias-unicity
The iidm.import.cgmes.ensure-id-alias-unicity
property is an optional property that defines if IDs’ and aliases’ unicity is ensured during CGMES import. If it is set to true
, identical CGMES IDs will be modified to be unique. If it is set to false
, identical CGMES IDs will throw an exception. Its default value is false
.
iidm.import.cgmes.id-mapping-file-path
The iidm.import.cgmes.id-mapping-file-path
property is an optional property that defines the path of the CSV file containing a mapping between IIDM identifiers and CGMES identifiers. By default, its value is null
:
ID-mapping CSV file is read only if it is in the imported compressed file.
iidm.import.cgmes.import-control-areas
The iidm.import.cgmes.import-control-areas
property is an optional property that defines if control areas must be imported or not. Its default value is true
.
iidm.import.cgmes.naming-strategy
THe iidm.import.cgmes.naming-strategy
property is an optional property that defines which kind of mapping is made between
CGMES identifiers and IIDM identifiers.
It can be:
identity
: CGMES IDs are the same as IIDM IDscgmes
: if CGMES IDs have associated IIDM IDs in a mapping file, IIDM ID is applied (CGMES ID is an alias). if CGMES IDs do not have associated IIDM IDs in a mapping file but are not compliant with CGMES requirements and correspond to an IIDMIdentifiable
, a new CGMES ID is created as an alias.cgmes-fix-all-invalid-ids
: if CGMES IDs have associated IIDM IDs in a mapping file, IIDM ID is applied (CGMES ID is an alias). if CGMES IDs do not have associated IIDM IDs in a mapping file but are not compliant with CGMES requirements, a new CGMES ID is created as an alias. Its default value isidentity
.
iidm.import.cgmes.post-processors
The iidm.import.cgmes.post-processors
property is an optional property that defines all the CGMES post-processors which will be activated after import.
By default, it is an empty list.
One implementation of such a post-processor is available in PowSyBl in the powsybl-diagram repository, named CgmesDLImportPostProcessor.
iidm.import.cgmes.powsybl-triplestore
The iidm.import.cgmes.powsybl-triplestore
property is an optional property that defines which Triplestore implementation is used. PowSyBl supports the RDF4J and Jena Triplestore implementations. This property has rdf4j
as default value.
iidm.import.cgmes.profile-for-initial-values-shunt-sections-tap-positions
The iidm.import.cgmes.profile-for-initial-values-shunt-sections-tap-positions
property is an optional property that defines which CGMES profile is used to initialize tap positions and section counts. It can be SSH
or SV
. Its default value is SSH
.
iidm.import.cgmes.source-for-iidm-id
The iidm.import.cgmes.source-for-iidm-id
property is an optional property that defines if IIDM IDs must be the CGMES mRID or the CGMES rdfID. Its default value is mRID
.
iidm.import.cgmes.store-cgmes-model-as-network-extension
The iidm.import.cgmes.store-cgmes-model-as-network-extension
property is an optional property that defines if the CGMES model is stored in the imported IIDM network as an extension. Its default value is true
.
iidm.import.cgmes.store-cgmes-conversion-context-as-network-extension
The iidm.import.cgmes.store-cgmes-conversion-context-as-network-extension
property is an optional property that defines if the CGMES conversion context will be stored as an extension of the IIDM output network. Its default value is false
.
CGMES post-processors
CgmesDLImportPostProcessor
This post-processor loads the diagram layout (DL) profile contained in the CGMES file, if available, into the triplestore. The diagram layout profile contains the data which is necessary to represent a drawing of the diagram corresponding to the CGMES file. For instance, it contains the position of all equipments.
This post-processor is enabled by adding the name cgmesDLImport
to the list associated to iidm.import.cgmes.post-processors
property.
CgmesGLImportPostProcessor
TODO
CgmesMeasurementsPostProcessor
TODO
CgmesShortCircuitPostProcessor
TODO
EntsoeCategoryPostProcessor
TODO
PhaseAngleClock
TODO
Export
TODO
Please note that PowSyBl only ever export CGMES networks as CGMES Node/Breaker networks without consideration of the topology level of the PowSyBl network.
Conversion from PowSyBl grid model to CGMES
The following sections describe in detail how each supported PowSyBl network model object is converted to CGMES network components.
Battery
PowSyBl Batteries
are exported as CGMES SynchronousMachine
with CGMES HydroGeneratingUnits
.
TODO details
BusbarSection
PowSyBl BusbarSections
are exported as CGMES BusbarSections
.
TODO details
DanglingLine
PowSyBl DanglingLines
are exported as several CGMES network component.
Each dangling line will be exported as one CGMES EquivalentInjection
and one CGMES ACLineSegment
.
TODO details
Generator
PowSyBl Generators
are exported as CGMES SynchronousMachines
.
TODO details
HVDC line and HVDC converter stations
A PowSyBl HVDCLine
and its two HVDCConverterStations
are exported as a CGMES DCLineSegment
and two CGMES DCConverterUnits
.
TODO details
Line
PowSyBl Lines
are exported as CGMES ACLineSegment
.
TODO details
Load
PowSyBl Loads
are exported as CGMES ConformLoads
, NonConformLoads
or EnergyConsumers
depending on the extension LoadDetail
.
TODO details
Shunt compensator
PowSyBl ShuntCompensators
are exported as CGMES LinearShuntCompensator
or NonlinearShuntCompensator
depending on their models.
TODO details
StaticVarCompensator
PowSyBl StaticVarCompensators
are exported as CGMES StaticVarCompensators
.
TODO details
Substation
PowSyBl Substations
are exported as CGMES Substations
.
TODO details
Switch
PowSyBl Switches
are exported as CGMES Breakers
, Disconnectors
or LoadBreakSwitches
depending on its SwitchKind
.
TODO details
ThreeWindingsTransformer
PowSyBl ThreeWindingsTransformers
are exported as CGMES PowerTransformers
with three CGMES PowerTransformerEnds
.
TODO details
TwoWindingsTransformer
PowSyBl TwoWindingsTransformers
are exported as CGMES PowerTransformers
with two CGMES PowerTransformerEnds
.
TODO details
Voltage level
PowSybl VoltatgeLevels
are exported as CGMES VoltageLevels
.
TODO details
Extensions
Control areas
PowSyBl ControlAreas
are exported as CGMES ControlAreas
.
TODO details
Options
These properties can be defined in the configuration file in the import-export-parameters-default-value module.
iidm.export.cgmes.base-name
The iidm.export.cgmes.base-name
property is an optional property that defines the base name of the exported files. Exported CGMES files’ names will look like this:
<base_name>_EQ.xml
<base_name>_TP.xml
<base_name>_SSH.xml
<base_name>_SV.xml
By default, the base name is the network’s name if it exists, as a last resort, the network’s ID.
iidm.export.cgmes.boundary-eq-id
The iidm.export.cgmes.boundary-eq-id
property is an optional property that defines the ID of the EQ-BD model if there is any.
Its default value is null
: we consider there is no EQ-BD model to consider.
iidm.export.cgmes.boundary-tp-id
The iidm.export.cgmes.boundary-tp-id
property is an optional property that defines the ID of the TP-BD model if there is any.
Its default value is null
: we consider there is no TP-BD model to consider.
iidm.export.cgmes.cim-version
The iidm.export.cgmes.cim-version
property is an optional property that defines the CIM version number in which the user wants the CGMES files to be exported.
CIM version 14 and 16 are supported i.e. its valid values are 14
or 16
.
If not defined, and the network has the extension CimCharacteristics
, the CIM version will be the one indicated in the extension. If not, its default value is 16
.
iidm.export.cgmes.export-boundary-power-flows
The iidm.export.cgmes.export-boundary-power-flows
property is an optional property that defines if power flows of boundary nodes are to be exported in the SV file or not.
Its default value is true
.
iidm.export.cgmes.export-power-flows-for-switches
The iidm.export.cgmes.export-power-flows-for-switches
property is an optional property that defines if power flows of switches are exported in the SV file.
Its default value is false
.
idm.export.cgmes.naming-strategy
The iidm.export.cgmes.naming-strategy
property is an optional property that defines which naming strategy is used.
It can be:
identity
: CGMES IDs are the same as IIDM IDscgmes
: IDs of IIDMIdentifiables
are exported as CGMES IDs if they are not compliant with CGMES requirementscgmes-fix-all-invalid-ids
: all IDs are exported as CGMES IDs if they are not compliant with CGMES requirements Its default value isidentity
.
iidm.export.cgmes.profiles
The iidm.export.cgmes.profiles
property is an optional property that defines the exported CGMES profiles.
By default, it is a full CGMES export: EQ, TP, SSH and SV are exported.
Examples
Have a look to the CGMES sample files from ENTSO-E Test Configurations for Conformity Assessment Scheme v2.0.