**1. Introduction**

The production of electric energy with renewable energy sources (RES) and the electrification of energy use are crucial for energy transition, which is the ongoing process to reduce the use of fossil fuels with the decarbonization, decentralization, and digitalization of the energy sectors. In this context, the European Union (EU) launched an ambitious plan to cut emissions in the atmosphere by harvesting the energy from wind and solar and fostering a profound transformation of heating and transportation sectors [1].

From the power system perspective, the non-programmability of energy production (i.e., mostly based on intermittent sources) is making it tough to comply with the required adequacy and security levels. Furthermore, since a significant amount of renewable energy currently comes from small to medium-size power plants connected to the distribution system (e.g., photovoltaic power plants), the energy transition is profoundly impacting the distribution system. The high share of distributed generation (DG) is already

causing temporary voltage regulation and power congestion problems in distribution networks that are destined to become more frequent with the progress of the energy transition. The active management (AM) of distribution networks allows fixing such operational issues with the use of flexibility offered by generation and consumption, that is referred to as no-network solutions in opposition to the traditional paradigm of network solutions. As a consequence, no-network options have to be included in distribution planning as a new development option [2–4]. The usage of flexibility can increase the hosting capacity of the network and, as a consequence, the deferment of infrastructural investments. To foster the use of flexibility, the EU Member States now have to allow the distribution system operators (DSOs) to procure flexibility products with transparent, non-discriminatory, and market-based procedures for the operation and development of the distribution system [5]. Because of the expected more extensive exploitation of flexibility for the operation of the distribution network, DSO and transmission system operators (TSO) will have to cooperate, by exchanging all necessary information to ensure the use of flexibility, guarantee an efficient operation of the whole system, and facilitate market development [6]. Indeed, the "local" flexibility, offered by the distributed energy resources (DERs) for the operation of the distribution system, might be useful also for "system" services, needed by the TSO for guaranteeing safe and secure operation of the whole power system. It is clear that DSOs cannot completely rely on the flexibility in their networks, and the level of uncertainty might be considerably high.

Battery energy storage systems (BESS) are a technical choice to increase flexibility and reduce the level of uncertainty. They can be locally employed for RES integration, load peak flattening, voltage regulation, efficiency improvement, solving power congestions, etc., BESS can offer frequency regulation services that are crucial with the progressive drop of the system inertia consequent to the diffusion of non-rotating generators or power electronics interfaced generators. The reduction of the system inertia may cause critical frequency deviations even during small active power imbalances [7].

BESS can foster the market of flexibility products in the early stage of implementation. In fact, pioneering projects implementing flexibility markets involving both TSOs and DSOs showed that the sourcing of flexibility is a critical element, mostly at the early phases of the market development, when aspects like flexibility product cost, provider participation, and availability of flexibility products represent a potential risk for the distribution network management. This uncertainty could be reduced by BESS that represent an additional resource when the number of available RES is too low to ensure effective competition in the area where suitable facilities for the provision of the services are located, avoiding the increase of the costs.

Moreover, since also TSOs are procuring the flexibility in the market, in the paper, it is proposed a decision-making process that allows the evaluation of the share of flexibility to be reserved to each player, enabling a stronger coordination between local and system objectives and needs. The BESS cost is obviously a crucial element of the decision-making process that has been considered in the paper. In fact, despite BESS having a huge cost-reduction potential, BESS cost is still a feature that impacts on the success of business models depending on the regulatory framework. In [8], the authors proposed a multi-objective (MO) approach for simultaneously optimizing the size, the position, and the operation profile of BESS called to offer services to the DSOs, without monetizing the benefits that are not naturally expressed with currency (e.g., improvement of voltage profile or benefits related to the environmental protection). That paper considered the point of view of the DSOs that, under specific conditions, can be allowed to own and manage BESS. This paper makes another step forward, combining the needs of BESS owners and DSOs. Taking into account the advocated cooperation between TSO and DSO, an instrument is proposed that allows the evaluation of the availability of the flexibility product for both the systems' operators, without disregarding the BESS owner point of view. The BESS owners aim at increasing their incomes from arbitrage practice and from the provision of ancillary services to both the system operators (i.e., DSO and TSO), while the DSO aims at reducing the residual risk of technical constraints violation by promoting the

use of flexibility products offered by the BESS owners. In particular, for considering both the interests, the capacity and the power of the BESS are shared between the percentage dedicated exclusively to support the DSO operation and the remaining quote available for arbitrage or other services. The specific service of frequency regulation support offered by BESS to the TSO and the relevant economic benefits for the BESS owners are explicitly considered in the proposed optimization.

The paper is organized as follows. In Section 2, the proposed methodology is described underlying the novelties and the improvements in respect to the one proposed in [8]. In Section 3, the approach is validated and discussed through a case study that applies the methodology to a real Italian distribution network. Finally, in Section 4, some concluding remarks are presented.

