Skip to content

Transmission Grid

The rules on this page build the transmission network from OpenStreetMap or the ENTSO-E reference grid, add planned projects and dynamic line rating, and reduce the network to the model regions. They follow the order base → simplified → clustered; the clustered network is the starting point of every model run. The simplification and clustering steps are described in 1 and 2.

Base network

clean_osm_data

Cleans raw OSM substation, line and cable data into consistent GeoJSON layers.

Script, inputs, outputs and settings
  • Script: scripts/clean_osm_data.py
  • Inputs: depends on configuration, resources/offshore_shapes.geojson, resources/country_shapes.geojson
  • Outputs: resources/osm/clean/substations.geojson, resources/osm/clean/substations_polygon.geojson, resources/osm/clean/dc_switching.geojson, resources/osm/clean/dc_switching_polygon.geojson, resources/osm/clean/converters_polygon.geojson, resources/osm/clean/lines.geojson, resources/osm/clean/links.geojson
  • Settings: electricity.voltages

Cleans the raw OpenStreetMap power data into consistent tables of substations, lines, cables and links for building the base network.

The voltage, circuit, cable, wire and frequency tags are parsed and standardised, semicolon-separated values are split into separate rows with the circuits distributed among them, and line endings are attached to the substations they connect to.

build_osm_network

Builds buses, lines, links, converters and transformers from cleaned OSM data.

Script, inputs, outputs and settings
  • Script: scripts/build_osm_network.py
  • Inputs: resources/osm/clean/substations.geojson, resources/osm/clean/substations_polygon.geojson, resources/osm/clean/dc_switching.geojson, resources/osm/clean/dc_switching_polygon.geojson, resources/osm/clean/converters_polygon.geojson, resources/osm/clean/lines.geojson, resources/osm/clean/links.geojson, resources/country_shapes.geojson
  • Outputs: resources/osm/build/lines.csv, resources/osm/build/links.csv, resources/osm/build/converters.csv, resources/osm/build/transformers.csv, resources/osm/build/buses.csv, resources/osm/build/geojson/lines.geojson, resources/osm/build/geojson/links.geojson, resources/osm/build/geojson/converters.geojson, resources/osm/build/geojson/transformers.geojson, resources/osm/build/geojson/buses.geojson, resources/osm/build/geojson/stations_polygon.geojson, resources/osm/build/geojson/buses_polygon.geojson
  • Settings: countries, electricity.voltages, lines.types, osm_network_release.under_construction, osm_network_release.remove_after

Builds the topologically connected OpenStreetMap transmission network as tables of buses, lines, links, converters and transformers.

Cleaned OSM substations, lines, HVDC links and converter polygons are turned into an electrically consistent network. Lines are split where they pass over buses, merged across junctions that are not substations, and connected to stations formed by aggregating substations within 500 m; the station location is the pole of inaccessibility of the merged polygon. Voltages are floored to full kV levels, transformers are added between voltage levels within a station, DC buses and converter links are created from converter and switching stations, and assets under construction are kept or removed by configuration. The output feeds the base network and the prebuilt OSM network release.

References

build_tyndp_network

Builds buses and links of the TYNDP reference grid from node data and bidding zone shapes.

Script, inputs, outputs and settings
  • Script: scripts/build_tyndp_network.py
  • Inputs: output of retrieve_tyndp, resources/bidding_zones.geojson
  • Outputs: resources/tyndp/build/lines.csv, resources/tyndp/build/links.csv, resources/tyndp/build/converters.csv, resources/tyndp/build/transformers.csv, resources/tyndp/build/buses.csv, resources/tyndp/build/buses_h2.csv, resources/tyndp/build/geojson/lines.geojson, resources/tyndp/build/geojson/links.geojson, resources/tyndp/build/geojson/converters.geojson, resources/tyndp/build/geojson/transformers.geojson, resources/tyndp/build/geojson/buses.geojson, resources/tyndp/build/geojson/buses_h2.geojson
  • Settings: countries

Builds a zonal transmission network from the ENTSO-E TYNDP reference grid with one bus per bidding zone.

Bidding zone shapes are reduced to representative points that serve as coordinates for the electricity and hydrogen nodes of the TYNDP node table. The net transfer capacities (NTC) of the reference grid become unidirectional DC links, one per direction, drawn as straight lines between the zone points with an assumed voltage of 380 kV. Lines, converters and transformers are exported as empty placeholder tables so that the output has the same format as the OSM network and can be read by the base network rule.

base_network

Builds the base PyPSA network and bus Voronoi regions from OSM, TYNDP or ENTSO-E grid data.

Script, inputs, outputs and settings

Build the base transmission network as a PyPSA network from the chosen grid dataset, together with the onshore and offshore Voronoi regions of its buses.

Buses, lines, links, transformers and converters come from an ENTSO-E map extract (March 2022, deprecated), from OpenStreetMap data or from the TYNDP reference grid, as selected by electricity.base_network. Buses outside the modelled countries and small unconnected components are dropped, electrical parameters are set from the configured line types per voltage level and the link and converter settings, and branches under construction are kept or removed according to the configuration. Each bus is assigned a country and marked as substation. Onshore regions are Voronoi cells of the buses within administrative shapes derived from NUTS3 regions; offshore regions are Voronoi cells within the exclusive economic zones.

Transmission projects and line rating

build_transmission_projects

Collects, deduplicates and maps transmission projects onto base network buses.

