# Enhancing Optimal Power Flow Feasibility:
A Novel Comparative Study of Approximation Techniques

Sarah Alibhai¹, Maxim Ciobanu¹, Wiktor Wiejak², David Peters¹, Sajad Fathi Hafshejani¹, Daya Gaur¹, Robert Benkoczi¹

¹ Department of Mathematics and Computer Science, University of Lethbridge,
Lethbridge, AB T1K 3M4, Canada.

² Department of Computer Science, University of Exeter,
Exeter, EX4 4PY, United Kingdom.

E-Mail: ¹ (sarah.alibhai, maxim.ciobanu, dj.peters, sajad.fathihafshejan, daya.gaur, robert.benkoczi)@uleth.ca

E-Mail: ² wiktor.wiejak@gmail.com

## ACKNOWLEDGMENT

This research is supported by an AB Innovates MIF Grant and was enabled in part by the Digital Research Alliance of Canada (https://alliancecan.ca/en).

*Index Terms*—«Optimization» « Computational cost» «Smart grids» «Control methods for electrical systems» «Power flow control» «Distribution of electrical energy» «Modeling» «Data analysis»

*Abstract*—This experimental study investigates three approximation methods (quadratic, linear, and logarithmic) of the Optimal Power Flow problem (OPF) in comparison to traditional DC-OPF approximations using benchmark cases from the MATPOWER library. The quality and efficiency of each method is assessed using novel error metrics in respect to the AC-OPF baseline, with a focus on phase angle, voltage magnitude and generation costs. Results demonstrate promise in outperforming DC-OPF while maintaining computational efficiency, especially in the case of the quadratic approximation. Findings indicate an attainable balance between accuracy and complexity and contribute to power system modeling with implications for real-time power system management and the integration of sustainable energy.

## I. INTRODUCTION

Any operator of a national power grid requires support to predict demand and schedule the production of electrical power. The US Federal Energy Regulatory Commission (FERC) states that Optimal Power Flow (OPF), with unit commitment, is a vital tool in any software decision support system [1]. Here, we focus only on OPF. The solution to OPF gives the power in

the grid and suggests optimal power production points in various generators.

Approximations of Optimal Power Flow (OPF) models are necessary because of the need for computational efficiency [2]. However, the trade-off is with the accuracy of the solution. A solution to an approximation model may not be feasible in the original OPF model and must be adjusted before use in the grid. Knowing an approximate solution does not tell us about their usability. A feasibility measure is needed, according to which the approximate solutions can be ranked, based on the perturbations needed to the computed values. We propose an alternative measure for feasibility that considers voltage magnitudes, phase angles, and calculated generator power values to evaluate the quality of the approximation in relation to the (AC) OPF model which is used as a baseline. A comprehensive list of symbols and their definitions used throughout this paper is provided in the nomenclature section (Section V-A) at the end of the document.

### A. Background

OPF is a fundamental problem in power system optimization, seeking to determine ideal operating conditions for an electrical grid [3]. A solution to OPF is needed to plan real-time and day-ahead operations. The AC OPF model contains non-linear constraints which are challenging to solve, even for medium size grids. DC OPF assumes that the voltage magnitudes and angles are constant and omits reactive power. These simplifications make the model linear, which can be solved efficiently using off-the-shelf solvers. Because of its simplicity and efficiency, the DC model is widely used. However, the solutions to DC OPF are not feasible for AC OPF
[4]. Therefore, an interesting question is to consider approximations of AC OPF, which are faster to solve (compared to AC OPF) and have similar efficiency as DC OPF. In this paper, we consider linear, quadratic, and logarithmic approximations.

The literature on OPF is vast, for an introduction to OPF, see [1]. Here, we focus on the non-linearity of AC flow and some approximations thereof. Non-linearity is typically handled by either non-linear constraints (as in AC OPF), linearization, or some convex relaxation of the non-linear constraints. For a recent review of these techniques to handle non-linearity in AC flow, see [5].

Our comparative study, besides directly supporting the three approximations included, contributes to the planning of the production of electrical power in a transmission grid. This impacts several more recent lines of research. An increasing amount of electrical devices require DC voltage instead of AC [6]. Many appliances must utilize AC to DC converters to power the DC components, introducing substantial power losses at scale. Microgrids alongside AC infrastructure have been suggested as a solution power [7]. The joint model is given by a semi-definite program that is efficient in solving for such Microgrids. Integrating photovoltaics is also easier in such a model (easily interlaced with DC grid) [7], which further reduces conversion losses and encourages sustainable energy use.

There is extensive interest in using machine learning for solving OPF [8] due to an increase in the complexity of power grids. Deep nets have been used to predict values of a subset of independent variables and then solve the AC OPF to determine the values for the rest of the variables [9]. Our work is also relevant to this line of research, as an approximate quadratic model can be solved (more efficiently possibly) on the remaining set of variables (instead of having to solve the AC OPF).

## II. APPROXIMATION METHODS

In this section, we describe in detail the three approximations studied in this paper. We begin with a formal definition of OPF.

### A. Optimal Power Flow

The solution to OPF is needed for operating and planning future operations of power systems [10]. A solution to OPF minimizes an objective function (ex. operating cost) subject to physical and operational constraints. The notation, list of symbols, and their meaning are in the Nomenclature.

$$ OF = \sum_{i=1}^{N} c_i P_{g,i}^2 + b_i P_{g,i} + a_i \quad (1) $$

OPF problems in practice are large, highly constrained, and non-linear. The non-linearity comes from the power balance flow equations shown below.

The power balance equation states that for each node, the real and reactive power demand is equal to the real and reactive power generated. This ensures that the minimum power demands of the system are met. The power flow equations for real and reactive powers between two nodes $(i, j)$ in the system, are defined as:

$$ P_{ij} = g_{ij}(v_i^2 - v_i v_j \cos \theta_{ij}) - b_{ij}v_i v_j \sin \theta_{ij} \quad (2) $$

$$ Q_{ij} = -b_{ij}(v_i^2 - v_i v_j \cos \theta_{ij}) - g_{ij}v_i v_j \sin \theta_{ij} \quad (3) $$

These equations are derived from the admittance matrix, which represents how much of the power can be admitted from one bus to another, given the physical constraints and limitations of the circuit it must pass through.

Typical inequality constraints are generator limits:

$$ P_{g,i}^{min} \leq P_{g,i} \leq P_{g,i}^{max} \quad (4) $$

$$ Q_{g,i}^{min} \leq Q_{g,i} \leq Q_{g,i}^{max} \quad (5) $$

for all $i \in G$ (set of all generator busses), voltage magnitude limits,

$$ v_i^{min} \leq v_i \leq v_i^{max} \quad (6) $$

line flow limits at branch $i$ and $j$,

$$ P_{i,j}^2 + Q_{i,j}^2 \leq S_{i,j}^{max} \quad (7) $$

It is computationally expensive to calculate optimal solutions for AC OPF. As a result, approximations of the power flow equations are used, leading to different models, explained in the next section.

The DC OPF assumes: Phase angles, $\theta_i$, are small and approximately 0 and Voltage magnitudes, $v_i$, are approximately 1. This approach is widely used to maintain efficiency, at the expense of accuracy; particularly noticeable in cases where reactive power flows and voltage magnitudes and angles are critical.

### B. Approximations Implemented

As mentioned earlier, the AC approach is accurate but computationally expensive, whereas the DC OPF, though fast, is less accurate, as it assumes a lossless environment
<table><caption>TABLE I
Approximation Methods for Constraints Tested in this Study</caption><tr><td>P<sub>ij</sub> = g<sub>ij</sub>(v<sub>i</sub><sup>2</sup> - v<sub>j</sub><sup>2</sup> cos θ<sub>ij</sub>) - b<sub>ij</sub>v<sub>i</sub>v<sub>j</sub> sin θ<sub>ij</sub><br/>Q<sub>ij</sub> = -b<sub>ij</sub>(v<sub>i</sub><sup>2</sup> - v<sub>j</sub><sup>2</sup> cos θ<sub>ij</sub>) - g<sub>ij</sub>v<sub>i</sub>v<sub>j</sub> sin θ<sub>ij</sub></td><td>AC Constraints</td></tr><tr><td>P<sub>ij</sub> = g<sub>ij</sub>(v<sub>i</sub><sup>2</sup> - v<sub>j</sub><sup>2</sup>) - b<sub>ij</sub>θ<sub>ij</sub> + 1/2(g<sub>ij</sub>)(θ<sub>ij</sub><sup>2</sup> + v<sub>ij</sub><sup>2</sup>)<br/>Q<sub>ij</sub> = -b<sub>ij</sub>(v<sub>i</sub><sup>2</sup> - v<sub>j</sub><sup>2</sup>) - g<sub>ij</sub>θ<sub>ij</sub> + 1/2(-b<sub>ij</sub>)(θ<sub>ij</sub><sup>2</sup> + v<sub>ij</sub><sup>2</sup>)</td><td>Quadratic Approximation [11]</td></tr><tr><td>P<sub>ij</sub> = g<sub>ij</sub>(v<sub>i</sub> - v<sub>j</sub>) - b<sub>ij</sub>θ<sub>ij</sub><br/>Q<sub>ij</sub> = -b<sub>ij</sub>(v<sub>i</sub> - v<sub>j</sub>) - g<sub>ij</sub>θ<sub>ij</sub></td><td>Linear Approximation [12]</td></tr><tr><td>P<sub>ij</sub> = g<sub>ij</sub>(ln v<sub>i</sub> - ln v<sub>j</sub>) - b<sub>ij</sub>θ<sub>ij</sub><br/>Q<sub>ij</sub> = -b<sub>ij</sub>(ln v<sub>i</sub> - ln v<sub>j</sub>) - g<sub>ij</sub>θ<sub>ij</sub></td><td>Logarithmic Approximation [13]</td></tr></table>

with no reactive power. We investigate three approximation methods to determine if they are more accurate compared to the DC approximation without sacrificing efficiency. The constraints that are approximated are in Table I. We describe the three approximations next.

These methods have been implemented using the PowerModels [14] and JuMP [15] packages for Julia [16]. Our repository is available on GitHub and can be provided upon request.

1) **Quadratic Approximation:** The first method approximates the sine and cosine terms while decoupling the voltage variables in the AC OPF power flow constraints. The resulting formula is a quadratic [11]. While this method improves accuracy over the DC approximation, it introduces complexities, with solvers limited to linear constraints.

