Optimal Selection and Location of BESS Systems in Medium-Voltage Rural Distribution Networks for Minimizing Greenhouse Gas Emissions

This paper explores a methodology to locate battery energy storage systems (BESS) in rural alternating current (AC) distribution networks fed by diesel generators to minimize total greenhouse gas emissions. A mixed-integer nonlinear programming (MINLP) model is formulated to represent the problem of greenhouse gas emissions minimization, considering power balance and devices capabilities as constraints. To model the BESS systems, a linear relationship is considered between the state of charge and the power injection/consumption using a charging/discharging coefficient. The solution of the MINLP model is reached through the general algebraic modeling system by employing the BONMIN solver. Numerical results in a medium-voltage AC distribution network composed of 33 nodes and 32 branches operated with 12.66 kV demonstrate the effectiveness of including BESS systems to minimize greenhouse gas emissions in diesel generators that feeds rural distribution networks.


Introduction
The growing integration of renewable energy sources in the alternating current (AC) distribution network has been promoted worldwide by government organizations in order to reduce greenhouse emissions [1,2]; however, the integration of renewable energy sources, mainly photovoltaic and wind power plants, carries some challenges as estimating the uncertainties generated by weather conditions (i.e., wind speed and solar radiation) [3,4]. These conditions are highly related to the distribution network location and the year's seasons (e.g., winter or summer) [5,6]. Therefore, it has been necessary to implement other additional devices to balance the distribution network operation, such as energy storage systems, which can reduce power oscillations. The most used energy storage system are batteries [7], superconductors [8], supercapacitors [9], flywheels [10], pumped-hydro systems [11], and compressed air systems [12]. Their integration depends on their function in the electrical network; for example, superconductors, supercapacitors, and flywheel systems are usually implemented in voltage or frequency compensation [13,14]. In contrast, pumped-hydro and battery systems are typically employed in long-term power supplies [15].
The combination of renewable energy sources and energy storage systems is a key strategy to overcome the problems of uncertainty and variability in primary resources from renewable sources [16]. In addition, it allows the distribution network to be more reliable and cost-effective [17]. Nevertheless, this combination generates many problems in the planning, operation, and dispatch in the AC distribution network since energy storage systems must be appropriately located to balance generation-demand and enhance the voltage profiles and power quality [18].
Battery energy storage systems (BESS) are the most natural storage devices to be integrated into networks since they can provide a wide range of varied applications. BESS still have many challenges to face for its safe integration, operation, and function. A lot of research exists in the specialized literature focused on integrating the BESS into AC distribution networks. In [19], a review of planning, operating, and controlling of energy storage systems and wind power was presented. In [20], an economic overview of the different battery kinds employed for large-scale electricity storage was provided. In [21], dynamic programming to achieve the optimal placement, chosen, and charge-discharge scheme of BESS in distribution networks was presented. This dynamic programming was carried out by implementing a genetic algorithm and minimizing a weighted single-objective function. In [22], a recurrent neural network was used to manage the state-of-charge (SoC) of BESS. In [23], a joint integration between the BESS and smart photovoltaic (PV) inverters was presented to help demand management by improving the voltage profiles. This integration was solver with simulated annealing that selected the placement of the BESS, while an inner optimal power flow (OPF) determined the power active delivered/absorbed by each BESS. In [24], an optimization method using a loss sensitivity index for optimal location of the BESS in the AC unbalanced distributed system was developed. In [25], a mix between a genetic algorithm and particle swarm optimization for optimal location and sizing in distribution systems reducing power losses in a microgrid. In [26], a bi-level optimization model was developed to obtain the siting and sizing optimal of multiple BESS in the AC distribution networks. The first level locates the BESS by taking into account the charging capacity. The second level defines the operation optimal of the BESS to reduce the power losses in distribution networks. In [27], a stochastic programming model for the optimal operation of the BESS was shown. This model considered uncertainties in the supply and demand for energy, as well as economic and environmental aspects. In [7], a Chu and Beasley genetic algorithm optimization was proposed to determine the optimal placement and selection of the BESS and capacitors banks in the AC distribution systems. The proposed objective was to minimize network power losses using a master-slave methodology, where the master stage determined the placement and selection of the BESS. While the slave stage computed the objective function in each configuration given by the master stage. Finally, the best charge-discharge coordination of the BESS was found.
The application of the optimization techniques to manage the energy flow in distribution systems with high penetration of renewable energy systems and BESS is strictly necessary to guarantee the best possible performance of the distribution grid at the same time that is ensured the adequate operation of the batteries to enlarge their use-life.
The authors in [28] presented a multi-objective optimization model with nonlinear constraints to operate lithium-ion batteries considering three optimization objectives, such as battery health, charging time, and energy conversion efficiency simultaneously. The solution of this multi-objective optimization model is reached with the application of the ensemble multi-objective bio-geography-based optimization approach. Numerical results demonstrated two main charging patterns, namely the constant current-constant voltage (CC-CV) and multistage CC-CV, which are optimized to balance various combinations of charging objectives. Pareto frontiers demonstrate different trade-offs and sensitive behaviors between objective functions, which will help to take the operation decision for the battery pack. In [29], the authors presented an optimal average state-of-charge trajectory through a multi-objective optimization with consideration of user demand and battery pack's energy loss. The proposed distributed charging strategy makes the state-of-charge follow the prescheduled trajectory, which can effectively suppress the violation of the safety-related charging constraints through online battery model bias compensation. Numerical results based on an illustrative example shows the efficiency and robustness of the proposed approach regarding existing literature approaches by combining optimization and control procedures in the optimal operation of batteries for electric vehicle applications. In [30], the authors proposed a constrained multi-objective optimization framework to achieve economy-conscious battery charging management. The authors propose a coupled electrothermal-aging model to be first applied to capture the nonlinear electrical, thermal, and aging dynamics of a lithium-ion battery with different timescales. The solution of the multi-objective optimization model is made by the application of the second generation of the non-dominated sorting genetic algorithm, which allowed finding an adequate equilibrium among charging speed and thermal variations during charging to ensure the useful life of the battery in electric vehicle applications.
The main difference of our proposed approach regarding literature reports is that we proposed an exact mixed-integer nonlinear programming model (MINLP) solvable at any optimization package equipped with branch and bound and interior-point methods, such as the general algebraic modeling system, i.e., (GAMS); in addition, our model allows for reducing the amount of CO 2 emissions to the atmosphere by diesel generation considering BESS locations in one or multiple optimization nodes, showing additional reductions in the order of tens of pounds of CO 2 per day regarding heuristic reports in the literature. An additional contribution of our approach is the location of the BESS considering the presence of slack node or not, which demonstrates that if the slack node is relaxed, additional reductions of about 140 lb/day are also reached after the solution of the proposed MINLP model.
Regarding multi-objective approaches previously presented in the literature review (see references [28][29][30]) for the operation of batteries in electric vehicle applications, note that these works were concentrated on proposing efficient charging/discharging methodologies that include aging model, thermal behaviors, energy efficiency, among others. These approaches are completely different from the proposed optimization approach addressed in this paper since we are interested in operating these batteries to improve electrical network performance in relation to the amount of greenhouse gas emissions. In this sense, here, we consider batteries as devices that can be linearly modeled inside of the proposed MINLP formulation. However, we are interested in including the internal behaviors presented in those references into electrical grid analyses, and will be investigated in future works.
The rest of this study is organized as follows: Section 2 described the mathematical formulation for optimal location and selection of BESS. Section 3 presents the strategy of solving the proposed optimization model. Section 4 shows the electrical distribution system and considered scenarios. Section 5 presents all the results and analysis of the proposed methodology. Lastly, the main conclusions derived from this study are given in Section 6.

