Optimal Flexibility Dispatch Problem Using Second-Order Cone Relaxation of AC Power Flows

The limited predictability and controlability of distributed energy resources has resulted in an increasing need for managing the available demand side flexibility from proactive end-users. In this regard, distribution system operators are expected to take a coordinating role in facilitating the utilization of the available flexibility. This paper proposes a novel optimization method to solve the optimal flexibility dispatch problem for a system operator such that it deploys the demand response resource effectively. We use the second-order cone relaxation of the problem to keep the problem convex, tractable and representing electric flows to a high accuracy. The analytical solution to the problem gives the locational pricing of flexibility services. To demonstrate the applicability and scalability of the proposed framework, it is applied to two case studies. We study a stylized 9-bus distribution network and a modified version of the IEEE 30-Bus System. Simulation results are interpreted in economic terms and show the effectiveness of the proposed approach.


A. Motivation and Background
T HE massive integration of distributed energy resources (DERs) is changing the landscape of energy systems. These changes have increased the variability and uncertainty of power systems in the whole energy supply chain [1]. At the distribution level, incidents such as network congestion, due to line overloads or over/under voltage, are becoming normal operation which the distribution system operator (DSO) has to deal with on a daily basis [2]. One solution to tackle the increasing uncertainty and emerging problem(s) is to make use of the inherent flexibility of the system. This can be done by enabling larger involvement Mol, Belgium and also with the EnergyVille, 3600 Genk, Belgium (e-mail: shahob.sh.t@gmail.com; gowri.suryanarayana@vito.be; hanspeter.hoschle@ vito.be; reinhilde.dhulst@vito.be; chris.caerts@vito.be).
D. Van Hertem is with the Research Group ELECTA, Department of Electrical Engineering, KU Leuven, 3000 Leuven, Belgium and also with the EnergyVille, 3600 Genk, Belgium (e-mail: hakan.ergun@kuleuven.be).
Color versions of one or more of the figures in this article are available online at http://ieeexplore.ieee.org.
Digital Object Identifier 10.1109/TPWRS.2019.2929845 of proactive end-users (e.g., Demand Response (DR) providers) to resolve the network operation limit violation in low-voltage grids by implementing demand response (DR) programs [3]. As a result, there is a paradigm shift towards a coordinating role for the system operator (i.e., DSO) in favor of enabling more active engagement of DR providers in scheduling of energy consumption and production in the entire system using Active Network Management (ANM) [4] in the short term (day-ahead and real-time).
In [5], the authors develop an auction-based local energy market in residential areas that enables non-conventional producers such as private households to procure energy they require in case of an unexpected rise in demand or unforeseen outage and from there, to achieve local balancing and cost saving. Likewise, Brusco et al. propose a centralized DR program that aggregates prosumers to minimize the reserve energy flows and to maximize net benefits in a day-ahead energy market [6], [7]. The authors in [8] propose a co-operation based algorithm that seeks network congestion alleviation via local energy exchange. This work is extended in [9] where local energy storage systems are incorporated in the proposed algorithm to resolve network congestion. Weckx et al. introduce a method to implement a voltage management in an unbalanced low voltage distribution grid using voltage sensitivity factors that are determined using historical smart meter data in [10]. Nguyen et al. propose a competitive market clearing platform that operates synchronously with the existing day-ahead (DA) and intra-day (ID) markets that allows the buyers to acquire DR as a commodity and improve the reliability of their systems [11]. Authors in [12] utilize intelligent active and reactive power dispatch of DERs to regulate voltage and manage the overhead line and transformer congestion in the real-time.
A successful implementation of ANM requires the DSO to first, determine the amount of flexibility that it requires to ensure the secure operation of the grid at different time steps. Secondly, to define an adequate price signal that provides incentives for the DR providers to offer their flexibility services (e.g., encourage local consumption in response to excessive rooftop solar production to contain voltage limit violations) [13]. One way to do so is to use Optimal Power Flow (OPF). OPF has been widely used for economic dispatch of constrained transmission systems and study the formation of locational marginal prices in high-voltage transmission systems [14], [15]. This is mostly based on DC power flow which is a linear approximation of the full AC power flow formulation. The approximation can This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ be justified as long as the reactance of the line (X) is much larger than the resistance (R), that is X R. The DC power flow is shows to be acceptably accurate so long as X/R ratio is between 2 and 10 [16]. In distribution networks, OPF has a more 'technical' rather than 'economic' focus for both planning and operation problems. For example, authors in [17] apply OPF to coordinate the scheduling of DERs to improve the hosting capacity of the grid. Likewise, authors in [18] and [19] use OPF to respectively avoid thermal and voltage overloads of assets and to maximize the network-wide energy yield of distributed generation in constrained networks in the real-time.
As understanding the formation of locational prices of flexibility is shown crucial to ensure a successful implementation of ANM [20], [21], our goal here is to investigate the formation of locational flexibility prices in distribution grids. To do that, we use the OPF with an economic focus. In distribution networks, X ≈ R. As a result, the DC OPF is no longer acceptable for studying the power flows in distribution networks. Therefore, non-linearities of power flow ought to be accounted for in the process of analyzing the relation of network congestion, voltage constraints and power flows on the formation of locational prices [20] which is a challenging task [22]. Therefore, there is a need for optimal power flow models that are suitable for distribution networks, and that are computationally tractable, especially for large-scale problems. Recently, convex relaxation methods [23]- [27] have been explored to make the non-convex OPF problems in distribution networks convex and to improve computational efficiency at the expense of introducing a slight inaccuracy in the final solution. In this regard, using the secondorder cone relaxation of the AC power flows [27], [28], Papavasiliou proposes a market-based framework that explicitly accounts for reactive power flows and voltages to solve power flow problem in the distribution network [20]. The problem formulation and the duality analysis carried out on the SOC problem formulation is based on "tree" (as defined in graph theory [29]) which is a common but specific possible configuration for radial distribution networks. As a result, the problem formulation and the duality analysis provided in [20] is limited to tree-like distribution networks.

