## 1 Introduction  
One of the most important drivers of a sustainable electrical power grid is the optimal integration of its distributed energy resources. The optimal integration requires that the value proposition of the grid resources be attractive, that is their applications must provide multiple benefits. This should occur in the case of all the types of distributed resources and particularly when these resources are electrical energy storage systems for which high installation cost must be faced. The use of storage in the frame of distribution networks provides multiple benefits, such as energy cost reduction and power quality (PQ) enhancement [1; 2; 3; 4]. The PQ improvement can be even more useful and evident in the case of low voltage (LV) distribution networks where one of the most severe PQ problem is the voltage unbalances caused by the large presence of unbalanced lines and single-phase loads and resources. Then, recently, particular attention has been devoted to the application of storage devices to reduce unbalances [5; 6; 7; 8]. In the relevant literature it was shown that the use of distributed energy storage systems (DESSs) can become more attractive only if they are optimally sited and sized so that their planning stage becomes a strategic starting point for the best exploitation of their technology. An increasing interest has been also addressed to the formulation of models and algorithms finalized to the optimal sizing and siting of storage based resources with reference to different applications, [9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30]. More specifically, a method used to determine the cost of batteries that makes profitable the use of DESSs in distribution networks is discussed in [9]. Ref. [10] proposes a method for the optimal allocation and economic analysis of battery energy systems in microgrids. The method proposed in [11] allows allocating DESSs while improving network operation and minimizing costs. In [12] the life cycle cost of distribution networks in presence of batteries is minimized. In [13] two methods are discussed to optimize the allocation of batteries for frequency regulation and peak shaving in transmission and distribution networks, respectively. In [14] the allocation of batteries is performed with the aim of reducing the energy exchanged at the distribution substation while maximizing the economic benefits of the distributor. A procedure for finding the minimum storage sizes in different locations of distribution networks is proposed in [15] with the aim of reducing the curtailment from distributed generation (DG). In [16] DESS allocation is aimed at alleviating the negative impact of high penetration of photovoltaic systems in distribution networks. The optimal allocation proposed in [17] is focused on the voltage support, losses minimization, cost of energy and management of congestions. In [18] a method is proposed to reduce losses and deferring network upgrading. In [19] the storage systems are optimally sized and sited in order to provide active and reactive support in view of reactive power/voltage regulation, losses reduction and cost minimization. In [20] an approach is proposed for the optimal planning of power networks in the presence of storage devices used to control variable energy resources. In [21], the planning problem of active distribution networks is dealt with by integrating energy storage systems in the network considering both long-term investment cost and reliability of operation. A two-stage stochastic model is proposed in [22] for the optimal planning of DESSs in power systems under the uncertainties due to wind generators which integrates a tradeoff analysis between the investment and operating cost. In [23] a stochastic optimization approach is used in the framework of the optimal planning of a network in presence of electrical energy storage devices and aimed at maximizing the total expected net benefits for the system operator.