Mathematical Formulation
The optimal selection of batteries in AC distribution networks corresponds to an MINLP model since it involves binary and continuous variables [31]. The binary variables are used to select the node and the type of battery to be located, and the continuous variables are associated with voltages, angles, power generation, and energy stored in batteries, among others [24]. The objective function of the MINLP model is to minimize the total greenhouse gas emissions produced in the combustion process of the diesel for power generation. The constraints are associated with power balance, voltage regulation bounds, and device capabilities. The mathematical formulation of the MINLP problem is given as follows.

Objective Function
The main greenhouse gas emissions produced by diesel generators for providing energy are concentrated in carbon dioxide CO 2 ; in addition, for medium voltage networks due to the amount of power provided in rural grids (from 3 to 5 MW), this function takes a linear structure as presented below [32]: where E CO 2 is the fitness function, which calculates the number of pounds of greenhouse gas emissions; T CO 2 i is the amount of CO 2 released into the atmosphere in kg kWh by a diesel generator connected to at node i; the active power generated at node i in the period of time t by by the diesel generator is represented as p dg i,t . ∆t is the duration of the time period considered (in general 1 h). Observe that N and T denote the sets of all nodes in the network and the total time periods of the operational horizon.

Set of Constraints
The main complex constraints in AC distribution system analysis correspond to the power balance equations, which represent the active and reactive power injected into each node i in each period t [33]. These expressions have the following form: where Y ij represents the admittance value in nodes i and j, which contain the voltages v i,t and v j,t in each period t. δ i,t (δ j,t ) denotes the voltage angle at node i (j) in the period t, θ ij is the angle of the admittance between nodes i and j. The active and reactive power generated by renewable sources connected at node i in the period t are presented as p rs i,t and q rs i,t , respectively. While for the batteries, the active and reactive power capabilities are denoted as p b i,t and q b i,t and the active and reactive power demands are represented as p d i,t and q d i,t , respectively. Constraints related to batteries are listed below: where SoC b i,t represents the state of charge in each BESS b located at node i for the period t and ts operational limits are indicated as An important constraint regarding the adequate operation of electrical distribution networks is the voltage regulation in all the nodes, which takes the following form: where v min i and v max i represent the minimum and maximum voltage bounds admissible for each node in the AC distribution network at each period of time.
The complete understanding of the mathematical model represented by (1)-(11) is as presented below: Expression (1) is the fitness function of the problem, which is associated with the minimization of the total emissions of CO 2 to the atmosphere by diesel generators; Expressions (2) and (3) correspond to the balance of active and reactive power in each node of the network in each period; Inequality constraint (4) determines the linear relationship between the SoC and the power absorbed/injected by a BESS-type b connected at node i in each period. Expressions (5) and (6) determine the lower and upper bounds for battery variables, i.e., state-of-charge and power injection/absorption, respectively. Inequality constraints (7) and (8) determine the initial and final operative desired conditions regarding the operation of batteries in the distribution network. Expressions (9) and (10) define the maximum number of BESS available for location in the AC distribution network as well as the possibility of installation of one type of battery per node. Finally, the box-type constraint (11) determines the minimum and maximum voltage regulation bounds admitted by regulatory entities in the operation of medium-voltage distribution networks. The optimization model defined from (1) to (11) exhibits a nonlinear non-convex structure, where the main complicating constraints are related to power balance equations due to the presence of products between variables and trigonometric functions. The general algebraic modeling system (GAMS) is used to resolve this MINLP model as this software has powerful tools to tackle complex optimization problems involving binary variables, as recommended in [34] for power system analysis.
In the following section, we briefly present the solution methodology of the proposed MINLP approach to select and locate batteries in AC rural distribution networks for greenhouse gas emissions' minimization.

