Regional energy planning based on distribution grid hosting capacity

: In a liberalized energy market, policymakers cannot over-impose the deployment of new distributed generators, either in terms of location or in terms of size/technology; on the opposite, they are asked to promote incentives, penalties or constraints in order to foster a generation portfolio evolution fitting with the energy need of the loads. In the paper, given a local distribution grid, a two-step procedure is proposed to define the most effective energy policy, willing to drive a proper evolution of the generation portfolio, i.e., to maximize the renewable sources exploitation taking into account the grid constraints. The approach proposed is based on a stochastic (Monte Carlo) procedure. Given a generation portfolio, many scenarios are evaluated, changing generators’ nominal power, point of common coupling and also a slightly different technologies share. Actually, the final goal of the procedure proposed is to simulate the stochastic behavior of users with respect to the regional energy policy (i.e., to perform a multi-dimensional sensitivity analysis) in order to validate the proposed generation portfolio. In particular, in the first step of the procedure, it is defined a portfolio in which generators are aggregated with respect to the power plant technology (PV, wind, small hydro, big hydro, etc.). Such a portfolio is optimized in order to maximize the matching between local production and local consumption. In the second step, a Monte Carlo simulation is implemented to stochastically take into account a significant number of possible configurations of each portfolio (number of generators, unit size, location, etc.). Given the generator’s distribution, a probability index based on a Hosting Capacity concept is proposed as a performance index. Conductors’ thermal limits and slow voltage variations on the electrical network are evaluated for several In order to validate the approach and demonstrate its capabilities, the procedure proposed has been applied to the real medium voltage distribution grid relevant to the Italian city of Aosta, i.e., real-life topologies, renewable-based generation and load fluctuation have been simulated.


