Location and Sizing of Battery Energy Storage Units in Low Voltage Distribution Networks

: Proper planning of the installation of Battery Energy Storage Systems (BESSs) in distribution networks is needed to maximize the overall technical and economic beneﬁts. The limited lifetime and relatively high cost of BESSs require appropriate decisions on their installation and deployment, in order to make the best investment. This paper proposes a comprehensive method to fully support the BESS location and sizing in a low-voltage (LV) network, taking into account the characteristics of the local generation and demand connected at the network nodes, and the time-variable generation and demand patterns. The proposed procedure aims to improve the overall network conditions, by considering both technical and economic aspects. An original approach is presented to consider both the planning and scheduling of BESSs in an LV system. This approach combines the properties of metaheuristics for BESS sizing and placement with a greedy algorithm to ﬁnd viable BESS scheduling in a relatively short time considering a speciﬁed time horizon, and the application of decision theory concepts to obtain the ﬁnal solution. The decision theory considers various scenarios with variable energy prices, the di ﬀ usion of local renewable generation, evolution of the local demand with the integration of electric vehicles, and a number of planning alternatives selected as the solutions with top-ranked objective functions of the operational schedules in the given scenarios. The proposed approach can be applied to energy communities where the local system operator only manages the portion of the electrical grid of the community and is responsible for providing secure and a ﬀ ordable electricity to its consumers.


Introduction
The progress of technologies concerning different types of batteries and their control systems, together with the evolution of a regulatory framework in which energy storage is considered more explicitly, are making Battery Energy Storage Systems (BESSs) progressively more cost-effective for energy system applications. A BESS is specified by its power rating and energy capacity. Both of these specifications impact the BESS investment cost and need to be defined separately [1]. Typical BESS applications for power and energy systems include improvement of the quality of service, assistance with primary and secondary frequency control to enhance network stability, the smoothing of power fluctuations in the generation profiles for better integration of Renewable Energy Sources (RES), and the promotion of higher users' participation in demand management through time-shifting of the energy usage [2]. Most BESS applications in electrical networks refer to times of 1-2 h and to BESS sizes smaller than 50 kW. However, the number of applications for longer times (e.g., 2-5 h) and sizes

R≈X R>>X
In the LV grid, the voltage drop is strictly correlated to the active power, and voltage control can thus be effectively conducted by modifying the net nodal active power Load profile Aggregate Not aggregate LV grid represents the last mile of the grid and supplies the customer. A more detailed representation of loads and generation profiles is then necessary and the aggregation impact is less evident than in MV grids To achieve the best BESS performance and to maximize the overall benefits, proper planning is necessary. For instance, in [20], several configurations of BESSs are compared and the overall network impact is evaluated and compared for different placements of BESSs in the network. In the relevant literature, there are some contributions related to the optimal planning (sizing and placement) of energy storage systems in LV distribution networks. The method applied in [21] aims to optimally configure the energy storage systems to alleviate over-and under-voltage problems. The problem of the optimal location is solved by a heuristic method based on voltage sensitivity analysis. Uncertainties due to stochastic generation and demand are also considered in the optimal sizing and the worst-case approach is applied to select the sizes.
Some contributions refer to LV distribution networks characterized by a high penetration of photovoltaic generation, and consider the possibility of alleviating the negative impacts by the installation of storage systems. In [22], a heuristic method is applied to determine the optimal location and sizing of storage systems and the objective to be minimized is a cost function accounting for the cost of storage systems and the cost due to voltage deviations. The optimal planning of BESSs proposed in [23] aims at maximizing an objective function that includes both benefits and costs (i.e., energy arbitrage, environmental emission, energy losses, transmission access fee, capital, and maintenance costs of a BESS). Daily charge/discharge of the storage systems is also determined considering a proper model of the BESS operation. In [24], the authors propose a procedure for the optimal placement and sizing of distributed energy storage systems in low voltage distribution systems aimed at maximizing the utilization of photovoltaic plants and minimizing the battery degradation. The multi-objective optimization problem proposed by [25] is focused, from one side, on the minimization of energy losses and, from the other side, on the minimization of costs associated with distributed generators and energy storage systems. A distribution system with a high penetration of photovoltaics generators is considered in [26]. A heuristic procedure for reducing the search space for the location of storage systems in a low voltage microgrid is proposed in [27], where analytical considerations on the voltage sensitivity, voltage unbalances, and line loading drive are included in the selection of candidate locations. This paper proposes an overall procedure to address the BESS location and sizing in an LV network, taking into account the characteristics of the local generation and demand connected at the LV nodes and the time-variable generation and demand patterns. The proposed procedure aims to improve the overall network conditions by considering both technical and economic aspects. This condition aims to represent the conditions that could be found in the case of energy communities where the local system operator only manages the electrical grid of the community and is responsible for guaranteeing secure and affordable electricity for its consumers. An original algorithm is presented to consider both the planning and scheduling of BESSs in an LV system. This algorithm combines the properties of metaheuristics (to explore the solution space as much as possible), and a greedy algorithm able to find viable BESS scheduling in a relatively short period of time, considering a specified time horizon. The final solution is obtained by using a multi-criteria decision making (MCDM) approach based on the application of decision theory concepts [28] to a number of selected planning alternatives evaluated for different weighted scenarios. Decision theory is an appropriate tool for dealing with cases in which the uncertainty on possible future situations is very large and is handled through scenario analysis.
The next sections of this paper are organized as follows. Section 2 describes the details of the methodology used to address the planning problem. Section 3 presents the application to an LV distribution system and discusses the results. The last section contains the concluding remarks.

