Documentation of the PowerSystemDataModel

Welcome to the documentation of the PowerSystemDataModel. It provides an extensive data model capable of modelling energy systems with high granularity e.g. for bottom-up simulations. Additionally, useful functions to process, augment and furnish model i/o information is provided. Effective handling of geographic information related to power grids is also possible.

Getting started

Welcome, dear fellow of bottom up power system modelling! This section is meant to give you some help getting hands on our project. If you feel, something is missing, please contact us!

Requirements

Java > v 1.8

Where to get

Checkout latest from GitHub or use maven for dependency management:

Stable releases

On Maven central:

<dependency>
  <groupId>com.github.ie3-institute</groupId>
  <artifactId>PowerSystemUtils</artifactId>
  <version>1.3.1</version>
</dependency>

Snapshot releases

Available on OSS Sonatype. Add the correct repository:

<repositories>
  <repository>http://oss.sonatype.org/content/repositories/snapshots</repository>
</repositories>

and add the dependency:

<dependency>
  <groupId>com.github.ie3-institute</groupId>
  <artifactId>PowerSystemUtils</artifactId>
  <version>1.3.2-SNAPSHOT</version>
</dependency>

Available models

This page gives an overview about all available models in PowerSystemDataModel. They are basically grouped into three groups:

  1. Input models may be used to describe input data for a power system simulation
  2. Result models denote results of such a simulation
  3. Time Series may serve both as input or output

All those models are designed with some assumptions and goals in mind. To assist you in applying them as intended, we will give you some general remarks:

Uniqueness
All models have a uuid field as universal unique identifier. There shouldn’t be any two elements with the same uuid in your grid data set, better in your whole collection of data sets.
Immutability
We designed the models in a way, that does not allow for adaptions of the represented data after instantiation of the objects. Thereby you can be sure, that your models are thread-safe and no unwanted or unobserved changes are made.
Copyable
With the general design principle of immutability, entity modifications (e.g. updates of field values) can become hard and annoying. To avoid generating methods to update each field value, we provide an adapted version of the builder pattern to make entity modifications as easy as possible. Each entity holds it’s own copy builder class, which follows the same inheritance as the entity class itself. With a call of .copy() on an entity instance a builder instance is returned, that allows for modification of fields and can be terminated with .build() which will return an instance of the entity with modified field values as required. For the moment, this pattern is only implemented for a small amount of AssetInput entities (all entities held by a GridContainer except thermal units to be precise), but we plan to extend this capability to all input entities in the future.
Single Point of Truth
Throughout all models you can be sure, that no information is given twice, reducing the possibility to have ambiguous information in your simulation set up. “Missing” information can be received through the grids relational information - e.g. if you intend to model a wind energy converter in detail, you may find information of it’s geographical location in the model of it’s common coupling point (node).
Harmonized Units System
As our models are representations of physical elements, we introduced a harmonized system of units. The standard units, the models are served with, is given on each element’s page. Thereby you can be sure, that all information are treated the same. As most (database) sources do not support physical units, make sure, you have your input data transferred to correct units before. Same applies for interpreting the obtained results. In all models physical values are transferred to standard units on instantiation.

Input

Model classes you can use to describe a data set as input to power system simulations.

Operator

This is a simple identifier object, representing a natural or legal person that is the owner or responsible person having control over one or more physical entitites.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid  
id Human readable identifier
Application example
1
2
3
4
OperatorInput profBroccoli = new OperatorInput(
        UUID.fromString("f15105c4-a2de-4ab8-a621-4bc98e372d92"),
        "Univ.-Prof. Dr. rer. hort. Klaus-Dieter Brokkoli"
      )
Caveats

Nothing - at least not known. If you found something, please contact us!

Result

Model classes you can use to describe the outcome of a power system simulation.

Grid Related Models

Node

Representation of an electrical node, with no further distinction into bus bar, auxiliary node or others.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
vMag p.u.  
vAng degree  
Caveats

Nothing - at least not known. If you found something, please contact us!

Connector

Representation of all kinds of connectors.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
Caveats

Groups all available connectors i.e. lines, switches and transformers

Line

Representation of an AC line.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
Caveats

Nothing - at least not known. If you found something, please contact us!

Switch

Representation of electrical switches.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
closed boolean status of the switching device
Caveats

Nothing - at least not known. If you found something, please contact us!

Transformer

Representation of transformers.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
tapPos  
Caveats

Groups common information to both 2W and 3W transformers.

Two Winding Transformer

Representation of two winding transformers.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
tapPos  
Caveats

Assumption: Node A is the node at higher voltage.

Three Winding Transformer

Representation of three winding transformers.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp ZonedDateTime date and time for the produced result
inputModel uuid for the associated input model
iAMag ampere A stands for sending node
iAAng degree  
iBMag ampere B stands for receiving node
iBAng degree  
iCMag ampere B stands for receiving node
iCAng degree  
tapPos  
Caveats