Using the second-order Taylor series expansions of sine and cosine, the following approximations are made, considering that the phase angle ($\theta_{ij}$) is generally a small number, and the voltage magnitude ($v$) is approximately 1.0 p.u:

$$ \sin \theta_{ij} \approx \theta_{ij}, \quad \cos \theta_{ij} \approx 1 - \frac{\theta_{ij}^2}{2} \qquad (8) $$

$$ v_i v_j \theta_{ij} \approx \theta_{ij}, \quad v_i v_j \theta_{ij}^2 \approx \theta_{ij}^2 \qquad (9) $$

Next, we decouple voltage magnitudes ($v_i v_j$), while regarding the quadratic voltage magnitude term ($v_i^2$) as an independent variable. We use a mathematical transformation for the non-linear voltage magnitude term, ($v_{ij} = v_i - v_j$):

$$ \begin{aligned} v_i^2 - v_i v_j &= v_i^2 - \left( \frac{v_i^2 + v_j^2}{2} - \frac{v_{ij}^2}{2} \right) \\ &= \frac{v_i^2 - v_j^2}{2} + \frac{v_{ij}^2}{2} \end{aligned} \qquad (10) $$

Substituting (8), (9), and (10), into (2) and (3) the following approximation equations are obtained.

$$ P_{ij} = g_{ij} \frac{v_i^2 - v_j^2}{2} - b_{ij} \theta_{ij} + \frac{1}{2} (g_{ij}) (\theta_{ij}^2 + v_{ij}^2) \qquad (11) $$

