Simplifying Electricity Networks#

The simplification snakemake rules prepare approximations of the full model, for which it is computationally viable to co-optimize generation, storage and transmission capacities.

  • simplify_network transforms the transmission grid to a 380 kV only equivalent network, while

  • cluster_network uses a k-means based clustering technique to partition the network into a given number of zones and then reduce the network to a representation with one bus per zone.

The simplification and clustering steps are described in detail in the paper

After simplification and clustering of the network, additional components may be appended in the rule add_extra_components and the network is prepared for solving in prepare_network.

Rule simplify_network#

Lifts electrical transmission network to a single 380 kV voltage layer, removes dead-ends of the network, and reduces multi-hop HVDC connections to a single link.

Relevant Settings#

clustering:
  simplify_network:
  cluster_network:
  aggregation_strategies:

costs:
    year:
    version:
    fill_values:
    marginal_cost:
    capital_cost:

electricity:
    max_hours:

lines:
    length_factor:

links:
    p_max_pu:

solving:
    solver:
        name:

See also

Documentation of the configuration file config/config.yaml at costs, electricity, renewable, conventional, links, solving

Inputs#

  • resources/costs.csv: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.

  • resources/regions_onshore.geojson: confer Rule build_bus_regions

  • resources/regions_offshore.geojson: confer Rule build_bus_regions

  • networks/elec.nc: confer Rule add_electricity

Outputs#

  • resources/regions_onshore_elec_s{simpl}.geojson:

    _images/regions_onshore_elec_s.png
  • resources/regions_offshore_elec_s{simpl}.geojson:

    _images/regions_offshore_elec_s.png
  • resources/busmap_elec_s{simpl}.csv: Mapping of buses from networks/elec.nc to networks/elec_s{simpl}.nc;

  • networks/elec_s{simpl}.nc:

    _images/elec_s.png

Description#

The rule simplify_network does up to four things:

  1. Create an equivalent transmission network in which all voltage levels are mapped to the 380 kV level by the function simplify_network(...).

  2. DC only sub-networks that are connected at only two buses to the AC network are reduced to a single representative link in the function simplify_links(...). The components attached to buses in between are moved to the nearest endpoint. The grid connection cost of offshore wind generators are added to the capital costs of the generator.

  3. Stub lines and links, i.e. dead-ends of the network, are sequentially removed from the network in the function remove_stubs(...). Components are moved along.

  4. Optionally, if an integer were provided for the wildcard {simpl} (e.g. networks/elec_s500.nc), the network is clustered to this number of clusters with the routines from the cluster_network rule with the function cluster_network.cluster(...). This step is usually skipped!

Rule cluster_network#

Creates networks clustered to {cluster} number of zones with aggregated buses, generators and transmission corridors.

Relevant Settings#

clustering:
  cluster_network:
  aggregation_strategies:
  focus_weights:

solving:
    solver:
        name:

lines:
    length_factor:

See also

Documentation of the configuration file config/config.yaml at Top-level configuration, renewable, solving, conventional

Inputs#

Outputs#

  • resources/regions_onshore_elec_s{simpl}_{clusters}.geojson:

    _images/regions_onshore_elec_s_X.png
  • resources/regions_offshore_elec_s{simpl}_{clusters}.geojson:

    _images/regions_offshore_elec_s_X.png
  • resources/busmap_elec_s{simpl}_{clusters}.csv: Mapping of buses from networks/elec_s{simpl}.nc to networks/elec_s{simpl}_{clusters}.nc;

  • resources/linemap_elec_s{simpl}_{clusters}.csv: Mapping of lines from networks/elec_s{simpl}.nc to networks/elec_s{simpl}_{clusters}.nc;

  • networks/elec_s{simpl}_{clusters}.nc:

    _images/elec_s_X.png

Description#

Note

Why is clustering used both in simplify_network and cluster_network ?