Solution Strategy
To solve the optimal selection and placement of BESS in rural AC distribution networks, taking into account the MINLP formulation described from (1) to (11), we employed the GAMS optimization software. This optimization package has been primarily used in mathematical optimization, mainly when the optimization problems have a nonlinear non-convex structure, including binary variables [31]. Some of the applications of the GAMS optimization package in optimization problems are: parameter decisions on the product features of a bike frame [35], parametric estimation in single-phase transformers [36], optimal planning of AC distribution networks [37], optimal placement and dimensioning of distributed generation in distribution systems [38], superstructure optimization with accurate thermodynamic models [39], the optimal location of batteries in DC distribution networks [40], optimal design of osmotic power plants [41], optimal operation of batteries in transmissions and power systems [31,32], plastic limit analysis problems [42], and so on.
It is worth mentioning that the GAMS software has a simple interface to implement any optimization model in compact form [31]. In this interface intervenes five main steps described below: I. Definition of the sets where variables are defined, i.e., nodes, batteries, and periods. II. Definition of matrices, vectors, and tables, i.e., grid configuration, renewable energy information, or greenhouse emissions' rate, among others. III. Definition of variables and their natures, i.e., binaries, continuous, or discrete. IV. Definition of equations and their implementation using symbolic syntax as defined from (1) to (11).
V. Solution of the optimization model using an adequate optimization tool. The solver's selection depends on the nature of the optimization problem; in this paper, an MINLP method is selected.
To summarize the solution strategy proposed in this paper to the problem of the optimal location and selection of BESS in the AC distribution network, the flow chart depicted in Figure 1 was implemented. For additional details about the implementation of optimization models in the GAMS software, refers to [31].
It is worth mentioning that, in the literature to analyze batteries from the optimization point of view, multi-objective methods have been proposed, such as ensemble bio-geography-based optimization approach [28], nondominated sorting genetic algorithms [30], and machine-learning-enabled data-driven models for battery capacity prediction [43,44], as well as single-objective approaches, such as interior-point methods [32,45], second-order cone programming [46], genetic algorithms [7], particle swarm optimization [47], and semidefinite programming [48], among others. However, most of these approaches deal with nonlinear optimization problems, which are more treatable than the MINLP model presented in this research, which needs powerful methods for being solved efficiently, which justifies the usage of GAMS as a solution technique.

