# Energy Communities Design Optimization in the Italian Framework  
[PERSON]  
1 LEAP s.c.a r1, Laboratorio Energia Ambiente Piacenza, 29121 Piacenza, Italy; [EMAIL_ADDRESS] (M.G.); [EMAIL_ADDRESS] (A.C.)
2 Energy Department, Politecnico di Milano, 20156 Milan, Italy; [EMAIL_ADDRESS] (F.B.); [EMAIL_ADDRESS] (M.M.)  
[PERSON]  
2 Energy communities (EC) are expected to have a pivotal role to reach European decarbonization targets. One of the key aspects is the regulatory framework adopted by each Member State to properly manage such new customers' aggregation. The paper firstly provides an updated overview of the EC regulation, focusing on the current Italian legislation. Next, a novel methodology for the design and management of energy community initiatives is proposed. The procedure firstly solves a design and operation optimization problem to calculate the best size of energy assets (boiler, heat pump, photovoltaic, thermal storage) to be installed. Second, a Shapley value-based approach is exploited to distribute a part of the community's incomes to members, based on their contribution to the overall welfare. Results demonstrate that the adopted methodology is effective in ensuring a proper cash flow for the community, while pushing its members towards energy efficient behaviors.  
Local energy sourcesThe exploitation of local sources should consider all the externalities related to architectural and landscape modification or competition with other local activities such as tourism or agriculture.  
Local security of energy supplyEU energy dependency rate on foreign countries in 2018 was equal to 58% [3]. Because of this, it is fundamental to consider the impact on internalization of primary energy procurement.  
Shorter transport distances and reduced energy transmission lossesWhile distances, hence energy losses, of electricity transport decrease, distribution networks become more complex to be managed.  
Community development and cohesionThe acceptability of new infrastructure is higher when decisions (and even investments) are taken collectively. This increases the awareness of local communities about the positive impact of business initiatives on social relations and economic activities.  
The required change of paradigm in the energy sector would have a wide impact in all the mentioned aspects of our society. Indeed, energy communities can be a tool to foster distributed generation, since they naturally have a holistic view on all the aspects of their local reality. From a purely technological perspective, such a change of paradigm requires a _smart_ integration of the different energy production, storage, and distribution systems, in order to meet the various energy needs of the users. This way, the electricity, heating, and cooling demands can be satisfied by maximizing the possible synergies among the available energy vectors and networks. This approach is usually called sector coupling and its implementation is considered as a valuable means to increase the share of renewable energy sources (RES) into the production mix and so decarbonize our final energy demand. As an example, heat pumps can be used to convert the electricity produced by photovoltaic panels to accumulate thermal energy to be used at another time during the day, so reducing the use of fossil fuels to meet the heating remand.