$$ Q_{ij} = -b_{ij} \frac{v_i^2 - v_j^2}{2} - g_{ij} \theta_{ij} + \frac{1}{2} (-b_{ij}) (\theta_{ij}^2 + v_{ij}^2) \qquad (12) $$

2) **Linear Approximation:** The second approximation method we evaluated is a fully linear, lossless model similar to the DC approximation but with enhancements for reactive power. Unlike the DC model, this method allows voltage magnitude and phase angle to vary, potentially leading to more precise calculations for these parameters.

A first-order Taylor series approximation is used. This gives us that $\sin \theta_{ij} \approx \theta_{ij}$ and $\cos \theta_{ij} \approx 1$. Furthermore, the bus voltage magnitudes are intuitively similar to 1 due to the constraints.

$$ \sin \theta_{ij} \approx \theta_{ij}, \quad \cos \theta_{ij} \approx 1 \qquad (13) $$

$$ v_i \approx v_j \approx 1 \qquad (14) $$
Applying approximation (13) the following equations are obtained.

$$P_{ij} = g_{ij}(v_i^2 - v_i v_j) - b_{ij} v_i v_j \theta_{ij} \quad (15)$$

$$Q_{ij} = -b_{ij}(v_i^2 - v_i v_j) - g_{ij} v_i v_j \theta_{ij} \quad (16)$$

