AGM Center
AboutResearchLearningGallery
Documentation
  • Introduction
    • KPG Run Overview
    • Getting Started with KPG Run
    • Installation Guide
    • User Interface Guide
      • Economic Dispatch (ED)
      • Unit Commitment (UC)
      • DC Optimal Power Flow (DC-OPF)
      • AC Optimal Power Flow (AC-OPF)
      • Solver Comparison & Selection Guide

AGM Center

Advancing power systems for a sustainable future through research, tools, and collaboration.

About

  • Who We Are
  • Our Team
  • What We Do
  • Get Involved

Documentation

  • Introduction
  • KPG TestGrid
  • KPG Run
  • KPG View

Our Location

Korea Institute of Energy Technology (KENTECH)
200 Hyeoksin-ro, Naju-si, Jeollanam-do
Korea 58330

Office Hours
Mon–Fri 09:00–18:00 KST

© 2026 AGM CENTER. All rights reserved

Terms and Conditions|Privacy Policy
Docs/kpg run/DC Optimal Power Flow (DC-OPF)

DC Optimal Power Flow (DC-OPF)

DC Optimal Power Flow determines the cost-minimizing generator dispatch while respecting transmission network constraints using a linearized (DC) approximation of AC power flow.

flowchart TB A[System Demand by Bus] --> B[DC-OPF] C[Generator Costs & Limits] --> B D[Network Topology & Limits] --> B B --> E{Linear Program} E --> F[Generator Dispatch p<sub>i</sub>] E --> G[Locational Prices λ<sub>b</sub>] E --> H[Line Flows f<sub>l</sub>] E --> I[Congestion Analysis]

DC Approximation

AC vs. DC Power Flow

The DC approximation simplifies complex AC power flow equations through several assumptions:

graph TB subgraph "AC Power Flow (Exact)" A1["P = V²G - VV'(G cos θ + B sin θ)"] A2["Q = -V²B - VV'(G sin θ - B cos θ)"] A3[Complex voltages] A4[Reactive power] A5[Losses] end subgraph "DC Power Flow (Approximation)" D1["P = B(θ - θ')"] D2[Simplified linear] D3[Flat voltages V=1] D4[No reactive Q] D5[Lossless] end A1 -.Linearize.-> D1 A3 -.Assume.-> D3 A4 -.Ignore.-> D4 A5 -.Ignore.-> D5

DC Approximation Assumptions

  1. Flat Voltage Profile

  • When: Voltage variations small (0.95-1.05 p.u.)

  1. Small Angle Differences

  • Valid when: ,

  1. Line Resistance Negligible

  • Valid when: (typical for transmission)

  1. Reactive Power Ignored

Valid when: Focus on active power markets

  1. Lossless Network

Consequence: May underestimate costs by 2-3%

When DC Approximation Is Valid:

  • Transmission planning (not distribution)

  • Market clearing (hourly/day-ahead)

  • Congestion analysis

  • Economic studies

  • Fast multi-scenario analysis

When to Use AC-OPF Instead:

  • Voltage stability studies

  • Reactive power planning

  • Detailed loss allocation

  • Distribution networks (high R/X)

  • Validating feasibility

Trade-off: AC-OPF is much slower than DC-OPF

→ Learn about AC-OPF

Mathematical Formulation

Complete DC-OPF Model

Sets and Indices

Symbol

Description

Example (KPG193)

Set of generators

Set of buses

Set of transmission lines

Generators at bus

Multiple gens per bus possible

Generator index

Bus index

Line index

Sending bus of line

From-bus

Receiving bus of line

To-bus

Decision Variables

Variable

Unit

Description

p.u.

Active power output of generator

rad

Voltage angle at bus

p.u.

Power flow from sending bus to receiving bus on line

p.u.

Power flow from receiving bus to sending bus on line

Parameters

Parameter

Unit

Description

$/h

Generation cost function

p.u.

Generation limits

p.u.

Line reactance

p.u.

Thermal line limit

rad

Angle difference limits

p.u.

Demand at bus

Formulation Explanation

(1a) Objective Function

  • Minimize total generation cost:

  • Same as ED, but now dispatch must respect network constraints.