Consider for example a network networks/elec_s100_50.nc in which simplify_network clusters the network to 100 buses and in a second step cluster_network` reduces it down to 50 buses.

In preliminary tests, it turns out, that the principal effect of changing spatial resolution is actually only partially due to the transmission network. It is more important to differentiate between wind generators with higher capacity factors from those with lower capacity factors, i.e. to have a higher spatial resolution in the renewable generation than in the number of buses.

The two-step clustering allows to study this effect by looking at networks like networks/elec_s100_50m.nc. Note the additional m in the {cluster} wildcard. So in the example network there are still up to 100 different wind generators.

In combination these two features allow you to study the spatial resolution of the transmission network separately from the spatial resolution of renewable generators.

Is it possible to run the model without the simplify_network rule?

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

Tip

The rule cluster_networks runs for all scenario s in the configuration file the rule cluster_network.

Exemplary unsolved network clustered to 512 nodes:

_images/elec_s_512.png

Exemplary unsolved network clustered to 256 nodes:

_images/elec_s_256.png

Exemplary unsolved network clustered to 128 nodes:

_images/elec_s_128.png

Exemplary unsolved network clustered to 37 nodes:

_images/elec_s_37.png

Rule add_extra_components#

Adds extra extendable components to the clustered and simplified network.

Relevant Settings#

costs:
    year:
    version:
    dicountrate:
    emission_prices:

electricity:
    max_hours:
    marginal_cost:
    capital_cost:
    extendable_carriers:
        StorageUnit:
        Store:

See also

Documentation of the configuration file config/config.yaml at costs, electricity

Inputs#

  • resources/costs.csv: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.

Outputs#

  • networks/elec_s{simpl}_{clusters}_ec.nc:

Description#

The rule add_extra_components attaches additional extendable components to the clustered and simplified network. These can be configured in the config/config.yaml at electricity: extendable_carriers:. It processes networks/elec_s{simpl}_{clusters}.nc to build networks/elec_s{simpl}_{clusters}_ec.nc, which in contrast to the former (depending on the configuration) contain with zero initial capacity

  • StorageUnits of carrier ‘H2’ and/or ‘battery’. If this option is chosen, every bus is given an extendable StorageUnit of the corresponding carrier. The energy and power capacities are linked through a parameter that specifies the energy capacity as maximum hours at full dispatch power and is configured in electricity: max_hours:. This linkage leads to one investment variable per storage unit. The default max_hours lead to long-term hydrogen and short-term battery storage units.

  • Stores of carrier ‘H2’ and/or ‘battery’ in combination with Links. If this option is chosen, the script adds extra buses with corresponding carrier where energy Stores are attached and which are connected to the corresponding power buses via two links, one each for charging and discharging. This leads to three investment variables for the energy capacity, charging and discharging capacity of the storage unit.

Rule prepare_network#

Prepare PyPSA network for solving according to The {opts} wildcard and The {ll} wildcard, such as.

  • adding an annual limit of carbon-dioxide emissions,

  • adding an exogenous price per tonne emissions of carbon-dioxide (or other kinds),

  • setting an N-1 security margin factor for transmission line capacities,

  • specifying an expansion limit on the cost of transmission expansion,

  • specifying an expansion limit on the volume of transmission expansion, and

  • reducing the temporal resolution by averaging over multiple hours or segmenting time series into chunks of varying lengths using tsam.

Relevant Settings#

costs:
    year:
    version:
    fill_values:
    emission_prices:
    marginal_cost:
    capital_cost:

electricity:
    co2limit:
    max_hours:

See also

Documentation of the configuration file config/config.yaml at costs, electricity

Inputs#

  • resources/costs.csv: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.

  • networks/elec_s{simpl}_{clusters}.nc: confer Rule cluster_network

Outputs#

  • networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc: Complete PyPSA network that will be handed to the solve_network rule.

Description#

Tip

The rule prepare_elec_networks runs for all scenario s in the configuration file the rule prepare_network.