B. Contributions
In this paper, we propose a novel OPF based optimization framework that solves the optimal flexibility dispatch (OFD) problem for the DSO. One salient feature of the proposed framework is that it accommodates flexibility (as defined in [30]) as the control variable (instead of energy). The OFD problem includes the physics of power flows, generation units and consumer devices. It enables the DSO to implement a successful ANM by determining the quantity and price of active and reactive power flexibility that should be deployed from local resources in a distribution network at every quarter hour on a day-ahead basis such that operational (voltage and flow) limits are not violated. The OFD problem as such is non-convex, nonlinear, complex-valued which are computationally intensive to solve [31].
To make the problem tractable, we use second-order cone (SOC) relaxation of the AC power flow formulation to convexify the OFD problem. The convex-relaxation serves two additional purposes: 1) It enables us to use the Karush Kuhn Tucker (KKT) optimality condition to determine the analytical solution to the OFD problem. By focusing on duality analysis of the OFD problem, we provide some insight on the pricing of flexibility in the distribution network (as investigated for energy trades in distribution networks in [32]- [34]). 2) It guarantees uniqueness of the solution of the flexibility dispatch problem and the resulted prices. We will show that the proposed OFD framework results in the so-called 'locational flexibility prices' (LFPs) which are unique locational marginal prices associated with the flexibility services at every bus. Note that these advantages come at a cost, which is the loss of accuracy.

C. Outline of the Paper
The rest of this paper is organized as follows. Section II presents the mathematical formulation of the OFD problem and provides the analytical solution. Section III presents the numerical results and demonstrates the effectiveness of the proposed framework. Section IV concludes the paper and presents future work.

II. OPTIMAL FLEXIBILITY DISPATCH PROBLEM FORMULATION
This section presents a formulation of the OFD problem.