Introduction
Regional energy planning is becoming more and more important given the exponential rise of renewable resources based on small power plants connected to the local distribution grid, commonly identified as Dispersed Generation (DG). In the Italian context, local policymakers are in charge to define a Regional Energy Plan (Piano Energetico Regionale-PER). In this plan, they must define the medium-term objectives for the energy production and consumption within the region, undertaking actions that can drive to achieve the goals (i.e., giving economic incentives or facilitating the adoption of specific solutions). A rational energy planning has to properly take into account environmental, economic and electric issues. Energy planning processes have to start from an evaluation of the energy needs in the region, the possible future evolution of such energy needs, the renewable resources locally available and the technical parameters of the local electrical grid. In such a perspective a first not trivial issue is the identification of the geographical bounds of the problem, i.e., the definition of the spatial bound of the local area (hereinafter defined as the Region) under investigation.
In this paper, in order to have a deterministic identification of the Region, it is proposed to adopt the bounds of the local distribution grid as a term of reference. Actually, it is well known that the electrical grid could be classified in a layer structure:  the transmission grid acts on a national scale, it is typically managed by an independent grid operator (Transmission System Operator) who is in charge of a proper planning and operation of the infrastructure;  the distribution grids are connected to the transmission infrastructure by High Voltage (HV) to Medium Voltage (MV) transformers sited in the Primary Substations (PS). Given the radial nature of the distribution grid, it is quite simple to cluster the correspondent geographical area, the total energy needs from the load, the active users' injections, etc., Consequently, the distribution grid bounds can be used for the clustering of the Regions. Moreover, given the constraints on the number of customers that can be connected to such distribution grids, and the heavy environmental impact their deployment can have, one of the most important targets is to exploit at best the already in place infrastructure, minimizing and postponing eventual grid reinforcements. Given such an approach, it is possible to directly link the DG impact on the MV distribution grid to the Regional Energy Planning procedure in the relevant area. Actually, DG injections are independent from the actual electrical need in the Region and, as a consequence, they could cause deterioration of the grid performances [1,2]. The limit between acceptable or unacceptable deterioration is defined as the Hosting Capacity (HC) of the grid. Many studies are devoted to identifying the HC of a distribution grid, but most of them are based on deterministic approaches.
They provide specific solutions in terms of optimal siting and sizing of the DG [3], though grid regulation typically requires DSOs, e.g., in Italy [4], to reinforce the distribution grid in order to allow DG connection in any node where users request it. Similarly, those approaches are not useful for a policymaker having to define a local energy planning: indeed, in a liberalized electricity market, the policymaker cannot define nominal power and position of DG units.
Given the different economic benefits they could gain, Distribution System Operators (DSOs), policymakers and investors are typically interested in different DG evolution paths. Mathematically speaking, the objective function of the distributed generation planning problem [5,6] can be the minimization of the power losses of the distribution grid [7], the minimization or the optimal allocation of the curtailment cost [8], the improvement of the grid reliability [9] or the maximization of the DG capacity [10], etc., according to the perspective under evaluation (the DSO one, the DG units one, etc.).
Evaluating the literature on Regional Energy Planning procedure, several approaches could be identified; generally speaking, it is quite common to develop energy optimization over (at least) a yearly scenario [11]. Besides the mathematical formulation, a first cornerstone for an effective energy planning strategy is a proper definition of the actors involved in the process, actually the topic under investigation could be summarized as a multicriteria and multi-actors problem [12].
A quite classical problem formulation is based on a peak shaving logic, and it is devoted to postpone investment for distribution grid reinforcement, maximizing a renewable resource growth [13]. A more complex structure is necessary in order to optimally plan and operate the resources of a Region, e.g., the energy ecosystem could be classified with respect to several layers each one focused on a target phenomenon and interacting each other [14], this way fast behaving electric variables and slow thermal ones could be simulated concurrently. ICT infrastructure is a pivotal in order to properly monitor and manage the thermal and electric Regional ecosystem [15]; actually, the internet of energy is supposed to be more and more a cornerstone in the future energy optimized scenarios. Finally, with respect to the economic perspective the goal is an optimal capacity allocation and operation for both electric and thermal resources of the Region [16].
Several study cases based on many Regions can be found in scientific literature, examples spread over different countries, energy portfolios, load needs and behaviors [17][18][19][20][21][22]. Moreover, different multi-criteria optimization logics are proposed congruently to the local targets. Optimization methods span from classical soft computing approaches (e.g., fuzzy logic engine [19]), to probabilistic formulations (e.g., Monte Carlo algorithms designed to properly take into account uncertainties [23][24][25]), nevertheless most of the cases are based on classical optimization methods (gradient-based, MILP, etc.). This paper focuses on the scenario in which the entity in charge of the Regional Energy Planning is the local policymaker, willing to promote the penetration of the local renewable energy sources into the local electrical grid, adopting policies fitting both with the national [26] and international directives [27]. Actually, in such a perspective, a comprehensive renewable energy integration should be considered, this asks for both a proper selection of the energy resource to be exploited (in order to fit at best with the energy need of the users) and a proper quantification of the electric grid constraints (to check the distribution grid capabilities in managing the requested power flows).
With respect to the proposed approach, HC procedures are adopted to manage the electric grid bounds in the Regional Energy Planning procedure, i.e., the procedure implemented is designed to take into account both the energy behavior of loads, generator units and electric infrastructure devoted to interconnecting them, resulting in an interdisciplinary approach.
The paper is structured as follows. In section 2 a brief overview of the Hosting Capacity concept is reported, classical approaches for the HC evaluation are described and their limitations in the specific problem of the policymaker are discussed. In section 3 a new method that aims to overcome these limitations using a probabilistic approach to evaluate the Hosting Capacity is presented and the methodology to apply this approach is defined in detail. Its application to the medium voltage distribution grid of an Italian city is presented in section 4 as a case study, while numerical results of this application are detailed in section 5. Finally, conclusions are given in section 6.