Assumption: Node A is the node at highest voltage and Node B is at intermediate voltage. For model specifications please check corresponding input model documentation.

Participant Related Models

Biomass plant

Result of a biomass power plant.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Combined Heat and Power Plant

Result of a combined heat and power plant.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Electric Vehicle

Result of an electric vehicle, that is occasionally connected to the grid via an electric vehicle charging station.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
soc  
Caveats

Nothing - at least not known. If you found something, please contact us!

Electric Vehicle Charging Station

This model is currently only a dummy implementation of an electric vehicle charging station.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Fixed Feed In Facility

Result of a facility, that provides constant power feed in, as no further information about the actual behaviour of the model can be derived.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Load

Result of a heat pump.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
qDot MW Thermal power
Caveats

Nothing - at least not known. If you found something, please contact us!

Load

Result of (mainly) domestic loads.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Photovoltaic Power Plant

Result of a photovoltaic power plant.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Electrical Energy Storage

Result of an electrochemical storage

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
soc  
Caveats

Nothing - at least not known. If you found something, please contact us!

Wind Energy Converter

Result of a wind turbine.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Thermal Sink

Result of a thermal sink.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
qDot MW thermal heat demand
Caveats

Nothing - at least not known. If you found something, please contact us!

Thermal Storage

Result of a thermal storage.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
energy MWh  
qDot MW heat flowing in
Caveats

Nothing - at least not known. If you found something, please contact us!

Thermal Unit

Result of a thermal unit.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
qDot MW thermal power exchanged
Caveats

Nothing - at least not known. If you found something, please contact us!

Thermal House

Model for the thermal behaviour of a building. This reflects a simple shoe box with transmission losses

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
qDot MW thermal heat demand of the sink
indoorTemperature °C  
Caveats

Nothing - at least not known. If you found something, please contact us!

Cylindrical Thermal Storage

Result of a cylindrical thermal storage using a fluent to store thermal energy.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
energy MWh  
qDot MW heat demand of the sink
fillLevel  
Caveats

Nothing - at least not known. If you found something, please contact us!

System Participant

Groups together all system participants such as PV, Storage etc.

Attributes, Units and Remarks
Attribute Unit Remarks
uuid uuid for the result entity
timeStamp date and time for the produced result
inputModel uuid for the associated input model
p MW  
q MVAr  
Caveats

Nothing - at least not known. If you found something, please contact us!

Time Series

Time series are meant to represent a timely ordered series of values. Those can either be electrical or non-electrical depending on what one may need for power system simulations. Our time series models are divided into two subtypes:

Individual Time Series
Each time instance in this time series has its own value (random duplicates may occur obviously). They are only applicable for the time frame that is defined by the content of the time series.
Repetitive Time Series
Those time series do have repetitive values, e.g. each day or at any other period. Therefore, they can be applied to any time frame, as the mapping from time instant to value is made by information reduction. In addition to actual data, a mapping function has to be known.

To be as flexible, as possible, the actual content of the time series is given as children of the Value class. The following different values are available:

Value Class Purpose
PValue Electrical active power
SValue Electrical active and reactive power
HeatAndPValue
Combination of thermal power (e.g. in kW)
and electrical active power (e.g. in kW)
HeatAndSValue
Combination of thermal power (e.g. in kW)
and electrical active and reactive power (e.g. in kW and kVAr)
EnergyPriceValue Wholesale market price (e.g. in € / MWh)
IrradiationValue Combination of diffuse and direct solar irradiation
TemperatureValue Temperature information
WindValue Combination of wind direction and wind velocity
WeatherValue Combination of irradiation, temperature and wind information

I/O

The PowerSystemDataModel library additionally offers I/O-capabilities. In the long run, it is our aim to provide many different source and sink technologies. Therefore, the I/O-package is structured as highly modular.

Implemented Data Connectors

  • influxdb
  • csvfiles

De-Serialization (loading models)

At the end, having an instance of Grid Container is the goal. It consists of the three main blocks:

Those blocks are also reflected in the structure of data source interface definitions. There is one source for each of the containers, respectively.

Class diagram of data sources

Class diagram of data sources

As a full data set has references among the models (e.g. a line model points to its’ nodes it connects), there is a hierarchical structure, in which models have to be loaded. Therefore, the different sources have also references among themselves. An application example to load an exampleGrid from csv files located in ./exampleGrid could look like this:

/* Parameterization */
String csvSep = ";"
String folderPath = "./exampleGrid"
FileNamingStrategy namingStrategy = new FileNamingStrategy() // Default naming strategy