A. System Reduction
The main goal of the proposed framework is to enable the DSO to coordinate the consumption pattern of consumers on a DA basis. The DSO's success in determining the correct amount of flexibility it needs is strongly affected by the accuracy of load consumption and DER production forecasts. However, it is difficult to obtain accurate forecasts owing to the volatile nature of household needs and weather conditions [35], [36]. Hence, it is for the DSO to track the flexibility activation to compensate for forecasting errors and other deviations during real-time operation.
One solution to the above mentioned problem is to approximate the distribution grid under study by a given number of clusters [35]. The reason for this is manifold. Firstly, the violation of operation limits in the network mostly happen at specific points in the grid (so-called weak network points). Thus, once the weak points are identified, one can aggregate every group of connected buses (and house holds connected to them) into clusters. Each cluster can then be assumed to function as a copper plate. This reduces the size of the problem to a number of incident free clusters that are connected to weak points (i.e., the location in the grid where an incident may happen). Secondly, forecasting loads at an aggregated level leads to better accuracies due to averaging effects [36], [37]. Thirdly, as every cluster of units is considered as a copper plate, if a DR unit within the cluster cannot stick to the schedule, there is still a room left for the other DR units within the cluster to compensate such that, the total flexibility the cluster delivers to the DSO remains the same. This creates opportunity for the DR units to maximize their utilization and at the same time, simplifies the problem for the DSO.
Note that the system reduction as proposed should be considered as one way to reduce forecasting error. However, one can assume a lower aggregation level, even as low as household level. In that case, every cluster is made of only one household. Then each consumer could freely choose an aggregator to the market. That is of course possible only if the aggregator can determine an accurate forecast of the load profile despite such a low aggregation level. Note that, the proposed flexibility dispatch framework remains valid regardless of the aggregation levels considered as long as the physical characteristics of the lines connecting every two clusters is adequately accounted for in the OFD problem formulation.
Moreover, that once the system is reduced to clusters, the information regarding bus voltage levels within every cluster is lost. This can be acceptable only if one can ensure that the voltage limits of buses belonging to a same cluster are always fulfilled.
A key assumption is that the weak points of the network remain at the same location. To determine the weak points of the network the DSO needs to calculate the power flows of the branches and voltage of different buses. Once branch flows and bus voltages are calculated, the DSO can reduce the system to a number of congestion free clusters. The DSO can do so by performing power flow (PF) analysis using the aggregated base energy consumption profile of households and the base production of DERs. As a result, weak points might vary under different energy consumption and production scenarios. Therefore, in a practical case, the weak points should be revised under changing consumption/production scenarios. However, there is a trade-off between changing the weak points for every new load/generation scenarios, and considering a more conservative assumptions regarding the thresholds based on which system is reduced and weak points are defined. This trade-off and the associated consequences for the DSO as well as flexibility providers is beyond the scope of this work, but should be the subject of future research.