Focus on the Hosting Capacity concept
The estimation of the maximum amount of DG that can be connected to the distribution grid without violating the operating criteria (the already defined Hosting Capacity) is one of the main performance indicators that should be considered for grid planning and operation. The interest in numerical methods for the HC evaluation is based on the fact that MV distribution grids performance is affected by the actual generation and load patterns. Hence, the HC is defined as the amount of DG acceptable by the grid without endangering its power quality and reliability with respect to given limits.
Among the approaches used in the Hosting Capacity evaluation problem, it is possible to identify at least two classifications: a nodal Hosting Capacity evaluation or a global (grid-scale) approach, moreover algorithms could be based on deterministic or stochastic models. With respect to the approach adopted, HC quantification could significantly change.
Nodal HC could be formulated as an objective function maximizing the active power injected by DG in a specific bus of the network. In order to evaluate it, DG power injections into a specific bus of the grid could be increased iteratively until the selected constraints are violated. This method is defined as an iterative procedure, in which at each loop a power flow calculation is performed: if the technical limit is respected, DG active injections are increased. We refer to global HC as the maximum amount of capacity that can be connected to the whole grid with more than one generator. Examples of the evaluation of the Hosting Capacity can be found in literature, both for the nodal Hosting Capacity [28], and for the global one [29][30][31].
When considering deterministic approaches, all the information about the grid, the load and the generators are known in a deterministic way. The only missing information is the capacity of the generator, which is the variable to be optimized. In this case, the problem has a unique set of input and also the optimal solution will be unique and well defined. According to this approach, many studies are devoted to finding the optimal technology, size, and placement of DGs in power systems that can maximize the Hosting Capacity [32,33]. On the other hand, with the probabilistic approach, different combinations of input are considered. Each set of input is defined introducing the variability that characterizes the loads and the production and an optimal solution can be found for each set of input. Probabilistic approaches can be developed with different levels of variability depending on the number of variables that are considered stochastic: a stochastic behavior can be considered for the load while the position of generators and their production profiles are assumed deterministic [28]; the position of generators can be defined but their production profiles can change according to a probability distribution ( [29,34]); both the position and the production profiles of generators can be considered stochastic, while the load profiles are supposed deterministic [30,31]; finally, DG's position can change stochastically, while their production is deterministic [35]. In Italy, studies to evaluate the nodal HC in MV and LV grids have been also commissioned by the National Energy Authority. Such studies had been based on an extended sample of the Italian distribution system (the database was detailed in about 5% of the Italian MV distribution grid, and 1% of the LV one) [36,37].
Mathematically speaking, HC quantification is based on performance indexes, devoted to evaluating the main criticalities correlated to a power injection into the distribution grid:  Steady-state voltage variations. Adding a DG to the MV feeder causes a voltage increase at the hosting bus and generally on the whole hosting feeder. Hence, in order to avoid malfunctions of grid-connected equipment, steady-state voltage variations in each bus of a MV grid, according to IEC 50160 standard, must remain within ± 10% of the rated voltage during 99% of the time.

90% 110%
 Transformers and lines thermal limits. If DG exceeds the load, the thermal limits of each MV line connecting nodes and should be considered in the originating reverse power flow condition. Each branch of the network has a specific limit , , depending on its own design and installation criteria. Thus, this limit is different for each network component. ,


Rapid Voltage Changes (RVC). RVC depends on the short-circuit power in the users' point of common coupling [16]. Generally, RVC is evaluated as the difference between the voltage amplitude when DG is connected and is injecting power into the grid and after its sudden disconnection. This value is required to be lower than a threshold , commonly defined as a percentage (4-6%) of the rated voltage. Mathematically: , and are the voltage amplitudes, respectively, with and without DG. In some cases, the HC is investigated also with respect to the harmonic distortion produced by DG [1]. The more the electronic converters are diffused within the grid, the more the problem of harmonic distortion is important. However, this kind of limitation is related to the quality of the supply and it does not affect the continuity of service.
Although as depicted many phenomena should be considered when evaluating the feasibility of connecting new DG to the grid, most of the practical approaches devoted to assessing the HC provide taking into account only slow voltage variations and thermal limits of network's components. The Hosting Capacity concept can be a useful enhancement in Regional Energy Planning. Thanks to this indicator, decisionmakers can promote the installation of new generation in a reliable and effective way, minimizing externalities and drawbacks of DGs. Therefore, in the present paper, a probabilistic approach for the evaluation of the Hosting Capacity of a MV distribution grid is proposed.

