LPAC

Linear-programming approximation of AC power flow

QCQP

Solver: Ipopt

Motivation

LPAC, introduced by Coffrin and Van Hentenryck in 2014, occupies the middle ground between DC and AC. It approximates the AC power-flow equations to second order around the flat-start operating point, retaining reactive power and voltage magnitudes as decision variables — but using a Taylor expansion that yields a quadratically constrained quadratic program (QCQP) rather than a general nonlinear problem.

Use LPAC when you need reactive-power awareness and voltage magnitudes but cannot afford full AC: contingency screening at scale, market-clearing problems that need voltage support pricing, security-constrained dispatch over thousands of scenarios. LPAC trades a small accuracy degradation against AC for an order-of-magnitude speedup, and its convex quadratic structure makes it amenable to second-order conic solvers and to acceleration via warm-starting.

Derivation

Voltage deviation variables

LPAC writes each bus voltage magnitude as a deviation from nominal: |Vi| = 1 + φi, with φi typically constrained to ±0.1 p.u. for transmission networks. Voltage angles θi remain as in AC. Bus voltages enter the power-flow equations through products |Vi||Vk| and trigonometric functions of θik = θi − θk:

$$|V_i||V_k| = (1 + \phi_i)(1 + \phi_k) \approx 1 + \phi_i + \phi_k.$$

The bilinear term φiφk is dropped — valid for small deviations. The product collapses to a linear expression in voltage deviations.

Trigonometric approximation

For small angle differences, sin(θik) is approximated linearly and cos(θik) is approximated by a tightening quadratic. LPAC introduces an auxiliary variable ĉik that upper-bounds the cosine approximation:

$$\sin\theta_{ik} \approx \theta_{ik}, \quad \hat{c}_{ik} \le 1 - \tfrac{1}{2}\theta_{ik}^2.$$

The inequality ĉik ≤ 1 − ½θik² is a convex quadratic constraint — the source of the “Q” in QCQP. Treating ĉik as a free variable bounded above by the parabola lets the solver choose the tightest feasible value, recovering the cosine relationship exactly at the optimum on radial topologies.

LPAC power-flow equations

Substituting the voltage-deviation and trigonometric approximations into the AC equations gives the LPAC power-flow form — linear in φ and quadratic only through the cosine bound:

$$P_i \approx \sum_{k} \left[ G_{ik}(\phi_i + \phi_k + \hat{c}_{ik}) + B_{ik}\theta_{ik} \right]$$
$$Q_i \approx \sum_{k} \left[ G_{ik}\theta_{ik} - B_{ik}(\phi_i + \phi_k + \hat{c}_{ik}) \right]$$

Both active and reactive power injections are now expressed in terms of (φ, θ, ĉ) — variables whose constraints are linear or convex quadratic. The resulting OPF is convex.

LPAC OPF — full problem

The complete formulation reads:

$$ \begin{aligned} \min_{P^g, Q^g, \phi, \theta, \hat{c}} \quad & \sum_{g \in \mathcal{G}} c_g(P_g^g) \\[6pt] \text{s.t.} \quad & P_i^g - P_i^d = P_i(\phi, \theta, \hat{c}), && \forall i \in \mathcal{N} \\ & Q_i^g - Q_i^d = Q_i(\phi, \theta, \hat{c}), && \forall i \in \mathcal{N} \\ & \hat{c}_{ik} \le 1 - \tfrac{1}{2}\theta_{ik}^2, && \forall (i,k) \in \mathcal{E} \\ & \underline{\phi}_i \le \phi_i \le \overline{\phi}_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} \\ & \underline{\theta}_{ij} \le \theta_i - \theta_j \le \overline{\theta}_{ij}, && \forall (i,j) \in \mathcal{E} \end{aligned} $$

The single convex quadratic constraint ĉik ≤ 1 − ½θik² is what makes LPAC a QCQP rather than an LP. All remaining constraints are linear. The problem is convex and can be solved by interior-point QCQP solvers (Ipopt is Lirion’s default) or by converting to second-order cone form for specialized SOCP solvers.

Computational considerations

LPAC solves roughly 5–10× faster than full AC on transmission networks, with reactive-power and voltage solutions that are typically within 1–2% of AC at the optimal dispatch. The approximation degrades as voltage deviations grow beyond ±5% or as angle differences approach ±0.5 rad — outside that envelope, LPAC may underestimate reactive losses or miss voltage-collapse precursors.

A frequent practical use is as a fast feasibility filter: screen thousands of contingencies with LPAC, then resolve the binding cases with full AC. The convex structure also enables LPAC as a master problem in Benders-style decomposition for security-constrained OPF, where AC is solved only on cuts generated by infeasible scenarios.

Lirion usage

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

using Lirion

# Solve LPAC — convex approximation with reactive power
out = solve("case118.m"; model = lpac(), algorithm = centralized())

# Voltage deviations, angles, and dispatch
phi   = out.solution["bus"]["phi"]    # |V| - 1 deviation
theta = out.solution["bus"]["va"]
Pg    = out.solution["gen"]["pg"]
Qg    = out.solution["gen"]["qg"]

# Reconstruct voltage magnitudes
V_mag = 1.0 .+ phi

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

The out object follows the PowerModels.jl result schema. Branch flows are available under out.solution["branch"]["pf"].

References

  1. Coffrin, C., & Van Hentenryck, P. (2014). A linear-programming approximation of AC power flows. INFORMS Journal on Computing, 26(4), 718–734.
  2. Coffrin, C., Hijazi, H. L., & Van Hentenryck, P. (2016). The QC relaxation: A theoretical and computational study on optimal power flow. IEEE Transactions on Power Systems, 31(4), 3008–3018.
  3. Castillo, A., Lipka, P., Watson, J.-P., Oren, S. S., & O’Neill, R. P. (2016). A successive linear programming approach to solving the IV-ACOPF. IEEE TPS, 31(4), 2752–2763.
  4. Mhanna, S., & Mancarella, P. (2022). An exact sequential linear programming algorithm for the optimal power flow problem. IEEE TPS, 37(1), 666–679.