Now dividing both sides by the voltage magnitude ($v_i$) gives the following equations.

$$\frac{P_{ij}}{v_i} = g_{ij}(v_i - v_j) - b_{ij} v_j \theta_{ij} \quad (17)$$

$$\frac{Q_{ij}}{v_i} = -b_{ij}(v_i - v_j) - g_{ij} v_j \theta_{ij} \quad (18)$$

And finally, utilizing (14).

$$P_{ij} = g_{ij}(v_i - v_j) - b_{ij} \theta_{ij} \quad (19)$$

$$Q_{ij} = -b_{ij}(v_i - v_j) - g_{ij} \theta_{ij} \quad (20)$$

### 3) Logarithmic Approximation
The third approximation involves the use of second-order Taylor series approximations of Euler's number, first-order Taylor series approximations of sine and cosine angles, and bus voltage magnitude approximations shown below. This transformation aims to linearize the constraint further, potentially improving computational efficiency and accuracy.

$$\sin \theta_{ij} \approx \theta_{ij}, \quad \cos \theta_{ij} \approx 1 \quad (21)$$

$$v_i \equiv e^{\ln v_i}, \quad v_i \approx 1, \quad v_j \approx 1, \quad e^u \approx 1 + u \quad (22)$$

Dividing both sides by $v_i$ and using approximations (21), we get:

$$\frac{P_{ij}}{v_i} = g_{ij}(v_i - v_j) - b_{ij} v_j \theta_{ij} \quad (23)$$

$$\frac{Q_{ij}}{v_i} = -b_{ij}(v_i - v_j) - g_{ij} v_j \theta_{ij} \quad (24)$$

An application of the logarithmic identity and voltage approximations from (22) yields:

$$P_{ij} = g_{ij}(e^{\ln v_i} - e^{\ln v_j}) - b_{ij} \theta_{ij} \quad (25)$$

$$Q_{ij} = -b_{ij}(e^{\ln v_i} - e^{\ln v_j}) - g_{ij} \theta_{ij} \quad (26)$$

Finally, using the second-order Taylor series approximation in (22) we get the logarithmic approximation.

$$P_{ij} = g_{ij}(\ln v_i - \ln v_j) - b_{ij} \theta_{ij} \quad (27)$$

$$Q_{ij} = -b_{ij}(\ln v_i - \ln v_j) - g_{ij} \theta_{ij} \quad (28)$$

### III. FEASIBILITY

#### A. Calculating Feasibility

We now describe a metric to evaluate the effectiveness of the approximations relative to the AC OPF solution. Using this metric, we compared the outputs of each approximation model against the results obtained from the AC constraints across several test cases to see if the approximations offer any improvements over the DC OPF.

First, we run an approximation method and compute the optimal generator values ($pg^A$). We then fix these values. Next, we solve the AC OPF model, with the new fixed values for the generators, and add slack variables ($x$) and ($y$) to the constraints, which captures the active and reactive power mismatch respectively when the constraints are not exactly satisfied. The new objective is to minimize the square error over every bus. This allows us to determine the best-case scenario which is an estimate of how well the approximation works.

