Numerical Performance of Different Formulations for Alternating Current Optimal Power Flow

Alternating current optimal power flow (ACOPF) problems are nonconvex and nonlinear optimization problems. Utilities and independent service operators (ISO) require ACOPF to be solved in almost real time. Interior point methods (IPMs) are one of the powerful methods for solving large-scale nonlinear optimization problems and are a suitable approach for solving ACOPF with large-scale real-world transmission networks. Moreover, the choice of the formulation is as important as choosing the algorithm for solving an ACOPF problem. In this paper, different ACOPF formulations with various linear solvers and the impact of employing box constraints are evaluated for computational viability and best performance when using IPMs. Different optimization structures are used in these formulations to model the ACOPF problem representing a range of sparsity. The numerical experiments suggest that the least sparse ACOPF formulations with polar voltages yield the best computational results. Additionally, nodal injected models and current-based branch flow models are improved by enforcing box constraints. A wide range of test cases, ranging from 500-bus systems to 9591-bus systems, are used to verify the test results.

Abstract-Alternating current optimal power flow (ACOPF) problems are nonconvex and nonlinear optimization problems. Utilities and independent service operators (ISO) require ACOPF to be solved in almost real time. Interior point methods (IPMs) are one of the powerful methods for solving large-scale nonlinear optimization problems and are a suitable approach for solving ACOPF with large-scale real-world transmission networks. Moreover, the choice of the formulation is as important as choosing the algorithm for solving an ACOPF problem. In this paper, different ACOPF formulations with various linear solvers and the impact of employing box constraints are evaluated for computational viability and best performance when using IPMs. Different optimization structures are used in these formulations to model the ACOPF problem representing a range of sparsity.
The numerical experiments suggest that the least sparse ACOPF formulations with polar voltages yield the best computational results. Additionally, nodal injected models and current-based branch flow models are improved by enforcing box constraints. A wide range of test cases, ranging from 500-bus systems to 9591-bus systems, are used to verify the test results.
Index Terms-alternating current optimal power flow, interior point method, equivalent formulations, nonlinear programming I. INTRODUCTION P OWER system operation aims to deliver power to customers in a reliable and cost-effective manner. Optimal and reliable power dispatch is an optimization problem, which in its original form is referred to as the alternating current optimal power flow (ACOPF) problem [1], [2]. ACOPF is a nonlinear nonconvex optimization problem that is NP-hard.
Because of the computational difficulty of ACOPF, the majority of grid operators use some form of a direct current optimal power flow (DCOPF) formulation [3]. The DCOPF linearization used in electricity market problems is based on a few assumptions that help convert the nonlinear ACOPF problem to a linear formulation [4], [5]. Although the implementations enable solving optimal power flow within practical time constraints, rough approximations of voltage and reactive power flow are applied, requiring the application of conservative transmission limits. This can most likely result in an inefficient and suboptimal operation of the grid.
Over the past few decades, many methods have been proposed to solve the ACOPF problems. However, the majority of them overlook the impact of formulation on the performance of ACOPF solutions, especially when solving largescale problems. Many methods have been proposed and tested for solving ACOPF, including a variety of convex relaxation techniques (e.g., [6]- [13]).
In [14], different optimal power flow formulations are presented and in [15] the performance of three ACOPF formulations is numerically analyzed. However, the analysis is limited to branch flow models, which do not encompass the least sparse formulations for an ACOPF problem.
The past work presents a great deal of progress in solving ACOPF problems by offering different choices of the optimization algorithms. However, the performance of these algorithms can significantly be enhanced by the appropriate choice of the ACOPF formulation. None of the past work extensively explores the effect of formulation structure on the performance of their proposed algorithms, the impact of which could be significant, especially for large-scale problems.
This paper evaluates the performance of different ACOPF formulations and identifies the best scalable ACOPF formulations. The study includes both branch flow and nodal injection models for an ACOPF problem. These formulations, while presenting the same problem, have different optimization structures. Generally, nodal injection formulations are least sparse in structure while branch flow formulation can be relatively sparse. The performance of these formulations is evaluated by using one of the most commonly used solvers, IPOPT, that implements the interior point method (IPM) with line search, which is typically used as a benchmark by most of the recent work on ACOPF algorithms [16]- [18].
In addition to sparsity, box constraints can impact the performance of nonlinear programming. Although they are necessary for ensuring convergence in first-order methods for nonlinear programming [19], they can also impact the total number of iterations and computation time in interior point methods.
The contributions of this paper can be summarized as follows: 1) Studying the impact of box constraints on ACOPF formulations using interior point method 2) Evaluating the computational performance of different ACOPF formulations with respect to solution scalability, different voltage models, and sparsity structures 3) Identifying the best scalable ACOPF formulations and the factors contributing to better performance Similarly, different algorithms can have different performance behavior corresponding to different ACOPF formula-tions. The convergence pattern might differ when used in other methods. Thus, as a future work it is worth investigating the performance of different ACOPF formulations using different algorithms such as sequential linear programming (SLP), sequential quadratic programming (SQP), and alternating direction method of multipliers (ADMM); see, for example, [20].
The rest of the paper is organized as follows. Section II introduces optimal power flow, its different formulations, and box constraints. Section III presents the numerical experiments for evaluation of different ACOPF formulations and linear solvers. Section IV summarizes the conclusions of the study.

