BFA

Linearized branch-flow (LinDistFlow)

LP

Solver: OSQP

Motivation

The Linearized Branch-Flow Approximation (BFA), better known as LinDistFlow, is the workhorse model for radial distribution-network optimization. Introduced by Baran and Wu in 1989, it linearizes the branch-flow equations by dropping the quadratic loss term — keeping voltages and reactive power as decision variables (unlike DC) while remaining a convex linear program (unlike AC).

Use BFA for distribution-grid planning, voltage regulation studies, DER hosting capacity assessment, and any radial-network problem where you need reactive power and voltage magnitudes but cannot afford full AC. BFA’s accuracy degrades on meshed networks and under heavy loading where losses become non-negligible — for those cases, SOCBF (its convex relaxation) is the natural upgrade.

Derivation

Branch-flow variables

The branch-flow model parameterizes each branch (i,j) by its sending-end real and reactive power flows Pij, Qij and the squared current magnitude ℓij = |Iij|². Bus voltages are tracked via vi = |Vi|². For a radial network with i upstream of j, the exact AC branch-flow equations read:

$$v_j = v_i - 2(r_{ij}P_{ij} + x_{ij}Q_{ij}) + (r_{ij}^2 + x_{ij}^2)\ell_{ij}$$
$$\ell_{ij} v_i = P_{ij}^2 + Q_{ij}^2$$

The LinDistFlow approximation

BFA assumes losses are small (rij ℓij ≪ Pij and xij ℓij ≪ Qij) and drops the quadratic terms. The voltage-drop equation collapses to its linear form:

$$v_j = v_i - 2(r_{ij}P_{ij} + x_{ij}Q_{ij})$$

The current-balance equation ℓij vi = Pij² + Qij² is dropped entirely. Power balance at each bus becomes a linear sum of branch flows minus loads. The result is a linear program in (Pij, Qij, vi, Pg, Qg) — convex, fast, and exact on lossless radial networks.

BFA — full problem

The complete LinDistFlow formulation reads:

$$ \begin{aligned} \min_{P^g, Q^g, P, Q, v} \quad & \sum_{g \in \mathcal{G}} c_g(P_g^g) \\[6pt] \text{s.t.} \quad & v_j = v_i - 2(r_{ij}P_{ij} + x_{ij}Q_{ij}), && \forall (i,j) \in \mathcal{E} \\ & \sum_{j: i \to j} P_{ij} - \sum_{k: k \to i} P_{ki} = P_i^g - P_i^d, && \forall i \in \mathcal{N} \\ & \sum_{j: i \to j} Q_{ij} - \sum_{k: k \to i} Q_{ki} = Q_i^g - Q_i^d, && \forall i \in \mathcal{N} \\ & \underline{v}_i \le v_i \le \overline{v}_i, && \forall i \in \mathcal{N} \\ & \underline{P}_g^g \le P_g^g \le \overline{P}_g^g, \; \underline{Q}_g^g \le Q_g^g \le \overline{Q}_g^g, && \forall g \in \mathcal{G} \end{aligned} $$

Voltage bounds are expressed on vi = |Vi|² (squared magnitudes) — a quirk of the branch-flow parameterization. Active and reactive power balance are tracked independently, unlike DC where only active power appears.

Computational considerations

BFA is an LP with constraint matrix proportional to the network’s incidence matrix plus a voltage-drop coupling per branch. It scales effortlessly to feeders with thousands of buses, with solve times in milliseconds. OSQP is Lirion’s default solver; HiGHS and Gurobi are equally efficient on this problem class.

The accuracy gap to full AC depends on network loading and r/x ratios. On urban distribution feeders with high X/R, BFA voltage predictions are within 1% of AC. On rural feeders with cables (high R/X) and heavy loading, the gap grows to 5–10% — in such cases, SOCBF (the convex relaxation that retains the dropped quadratic term) is preferable.

Lirion usage

Solving BFA on a MATPOWER case file requires a single call to solve:

using Lirion

# Solve LinDistFlow on a radial distribution feeder
out = solve("case33bw.m"; model = bfa(), algorithm = centralized())

# Voltages, flows, and dispatch
v_sq = out.solution["bus"]["w"]      # squared voltage magnitudes
Pij  = out.solution["branch"]["pf"]  # active branch flows
Qij  = out.solution["branch"]["qf"]  # reactive branch flows

println("Objective:    $", round(out.objective, digits=2))
println("Min voltage:  ", round(sqrt(minimum(v_sq)), digits=4), " p.u.")

References

  1. Baran, M. E., & Wu, F. F. (1989). Optimal sizing of capacitors placed on a radial distribution system. IEEE Transactions on Power Delivery, 4(1), 735–743.
  2. Baran, M. E., & Wu, F. F. (1989). Network reconfiguration in distribution systems for loss reduction and load balancing. IEEE TPD, 4(2), 1401–1407.
  3. Low, S. H. (2014). Convex relaxation of optimal power flow — Part I: Formulations and equivalence. IEEE Transactions on Control of Network Systems, 1(1), 15–27.
  4. Turitsyn, K., Šulc, P., Backhaus, S., & Chertkov, M. (2011). Options for control of reactive power by distributed photovoltaic generators. Proceedings of the IEEE, 99(6), 1063–1073.