Methodology
The idea behind our approach is that, in a liberalized energy market, the policymaker can only address the connection of new DG plants, incentivizing and/or penalizing them depending on their primary source. In this regard, the proposed procedure is designed to define the optimal generation portfolio, detailed for each single technology, that maximizes the penetration of DG without exceeding the HC. The approach is structured into two steps: in the first one, the objective function is the maximization of the energy produced locally, while the second one is related to the evaluation of the HC of the grid.
The first step is based on the input listed in Table 1: it is devoted to the definition of the optimal generation portfolio, evaluated for different DG penetration levels. Given such a portfolio, the second step (collected the input reported in Table 2) evaluates the Hosting Capacity of the Region under investigation (i.e., of the correspondent MV distribution grid) calculating for each DG penetration level a probability index devoted to quantifying the violation detected over the grid (both in term of number and criticality).

First step-Definition of the optimal generation portfolio
The first step of the procedure considers different levels of DG penetration and to identify the correspondent optimal capacity portfolio. Given the energy sources locally available, a population of DG plants is defined and, for each technology (i.e., hydro, PV, wind, etc.), a representative yearly production profile is defined in a normalized form. Given these profiles, the energy produced during the year by each technology can be evaluated. A typical power profile in primary substation is also necessary, from this profile the energy required in the whole year can be evaluated. All this information has to be defined elaborating historical data of the Region under analysis or, if this would not possible, of similar areas. Given the generation and load power profile, the proposed procedure requires to define the DG penetration level as the percentage of energy injected by the DG itself over the total energy need of the area : The energy produced by the DG plants can be evaluated as the sum of the energy produced by each of the technologies investigated: where is a vector of elements that represent a specific production portfolio of DG, is the overall capacity of each technology and is the yearly energy produced by the normalized power plant.
Once defined , there are multiple portfolios that solve Eq 2 [2]: the optimal one is selected in order to minimize energy flows in primary substation, taking into account both direct flow from the high voltage to the medium voltage grid, and reverse flow that can be caused by DG. The optimal portfolio for each level of DG penetration is the one that minimizes residual flow in the primary substation as defined in Eq 3 respecting constraints formulated in Eq 4.
The optimal portfolio evaluated will results strictly dependent on the profiles adopted to model each single generation technology. In order to validate the assumption, a sensitivity check has been introduced perturbing the generation profiles and consequently iterating the optimization process. In particular, three different perturbations are applied to the generation profiles: (i) variation of the amplitude introducing normal or random distributed noise, (ii) hourly time shift backward or forward up to one hour, (iii) daily time shift backward or forward up to four days. The optimization process is repeated until the mean value of the power for each technology changes from an iteration to the next one less than 0.05% [38], assumed to be an acceptable convergence criteria for an energy planning procedure.