Description of the Methodology
The BESS location and sizing is analysed as a planning problem seen from the point of view of the electricity manager of an energy community, which is responsible for guaranteeing secure and affordable electricity for its customers at a minimum cost, as well as for both the infrastructure and quality of the service.

Data Resolution and Reference Period
The data used are assumed to have a constant time resolution ∆t. A reference period of duration T ref is assumed, in which the operation of the LV distribution system is analysed in detail by considering the generation and demand patterns and a specific model for BESS scheduling. The planning problem is set up for a time horizon multiple of T ref , namely, with an overall duration of where N H > 1 is an integer number. It is assumed that the BESSs that will be chosen by the proposed procedure will be installed at the beginning of the time period of analysis. The planning time horizon chosen is longer than the lifetime of the BESS, in order to include the replacement of the BESS during the planning period.

Definition of the Scenarios
The electricity prices, diffusion of the local generation, and diffusion of electric vehicles have been assumed to be uncertain data inputs that affect the solution of the planning problem. Several methods can be applied to handle uncertain variables; in this proposal, several scenarios will be identified to represent different instances.
Starting from the results determined for the reference period, a number of scenarios are constructed to represent possible paths of evolution of selected quantities that affect the LV network operation. The scenarios are defined by taking into account the long-term changes in time that may appear in the following quantities: (a) Electricity prices: the consumers or prosumers connected to the LV system are considered as price takers, namely, they do not participate in the definition of energy prices in the wholesale electricity market. M P trends of variation of the electricity prices are established by the user by considering the final increase (or decrease) of the electricity price at the end of the planning time horizon; (b) Diffusion of the local generation: the distributed generation (DG) connected to the LV network can change at selected locations in different ways. For LV systems, it is likely that more prosumers will install their local generation systems at locations where there is no local production. From the point of view of the scenario definition, M DG trends of variation of the local generation are considered, and each one is defined by assuming a rate of increase of the energy production from local generation (not of the power installed); (c) Diffusion of electric vehicles: in the present situation, the diffusion of EVs is still relatively limited in many jurisdictions. The number of EVs will increase in the future, and different hypotheses about their number can be represented by M EV trends.
Under the hypotheses provided for the scenarios, the number of scenarios considered is equal to The scenarios obtained are applied to calculate the objective function for the planning problem (Section 2.4), and are weighted in order to be used in the decision-based approach illustrated in Section 2.6.