#### **2. Multi-Objective Optimization for Optimal Exploitation of BESS**

A large number of papers have been published on the use of BESS in power distribution systems, analyzing different models and methods to enhance the optimal network planning [9–11]. Studies that include BESS (as well as demand response actions, characterized by possible recover of the curtailed energy) are more complicated due to time intercorrelations, since the BESS energy scheduling in one hour is subject to the charging/discharging cycle implemented in the previous hours [12]. Consequently, the decision-making problem may become complicated to be solved because planning alternatives can excessively grow in number. Traditional numerical methods like non-linear programming, dynamic programming, and mixed-integer linear programming have shortcomings if applied on large and complex distribution systems. On the contrary, meta-heuristic algorithms, like particle swarm (PS), Tabu search (TS), evolutionary algorithm (EA), and genetic algorithm (GA), can provide near-optimal solutions for complex, large-scale planning problems, like the one faced in this paper [9]. In [13–15], the PS optimization is used for the optimal allocation of BESS in the distribution system. In [16], the use of an EA for determining the capacity of BESS in an islanded microgrid, considering both steady-state and dynamic constraints, is proposed. The problem is formulated as an MO optimization that involves the dynamic equations of the power system, to improve reliability, stabilizing transients and reducing load shedding. A significant number of papers used the GA [17] or a combination of GA with other optimization techniques like PS, linear programming in [18] or quadratic programming in [19].

It is worth noting that, despite the high interest related to the cooperation between DSO and TSO in the provision of the ancillary services, in literature, few publications have addressed the optimal size and location of BESS for the assessment of flexibility products to be shared between DSO and TSO. Moreover, most of them analyze the voltage support and peak shaving, while very few analyze the possible frequency service [20]. Regarding frequency support, such papers are related to high voltage (HV) networks, islanded networks (microgrid or island) or examine the aggregation of DERs (usually represented as virtual power plant, VPP) [21–23]. For instance, in [23] clusters of electric vehicles (EVs) are grouped together as a VPP to provide fast frequency reserve service to the transmission system through the DSO whilst considering network unbalance. Most of the papers on optimal location and size analyze a specific voltage level or the two systems independently without considering the possible services for the other level and a wide range of contingencies (or the worst-case scenario) are considered [24].

Compared to the literature, the proposed paper presents an advancement for several reasons. First of all, moving in the direction of the cooperation between DSO and TSO, different grid services (i.e., arbitrage, frequency containment reserve (FCR), and automatic frequency restoration reserve (aFRR)), that medium voltage (MV) BESS can sell through the services market are considered. Moreover, the planning strategies are not developed taking into account only critical days but typical daily profiles, indicative of the seasonal behavior of loads and generators during a year, are used. Such choice is in agreement with the recommendations of the main international scientific organizations (CIGRE, CIRED, IEEE, etc.), that

recognize the unsuitability of the traditional deterministic distribution planning approaches, based on the aim of fulfilling the extremely rare operating conditions, which could lead to an unsustainable amount of network investments. In addition, the methodology proposed is able to deal with all the uncertainties related to RES and to consider distinctly the risk associated to any planning decision.

Generally, the optimal BESS exploitation requires to simultaneously take account of multiple goals. Thus, another critical aspect for the optimal siting and sizing of BESS in a distribution network is related to the definition of a unique financial objective function, because some benefits are not directly monetizable without adopting subjective assumptions that can produce biased results. In this context, MO programming permits a more transparent and impartial decision process and can be used for financial purposes by decision-making teams of companies or for socio-economic studies by regulators for defining fair rules [16, 17,19]. Evolutionary algorithms are well suited to solve optimization problems that are characterized by many contrasting objectives. Differently by other more conventional optimization methods, like the weighted linear combination or the ε-constraint, that need to perform several separate runs, the evolutionary algorithms can simultaneously deal with many candidates that form sets of solutions (named population) and find the optimal ones belonging to the Pareto set by performing the algorithm one time only. Furthermore, the Pareto front shape and its continuity have a small impact on the evolutionary algorithms results [25].

For these reasons, this paper implements a full MO optimization procedure based on a real coded non-dominated sorting genetic algorithm-II (NSGA-II) algorithm. This methodology has been chosen among meta-heuristic algorithms because it is recognized to be an efficient and robust technique, capable of generating good trade-off solutions for a wide range of optimization problems [26]. The real codification has been implemented by the authors in [8] to better deal with the continuous nature of some variables in optimization problems that include BESS exploitation. The main novelties of this paper, compared to [8], are the definition of new objective functions (especially the risk of technical constraint violations in a given electric distribution network) and the relative adaptations of the solution coding. Indeed, in [8], only the DSO point of view was considered, and the MO approach was used to avoid the a priori monetization of the benefits and perform the cost-benefit analyses of BESS allocation plans proposed by the DSO. Instead, in this paper, two stakeholders have been considered, the DSO and the BESS private owners, in order to find trade-off solutions between their contrasting goals.