Second step -Hosting Capacity evaluation
The portfolios obtained in the first step of the proposed procedure represent the overall capacity, detailed for each single generation technology, that has to be connected to the distribution grid in order to maximize the local production and, at the same time, to minimize reverse flows.
To evaluate if the distribution grid can host such generators, it is necessary to evaluate a plurality of different scenarios correlated to different DG distributions: connection node for generators, power plant nominal power and number of plants will differ in each single scenario. To manage such probabilistic distribution, a Monte Carlo technique has been adopted, as detailed in Figure 1.
Although both nominal power and connection node of DG are unpredictable, some assumptions can be done. Actually, with respect to the distribution of the generators nominal power, it is fundamental to consider that it is strongly correlated to the technology investigated. In the procedure developed, the nominal power of the generator is defined adopting a Monte Carlo approach. For each technology, a roulette wheel selection is used to manage the probability to have a generator of a given nominal power. Each area of the roulette wheel is characterized by a minimum and a maximum capacity value, and the size of each area is proportional to the probability to select a plant inside that range. Once selected the range, the actual capacity of the plant is randomly defined considering a constant distribution inside the range. The choice of the probabilities that compose each wheel could be based on the generation portfolio currently in place, considering also evolution scenarios suggested by the regional policymakers and taking into account the regional energy policies in place (in Section 4 numerical examples are provided based on a real-life study case).
Given a technology and a nominal power, connection nodes are selected. In the electrical grid under investigation, nodes are classified in classes, selected with respect to the geographical position. For each class, bounds are defined on the generator technology viable in that node and on its maximum nominal power (e.g., hydro generators are bounded to areas close to a river, nominal power of PV power plant is bounded for downtown areas, etc.).
At the end of the routine, for each DG penetration level and for each generation portfolio, several scenarios are simulated, each one based on a different number of generators, connected in different nodes and with different nominal powers. Such a procedure is devoted to properly evaluating the different configurations that the grid operator could be asked to manage and, consequently, to evaluate the probability to have violations in the criteria selected for an efficient and reliable management of the electrical grid. Once the scenarios are generated, the proposed procedure checks the impact on the distribution grid, modeling one by one all the nodes, all the generators and all the loads, over a whole year time window (hourly sampled).
Power can be withdrawn from the MV distribution grid by MV users or secondary substations that supply the LV distribution grid. For each of these loads, a conventional power profile is defined. Electrical consumptions of MV users are normally related to the user's economic activity, this means that each user has a specific behavior and consequently a different power profile. Therefore, when considering MV users, it is necessary to elaborate historical profiles to take into account their peculiarities ( _ ). For the secondary substations, instead, the approach is different, because each of them usually supplies many LV users. Consequently, a compensation occurs between users' behavior, with beneficial effects on the degree of similarity of the power consumptions of different secondary substations. However, another problem exists, because the consumption profiles of secondary substations are not directly measured by the DSO; typically, only aggregated quantities-as the total energy absorbed in a year-are available. In the proposed approach, in order to model LV users power profile, the following procedure has been adopted: given the yearly power profile in primary substation and the power profile related to all the MV users ∑ _ , the power profile _ that represents the sum of the power in all the secondary substations is obtained as difference between them.
_ is then scaled on each secondary substation proportionally to the ratio between the energy absorbed in the reference year by the substation under investigation and the total energy correlated to MV/LV substations.
In order to manage the Monte Carlo procedure, a suited convergence criterion is defined. The goal is to evaluate how many scenarios have to be created in order to properly take into account the many possible resource combinations. For each scenario , for each portfolio and for each hour ℎ of the simulated year, a load flow procedure is computed in order to calculate the voltage profile, the current and the power flowing in each branch . Then, three indexes are calculated: (1) the yearly power losses of the distribution grid , (2) the maximum voltage reached by each node during the year and (3) the maximum current of each branch during the year ̅ . In particular, the power losses index has been adopted as a primary converge criterion, while the second and third ones are defined as check criteria. The losses on each branch at a specific hour ℎ are evaluated as the difference between power ℎ flowing into the branch, and power ℎ flowing out from it. The system losses evaluated on the total number of branches can be then evaluated as: The criteria have been formally defined as reported in Equation 6 and Equation 7, where is the mean value of the losses evaluated from scenario one to scenario , while is the standard deviation of the losses evaluated up to scenario . The variation of both the mean value of the losses and their standard deviation has to be lower than . In order to have more robust criteria, these equations are required to be verified five scenarios consecutively. Finally, validated the number of scenarios ( ) evaluated by the proposed convergence criterion, a final performance index is introduced to quantify the compliance level of the DG penetration under investigation and the electric grid management criteria. The index represents the probability to violate a constraint of the grid and it is named in the following Hosting Capacity Violation Probability ( ). Mathematically, the index is computed as the ratio between the number of scenarios in which a grid bound is violated and the total number of scenarios evaluated.

