A Second-Order Cone Programming Reformulation of the Economic Dispatch Problem of BESS for Apparent Power Compensation in AC Distribution Networks

The problem associated with economic dispatch of battery energy storage systems (BESSs) in alternating current (AC) distribution networks is addressed in this paper through convex optimization. The exact nonlinear programming model that represents the economic dispatch problem is transformed into a second-order cone programming (SOCP) model, thereby guaranteeing the global optimal solution-finding due to the conic (i.e., convex) structure of the solution space. The proposed economic dispatch model of the BESS considers the possibility of injecting/absorbing active and reactive power, in turn, enabling the dynamical apparent power compensation in the distribution network. A basic control design based on passivity-based control theory is introduced in order to show the possibility of independently controlling both powers (i.e., active and reactive). The computational validation of the proposed SOCP model in a medium-voltage test feeder composed of 33 nodes demonstrates the efficiency of convex optimization for solving nonlinear programming models via conic approximations. All numerical validations have been carried out in the general algebraic modeling system.


Introduction
One of the systems utilized for the purpose of improving the operation of alternative current (AC) distribution networks is battery energy storage systems (BESSs), since they generate some benefits in the networks [1,2], such as reducing losses in the electrical network, lessening operating costs, improving voltage profiles, and compensating power oscillations generated by the high variability of wind speed and solar radiation from renewable energy sources [3][4][5]. Hence, the operation of BESSs has a significant impact on the performance of the AC distribution network since their inadequate operation can cause and operation of BESSs in AC distribution networks. Nevertheless, BESSs were operated in a discrete form that decreased their impact on the performance of the AC distribution network. Furthermore, renewable energy sources were considered in this methodology. In [27], an optimal programming approach for BESSs, which took into account the converter's active and reactive power capabilities, was presented. This approach used a linearization for load flow analysis, which led to errors in the calculation of the voltage profile and power losses. In addition, this approach did not consider renewable energy sources in its analysis. In [28], a flexible economic dispatch strategy was designed for the BESS under day-ahead environments. For renewable power generation forecasting, an artificial neural network was employed. However, the economic dispatch strategy was focused on a unique nodal, which limits its analysis. Furthermore, the possibility of dispatching reactive energy was not considered. In [29], a peak-shaving service approach for BESSs in AC distribution networks was proposed. This approach, however, only analyzed a unique nodal dispatch. In [15], an economic-dispatch model for optimal operation of BESS, considering the reactive power capabilities, was proposed.
Unlike these previous works, we propose a second-order cone programming (SOCP) model for addressing the economic dispatch problem of the BESS, considering the apparent power compensating capabilities (i.e., active and reactive power dispatch independently). The SOCP model transforms the nonlinear nonconvex economic dispatch problem into a convex problem, ensuring the global optimum for the economic dispatch problem. The main contributions of this proposal are summarized below: (a) The convex reformulation of the classical and well-known economic dispatch problem via conic programming by applying the hyperbolic relaxation of the power balance equations, which has not previously reported in the literature pertaining to economic dispatch analyses in AC distribution networks; (b) The validation of the positive impacts that have the usage of the apparent power capabilities in batteries to reduce the energy purchasing costs in conventional sources, which allows additional improvements of about 2% when it comes to classical unity power factor scenarios for the operation of BESSs.
It is important to mention that the numerical results reported in this research, in general, coincide with the large-scale nonlinear solvers available in the GAMS software. However, the nonlinear nonconvex structure of the original NLP model affects the processing time behaviors of these solvers, and there does not exist a theoretical guarantee of reaching the global optimum unlike the case of the proposed SOCP reformulation addressed in this paper, which corresponds indeed with the main contribution of this research work.
The remainder of this study is organized as follows: Section 2 presents the original NLP programming formulation for operating batteries in AC distribution networks, considering the apparent power support capabilities. Section 3 reports the SOCP reformulation of the economic dispatch problem in AC distribution networks considering BESSs with active and reactive power compensation capabilities. This reformulation is based on the hyperbolic relaxation of the product between two variables. Section 4 presents the possibility of controlling the active and reactive power in three-phase distribution networks with batteries interfaced with voltage source converters via passivity-based control theory. Section 5 presents the main characteristics of the distribution test feeder, which is composed of 33 nodes and 32 lines, contains four renewable generators and three BESSs, and is operated at medium-voltage levels with 12.66 kV. Section 6 presents all the computational validations of the proposed SOCP model for optimal operation of BESSs systems in the 33-node test feeder considering the unity and variable power factor in batteries and variations in the renewable generation penetration. Section 7 presents the main conclusions derived from this work and some possible future research based on the SOCP optimization model studied in this paper.

