QCQP
Solver: Ipopt
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.
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:
The bilinear term φiφk is dropped — valid for small deviations. The product collapses to a linear expression in voltage deviations.
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:
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.
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:
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.
The complete formulation reads:
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.
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.
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"].