8
The , as defined, can be related to a general constrain; however, we propose to evaluate it with respect to thermal and voltage limits because, as previously mentioned, these are the most critical ones for the operation of the grid.
Given the approach proposed, the maximum acceptable violation occurrence defines the maximum DG penetration compliant with the electric grid in place; a realistic limit could be set to 5 ÷ 10%, as discussed in the literature for similar stochastic approaches [30].

Case study
The procedure has been applied to the real MV distribution grid of the city of Aosta, administrative center of Valle d'Aosta Region in Italy. The location of the primary substations in Valle d'Aosta is reported in Figure 2. It is possible to see that there are 18 primary substations distributed on the territory, i.e., it is very effective the definition of the geographical limits of each supply area. The area fed by the medium voltage grid of Aosta city, used as a case study for the approach, is highlighted in green. This grid is composed by 486 nodes supplied by 16 feeders for a total length of 140 km (Figure 3). The users connected directly to the MV grid are 63, while the secondary substations are 250 (supplying 29420 LV users).  The maximum power required from the HV grid is around 32 MW and the total energy absorbed in a year is 149 GWh (data related to 2013). Six typologies of DG are considered according to the characteristics of the territory: photovoltaic system, wind farm, hydro power plants of medium and small size, Combined Heat and Power plants (CHP) related to industrial users or related to district heating system. Each of these types of plant has a specific production profile that is mainly characterized by daily and seasonal trends [38]. The load profile of every MV user is known for a complete year, while the load of secondary substations (i.e., passive LV users) is obtained from the power flow historically measured in primary substation (Figure 4), as detailed in Section 3.2. The installation of each portfolio (resulted from the first step of the procedure) has been modeled with the Monte Carlo approach, as detailed in the following. The roulette wheels for the size ranges of the plants have been generated according to information about existing plants in Italy and considering the peculiarities of the considered region (Table 1). Even in the case they have a single range, the definition of the roulette wheel is fundamental because it indicates the minimum and the maximum size that the plant could have. The other input needed to generate the scenarios with the Monte Carlo approach is the maximum size of the generator, for each technology of plant, which can be installed in each node of the distribution grid. In this part, the resource availability, environmental, social and regulation constraints can be represented. In the study case, the criteria reported in Table 4 have been considered.