Electric Distribution Network
To evaluate the proposed optimization model focused on reducing greenhouse gas emissions to the atmosphere by diesel generators, we adopted a 33-node test feeder as an example of application. This test feeder has 33 nodes and 32 lines (i.e., radial topology), which is operated with a rated voltage of 12.66 kV, and its total active and reactive power demand are 3715 kW and 2300 kVAr, respectively. Figure 2 illustrates the topology of the 33-node test feeder and its electrical parameters, i.e., resistances, reactances, and apparent power consumption, are reported in Table 1.
Observe that the information provided for the consumption in Table 1 is associated with the maximum demand at the peak hour.

Demand and Renewable Energy Information
To validate the proposed MINLP model to determine the efficient operation of BESS in rural AC distribution networks, we consider the daily renewable generation and demand information reported in Table 2.  Regarding renewable generation, it is worth mentioning that: The PV 1 source is located at node 13 with a nominal generation of 450 kW, and the PV 2 source is located at node 25 with a nominal generation rate of 1500 kW. The WT 1 source is located at node 13 with a nominal generation of 825 kW, and the PV 2 is located at node 30 with a nominal generation of 1200 kW.
The information regarding daily load behavior presented in Table 2 has been obtained by using a forecasting method based on artificial neural networks as recommended in [49]. In addition, the location of these renewable energy resources has been taken from [32], where these have been used in economic dispatch analysis.

Battery Technologies
For the optimal operation of the 33-node test feeder, we consider three possible battery technologies with the following characteristics: A battery-type A with an energy rate of 1000 kWh with a charging/discharging times of 4 h. The nominal peak injection/consumption of 250 kW. A battery-type B with an energy rate of 1500 kWh with a charging/discharging times of 4 h. The nominal peak injection/consumption of 375 kW. A battery-type C with an energy rate of 2000 kWh with a charging/discharging times of 5 h. The nominal peak injection/consumption of 500 kW.
It is worth mentioning that in reference [32], the battery-type A was initially installed at node 14, the battery-type B in node 31, and the battery-type C at node 6, respectively. This information is used for comparative purposes. Since we are interested in identifying if these nodes are effectively the best possible location, three batteries are considered available for installations, each one with the aforementioned technologies reported.

Greenhouse Gas Emissions
In the literature, the amount of greenhouse gas emissions for medium-voltage diesel generators take the distribution reported in Table 3. Table 3. Amount of main gasses emitted to the atmosphere by diesel generators. Based on the information reported in Table 3, we conclude that the most important gas emitted into the atmosphere is carbon dioxide. In this context, here we consider a middle value between both extremes for this gas, i.e., T CO 2 i = 1350 lb/MWh for simulation purposes.

Numerical Analysis and Discussion
This section presents the computational validation of the proposed MINLP model to address the problem of the optimal selection and location of BESS in electrical AC distribution networks for minimizing the amount of CO 2 emissions to the atmosphere in the combustion of diesel for electricity generation. We implement this MINLP model in the GAMS software using the nonlinear solver IPOPT on a personal computer AMD Ryzen 7 3700U (AMD, Santa Clara, CA, USA), 2.3 GHz, 16 GB RAM with 64-bits Windows 10 Home Single Language.

Simulation Cases
To validate the proposed MINLP model to locate and select batteries for rural applications, we propose the following simulation scenarios: • Scenario 1 (S 1 ): The operation of the 33-node test feeder considering renewable energy availability without batteries. • Scenario 2 (S 2 ): The operation of the 33-node test feeder considering renewable energy availability and the batteries optimal located with the proposed approach.
These scenarios allow for understanding the impact of the optimal placement and sizing of distributed energy resources to minimize greenhouse gas emissions. From Figure 3, we can observe that if batteries are introduced in the operation of the AC distribution network, the total amount of generation provided by the slack reduces significantly. For example, in the period between 15 and 22, the generation in the slack node is zero for the S 2 compared to values different from zero in the S 1 . Moreover, between the periods from 35 to 46 (peak load condition), these batteries reduce the total diesel generation to support the total power consumption. This will significantly reduce the daily greenhouse gas emissions since, in the S 1 , the amount of CO 2 emissions is about 17,983.316 lb/day, and for the S 2 this is about 14,541.066 lb/day. This implies a reduction of about 19.14% after the selection and location of the batteries.