Definition of the Sizing Alternatives
Due to the particular use of the BESS, which includes load leveling, the indication of [29] to use the energy to power ratio equal to 2 is followed. In this way, data are described in terms of their energy capacity, and the power rating is then directly linked to the energy capacity through the energy to power ratio.
In the distribution network, there are K nodes, but it is assumed that a user-defined number K BESS < K of nodes is taken into account for possible BESS location. A maximum value for the BESS energy capacity C k,max is assigned to each node k = 1, . . . , K BESS , depending on the characteristics of the node. The final BESS energy capacity to be assigned to each node will be determined by the proposed approach in the range from zero to C k,max at the nodes k = 1, . . . , K BESS . To avoid the use of continuous variables, this range is partitioned into a given number Λ of BESS energy capacity levels. Without loss of generality, the number Λ is chosen as a constant for all the nodes, that is, it is independent of k. In this way, the total number of alternative combinations of BESS sizes is S = Λ K BESS . Even for relatively small numbers of nodes and BESS energy capacity levels, the number of combinations S can become so high that even their enumeration becomes intractable with an exhaustive search process. For example, if K BESS = 20 nodes and Λ = 5 BESS energy capacity levels, the result is S = 5 20 = 9.54 × 10 13 . In this situation, only parts of the combinations will be reached during the planning procedure, for instance, that conducted by using a metaheuristic algorithm able to explore the solution space with a conceptual direction of evolution towards the global optimum of the objective function employed in the definition of the planning problem.

Definition of the Objective Functions
The solution of the power flow at each time step h = 1, . . . , H, together with the BESS operational schedules, provide the data required to calculate the power flows and the LV network losses, and to determine whether there is a reverse power flow with the power injected at the supply point. These results are used as the contribution of the distribution system operation to the formulation of the objective function for the planning problem.
The general objective function formulated for the planning problem is a penalized objective function defined on the basis of the investment and operation and maintenance (O&M) costs, and of penalty terms associated with violations of the voltage limits and with the presence of reverse power flow to the MV distribution system. The expression of the objective function is constructed, starting from a reference function f ref and including some penalty terms to obtain the penalized objective function f P : where the addends have the following meaning: • ∆c inv : investment costs for BESS purchasing and installation, determined by using the cost per kWh, depending on the BESS energy capacity, and the cost per kW applied to the inverter for grid connection of the BESS (depending on the BESS power rating) [29]; Energies 2020, 13, 52 6 of 20 • c O&M : operation and maintenance costs, calculated by considering the costs of network losses (evaluated using the electricity prices), the BESS aging applied as a reduction of the maximum BESS energy capacity [29], and the maintenance costs considered as a percent of the investment costs; • π V : penalty term associated with the violation of the upper voltage limit V max or the lower voltage limit V min , with a penalty coefficient ρ V assigned by the user in such a way that the penalty is significantly higher than the terms of f ref , without being excessive (otherwise, only feasible solutions would be accepted during the optimization problem, going against the goal of the metaheuristics to open the search space by also accepting penalized cases): • π R : penalty term associated with the total energy injected at the supply point in the cases of reverse power flow from the low voltage to the medium voltage network that can impact the voltage regulation, as well as the protection systems [30][31][32]:

Overall Calculation Procedure
The calculation procedure is composed of two main steps, as shown in Figure 1: Step A, essentially based on the exploitation of the features of a customized genetic algorithm, and (2) Step B, where the calculation of potential scheduling for all batteries installed is suggested through a greedy algorithm.
On the basis of the outputs of Step B, the objective function related to that particular set of BESSs is evaluated.
First of all, all the input data are introduced: in particular, the code requires information about the network data, number of nodes K BESS where the BESS can be installed, time horizon (through the number of days N d ) analysed, time discretization (i.e., number of time steps per day N t ), and number of chromosomes N c for the genetic algorithm. Thanks to the above information, the procedure continues with Step A (planning) and Step B (dispatching). After the calculation of the objective function at the iteration n G for all the chromosomes, the convergence criterion is checked.

The initial population
• : penalty term associated with the total energy injected at the supply point in the cases of reverse power flow from the low voltage to the medium voltage network that can impact the voltage regulation, as well as the protection systems [30][31][32]:

Overall Calculation Procedure
The calculation procedure is composed of two main steps, as shown in Figure 1: 1) Step A, essentially based on the exploitation of the features of a customized genetic algorithm, and

2)
Step B, where the calculation of potential scheduling for all batteries installed is suggested through a greedy algorithm.
On the basis of the outputs of Step B, the objective function related to that particular set of BESSs is evaluated.
First of all, all the input data are introduced: in particular, the code requires information about the network data, number of nodes KBESS where the BESS can be installed, time horizon (through the number of days Nd) analysed, time discretization (i.e., number of time steps per day Nt), and number of chromosomes Nc for the genetic algorithm. Thanks to the above information, the procedure continues with Step A (planning) and Step B (dispatching). After the calculation of the objective function at the iteration nG for all the chromosomes, the convergence criterion is checked.