$$OF_P = \sum_{i=0}^{N} x_i^2 + y_i^2 \quad (29)$$

The mismatch value is for every generator. To quantify this accuracy over a range of different cases for each approximation, we calculated the sum of the absolute values of the active power slack variable across all buses and then divided it by the sum of the absolute values of the generator outputs.

$$\frac{\sum_{i=0}^{N} x_i}{\sum_{i=0}^{N} P_{g,i}^{A}} \quad (30)$$

This normalization is a percentage error that indicates how closely each approximation matches the AC solution. By graphing these accuracy metrics for various scenarios, we can visually compare the performance of each approximation method with the AC solution.

#### B. Voltage and Angle Error Calculation

We also consider the voltage magnitudes and phase angles within the network in addition to the generator outputs. This helps us determine how much the voltage magnitudes and phase angles deviate from their values in the AC OPF solution.

First, we obtain the voltage magnitude ($v$) and phase angle ($\theta$) for each corresponding approximation method. Then we optimize the AC OPF model with fixed generator ($P_g$) values and additional slack variables for active power ($x$) and reactive power ($y$) in the objective function. Voltage magnitude ($v$) and phase angles ($\theta$) remain as
variables and are computed for this new feasible solution. The two sets of values are compared using the following equation:

$$E = \sum_{i=1}^{n} \frac{\theta_{i}^{\text{Approx}} - \theta_{i}^{\text{AC}}}{\theta_{i}^{\text{AC}}} \quad (31)$$

## IV. SIMULATION EVALUATION

### A. Simulation Setup

The following simulations were made possible thanks to the Digital Research Alliance of Canada. We utilized their Cedar high-performance computing cluster with the following specifications:

* **Job Configuration:**

- Jobs were submitted using `sbatch`, a Slurm workload manager command.

- Utilized job arrays to run all tests independently

- Memory per Task: 32 GB

* **Compute Node Specifications:**

- Cluster: Cedar

- CPU: 2 x Intel E5-2683 v4 Broadwell @ 2.1GHz

- Cores per Node: 32

- Memory per Node: 125 GB

- Local Storage: 2 x 480 GB SSDs

* **Software Environment:**

- Programming Language: Julia

- Version: 1.10.0

### B. Simulation Design

We computed the solutions to the three approximation methods and calculated error metrics as described in the previous section. Running our simulations on the diverse set of test cases from the MATPOWER library [17], [18] is useful in assessing the scalability and robustness of these approximation methods across different network complexities.

To highlight the results of the simulations we will discuss three graphs. The test cases run along the x-axis, ordered by increasing number of buses (from left to right). The case name indicates the number of buses. This ordering lets us visualize how the performance of each approximation method scales with increasing system size.

For the y-axis, we use the error metrics from the previous section and the difference in the objective function value (cost of the solution).

<figure><img src="image_1.png" /><figcaption>Fig. 1: Feasibility Graph of Various Models</figcaption></figure>

* **Cost Error:** This metric is related to the economic efficiency of power system operations. It is calculated as a percentage and measures how close the cost of the approximation methods are to the cost of the AC model, as described in section III-A.

* **Angle Error:** It is calculated as a percentage difference between each approximation and the standard AC model.

* **Magnitude Error:** The voltage magnitude error is a percentage indicator of how much the voltage had to change from the values of the AC model to obtain a feasible solution.

* **Performance:** The performance is measured as the amount of time in seconds that it takes for each model to be optimized.

Angle error measures correctness, magnitude error captures the change needed to keep the model feasible, while cost error is helpful in analyzing economic factors. Together, they offer a novel perspective on the accuracy and the impact of the three approximation methods discussed.

### C. Simulation Results Analysis

