Skip to content

AC Optimal Power Flow (AC-OPF)

AC Optimal Power Flow determines the cost-minimizing generator dispatch while satisfying the complete AC power flow equations, voltage constraints, and reactive power limits.

flowchart TB
    A[System Demand] --> B[AC-OPF]
    C[Generator P, Q Limits] --> B
    D[Network Full AC Model] --> B
    E[Voltage Constraints] --> B
    
    B --> F{Nonlinear Program}
    
    F --> G[Active Power Dispatch Pi]
    F --> H[Reactive Power Dispatch Qi]
    F --> I[Voltage Magnitudes Vb]
    F --> J[Voltage Angles θb]
    

AC vs. DC Power Flow

Key Differences

AspectDC-OPFAC-OPF
Power FlowP onlyP and Q
Voltage1.0 (fixed)Variable
Network ModelX onlyR + jX
EquationsLinearNonlinear
Variablesθ (angles)|V| (magnitudes) + θ
LossesIgnoredIncluded
Problem TypeLP/QPNLP
SolutionGlobal optimumLocal optimum
SpeedFasterSlower
AccuracyApproximateHigh

When AC-OPF is Required

graph TD
    A{Analysis
Type?} --> B[Economic
Studies] A --> C[Operational
Feasibility] A --> D[Voltage
Analysis] A --> E[Reactive
Planning] B --> F[DC-OPF
Sufficient] C --> G[AC-OPF
Required] D --> G E --> G
  • Use AC-OPF when:

    • Validating dispatch feasibility
    • Voltage stability critical
    • Reactive power planning
    • Accurate loss calculation
    • Generator capability curves matter
    • Detailed operational studies
  • Use DC-OPF when:

    • Faster speed is critical
    • Voltage is not a concern
    • Large-scale studies (many scenarios)
    • Market clearing considering active power only

Mathematical Formulation

Complete AC-OPF Model

Sets and Indices

SymbolDescription
Set of generators
Set of buses
Set of transmission lines
Bus indices
Generator index
Line index

Decision Variables

VariableUnitDomainDescription
p.u.ContinuousActive power generation
p.u.ContinuousReactive power generation
p.u.ContinuousVoltage magnitude at bus
radContinuousVoltage angle at bus
  • Key difference from DC: Voltage magnitudes are now variables!

Parameters

Network Parameters

ParameterDescription
Admittance matrix element
Conductance between buses and
Susceptance between buses and
Angle difference

Generator Parameters

ParameterUnitDescription
p.u.Active power limits
p.u.Reactive power limits
$/hGeneration cost (function of P only)

System Parameters

ParameterUnitDescription
p.u.Active load at bus
p.u.Reactive load at bus
p.u.Voltage magnitude limits
p.u.Apparent power limit on line

Formulation Explanation

(1a) Objective Function

  • Minimize total generation cost:

Constraint Explanation

(1b) Active Power Balance

  • Kirchhoff’s Current Law (real part):
  • Physical meaning: For every bus, the net active power injection is balanced by the local active power demand.
  • Nonlinearity in AC power flow
  • Compare to DC: DC used simplified equation

(1c) Reactive Power Balance

  • Kirchhoff’s Current Law (imaginary part):
  • Physical meaning:
    • Reactive power must also satisfy a nodal power balance at each bus.

(1d) & (1e) Generator Limits

  • Active power limits:
  • Reactive power limits:
  • Important: Real generators have coupled P-Q capability curves (more complex than box constraints).

(1f) Voltage Magnitude Limits

  • Operational voltage range:
  • Limits in KPG 193:
    • 345 kV, 765 kV: 0.95 ≤ V ≤ 1.05 p.u.
    • 154 kV: 0.90 ≤ V ≤ 1.10 p.u.
  • Why limits matter:
    • Equipment designed for nominal voltage
    • Low voltage → Poor motor performance, dimming lights
    • High voltage → Insulation stress, equipment damage

(1g) Line Flow Limits

  • Apparent power (thermal) limit:
  • More accurate than DC: Considers both P and Q flows
  • Line flow calculation:
  • Where is conjugate of line current.

(1h) Reference Angle

  • Slack bus angle:
  • Same as DC-OPF: angles are relative.

AC Power Flow Equations

Complex Power Formulation

graph TB
    subgraph "Complex Voltage"
        A["Vb = |Vb| ∠ θb"]
        B["Magnitude: |Vb|"]
        C[Angle: θb]
    end
    
    subgraph "Complex Power"
        D[S = P + jQ]
        E["Active: P (MW)"]
        F["Reactive: Q (MVAr)"]
    end
    
    subgraph "Power Flow"
        G[Sb = Vb Σ Ybk Vk*]
    end
    
    A --> G
    D --> G
    

Expanded Form

  • For line from bus to bus :

    • Active power flow:

    • Reactive power flow:

    • Where:

      • - Conductance
      • - Susceptance
      • - Line charging (half at each end)

Why Nonlinear?

  • Products of variables:

    • (bilinear term)
    • , (trigonometric)
  • Consequence:

    • No global optimum guarantee
    • Multiple local optima possible
    • Convergence not guaranteed
    • Sensitive to starting point

Reactive Power and Voltage

Relationship

graph LR
    A[Reactive Power Q] <-->|Controls| B[Voltage Magnitude V]
    
    C[Increase Q
Generation] --> D[Voltage
Increases] E[Decrease Q
Consumption] --> D
  • Key principle: Reactive power supports voltage

Voltage Control

  • Methods to control voltage:

    1. Generator excitation (increase Q output)
    2. Shunt capacitors (inject Q)
    3. Shunt reactors (absorb Q)
    4. Transformer taps (change voltage ratio)
  • In AC-OPF: Optimize generator Q dispatch

Voltage Stability

Voltage Collapse

  • Phenomenon: Insufficient reactive power → voltage decay
sequenceDiagram
    participant Load
    participant Voltage
    participant Reactive
    
    Load->>Voltage: Demand increases
    Voltage->>Reactive: Need more Q
    Reactive->>Voltage: Q support limited
    Voltage->>Voltage: Voltage drops
    Load->>Load: Current increases (constant P)
    Voltage->>Voltage: Further drop
    Note over Voltage: COLLAPSE!
  • Indicators in AC-OPF:
    • Voltage limits binding
    • Reactive limits binding
    • High losses

Transmission Losses

Loss Calculation

  • Power losses in line:

    Where:

    • = Line current
    • = Line resistance
    • = Power flows
    • = Voltage magnitude
  • Key observations:

    • Losses are nonlinear in P and Q
    • Losses increase with square of power flow
    • Low voltage → higher losses

Extensions

  • Security-Constrained AC-OPF with N-1 contingencies
  • Optimal Reactive Dispatch: Given P dispatch, optimize Q for voltage profile

Solver Comparison

FeatureEDUCDC-OPFAC-OPF
Problem TypeLP/QPMIPLP/QPNLP
Network Model✓ DC (Linearized)AC
Time PeriodsSingleMultiple (24+)SingleSingle
Commitment✓ Binary
Transmission Limits
Voltage Constraints
Reactive Power
Transmission Losses
Solve TimeFastestSlowFastMedium

→ Detailed Comparison

Next Steps