ImpPTDF: Create Impedance matrix and PTDF

Description Usage Arguments Details See Also Examples

View source: R/ImpPTDF.R

Description

This is a wrapper for the more interesting parts of the electrical building blocks It creates both matrices as they almost always both need to be created and they take time so producing together is more efficient than producing each one on its own.

Usage

1
2
3
4
5
6
7
8
9
ImpPTDF(
  g,
  SlackRef,
  AZero,
  LineProperties,
  injection_vector = NULL,
  EdgeName = "Link",
  VertexName = "name"
)

Arguments

g

An igraph object representing a power-grid

SlackRef

The slack node for the power-grid, A character vector

AZero

a matrix. This is created by the 'CreateTransmission' function

LineProperties

a matrix This is created by the LinePropertiesMatrix function

injection_vector

a numeric vector. The net generation values for all the nodes in the network

EdgeName

the variable that holds the edge names, a character string.

VertexName

the variable that holds the names of the nodes, to identify the slack ref. a character string to increase speed

Details

This function calculates the PTDF and the impedance matrix also the power flow across the edges. However, the function outputs either the power flow or the PTDF and the impedance matrix. This is because by outputting only the power flow the calculation can be made much faster by avoiding matrix inversion. This is especially important as the matrices are sparse and inversion would create a dense matrix which is much larger in terms of RAM and slower in terms of processing speed. When the PTDF and impedance matrix are explicity required, then the injection_vector variable should be NULL

See Also

attack_the_grid,CreateTransmission, LinePropertiesMatrix

Examples

1
2
g2 <-make_ego_graph(g, 2, "AXMI")[[1]]
ImpPTDF(g, SlackRef)

JonnoB/PowerGridNetworking documentation built on Aug. 7, 2021, 3:04 a.m.