B. Assumptions
Consider a reduced distribution grids comprising of several clusters. We assume that each cluster comprises of flexible and non-flexible supply and demand units. Every cluster is operated by an aggregator that steers the controllable supply and demand devices of every household within the cluster. The aggregator collects the base energy profile and the flexibility offers from the household agents, aggregates them and provides the aggregated base active and reactive supply (i.e., generation) . Superscripts g and d respectively correspond to generation and demand. We assume that every cluster is connected to an unique bus in the distribution grid under study. We denote active and reactive power by p and q respectively. Index i ∈ Ω N is used to refer to every bus in the system. Index t ∈ Ω t is used to refer to every instance in time. Ω N and Ω t are respectively the set of all buses and all operating instances. The aggregator also provides the upper and lower bound of active and reactive flexibility ( offers to the DSO at every t ∈ Ω t . We define Ω G i and Ω D i respectively to present the set of generators and loads of cluster i. Ω G DERs i denotes the set of DERs in cluster i. Set Ω E and Ω E r denote respectively the set of from edges and to edges. We use the π− element grid model [38].
We assume that the DSO aims to minimize the cost of curtailing the production of DERs in distribution grids such that operational limits are not violated. The output of the model includes the amount of flexibility to be utilized from every cluster

C. Overview of Convex-Relaxation Techniques of AC-OPF
Multiple relaxation models have been discussed for AC optimal power flows. There are three main relaxation models presented in the literature: second-order cone (SOC) relaxation, semi-definite programming (SDP) relaxation and quadratic convex (QP) relaxation.
Based on the principles of second-order cone programming (SOCP), references [39]- [42] presented the second-order convex relax formulation of an AC-OPF for radial and meshed networks using branch-flow models. Compared to SOC, SDP generally requires more computation time [43], [44]. SDP relaxation is exact in only limited types of problems. Moreover, efficient algorithms for solving SDP-based problems are to be further investigated. QC relaxation is another relaxation technique that is been widely investigated in the literature.
Reference [25] provides a detailed analysis of the three models and outlines the relationship between their feasible regions. It shows that, in terms of exactness, SDP and QC relaxation can provide tighter (but not equivalent) relaxations than SOC and therefore, can provide more accurate results, however with reduced efficiency (i.e., running at a lower computational speed). Regarding the computation time, SOC and QC are shown to be faster and leads more reliably to a solution compared to SDP. Note that in case of non-exactness for all models except SOC, the solution can rarely have physical interpretation. The interpretation of the results for the SOC model is further analyzed in Sections III-D and III-E.
Eventually, Yuan et al. [45] showed that the performance of SOC model can be improved by eliminating the original assumptions of a SOC model based on three approximation techniques. These models are under refinement and investigation.
Note that there are two main formulations of power flow equations in the literature namely, bus injection models (BIMs) and branch flow models (BFMs) [39]. Authors in [46], [47] raise observations regarding misinterpretation of the physical network model related to the current flow limit constraints and non-exactness of the SOC BFM in practice. References [48] and [31] provide an extensive overview on the theoretical properties of BIMs and BFMs for AC and DC grids. They mention that for radial networks, the SOC BIM formulations provide the tightest convex relaxation. As a result, given the radial nature of the distribution network and limitations of the SOC BFM formulation, in the context of this work, we deploy the SOC BIM formulation to develop the OFD problem.

D. Second-Order Cone-Relaxed Formulation of OFD
The SOC formulation of the problem takes the following form: where g sh i and b sh i denote the shunt conductance and admittances at bus i ∈ Ω N . Likewise, g s i,j and b s i,j denote the series conductance and admittance of the cable connecting buses i and j.
is the set of independent optimization decision variables. τ DER cur €cent/kWh is the fixed tariff of curtailing DERs. The Greek letters to the left of the constraints indicate the associated Lagrangian dual variables. In the formulation above we have: Here tr i,j = |T i,j | × cos(θ tr i,j ), ti i,j = |T i,j | × sin(θ tr i,j ), and tm i,j = |T i,j | 2 where T i,j is the tap ratio and θ tr i,j is the angle shift of the transformer as discussed in [25], [49]. v i,t , v i,t are upper and lower bounds of bus voltage respectively. θ i,j,t denotes phase angle difference between two buses. Equation (1) defines the objective of the DSO which is to minimize the cost of curtailing the production of distributed energy resources. Equations (2)-(4) define respectively the lower and upper bounds of the squared voltage magnitude and bus-paired voltage products. Constraint (5) corresponds to relaxation of the power flow equation as is derived in [49]. Constraints (6)-(7) enforce lower and upper limits over active and reactive flexibility generation and load. Likewise, constraints (8)-(9) enforce lower and upper limits over active and reactive power generation and load. Constraints (10)-(13) capture Ohm's law defining active and reactive power flow on both directions of each line (i, j). Constraints (14)-(15) enforce active and reactive power line flow limits.
Problem (1)- (17) is a nonlinear and convex optimization problem that is applicable to distribution networks with radial and meshed topologies. It determines the optimal flexibility dispatch schedule such that it minimizes the curtailment of DERs while keeping the distribution grid congestion free.

E. Analytical Solution
The Karush-Kuhn-Tucker (KKT) optimality conditions state that any solution in the search space that satisfies the stationarity condition of the Lagrangian function with respect to the decision variables is the global solution to the problem (1)- (17). Taking the derivative of the Lagrangian function with respect to decision variables yields: j) ∈ Ω E . Note that due to limited space, we only provide the derivation that we need to provide an economic insight on formation of locational flexibility prices.