1) **Cost Error:** As shown in Figure 1 the approximation methods generally have the same or lower cost error compared to DC approximation across most test cases. The two largest cases, `case1354pegase` and `case_ACTIVISg2000` are outliers where DC outperforms both Linear and Logarithmic approximations by a small margin. The Quadratic approximation is significantly better. It consistently has close to 0% error in all test cases.
<table><caption>TABLE II
Feasibility Averages</caption><thead><tr><th>Metric</th><th>AC</th><th>DC</th><th>Quadratic</th><th>Linear</th><th>Logarithmic</th></tr></thead><tbody><tr><td>Cost Error</td><td>0.0%</td><td>2.578%</td><td>0.139%</td><td>2.47158%</td><td>2.469%</td></tr><tr><td>Angle Error</td><td>0.0%</td><td>13.359%</td><td>4.767%</td><td>5.43544%</td><td>5.427%</td></tr><tr><td>Voltage Error</td><td>0.0%</td><td>4.597%</td><td>6.608%</td><td>3.550%</td><td>3.580%</td></tr><tr><td>Time (sec)</td><td>2.692s</td><td>0.139s</td><td>0.849s</td><td>1.192s</td><td>1.385s</td></tr></tbody></table>

<figure><img src="image_2.png" /><figcaption>Fig. 2: Voltage Angle (Va) Error Graph of Various Models</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig. 4: Performance measured in seconds of Various Models</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig. 3: Voltage Magnitude (Vm) Error Graph of Various Models</figcaption></figure>

2) Angle Error: Phase angle is used to control the power in the grid. Figure 2 is the phase angle error graph. Between case30 and case_ieee30, all three approximations perform significantly better than the DC model. Both linear and logarithmic approximations have almost identical errors. Thus, these approximations can be implemented in real-world systems to enhance both accuracy and efficiency.

3) Magnitude Error: Voltage magnitude error is a percentage indicator of the change in voltage that an approximation method had to produce to keep the model feasible.

As seen in Figure 3 there are three distinct groups. The middle group is of cases case18 to case39. This group shows very low magnitude error/change possibly indicating that the solutions to the approximate models do not have to be changed substantially for their use in the grid. The two other groups in the figure exhibit high magnitude error. These two groups have low and high numbers of buses. We ignore for the moment the cases with a small number of buses. The group with a high number of buses, case118 to
`case_ACTIVISg2000`, having high magnitude error
leads us to believe that these cases are highly complex,
with more challenging network configurations requiring
substantial adjustments in voltage magnitude to maintain
feasibility. This shows a single approximation might not
be enough for these scenarios.

## D. Performance

Figure 4 shows the execution time (in seconds) of each approximation method. For smaller test cases (`case5` to `case18`), all methods demonstrate efficient performance with AC taking slightly longer. In larger systems, however, beyond `case_ACTIVISg200`, the DC model maintains consistent performance while AC computation time increases exponentially, reaching 15 seconds for `case_ACTIVISg2000`. The Quadratic approximation, which showed superior accuracy against the other approximations, maintains reasonable computational efficiency with execution times of around 8 seconds for the largest case, positioning it as an attractive middle ground between the fast but less accurate DC model and the precise but computationally intensive AC solution.

## E. Infeasible Models

Many of the models trialed under constrained conditions failed to reach a point of local feasibility. A method for extracting constraint and evaluating its feasibility is to extract JuMP model processed constraints. These have little Resemblance of original constraints due to the optimization techniques involved which simplify constraints for faster processing. Alternatively, the optimized variables can be obtained and used as inputs for existing constraint equations. Using the latter method, contributing factors to the infeasibility of power balance equations and bounding constraints are investigated.

Bounding constraint equations include voltage magnitude limits, power transfer limits, power and reactive power bounds declared by the case file for specific buses. After a thorough evaluation of all bounding constraints, violation magnitudes suggest all discrepancies lie within a fine margin of 35 micro units from the bound edge providing conclusive evidence against any bounding constraint contributions to infeasibility. These findings also suggest the simplicity for bounding constraint optimization for all model types.

Both power balance equations are a key part of the
optimal power flow problem ensuring all power and
reactive power in the system is accounted for. It is
found that for some cases, even small violations to these
equations have a heavy toll on the infeasibility of a
particular solution. Even though most follow this rule,

there are outliers suggesting that even with a reactive
power balance equation mismatch, case39 is still feasible.
To further understand this outlier, an analysis of a greater
range of constraints should be performed to identify
constraints weightings on feasibility.

## F. Discussion