Definition of the DG optimal portfolio
The first step of the procedure is devoted to the definition of the optimal generation portfolio for the area, parametric with respect to the target DG penetration. Figure 4 shows the energy map of the yearly load profile for the network under study (positive values mean power absorbed from the HV system). The energy map is related to the on-field measurements taken in the PS of Aosta during year 2014. As it is possible to observe, the profile has the typical load trend with two peaks, in the morning and in the evening. Moreover, as typical in the mountain regions, the winter energy needs are predominant. Figure 5 reports the results of the analysis performed to identify the optimal DG portfolio: i.e., for a percentage of load supplied by local DG ranging from 0 to 150%, the optimal power of each DG technology is shown. Results refer to the quadratic optimization problem designed to minimize power flows in primary substation. For each level of DG penetration, the yearly DG energy generation is calculated and compared to the total energy required by the loads (simulations are performed for a DG energy contribution ranging from 10 to 150%). The total capacity increases almost linearly with the DG penetration, but the composition of the portfolio changes. Cogeneration plants result to be an important part of the portfolios: for low penetration (10%) industrial CHP is the main part of the overall capacity, while, for greater DG energy penetration, district heating resources are more effective. Photovoltaic and wind generators are selected for low penetration with low shares, and their contributions result to be less important to reach higher penetration levels. On the contrary, small and medium hydro generators are selected only in case of DG penetration greater than 40 and 70% of the yearly energy needs, respectively.
With respect to the convergence criteria presented in Section 3.2, the value of has been set equal to 0.05% while the value of has been set equal to 0.1%. The number of scenarios generated for each portfolio resulted between 400 and 700 and, as a general trend, the more is the penetration of DG plants, the more is the number of scenarios required to verify the convergence criterion. The results of the mean value of the losses and their standard deviation for each level of DG penetration are reported in Figure 6. It is possible to observe that the overall losses of the distribution grid present the minimum value when DG penetration is low, while, then, they increase strongly. To produce 100% of the energy required by the load with DG plants, they are doubled with respect to the case without DG. On the contrary, it is possible to state that the losses in the transformer in primary substation decrease up to a complete penetration of the DG. At the penetration level of 100% they reach their minimum value, while, if more generators are connected to the grid, they rise again because energy transferred from MV to HV grid becomes predominant.  For each scenario generated, the yearly maximum and minimum nodal voltage amplitudes are collected in order to have a direct metric for the evaluation of the quality of supply. In Figure 7, these values are depicted for one feeder of the grid (Feeder 10, 48 nodes) in order to show what happens in different scenarios. When considering the base case ( Figure 7a)-with no generators connected to the feeder-there is one single trend of values for the nodal maximum voltages (depicted in red in the figure) and a single trend for the nodal minimum voltages (depicted in blue). It is possible to see that both the minimum and the maximum voltage trends decrease along the feeder due to the energy needs of the loads. When considering portfolios with different DG penetrations (moving from Figure 7b to Figure 7g), several overlapped trends are shown for the maximum and minimum voltage profiles, each one related to a different Monte Carlo scenario simulated by the proposed procedure. It is possible to observe that the more the penetration increases, the more the voltage rises (both the minimum and the maximum values). In this view, it is clear that for a penetration level equal to or higher than 60% ( Figure 7d) the maximum acceptable value for the voltage (1.1 pu) can be exceeded. The HCVP indicator related to voltage limits will quantify the probability to exceed it. A similar representation can be done for the maximum values of current measured in each branch of a feeder. Figure 8 depicts results for feeder 10, over 400 different Monte Carlo scenarios, simulating different DG penetration levels. Blue points represent a low usage of the cables, on the opposite yellow points represent cables' overloads. The primary substation is on the left part of each column while the farthest nodes are on the right side. In the case without DG (Figure 8a), it can be noticed that some branches are strongly oversized, so they appear in blue in most of the Monte Carlo scenarios, generating vertical bands. Moreover, installing new generation could create overloads on some branches. As it can be expected because of the reverse power flows, overloads appear between the node in which the generator is installed and the primary substation. For this reason, critical branches are mainly in the first part of the feeder.