F. Pricing Mechanism for Approximated Power Flow
From the analytical solution provided above one can observe that it is not straightforward to provide a meaningful interpretation for all the multipliers and the derivations. In what follows, we try to derive insight regarding the formation of flexibility prices and flexibility quantities to be traded.   (25) states that if a DER is producing within its capacity (active power capacity and/or flexibility capacity) then the locational marginal price of flexibility at the bus (i.e., λ p i,t as defined in (45)) equals the fixed tariff of curtailing. However, if the marginal flexibility prices are different in either directions, it implies that the DERs are producing at their limits (thus either   (34) and (37)- (38)) and reactive flexibility services provided from DERs (from equation (27) Figure 1 presents a 9-bus stylized radial system with eight branches. There are five buses (2,3,4,7,8) with DERs. There are also three buses (5,6,9) with flexible-load resources. We assume that each flexible bus comprises of a cluster of six flexible houses. For each household, we consider several scenarios regarding active power load flexibility, ranging from a case with load flexibility of 5 kW, to a case with maximum load flexibility  Table I and Table II provide parameters of the grid and generators respectively.

B. Assumptions
The following assumptions are made: 1) A fixed tariff of curtailing DERs is used τ DER cur = 10 €cent/kWh (a fixed value throughout the operation horizon). 2) Each household is controlled by a building agent. The building agent responds to command signals it receives from the respective aggregator.
3) The aggregator provides the upper and the lower bounds for active and reactive power and flexibility to the DSO. The aggregator is assumed to have adequately accurate forecast of these values. 4) A constant installed DER capacity is assumed.

