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
As the global energy landscape shifts toward renewables, power grids are evolving into complex hybrid structures. High-Voltage Direct Current (HVDC) systems are becoming essential for long-distance transmission and the integration of offshore wind farms. Efficiently managing these grids requires solving the Optimal Power Flow (OPF) problem—a mathematical optimization that determines the most cost-effective generation and transmission strategy within physical limits. However, traditional OPF tools often struggle with the distinct physics of AC and DC systems, frequently treating DC components as simplified "black boxes" or failing to support multi-terminal HVDC (MT-HVDC) configurations.
Unified Modeling and State Space Relaxation
hynet addresses these challenges by introducing a unified mathematical language for hybrid grids. The framework models AC and DC subgrids using a consistent set of components, including a flexible converter model that accounts for mode-dependent proportional losses.
The core theoretical innovation of hynet is the state space relaxation. By mathematically "relaxing" DC voltage magnitudes into complex-valued phasors—similar to how AC voltages are treated—the entire hybrid system can be solved using a single algorithm. The authors prove that for radial DC subgrids, this relaxation is exact, allowing researchers to recover real-world DC voltages from complex-valued solutions. This unification enables the direct application of advanced convex optimization techniques like Semidefinite Relaxation (SDR) and Second-Order Cone Relaxation (SOCR), which can solve previously "hard" non-convex problems to global optimality.
Converter Capability and Linearity
To maintain computational efficiency, hynet utilizes polyhedral approximations for converter limits. By avoiding nonlinear constraints that typically track whether a converter is rectifying or inverting, the model remains lean while accurately capturing the active and reactive power (P/Q) capabilities of Voltage Source Converters (VSCs).
Software Architecture and Performance
Built in Python with an object-oriented design and a SQL backend, hynet is designed for extensibility and reproducibility. In benchmarking against standard libraries like PGLib, hynet demonstrated superior robustness, successfully solving complex cases where other established tools failed.
Performance tests on a standard laptop showed that hynet could solve a massive 2,383-bus hybrid AC/DC system (featuring 16 converters and 786 DC buses) in just 12 to 28 seconds. Furthermore, the optimality gaps—the difference between the approximate solution and the theoretical best—were remarkably small, often ranging from 0.00% to 0.01% for large-scale hybrid systems.
Conclusion
hynet provides a transparent, open-source standard for the research community, bridging the gap between theoretical AC OPF advancements and the practical needs of modern hybrid AC/DC grids. By unifying the mathematical treatment of these systems, it paves the way for more reliable and efficient grid planning in the renewable energy era.
Summary updated