Nonlinear Programming Formulation
The optimal operation of battery energy storage systems in AC distribution networks corresponds to a nonlinear programming optimization model with continuous variables in terms of voltage profiles, power generations, or states-of-charges. The typical objective function is the minimization of the energy purchase cost in the conventional sources (i.e., substations or diesel generators), subject to power balance equations, states-of-charge in batteries, voltage regulation bounds, and power generation capabilities, among others. The complete mathematical formulation of the optimal operation of battery energy storage systems in AC distribution networks considering reactive power capabilities was presented in [15].

Objective Function
The objective function of the problem of the economic dispatch operation of BESSs and AC grids with high penetration of renewable energy resources is typically an economic aspect. In this study, we consider minimizing the spot market's energy purchase, where the utility company participates. The objective function of this problem corresponds with a linear expression as a power generation function in conventional sources.
where E cost is the objective function value; c gc i,t and p gc i,t represent, respectively, the cost of the power generation and the power output in a conventional generator installed at node i in the period of time t; and ∆T is the fraction of time under analysis, which, in economic dispatch analysis for distribution networks, can be 0.25 h, 0.50 h, and 1 h. However, the selection of this length of the period of time depends on the available information regarding power consumption and renewable generation. T and N gc correspond to the number of periods considered in the day-ahead economic dispatch and the amount of conventional generators inside of the distribution network, respectively.