II. OPTIMAL POWER FLOW FORMULATIONS
The ACOPF formulations developed in this work is based on the conventions used in [21] with the objective function (1). The formulation of interest in this paper is as follows: Let c 2g , c 1g , and c 0g be the coefficients of quadratic cost function of generator g; let s g := p g + jq g be the apparent power output of generator g; let v n := v r n + jv i n = V n e jθn be the voltage at bus n; let S ij := P ij +jQ ij be the line apparent respectively be the complex generator g lower and upper bounds; and let Y L n := G L n − jB L n be the complex shunt element connected to bus n. Let N be the set of buses, G be the set of generators, and K be the set of branches in the network.
Power generation output can be separated into real and reactive power components, and therefore can be written as follows: An ACOPF problem in its complex form can be expanded into different solvable optimization formulations as shown in Fig. 1. While these formulations represent the same original ACOPF problem, they have different optimization structures that can have different convergence patterns. The ACOPF formulations can be broadly classified as either branch flow models or nodal injection models.
In addition, the flow can be represented by either power equations or current equations. Voltages are represented by polar form, rectangular form, or W -model in modeling different ACOPF formulations.

A. Branch Flow Model
In a branch flow model ACOPF problem, a power or current flow in each branch is explicitly represented as variables. Using the power equations, one can model the branches as follows.
Current flow equations can be written as These branch variables (i.e., either s ij or i ij ), are then used in the node balance equations.

B. Nodal Injection Model
In this model, flows are not represented by explicit variables and instead are integrated in node power balance equations using admittance matrix and voltages as shown in (5). This approach reduces the sparsity of the ACOPF problem.
Three different approaches for modeling voltages in an ACOPF problem are proposed.

C. Voltage Polar Form
In the voltage polar category, the voltages are modeled in polar form. Using the polar form of the voltages in ACOPF problem, one can model the branch power flow as follows: Correspondingly, the node power balance can be written as follows: For branch flow, the power thermal limit of transmission branches can be enforced as Similarly, for the nodal injection models with polar admittance, the nodal power balance can be written as follows: Similarly, for the nodal injection model with rectangular admittance, the nodal power balance can be written as follows: For nodal injection models, the current thermal limit of transmission branches can be enforced as follows: The voltage magnitude limits can be enforced by using the following:

D. Voltage Rectangular Form
In the voltage rectangular category, voltages are modeled in rectangular form. Using the rectangular form of the voltage in the ACOPF problem, the branch power flow can be modeled as follows: Correspondingly, the node power balance can be written as follows: where v 2 n = (v r n ) 2 + (v i n ) 2 . For branch power flow, the thermal limit of transmission branches can be enforced as follows: , ∀{i, j} ∈ 2K. (15) Using the rectangular form of the voltage in the ACOPF problem, the branch current flow can be modeled as follows: Correspondingly, the node power balance can be written as follows: where i ij = i r ij + ji i ij is the complex line current flow from node i to j.
For branch current flow, the thermal limit of transmission branches can be enforced as follows: Similarly, for the nodal injection model with rectangular admittance, the nodal power balance can be written as (19).
For nodal injection models, the thermal limit of transmission branches can be enforced as follows: The voltage magnitude limits can be enforced by using

