Convex relaxations

Replacing non-convex problems with tractable convex bounds

Foundation

Definition

A convex relaxation replaces a non-convex optimization problem with a convex one whose feasible set contains the original — and whose optimal cost is therefore a lower bound on the original optimal cost. When the relaxation is exact, the bound is achieved and the relaxation’s solution solves the original problem; when not, the gap quantifies how much the convexification simplifies. In power-system optimization, convex relaxations transform the non-convex AC OPF into tractable convex programs (LPAC, SOCWR, SOCBF) that interior-point solvers handle in polynomial time, with provable optimality certificates.

Why convexity matters

A set C ⊆ ℜn is convex if the line segment between any two points in C is also in C. A function f is convex if its epigraph (the region above its graph) is a convex set — equivalently, if f(αx + (1−α)y) ≤ αf(x) + (1−α)f(y) for all x, y and α ∈ [0,1]. A convex optimization problem minimizes a convex objective over a convex feasible set.

The fundamental property: every local minimum of a convex problem is also a global minimum. There are no traps. Modern interior-point methods solve convex problems in polynomial time, with provable bounds on iteration count and per-iteration cost. Strong duality holds under mild conditions, and KKT multipliers carry exact economic interpretation. None of these guarantees survive in general non-convex problems, where solvers may converge to local optima, stall at saddle points, or fail to certify any solution.

Non-convex problems are not unsolvable — interior-point methods like Ipopt routinely solve AC OPF on networks with thousands of buses — but they offer no global guarantee, no exact duality, and no certificate that the solver’s output is in fact optimal. Convex relaxations recover these guarantees at the cost of a (typically small) optimality gap.

The relaxation idea

Let P be a non-convex problem: min f(x) s.t. x ∈ X. A relaxation is a convex problem P̃: min f̃(x) s.t. x ∈ X̃, where:

  • f̃(x) ≤ f(x) on the original feasible set X (the relaxed objective lower-bounds the original)
  • X ⊆ X̃ (the relaxed feasible set contains the original)

Both conditions ensure that the optimum of P̃ is a lower bound on the optimum of P. If the optimal solution x̃* of P̃ happens to be feasible in the original (x̃* ∈ X) and achieve f(x̃*) = f̃(x̃*), the relaxation is exact: P̃ and P share the same optimum, and solving P̃ solves P.

The art of relaxation is finding X̃ tight enough that the gap is small (or zero) on instances of interest, while keeping X̃ convex so the relaxed problem is tractable. Several standard techniques apply.

Standard relaxation techniques

Convex envelopes

For each non-convex function or constraint, replace it with its convex envelope — the tightest convex underestimator. For a bilinear product xy with x ∈ [x̲, x̅] and y ∈ [y̲, y̅], the McCormick envelope gives four linear inequalities that bound xy from below and above by piecewise-linear functions of x and y. These are sharp at the corners of the box [x̲, x̅] × [y̲, y̅] and used extensively in QC and SDP relaxations of OPF.

Lifting to a higher-dimensional space

Introduce auxiliary variables that absorb non-convex coupling. In SOCWR, the bilinear products |Vi||Vk|cos(θik) are absorbed into linear W-variables; the non-convex relationship between W and the underlying voltages is then replaced by a single convex constraint (a rotated SOC). Lifting often yields tighter relaxations than direct envelopes because it captures multi-variable structure that one-at-a-time envelopes miss.

Semidefinite relaxation

For problems involving products xxT (rank-one matrices), introduce a new matrix variable X = xxT and relax the rank-one constraint to X ⪰ 0 (positive semidefinite). The resulting SDP is convex and often provides the tightest known relaxation — Lavaei and Low (2012) showed AC OPF has zero SDP duality gap under conditions that include most radial networks. The cost is computational: SDP solvers scale worse than SOCP, limiting SDP to networks of a few hundred buses.

Lagrangian relaxation

Dualize the difficult constraints, absorbing them into the objective via multipliers. The relaxed problem is unconstrained (or simply-constrained) and convex if the original objective is convex, but the bound it provides may be weak unless multipliers are optimized — itself a convex problem (the dual). Lagrangian relaxation is most useful when the original problem decomposes after dualization, enabling parallel solution as in ADMM.

Exactness conditions

A relaxation is exact when its optimal solution recovers the original optimum. For OPF, several sufficient conditions for SOC and SDP exactness on radial networks have been established (Lavaei–Low 2012, Bose et al. 2015, Gan et al. 2015):

  • Tree topology (no cycles)
  • Non-restrictive voltage limits at non-substation buses
  • Load monotonicity along feeders
  • Strictly positive resistances on every branch

When all conditions hold, the SOC relaxation of AC OPF is exact and the relaxed solution lifts back to the global AC optimum. For meshed transmission networks, exactness is generally not guaranteed but gaps below 1% are routine, and the relaxation provides a strong lower bound for branch-and-bound or sequential refinement methods.

Diagnosing inexactness is straightforward: check whether the SOC constraint holds with equality at the optimum. If slack remains in some constraint, the relaxation is loose there and the corresponding voltage cannot be uniquely reconstructed from the W-variables.

Practical workflow

For research or production OPF problems on power networks, a typical workflow combining convex relaxations and AC:

  1. Solve a convex relaxation (SOCWR, SOCBF, or LPAC) to obtain a fast solution and a lower bound.
  2. Check exactness via the SOC slack diagnostic. If exact, the relaxation’s solution is the AC global optimum — done.
  3. If inexact, use the relaxation’s solution as a warm start for AC OPF, which converges in fewer iterations from a near-optimal starting point.
  4. Compare the AC objective (an upper bound, possibly local) with the relaxation objective (a lower bound, certified). If the gap is acceptable, accept the AC solution; if not, apply tightening (SDP, QC, or branch-and-bound).

This workflow combines the speed and global guarantees of convex methods with the accuracy of AC, and is the standard practice in modern OPF research. Lirion exposes both convex (LPAC, SOCWR, SOCBF) and AC formulations through a unified solve interface to make this workflow natural.

Further reading

  1. Boyd, S., & Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. — The canonical convex optimization textbook.
  2. Low, S. H. (2014). Convex relaxation of optimal power flow — Part I & II. IEEE Transactions on Control of Network Systems, 1(1–2), 15–27 and 177–189.
  3. Lavaei, J., & Low, S. H. (2012). Zero duality gap in optimal power flow problem. IEEE Transactions on Power Systems, 27(1), 92–107.
  4. Bose, S., Low, S. H., Teeraratkul, T., & Hassibi, B. (2015). Equivalent relaxations of optimal power flow. IEEE Transactions on Automatic Control, 60(3), 729–742.
  5. Molzahn, D. K., & Hiskens, I. A. (2019). A survey of relaxations and approximations of the power flow equations. Foundations and Trends in Electric Energy Systems, 4(1–2), 1–221. — Comprehensive monograph; the reference for the field.