Edge Impedances and Admittances
CommonOPF exports methods to get the real-valued resistance and reactance of Network edges, as well as the complex-valued impedance. If the Network is SinglePhase then scalar values are returned; if the Network is MultiPhase then matrix values are returned.
Impedance
CommonOPF.rij — Functionrij(i::AbstractString, j::AbstractString, net::Network)
resistance(net[(i,j)])Resistance of edge i-j
rij(i::AbstractString, j::AbstractString, net:::Network{SinglePhase})Scalar resistance of edge i-j
CommonOPF.rij_per_unit — Functionrij_per_unit(i::AbstractString, j::AbstractString, net::Network)
resistance(net[(i,j)]) / net.ZbaseResistance of edge i-j normalized by net.Zbase
CommonOPF.xij — Functionxij(i::AbstractString, j::AbstractString, net::Network)Reactance of edge i-j
xij(i::AbstractString, j::AbstractString, net:::Network{SinglePhase})Scalar reactance of edge i-j
CommonOPF.xij_per_unit — Functionxij_per_unit(i::AbstractString, j::AbstractString, net::Network)Reactance of edge i-j normalized by net.Zbase
CommonOPF.zij — Functionzij(i::AbstractString, j::AbstractString, net::Network)Impedance matrix of edge (i,j)
CommonOPF.zij_per_unit — Functionzijperunit(i::AbstractString, j::AbstractString, net::Network)
Impedance matrix of edge (i,j) in per-unit (normalized with net.Zbase)
Admittance
CommonOPF.gij — Functiongij(i::AbstractString, j::AbstractString, net::Network)conductance of edge i-j
gij(i::AbstractString, j::AbstractString, net:::Network{SinglePhase})Scalar conductance of edge i-j
CommonOPF.gij_per_unit — Functiongij_per_unit(i::AbstractString, j::AbstractString, net::Network)conductance of edge i-j normalized by net.Zbase
CommonOPF.bij — Functionbij(i::AbstractString, j::AbstractString, net::Network)
susceptance(net[(i,j)])susceptance of edge i-j
bij(i::AbstractString, j::AbstractString, net:::Network{SinglePhase})Scalar susceptance of edge i-j
CommonOPF.bij_per_unit — Functionbij_per_unit(i::AbstractString, j::AbstractString, net::Network)
susceptance(net[(i,j)]) * net.Zbasesusceptance of edge i-j normalized by net.Zbase
CommonOPF.yij — Functionyij(i::AbstractString, j::AbstractString, net::Network)admittance matrix of edge (i,j)
yij(i::AbstractString, j::AbstractString, net::Network{SinglePhase})branch admittance of edge (i,j)
CommonOPF.yij_per_unit — Functionyij_per_unit(i::AbstractString, j::AbstractString, net::Network{SinglePhase})branch admittance of edge (i,j) in per-unit (multiplied with net.Zbase)
yij_per_unit(i::AbstractString, j::AbstractString, net::Network)branch admittance matrix of edge (i,j) in per-unit (multiplied with net.Zbase)
Bus Admittance Matrix
The convention in CommonOPF is upper case Y for the bus admittance matrix methods:
CommonOPF.Yij — FunctionYij(
i::AbstractString,
j::AbstractString,
net::CommonOPF.Network{SinglePhase}
)::ComplexF64Returns entry of bus admittance matrix at i,j for single phase networks
Yij(
i::AbstractString,
j::AbstractString,
net::CommonOPF.Network{MultiPhase}
)::Matrix{ComplexF64}Returns Nphase x Nphase sub-matrix of bus admittance matrix for the phases connecting busses i and j
!!! warning The branch admittance methods like yij always return 3x3 matrices regardless of the phases in net[(i, j)].phases. This is because it is easier to build the OPF models if we have consistently sized vectors and matrices. However, for the BIM that use the bus admittance matrix, it is simpler to exclude the non-existent phases and define variables with the same size and indices as the bus admittance matrix.
CommonOPF.Yij_per_unit — FunctionYij_per_unit(
i::AbstractString,
j::AbstractString,
net::CommonOPF.Network{SinglePhase}
)::ComplexF64Returns entry of bus admittance matrix at i,j in per-unit (multiplied with net.Zbase)
CommonOPF.Ysparse — Functionfunction Ysparse(net::CommonOPF.Network)::SparseArrays.SparseMatrixCSCReturns a Symmetric view of sparse upper triangular matrix.
Shunt Admittance
Network specification yaml files can include bus admittance values like:
ShuntAdmittance:
- bus: 1
g: 0
b: 0.0011The admittances will be stored in the Network bus data and can be retrieved using the yj methods:
CommonOPF.yj — Functionyj(j::AbstractString, net::Network{SinglePhase})::ComplexF64Shunt admittance of bus j
yj(j::AbstractString, net::Network{MultiPhase})::Matrix{ComplexF64}Shunt admittance of bus j