Script, inputs, outputs and settings
  • Script: scripts/build_transmission_projects.py
  • Inputs: resources/networks/base.nc, resources/offshore_shapes.geojson, resources/europe_shape.geojson, data/transmission_projects/
  • Outputs: resources/transmission_projects/new_lines.csv, resources/transmission_projects/new_links.csv, resources/transmission_projects/adjust_lines.csv, resources/transmission_projects/adjust_links.csv, resources/transmission_projects/new_buses.csv
  • Settings: transmission_projects, lines.length_factor, lines.s_max_pu

Gets the transmission projects defined in the config file, concatenates and deduplicates them. Projects are later included in add_electricity.

Each project is read from a subfolder of data/transmission_projects/ named after the project. The offshore shapes are used to determine if a new bus should be added for a new line or link, and the shape of Europe to determine if a project is within the considered countries. New and upgraded lines and links are written to separate files. For lines and links which are upgraded, the decommissioning year of the existing line or link is adjusted to the build year of the upgraded one. For some links, new buses have to be added (e.g. North Sea Wind Power Hub).

build_line_rating

Computes dynamic line rating time series for transmission lines from weather data.

Script, inputs, outputs and settings

Calculates dynamic line rating time series from base network.

The rule build_line_rating calculates the line rating for transmission lines. The line rating provides the maximal capacity of a transmission line considering the heat exchange with the environment.

The following heat gains and losses are considered:

  • heat gain through resistive losses
  • heat gain through solar radiation
  • heat loss through radiation of the transmission line
  • heat loss through forced convection with wind
  • heat loss through natural convection

With a heat balance considering the maximum temperature threshold of the transmission line, the maximal possible capacity factor "s_max_pu" for each transmission line at each time step is calculated.

add_transmission_projects_and_dlr

Adds transmission projects and dynamic line ratings to the base network.

Script, inputs, outputs and settings

Adds planned transmission projects and dynamic line rating to the base network.

Transmission projects arrive as tables of new buses, lines and links and of adjustments to existing lines and links, which are added to or applied on the network. If dynamic line rating is active, the precomputed line rating time series is converted into a per-unit capacity s_max_pu for each overhead line, scaled by a correction factor and optionally capped by a maximum voltage angle difference across the line and a maximum line rating. The result is the extended base network used for simplification and clustering.

References

Simplification and clustering

build_hac_features

Aggregates cutout weather data to simplified regions as features for hierarchical clustering.

Script, inputs, outputs and settings

Aggregates weather cutout time series to the regions of the simplified network as features for hierarchical agglomerative clustering (HAC).

Selected cutout variables, such as wind speed and solar influx, are aggregated over each onshore region with the cutout's indicator matrix. The resulting per-region time series are the feature vectors compared when the network is clustered with the HAC algorithm.

simplify_network

Maps the network to a single 380 kV layer, collapses HVDC chains and removes stubs.

Script, inputs, outputs and settings

Simplify the base network to a single 380 kV voltage layer, remove dead-ends and fold multi-hop HVDC connections into single links.

By default, all voltage levels are mapped to 380 kV by replacing the line types and removing transformers while preserving transmission capacity; this step can be disabled to keep the original voltage levels. Converters are removed and DC-only sub-networks connected to the AC network at two buses are reduced to one representative link. Stub lines and links, i.e. dead-ends of the network, are removed sequentially, optionally only within a country or administrative region. Optionally, non-substation buses are aggregated to their electrically closest substation, and for HAC clustering, buses without a Voronoi shape are merged into their closest neighbour. The busmaps of all steps are combined and the onshore and offshore regions dissolved accordingly.

cluster_network

Clusters the simplified network to the configured number of buses and regions.

Script, inputs, outputs and settings

Cluster the simplified network to the configured number of zones with aggregated buses and transmission corridors.

A busmap assigns every bus to a cluster according to the clustering mode: k-means, hierarchical agglomerative clustering (HAC) on the weather features from build_hac_features, or greedy modularity on the network graph, with the number of clusters distributed across countries in proportion to load (adjustable via clustering.focus_weights); administrative regions; or a custom busmap or set of bus shapes. Buses, lines and links are then aggregated with pypsa.clustering.spatial using the configured aggregation strategies, the onshore and offshore regions are dissolved accordingly, and selected groups of regions can be merged into copperplates.

Is it possible to run the model without simplify_network?

No, the clustering methods in pypsa.clustering.spatial do not work reliably with multiple voltage levels and transformers.

Exemplary unsolved networks clustered to 512, 256, 128 and 37 nodes:

chain_busmaps

Chains the simplify and cluster busmaps into one mapping from base to clustered buses.

Script, inputs, outputs and settings
  • Script: scripts/chain_busmaps.py
  • Inputs: resources/busmap_simplify_network.csv, resources/busmap_cluster_network.csv
  • Outputs: resources/busmap.csv

Build combined busmap from simplify_network and cluster_network busmaps.

Chains the two busmaps to create a single mapping from base network buses to clustered network buses.


  1. Jonas Horsch and Tom Brown. The role of spatial scale in joint optimisations of generation and transmission for European highly renewable scenarios. In 2017 14th International Conference on the European Energy Market (EEM), 1–7. IEEE, 2017. doi:10.1109/EEM.2017.7982024. ↩

  2. Martha Maria Frysztacki, Gereon Recht, and Tom Brown. A comparison of clustering methods for the spatial reduction of renewable electricity optimisation models of Europe. Energy Informatics, 5(1):4, 2022. URL: https://energyinformatics.springeropen.com/articles/10.1186/s42162-022-00187-7, doi:10.1186/s42162-022-00187-7. ↩