All three approximation methods (quadratic, linear, and logarithmic) have lower cost errors compared to the traditional DC model, as shown in Table II, except in `case1354pegase` and `case_ACTIVISg2000` which are complex grids. In these cases, the quadratic approximation performs the best, having achieved less error in both cost and phase angle.

We find that the quadratic approximation has lower error rates even on large grids. If maintaining phase angles close to their AC OPF values is critical, then quadratic approximation seems to offer some advantage. For `case1354pegase` quadratic approximation has better cost, less phase angle error with minimal changes to the voltage.

A possible extension of this research is to study the quality of these approximations in multi-period setting. A study including both active and reactive power mismatch measures ($x$ for active and $y$ for reactive) might offer more insights.

The limitations of this study are addressed in the next section.

## G. Limitations

The graphs above show how the approximations result a more accurate model compared to the DC model. These graphs were based on entirely optimal calculations; the test cases where the optimizer did not find an optimal solution were excluded. We would like to investigate the cause of these infeasiblities as part of future work. Specifically, we have some evidence that the maximum bus voltage constraints may be the cause. A measure for the feasibility distance as well as approximation techniques that have a higher or lower impact on the feasibility would be highly useful in this case. Having a clear picture of the cost of these infeasible solutions (to make them feasible) would be useful.

As AC contains both active and reactive power, we need to study the error measure with respect to the reactive power, which corresponds to the slack variable when $Q_g$ is fixed.

We have a framework using Julia for evaluation of approximations. In further studies, new approximations can be implemented and tested against existing ones.
We can attempt to use these approximations for multi-period OPF problems. For infeasible cases, a secondary approximation involving a regression approach may be added to reduce the cost, satisfy the constraints and produce a feasible solution.

We are also report the times and variable contributions to model infeasibility. It is demonstrated that the approximations utilise less compute time to solve compared to the AC OPF as is expected. We hope to report on the timing study in the full paper. Furthermore, variable contributions to infeasibility is explored containing some useful information suggesting areas of improvement. specifically, bounding constraints utilising Qg and Vm in the quadratic model unexpectedly surpass expectations set by the AC model introducing possible avenuea for additional exploration. Voltage angle is not explored to the same degree and could provide deeper insight into its implications to infeasibility too.

## V. CONCLUSIONS

In conclusion, the research in this paper shows advances in use of approximation techniques providing compelling arguments for the use of these in an optimal power flow setting. Our approximations highlight the potential for improving accuracy and efficiency in the modeling of power systems.

This paper develops error metrics (for cost, voltage mismatch and phase angle mismatch) which compare the quality of the solutions to the approximations to the OPF. Three different approximations, quadratic, linear and logarithmic, were studied. The benchmark instances in MATPOWER case library were used for the study.

Three approximations showed improved performance in comparison to the DC OPF with respect to the phase angle error. The quadratic approximation performs particularly well with cost error, voltage and angle errors suggesting reliable power flow.

Based on this in depth study, the quadratic approximation is shown to be useful in a large quantity of cases. The improved model performance subject to linear and logarithmic approximations techniques also proves useful in cases of small computation limits where inconsequential trade-offs with respect to accuracy are permitted.

## A. Nomenclature

$P$ = Real Power (active)

$P_g$ = Real Power Generated

$P_d$ = Real Power Demanded

$Q$ = Imaginary Power (reactive)

$Q_g$ = Imaginary Power Generated

$Q_d$ = Imaginary Power Demanded

$v$ = Voltage Magnitude

$\theta$ = Voltage Angle (phase angle)

$B$ = Real Admittance Matrix

$G$ = Imaginary Admittance Matrix

$OF$ = The Objective Function

$OF_P$ = The Objective Function for Power Mismatch

$S^{max}$ = Line Flow Limit

$a, b, c$ = Positive Fuel Coefficients

$P_{g,i}$ = Generating Power of i-th Generator

$x_i, y_i$ = Active and Reactive Power Mismatch

## REFERENCES

[1] S. Chatzivasileiadis, "Lecture Notes on Optimal Power Flow (OPF)," 2018. [Online]. Available: https://arxiv.org/abs/1811.00943