E. Voltage W-Model
In the voltage W-Model category, we replace the nonlinearities of the terms containing voltages with W-Model, thereby making the problem more sparse. The W -matrix and the bounds on its elements are defined in (28). The branch power flow can be modeled as follows: Correspondingly, the node power balance can be written as follows: For branch flow, the power thermal limit of transmission branches can be enforced as follows: The node power balance for the branch current flow can be modeled as follows: Similarly, for the nodal injection models with rectangular admittance the nodal power balance can be written as follows: For nodal injection models, the current thermal limit of transmission branches can be enforced as follows: The W-Model and the limits can be formed by using the voltage relationship as follows:

F. Box Constraints
Additional box constraints can be added to some of the ACOPF formulations. While redundant to the formulations, the additional constraints can often be useful to better define the feasible solution region of optimization problem. In an ACOPF problem, the box constraints can be applied to complex parameters based on the magnitude of the parameter (e.g., nodal voltages, branch power flows, and branch current flows). We study the impact of the additional box constraints with respect to the computational performance of these formulations. An illustrative example of box constraints is shown in Fig. 2 for a nodal voltage at bus n.

III. NUMERICAL EXPERIMENTS
All numerical experiments were performed on an 8-core Intel(R) i9-9980HK CPU @ 2.40 GHz with 32 GB RAM system. The models were implemented in Julia v1.5.3 using Ipopt.jl v0.6.5, and JuMP.jl v0.21.5 [22] in a Linux Ubuntu operating system. In the IPOPT solver, we experiment with different linear solvers: MUMPS, MA27, MA57, MA86, MA97, and PARDISO [23]. Moreover, each linear solver is limited to using one core. The performance of different ACOPF formulations using different linear solvers is shown in Fig. 3. The IPOPT solver was not able to solve the full W -models (i.e., BPFW and NIRAW) giving the error of "Too few degrees of freedom. " The results show that smaller, dense formulations (NIPAPV, NIRAPV) yield better performance compared with other formulations. The results also show that among the formulations the nodal injection polar voltage models (i.e., NIPAPV and NIRAPV) converge faster. However, among the other sparse formulations the current-based flow models, particularly diagonal W -model (BCFW), report the smallest solution time. Figure 4 shows the performance profile of the ACOPF formulations plotted as described in [21] by solving a wide range of different scenarios of test cases shown in Table II. We apply the box constraints (see Section II-F) to the formulations that contain different optimization variables without bounds. These formulations include BPFPV, BPFRV, BCFRV, BCFW, and NIRARV. In Fig. 5 the computation time of the original ACOPF formulations (without box constraints) with different linear solvers is compared with those with the box constraints. The results show that the box constraints affect the performance of ACOPF formulations and improve the performance of the BCFRV, BCFW, and NIRARV formulations. As shown in Fig. 6, the number of iterations for BCFRV and BCFW were halved when box constraints are added, which  Table II [21]. may lead to the reduction in solution time for certain linear solvers.

IV. CONCLUSION
This paper presents different ACOPF formulations, each representing a unique optimization structure and sparsity. The work includes an explicit investigation of the impact of these ACOPF formulations on the performance of ACOPF algorithms. The numerical experiment in this paper considers IPM implemented to evaluate these formulations by using the IPOPT solver. The results show that the choice of formulation, which is often overlooked, can significantly impact the computation time of an algorithm, especially for large-scale networks. Numerical results in the paper suggest a consistently superior performance by the Nodal Injection Polar Admittance Polar Voltage (NIPAPV) and Nodal Injection Rectangular Admittance Polar Voltage (NIRAPV) formulations among the different ACOPF formulations studied in this paper across a wide range of test networks. The complexity of the subproblem of these two formulations compared with the other formulations has also consistently remained the least. Box constraints can impact the performance of ACOPF formulations and improve the performance of BCFRV, BCFW, and NIRARV. It is worth investigating the performance of different ACOPF formulations with other algorithms such as SLP, SQP, and ADMM.