Hosting Capacity violation probability
The goal of the procedure is to evaluate if a DG portfolio, which could be incentivized by a local policymaker, can be hosted into the distribution grid without causing any violation of the operational limits. To quantify the probability to violate the HC limits, the HCVP index is adopted, defined in section 3.2. A production portfolio could then be accepted if the HCVP resulting from its installation is lower than a target value. In our case study, we consider this limit equal to 10%. This target value is higher than zero, in this way we accept the probability to have violations in the constraint of the grid and this means that, in unlikely scenarios, a limited intervention of the DSO may be required.
The HCVP index has been evaluated for the voltage and thermal limits. In Figure 9 the value of the HCVP is depicted for each level of DG penetration according to three different limits. The actual limit in terms of voltages according to EN 50160 standard is 1.10 pu, but it is useful to depict other limits in order to have an overview of the voltage levels of the grid. Voltage levels higher than 1.10 pu can be observed starting from a penetration of 30% and the HCVP increases almost linearly with the increasing of the penetration. The behavior is not linear when considering lower voltage limits: in this case, the HCVP increases faster for lower DG penetration, then it has an asymptote to HCVP equal to 1. If considering an acceptable HCVP limit equal to 10%, the maximum DG penetration achievable is 80% (HCVP equal to 9.49%).
In Figure 10, the same approach adopted for voltage limits is used to represent the current ones. In this case, the main limit is the complete usage of the feeder ampacity (1.0 pu), but also lower limits are depicted in order to evaluate the usage of the feeders. From this point of view, the limitation results more problematic: violations are detected from a penetration level of 30% (HCVP equal to 9.9%) and for a penetration level of 40% the probability is more than doubled (HCVP equal to 25.6%). If considering an acceptable HCVP limit equal to 10%, the maximum DG penetration achievable is 30%, lower than the one found according to voltage limits.  Obviously, the installation of DG does not have to cause nor voltage violations, nor current ones. The strictest limit between them should be considered for the evaluation of the Hosting Capacity. For the considered case study, the strictest limit resulted to be the one related to thermal limits. The result is that, if requiring a HCVP lower than 10%, the maximum level of penetration of DG that can be hosted in the distribution grid is 30%. In other words, this means that is possible to install 1230.8 kW of new DG without any restriction on their size and position, producing locally around 45 GWh (Table 5).
However, some strategies that can increase the HC are available. With respect to the voltage violations, it could be possible to consider a voltage control law that can improve voltage profiles. This scenario is coherent with the regulation framework today in place in Italy [39]. Nevertheless, in the case study evaluated, voltage violations do not result to be a bottleneck. With respect to the thermal limits of transformers and conductors, the solution can be the identification of the branches of the lines more problematic. The procedure proposed allows the DSO to identify them in order to consider possible grid reinforcements.

Conclusion
In the present paper, a multidisciplinary approach to address the regional electrical energy planning has been presented; in particular, to this purpose, a geographical clustering based on the distribution electrical grid structure has been proposed. The objective function of the procedure aims to optimize the regional energy policy devoted to driving an effective DG evolution on the MV grid, taking into account local parameters: actual loads and generators, sources availability, electrical grid in place, etc.
The algorithm provides the optimal portfolio of power plants according to their technology, promoting the mix of sources that better fit the local load; in a second step a stochastic procedure simulates many scenarios adopting such a portfolio as a target case, i.e., different cases changing DG size, point of common coupling and technology are evaluated. Thanks to the approach proposed, an ideal generation portfolio is identified, consequently policymakers will have clear information about the energy policies they should promote in order to drive a DG evolution compliant with the electric grid limits and with the energy needs (nodal power profiles) of the area.
Moreover, the portfolio proposed, i.e., the whole set of scenarios simulated, allows the DSO to exploit at best the already in place infrastructure, minimizing and postponing grid reinforcements. To check the compliancy of the portfolio with the existing grid, the concept of Hosting Capacity is adopted, considering thermal limits of transformers and conductors and steady state voltage limits along lines.
The procedure has been tested on a real case study based on the city of Aosta (Italy). The maximum DG penetration achievable resulted in a yearly local energy generation close to 45 GWh without violating the Hosting Capacity performance indices adopted in the study. Such figure corresponds to an incremental DG nominal power close to 1231 kW. The optimal mix is composed by solar, wind and CHP, while the installation of hydroelectric power plants is not recommended. This is because hydroelectric power is mainly available during summer, while the energy is more necessary during winter because loads are higher in this season (result compliant to fact of having considered a town in a mountainous area).
The procedure defined is able to merge a classical energetic approach for energy planning with the recent electrical concept of Hosting Capacity. It provides results that are based on a strong technical analysis (i.e. that properly evaluate the capabilities of the electrical grid already in place) and, at the same time, the approach proved its effectiveness in being adopted by the policymaker in the energy planning process, i.e., results are easy to be directly handled by policymakers.