hynet: An Optimal Power Flow Framework for Hybrid AC/DC Power Systems

Matthias Hotz, Wolfgang Utschick

Abstract

High-voltage direct current (HVDC) systems are increasingly incorporated into today's AC power grids, necessitating optimal power flow (OPF) tools for the analysis, planning, and operation of such hybrid systems. To this end, we introduce hynet, a Python-based open-source OPF framework for hybrid AC/DC grids with point-to-point and radial multi-terminal HVDC systems. hynet's design promotes ease of use and extensibility, which is supported by the particular mathematical model and software design presented in this paper. The system model features a unified representation of AC and DC subgrids as well as a concise and flexible converter model, which enable the compact description of a hybrid AC/DC power system and its OPF problem. To support convex relaxation based OPF solution techniques, a state space relaxation is introduced to obtain a unified OPF formulation that is analogous to the OPF of AC power systems. This enables the direct generalization of relaxation-related results for AC grids to hybrid AC/DC grids, which is shown for the semidefinite and second-order cone relaxation as well as associated results on exactness and locational marginal prices. Finally, hynet's object-oriented software design is discussed, which provides extensibility via inheritance and standard design patterns, and its robust and competitive performance is illustrated with case studies.

Introduction

The global transition toward renewable energy sources necessitates a structural evolution of power grids. To efficiently transmit fluctuating wind and solar power over long distances, High-Voltage Direct Current (HVDC) systems are being integrated into existing Alternating Current (AC) infrastructure. However, managing these hybrid AC/DC grids introduces significant mathematical complexity into the Optimal Power Flow (OPF) problem—the core optimization task used to determine the most cost-effective generation and transmission schedules.

Traditional OPF tools often struggle with hybrid systems, either oversimplifying multi-terminal DC links or failing to provide a unified mathematical language for both AC and DC components. hynet is an open-source Python framework designed to bridge this gap, offering a robust, scalable, and mathematically rigorous approach to hybrid OPF.

Unified Modeling and Converter Representation

A primary innovation of hynet is its unified modeling approach. Rather than treating AC and DC subgrids as disparate entities, the framework represents them using a consistent underlying structure. This includes a flexible model for Voltage Source Converters (VSC) that accurately accounts for mode-dependent proportional losses without sacrificing computational efficiency.

Unified modeling components: (a) AC bus, (b) AC branch, and (c) VSC converter model.

As shown in the unified modeling components, the framework defines standard components for buses, branches, and converters. The converter model (c) is central to the hybrid grid, managing the interface between AC and DC subgrids while respecting physical loss characteristics.

State Space Relaxation and Convex Optimization

The core theoretical contribution of hynet is the introduction of "state space relaxation." In a DC grid, voltage is typically represented as a scalar magnitude. In contrast, AC voltages are complex phasors. hynet "relaxes" the DC voltages into the complex domain, making the DC mathematics analogous to AC mathematics.

This unification allows hynet to leverage advanced convex relaxation techniques, such as Semidefinite Relaxation (SDR) and Second-Order Cone Relaxation (SOCR). These techniques transform the non-convex (and thus "hard") OPF problem into a convex one that can be solved globally and efficiently.

Feasible regions for (a) converter power and (b) generator power.

The framework ensures that the physical limits of the system are respected. The figure above illustrates the feasible regions for converter power and generator power. By defining these regions clearly, the optimization engine can find the most efficient operating point within safe boundaries. Crucially, the authors prove that for radial DC subgrids, this relaxation is "exact," meaning the original physical DC values can be perfectly recovered from the relaxed complex representation.

Implementation and Performance

hynet is built using professional software engineering principles, featuring an object-oriented design and a relational database (SQL) backend. This modularity makes it highly extensible for researchers.

The framework's performance was validated using the PGLib (IEEE PES Power Grid Lib) benchmarks and a large-scale hybrid case (case2383wp_ha) featuring 2,383 buses and a multi-terminal HVDC system. Key results include:

  • Scalability: The massive 2,383-bus system was solved in approximately 28 seconds on a standard laptop.
  • Precision: The optimality gap—the difference between the relaxed solution and the theoretical optimum—was consistently low, often between 0.00% and 0.01%.
  • Robustness: hynet successfully solved every instance in the PGLib benchmark, including cases where established tools like MATPOWER failed.

Conclusion and Future Work

hynet provides a transparent and reproducible platform for the power systems community, effectively applying decades of AC optimization research to the burgeoning field of hybrid AC/DC grids. While the current framework provides strong guarantees for radial DC architectures, future work will focus on extending these mathematical proofs to meshed DC grids, diversifying the supported high-performance solvers, and integrating dynamic stability constraints to account for transient grid events.

Summary updated

Abstract

High-voltage direct current (HVDC) systems are increasingly incorporated into today's AC power grids, necessitating optimal power flow (OPF) tools for the analysis, planning, and operation of such hybrid systems. To this end, we introduce hynet, a Python-based open-source OPF framework for hybrid AC/DC grids with point-to-point and radial multi-terminal HVDC systems. hynet's design promotes ease of use and extensibility, which is supported by the particular mathematical model and software design presented in this paper. The system model features a unified representation of AC and DC subgrids as well as a concise and flexible converter model, which enable the compact description of a hybrid AC/DC power system and its OPF problem. To support convex relaxation based OPF solution techniques, a state space relaxation is introduced to obtain a unified OPF formulation that is analogous to the OPF of AC power systems. This enables the direct generalization of relaxation-related results for AC grids to hybrid AC/DC grids, which is shown for the semidefinite and second-order cone relaxation as well as associated results on exactness and locational marginal prices. Finally, hynet's object-oriented software design is discussed, which provides extensibility via inheritance and standard design patterns, and its robust and competitive performance is illustrated with case studies.
BibTeX
@article{hotz2019i,
  author = {Matthias Hotz and Wolfgang Utschick},
  title = {{<i>hynet:</i> An Optimal Power Flow Framework for Hybrid AC/DC Power Systems}},
  journal = {IEEE Transactions on Power Systems},
  year = {2019},
  doi = {10.1109/tpwrs.2019.2942988},
}
Figure