Set of Constraints
The most classical constraints in power system analysis regarding distribution networks correspond to power balance equations, which evaluates the second Tellegens' theorem at each node regarding active and reactive injections at node i in the period of time t. In addition, we add the classical voltage regulation constraint that deals with the operative limits of the voltage profile in AC distribution grids. These constraints take the following structure: where p gc i,t and q gc i,t correspond to the active and reactive power outputs in the conventional power sources connected at node i at the period of time t. p gd i,t and q gd i,t respectively represent the active and reactive power outputs of the distributed generators connected to node i at the period of time t; p b i,t and q b i,t are, respectively, the active and reactive power injections/consumption of the batteries energy storage devices connected at node i in the period of time t; p d i,t and q d i,t are the active and reactive power consumption at node i at time t, respectively; v i,t and θ i,t are the voltage magnitude and angle of the voltage profile at node i at the period t; Y ij and δ ij correspond to the admittance magnitude and angle that relates nodes i and j; and v min i and v max i are, respectively, the minimum and maximum voltage limits allowed for the voltage profile at each node at each period of time.
In order to study the economic dispatch problem in AC distribution networks in the presence of battery energy storage systems including reactive power capabilities as well as renewable generation sources, the following constraints must be added to the mathematical optimization model: where soc b i,t is the state-of-charge of the energy storage device connected at node i at the time t; ϕ b i is the efficiency of the charging/discharging performance of the battery at node i (this corresponds to the most basic linear model for operating batteries initially reported in [30] The complete interpretation of the mathematical Equations (1)-(9) for the problem of the economic dispatch of the BESS in distribution networks is as follows: Equation (1) defines the objective function calculation for the total energy purchase costs of energy in conventional power sources (i.e., spot electricity market) for a day of operation of the distribution system. Equations (2) and (3) define the active and reactive power balance equilibrium at each node, which corresponds with Kirchhoff's laws in the form of power. Box-type constraint (4) defines the region of the admissibility of the voltage profiles. This constraint is typically known as the voltage regulation constraint in scientific literature. Equation (5) defines the linear relation between the BESS charging/discharging coefficient with the state-of-charge and the amount of power absorbed from/injected into the grid at each period of time. The inequality constraint (6) defines the power triangle of powers, i.e., active, reactive, and apparent, which must be satisfied at each time by the BESS system in order to ensure the correct operation of the power electronic converters that interface them to the power grid. Box-type constraints (7)-(9) determine the admissible region for active power in batteries as well as their states-of-charge and the amount of power available in the renewable energy resources, respectively. Remark 1. The mathematical model that represents the economic dispatch problem of the BESS in AC distribution networks (see the model (1)-(9)) is nonlinear and nonconvex due to the active and reactive power balance constraints defined in (2) and (3); this complicates the finding of the global optimal solution due to the nonconvexities of the solution space [31]. However, this model can be convexified via SOCP reformulation in the complex domain. This will be presented in the next section.
It is essential to highlight that the inequality constraint (6) is nonlinear but convex, since it corresponds to the circle of powers where its border and inside are free of holes [32].

Second-Order Cone Programming Reformulation
The SOCP programming is a branch of the convex optimization that deals with a class of optimization problems with conic structures that can be solved efficiently via interior point methods [33]. The main idea of reformulating the economic dispatch optimization problem into a SOCP equivalent is to rewrite the power balance constraints (2) and (3) into a linear equivalent via hyperbolic relaxations [34]. In order to do so, let us rewrite these power balance equations in their complex form: corresponds to the apparent power generation in the renewable energy resources; is the apparent power injection/absorption in the batteries; S d i,t = p d i,t + jq d i,t represents the apparent power consumption in load nodes; V i,t is the complex voltage profile, with (·) being the complex conjugate operation of the argument; and Y ij is the complex admittance component that relates nodes i and j, respectively.
In order to transform the complex apparent power balance constraint (10) into a linear convex restriction, let us define the following auxiliary variable: Note that, from (11), we can define U ii,t = V i,t 2 and U jj,t = V jj,t 2 , which implies that if we elevate Equation (10) in both sides at square, then we have The structure of Equation (12), which corresponds to the product between two auxiliary variables on the right-hand side, can be rewritten as recommended in [35], through its hyperbolic representation, as follows: Note that Equation (13) is still nonconvex due to the equality symbol; however, as recommended in [35], it is possible to relax this expression by changing the equality symbol with a lower-equal one, which allows for the translation of this equation into a conic-convex constraint: In order to complete the SOCP programming reformulation of apparent power balance constraints, let us substitute Expression (11) into (10), which produces This can be split into its real and imaginary part as follows (U ij,t = U r ij,t + jU i ij,t ): In addition, the voltage regulation constraint (4) can be redefined as a function of the auxiliary variables in the following manner: Finally, the inequality constraint (6) can be rewritten using the conic form as presented below: Remark 2. After the convexification of the power balance constraints, the SOCP model that represents the economic dispatch problem of the batteries in the AC distribution systems considering apparent power compensation and high penetration of renewables is defined by the set of Equations (1), (5), (7)-(9), (14), and (16)- (19), respectively.

Dynamic Active and Reactive Power Control
In order to demonstrate the possibility of controlling the active and reactive power of a form independent considering a BESS connected to an electrical AC distribution network, consider the interconnection of this battery via a voltage source converter (VSC) as depicted in Figure 1. For the purpose of reaching the dynamical model of the BESS connected to the distribution network, we apply the second Kirchhoff's law on the AC side, which produces in the Park reference frame the following expressions [36]: where l and r are the parameters of the resistive-inductive (RL) filter, i d and i q correspond to the currents flowing through the filter in the dq-reference frame, m d and m q represent the average the modulation indexes, v d and v q are the voltages of the AC network, and ω corresponds to the angular frequency of the grid voltages.
Note that, if we consider balanced operative conditions in the AC distribution network, the dynamical model (20) can be transformed into a model with active and reactive power variables, i.e., p and q, by considering that, under balanced grid voltage conditions, v q = 0, which implies that Now, if (20) is substituted in (21) and we make some algebraic operations, we find the following result: where v = v b v d . Additionally, the direct power model (22) can be expressed as a port-Hamiltonian system with the following structure: where D is known as the inertia matrix by its similitude with mechanical systems, J represents the interconnection matrix that is skew-symmetric, R is the damping matrix being positive semi-definite, H (x) is the Hamiltonian function, G represents the input matrix, ζ constitutes the vector of external perturbations, and x and u correspond to the state variables and control inputs, respectively. Note that each term in (23) is defined as follows: Observe that the Hamiltonian function H (x) is a positive definite function with a hyperboloidal structure, which can be used to explore the stability properties of the dynamical model (23).

Remark 3.
The control of the Hamiltonian model that represents the connection of a battery package to the AC grid via a voltage source converter can be made via the passivity-based control theory as demonstrated [37], guaranteeing global asymptotic convergence properties in the sense of Lyapunov [38]. The control laws developed via the passivity-based theory for active and reactive power independent control are presented below [38]: where the complete control laws are m d =m d + m d and m q =m q + m q [39]. Note that k p1 , k p2 , k i1 , and k i2 are the proportional and integral gains with a must-be positive definite.
In order to demonstrate the fact that the passivity-based control design can independently control active and reactive power, consider the BESS and filter parameters reported in Table 1. In addition, we consider that the battery charges with 7 kW between 0 ms and 150 ms; then, this battery is operated in repose (150 ms and 250 ms). Finally, it discharges with 6 kW after 250 ms, while the reactive power is defined to be 5 kVAr while t ≤ 200 ms, and −6 kVAR otherwise in the dq−reference frame. The performance of the passivity-based controller is reported in Figure 2. Regarding battery parametrization, it was assumed that it operates with 390 V as nominal voltage, a current rate capability of about 0.75 Ah, and an initial state-of-charge of about 45 %. All of these parameters have been taken from [40].
From Figure 2, we can observe that the active and reactive power can be controlled independently in four quadrants with step-responses of about 15 ms (see Figure 2b). In addition, the three-phase currents present a phase inversion at t = 200 ms since, at this moment, the active power is zero and the reactive power passes from a positive to a negative value. For this simulation case, the maximum THD is 4.40% for the period comprehended between 150 ms and 200 ms; nevertheless, this THD is in the international range standards and fulfills grid-code requirements. It is worth mentioning that, as presented in Figure 2a, the state-of-charge of the battery energy storage system is only dependent on the amount of active power interchanged with the AC grid (compare with Figure 2b), since we observe that, when p < 0, the soc increases, when p = 0, the soc is constant and, when p > 0, the soc decreases. These behaviors are especially important when batteries are incorporated into the AC grid, as it is possible to support active and reactive power in four quadrants by adequately controlling the VSC that interfaces the battery package.

Remark 4.
Note that the capability of using a BESS to control active and reactive power independently is exploited in this research as proposed in [15] with the main advantage that the complete optimization model has a convex structure that allows ensuring the optimum global.

Test Systems
In order to validate the proposed SOCP model for optimal operation of battery energy storage systems in AC distribution networks using a day-ahead economic dispatch approach, we consider two test distribution test feeders composed of 33 and 69 nodes, respectively, both with radial topology. The information regarding these test feeders has been taken from [15].

33-Node Test Feeder
This is a radial test system composed of 33 nodes and 32 lines, which operates with a unique substation with a voltage profile of 12.66 kV. The total demand at the peak hour for this test system is 3715 kW and 2300 kVAr. Figure 3 depicts the electrical interconnection among all the nodes, and Table 2 presents the relevant information from left to right as follows: sending node, receiving node, resistance, reactance of the line, and active and reactive power consumed at the receiving node.

69-Node Test Feeder
This test feeder is composed of 69 nodes and 68 branches, with an operative voltage of 12.66 kV at the substation, which is located at node 1. The amounts of active and reactive power consumption in this test feeder are 3890.7 kW and 2693.6 kVAr, respectively. The electrical configuration of this test feeder regarding nodal connections is presented in Figure 4. In addition, all the branches and nodal information regarding active and reactive power are reported in Table 3, where columns have the same interpretation of the 33-node test system.   Node i Node j R ij (Ω) X ij (Ω) P j (kW) Q j (kW) Node i Node j R ij (Ω) X ij (Ω) P j (kW) Q j (kW) Note that, for both text feeders, 100 kVA and 12.66 kV are used as powder and used as powder and voltage bases.

Renewable Energy Behavior
In order to deal with the stochastic variations of the renewable energy behavior, in this work of research, we implement the forecasting methodology reported in [15], which is based on recursive neural networks to predict the renewable power output with a length of 24 h considering as inputs humidity, pressure, time, and wind speed for wind power generation, and solar radiation, time, and temperature for a photovoltaic generation. The renewable generation power curves considered in this work are presented in Figure 5; they have been taken from [38].  Note that, in the case of renewable generation, cost and demand curves are plotted in Figure 5. We consider that, for the 33-node test feeder, (1), the photovoltaic sources PV 1 and PV 2 are connected at nodes 13 and 25 with nominal generation capacities of 450 kW and 1500 kW, respectively; (2) the wind turbines WT 1 and WT 2 are connected at nodes 13 and 30 with maximum power generation rates of 825 kW and 1200 kW, respectively; (3) regarding the 69-node test feeder, the photovoltaic plant PV 1 and the wind generator WT 2 with nominal rates of 1050 kW and 1000 kW are connected at node 12. Additionally, the second photovoltaic generator PV 2 is connected to the node 22 with a power rate of 850 kW and the second wind turbine WT 2 is connected at the node 61 with a nominal power capacity of 760 kW; (4) the costs of the energy at the slack node is assumed as the energy cost reported by CODENSA utility from Colombia in May 2019, which is COP$/kWh 479.3389 [15]; and (5) the per unit curve regarding the demand plotted in Figure 5b multiplies at each period the peak load consumption reported in Table 2.

Battery Information
For both test feeders, as reported in [38], it is considered that the utility company has installed three and four batteries. The information regarding these batteries is reported in Table 4. The distribution of the batteries for each test feeder is reported below: (a) In the case of the 33-node test feeder, the batteries installed by the utility are distributed as follows: at node 6, a C-type battery is installed; at node 14, an A-type battery is installed, and at node 31, a B-type battery is installed; and (b) For the 69-node test feeder, the four batteries installed by the utility are connected at nodes 40, 64, 16, and 9 of the A, B, C, and D model types, respectively.

Computational Validations
In order to solve the general NLP model that represents the problem of optimal operation of battery energy storage systems in AC distribution networks with dynamic active and reactive power capabilities as well as the equivalent SOCP reformulation proposed in this research work, we implement these models in GAMS software by using the nonlinear solver IPOPT on a desk computer INTEL(R) Core(TM) i5-3550, 3.50 GHz, 8 GB RAM with 64-bits Windows 7 Professional.

Simulations Cases
In order to validate the effectiveness of the proposed SOCP reformulation to operate BESS in distribution networks considering the possibility of supporting active and reactive power in AC distribution systems, we consider the following simulation cases: For simulation cases that consider BESSs, we assume that minimum and maximum states of charge of 10 % and 90 % for ion-lithium are recommended in scientific literature batteries [41]. Additionally, the BESS starts and ends each day with 50% of their charge, as proposed in [25].

Numerical Performance of the 33-Node Test Feeder
In order to demonstrate the efficiency of the proposed SOCP reformulation for optimal power flow and economic dispatch approaches in AC distribution networks, we simulate the C 1 considering different solvers available in GAMS for NLP problems as well as the proposed SOCP reformulation. The results in Table 5 demonstrate that the proposed SCOP approach deals with optimal solutions of the economic dispatch problem of batteries in AC distribution networks for the simulation C 1 , which coincides with the solutions reported by different NLP solvers available in GAMS. However, it is essential to mention that the SCIP solver of GAMS, even if it works with NLP models, cannot deal with the solution of the problem, which is attributable to the nonconvex structure of the solution space. In addition, other NLP solvers available in GAMS, such as MOSEK, BARON, and ANTIGONE, cannot solve the exact model since they do not support trigonometric functions. In this sense, an adequate formulation to address the problem of the economic dispatch problem of BESS in distribution networks corresponds to the SOCP proposal since (1) no trigonometric functions appear in this reformulation, (2) the convex structure makes it possible to reach the optimal solution with the speediest convergence (see the third column in Table 5), and (3) the SOCP formulation can be implemented in free software such as Python with the theoretical advantage that the solution reached is indeed the global optimal.
Remark 5. Due to fact that the solutions reached by the GAMS NLP solvers and the proposed SOCP coincide, ahead in this study, we only report the solutions found by the proposed SOCP reformulation for the remainder simulation cases. Figure 6 shows the expected energy purchasing costs finally in the 33-node test feeder at each one of the simulation cases. From Table 6, we can observe the following: (a) The integration of the reactive power capabilities of the BESSs in the C 2 reduces the total energy purchasing cost regarding C 1 of about 3.41%. This is an important improvement since BESSs are generally not for apparent power support. (b) The operation of BESSs considering the unity power factor (i.e., C 3 ) allows for reduction of the total energy purchasing costs in the conventional source about 23.14%, which demonstrates the efficiency of combining BESSs with renewable power sources for active power support in AC distribution networks.
(c) Simulation C 4 allows an additional improvement regarding C 3 respect to the base case about 2.21%, which confirms that the usage of the apparent power capabilities in BESSs allows for improvements of the grid performance in relation to energy purchasing costs in conventional sources (i.e., substations and/or diesel generators). Table 6 reports the grid performance when there are variations in renewable generation availability, which can be associated with cloudy (rainy) or low wind speed days. This table compares C 1 and C 4 for penetrations of renewable generation from 0% to 120%. Table 6. Energy purchasing cost considering simulation C 4 and different levels of renewable generation availability compared with C 1 . From Table 6, we can observe the positive impact of the BESS system with apparent power support in improving the performance of the distribution networks since the energy purchasing cost in the conventional power sources as the availability of renewable generation increases. Note that the percentage of improvement in regarding the purchasing costs when compared C 1 and C 4 is an increasing function of the renewable generation penetration and can be understood as a possibility of having 100% clean energy resources if the combination of renewable generation and batteries allows avoiding (eliminating) the dependency of conventional sources. This situation is critical since the proposed optimization model can be extended to optimal design active distribution networks in urban and rural areas minimizing or eliminating greenhouse gas emissions.

Numerical Performance of the 69-Node Test Feeder
To validate the SOCP model in the 69-node test feeder, we consider the same simulation scenarios applied to the 33-node test feeder. However, the objective function has been modified to consider the minimization of emissions of CO 2 to the atmosphere during the daily operation. In this sense, the objective function is slightly modified as defined in Equation (25).
where G emissions corresponds to the amount of the CO 2 emitted to the atmosphere measured in pounds-per-day, i.e., lb day , and g gc i,t corresponds to the amount of greenhouse emissions per megawatt-hour of generation, which is considered here that for diesel generator is about 1350 lb MWh , as suggested in [38]. Table 7 presents the simulation results for each of the simulation cases 1, 3, and 4, considering that the objective of minimization is given by Equation (25), where the renewable generation is operated under nominal conditions. Note that C 2 is not analyzed since it is not typical that batteries are used only for reactive compensation due to its main purpose in electrical networks is to provide active compensation service [42]. The numerical results in Table 7 shows that, (1) comparing C 1 with C 4 , the greenhouse gas emissions of CO 2 are reduced about 8.49% and 8.69% regarding daily operative costs with the inclusion of the battery energy storage systems with apparent power compensation capabilities and, (2) if these results are compared with C 3 , then we observe that the reduction regarding the base case are about 5.55%, and 6.02%, which demonstrates the positive effects of including reactive power capabilities of batteries to improve the grid performance of the distribution networks in relation with greenhouse gas emissions and energy purchasing costs, since additional 2.94%, and 2.67% where reactive power is introduced, respectively.

Complementary Analysis
To demonstrate that the SOCP formulation can find the global optimum of the studied problem in contrast to conventional metaheuristic optimization procedures, in this section, we resolve a simplistic optimization problem widely known in the literature as an optimal power flow problem in AC distribution networks [43,44]. This problem is the one-hour equivalent of the economic dispatch problem studied in the mathematical model (1)- (9), which implies that batteries can be assumed at this period as generators or loads; here, we assume that these are under a neutral operative condition, i.e., they do not consume or generate power. For both test feeders, we consider the optimal location of distributed generators reported in multiple articles available in the scientific literature for the 33-node test feeder. These are krill herd algorithm (KHA) [45], loss sensitivity factor simulated annealing (LSFSA) [45], combined genetic algorithm (GA) and particle swarm optimization (PSO) (GA-PSO) [46], teaching-learning based optimization (TLBO) [47], quasi-oppositional teaching-learning-based optimization (QOTLBO) [47], harmony search algorithm with PSO embedded artificial bee colony (HSA-PABC) [48], hybrid intelligent water drops and GA (GA-IWD) [49], heuristic approach (AHA) [50], mutated salp swarm algorithm (MSSA) [51], MINLP model [52], constructive heuristic vortex search algorithm (CHVSA) [53], and the hybrid approach based on the Chu & Beasley genetic algorithm and the vortex-search algorithm (CBGA-VSA) [54]. We also consider these distributed generators with capabilities between 300 kW and 1200 kW for this simulation case. Table 8 presents the numerical validations of the comparative metaheuristic approaches and the SOCP formulation to solve the problem of the optimal power flow in AC distribution networks. The numerical simulations in Table 8 highlight that the SOCP programming formulation for the optimal power flow problem finds the global optimal for the different locations of the distributed generators reported in the scientific literature with conventional metaheuristic techniques. Furthermore, only two of them, named MSSA and CBGA-VSA, manage to reach the same solution found by the SOCP model. These results show that only 16.67% of the tested combinatorial methods can reach the best solution for the optimal power flow problem in the 33-node test feeder. However, this is a very simplified optimization problem compared with the day-ahead economic dispatch problem, including apparent power capabilities in BESS systems, a time-couple problem that includes T couple optimal power flows. Therefore, the studied problem reduces the possibility of finding the global optimal with metaheuristics. While in the case of the SOCP, reformulation always reaches the global solution of the problem due to the solution space's convex structure [31].
It is worth mentioning that the usage of metaheuristic optimization methods to solve continuous optimization problems in AC distribution networks requires the usage of some heuristic parameters such as population size and number of iterations, among others, that make these methods sensible to the programmer, and their convergence and optimization capabilities can be compromised if these are not correct selected; in addition, to demonstrate the efficiency of these combinatorial methods statistical tests are required that imply higher computational times due to the multiple runs employed on them [55,56]. The main problem is that the optimal solution always varies, even if these variations are slightly. It is no possible to ensure the global optimum finding; however, the proposed SOCP formulation does not require any parametrization strategy and, due to the convex properties of the solution space, it does not require statistical tests since their optimal finding properties are theoretical [35].

Conclusions and Future Works
A new reformulation of the economic dispatch problem of battery energy storage with apparent power injection capabilities using second-order cone programming formulation has been proposed in this paper. The main advantage of the SOCP formulations in optimal power flow and economic dispatch analysis is the convex structure of the solution space. This is attained by employing a hyperbolic relaxation of the product between voltage variables in the power balance equations, due to the possibility of being able to guarantee finding the optimal solution and its uniqueness, which is not possible in nonconvex solution spaces.
Numerical validations of the proposed approach in a classical AC distribution test feeder composed of 33 nodes have confirmed the advantages of using the reactive power capabilities of batteries in conjunction with their energy storage capabilities to reduce the total energy purchasing cost in the conventional sources in contrast with the conventional unity power factor operation case with additional improvements of about 2% (with 100% penetration of renewable generation). This improvement is essential, economically speaking, since utilities have opportunities for using existing devices in their grids to have additional profits with minimum investment.
Analysis of the objective function regarding minimization of the CO 2 emissions to the atmosphere in the 69-node test feeder has demonstrated that using the reactive power capabilities of the voltage source converters that interface BESS with AC distribution networks permits reducing the contaminant effects of the diesel generators for electricity generation. This apparent power compensation has allowed reaching additional improvements of about 2.94% in the daily greenhouse gas emissions compared with the classical unit power factor scenario, which is an important percentage that can help distribution companies fill the energetic sustainability challenges imposed by regulatory entities.
The evaluation of different metaheuristic optimization techniques in the 33-node test feeder regarding the classical optimal power flow problem resolving continuous optimization problem. The best alternative is convex optimization since it can deal with the global optimum at each running, which is not possible with metaheuristics. In addition, due to the combinatorial methods' random search procedures, these can be stuck in locally optimal solutions while the SOCP formulation always reaches the global one.
Regarding future research, the following topics can be addressed: (1) extend the conic convex optimization studied in this paper to the problem of the optimal placement and sizing renewable generation and batteries by reformulating the original mixed-integer nonlinear programming model into a mixed-integer SOCP model with global optimum finding capabilities via branch and bound methods and (2) combine the studied SOCP model with heuristic and metaheuristic optimization techniques to plan AC distribution in rural areas involving renewable energies and batteries to eliminate the dependency of fossil fuels. Active and reactive power demanded by loads p gc , q gc Active and reactive power generated by conventional generators p gd , q gd Active and reactive power generated by distributed source p b , q b Active and reactive power delivered/absorbed by the BESS s d Apparent power demanded by loads s gc Apparent power generated by conventional generators s gd Apparent power generated by distributed source s b Apparent power delivered/absorbed by the BESS Limits v min , v max Minimum and maximum voltage profile p gc,min , p gc,max Minimum and maximum active power by conventional generator q gc,min , q gc,max Minimum and maximum reactive power by conventional generator p gd,min , p gd,max Minimum and maximum active power by generated source q gd,min , q gd,max Minimum and maximum reactive power by generated source p b,min , p b,max Minimum and maximum active power by the BESS q b,min , q b,max Minimum and maximum reactive power by the BESS soc b,min , soc b,max Minimum and maximum limits by soc