Computational Evaluation
Regarding the optimal location of the batteries after solving the proposed MINLP model with the BONMIN solver, batteries types A and C are located at node 25 and battery type-B at node 17. To verify that the states of charge/discharge of these batteries fulfill the operative conditions assigned to the Utility, Figure 4 reports the behavior of the SoC variable in each battery.
From the results presented in Figure 4 we can observe that: The behavior of the states of charge between periods from 1 to 28 for all the batteries show that these constant charges and discharges to take advantage of the renewable generation availability to provide power to the grid as well as to end this period with a full charge, i.e., 90%.
Between the periods interval 28 to 36, all the batteries remain in a rest state, i.e., they do not provide or absorb energy to (from) the grid. During this period, these periods occur since renewable generation is enough to support all the demand guaranteeing voltage profiles in all the nodes. After 36 period, the batteries start to provide power to the electrical network in order to help to reduce the amount of diesel generation require to attend the load under the peak load condition.
Finally, in the last periods, these batteries take some energy from the grid to end the day with 50% of the charge as defined in the operative conditions for these devices.

Additional Simulation Results
To present the effectiveness and robustness of the proposed solution methodology to locate and size batteries, we compare the locations reported by our approach with the locations provided in [32] for these batteries. These simulations consider the possibility of locating multiple batteries in the same node and the possibility of locating only one battery per node. In Table 4, these results are compared.  Table 4, the following aspects are clear that the proposed MINLP model and its solution in GAMS allows for improving the heuristic results at least by 15 lb/day of CO 2 emissions to the atmosphere. Figure 5 presents the results regarding the amount of CO 2 emissions if the voltage profile in the slack source and the angle is left free in the range of 0.90 and 1.1 p.u., considering the location for the batteries provided in Table 4.

Heuristic
Multiple nodes Unique node  Note in Figure 5, the method allows us to prove that for optimal power flow analysis considering high penetration of distributed energy resources, i.e., batteries and renewable sources, permit us to reach better results regarding objective function where no impositions about slack voltage are considered in the grid. It is worth mentioning that in this operative case, the proposed MINLP model with the possibility of locating multiple battery technologies in the same node continues being the optimal solution of the problem with a total amount of CO 2 emissions of about 14,399.229 lb/day, where this corresponds to a reduction about 19.08%, with respect to the base case, i.e., without the presence of batteries.

Conclusions and Future Works
The problem of the optimal selection and location of battery energy storage systems in rural AC distribution networks to minimize the amount of CO 2 emissions into the atmosphere by diesel power generation was studied in this research by proposing an MINLP model. The solution of this MINLP model was reached with the large-scale nonlinear solver BONMIN in the GAMS environment. Numerical results demonstrate that after locating and selecting batteries, the reduction of the CO 2 emissions in the test feeder was about 19.14% compared to the base case, i.e., without penetration of batteries.
When the proposed approach was compared with the current literature reports (heuristic locations), the numerical results demonstrate that the MINLP model implemented in the GAMS software allows for reducing CO 2 emissions by about 17.979 lb/day when multiple batteries are allowed per node and 17.979 lb/day when only one type of battery is permitted per node. In addition, numerical results, when the condition of the slack node is left free, demonstrate that optimal power flow applications are better when compared to the case where the voltage in the slack node is fixed, since the 33-node test feeder additional reductions about 140 lb/day of CO 2 emissions have been found.
As future works, we propose the following: The reformulation of the MINLP model into a mixed-integer convex model via second-order programming to ensure the global optimum finding via branch and bound methods.
To study the simultaneous location of batteries and renewable sources to identify the best possible combination of these distributed energy resources regarding greenhouse gas emissions minimization.
To include hard constraints in the proposed optimization model thermal characteristics of the batteries including aging features and the effect of the power electronic converter regarding the efficiency of the complete system to improve the quality of the model in relation with real behaviors in BESS. Funding: This research was funded by the Agencia Estatal de Investigación, Spain (AEI) and the Fondo Europeo de Desarrollo Regional (FEDER) aimed at the Challenges of Society (grant No. ENE 2017-83860-R "Nuevos servicios de red para microredes renovables inteligentes. Contribución a la generación distribuida residencial").