Multiphase Models

BranchFlowModel.jl provides methods to build many different variations of the Branch Flow Model, including single phase and multiphase models. Each of the model types supported are documented below.

Unrelaxed models

The Unrelaxed multiphase model is built by passing a JuMP.Model, Network{MultiPhase}, and the Unrelaxed type to build_bfm!.

net = CommonOPF.Network_IEEE13()
m = JuMP.Model()

build_bfm!(m, net, Unrelaxed)
println("Variable information:")
CommonOPF.print_var_info(net)
println("Constraint information:")
CommonOPF.print_constraint_info(net)
Variable information:
┌────────┬──────────────────────────────────────────────┬──────────────────┬─────────────────────┐
│ symbol │                                  description │            units │          dimensions │
├────────┼──────────────────────────────────────────────┼──────────────────┼─────────────────────┤
│    Sij │ complex sending end branch power flow matrix │ ComplexPowerUnit │ (Edge, Time, Phase) │
├────────┼──────────────────────────────────────────────┼──────────────────┼─────────────────────┤
│      i │           complex sending end branch current │          AmpUnit │ (Edge, Time, Phase) │
├────────┼──────────────────────────────────────────────┼──────────────────┼─────────────────────┤
│     sj │              complex net bus power injection │ ComplexPowerUnit │  (Bus, Time, Phase) │
├────────┼──────────────────────────────────────────────┼──────────────────┼─────────────────────┤
│      v │                       complex voltage vector │         VoltUnit │  (Bus, Time, Phase) │
└────────┴──────────────────────────────────────────────┴──────────────────┴─────────────────────┘
Constraint information:
┌────────────────────────────────┬──────────────────────────────┬──────────────────────────────────────┬───────────────────────────┐
│                         symbol │                  description │                             set_type │                dimensions │
├────────────────────────────────┼──────────────────────────────┼──────────────────────────────────────┼───────────────────────────┤
│                kvl_constraints │      Kirchoff's Voltage Law  │ MathOptInterface.EqualTo{ComplexF64} │       (Edge, Time, Phase) │
├────────────────────────────────┼──────────────────────────────┼──────────────────────────────────────┼───────────────────────────┤
│      power_balance_constraints │    power balance at each bus │ MathOptInterface.EqualTo{ComplexF64} │        (Bus, Time, Phase) │
├────────────────────────────────┼──────────────────────────────┼──────────────────────────────────────┼───────────────────────────┤
│ sending_power_flow_constraints │ sending end power definition │ MathOptInterface.EqualTo{ComplexF64} │ (Edge, Time, PhaseMatrix) │
└────────────────────────────────┴──────────────────────────────┴──────────────────────────────────────┴───────────────────────────┘

The `build_bfm! method uses:

The math underlying the model is as follows:

\[\begin{aligned} &\boldsymbol S_{ij} = \boldsymbol v_i^{\Phi_{ij}} \boldsymbol i_{ij}^H \quad \forall (i, j) \in \mathcal{E} \\ &\boldsymbol v_i^{\Phi_{ij}} - \boldsymbol v_j = \boldsymbol Z_{ij} \boldsymbol i_{ij} \quad \forall (i, j) \in \mathcal{E} \\ &\sum_{i : i \rightarrow j} \text{diag}( \boldsymbol S_{ij} - \boldsymbol Z_{ij} \left[ \boldsymbol i_{ij} \boldsymbol i_{ij}^H \right]) + \boldsymbol s_j = \sum_{k : j \rightarrow k} \text{diag}( \boldsymbol S_{jk} )^{\Phi_j} \quad \forall j \in \mathcal{N} \end{aligned}\]

For the nomenclature see TODO.

Semidefinite models

The Semidefinite multiphase model is built by passing a JuMP.Model, Network{MultiPhase}, and the Semidefinite type to build_bfm!.

net = CommonOPF.Network_IEEE13()
m = JuMP.Model()

build_bfm!(m, net, Semidefinite)
println("Variable information:")
CommonOPF.print_var_info(net)
println("Constraint information:")
CommonOPF.print_constraint_info(net)
Variable information:
┌────────┬───────────────────────────────────────────────────────────────────┬──────────────────┬───────────────────────────────┐
│ symbol │                                                       description │            units │                    dimensions │
├────────┼───────────────────────────────────────────────────────────────────┼──────────────────┼───────────────────────────────┤
│      H │ 3x3 Hermitian matrices for the positive semi-definite constraints │       MixedUnits │  (Bus, Time, HermitianMatrix) │
├────────┼───────────────────────────────────────────────────────────────────┼──────────────────┼───────────────────────────────┤
│    Sij │            3x3 Complex matrices of line flow powers (from i to j) │ ComplexPowerUnit │     (Edge, Time, PhaseMatrix) │
├────────┼───────────────────────────────────────────────────────────────────┼──────────────────┼───────────────────────────────┤
│      l │                 3x3 Hermitian matrices of current squared (I*I^T) │   AmpSquaredUnit │ (Edge, Time, HermitianMatrix) │
├────────┼───────────────────────────────────────────────────────────────────┼──────────────────┼───────────────────────────────┤
│     sj │                   3x1 matrices of net power injections (at bus j) │ ComplexPowerUnit │            (Bus, Time, Phase) │
├────────┼───────────────────────────────────────────────────────────────────┼──────────────────┼───────────────────────────────┤
│      w │                 3x3 Hermitian matrices of voltage squared (V*V^T) │  VoltSquaredUnit │  (Bus, Time, HermitianMatrix) │
└────────┴───────────────────────────────────────────────────────────────────┴──────────────────┴───────────────────────────────┘
Constraint information:
┌───────────────────────────┬─────────────────────────────────────────────────────────────────────┬──────────────────────────────────────┬─────────────────────┐
│                    symbol │                                                         description │                             set_type │          dimensions │
├───────────────────────────┼─────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼─────────────────────┤
│           kvl_constraints │ Kirchoff's Voltage Law with angle relaxation for Semidefinite model │ MathOptInterface.EqualTo{ComplexF64} │ (Edge, Time, Phase) │
├───────────────────────────┼─────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼─────────────────────┤
│ power_balance_constraints │                                           power balance at each bus │ MathOptInterface.EqualTo{ComplexF64} │  (Bus, Time, Phase) │
└───────────────────────────┴─────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┴─────────────────────┘

The `build_bfm! method uses:

Linear models

The Linear multiphase model is built by passing a JuMP.Model, Network{MultiPhase}, and the Linear type to build_bfm!.

net = CommonOPF.Network_IEEE13()
m = JuMP.Model()

build_bfm!(m, net, Linear)
println("Variable information:")
CommonOPF.print_var_info(net)
println("Constraint information:")
CommonOPF.print_constraint_info(net)
Variable information:
┌────────┬────────────────────────────────────────────┬───────────────────┬─────────────────────┐
│ symbol │                                description │             units │          dimensions │
├────────┼────────────────────────────────────────────┼───────────────────┼─────────────────────┤
│    pij │     sending end real power from bus i to j │     RealPowerUnit │ (Edge, Time, Phase) │
├────────┼────────────────────────────────────────────┼───────────────────┼─────────────────────┤
│     pj │      net bus injection real power on bus j │     RealPowerUnit │  (Bus, Time, Phase) │
├────────┼────────────────────────────────────────────┼───────────────────┼─────────────────────┤
│    qij │ sending end reactive power from bus i to j │ ReactivePowerUnit │ (Edge, Time, Phase) │
├────────┼────────────────────────────────────────────┼───────────────────┼─────────────────────┤
│     qj │  net bus injection reactive power on bus j │ ReactivePowerUnit │  (Bus, Time, Phase) │
├────────┼────────────────────────────────────────────┼───────────────────┼─────────────────────┤
│  vsqrd │                  voltage magnitude squared │   VoltSquaredUnit │  (Bus, Time, Phase) │
└────────┴────────────────────────────────────────────┴───────────────────┴─────────────────────┘
Constraint information:
┌───────────────────────────┬──────────────────────────────────────────────────────┬───────────────────────────────────┬──────────────────────────────────┐
│                    symbol │                                          description │                          set_type │                       dimensions │
├───────────────────────────┼──────────────────────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────┤
│           kvl_constraints │                  Kirchoff's Voltage Law w/o I^2 term │ MathOptInterface.EqualTo{Float64} │              (Edge, Time, Phase) │
├───────────────────────────┼──────────────────────────────────────────────────────┼───────────────────────────────────┼──────────────────────────────────┤
│ power_balance_constraints │ Real and reactive power balance at each bus (linear) │ MathOptInterface.EqualTo{Float64} │ (Bus, RealReactive, Phase, Time) │
└───────────────────────────┴──────────────────────────────────────────────────────┴───────────────────────────────────┴──────────────────────────────────┘

The `build_bfm! method uses:

The math underlying the model is as follows (from Arnold et al.):

\[\begin{aligned} P_{ij,\phi} + p_{j,\phi} = \sum_{k:j\rightarrow k} P_{jk,\phi} \ \forall j \in \mathcal{N}^+, \forall \phi \in [1,2,3] \\ Q_{ij,\phi} + q_{j,\phi} = \sum_{k:j\rightarrow k} Q_{jk,\phi} \ \forall j \in \mathcal{N}^+, \forall \phi \in [1,2,3] \\ \boldsymbol{w}_j = \boldsymbol{w}_i + \boldsymbol{M}_{P,ij} \boldsymbol{P}_{ij} + \boldsymbol{M}_{Q,ij} \boldsymbol{Q}_{ij} \\ (\boldsymbol{v}_{j,\min})^2 \le \boldsymbol{w}_j \le (\boldsymbol{v}_{j,\max})^2 \ \forall j \in \mathcal{N}^+ \\ \boldsymbol{M}_{P,ij} = \begin{bmatrix} -2r_{11} & r_{12}-\sqrt{3}x_{12} & r_{13}+\sqrt{3}x_{13} \\ r_{21}+\sqrt{3}x_{21} & -2r_{22} & r_{23}-\sqrt{3}x_{23} \\ r_{31}-\sqrt{3}x_{31} & r_{32}+\sqrt{3}x_{32} & -2r_{33} \end{bmatrix} \\ \boldsymbol{M}_{Q,ij} = \begin{bmatrix} -2x_{11} & x_{12}+\sqrt{3}r_{12} & x_{13}-\sqrt{3}r_{13} \\ x_{21}-\sqrt{3}r_{21} & -2x_{22} & x_{23}+\sqrt{3}r_{23} \\ x_{31}+\sqrt{3}r_{31} & x_{32}-\sqrt{3}r_{32} & -2x_{33} \end{bmatrix} \end{aligned}\]

References

Arnold et al.

Arnold, Daniel B., et al. "Optimal dispatch of reactive power for voltage regulation and balancing in unbalanced distribution systems." 2016 IEEE Power and Energy Society General Meeting (PESGM). IEEE, 2016.