Constraint Explanation

(1b) Angle Difference Limits

  • Stability constraint on voltage angles:

  • Physical meaning:

    • Limits stress on transmission equipment

    • Prevents instability

    • Typically: to

  • In practice: Often relaxed to (non-binding)

(1c) Generation Limits

  • Generator capacity constraints:

(1d) & (1e) DC Power Flow Equations

  • Linearized power flow:

  • Where is the line susceptance.

  • Reverse direction:

  • Key insight: Power flows from higher angle to lower angle, proportional to angle difference.

(1f) & (1g) Thermal Line Limits

  • Flow cannot exceed thermal rating:

  • Physical meaning:

    • Conductor heating limits

    • Equipment ratings

    • Safety margins

    • Binding constraints create congestion → price separation

(1h) Nodal Power Balance

  • Kirchhoff's Current Law at each bus:

  • Interpretation:

    • For every bus, the net power injection is exactly balanced by the local demand.

    • Must hold at every bus simultaneously.

(1i) Reference Angle

  • One bus as reference:

  • Purpose: only angle differences matter, so a reference bus is selected and its voltage angle is fixed.

  • Choice: Typically slack bus (Bus 190 in KPG193).

Three-Bus Example

Network Topology

Buses

Bus

Generator Capacity (MW)

Load (MW)

1

0–100

0

2

0–100

0

3

0

150

Transmission Lines

Line

From Bus

To Bus

Reactance X (p.u.)

Flow Limit F̄ (MW)

1–2

1

2

0.1

100

2–3

2

3

0.1

100

3–1

3

1

0.1

100

Generator costs:

Solutions

  • Without network (ED solution):

    • Gen 1: 100 MW (at max)

    • Gen 2: 50 MW

    • Cost: 10(100) + 20(50) = $2,000/h

  • With network (DC-OPF solution):

    • Line limits create congestion

    • Gen 1: 75 MW

    • Gen 2: 75 MW

    • Cost: 10(75) + 20(75) = $2,250/h (+12.5%)

  • Congestion cost: $250/h

    • $2,250/h - $2,000/h

Interactive Visualization

DC-OPF Chart

Below is an interactive visualization showing how generation is dispatched with network constraints as demand at bus 3 changes in a 3-bus system.

Observations:

  • At low demand: No congestion, prices uniform

  • At high demand: Lines hit limits, price separation

  • Expensive generator at bus 2 must run due to constraints

  • Total cost > ED cost when congested

Extensions

  • Security-Constrained DC-OPF (SCOPF) include N-1 contingencies.

  • Multi-Period DC-OPF couple DC-OPF with ramping.

  • Chance-Constrained DC-OPF enforce limits with a specified violation probability under uncertainty.

Solver Comparison

Feature

ED

UC

DC-OPF

AC-OPF

Problem Type

LP/QP

MIP

LP/QP

NLP

Network Model

✗

✗

✓ DC (Linearized)

✓ AC

Time Periods

Single

Multiple (24+)

Single

Single

Commitment

✗

✓ Binary

✗

✗

Transmission Limits

✗

✗

✓

✓

Voltage Constraints

✗

✗

✗

✓

Reactive Power

✗

✗

✗

✓

Transmission Losses

✗

✗

✗

✓

Solve Time

Fastest

Slow

Fast

Medium

→ Detailed Comparison

Next Steps

  • Full AC model: AC Optimal Power Flow →

  • Multi-period scheduling: Unit Commitment →

  • Compare all models: Solver Comparison →

  • Try it: KPG Run Getting Started →

← Unit Commitment (UC)AC Optimal Power Flow (AC-OPF) →

ON THIS PAGE

DC ApproximationAC vs. DC Power FlowDC Approximation AssumptionsWhen DC Approximation Is Valid:When to Use AC-OPF Instead:Mathematical FormulationComplete DC-OPF ModelSets and IndicesDecision VariablesParametersFormulation ExplanationConstraint ExplanationThree-Bus ExampleNetwork TopologySolutionsInteractive VisualizationDC-OPF ChartExtensionsSolver ComparisonNext Steps