C. Simulation Results
To assess the possible impact of flexibility activation in buildings, we set up the following experiment. The amount of flexibility offered by the flexible load is varied, ranging from 5 kW to 30 kW (15 kW to 90 kW in total for the three clusters) with increments of 5 kW per scenario, both in upward and downward direction. To demonstrate the effect of the convexrelaxation technique on the accuracy of the results, we present the total curtailment of the various renewable energy resources determined by solving the OFD problem using two models of formulating the AC power flows: the nonlinear formulation (blue bars) and the SOC formulation (red bars), for different levels of flexibility offered from the aggregators. Figure 2 shows that the results of OFD using the nonlinear model can be different from the results of the SOC model. The difference is more significant in scenarios with flexibility scarcity (i.e., 15 kW and 30 kW scenarios). One can see that the DER production profiles determined for the nonlinear AC follow a more-or-less similar pattern in which the production progressively increases (and so the curtailment progressively decreases) as the level of flexibility offered increases. We observe that the DER production increases from being a little over 200 kWh (with 15 kW flexible load scenario) to 300 kWh (90 kW flexible load  . We thus demonstrate that the local curtailment can be controlled and reduced with increase in the flexibility offered. Now consider the results obtained using the SOC model. The DER production calculated here is drastically different than of the nonlinear AC based formulation for 15 kW and 30 kW flexible load scenarios. However, the results of the two models converge as we move towards scenarios with more flexible loads. This is due to fact that the model for low-flexibility cases, the model obtains solutions with a higher relaxation error. That is, when flexibility is limited (i.e., for 15 kW and 30 kW flexible load scenarios), the model tends to obtain solutions with a higher relaxation error for which, the model can artificially increase the DER production to meet the artificially higher losses over the lines. This issue is further discussed in Subsection III-D. One observes that for scenarios with load flexibility above 45 kW, the results of the SOC model converge to of the nonlinear model and observes a similar trend; that is, DER production increases as the level of flexibility increases. Table III presents the computational time for solving the OFD problem using the nonlinear as well as the SOC formulations of AC power flows with two different solvers: IPOPT [50] and ECOS [51]. One can see that solving the nonlinear AC formulation of the OFD problem using the IPOPT solver takes on average 2.28 seconds which is longer than computational time of solving OFD using SOC formulation with IPOPT that takes 0.95 seconds (2.4 times faster than when the nonlinear formulation is used) and solving the OFD using the SOC formulation with ECOS solver that takes 0.03 seconds (i.e., 76 times faster than when  the nonlinear formulation is used). Note that all simulations were implemented in Julia-JuMP [52]. The computer used ran Windows 10 64-bit with an Intel Core i5-6300 quad-core processors clocking at 2.40 GHz and 8-GB memory. Table IV and Table V present the average, maximum and minimum LFPs for different buses that are calculated using the nonlinear formulation and the SOC formulation of the AC power flows, respectively. One can see that the LFPs calculated using the two models are different. Starting with the nonlinear model, one can see that LFPs for buses 2, 4, 8 and 9 are relatively small compared to of buses 3, 5, 6 and 7. Buses 5, 6 and 9 are load buses but are different from each other. One can see that LFP of bus 9 is always negative. A negative flexibility price implies that the DSO pays consumer an amount equal to LFP for every kWh flexibility they provide to encourages them to increase their energy consumption to minimize the RES curtailment in the whole system. This effect can be seen in Table VI which presents the total flexibility sourced from different buses. One can see that the flexibility sourced from bus 9 is positive. Subsequently, a positive price at buses 5 and 6 implies that the consumers have to pay if they want to increase their energy consumption. This would incentivize consumers to provide flexibility by reducing their energy consumption. One can see in Table VI that flexibility sourced from bus 5 and 6 are negative. Now consider the generation buses (i.e., buses 2, 3, 4, 7 and 8). Except for scenarios with flexibility scarcity, one can see that the local flexibility prices and flexibility magnitudes are relatively small in buses 2, 4 and 8 and are therefore not discussed any further. One can also see that the LFPs at bus 7 are absolutely positive. A positive LFP implies that a DER will be paid to increase its production. That is, the DSO pays DER provider at bus 7 to maximize their production. Note that the DSO's payment to DERs is always less than or equal to the curtailment tariff set by the regulators (τ DER cur in equation 1). This make sense as otherwise, the DSO would prefer to pay the curtailment charges.
Bus 3 is also a generation bus but it is different from bus 7 in that, the LFP at this bus takes both positive and negative values especially when flexibility is scarce (in scenarios 15 kW and 30 kW). In these scenarios, the flexibility price at bus 3 is more negative than positive. A negative price at bus 3 incentivizes DERs to provide flexibility by reducing their production. That is, the DSO encourage the DER provider at bus 3 to reduce their production to create greater hosting capacity for DER at the system level and to steer the DER curtailment to a minimum.
This effect can be seen in Table VI which presents the total flexibility sourced from every bus. One can see that the flexibility of bus 3 increases as the amount of available flexibility increases. One can also see that the flexibility profiles follow a similar pattern for scenarios with 45, 60 and 90 kW flexibility (in which the LFPs are always positive). Also note that the flexibility profile for scenario with flexibility scarcity is drastically different than others. Table VI shows that for scenarios with load flexibility above 45 kW, the results of the OFD problem when nonlinear power flow model is used is very close to the results of the OFD problem when the SOC model is used, except for bus 6 and bus 9. Thus, the same reasoning that is provided for explaining the results of the nonlinear model, holds true for the results of  Table VII which shows the average relaxation error calculated for every branch. The relaxation error (i.e., slack on the convexification) is defined as the difference between the left and right hand side of equation (5):

D. Relaxation Error
= 0 then the results have a meaningful physical interpretation that coincides with Kirchhoff's law. Otherwise, if P F convex ij = 0 then the results are not physically interpretable. Slack on convexification can be interpreted as artificially increased active and reactive power losses over the lines.
Our first observation is that the relaxation error is quite similar for scenarios with 45, 60 and 90 kW flexible load and is different than of 15 kW and 30 kW flexible load scenarios. Now let us zoom into the relaxation error induced for every branch. One can see a large relaxation error in branch 6 (connecting bus 4 and bus 5) in all scenarios. The large error can be associated to the large resistance of the branch. Now looking at branch 7 and 8, one can see a large relaxation error in scenarios with flexibility scarcity (i.e., 15 kW and 30 kW scenarios). The relaxation error is relatively small in scenarios with load flexibility above 45 kW. The improvement error can be associated to the higher level of flexibility that is available in scenarios with load flexibility above 45 kW. Lastly, one observes a small relaxation error in branch 5 in scenarios with flexibility above 45 kW which can be explained by numerical inaccuracies.

E. Relaxation Error Versus Simulation Time
We observe that the difference between the results of the two versions of the model can be huge when flexibility is scarce. However, one can argue that the SOC model is still relevant as, in real time applications and for much larger real life grids, nonlinear problems can be intractable, whereas SOC are. This leads to a trade-off between accuracy and tractability and requires further investigation.
To further investigate the impact of the relaxation error, and also to better illustrate the difference between the performance of the SOC formulation with respect to the AC formulation, we investigate the OFD problem for the standard IEEE benchmark system with 30 buses. To make the results comparable with of the previous case, we modified the 30-bus system as follows. We assume buses 5, 6, 9, 10, 15 , 16, 19, 20, 25, 26, 29, 30 are  TABLE VIII  THE SIMULATION RUN TIME OF SOLVING OFD PROBLEM FOR THE MODIFIED  IEEE STANDARD 30-BUS SYSTEM WHEN SOC FORMULATION IS USED  VERSUS THE CASE WHERE FULL AC POWER FLOW IS USED with flexible load resources and the rest are with DERs. We consider similar scenarios regarding active and reactive power load flexibility as for the stylized 9-bus system presented above. Finally, as the the original 30-bus system is defined for transmission system studies, a number of branches are assumed to have zero series resistance and shunt susceptance. Therefore, for lines where series resistance and shunt susceptance are missing, we consider a value relative to the branch's series inductance as it is observed in practical cases. Table VIII presents the computational time for solving the OFD problem using the nonlinear as well as the SOC formulations of AC power flows with two different solvers. One observes that solving the SOC problem using the ECOS model is faster than solving the SOC formulation with the IPOPT (44 times faster), and is substantially faster than solving the AC formulation (142 times faster). Compared with the 9-bus case (see Table III), one observes that computation time of the non-linear formulation increases with the size of the grid. Consequently, one can assume that SOC brings a significant computational advantage for larger systems.
Finally, to compare the relaxation errors in the two cases, for every scenario, we took the average relaxation error over all branches. We observe that relaxation errors are in the similar order of magnitude. Note that, due to the large number of branches in the 30-bus case, we do not include an anlysis of the relaxation error on individual branch basis in this paper.

IV. CONCLUSION
In this paper we introduce the OFD problem as an optimization framework that determines the amount of flexibility the DSO needs to procure from the active power flexibility providers to minimize the curtailment of DERs while keeping the distribution grid congestion free. The proposed framework is applicable regardless of the topology of the network. Although the analytical discussion and the result provided here correspond to a specific objective for the DSO (i.e., curtailment minimization), the proposed model and analytical discussion is entirely general and can be applied when considering other objectives for the DSO as long as the objective function remains linear.
The duality analysis provides insight on the formation of flexibility prices in the distribution networks. We observe that the LFP can be both positive and negative depending on the available flexibility and whether a bus under study is load bus or generation bus. A key concern here is, the way the problem is formulated, there is no price cap on LFP on the negative side. That means, as a result of running the problem as such, the DSO may end up paying large fees (way above the curtailment fee) to the flexible consumers to deploy their flexibility (i.e., increase their energy consumption). Note that the payment of the DSO to the DER provider does not exceed the curtailment tariff set by the regulator.
To show the applicability of the proposed approach, we compare the results with the case where the nonlinear, non-convex formulation of AC power flow is used. Our results show the strong relation between the amount of active power flexibility that is available and the DERs production; there was a increase in production with increase in flexibility.
One important observation is that, solving the OFD problem using the SOC model is considerably faster than solving it using the nonlinear AC model. We observe that applying the SOC convex-relaxation induces an error in the final solutions of the stylized case studies we investigated here. Note that investigating the relaxation error is more challenging for large scale problems, due to computation complexities. Note that the convex-relaxed solution provides a lower bound for the optimum of the original minimization problem. Therefore, assuming that the relaxation error is small, one can consider the optimal solution to the convex relaxed problem as a best guess to initialize the solver for the original problem when studying large problems in real-world.
Considering the simulation run time and accuracy, one can see that the SOC formulation of the OFD problem can increase the simulation efficiency if the flexibility boundaries are not set too tight. This is specially important in large-scale problems due to tractability issues.
In the future, we will investigate ways to solve the OFD problem while minimizing the relaxation error. In addition, it would be interesting the investigate the results of the OFD problem when other relaxation techniques (e.g., SDP) are used.