Step A
The initial population is created and the initial objective function values are collected in the vector . The population is composed of chromosomes with the coding shown in Table 2. Table 2. Codification used in the proposed genetic algorithm.  Table 2. Table 2. Codification used in the proposed genetic algorithm.

261
The selection process is based on the application of the biased roulette wheel.

262
Once the parents' selection is made, the crossover may be applied according to the probability 263 of crossover pc.

264
The crossover follows some general rules: It is worth noting that according to the number of BESSs installed (indicated by gene 1), the number of elements composing gene 2 and gene 3 will vary. This implies that a number of pre-defined rules are needed to handle the genetic operators applied to the chromosomes, to make the creation of successive generations possible. 1

. Selection and Crossover
The selection process is based on the application of the biased roulette wheel.
Once the parents' selection is made, the crossover may be applied according to the probability of crossover p c .
The crossover follows some general rules: • The number of batteries is inherited from the parent#1, and • The crossover is only applied to the values contained in gene 2 and gene 3. Due to the particular codification used, some fixed rules have been used to apply crossover in the presence of chromosomes with different characteristics. These rules are clarified with reference to the chromosomes shown in Figure 2.
Energies 2020, 13, x FOR PEER REVIEW 8 of 19 Due to the particular codification used, some fixed rules have been used to apply crossover in the presence of chromosomes with different characteristics. These rules are clarified with reference to the chromosomes shown in Figure 2. Different cases do exist: , the offspring will be that shown in Figure 3a (offspring#1), and  If parent#1 = chr#2, the offspring will be that shown in Figure 3b (offspring#2). In this particular case, the number of batteries imposed by parent#1 is higher than that available in parent#2. Therefore, information regarding the remaining nodes and capacities is randomly picked up from a repository containing all the nodes (and related capacities) referring to the current population (e.g., nodes {15, 24} and capacities {5, 10} in offspring#2).

Mutation
As the crossover operator, the mutation is only applied to the contents of gene 2 and gene 3. This operator is only applied when the value of a random number extracted from a uniform distribution is lower than the probability of mutation pm. If the mutation is allowed, the values to be substituted are picked up from the repository containing all the nodes and relative capacities of the current population.

During
Step B, the procedure calculates the operation setpoints of all the installed batteries. These setpoints are required to calculate the objective function related to the configuration (number of batteries, their positions, and their capacities) specified in every chromosome comprising the population in the generation nG. The flow chart related to Step B is shown in Figure 4. • If parent#1 = chr#1, the offspring will be that shown in Figure 3a (offspring#1), and • If parent#1 = chr#2, the offspring will be that shown in Figure 3b (offspring#2). In this particular case, the number of batteries imposed by parent#1 is higher than that available in parent#2. Therefore, information regarding the remaining nodes and capacities is randomly picked up from a repository containing all the nodes (and related capacities) referring to the current population (e.g., nodes {15, 24} and capacities {5, 10} in offspring#2). Due to the particular codification used, some fixed rules have been used to apply crossover in the presence of chromosomes with different characteristics. These rules are clarified with reference to the chromosomes shown in Figure 2.  If parent#1 = chr#1, the offspring will be that shown in Figure 3a (offspring#1), and  If parent#1 = chr#2, the offspring will be that shown in Figure 3b (offspring#2). In this particular case, the number of batteries imposed by parent#1 is higher than that available in parent#2. Therefore, information regarding the remaining nodes and capacities is randomly picked up from a repository containing all the nodes (and related capacities) referring to the current population (e.g., nodes {15, 24} and capacities {5, 10} in offspring#2).

Mutation
As the crossover operator, the mutation is only applied to the contents of gene 2 and gene 3. This operator is only applied when the value of a random number extracted from a uniform distribution is lower than the probability of mutation pm. If the mutation is allowed, the values to be substituted are picked up from the repository containing all the nodes and relative capacities of the current population.

During
Step B, the procedure calculates the operation setpoints of all the installed batteries. These setpoints are required to calculate the objective function related to the configuration (number of batteries, their positions, and their capacities) specified in every chromosome comprising the population in the generation nG. The flow chart related to Step B is shown in Figure 4.

Mutation
As the crossover operator, the mutation is only applied to the contents of gene 2 and gene 3. This operator is only applied when the value of a random number extracted from a uniform distribution is lower than the probability of mutation p m . If the mutation is allowed, the values to be substituted are picked up from the repository containing all the nodes and relative capacities of the current population.

During
Step B, the procedure calculates the operation setpoints of all the installed batteries. These setpoints are required to calculate the objective function related to the configuration (number of batteries, their positions, and their capacities) specified in every chromosome comprising the population in the generation n G . The flow chart related to Step B is shown in Figure 4.  The pseudo-code of the scheduling algorithm is shown in Figure 5. Algorithm 1 tries to set the best option for the current time instant, which is according to the order of solving, more critical with respect to the next time instants, and pushes the battery constraint violations towards the lowest priority time steps. First of all, the set-points for a single battery (collected in the vector called  For every node k = 1, . . . ,K where the batteries are installed, the net load n (n G ) d,k ∈ R (N t ,1) is calculated as the difference between the load and local generation. With this information, it is possible to calculate the mean value of the nodal net load n (n G ) d,k ∈ R (1,1) and thus an indicative value of unbalance of the net load with respect to its mean value, i.e., u (n G ) d,k ∈ R (N t ,1) , calculated as The vector u (n G ) d,k , k = 1, . . . ,K, provides information regarding the time steps during which the use of the battery system can be useful to level the net load.
On the basis of the value of u (n G ) d,k , the daily time steps are reordered in a descending way, by obtaining the unbalance ranked vector r (n G ) d,k ∈ R (N t ,1) and the corresponding ranked index vector ν (n G ) d,k ∈ R (N t ,1) : by knowing the time steps when the unbalance is higher, it is possible to apply the scheduling algorithm by starting from the "most critical" time steps.
The pseudo-code of the scheduling algorithm is shown in Figure 5. Algorithm 1 tries to set the best option for the current time instant, which is according to the order of solving, more critical with respect to the next time instants, and pushes the battery constraint violations towards the lowest priority time steps. First of all, the set-points for a single battery (collected in the vector called p Line 8 indicates that a temporary value for an integral operation equal to the maximum availability state is considered at the time step t. The maximum availability state changes if either a charging or discharging mode is considered: in the discharging mode, the state is the fully charged state, whereas, in charging mode, the maximum availability state is the empty one. Once the integration operator goes beyond the maximum and minimum state of charge ( and ), a correction factor called resets , ( ) and breaks integration execution. This operation is similarly carried out for the charging mode with corresponding signs.

Selection of the Planning Alternatives
For each scenario, the ranking of the solutions is made on the basis of the objective function (from the best solutions to the worst ones), and the Z top-ranked solutions are selected. The rationale for this selection is that there is no guarantee that the global optimum will be reached from the execution of the metaheuristic, so, taking more than one solution from the ranking, enhances the possibility of having good candidates to compare with the MCDM approach. Then, an auxiliary variable called I (that stands for integrator) is initialized at line 6 with the last value of energy stored in the battery. Following this, the integration operation is executed to check whether the energy constraint is respected or not. The parameter ω is defined as follows: Line 8 indicates that a temporary value for an integral operation equal to the maximum availability state is considered at the time step t. The maximum availability state changes if either a charging or discharging mode is considered: in the discharging mode, the state is the fully charged state, whereas, in charging mode, the maximum availability state is the empty one.
Once the integration operator goes beyond the maximum and minimum state of charge (SoC max and SoC min ), a correction factor called C f resets p (n G ) BESS,j and breaks integration execution. This operation is similarly carried out for the charging mode with corresponding signs.

Selection of the Planning Alternatives
For each scenario, the ranking of the solutions is made on the basis of the objective function (from the best solutions to the worst ones), and the Z top-ranked solutions are selected. The rationale for this selection is that there is no guarantee that the global optimum will be reached from the execution of the metaheuristic, so, taking more than one solution from the ranking, enhances the possibility of having good candidates to compare with the MCDM approach.
The number of planning alternatives is then defined as A = M × Z, that is, with the Z top-ranked solutions for each one of the M scenarios analysed.
Since each planning alternative a = 1, . . . ,A exhibits a different performance according to the scenario, f P (a, m) is the value of the objective function f P defined in (2), evaluated for the alternative a when the scenario m occurs. The objective function values are then arranged into a matrix with A rows (planning alternatives) and M columns (scenarios).
The MCDM approach is based on the application of decision theory criteria to the A planning alternatives by considering the M scenarios. In the framework of the decision theory concepts, several criteria can be applied to select the optimal planning alternative, taking into account that each scenario m has a probability of occurrence p m .

Criterion of Minimum Expected Cost
The criterion of the minimum expected cost attempts to minimize the costs [33]. The optimal planning alternative a * ec is the one that minimizes the expected cost EC: where the expected cost EC(a) for each alternative a = 1, . . . ,A is determined as The assignment of the probabilities of occurrence is crucial; when the equal likelihood criterion is adopted [34], each scenario has the same probability of occurrence.

Criterion of Minimax Weighted Regret
The criterion of minimax weighted regret attempts to minimize the regret corresponding to the worst case [34]. For a given scenario m, it is possible to identify the best planning alternative as the one corresponding to the lowest cost; if a planning alternative different from the optimal one is chosen, a greater cost will be experienced and, therefore, the regret can be calculated. Let us consider the scenario m, where the best planning alternative a * m is and, when scenario m occurs and the alternative a different from a * m is chosen, the regret can be quantified as Considering the probability of occurrence of each scenario, the weighted regret R w (a, m) is determined as R w (a, m) = p m R(a, m).
According to the criterion of minimax weighted regret, the optimal planning alternative a * wr is the one that minimizes the maximum weighted regret, that is, (R w (a, m)) .
As in the case of the criterion of Section 2.6.1, the equal likelihood criterion can be adopted [33].
Energies 2020, 13, 52 12 of 20 2.6.3. "Optimist" and "Pessimist"Criterion When the "optimist" criterion is applied [28,31], for each planning alternative, the best value of the costs (i.e., the minimum value) over the possible scenarios is selected and, then, the selected planning alternative a * opt is the one that minimizes the cost corresponding to the best possible outcome for each scenario, that is, Conversely, the "pessimist" criterion [28,31] attempts to minimize the worst outcome of the planning alternatives. Therefore, the worst value of the costs (i.e., the maximum value) of each alternative over the possible scenarios is selected and, then, the selected planning alternative a * pes is the one that minimizes the worst outcome, that is, In addition, an "optimist"-"pessimist" criterion can be considered as a mixed approach. In this case, both the worst and best outcome of each alternative are considered and these values are weighted by a proper factor α ∈ [0, 1]: When applying the "optimist", the "pessimist", and the "optimist"-"pessimist" criteria, the decision does not depend on the probabilities of the scenarios.

Network Data
The application presented in this paper is based on a rural LV network with 22 nodes, including the slack node ( Figure 6). The network is radial and is supplied by the MV system through an MV/LV transformer (not represented in the figure). The network contains mainly residential and agricultural customers. The number of nodes considered for BESS installation is K BESS = 5. The BESS data are shown in Table 3. For discretization of the BESS energy capacity, the number of levels used is Λ = 47, with BESS energy capacities considered to lie in the range 3 ÷ 49 kWh, and the energy to power ratio is equal to 2, as indicated in Section 2.3 [29]. The total number of alternative combinations of BESS sizes is S = Λ K BESS = 47 5 = 2.29 × 10 8 . Such a number is practically intractable with an exhaustive search process. In this situation, the use of a metaheuristic algorithm to identify the solution of the planning problem is justified.

Loads
Regarding the calculation of the load profiles, it takes into account the real contractual delivery The considered PV production, in the simulation, is calculated based on yearly solar irradiance 424 and the nominal installed power [37]. Yearly solar irradiance data is obtained through collected 425 data from third party weather service provider [38] for specific location of study case with the 426 coordination of 46.4746° N, 11.2479° E.

428
EVs are considered in some scenarios, through the load profile caused by their charging.

429
Within this analysis, the number of EVs that determines the EV charging profile, is set to 10 in the

Input Data
Without loss of generality, the reference period T ref is assumed to be one year, and the planning time horizon is assumed to be 15 years (i.e., N H = 15).
The batteries chosen are Lithium Ion (type Nickel Manganese Cobalt): the cost used in this paper is the one expected in 2020 and equal to 167 $/kWh, whereas the inverter cost is equal to 50 $/kW. The operation and maintenance cost is equal to 1% of the investment cost per year. The BESS lifetime has been considered to be equal to 13.4 years [29]. The BESS degradation has been modeled as a reduction of the energy capacity of the battery, equal to 2.4% per year [35].
For execution of the genetic algorithm, the probability of crossover is imposed as p c = 0.75, and the probability of mutation is set to p m = 0.05.

Loads
Regarding the calculation of the load profiles, it takes into account the real contractual delivery powers of each load. Two nodes are considered as commercial consumers, while the other ones refer to residential customers. For the profiles, due to a lack of complete information from the actual profiles, relevant (residential and commercial) profiles have been taken from an open-source dataset (OpenEI) [36], normalized and multiplied by the nominal powers.

PV Generation
The considered PV production, in the simulation, is calculated based on yearly solar irradiance and the nominal installed power [37]. Yearly solar irradiance data was obtained through collected data from a third party weather service provider [38] for the specific location of the case study with the coordinates of 46.4746 • N, 11.2479 • E.

EV Relevant Information
EVs are considered in some scenarios, through the load profile caused by their charging. Within this analysis, the number of EVs that determines the EV charging profile is set to 10 at the beginning of Energies 2020, 13, 52 14 of 20 the scenarios with EV and that number gradually increases by the rate of one EV per year. The nominal power of the EV chargers is considered to be 3.6 kW, i.e., a standard power level of charging stations, and charging events mainly occur during the night.

Energy Price Evolution
Energy price evolutions increase and decrease linearly, with the granularity of one year along entire scenario horizons.

Definition of the Scenarios
The scenarios are defined by assuming the following entries:

Calculation of the Objective Function
The objective function has been evaluated for each planning alternative and scenario. The best three solutions for each one of the eight scenarios have been calculated for all the scenarios to provide the starting matrix to carry out the calculations based on decision theory. The number of alternatives is then 24. Table 4 shows the objective function values: it is worth noting that, with respect to scenario 2, the values of the objective function for alternatives 3, 8, and 12 are 0.5135, 0.5136, and 0.5140, respectively. Scenarios 5-8 (associated with a large deployment of EVs) exhibit higher values of the objective function. Table 5 reports the technical data of the alternatives, including the number of BESSs installed, the nodes where each BESS is located, and the BESS energy capacity at each node. The solutions include one to three BESSs. Looking at the BESS locations, it can be seen that, in three cases, the slack node is chosen to install a BESS. In this way, the BESS acts to limit the reverse power flows. In the alternative number 23, node 8 is selected two times, because the energy capacity of the BESS in one installation reaches the limits, and the procedure did not find a better alternative to place the BESS in another node.

Decision Theory-Based Assessment of the Planning Alternatives and Scenarios
Several cases have been considered, with different values of probability of occurrence assigned to each scenario (Table 6). In Case 1, all scenarios have the same probability of occurrence and, then, the equal likelihood criterion is considered. Cases 2 and 3 consider that it is more probable that the scenarios with higher and lower price increases will occur, respectively. Cases 4 and 5 are focused on the deployment of EVs. In particular, in Case 4, the scenarios with the large deployment of EVs are weighted more, while in Case 5, the scenarios with no deployment of EVs are weighted more. In Case 6, the probabilities are higher for scenarios with a higher price increase and higher PV installation. Finally, Case 7 weights the scenarios with a lower price increase and large deployment of EVs more.  Table 7 reports the expected costs for each alternative in all cases considered. From the values of the expected costs, the selected planning alternative is Alternative 9 for cases 1-4 and 6-7. Alternative 9 is characterized by lower costs in scenarios 7 and 8 (generally associated with high values of costs); as such, it is often the selected alternative. The criterion of the minimum expected cost provides Alternative 20 as the preferred one in Case 5, when scenarios 1-4 are more weighted.  Table 8 reports the maximum weighted regrets for each alternative in all cases considered. From the values of the maximum weighted regrets, the selected planning alternative is Alternative 7, for cases 1-5 and 7. The values of the objective function in scenarios with a large deployment of EVs influence the results also for this criterion, as in 3.5.1.

Application of the "Optimist-Pessimist"Criterion
The "optimist-pessimist" criterion was applied, considering different values of the weighting factor α ranging from 0 to 1. The case with α = 0 corresponds to the application of the "pessimist" criterion, while the case with α = 1 is equal to the application of the "optimistic" criterion. The results are reported in Table 9. Table 9. Selected planning alternatives obtained by applying the "optimist-pessimist" criterion.