/* Instantiating sources */
TypeSource typeSource = new CsvTypeSource(csvSep, folderPath, namingStrategy)
RawGridSource rawGridSource = new CsvRawGridSource(csvSep, folderPath, namingStrategy, typeSource)
ThermalSource thermalSource = new CsvThermalSource(csvSep, folderPath, namingStrategy, typeSource)
ParticipantSource participantSource = new CsvSystemParticipantSource(
  csvSep,
  folderPath,
  namingStrategy,
  typeSource,
  thermalSource,
  rawGridSource
)
GraphicSource graphicsSource = new CsvGraphicSource(
  csvSep,
  folderPath,
  namingStrategy,
  typeSource,
  rawGridSource
)

/* Loading models */
RawGridElements rawGridElements = rawGridSource.getGridData.orElseThrow(
      () -> new SourceException("Error during reading of raw grid data.")
   )
SystemParticipants systemParticipants = systemParticipantSource.getGridData.orElseThrow(
      () -> new SourceException("Error during reading of raw grid data.")
   )
GraphicElements graphicElements = graphicsSource.getGraphicElements.orElseThrow(
      () -> new SourceException("Error during reading of graphic elements data.")
   )
JointGridContainer fullGrid = new JointGridContainer(
  gridName,
  rawGridElements,
  systemParticipants,
  graphicElements
)

As observable from the code, it doesn’t play a role, where the different parts come from. It is also a valid solution, to receive types from file, but participants and raw grid elements from a data base. Only prerequisite: An implementation of the different interfaces for the desired data sink.

Serialization (writing models)

Serializing models is a bit easier:

/* Parameterization */
String csvSep = ";"
String folderPath = "./exampleGrid"
FileNamingStrategy namingStrategy = new FileNamingStrategy()
boolean initEmptyFiles = false

/* Instantiating the sink */
DataSink sink = new CsvFileSink(folderPath, namingStrategy, initEmptyFiles, csvSep)
sink.persistAll(grid.allEntitiesAsList())

The sink takes a collection of model suitable for serialization and handles the rest (e.g. unboxing of nested models) on its own. But caveat: As the (csv) writers are implemented in a concurrent, non-blocking way, duplicates of nested models could occur.

Default naming strategy

There is a default mapping from model class to file naming in the case you would like to use csv files for (de) serialization of models. You may extend / alter the naming with pre- or suffix by calling new FileNamingStrategy("prefix", "suffix").

Input

Model File Name
operator prefix_operator_input_suffix
node prefix_node_input_suffix
line
prefix_line_input_suffix
prefix_line_type_input_suffix
switch prefix_switch_input_suffix
two winding transformer
prefix_transformer2w_input_suffix
prefix_transformer2w_type_input_suffix
three winding transformer
prefix_transformer3w_input_suffix
prefix_transformer3w_type_input_suffix
measurement unit prefix_measurement_unit_input_suffix
biomass plant
prefix_bm_input_suffix
prefix_bm_type_input_suffix
combined heat and power plant
prefix_chp_input_suffix
prefix_chp_type_input_suffix
electric vehicle
prefix_ev_input_suffix
prefix_ev_type_input_suffix
electric vehicle charging station prefix_evcs_input_suffix
fixed feed in facility prefix_fixed_feed_in_input_suffix
heat pump
prefix_hp_input_suffix
prefix_hp_type_input_suffix
load prefix_load_input_suffix
photovoltaic power plant prefix_pc_input_suffix
electrical energy storage
prefix_storage_input_suffix
prefix_storage_type_input_suffix
wind energy converter
prefix_wec_input_suffix
prefix_wec_type_input_suffix
schematic node graphic prefix_node_graphic_input_suffix
schematic line graphic prefix_line_graphic_input_suffix

Results

Model File Name
node prefix_node_res_suffix
line prefix_line_res_suffix
switch prefix_switch_res_suffix
two winding transformer prefix_transformer2w_res_suffix
three winding transformer | prefix_transformer3w_res_suffix
biomass plant prefix_bm_res_suffix
combined heat and power plant prefix_chp_res_suffix
electric vehicle prefix_ev_res_suffix
electric vehicle charging station prefix_evcs_res_suffix
fixed feed in prefix_fixed_feed_in_res_suffix
heat pump prefix_hp_res_suffix
load prefix_load_res_suffix
photovoltaic power plant prefix_pv_res_suffix
storage prefix_storage_res_suffix
wind energy converter prefix_wec_res_suffix
thermal house model prefix_thermal_house_res_suffix
cylindrical thermal storage prefix_cylindrical_storage_res_suffix

Time Series

Model File Name
individual time series prefix_individual_time_series_UUID_suffix
load profile input prefix_load_profile_time_series_profileKey_UUID_suffix

Contact the (Main) Maintainers

If you feel, something this missing, wrong or misleading, please contact one of our main contributors:

Hat tip to all other contributors!

Indices and tables