(1) Overview

1. Introduction

Software for power flow problem solution are key tools for power system planning and analysis. In fact, decisions on operational and investment strategies to guarantee the proper and secure operation of power systems mainly rely on power flow analysis. The solution to the power flow problem consists in calculating voltage magnitudes and angles at each bus of a power system under steady-state and balanced conditions. This is carried out by solving a set of nonlinear equations referred to as power balance equations []. Most commonly used algorithms to solve the power flow are based on iterative methods, being the Newton Raphson (NR) method of predominant use because of its quadratic convergence properties []. An alternative algorithm to solve the power flow problem, based on complex analysis, is the Holomorphic Embedding Load-Flow Method (HELM) firstly proposed by Antonio Trias []. HELM is characterized by its deterministic and non-iterative nature, which may result in advantages over classical iterative approaches [].

In order to mathematically formulate the power flow solution, the voltage magnitude and angle of a bus must be specified. This is achieved either by defining a single slack bus as in the classical single slack bus model approach, or by using Distributed Slack Bus (DSB) models. In the single slack bus model, system power losses are accounted for by a single bus, while in the DSB models, system losses are distributed among generators at different buses according to participation factors. Several approaches are available in the literature to select these participation factors based on different criteria. For instance, in [], participation factors are calculated depending on each generator’s active power output.

HELMpy is an open source software for power flow solution developed on Python 3 [], and based on the NR method as well as the HELM. HELMpy also allows its users to model the power flow problem using either a single slack bus model or a DSB model. Several open source tools such as MATPOWER [], PSAT [], among others, and of special interest for being Python based: PyPSA [], PYPOWER [], pandapower [], and GridCal [] are also intended to solve the power flow problem. Nevertheless, none of the mentioned software has a properly working implementation of the HELM; in fact, it does not exist any fully functional open source software of the HELM other than HELMpy. This software is available as a repository on GitHub [] and stored on Zenodo [] under the GNU Affero General Public License v3.0 or later [] (AGPL-3.0-or-later). HELMpy was developed to implement and validate the DSB model formulation devised in the research paper [].

2. Power flow solvers

Power systems modeling and algorithms implemented in HELMpy for solving the power flow problem are explained below.

2.1. Modeling

The power flow solution algorithms included in HELMpy rely on the standard π branch model, which comprises models of AC transmission lines, phase-shifting transformers, off-nominal tap transformers, and shunt admittances for modeling capacitors or reactors banks in parallel to buses. Besides, reactive power limits of generators are considered for all generators, excluding the slack bus generator.

2.2. Algorithms

HELM

The HELM, firstly proposed by Antonio Trias [], is a power flow solution method based on the study of complex analysis. This method is fully implemented in HELMpy based on the theory, fundamentals and practical recommendations described in [], [] and []. Furthermore, two models for voltage magnitude and active power controlled buses (PV buses) can be used as presented in [].

HELM, seen solely as a numerical method, consists in recursively solving a linear matrix equation of the form Ax = B, where A and B are known values and x is unknown. Each time this linear matrix equation is solved, an analytic continuation is applied on a group of power series that represent bus voltages. This process continues until either a correct solution is computed or no solution can be found []. The matrix A remains constant in this approach; thus, it can be factorized. The vector B is updated before the linear matrix equation is solved. As a result, the vector x of power series coefficients is also updated.

Newton-Raphson

The Newton-Raphson based algorithm used in HELMpy to solve the power flow problem is implemented using a hybrid representation of the power balance equations in polar and rectangular form, where unknown variables are modeled in polar form.

Distributed Slack Bus Model

A DSB model based on the participation factors proposed in [] is developed in HELMpy to be used along with the HELM and NR method. In the case of the NR algorithm, the DSB model is formulated according to [] and adapted to balanced systems, while in the case of the HELM, the formulations devised in [] are used.

2.3. Convergence criteria

The convergence criteria for the NR algorithm is based on either checking both active and reactive power mismatch errors or active power mismatch errors only, depending on bus types. Convergence is achieved when all of these mismatch errors are less or equal than a predefined tolerance. Similarly, the convergence criteria for the HELM consists in checking whether the difference between magnitudes and phase angles of two consecutive voltages (obtained through analytic continuation of power series) at each bus is less or equal than a predefined tolerance [].

3. Implementation and architecture

HELMpy is written in Python given the extensive use of this programming language in scientific and engineering computing, more specifically in power system analysis and modeling. This package is structured as a group of Python modules that contain sets of functions used to solve the power flow problem according to the previously mentioned algorithms. These sets of functions are built using the following well-known Python libraries: pandas [] for handling the input data, storing it as DataFrame objects, and generating the required outputs; NumPy [] for managing numerical functions, handling linear equation systems, and efficiently using array objects; and SciPy [] for exploiting its sparse matrix handling capabilities.

Figures 1 and 2 depict the algorithms of the HELM and NR method, respectively. It can be seen from these figures the main structure of the code.

Figure 1 

HELM algorithm flow chart.

Figure 2 

Newton-Raphson algorithm flow chart.

Sample data of large-sized practical grids (complex), as well as computed results obtained by using this sample data are included in the data directory of the repository. This data is used by the testing scripts of the repository.

4. Quality control

HELMpy contains a set of test cases which results were compared with those obtained using MATPOWER, yielding identical voltage profiles for the same tolerance. Regarding the DSB model, results obtained using the HELM and the NR approaches are alike as in all test cases. Users can perform bug reports in the GitHub repository [].

(2) Availability

Operating system

Any operating system running Python.

Programming language

Python version 3.6 or higher.

Additional system requirements

None.

Dependencies

pandas [].

NumPy [].

SciPy [].

List of contributors

Tulio Molina, Universidad de Los Andes.

Juan Ortega, Universidad de Los Andes.

Software location

Name: Zenodo.

Persistent identifier: http://doi.org/10.5281/zenodo.3248868

Licence: GNU Affero General Public License v3.0 or later.

Publisher: HELMpy team.

Version published: 1.

Date published: 18/06/19.

Code repository

Name: GitHub.

Persistent identifier: https://github.com/HELMpy/HELMpy

Licence: GNU Affero General Public License v3.0 or later.

Date published: 12/06/19.

Language

English.

(3) Reuse potential

Detailed documentation about the usage of HELMpy is included in the User’s Guide available in the GitHub repository [], where users can also contribute to the code by raising issues or making pull requests. This software is well structured and explained in order to make it easy to understand and modify. The HELM is a recently developed method and there is lack of properly working open source implementations of it; therefore, HELMpy emerges as a software of huge reuse potential for academic research in the subject of power system analysis and modeling, especially for novel models and approaches to be incorporated on the HELM.