[2] Y. Yang, Z. Wu, Y. Zhang, and H. Wei, "Large-scale opf based on voltage grading and network partition," *CSEE Journal of power and energy systems*, vol. 2, no. 2, pp. 56-61, 2016.

[3] M. B. Cain, R. P. O'neill, A. Castillo et al., "History of optimal power flow and formulations," *Federal Energy Regulatory Commission*, vol. 1, pp. 1-36, 2012.

[4] S. Frank, I. Steponavice, and S. Rebennack, "Optimal power flow: A bibliographic survey i: Formulations and deterministic methods," *Energy systems*, vol. 3, pp. 221-258, 2012.

[5] Z. Yang, H. Zhong, Q. Xia, and C. Kang, "Fundamental review of the opf problem: Challenges, solutions, and state-of-the-art algorithms," *Journal of Energy Engineering*, vol. 144, no. 1, p. 04017075, 2018.

[6] S. Bahrami, V. W. S. Wong, and J. Jatskevich, "Optimal power flow for ac-dc networks," in *2014 IEEE International Conference on Smart Grid Communications (SmartGridComm)*, 2014, pp. 49-54.

[7] M. Starke, L. M. Tolbert, and B. Ozpineci, "Ac vs. dc distribution: A loss comparison," in *2008 IEEE/PES Transmission and Distribution Conference and Exposition*, 2008, pp. 1-7.

[8] P. Van Hentenryck, "Machine learning for optimal power flows," *Tutorials in Operations Research: Emerging Optimization Methods and Modeling Techniques with Applications*, pp. 62-82, 2021.

[9] X. Pan, M. Chen, T. Zhao, and S. H. Low, "Deepopf: A feasibility-optimized deep neural network approach for ac optimal power flow problems," *IEEE Systems Journal*, vol. 17, no. 1, pp. 673-683, 2023.
[10] J. K. Skolfield and A. R. Escobedo, "Operations research in optimal power flow: A guide to recent and emerging methodologies and applications," *European Journal of Operational Research*, vol. 300, no. 2, pp. 387-404, 2022.

[11] Z. Yang, H. Zhong, A. Bose, T. Zheng, Q. Xia, and C. Kang, "A linearized opf model with reactive power and voltage magnitude: A pathway to improve the mw-only dc opf," *IEEE Transactions on Power Systems*, vol. 33, no. 2, pp. 1734-1745, 2018.

[12] H. Zhang, G. T. Heydt, V. Vittal, and J. Quintero, "An improved network model for transmission expansion planning considering reactive power and network losses," *IEEE Transactions on Power Systems*, vol. 28, no. 3, pp. 3471-3479, 2013.

[13] Z. Li, J. Yu, and Q. H. Wu, "Approximate linear power flow using logarithmic transform of voltage magnitudes with reactive power and transmission loss consideration," *IEEE Transactions on Power Systems*, vol. 33, no. 4, pp. 4593-4603, 2018.

[14] C. Coffrin, R. Bent, K. Sundar, Y. Ng, and M. Lubin, "Powermodels.jl: An open-source framework for exploring power flow formulations," in *2018 Power Systems Computation Conference (PSCC)*, June 2018, pp. 1-8.

[15] M. Lubin, O. Dowson, J. Dias Garcia, J. Huchette, B. Legat, and J. P. Vielma, "JuMP 1.0: Recent improvements to a modeling language for mathematical optimization," *Mathematical Programming Computation*, vol. 15, p. 581-589, 2023.

[16] J. Bezanson, A. Edelman, S. Karpinski, and V. B. Shah, "Julia: A fresh approach to numerical computing," *SIAM review*, vol. 59, no. 1, pp. 65-98, 2017. [Online]. Available: https://doi.org/10.1137/141000671

[17] R. D. Zimmerman, C. E. Murillo-Sánchez, and R. J. Thomas, "Matpower: Steady-state operations, planning, and analysis tools for power systems research and education," *IEEE Transactions on Power Systems*, vol. 26, no. 1, pp. 12-19, 2011.

[18] R. D. Zimmerman and C. E. Murillo-Sánchez, "Matpower," may 2024.